diff options
Diffstat (limited to 'extension')
| -rw-r--r-- | extension/DEV_README.md | 2 | ||||
| -rw-r--r-- | extension/README.md | 2 | ||||
| -rw-r--r-- | extension/package-lock.json | 4 | ||||
| -rw-r--r-- | extension/package.json | 24 | ||||
| -rw-r--r-- | extension/scripts/continuedev-0.1.1-py3-none-any.whl | bin | 55076 -> 55610 bytes | |||
| -rw-r--r-- | extension/src/README.md | 2 | ||||
| -rw-r--r-- | extension/src/activation/activate.ts | 3 | ||||
| -rw-r--r-- | extension/src/commands.ts | 4 | ||||
| -rw-r--r-- | extension/src/debugPanel.ts | 13 | ||||
| -rw-r--r-- | extension/src/terminal/terminalEmulator.ts | 2 | 
10 files changed, 40 insertions, 16 deletions
| diff --git a/extension/DEV_README.md b/extension/DEV_README.md index 7049da45..dd02bf59 100644 --- a/extension/DEV_README.md +++ b/extension/DEV_README.md @@ -3,5 +3,5 @@  This is the Continue VS Code Extension. Its primary jobs are  1. Implement the IDE side of the Continue IDE protocol, allowing a Continue server to interact natively in an IDE. This happens in `src/continueIdeClient.ts`. -2. Open the Continue React app in a side panel. The React app's source code lives in the `react-app` directory. The panel is opened by the `continue.openDebugPanel` command, as defined in `src/commands.ts`. +2. Open the Continue React app in a side panel. The React app's source code lives in the `react-app` directory. The panel is opened by the `continue.openContinueGUI` command, as defined in `src/commands.ts`.  3. Run a Continue server in the background, which connects to both the IDE protocol and the React app. The server is launched in `src/activation/environmentSetup.ts` by calling Python code that lives in `scripts/` (unless extension settings define a server URL other than localhost:8000, in which case the extension will just connect to that). diff --git a/extension/README.md b/extension/README.md index 7fa8022b..12e25417 100644 --- a/extension/README.md +++ b/extension/README.md @@ -6,7 +6,7 @@ The Continue VS Code extension lets you make edits with natural langauge, ask qu  ## Getting Started -Get started by opening the command pallet with cmd+shift+p and then selecting Continue: Open Debug Panel. +Get started by opening the command pallet with cmd+shift+p and then selecting Continue: Open Continue GUI.  To test a few common recipes, open a blank python file and try the following: diff --git a/extension/package-lock.json b/extension/package-lock.json index ed140937..b923a2b2 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@  {    "name": "continue", -  "version": "0.0.19", +  "version": "0.0.20",    "lockfileVersion": 2,    "requires": true,    "packages": {      "": {        "name": "continue", -      "version": "0.0.19", +      "version": "0.0.20",        "license": "Apache-2.0",        "dependencies": {          "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index dd15157d..87c78b75 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@    "displayName": "Continue",    "pricing": "Free",    "description": "Refine code 10x faster", -  "version": "0.0.19", +  "version": "0.0.20",    "publisher": "Continue",    "engines": {      "vscode": "^1.74.0" @@ -23,7 +23,8 @@      "Other"    ],    "activationEvents": [ -    "onStartupFinished" +    "onStartupFinished", +    "onView:continueGUIView"    ],    "main": "./out/extension.js",    "contributes": { @@ -59,9 +60,9 @@          "title": "Write a docstring for the current function"        },        { -        "command": "continue.openDebugPanel", +        "command": "continue.openContinueGUI",          "category": "Continue", -        "title": "Open Debug Panel" +        "title": "Open Continue GUI"        },        {          "command": "continue.askQuestionFromInput", @@ -149,9 +150,18 @@      "menus": {        "view/title": [          { -          "command": "continue.openDebugPanel", +          "command": "continue.openContinueGUI",            "group": "navigation", -          "when": "view == continue.debugView" +          "when": "view == continue.continueGUIView" +        } +      ] +    }, +    "views": { +      "explorer": [ +        { +          "type": "webview", +          "id": "continue.continueGUIView", +          "name": "Continue GUI"          }        ]      } @@ -171,7 +181,7 @@      "lint": "eslint src --ext ts",      "test": "node ./out/test/runTest.js",      "package": "cp ./config/prod_config.json ./config/config.json && mkdir -p ./build && vsce package --out ./build && cp ./config/dev_config.json ./config/config.json", -    "full-package": "cd ../continuedev && poetry build && cp ./dist/continuedev-0.1.1-py3-none-any.whl ../extension/scripts/continuedev-0.1.1-py3-none-any.whl && cd ../extension && npm run typegen && npm run clientgen && cd react-app && npm run build && cd .. && npm run package", +    "full-package": "cd ../continuedev && poetry build && cp ./dist/continuedev-0.1.1-py3-none-any.whl ../extension/scripts/continuedev-0.1.1-py3-none-any.whl && cd ../extension && npm install && npm run typegen && npm run clientgen && cd react-app && npm install && npm run build && cd .. && npm run package",      "install-extension": "code --install-extension ./build/continue-0.0.8.vsix",      "uninstall": "code --uninstall-extension .continue",      "reinstall": "rm -rf ./build && npm run package && npm run uninstall && npm run install-extension" diff --git a/extension/scripts/continuedev-0.1.1-py3-none-any.whl b/extension/scripts/continuedev-0.1.1-py3-none-any.whlBinary files differ index 043b0c06..5bd3ea7d 100644 --- a/extension/scripts/continuedev-0.1.1-py3-none-any.whl +++ b/extension/scripts/continuedev-0.1.1-py3-none-any.whl diff --git a/extension/src/README.md b/extension/src/README.md index 76b96ea0..9fd73f9f 100644 --- a/extension/src/README.md +++ b/extension/src/README.md @@ -67,7 +67,7 @@ You should always have a packaged version installed in VS Code, because when Con  ## Commands  - "Write a docstring for the current function" command (windows: `ctrl+alt+l`, mac: `shift+cmd+l`) -- "Open Debug Panel" command +- "Open Continue GUI" command  - "Ask a question from input box" command (windows: `ctrl+alt+j`, mac: `shift+cmd+j`)  - "Open Captured Terminal" command  - "Ask a question from webview" command (what context is it given?) diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index 40def480..293ee26c 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -7,6 +7,7 @@ import * as path from "path";  // import { openCapturedTerminal } from "../terminal/terminalEmulator";  import IdeProtocolClient from "../continueIdeClient";  import { getContinueServerUrl } from "../bridge"; +import { setupDebugPanel } from "../debugPanel";  export let extensionContext: vscode.ExtensionContext | undefined = undefined; @@ -21,6 +22,8 @@ export function activateExtension(    registerAllCodeLensProviders(context);    registerAllCommands(context); +  // vscode.window.registerWebviewViewProvider("continue.continueGUIView", setupDebugPanel); +    let serverUrl = getContinueServerUrl();    ideProtocolClient = new IdeProtocolClient( diff --git a/extension/src/commands.ts b/extension/src/commands.ts index f0c1744b..c98cd3c3 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -61,7 +61,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = {    "continue.suggestionUp": suggestionUpCommand,    "continue.acceptSuggestion": acceptSuggestionCommand,    "continue.rejectSuggestion": rejectSuggestionCommand, -  "continue.openDebugPanel": () => { +  "continue.openContinueGUI": () => {      ideProtocolClient.openGUI();    },    "continue.focusContinueInput": async () => { @@ -111,7 +111,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = {        vscode.window.showInformationMessage("The test passes!");        return;      } -    vscode.commands.executeCommand("continue.openDebugPanel").then(() => { +    vscode.commands.executeCommand("continue.openContinueGUI").then(() => {        setTimeout(() => {          debugPanelWebview?.postMessage({            type: "traceback", diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts index 87c33da1..7407faf4 100644 --- a/extension/src/debugPanel.ts +++ b/extension/src/debugPanel.ts @@ -135,7 +135,7 @@ let streamManager = new StreamManager();  export let debugPanelWebview: vscode.Webview | undefined;  export function setupDebugPanel( -  panel: vscode.WebviewPanel, +  panel: vscode.WebviewPanel | vscode.WebviewView,    context: vscode.ExtensionContext | undefined,    sessionId: string  ): string { @@ -487,3 +487,14 @@ export function setupDebugPanel(        </body>      </html>`;  } + +// class ContinueGUIWebviewViewProvider implements vscode.WebviewViewProvider { +//   public static readonly viewType = "continue.continueGUIView"; +//   resolveWebviewView( +//     webviewView: vscode.WebviewView, +//     context: vscode.WebviewViewResolveContext<unknown>, +//     token: vscode.CancellationToken +//   ): void | Thenable<void> { +//     setupDebugPanel(webviewView, context, sessionId); +//   } +// } diff --git a/extension/src/terminal/terminalEmulator.ts b/extension/src/terminal/terminalEmulator.ts index ba860b24..6cf65970 100644 --- a/extension/src/terminal/terminalEmulator.ts +++ b/extension/src/terminal/terminalEmulator.ts @@ -19,7 +19,7 @@  //     });  //   } else {  //     vscode.commands -//       .executeCommand("continue.openDebugPanel", extensionContext) +//       .executeCommand("continue.openContinueGUI", extensionContext)  //       .then(() => {  //         // TODO: Waiting for the webview to load, but should add a hook to the onLoad message event. Same thing in autodebugTest command in commands.ts  //         setTimeout(() => { | 
