diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2023-10-18 23:02:37 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2023-10-18 23:02:37 -0700 |
commit | 9168219b829aab55fefcb114937d3fc196548cde (patch) | |
tree | 4fa3fdb99d1820034ac1d97b66571a304446eeb4 | |
parent | 0865d37b6c343f86c48cd7f768781bba142b2007 (diff) | |
download | sncontinue-9168219b829aab55fefcb114937d3fc196548cde.tar.gz sncontinue-9168219b829aab55fefcb114937d3fc196548cde.tar.bz2 sncontinue-9168219b829aab55fefcb114937d3fc196548cde.zip |
Cleanup
-rw-r--r-- | extension/package-lock.json | 4 | ||||
-rw-r--r-- | extension/package.json | 79 | ||||
-rw-r--r-- | extension/scripts/package.js | 4 | ||||
-rw-r--r-- | extension/src/activation/activate.ts | 2 | ||||
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 4 | ||||
-rw-r--r-- | extension/src/bridge.ts | 2 | ||||
-rw-r--r-- | extension/src/commands.ts | 34 | ||||
-rw-r--r-- | extension/src/continueIdeClient.ts | 2 | ||||
-rw-r--r-- | extension/src/debugPanel.ts | 8 | ||||
-rw-r--r-- | extension/src/extension.ts | 2 | ||||
-rw-r--r-- | extension/src/lang-server/codeLens.ts | 14 | ||||
-rw-r--r-- | extension/src/util/vscode.ts | 2 |
12 files changed, 78 insertions, 79 deletions
diff --git a/extension/package-lock.json b/extension/package-lock.json index b24ef1bf..bd9779b4 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,11 +1,11 @@ { - "name": "continue", + "name": "sncontinue", "version": "0.0.413", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "continue", + "name": "sncontinue", "version": "0.0.413", "license": "Apache-2.0", "dependencies": { diff --git a/extension/package.json b/extension/package.json index e6d2b8b2..729aa348 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,26 +1,25 @@ { - "name": "continue", + "name": "sncontinue", "icon": "media/icon.png", "version": "0.0.413", "repository": { "type": "git", - "url": "https://github.com/continuedev/continue" + "url": "https://dummy.com/sncontinue" }, "extensionKind": [ "ui", "workspace" ], "bugs": { - "url": "https://github.com/continuedev/continue/issues", - "email": "nate@continue.dev" + "url": "https://dummy.com/sncontinue/issues", + "email": "tuowen.zhao@sambanovasystems.com" }, - "homepage": "https://continue.dev", - "qna": "https://github.com/continuedev/continue/issues/new/choose", + "qna": "https://dummy.com/sncontinue/issues/new/choose", "license": "Apache-2.0", - "displayName": "Continue - CodeLlama, GPT-4, and more", + "displayName": "SNContinue - AMA Sambastudio", "pricing": "Free", - "description": "Open-source autopilot for software development - bring the power of ChatGPT to your IDE", - "publisher": "Continue", + "description": "Sambanova autopilot for software development - bring the power of ChatGPT to your IDE", + "publisher": "Sambanova", "engines": { "vscode": "^1.67.0" }, @@ -50,14 +49,14 @@ "browser": "./out/extension.js", "contributes": { "configuration": { - "title": "Continue", + "title": "SNContinue", "properties": { - "continue.serverUrl": { + "sncontinue.serverUrl": { "type": "string", "default": "http://localhost:65432", "description": "The URL of the Continue server if you are running Continue manually. NOTE: This is NOT the URL of the LLM server. If you want to use an LLM hosted at a custom URL, please see https://continue.dev/docs/customization#change-the-default-llm and complete configuration in `~/.continue/config.py`, which you can access by using the '/config' slash command." }, - "continue.manuallyRunningServer": { + "sncontinue.manuallyRunningServer": { "type": "boolean", "default": false, "description": "If you are manually running the Continue server, you should update the Server URL and check this box. This will stop Continue from attempting to remove your server and download a new version." @@ -66,74 +65,74 @@ }, "commands": [ { - "command": "continue.acceptDiff", - "category": "Continue", + "command": "sncontinue.acceptDiff", + "category": "SNContinue", "title": "Accept Diff" }, { - "command": "continue.rejectDiff", - "category": "Continue", + "command": "sncontinue.rejectDiff", + "category": "SNContinue", "title": "Reject Diff" }, { - "command": "continue.quickTextEntry", - "category": "Continue", + "command": "sncontinue.quickTextEntry", + "category": "SNContinue", "title": "Quick Text Entry" }, { - "command": "continue.viewLogs", - "category": "Continue", + "command": "sncontinue.viewLogs", + "category": "SNContinue", "title": "View Continue Server Logs" }, { - "command": "continue.toggleAuxiliaryBar", - "category": "Continue", + "command": "sncontinue.toggleAuxiliaryBar", + "category": "SNContinue", "title": "Toggle Right Sidebar" }, { - "command": "continue.focusContinueInputWithEdit", - "category": "Continue", + "command": "sncontinue.focusContinueInputWithEdit", + "category": "SNContinue", "title": "Focus Continue Input With Edit" }, { - "command": "continue.debugTerminal", - "category": "Continue", + "command": "sncontinue.debugTerminal", + "category": "SNContinue", "title": "Debug Terminal" } ], "keybindings": [ { - "command": "continue.focusContinueInput", + "command": "sncontinue.focusContinueInput", "mac": "cmd+m", "key": "ctrl+m" }, { - "command": "continue.focusContinueInputWithEdit", + "command": "sncontinue.focusContinueInputWithEdit", "mac": "cmd+shift+m", "key": "ctrl+shift+m" }, { - "command": "continue.acceptDiff", + "command": "sncontinue.acceptDiff", "mac": "shift+cmd+enter", "key": "shift+ctrl+enter" }, { - "command": "continue.rejectDiff", + "command": "sncontinue.rejectDiff", "mac": "shift+cmd+backspace", "key": "shift+ctrl+backspace" }, { - "command": "continue.quickTextEntry", + "command": "sncontinue.quickTextEntry", "mac": "cmd+shift+l", "key": "ctrl+shift+l" }, { - "command": "continue.toggleAuxiliaryBar", + "command": "sncontinue.toggleAuxiliaryBar", "mac": "alt+cmd+m", "key": "alt+ctrl+m" }, { - "command": "continue.debugTerminal", + "command": "sncontinue.debugTerminal", "mac": "cmd+shift+r", "key": "ctrl+shift+r" } @@ -144,17 +143,17 @@ "viewsContainers": { "activitybar": [ { - "id": "continue", - "title": "Continue ", + "id": "sncontinue", + "title": "SNContinue ", "icon": "media/continue-dev-square.png" } ] }, "views": { - "continue": [ + "sncontinue": [ { "type": "webview", - "id": "continue.continueGUIView", + "id": "sncontinue.continueGUIView", "name": " )", "visibility": "visible" } @@ -162,9 +161,9 @@ }, "walkthroughs": [ { - "id": "continue", - "title": "Getting Started", - "description": "Learn how to use Continue", + "id": "sncontinue", + "title": "Getting Started w. SNContinue", + "description": "Learn how to use SNContinue", "steps": [ { "id": "edit", diff --git a/extension/scripts/package.js b/extension/scripts/package.js index c55ec42a..26a49fda 100644 --- a/extension/scripts/package.js +++ b/extension/scripts/package.js @@ -9,8 +9,8 @@ if (!fs.existsSync("build")) { } const command = isPreRelease - ? "vsce package --out ./build patch --pre-release" - : "vsce package --out ./build patch"; + ? "vsce package --out ./build patch --pre-release --baseContentUrl https://localhost/" + : "vsce package --out ./build patch --baseContentUrl https://localhost/"; exec(command, (error) => { if (error) throw error; diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index edd13137..91c8a989 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -92,7 +92,7 @@ export async function activateExtension(context: vscode.ExtensionContext) { context.subscriptions.push( vscode.window.registerWebviewViewProvider( - "continue.continueGUIView", + "sncontinue.continueGUIView", provider, { webviewOptions: { retainContextWhenHidden: true }, diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 4c47fba6..75a0d83a 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -84,7 +84,7 @@ function serverBinaryPath(): string { } export function getExtensionVersion() { - const extension = vscode.extensions.getExtension("continue.continue"); + const extension = vscode.extensions.getExtension("sambanova.sncontinue"); return extension?.packageJSON.version || ""; } @@ -426,7 +426,7 @@ export async function startContinuePythonServer(redownload: boolean = true) { // Check vscode settings for whether server is being run manually const manuallyRunningServer = vscode.workspace - .getConfiguration("continue") + .getConfiguration("sncontinue") .get<boolean>("manuallyRunningServer") || false; const serverUrl = getContinueServerUrl(); if ( diff --git a/extension/src/bridge.ts b/extension/src/bridge.ts index 8253cbab..d621b0d0 100644 --- a/extension/src/bridge.ts +++ b/extension/src/bridge.ts @@ -7,7 +7,7 @@ export function getContinueServerUrl() { } return ( - vscode.workspace.getConfiguration("continue").get<string>("serverUrl") || + vscode.workspace.getConfiguration("sncontinue").get<string>("serverUrl") || "http://localhost:65432" ); } diff --git a/extension/src/commands.ts b/extension/src/commands.ts index 267f7e30..1796748b 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -45,37 +45,37 @@ export const setFocusedOnContinueInput = (value: boolean) => { // Copy everything over from extension.ts const commandsMap: { [command: string]: (...args: any) => any } = { - "continue.acceptDiff": acceptDiffCommand, - "continue.rejectDiff": rejectDiffCommand, - "continue.quickFix": async (message: string, code: string, edit: boolean) => { + "sncontinue.acceptDiff": acceptDiffCommand, + "sncontinue.rejectDiff": rejectDiffCommand, + "sncontinue.quickFix": async (message: string, code: string, edit: boolean) => { ideProtocolClient.sendMainUserInput( `${ edit ? "/edit " : "" }${code}\n\nHow do I fix this problem in the above code?: ${message}` ); if (!edit) { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + vscode.commands.executeCommand("sncontinue.continueGUIView.focus"); } }, - "continue.focusContinueInput": async () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + "sncontinue.focusContinueInput": async () => { + vscode.commands.executeCommand("sncontinue.continueGUIView.focus"); debugPanelWebview?.postMessage({ type: "focusContinueInput", }); addHighlightedCodeToContext(false); }, - "continue.focusContinueInputWithEdit": async () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + "sncontinue.focusContinueInputWithEdit": async () => { + vscode.commands.executeCommand("sncontinue.continueGUIView.focus"); addHighlightedCodeToContext(true); debugPanelWebview?.postMessage({ type: "focusContinueInputWithEdit", }); focusedOnContinueInput = true; }, - "continue.toggleAuxiliaryBar": () => { + "sncontinue.toggleAuxiliaryBar": () => { vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); }, - "continue.quickTextEntry": async () => { + "sncontinue.quickTextEntry": async () => { addHighlightedCodeToContext(true); const text = await vscode.window.showInputBox({ placeHolder: "Ask a question or enter a slash command", @@ -85,7 +85,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { ideProtocolClient.sendMainUserInput(text); } }, - "continue.viewLogs": async () => { + "sncontinue.viewLogs": async () => { // Open ~/.continue/continue.log const logFile = path.join(os.homedir(), ".continue", "continue.log"); // Make sure the file/directory exist @@ -97,20 +97,20 @@ const commandsMap: { [command: string]: (...args: any) => any } = { const uri = vscode.Uri.file(logFile); await vscode.window.showTextDocument(uri); }, - "continue.debugTerminal": async () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + "sncontinue.debugTerminal": async () => { + vscode.commands.executeCommand("sncontinue.continueGUIView.focus"); await ideProtocolClient.debugTerminal(); }, // Commands without keyboard shortcuts - "continue.addModel": () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + "sncontinue.addModel": () => { + vscode.commands.executeCommand("sncontinue.continueGUIView.focus"); debugPanelWebview?.postMessage({ type: "addModel", }); }, - "continue.openSettingsUI": () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + "sncontinue.openSettingsUI": () => { + vscode.commands.executeCommand("sncontinue.continueGUIView.focus"); debugPanelWebview?.postMessage({ type: "openSettings", }); diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 342de769..7cf41448 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -204,7 +204,7 @@ class IdeProtocolClient { // Listen for changes to settings.json vscode.workspace.onDidChangeConfiguration((event) => { - if (event.affectsConfiguration("continue")) { + if (event.affectsConfiguration("sncontinue")) { vscode.window .showInformationMessage( "Please reload VS Code for changes to Continue settings to take effect.", diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts index 961eb150..fe0e0637 100644 --- a/extension/src/debugPanel.ts +++ b/extension/src/debugPanel.ts @@ -192,7 +192,7 @@ export function setupDebugPanel( sessionId, vscMediaUrl, dataSwitchOn: vscode.workspace - .getConfiguration("continue") + .getConfiguration("sncontinue") .get<boolean>("dataSwitch"), }); break; @@ -200,7 +200,7 @@ export function setupDebugPanel( case "toggleDataSwitch": { // Set the setting in vscode await vscode.workspace - .getConfiguration("continue") + .getConfiguration("sncontinue") .update("dataSwitch", data.on, vscode.ConfigurationTarget.Global); break; } @@ -248,7 +248,7 @@ export function setupDebugPanel( } case "toggleDevTools": { vscode.commands.executeCommand("workbench.action.toggleDevTools"); - vscode.commands.executeCommand("continue.viewLogs"); + vscode.commands.executeCommand("sncontinue.viewLogs"); break; } case "reloadWindow": { @@ -321,7 +321,7 @@ export function setupDebugPanel( export class ContinueGUIWebviewViewProvider implements vscode.WebviewViewProvider { - public static readonly viewType = "continue.continueGUIView"; + public static readonly viewType = "sncontinue.continueGUIView"; private readonly sessionIdPromise: Promise<string>; constructor(sessionIdPromise: Promise<string>) { diff --git a/extension/src/extension.ts b/extension/src/extension.ts index 0b6faa5c..8f497282 100644 --- a/extension/src/extension.ts +++ b/extension/src/extension.ts @@ -43,7 +43,7 @@ async function dynamicImportAndActivate(context: vscode.ExtensionContext) { ) .then((selection) => { if (selection === "View Logs") { - vscode.commands.executeCommand("continue.viewLogs"); + vscode.commands.executeCommand("sncontinue.viewLogs"); } else if (selection === "Retry") { // Reload VS Code window vscode.commands.executeCommand("workbench.action.reloadWindow"); diff --git a/extension/src/lang-server/codeLens.ts b/extension/src/lang-server/codeLens.ts index 6f36a6bd..5b2e4d99 100644 --- a/extension/src/lang-server/codeLens.ts +++ b/extension/src/lang-server/codeLens.ts @@ -25,12 +25,12 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider { codeLenses.push( new vscode.CodeLens(range, { title: "Accept ✅", - command: "continue.acceptSuggestion", + command: "sncontinue.acceptSuggestion", arguments: [suggestion], }), new vscode.CodeLens(range, { title: "Reject ❌", - command: "continue.rejectSuggestion", + command: "sncontinue.rejectSuggestion", arguments: [suggestion], }) ); @@ -63,17 +63,17 @@ class DiffViewerCodeLensProvider implements vscode.CodeLensProvider { codeLenses.push( new vscode.CodeLens(range, { title: `Accept All ✅ (${getMetaKeyLabel()}⇧↩)`, - command: "continue.acceptDiff", + command: "sncontinue.acceptDiff", arguments: [document.uri.fsPath], }), new vscode.CodeLens(range, { title: `Reject All ❌ (${getMetaKeyLabel()}⇧⌫)`, - command: "continue.rejectDiff", + command: "sncontinue.rejectDiff", arguments: [document.uri.fsPath], }), new vscode.CodeLens(range, { title: `Further Edit ✏️ (${getMetaKeyLabel()}⇧M)`, - command: "continue.focusContinueInputWithEdit", + command: "sncontinue.focusContinueInputWithEdit", }) ); return codeLenses; @@ -107,7 +107,7 @@ class ConfigPyCodeLensProvider implements vscode.CodeLensProvider { codeLenses.push( new vscode.CodeLens(range, { title: `+ Add a Model`, - command: "continue.addModel", + command: "sncontinue.addModel", }) ); } @@ -126,7 +126,7 @@ class ConfigPyCodeLensProvider implements vscode.CodeLensProvider { codeLenses.push( new vscode.CodeLens(range, { title: `✏️ Edit in UI`, - command: "continue.openSettingsUI", + command: "sncontinue.openSettingsUI", }) ); } diff --git a/extension/src/util/vscode.ts b/extension/src/util/vscode.ts index 92bbc110..1e7c9a6d 100644 --- a/extension/src/util/vscode.ts +++ b/extension/src/util/vscode.ts @@ -21,7 +21,7 @@ export function getNonce() { } export function getExtensionUri(): vscode.Uri { - return vscode.extensions.getExtension("Continue.continue")!.extensionUri; + return vscode.extensions.getExtension("Sambanova.sncontinue")!.extensionUri; } export function getViewColumnOfFile( |