diff options
author | Ty Dunn <ty@tydunn.com> | 2023-06-05 09:30:51 +0200 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-06-05 09:30:51 +0200 |
commit | 897e6dc1239be26db74a933d10325b86ae55e5fb (patch) | |
tree | 1b462d1ab3bb2a2b0fc134ba92d3af7da2d72a57 | |
parent | db0c493850d73c9d05f96ce1c5a04fc318c77422 (diff) | |
parent | 99d0cf12dcd1481e719e78483fc7df080dc95954 (diff) | |
download | sncontinue-897e6dc1239be26db74a933d10325b86ae55e5fb.tar.gz sncontinue-897e6dc1239be26db74a933d10325b86ae55e5fb.tar.bz2 sncontinue-897e6dc1239be26db74a933d10325b86ae55e5fb.zip |
addressing conflicts
-rw-r--r-- | continuedev/README.md | 2 | ||||
-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/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 | 55604 -> 0 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 |
13 files changed, 57 insertions, 31 deletions
diff --git a/continuedev/README.md b/continuedev/README.md index b7967ddd..911d467d 100644 --- a/continuedev/README.md +++ b/continuedev/README.md @@ -2,7 +2,7 @@ This package contains the [Continue](https://github.com/continuedev.com/continue) server and core classes needed to build your own recipes. -Continue is a Python library for automating repetitive sequences of software development tasks using language models. Using our VS Code extension, you can build, run, and refine these recipes as they natively interact with your codebase. Read the docs [here](https://continuedev.netlify.app/) or download the VS Code extension [here](https://marketplace.visualstudio.com/items?itemName=Continue.continue). +Continue is a Python library for automating repetitive sequences of software development tasks using language models. Using our VS Code extension, you can build, run, and refine these recipes as they natively interact with your codebase. Read the docs [here](https://continue.dev/docs) or download the VS Code extension [here](https://marketplace.visualstudio.com/items?itemName=Continue.continue). ## Continue Server diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py index f9f3679e..8317a3d1 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: Union[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 4df0e926..fc91fe32 100644 --- a/extension/DEV_README.md +++ b/extension/DEV_README.md @@ -3,7 +3,7 @@ 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). 1. Open Continue
\ No newline at end of file diff --git a/extension/package-lock.json b/extension/package-lock.json index c7c67fdc..fa09527e 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 a3b82c1b..7bd48f98 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 differdeleted file mode 100644 index c9e40ce3..00000000 --- a/extension/scripts/continuedev-0.1.1-py3-none-any.whl +++ /dev/null diff --git a/extension/src/README.md b/extension/src/README.md index 8523ec86..c46de79f 100644 --- a/extension/src/README.md +++ b/extension/src/README.md @@ -51,7 +51,7 @@ Update: directions to root README ## 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(() => { |