docusaurus link fixing

This commit is contained in:
Nate Sesti 2023-06-04 18:04:39 -04:00
parent 09e7ced1df
commit 08d1d790ee
14 changed files with 57 additions and 32 deletions

View file

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

View file

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

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,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).

View file

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

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

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

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