addressing conflicts

This commit is contained in:
Ty Dunn 2023-06-05 09:30:51 +02:00
commit 897e6dc123
13 changed files with 57 additions and 31 deletions

View file

@ -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

View file

@ -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)

View file

@ -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",
},
],
},

View file

@ -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 />

View file

@ -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

View file

@ -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",

View file

@ -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"

View file

@ -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?)

View file

@ -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(

View file

@ -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",

View file

@ -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);
// }
// }

View file

@ -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(() => {