diff options
-rw-r--r-- | continuedev/pyproject.toml | 1 | ||||
-rw-r--r-- | continuedev/src/continuedev/core/sdk.py | 2 | ||||
-rw-r--r-- | docs/docusaurus.config.js | 4 | ||||
-rw-r--r-- | docs/src/pages/index.js | 26 | ||||
-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 |
14 files changed, 57 insertions, 32 deletions
diff --git a/continuedev/pyproject.toml b/continuedev/pyproject.toml index 83a287c8..631742ec 100644 --- a/continuedev/pyproject.toml +++ b/continuedev/pyproject.toml @@ -18,7 +18,6 @@ nest-asyncio = "^1.5.6" websockets = "^11.0.2" urllib3 = "1.26.15" gpt-index = "^0.6.8" -setuptools = "^67.7.2" posthog = "^3.0.1" [tool.poetry.scripts] diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py index de14ee3c..5bd77d11 100644 --- a/continuedev/src/continuedev/core/sdk.py +++ b/continuedev/src/continuedev/core/sdk.py @@ -95,7 +95,7 @@ class ContinueSDK(AbstractContinueSDK): async def add_file(self, filename: str, content: str | None): filepath = await self._ensure_absolute_path(filename) - return await self.run_step(FileSystemEditStep(edit=AddFile(filename=filename, content=content))) + return await self.run_step(FileSystemEditStep(edit=AddFile(filepath=filepath, content=content))) async def delete_file(self, filename: str): filepath = await self._ensure_absolute_path(filename) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index c2991841..1730332a 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -15,7 +15,7 @@ const config = { url: "https://continue.dev", // Set the /<baseUrl>/ pathname under which your site is served // For GitHub pages deployment, it is often '/<projectName>/' - baseUrl: "/", + baseUrl: "/docs", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. @@ -82,7 +82,7 @@ const config = { items: [ { label: "Introduction", - to: "/docs/intro", + to: "/docs/docs/intro", }, ], }, diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index e974e52a..cbe05d60 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -1,23 +1,24 @@ -import React from 'react'; -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import React from "react"; +import clsx from "clsx"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import Layout from "@theme/Layout"; +import HomepageFeatures from "@site/src/components/HomepageFeatures"; -import styles from './index.module.css'; +import styles from "./index.module.css"; function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return ( - <header className={clsx('hero hero--primary', styles.heroBanner)}> + <header className={clsx("hero hero--primary", styles.heroBanner)}> <div className="container"> <h1 className="hero__title">{siteConfig.title}</h1> <p className="hero__subtitle">{siteConfig.tagline}</p> <div className={styles.buttons}> <Link className="button button--secondary button--lg" - to="/docs/getting-started"> + to="/docs/docs/getting-started" + > GitHub Codespaces Demo </Link> </div> @@ -27,11 +28,12 @@ function HomepageHeader() { } export default function Home() { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return ( <Layout title={`Docs`} - description="Documentation for the `Continue` library"> + description="Documentation for the `Continue` library" + > <HomepageHeader /> <main> <HomepageFeatures /> 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.whl Binary files differindex 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(() => { |