From f7f64ff341ded4cc64959d05b84fb3c8a1d7120b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 27 Nov 2024 23:42:15 -0700 Subject: [PATCH 001/113] pause fix, cancelled status --- core/core.ts | 6 ++++-- core/index.d.ts | 11 +++++++++-- core/indexing/CodebaseIndexer.ts | 16 +++++++--------- .../IndexingProgressIndicator.tsx | 1 + .../IndexingProgress/IndexingProgressSubtext.tsx | 1 + .../IndexingProgressTitleText.tsx | 1 + gui/src/util/localStorage.ts | 2 -- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/core/core.ts b/core/core.ts index a1d74f281..0742a3548 100644 --- a/core/core.ts +++ b/core/core.ts @@ -154,10 +154,10 @@ export class Core { // Index on initialization void this.ide.getWorkspaceDirs().then(async (dirs) => { // Respect pauseCodebaseIndexOnStart user settings - this.indexingPauseToken.paused = true; if (ideSettings.pauseCodebaseIndexOnStart) { + this.indexingPauseToken.paused = true; void this.messenger.request("indexProgress", { - progress: 1, + progress: 0, desc: "Initial Indexing Skipped", status: "paused", }); @@ -803,6 +803,8 @@ export class Core { this.indexingCancellationController.signal, )) { let updateToSend = { ...update }; + // TODO reconsider this status overwrite? + // original goal was to not concern users with edge noncritical errors if (update.status === "failed") { updateToSend.status = "done"; updateToSend.desc = "Indexing complete"; diff --git a/core/index.d.ts b/core/index.d.ts index efb7a18e9..b711b9319 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -42,11 +42,18 @@ export interface IndexingProgressUpdate { progress: number; desc: string; shouldClearIndexes?: boolean; - status: "loading" | "indexing" | "done" | "failed" | "paused" | "disabled"; + status: + | "loading" + | "indexing" + | "done" + | "failed" + | "paused" + | "disabled" + | "cancelled"; debugInfo?: string; } -// This is more or less a V2 of IndexingProgressUpdate +// This is more or less a V2 of IndexingProgressUpdate for docs etc. export interface IndexingStatus { id: string; type: "docs"; diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index 5c70f8bad..af204a723 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -145,9 +145,7 @@ export class CodebaseIndexer { } } - async *refreshFiles( - files: string[], - ): AsyncGenerator { + async *refreshFiles(files: string[]): AsyncGenerator { let progress = 0; if (files.length === 0) { yield { @@ -192,9 +190,9 @@ export class CodebaseIndexer { if (dirs.length === 0) { yield { - progress, + progress: 1, desc: "Nothing to index", - status: "disabled", + status: "done", }; return; } @@ -238,9 +236,9 @@ export class CodebaseIndexer { directoryFiles.push(p); if (abortSignal.aborted) { yield { - progress: 1, + progress: 0, desc: "Indexing cancelled", - status: "disabled", + status: "cancelled", }; return; } @@ -263,9 +261,9 @@ export class CodebaseIndexer { // Handle pausing in this loop because it's the only one really taking time if (abortSignal.aborted) { yield { - progress: 1, + progress: 0, desc: "Indexing cancelled", - status: "disabled", + status: "cancelled", }; return; } diff --git a/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx b/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx index 944fdc917..83abeed11 100644 --- a/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx +++ b/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx @@ -17,6 +17,7 @@ const STATUS_TO_ICON: Record = { paused: PauseCircleIcon, done: CheckCircleIcon, failed: null, // Since we show an erorr message below + cancelled: null, }; function IndexingProgressIndicator({ update }: IndexingProgressIndicatorProps) { diff --git a/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx b/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx index 6c07babb0..a73148009 100644 --- a/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx +++ b/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx @@ -15,6 +15,7 @@ const STATUS_TO_SUBTITLE_TEXT: Record< paused: "Click to resume", failed: "Click to retry", disabled: "Click to open config.json and enable indexing (requires reload)", + cancelled: "Click to restart", }; function IndexingProgressSubtext({ diff --git a/gui/src/pages/More/IndexingProgress/IndexingProgressTitleText.tsx b/gui/src/pages/More/IndexingProgress/IndexingProgressTitleText.tsx index 61d4bbba6..e15ba5713 100644 --- a/gui/src/pages/More/IndexingProgress/IndexingProgressTitleText.tsx +++ b/gui/src/pages/More/IndexingProgress/IndexingProgressTitleText.tsx @@ -12,6 +12,7 @@ const STATUS_TO_TEXT: Record = { paused: "Indexing paused", failed: "Indexing failed", disabled: "Indexing disabled", + cancelled: "Indexing cancelled", }; function IndexingProgressTitleText({ update }: IndexingProgressTitleTextProps) { diff --git a/gui/src/util/localStorage.ts b/gui/src/util/localStorage.ts index a49f04660..1f3fa7a61 100644 --- a/gui/src/util/localStorage.ts +++ b/gui/src/util/localStorage.ts @@ -1,5 +1,4 @@ import { JSONContent } from "@tiptap/react"; -import { IndexingProgressUpdate } from "core"; import { OnboardingStatus } from "../components/OnboardingCard"; type LocalStorageTypes = { @@ -12,7 +11,6 @@ type LocalStorageTypes = { lastSessionId: string | undefined; [key: `inputHistory_${string}`]: JSONContent[]; extensionVersion: string; - indexingState: IndexingProgressUpdate; showTutorialCard: boolean; shownProfilesIntroduction: boolean; disableIndexing: boolean; From 1f602e53c29eb28d98754252823ad8f40f839d1b Mon Sep 17 00:00:00 2001 From: Big Boss Date: Fri, 29 Nov 2024 15:58:01 -0600 Subject: [PATCH 002/113] fix: intellij freezing Reverts useIsOSREnabled to use the single use event listener instead of subscribing to `useWebviewListener` --- core/protocol/ideWebview.ts | 2 +- .../toolWindow/ContinueBrowser.kt | 6 ++++-- gui/src/hooks/useIsOSREnabled.ts | 16 ++++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/core/protocol/ideWebview.ts b/core/protocol/ideWebview.ts index 91fa40395..bf5866cca 100644 --- a/core/protocol/ideWebview.ts +++ b/core/protocol/ideWebview.ts @@ -43,7 +43,7 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & { insertAtCursor: [{ text: string }, void]; copyText: [{ text: string }, void]; "jetbrains/editorInsetHeight": [{ height: number }, void]; - "jetbrains/isOSREnabled": [undefined, void]; + "jetbrains/isOSREnabled": [undefined, boolean]; "vscode/openMoveRightMarkdown": [undefined, void]; setGitHubAuthToken: [{ token: string }, void]; acceptDiff: [{ filepath: string; streamId?: string }, void]; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index 659ec4998..b2350759c 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -137,7 +137,7 @@ class ContinueBrowser(val project: Project, url: String) { } "jetbrains/isOSREnabled" -> { - sendToWebview( "jetbrains/isOSREnabled", isOSREnabled) + respond(isOSREnabled) } "onLoad" -> { @@ -267,7 +267,9 @@ class ContinueBrowser(val project: Project, url: String) { val jsCode = buildJavaScript(jsonData) try { - this.browser.executeJavaScriptAsync(jsCode) + this.browser.executeJavaScriptAsync(jsCode).onError { + println("Failed to execute jsCode error: ${it.message}") + } } catch (error: IllegalStateException) { println("Webview not initialized yet $error") } diff --git a/gui/src/hooks/useIsOSREnabled.ts b/gui/src/hooks/useIsOSREnabled.ts index 10ad04756..8ceca9cbf 100644 --- a/gui/src/hooks/useIsOSREnabled.ts +++ b/gui/src/hooks/useIsOSREnabled.ts @@ -7,15 +7,19 @@ export default function useIsOSREnabled() { const [isOSREnabled, setIsOSREnabled] = useState(false); const ideMessenger = useContext(IdeMessengerContext); - useWebviewListener("jetbrains/isOSREnabled", async (isOSREnabled) => { - setIsOSREnabled(isOSREnabled); - }); - useEffect(() => { if (isJetBrains()) { - ideMessenger.post("jetbrains/isOSREnabled", undefined); + (async () => { + await ideMessenger + .request("jetbrains/isOSREnabled", undefined) + .then((result) => { + if (result.status === "success") { + setIsOSREnabled(result.content); + } + }); + })(); } - }, []); + }, [ideMessenger]); return isOSREnabled; } From 7260e5f79a50cf021b923f1be46ac731c95f15af Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 29 Nov 2024 22:03:05 -0800 Subject: [PATCH 003/113] specify that rules aren't used for autocomplete --- docs/docs/customize/deep-dives/rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 30100aaeb..f53135b50 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -5,7 +5,7 @@ keywords: [rules, .continuerules, system, prompt, message] # `.continuerules` -You can create a project-specific system message by adding a `.continuerules` file to the root of your project. This file is raw text and its contents will be inserted into the system message for all LLM requests. +You can create a project-specific system message by adding a `.continuerules` file to the root of your project. This file is raw text and its contents will be inserted into the system message for all chat requests. Rules are not used for autocomplete. ## Simple Examples From 80d5e7541c77190a2f39968e6aaafdd9311ab308 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 30 Nov 2024 10:21:18 -0800 Subject: [PATCH 004/113] documentation for tools --- docs/docs/chat/how-to-customize.md | 1 + docs/docs/customize/tools.md | 33 +++++++++++++++++++++++++++ docs/static/img/tool-use-example.png | Bin 0 -> 107460 bytes 3 files changed, 34 insertions(+) create mode 100644 docs/docs/customize/tools.md create mode 100644 docs/static/img/tool-use-example.png diff --git a/docs/docs/chat/how-to-customize.md b/docs/docs/chat/how-to-customize.md index 9df6ec020..ee26a6a84 100644 --- a/docs/docs/chat/how-to-customize.md +++ b/docs/docs/chat/how-to-customize.md @@ -12,3 +12,4 @@ There are a number of different ways to customize Chat - You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.md) - You can configure [`@Docs`](../customize/deep-dives/docs.md) - You can [build your own context provider](../customize/tutorials/build-your-own-context-provider.md) +- You can configure and create custom [tools](../customize/tools.md) diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.md new file mode 100644 index 000000000..a698c3441 --- /dev/null +++ b/docs/docs/customize/tools.md @@ -0,0 +1,33 @@ +--- +title: Tools +description: Tool use and customization +keywords: [tool, use, function calling, claude, automatic] +--- + +Tools allow Continue to take action in your IDE and beyond (when you give permission). Currently, they are only supported with [Anthropic](./model-providers/top-level/anthropic.md). To use tools, click on the icon in the input toolbar like below. + +![tools](/img/tool-use-example.png) + +To let you balance speed and safety, each tool can be set to 1 of 3 modes: + +- `Automatic`: When the LLM requests to use the tool, Continue will automatically call it and send the response to the LLM. +- `Allowed`: When the LLM requests to use the tool, Continue will first give you the opportunity to "Cancel" or "Continue" with the tool. +- `Disabled`: The LLM will not know about or be able to use the tool. + +### Custom tools + +Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: + +```json +{ + "experimental": { + "modelContextProtocolServer": { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } + } + } +} +``` diff --git a/docs/static/img/tool-use-example.png b/docs/static/img/tool-use-example.png new file mode 100644 index 0000000000000000000000000000000000000000..63f1c456a4579f816241068fccebedee3b100a89 GIT binary patch literal 107460 zcmeFYWmH^C6E+G2cL~nmgy8P(!65_>?(XjH7Tl8n!QI^kNU*^zxVyXF$$5{wlDqEj zyS{JMp0#`S?yl~tuIjF;ekMXmK?((t01*NL0!8|r_eL7qtuYPl9+aY7Uu?+b#JH zDj3s$l*kZ!?0J1UIZHTS&b70x-ExvcWAGRtP1lApSi6R7j4gds0`-vk-EKDSY&Y?QMl^u`I-D zlsXJC`bo2IPoERdxJK&8nKp$Da=63zj$Y&jUKpEsCPYZos!B{{M2$?G zLOoiu1$aJ&s*)XJ7f48ol);?Ak?Gl@vB-=hg}!-vs4S*SOt_7_D|!grfejV2hIgoX zOU)|!qp$!ehzGqFI}iu)g69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=Wt2FmZOS-(d=S1Cez|IO zd+&}HxbtozQ-VV*g)cY>jYXhmQesH|G9Dm0_$e|)N@DNO5#b1^lVgc^G5F)pgXi*q9u@rHhy+_?;!vSt$aYPvzu)}yA$Tccz!k%u+BNee zRKWyp@vIEF+WcvKz9v3I_4ZqKb)r1pjQFe5@9TPwCn1S=*i5nOUx|@>U5K@*fT|IdK30 literal 0 HcmV?d00001 From d3abffd5822b9a9b1d6d606fd063545c57d8d575 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 30 Nov 2024 10:22:53 -0800 Subject: [PATCH 005/113] update sidebars --- docs/docs/customize/tools.md | 2 +- docs/sidebars.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.md index a698c3441..f18e40387 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.md @@ -18,7 +18,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json +```json title="~/.continue/config.json" { "experimental": { "modelContextProtocolServer": { diff --git a/docs/sidebars.js b/docs/sidebars.js index 11f2e2fd3..caa6fdc52 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -110,6 +110,7 @@ const sidebars = { }, "customize/context-providers", "customize/slash-commands", + "customize/tools", "customize/development-data", { type: "category", From 591e81317060eda60e86fa58cf7208ff330d50fa Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 30 Nov 2024 10:25:52 -0800 Subject: [PATCH 006/113] only run pr_checks when relevant --- .github/workflows/pr_checks.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index a879c3d9d..dee4ae553 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -5,6 +5,11 @@ on: branches: - main + paths: + - "extensions/vscode/**" + - "core/**" + - "gui/**" + jobs: tsc-check: runs-on: ubuntu-latest From d8936e77b45c8ef84a54c59cfe97802baa0c4345 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 30 Nov 2024 10:39:38 -0800 Subject: [PATCH 007/113] fix yaml --- .github/workflows/pr_checks.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index dee4ae553..9e040bcff 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -5,10 +5,10 @@ on: branches: - main - paths: - - "extensions/vscode/**" - - "core/**" - - "gui/**" + paths: + - "extensions/vscode/**" + - "core/**" + - "gui/**" jobs: tsc-check: From 2113d5ef07bb845321d7a85c0f1c32235bdc331b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 2 Dec 2024 01:06:25 -0500 Subject: [PATCH 008/113] remark tables p1 --- extensions/vscode/package-lock.json | 5 +- gui/package-lock.json | 276 ++++++++++++++++++ gui/package.json | 1 + .../markdown/StyledMarkdownPreview.tsx | 31 +- 4 files changed, 299 insertions(+), 14 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e0bc72e92..49cc1fb6c 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.235", + "version": "0.9.237", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.235", + "version": "0.9.237", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -109,6 +109,7 @@ "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", "comment-json": "^4.2.3", + "dbinfoz": "^0.14.0", "diff": "^7.0.0", "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", diff --git a/gui/package-lock.json b/gui/package-lock.json index 3a69aaaea..52a14384e 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -50,6 +50,7 @@ "rehype-highlight": "^7.0.0", "rehype-katex": "^7.0.0", "rehype-wrap-all": "^1.1.0", + "remark-gfm": "^4.0.0", "remark-math": "^6.0.0", "reselect": "^5.1.1", "seti-file-icons": "^0.0.8", @@ -8545,6 +8546,15 @@ "markdown-it": "bin/markdown-it.mjs" } }, + "node_modules/markdown-table": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/mdast-util-definitions": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz", @@ -8598,6 +8608,32 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.1.tgz", + "integrity": "sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mdast-util-from-markdown": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", @@ -8621,6 +8657,101 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.0.0.tgz", + "integrity": "sha512-dgQEX5Amaq+DuUqf26jJqSK9qgixgd6rYDHAv4aTBuA92cTknZlKpPfa86Z/s8Dj8xsAQpFfBmPUHWJBWqS4Bw==", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-gfm-autolink-literal": "^2.0.0", + "mdast-util-gfm-footnote": "^2.0.0", + "mdast-util-gfm-strikethrough": "^2.0.0", + "mdast-util-gfm-table": "^2.0.0", + "mdast-util-gfm-task-list-item": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz", + "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "ccount": "^2.0.0", + "devlop": "^1.0.0", + "mdast-util-find-and-replace": "^3.0.0", + "micromark-util-character": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.0.0.tgz", + "integrity": "sha512-5jOT2boTSVkMnQ7LTrd6n/18kqwjmuYqo7JUPe+tRCY6O7dAuTFMtTPauYYrMPpox9hlN0uOx/FL8XvEfG9/mQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz", + "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz", + "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz", + "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-math": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mdast-util-math/-/mdast-util-math-3.0.0.tgz", @@ -8847,6 +8978,120 @@ "micromark-util-types": "^2.0.0" } }, + "node_modules/micromark-extension-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", + "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==", + "dependencies": { + "micromark-extension-gfm-autolink-literal": "^2.0.0", + "micromark-extension-gfm-footnote": "^2.0.0", + "micromark-extension-gfm-strikethrough": "^2.0.0", + "micromark-extension-gfm-table": "^2.0.0", + "micromark-extension-gfm-tagfilter": "^2.0.0", + "micromark-extension-gfm-task-list-item": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", + "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", + "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.0.tgz", + "integrity": "sha512-Ub2ncQv+fwD70/l4ou27b4YzfNaCJOvyX4HxXU15m7mpYY+rjuWzsLIPZHJL253Z643RpbcP1oeIJlQ/SKW67g==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz", + "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", + "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/micromark-extension-math": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/micromark-extension-math/-/micromark-extension-math-3.1.0.tgz", @@ -11282,6 +11527,23 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-gfm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.0.tgz", + "integrity": "sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-gfm": "^3.0.0", + "micromark-extension-gfm": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-math": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz", @@ -11328,6 +11590,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", diff --git a/gui/package.json b/gui/package.json index 4365e2ba2..e13e00be6 100644 --- a/gui/package.json +++ b/gui/package.json @@ -58,6 +58,7 @@ "rehype-highlight": "^7.0.0", "rehype-katex": "^7.0.0", "rehype-wrap-all": "^1.1.0", + "remark-gfm": "^4.0.0", "remark-math": "^6.0.0", "reselect": "^5.1.1", "seti-file-icons": "^0.0.8", diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index caad6428c..383891d5c 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -3,6 +3,7 @@ import { useRemark } from "react-remark"; import rehypeHighlight, { Options } from "rehype-highlight"; import rehypeKatex from "rehype-katex"; import remarkMath from "remark-math"; +import remarkGfm from "remark-gfm"; import styled from "styled-components"; import { visit } from "unist-util-visit"; import { @@ -175,7 +176,13 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( }, [symbols]); const [reactContent, setMarkdownSource] = useRemark({ - remarkPlugins: [remarkMath, () => processCodeBlocks], + remarkPlugins: [ + // remarkGfm, + remarkMath, + () => processCodeBlocks, + // c + //c + ], rehypePlugins: [ rehypeKatex as any, {}, @@ -187,17 +194,17 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( { // languages: {}, } as Options, - () => { - let codeBlockIndex = 0; - return (tree) => { - visit(tree, { tagName: "pre" }, (node: any) => { - // Add an index (0, 1, 2, etc...) to each code block. - node.properties = { codeBlockIndex }; - codeBlockIndex++; - }); - }; - }, - {}, + // () => { + // let codeBlockIndex = 0; + // return (tree) => { + // visit(tree, { tagName: "pre" }, (node: any) => { + // Add an index (0, 1, 2, etc...) to each code block. + // node.properties = { codeBlockIndex }; + // codeBlockIndex++; + // }); + // }; + // }, + // {}, ], rehypeReactOptions: { components: { From 1e7608c478be272d0c28c0d1012c908a0bb1e269 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 2 Dec 2024 02:21:48 -0500 Subject: [PATCH 009/113] double dollar sign latex fix --- .../markdown/StyledMarkdownPreview.tsx | 6 +- .../markdown/utils/fixDoubleDollarLatex.ts | 13 ++ .../utils/fixDoubleDollarLatext.test.ts | 124 ++++++++++++++++++ 3 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 gui/src/components/markdown/utils/fixDoubleDollarLatex.ts create mode 100644 gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index 70be76bdc..510f44016 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -25,6 +25,7 @@ import SymbolLink from "./SymbolLink"; import { SyntaxHighlightedPre } from "./SyntaxHighlightedPre"; import { patchNestedMarkdown } from "./utils/patchNestedMarkdown"; import { useAppSelector } from "../../redux/hooks"; +import { fixDoubleDollarNewLineLatex } from "./utils/fixDoubleDollarLatex"; const StyledMarkdown = styled.div<{ fontSize?: number; @@ -286,7 +287,10 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( }); useEffect(() => { - setMarkdownSource(patchNestedMarkdown(props.source ?? "")); + setMarkdownSource( + // some patches to source markdown are applied here: + fixDoubleDollarNewLineLatex(patchNestedMarkdown(props.source ?? "")), + ); }, [props.source]); return ( diff --git a/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts b/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts new file mode 100644 index 000000000..53c110553 --- /dev/null +++ b/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts @@ -0,0 +1,13 @@ +/* +Currently double dollar latext with new lines causes truncation error +*/ +export function fixDoubleDollarNewLineLatex(text: string): string { + // Match LaTeX blocks delimited by $$ with newlines + const pattern = /\$\$(?:\r?\n)(.*?)(?:\r?\n)\$\$/gms; + + // Replace each matched block with $$ without newline + const replacedText = text.replace(pattern, "$$$$$1$$$$"); + + console.log("RESULT", replacedText); + return replacedText; +} diff --git a/gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts b/gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts new file mode 100644 index 000000000..c3c932657 --- /dev/null +++ b/gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts @@ -0,0 +1,124 @@ +import { fixDoubleDollarNewLineLatex } from "./fixDoubleDollarLatex"; // Adjust the import based on your file structure + +/* + These tests are generated by claude sonnet, audit if failing. +*/ +describe("fixDoubleDollarNewLineLatex", () => { + it("replaces newlined $$ delimiters for a single LaTeX block", () => { + const input = ` + Here is some text. + + $$ + f(x) = ax^2 + bx + c + $$ + + End of text. + `; + const expectedOutput = ` + Here is some text. + + $$f(x) = ax^2 + bx + c$$ + + End of text. + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("does not modify text without LaTeX blocks", () => { + const input = ` + This is a simple text block. + `; + const expectedOutput = ` + This is a simple text block. + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("does not replace single $ delimiters", () => { + const input = ` + Price is $100. + `; + const expectedOutput = ` + Price is $100. + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("processes multiple LaTeX blocks separately", () => { + const input = ` + $$\nE = mc^2\n$$ + + Some text. + + $$\na^2 + b^2 = c^2\n$$ + `; + const expectedOutput = ` + $$E = mc^2$$ + + Some text. + + $$a^2 + b^2 = c^2$$ + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("leaves inline $$ delimiters untouched", () => { + const input = ` + You earned $$1,000 today. + `; + const expectedOutput = ` + You earned $$1,000 today. + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("handles no LaTeX correctly", () => { + const input = `Just a regular string, nothing fancy.`; + const expectedOutput = `Just a regular string, nothing fancy.`; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("ignores malformed LaTeX that lacks newlines", () => { + const input = ` + $$f(x) = ax^2 + bx + c$$ + `; + const expectedOutput = ` + $$f(x) = ax^2 + bx + c$$ + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("keeps text spacing unchanged except for newline removal", () => { + const input = ` + Start + + $$\nA = \pi r^2\n$$ + + End + `; + const expectedOutput = ` + Start + + $$A = \pi r^2$$ + + End + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("works with a completely empty string", () => { + const input = ""; + const expectedOutput = ""; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); + + it("ignores non-matching but similar text", () => { + const input = ` + Look at this: $$$Profit$$$ + `; + const expectedOutput = ` + Look at this: $$$Profit$$$ + `; + expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); + }); +}); From 731b54eb30bd7184e42c397db658020b4a70d5f7 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 10:13:20 -0600 Subject: [PATCH 010/113] feat: move Edit into Chat page --- extensions/vscode/src/commands.ts | 1 + gui/src/App.tsx | 5 - .../CodeToEditCard}/AddFileButton.tsx | 0 .../CodeToEditCard}/AddFileCombobox.tsx | 2 +- .../CodeToEditCard/CodeToEditCard.tsx} | 6 +- .../CodeToEditCard}/CodeToEditListItem.tsx | 8 +- gui/src/components/CodeToEditCard/index.ts | 1 + gui/src/components/Layout.tsx | 16 +- .../components/StepContainer/EditActions.tsx | 22 +- .../StepContainer/ResponseActions.tsx | 5 +- gui/src/components/dialogs/FeedbackDialog.tsx | 64 +++++ .../components/mainInput/ContinueInputBox.tsx | 70 ++++- gui/src/components/mainInput/TipTapEditor.tsx | 40 ++- .../StepContainerPreToolbar.tsx | 10 +- .../markdown/StyledMarkdownPreview.tsx | 2 + gui/src/pages/edit/Edit.tsx | 241 ------------------ gui/src/pages/edit/index.tsx | 1 - gui/src/pages/gui/Chat.tsx | 236 ++++++++++------- gui/src/redux/slices/sessionSlice.ts | 55 +++- gui/src/redux/thunks/completeEdit.ts | 26 ++ .../edit => util}/getMultifileEditPrompt.ts | 0 21 files changed, 409 insertions(+), 402 deletions(-) rename gui/src/{pages/edit => components/CodeToEditCard}/AddFileButton.tsx (100%) rename gui/src/{pages/edit => components/CodeToEditCard}/AddFileCombobox.tsx (98%) rename gui/src/{pages/edit/CodeToEdit.tsx => components/CodeToEditCard/CodeToEditCard.tsx} (94%) rename gui/src/{pages/edit => components/CodeToEditCard}/CodeToEditListItem.tsx (93%) create mode 100644 gui/src/components/CodeToEditCard/index.ts create mode 100644 gui/src/components/dialogs/FeedbackDialog.tsx delete mode 100644 gui/src/pages/edit/Edit.tsx delete mode 100644 gui/src/pages/edit/index.tsx create mode 100644 gui/src/redux/thunks/completeEdit.ts rename gui/src/{pages/edit => util}/getMultifileEditPrompt.ts (100%) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 96426b88a..bd80fada6 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -581,6 +581,7 @@ const getCommandsMap: ( }, "continue.exitEditMode": async () => { captureCommandTelemetry("exitEditMode"); + editDecorationManager.clear(); await sidebar.webviewProtocol?.request("exitEditMode", undefined); }, // "continue.quickEdit": async (args: QuickEditShowParams) => { diff --git a/gui/src/App.tsx b/gui/src/App.tsx index 8b8d7fcd6..244d811b5 100644 --- a/gui/src/App.tsx +++ b/gui/src/App.tsx @@ -5,7 +5,6 @@ import { VscThemeProvider } from "./context/VscTheme"; import useSetup from "./hooks/useSetup"; import { AddNewModel, ConfigureProvider } from "./pages/AddNewModel"; import ConfigErrorPage from "./pages/config-error"; -import Edit from "./pages/edit"; import ErrorPage from "./pages/error"; import Chat from "./pages/gui"; import History from "./pages/history"; @@ -38,10 +37,6 @@ const router = createMemoryRouter([ path: "/stats", element: , }, - { - path: "/edit", - element: , - }, { path: "/addModel", element: , diff --git a/gui/src/pages/edit/AddFileButton.tsx b/gui/src/components/CodeToEditCard/AddFileButton.tsx similarity index 100% rename from gui/src/pages/edit/AddFileButton.tsx rename to gui/src/components/CodeToEditCard/AddFileButton.tsx diff --git a/gui/src/pages/edit/AddFileCombobox.tsx b/gui/src/components/CodeToEditCard/AddFileCombobox.tsx similarity index 98% rename from gui/src/pages/edit/AddFileCombobox.tsx rename to gui/src/components/CodeToEditCard/AddFileCombobox.tsx index 9e36dbaeb..b79365fb1 100644 --- a/gui/src/pages/edit/AddFileCombobox.tsx +++ b/gui/src/components/CodeToEditCard/AddFileCombobox.tsx @@ -4,7 +4,7 @@ import { useSubmenuContextProviders, } from "../../context/SubmenuContextProviders"; import { Combobox } from "@headlessui/react"; -import FileIcon from "../../components/FileIcon"; +import FileIcon from "../FileIcon"; import { useAppSelector } from "../../redux/hooks"; export interface AddFileComboboxProps { diff --git a/gui/src/pages/edit/CodeToEdit.tsx b/gui/src/components/CodeToEditCard/CodeToEditCard.tsx similarity index 94% rename from gui/src/pages/edit/CodeToEdit.tsx rename to gui/src/components/CodeToEditCard/CodeToEditCard.tsx index dd15396fb..3f4ef372d 100644 --- a/gui/src/pages/edit/CodeToEdit.tsx +++ b/gui/src/components/CodeToEditCard/CodeToEditCard.tsx @@ -2,7 +2,7 @@ import { useContext, useState } from "react"; import { useDispatch } from "react-redux"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import CodeToEditListItem from "./CodeToEditListItem"; -import { CodeToEdit, RangeInFileWithContents } from "core"; +import type { CodeToEdit, RangeInFileWithContents } from "core"; import AddFileButton from "./AddFileButton"; import AddFileCombobox from "./AddFileCombobox"; import { XMarkIcon } from "@heroicons/react/24/outline"; @@ -12,7 +12,7 @@ import { removeCodeToEdit, } from "../../redux/slices/sessionSlice"; -export default function WorkingSet() { +export default function CodeToEditCard() { const dispatch = useDispatch(); const ideMessenger = useContext(IdeMessengerContext); const [showAddFileCombobox, setShowAddFileCombobox] = useState(false); @@ -55,7 +55,7 @@ export default function WorkingSet() { } return ( -

+
{title} setShowAddFileCombobox(true)} /> diff --git a/gui/src/pages/edit/CodeToEditListItem.tsx b/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx similarity index 93% rename from gui/src/pages/edit/CodeToEditListItem.tsx rename to gui/src/components/CodeToEditCard/CodeToEditListItem.tsx index cc4170f5a..7627ce5c7 100644 --- a/gui/src/pages/edit/CodeToEditListItem.tsx +++ b/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx @@ -1,11 +1,11 @@ -import FileIcon from "../../components/FileIcon"; +import FileIcon from "../FileIcon"; import { ChevronDownIcon, ChevronRightIcon, XMarkIcon, } from "@heroicons/react/24/outline"; import { useState } from "react"; -import StyledMarkdownPreview from "../../components/markdown/StyledMarkdownPreview"; +import StyledMarkdownPreview from "../markdown/StyledMarkdownPreview"; import { getLastNPathParts, getMarkdownLanguageTagForFile } from "core/util"; import styled from "styled-components"; import { CodeToEdit } from "core"; @@ -86,8 +86,8 @@ export default function CodeToEditListItem({
-
-
+
+
{showCodeSnippet ? ( { diff --git a/gui/src/components/CodeToEditCard/index.ts b/gui/src/components/CodeToEditCard/index.ts new file mode 100644 index 000000000..2e7d342eb --- /dev/null +++ b/gui/src/components/CodeToEditCard/index.ts @@ -0,0 +1 @@ +export { default } from "./CodeToEditCard"; diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 7ef0315a3..ae264fef0 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -14,9 +14,9 @@ import { import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; import { addCodeToEdit, - clearCodeToEdit, updateApplyState, - updateCurCheckpoint, + setMode, + clearCodeToEdit, } from "../redux/slices/sessionSlice"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; import { getLocalStorage, setLocalStorage } from "../util/localStorage"; @@ -27,6 +27,7 @@ import { isNewUserOnboarding, useOnboardingCard } from "./OnboardingCard"; import PostHogPageView from "./PosthogPageView"; import AccountDialog from "./AccountDialog"; import { AuthProvider } from "../context/Auth"; +import useHistory from "../hooks/useHistory"; const LayoutTopDiv = styled(CustomScrollbarDiv)` height: 100%; @@ -58,6 +59,7 @@ const Layout = () => { const dispatch = useDispatch(); const onboardingCard = useOnboardingCard(); const { pathname } = useLocation(); + const { saveSession } = useHistory(dispatch); const configError = useAppSelector((state) => state.config.configError); @@ -159,9 +161,9 @@ const Layout = () => { useWebviewListener( "focusEdit", async () => { + saveSession(); dispatch(focusEdit()); - dispatch(clearCodeToEdit()); - navigate("/edit"); + dispatch(setMode("edit")); }, [navigate], ); @@ -169,8 +171,9 @@ const Layout = () => { useWebviewListener( "focusEditWithoutClear", async () => { + saveSession(); dispatch(focusEdit()); - navigate("/edit"); + dispatch(setMode("edit")); }, [navigate], ); @@ -195,7 +198,8 @@ const Layout = () => { "exitEditMode", async () => { dispatch(setEditDone()); - navigate("/"); + dispatch(setMode("chat")); + dispatch(clearCodeToEdit()); }, [navigate], ); diff --git a/gui/src/components/StepContainer/EditActions.tsx b/gui/src/components/StepContainer/EditActions.tsx index 4fdecbe54..ebb796f2c 100644 --- a/gui/src/components/StepContainer/EditActions.tsx +++ b/gui/src/components/StepContainer/EditActions.tsx @@ -1,13 +1,14 @@ import { ChatHistoryItem } from "core"; -import { useSelector } from "react-redux"; -import { RootState } from "../../redux/store"; import AcceptRejectAllButtons from "./AcceptRejectAllButtons"; import FeedbackButtons from "./FeedbackButtons"; -import UndoAndRedoButtons from "./UndoAndRedoButtons"; import { renderChatMessage } from "core/util/messageContent"; import { CopyIconButton } from "../gui/CopyIconButton"; -import { useAppSelector } from "../../redux/hooks"; +import { useAppDispatch, useAppSelector } from "../../redux/hooks"; +import useHistory from "../../hooks/useHistory"; +import { useContext } from "react"; +import { IdeMessengerContext } from "../../context/IdeMessenger"; +import { completeEdit } from "../../redux/thunks/completeEdit"; export interface EditActionsProps { index: number; @@ -18,6 +19,8 @@ export default function EditActions({ index, item }: EditActionsProps) { // const curCheckpointIndex = useSelector( // (store: RootState) => store.state.curCheckpointIndex, // ); + const dispatch = useAppDispatch(); + const { loadLastSession } = useHistory(dispatch); const isStreaming = useAppSelector((state) => state.session.isStreaming); @@ -55,7 +58,16 @@ export default function EditActions({ index, item }: EditActionsProps) {
{hasPendingApplies && ( - + { + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + + dispatch(completeEdit()); + }} + /> )} {/* {hasClosedAllStreams && } */}
diff --git a/gui/src/components/StepContainer/ResponseActions.tsx b/gui/src/components/StepContainer/ResponseActions.tsx index cc5e0aae7..958595aee 100644 --- a/gui/src/components/StepContainer/ResponseActions.tsx +++ b/gui/src/components/StepContainer/ResponseActions.tsx @@ -6,6 +6,7 @@ import HeaderButtonWithToolTip from "../gui/HeaderButtonWithToolTip"; import EditActions from "./EditActions"; import FeedbackButtons from "./FeedbackButtons"; import { useAppSelector } from "../../redux/hooks"; +import { selectIsInEditMode } from "../../redux/slices/sessionSlice"; export interface ResponseActionsProps { isTruncated: boolean; @@ -24,9 +25,7 @@ export default function ResponseActions({ onDelete, shouldHideActions, }: ResponseActionsProps) { - const isInEditMode = useAppSelector( - (store) => store.editModeState.isInEditMode, - ); + const isInEditMode = useAppSelector(selectIsInEditMode); if (isInEditMode) { return ; diff --git a/gui/src/components/dialogs/FeedbackDialog.tsx b/gui/src/components/dialogs/FeedbackDialog.tsx new file mode 100644 index 000000000..d8da4e93b --- /dev/null +++ b/gui/src/components/dialogs/FeedbackDialog.tsx @@ -0,0 +1,64 @@ +import { usePostHog } from "posthog-js/react"; +import { setDialogMessage } from "../../redux/slices/uiSlice"; +import { useAppDispatch } from "../../redux/hooks"; + +export default function FeedbackDialog() { + const posthog = usePostHog(); + const dispatch = useAppDispatch(); + + return ( +
+ 👋 Thanks for using Continue. We are always trying to improve and love + hearing from users. If you're interested in speaking, enter your name and + email. We won't use this information for anything other than reaching out. +
+
+
{ + e.preventDefault(); + posthog?.capture("user_interest_form", { + name: e.target.elements[0].value, + email: e.target.elements[1].value, + }); + dispatch( + setDialogMessage( +
+ Thanks! We'll be in touch soon. +
, + ), + ); + }} + style={{ + display: "flex", + flexDirection: "column", + gap: "10px", + }} + > + + + +
+
+ ); +} diff --git a/gui/src/components/mainInput/ContinueInputBox.tsx b/gui/src/components/mainInput/ContinueInputBox.tsx index 94eed2884..176c74dee 100644 --- a/gui/src/components/mainInput/ContinueInputBox.tsx +++ b/gui/src/components/mainInput/ContinueInputBox.tsx @@ -9,8 +9,11 @@ import ContextItemsPeek from "./ContextItemsPeek"; import TipTapEditor from "./TipTapEditor"; import { useAppSelector } from "../../redux/hooks"; import { newSession, setMessageAtIndex } from "../../redux/slices/sessionSlice"; +import { ToolbarOptions } from "./InputToolbar"; +import { useMemo } from "react"; interface ContinueInputBoxProps { + isEditMode?: boolean; isLastUserInput: boolean; isMainInput?: boolean; onEnter: ( @@ -23,6 +26,18 @@ interface ContinueInputBoxProps { hidden?: boolean; } +const EDIT_DISALLOWED_CONTEXT_PROVIDERS = [ + "codebase", + "tree", + "open", + "web", + "diff", + "folder", + "search", + "debugger", + "repo-map", +]; + const gradient = keyframes` 0% { background-position: 0px 0; @@ -63,7 +78,7 @@ const GradientBorder = styled.div<{ function ContinueInputBox(props: ContinueInputBoxProps) { const dispatch = useDispatch(); - const active = useAppSelector((state) => state.session.isStreaming); + const isStreaming = useAppSelector((state) => state.session.isStreaming); const availableSlashCommands = useAppSelector( selectSlashCommandComboBoxInputs, ); @@ -73,6 +88,42 @@ function ContinueInputBox(props: ContinueInputBoxProps) { const useTools = useAppSelector( (state) => state.config.config.experimental?.useTools !== false, ); + const editModeState = useAppSelector((state) => state.editModeState); + + const filteredSlashCommands = props.isEditMode ? [] : availableSlashCommands; + const filteredContextProviders = useMemo(() => { + if (!props.isEditMode) { + availableContextProviders; + } + + return ( + availableContextProviders?.filter( + (provider) => + !EDIT_DISALLOWED_CONTEXT_PROVIDERS.includes(provider.title), + ) ?? [] + ); + }, [availableContextProviders]); + + const isStreamingEdit = + editModeState.editStatus === "streaming" || + editModeState.editStatus === "accepting"; + + const historyKey = props.isEditMode ? "edit" : "chat"; + const placeholder = props.isEditMode + ? "Describe how to modify the code - use '#' to add files" + : undefined; + const toolbarOptions: ToolbarOptions = props.isEditMode + ? { + hideAddContext: false, + hideImageUpload: false, + hideUseCodebase: true, + hideSelectModel: false, + hideTools: true, + enterText: isStreamingEdit ? "Retry" : "Edit", + } + : { + hideTools: !useTools, + }; useWebviewListener( "newSessionWithPrompt", @@ -92,11 +143,11 @@ function ContinueInputBox(props: ContinueInputBoxProps) { return (
-
+
@@ -108,13 +159,12 @@ function ContinueInputBox(props: ContinueInputBoxProps) { args[2].commands.clearContent(true); } }} + placeholder={placeholder} isMainInput={props.isMainInput ?? false} - availableContextProviders={availableContextProviders ?? []} - availableSlashCommands={availableSlashCommands} - historyKey="chat" - toolbarOptions={{ - hideTools: !useTools, - }} + availableContextProviders={filteredContextProviders} + availableSlashCommands={filteredSlashCommands} + historyKey={historyKey} + toolbarOptions={toolbarOptions} />
diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index e9b7ad433..3d54cb7e5 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -69,7 +69,10 @@ import { selectDefaultModel } from "../../redux/slices/configSlice"; import { addCodeToEdit, clearCodeToEdit, + selectIsInEditMode, + setMode, } from "../../redux/slices/sessionSlice"; +import { setEditDone } from "../../redux/slices/editModeState"; const InputBoxDiv = styled.div<{ border?: string }>` resize: none; @@ -193,10 +196,6 @@ function TipTapEditor(props: TipTapEditorProps) { const isOSREnabled = useIsOSREnabled(); - const isInEditMode = useAppSelector( - (state) => state.editModeState.isInEditMode, - ); - const enterSubmenu = async (editor: Editor, providerId: string) => { const contents = editor.getText(); const indexOfAt = contents.lastIndexOf("@"); @@ -251,8 +250,11 @@ function TipTapEditor(props: TipTapEditorProps) { props.availableSlashCommands, ); - const active = useAppSelector((state) => state.session.isStreaming); - const activeRef = useUpdatingRef(active); + const isStreaming = useAppSelector((state) => state.session.isStreaming); + const isStreamingRef = useUpdatingRef(isStreaming); + + const isInEditMode = useAppSelector(selectIsInEditMode); + const isInEditModeRef = useUpdatingRef(isInEditMode); async function handleImageFile( file: File, @@ -389,7 +391,7 @@ function TipTapEditor(props: TipTapEditorProps) { // If you press cmd+backspace wanting to cancel, // but are inside of a text box, it shouldn't // delete the text - if (activeRef.current) { + if (isStreamingRef.current) { return true; } }, @@ -418,6 +420,18 @@ function TipTapEditor(props: TipTapEditorProps) { return true; } }, + Escape: () => { + if (isInEditModeRef.current) { + dispatch(setMode("chat")); + dispatch(clearCodeToEdit()); + dispatch(setEditDone()); + ideMessenger.post("edit/escape", undefined); + + return true; + } + + return false; + }, ArrowDown: () => { if ( this.editor.state.selection.anchor < @@ -460,7 +474,7 @@ function TipTapEditor(props: TipTapEditorProps) { return `@${props.node.attrs.label || props.node.attrs.id}`; }, }), - isInEditMode + isInEditModeRef.current ? AddCodeToEdit.configure({ HTMLAttributes: { class: "add-code-to-edit", @@ -528,7 +542,7 @@ function TipTapEditor(props: TipTapEditorProps) { }, }, content: props.editorState || mainEditorContent || "", - editable: !active || props.isMainInput, + editable: !isStreaming || props.isMainInput, }); const [shouldHideToolbar, setShouldHideToolbar] = useState(false); @@ -588,7 +602,7 @@ function TipTapEditor(props: TipTapEditorProps) { const onEnterRef = useUpdatingRef( (modifiers: InputModifiers) => { - if (active) { + if (isStreaming) { return; } @@ -611,10 +625,10 @@ function TipTapEditor(props: TipTapEditorProps) { // Re-focus main input after done generating useEffect(() => { - if (editor && !active && props.isMainInput && document.hasFocus()) { + if (editor && !isStreaming && props.isMainInput && document.hasFocus()) { editor.commands.focus(undefined, { scrollIntoView: false }); } - }, [props.isMainInput, active, editor]); + }, [props.isMainInput, isStreaming, editor]); // IDE event listeners useWebviewListener( @@ -918,7 +932,7 @@ function TipTapEditor(props: TipTapEditorProps) { }); }); }} - disabled={active} + disabled={isStreaming} /> diff --git a/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx b/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx index 58707f5eb..61dcfbb3a 100644 --- a/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx +++ b/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx @@ -15,7 +15,10 @@ import GeneratingCodeLoader from "./GeneratingCodeLoader"; import RunInTerminalButton from "./RunInTerminalButton"; import { useAppSelector } from "../../../redux/hooks"; import { selectDefaultModel } from "../../../redux/slices/configSlice"; -import { selectApplyStateByStreamId } from "../../../redux/slices/sessionSlice"; +import { + selectApplyStateByStreamId, + selectIsInEditMode, +} from "../../../redux/slices/sessionSlice"; const TopDiv = styled.div` outline: 1px solid rgba(153, 153, 152); @@ -56,9 +59,7 @@ export default function StepContainerPreToolbar( const ideMessenger = useContext(IdeMessengerContext); const streamIdRef = useRef(uuidv4()); const wasGeneratingRef = useRef(props.isGeneratingCodeBlock); - const isInEditMode = useAppSelector( - (state) => state.editModeState.isInEditMode, - ); + const isInEditMode = useAppSelector(selectIsInEditMode); const [isExpanded, setIsExpanded] = useState( props.expanded ?? (isInEditMode ? false : true), ); @@ -126,6 +127,7 @@ export default function StepContainerPreToolbar( useEffect(() => { const hasCompletedGenerating = wasGeneratingRef.current && !isGeneratingCodeBlock; + const shouldAutoApply = hasCompletedGenerating && isInEditMode; if (shouldAutoApply) { diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index 70be76bdc..38f2cebbc 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -222,6 +222,8 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( const language = getLanuageFromClassName(className); + console.log({ language }); + // If we don't have a filepath show the more basic toolbar // that is just action buttons on hover. // We also use this in JB since we haven't yet implemented diff --git a/gui/src/pages/edit/Edit.tsx b/gui/src/pages/edit/Edit.tsx deleted file mode 100644 index 5fcf2afde..000000000 --- a/gui/src/pages/edit/Edit.tsx +++ /dev/null @@ -1,241 +0,0 @@ -import { ArrowLeftIcon } from "@heroicons/react/24/outline"; -import { Editor, JSONContent } from "@tiptap/core"; -import { InputModifiers, RangeInFileWithContents } from "core"; -import { stripImages } from "core/util/messageContent"; -import { useCallback, useContext, useEffect, useMemo } from "react"; -import { useNavigate } from "react-router-dom"; -import ContinueInputBox from "../../components/mainInput/ContinueInputBox"; -import { ToolbarOptions } from "../../components/mainInput/InputToolbar"; -import { NewSessionButton } from "../../components/mainInput/NewSessionButton"; -import resolveEditorContent from "../../components/mainInput/resolveInput"; -import TipTapEditor from "../../components/mainInput/TipTapEditor"; -import StepContainer from "../../components/StepContainer"; -import AcceptRejectAllButtons from "../../components/StepContainer/AcceptRejectAllButtons"; -import { IdeMessengerContext } from "../../context/IdeMessenger"; -import { setEditDone, submitEdit } from "../../redux/slices/editModeState"; -import { streamResponseThunk } from "../../redux/thunks/streamResponse"; -import CodeToEdit from "./CodeToEdit"; -import getMultifileEditPrompt from "./getMultifileEditPrompt"; -import { useAppDispatch, useAppSelector } from "../../redux/hooks"; -import { - clearCodeToEdit, - selectApplyStateByStreamId, -} from "../../redux/slices/sessionSlice"; - -const EDIT_DISALLOWED_CONTEXT_PROVIDERS = [ - "codebase", - "tree", - "open", - "web", - "diff", - "folder", - "search", - "debugger", - "repo-map", -]; - -export default function Edit() { - const dispatch = useAppDispatch(); - const navigate = useNavigate(); - const ideMessenger = useContext(IdeMessengerContext); - const editModeState = useAppSelector((state) => state.editModeState); - const codeToEdit = useAppSelector((state) => state.session.codeToEdit); - const availableContextProviders = useAppSelector( - (state) => state.config.config.contextProviders, - ); - - const filteredContextProviders = useMemo(() => { - return ( - availableContextProviders?.filter( - (provider) => - !EDIT_DISALLOWED_CONTEXT_PROVIDERS.includes(provider.title), - ) ?? [] - ); - }, [availableContextProviders]); - - const history = useAppSelector((state) => state.session.history); - - const applyStates = useAppSelector( - (state) => state.session.codeBlockApplyStates.states, - ); - - const applyState = useAppSelector( - (state) => selectApplyStateByStreamId(state, "edit")?.status ?? "closed", - ); - const isSingleRangeEdit = - codeToEdit.length === 0 || - (codeToEdit.length === 1 && "range" in codeToEdit[0]); - - useEffect(() => { - if (editModeState.editStatus === "done") { - ideMessenger.post("edit/escape", undefined); - navigate("/"); - } - }, [editModeState.editStatus]); - - useEffect(() => { - if (applyState === "closed" && editModeState.editStatus === "accepting") { - dispatch(setEditDone()); - } - }, [applyState, editModeState.editStatus]); - - const pendingApplyStates = applyStates.filter( - (state) => state.status === "done", - ); - - const isStreaming = - editModeState.editStatus === "streaming" || - editModeState.editStatus === "accepting"; - - const toolbarOptions: ToolbarOptions = { - hideAddContext: false, - hideImageUpload: false, - hideUseCodebase: true, - hideSelectModel: false, - hideTools: true, - enterText: isStreaming ? "Retry" : "Edit", - }; - - const hasPendingApplies = pendingApplyStates.length > 0; - - async function handleSingleRangeEdit( - editorState: JSONContent, - modifiers: InputModifiers, - editor: Editor, - ) { - const [contextItems, __, userInstructions] = await resolveEditorContent( - editorState, - { - noContext: true, - useCodebase: false, - }, - ideMessenger, - [], - dispatch, - ); - - const prompt = [ - ...contextItems.map((item) => item.content), - stripImages(userInstructions), - ].join("\n\n"); - - ideMessenger.post("edit/sendPrompt", { - prompt, - range: codeToEdit[0] as RangeInFileWithContents, - }); - - dispatch(submitEdit(prompt)); - editor.commands.selectTextblockEnd(); - } - - async function handleEditorEnter( - editorState: JSONContent, - modifiers: InputModifiers, - editor: Editor, - ) { - if (isSingleRangeEdit) { - handleSingleRangeEdit(editorState, modifiers, editor); - } else { - const promptPreamble = getMultifileEditPrompt(codeToEdit); - - dispatch( - streamResponseThunk({ - editorState, - modifiers, - promptPreamble, - }), - ); - } - } - - function handleBackClick() { - dispatch(setEditDone()); - } - - const isLastUserInput = useCallback( - (index: number): boolean => { - return !history - .slice(index + 1) - .some((entry) => entry.message.role === "user"); - }, - [history], - ); - - return ( -
-
-
- - -
- - {!isSingleRangeEdit && history.length > 1 && ( -
- {history.slice(1).map((item, index: number) => ( -
- {item.message.role === "user" ? ( - { - dispatch( - streamResponseThunk({ - editorState, - modifiers, - index, - }), - ); - }} - isLastUserInput={isLastUserInput(index)} - isMainInput={false} - editorState={item.editorState} - contextItems={item.contextItems} - /> - ) : ( - - )} -
- ))} - - {/* {!active && ( - - )} */} -
- )} - -
- {hasPendingApplies && isSingleRangeEdit && ( - dispatch(clearCodeToEdit())} - /> - )} - - {!hasPendingApplies && isSingleRangeEdit && ( - - - Back to Chat - - )} -
-
-
- ); -} diff --git a/gui/src/pages/edit/index.tsx b/gui/src/pages/edit/index.tsx deleted file mode 100644 index d1c8752c8..000000000 --- a/gui/src/pages/edit/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./Edit"; diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 298d3101d..7b871ec0e 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -4,8 +4,8 @@ import { CodeBracketSquareIcon, ExclamationTriangleIcon, } from "@heroicons/react/24/outline"; -import { JSONContent } from "@tiptap/react"; -import { InputModifiers, ToolCallState } from "core"; +import { Editor, JSONContent } from "@tiptap/react"; +import { InputModifiers, RangeInFileWithContents, ToolCallState } from "core"; import { streamResponse } from "core/llm/stream"; import { usePostHog } from "posthog-js/react"; import { useCallback, useContext, useEffect, useRef, useState } from "react"; @@ -36,9 +36,12 @@ import { useTutorialCard } from "../../hooks/useTutorialCard"; import { useWebviewListener } from "../../hooks/useWebviewListener"; import { selectCurrentToolCall } from "../../redux/selectors/selectCurrentToolCall"; import { + clearCodeToEdit, clearLastEmptyResponse, newSession, + selectIsInEditMode, setInactive, + setMode, } from "../../redux/slices/sessionSlice"; import { streamResponseThunk } from "../../redux/thunks/streamResponse"; import { @@ -60,6 +63,15 @@ import { setShowDialog, } from "../../redux/slices/uiSlice"; import { RootState } from "../../redux/store"; +import FeedbackDialog from "../../components/dialogs/FeedbackDialog"; +import getMultifileEditPrompt from "../../util/getMultifileEditPrompt"; +import { setEditDone, submitEdit } from "../../redux/slices/editModeState"; +import { stripImages } from "core/util/messageContent"; +import resolveEditorContent from "../../components/mainInput/resolveInput"; +import CodeToEdit from "../../components/CodeToEditCard/CodeToEditCard"; +import AcceptRejectAllButtons from "../../components/StepContainer/AcceptRejectAllButtons"; +import CodeToEditCard from "../../components/CodeToEditCard"; +import { completeEdit } from "../../redux/thunks/completeEdit"; const StopButton = styled.div` background-color: ${vscBackground}; @@ -130,16 +142,24 @@ export function Chat() { const mainTextInputRef = useRef(null); const stepsDivRef = useRef(null); const [isAtBottom, setIsAtBottom] = useState(false); - const messages = useAppSelector((state) => state.session.history); + const history = useAppSelector((state) => state.session.history); const showChatScrollbar = useAppSelector( (state) => state.config.config.ui?.showChatScrollbar, ); const { saveSession, getLastSessionId, loadLastSession } = useHistory(dispatch); - + const codeToEdit = useAppSelector((state) => state.session.codeToEdit); const toolCallState = useSelector( selectCurrentToolCall, ); + const applyStates = useAppSelector( + (state) => state.session.codeBlockApplyStates.states, + ); + const pendingApplyStates = applyStates.filter( + (state) => state.status === "done", + ); + const hasPendingApplies = pendingApplyStates.length > 0; + const isInEditMode = useAppSelector(selectIsInEditMode); const snapToBottom = useCallback(() => { if (!stepsDivRef.current) return; @@ -160,6 +180,14 @@ export function Chat() { setIsAtBottom(true); }, [stepsDivRef, setIsAtBottom]); + const returnToLastSessinButtonText = isInEditMode + ? "Back to Chat" + : "Last Session"; + + const isSingleRangeEdit = + codeToEdit.length === 0 || + (codeToEdit.length === 1 && "range" in codeToEdit[0]); + useEffect(() => { if (active) snapToBottom(); }, [active, snapToBottom]); @@ -202,7 +230,7 @@ export function Chat() { const { widget, highlights } = useFindWidget(stepsDivRef); - const sendInput = useCallback( + const sendChatInput = useCallback( (editorState: JSONContent, modifiers: InputModifiers) => { if (defaultModel?.provider === "free-trial") { const u = getLocalStorage("ftc"); @@ -230,64 +258,7 @@ export function Chat() { if (currentCount) { setLocalStorage("mainTextEntryCounter", currentCount + 1); if (currentCount === 300) { - dispatch( - setDialogMessage( -
- 👋 Thanks for using Continue. We are always trying to improve - and love hearing from users. If you're interested in speaking, - enter your name and email. We won't use this information for - anything other than reaching out. -
-
-
{ - e.preventDefault(); - posthog?.capture("user_interest_form", { - name: e.target.elements[0].value, - email: e.target.elements[1].value, - }); - dispatch( - setDialogMessage( -
- Thanks! We'll be in touch soon. -
, - ), - ); - }} - style={{ - display: "flex", - flexDirection: "column", - gap: "10px", - }} - > - - - -
-
, - ), - ); + dispatch(setDialogMessage()); dispatch(setDialogEntryOn(false)); dispatch(setShowDialog(true)); } @@ -295,9 +266,59 @@ export function Chat() { setLocalStorage("mainTextEntryCounter", 1); } }, - [messages, defaultModel, streamResponse], + [history, defaultModel, streamResponse], ); + async function handleSingleRangeEdit( + editorState: JSONContent, + modifiers: InputModifiers, + editor: Editor, + ) { + const [contextItems, __, userInstructions] = await resolveEditorContent( + editorState, + { + noContext: true, + useCodebase: false, + }, + ideMessenger, + [], + dispatch, + ); + + const prompt = [ + ...contextItems.map((item) => item.content), + stripImages(userInstructions), + ].join("\n\n"); + + ideMessenger.post("edit/sendPrompt", { + prompt, + range: codeToEdit[0] as RangeInFileWithContents, + }); + + dispatch(submitEdit(prompt)); + editor.commands.selectTextblockEnd(); + } + + async function sendEditInput( + editorState: JSONContent, + modifiers: InputModifiers, + editor: Editor, + ) { + if (isSingleRangeEdit) { + handleSingleRangeEdit(editorState, modifiers, editor); + } else { + const promptPreamble = getMultifileEditPrompt(codeToEdit); + + dispatch( + streamResponseThunk({ + editorState, + modifiers, + promptPreamble, + }), + ); + } + } + useWebviewListener( "newSession", async () => { @@ -309,11 +330,11 @@ export function Chat() { const isLastUserInput = useCallback( (index: number): boolean => { - return !messages + return !history .slice(index + 1) .some((entry) => entry.message.role === "user"); }, - [messages], + [history], ); const showScrollbar = showChatScrollbar || window.innerHeight > 5000; @@ -323,15 +344,15 @@ export function Chat() { {widget} 0 ? "flex-1" : ""}`} + className={`overflow-y-scroll pt-[8px] ${showScrollbar ? "thin-scrollbar" : "no-scrollbar"} ${history.length > 0 ? "flex-1" : ""}`} onScroll={handleScroll} > {highlights} - {messages.map((item, index: number) => ( + {history.map((item, index: number) => (
{item.message.role === "user" ? ( - { - dispatch( - streamResponseThunk({ editorState, modifiers, index }), - ); - }} - isLastUserInput={isLastUserInput(index)} - isMainInput={false} - editorState={item.editorState} - contextItems={item.contextItems} - /> + <> + {isInEditMode && } + { + dispatch( + streamResponseThunk({ editorState, modifiers, index }), + ); + }} + isLastUserInput={isLastUserInput(index)} + isMainInput={false} + editorState={item.editorState} + contextItems={item.contextItems} + /> + ) : item.message.role === "tool" ? ( @@ -442,13 +466,22 @@ export function Chat() {
{toolCallState?.status === "generated" && } - { - sendInput(editorContent, modifiers); - }} - /> + + {history.length === 0 && isInEditMode && } + + {isInEditMode && history.length > 0 ? null : ( + { + isInEditMode + ? sendEditInput(editorContent, modifiers, editor) + : sendChatInput(editorContent, modifiers); + }} + /> + )} +
- {messages.length === 0 && getLastSessionId() ? ( + {history.length === 0 && + getLastSessionId() && + !hasPendingApplies ? (
{ loadLastSession().catch((e) => console.error(`Failed to load last session: ${e}`), ); + + if (isInEditMode) { + dispatch(completeEdit()); + } }} className="flex items-center gap-2" > - Last Session + {returnToLastSessinButtonText}
) : null} @@ -475,7 +514,20 @@ export function Chat() {
- {messages.length === 0 && ( + {hasPendingApplies && isSingleRangeEdit && ( + { + dispatch(clearCodeToEdit()); + dispatch(setMode("chat")); + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + }} + /> + )} + + {history.length === 0 && ( <> {onboardingCard.show && (
@@ -493,7 +545,7 @@ export function Chat() {
diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 5166648cb..592ad1232 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -17,6 +17,7 @@ import { CodeToEdit, ToolCall, ContextItem, + MessageModes, } from "core"; import { incrementalParseJson } from "core/util/incrementalParseJson"; import { renderChatMessage } from "core/util/messageContent"; @@ -42,6 +43,7 @@ type SessionState = { curCheckpointIndex: number; mainEditorContent?: JSONContent; symbols: FileSymbolMap; + mode: MessageModes; codeBlockApplyStates: { states: ApplyState[]; curIndex: number; @@ -52,7 +54,9 @@ function isCodeToEditEqual(a: CodeToEdit, b: CodeToEdit) { return a.filepath === b.filepath && a.contents === b.contents; } -function getDefaultMessage(): ChatHistoryItemWithMessageId { +function getBaseHistoryItem( + lastHistoryItem?: ChatHistoryItemWithMessageId, +): ChatHistoryItemWithMessageId { return { message: { id: uuidv4(), @@ -60,7 +64,7 @@ function getDefaultMessage(): ChatHistoryItemWithMessageId { content: "", }, contextItems: [], - mode: "chat", + mode: lastHistoryItem?.mode ?? "chat", isGatheringContext: false, checkpoint: {}, isBeforeCheckpoint: false, @@ -77,6 +81,7 @@ const initialState: SessionState = { streamAborter: new AbortController(), codeToEdit: [], symbols: {}, + mode: "chat", codeBlockApplyStates: { states: [], curIndex: 0, @@ -150,6 +155,7 @@ export const sessionSlice = createSlice({ }>, ) => { const historyItem = state.history[payload.index]; + const lastHistoryItem = state.history[payload.index - 1]; if (!historyItem) { return; @@ -161,7 +167,7 @@ export const sessionSlice = createSlice({ // Cut off history after the resubmitted message state.history = state.history .slice(0, payload.index + 1) - .concat(getDefaultMessage()); + .concat(getBaseHistoryItem(lastHistoryItem)); state.isStreaming = true; }, @@ -177,15 +183,22 @@ export const sessionSlice = createSlice({ editorState: JSONContent; }>, ) => { + const lastHistoryItem = state.history.at(-1); + const baseHistoryItem = getBaseHistoryItem(lastHistoryItem); + state.history.push({ - ...getDefaultMessage(), - message: { role: "user", ...getDefaultMessage().message }, + ...baseHistoryItem, + message: { ...baseHistoryItem.message, id: uuidv4(), role: "user" }, editorState: payload.editorState, }); state.history.push({ - ...getDefaultMessage(), - message: { role: "assistant", ...getDefaultMessage().message }, + ...baseHistoryItem, + message: { + ...baseHistoryItem.message, + id: uuidv4(), + role: "assistant", + }, editorState: payload.editorState, }); @@ -203,9 +216,12 @@ export const sessionSlice = createSlice({ }>, ) => { if (payload.index >= state.history.length) { + const lastHistoryItem = state.history.at(-1); + const baseHistoryItem = getBaseHistoryItem(lastHistoryItem); + state.history.push({ - ...getDefaultMessage(), - message: { ...getDefaultMessage().message, ...payload.message }, + ...baseHistoryItem, + message: { ...baseHistoryItem.message, ...payload.message }, editorState: { type: "doc", content: renderChatMessage(payload.message) @@ -270,10 +286,13 @@ export const sessionSlice = createSlice({ action.payload.role === "assistant" && action.payload.toolCalls?.length)) ) { + const lastHistoryItem = state.history.at(-1); + const baseHistoryItem = getBaseHistoryItem(lastHistoryItem); + // Create a new message const historyItem: ChatHistoryItemWithMessageId = { - contextItems: [], - message: { id: uuidv4(), ...action.payload }, + ...baseHistoryItem, + message: { ...baseHistoryItem.message, ...action.payload }, }; if (action.payload.role === "assistant" && action.payload.toolCalls) { @@ -475,11 +494,17 @@ export const sessionSlice = createSlice({ toolCallState.status = "calling"; }, + setMode: (state, action: PayloadAction) => { + state.mode = action.payload; + }, }, selectors: { selectIsGatheringContext: (state) => { - const curMessage = state.history.at(-1); - return curMessage?.isGatheringContext || false; + const curHistoryItem = state.history.at(-1); + return curHistoryItem?.isGatheringContext || false; + }, + selectIsInEditMode: (state) => { + return state.mode === "edit"; }, }, extraReducers: (builder) => { @@ -547,8 +572,10 @@ export const { acceptToolCall, setToolGenerated, setToolCallOutput, + setMode, } = sessionSlice.actions; -export const { selectIsGatheringContext } = sessionSlice.selectors; +export const { selectIsGatheringContext, selectIsInEditMode } = + sessionSlice.selectors; export default sessionSlice.reducer; diff --git a/gui/src/redux/thunks/completeEdit.ts b/gui/src/redux/thunks/completeEdit.ts new file mode 100644 index 000000000..57aee7c03 --- /dev/null +++ b/gui/src/redux/thunks/completeEdit.ts @@ -0,0 +1,26 @@ +import { createAsyncThunk } from "@reduxjs/toolkit"; +import { + clearCodeToEdit, + selectIsInEditMode, + setMode, +} from "../slices/sessionSlice"; +import { ThunkApiType } from "../store"; +import { setEditDone } from "../slices/editModeState"; + +export const completeEdit = createAsyncThunk( + "edit/complete", + async (_, { dispatch, extra, getState }) => { + const state = getState(); + const isInEditMode = selectIsInEditMode(state); + + if (!isInEditMode) { + return; + } + + dispatch(setMode("chat")); + dispatch(clearCodeToEdit()); + setEditDone(); + + extra.ideMessenger.post("edit/escape", undefined); + }, +); diff --git a/gui/src/pages/edit/getMultifileEditPrompt.ts b/gui/src/util/getMultifileEditPrompt.ts similarity index 100% rename from gui/src/pages/edit/getMultifileEditPrompt.ts rename to gui/src/util/getMultifileEditPrompt.ts From badeb1c88b7e1f8eb711a8a2cfc8f341ac22f67e Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 10:38:17 -0600 Subject: [PATCH 011/113] fix: selector for `isSingleRangeEdit` --- .../CodeToEditCard/CodeToEditListItem.tsx | 11 +++++--- gui/src/components/Layout.tsx | 25 ++++++------------- .../StepContainer/AcceptRejectAllButtons.tsx | 10 ++++---- gui/src/pages/gui/Chat.tsx | 10 +++----- gui/src/redux/slices/sessionSlice.ts | 14 +++++++++-- gui/src/redux/thunks/index.ts | 8 ++++++ 6 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 gui/src/redux/thunks/index.ts diff --git a/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx b/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx index 7627ce5c7..59f630c9a 100644 --- a/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx +++ b/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx @@ -69,11 +69,11 @@ export default function CodeToEditListItem({
-
+
-
+
{ e.stopPropagation(); onClickFilename(code); @@ -81,11 +81,14 @@ export default function CodeToEditListItem({ > {title} - + + {" "} + {/* Added flex-grow */} {fileSubpath}
+
{showCodeSnippet ? ( diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index ae264fef0..35ddea331 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -1,22 +1,16 @@ import { useEffect, useMemo } from "react"; -import { useDispatch } from "react-redux"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; import styled from "styled-components"; import { CustomScrollbarDiv, defaultBorderRadius } from "."; import { LastSessionProvider } from "../context/LastSessionContext"; import { useWebviewListener } from "../hooks/useWebviewListener"; -import { useAppSelector } from "../redux/hooks"; -import { - setEditDone, - setEditStatus, - focusEdit, -} from "../redux/slices/editModeState"; +import { useAppDispatch, useAppSelector } from "../redux/hooks"; +import { setEditStatus, focusEdit } from "../redux/slices/editModeState"; import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; import { addCodeToEdit, updateApplyState, setMode, - clearCodeToEdit, } from "../redux/slices/sessionSlice"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; import { getLocalStorage, setLocalStorage } from "../util/localStorage"; @@ -28,6 +22,7 @@ import PostHogPageView from "./PosthogPageView"; import AccountDialog from "./AccountDialog"; import { AuthProvider } from "../context/Auth"; import useHistory from "../hooks/useHistory"; +import { completeEdit } from "../redux/thunks"; const LayoutTopDiv = styled(CustomScrollbarDiv)` height: 100%; @@ -56,7 +51,7 @@ const GridDiv = styled.div` const Layout = () => { const navigate = useNavigate(); const location = useLocation(); - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const onboardingCard = useOnboardingCard(); const { pathname } = useLocation(); const { saveSession } = useHistory(dispatch); @@ -194,15 +189,9 @@ const Layout = () => { [], ); - useWebviewListener( - "exitEditMode", - async () => { - dispatch(setEditDone()); - dispatch(setMode("chat")); - dispatch(clearCodeToEdit()); - }, - [navigate], - ); + useWebviewListener("exitEditMode", async () => { + dispatch(completeEdit()); + }); useEffect(() => { const handleKeyDown = (event: any) => { diff --git a/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx b/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx index 632468a65..bc287c5c2 100644 --- a/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx +++ b/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx @@ -3,6 +3,8 @@ import { IdeMessengerContext } from "../../context/IdeMessenger"; import { CheckIcon, XMarkIcon } from "@heroicons/react/24/outline"; import { ApplyState } from "core"; import { getMetaKeyLabel } from "../../util"; +import { useAppSelector } from "../../redux/hooks"; +import { selectIsSingleRangeEdit } from "../../redux/slices/sessionSlice"; export interface AcceptRejectAllButtonsProps { pendingApplyStates: ApplyState[]; @@ -14,9 +16,7 @@ export default function AcceptRejectAllButtons({ onAcceptOrReject, }: AcceptRejectAllButtonsProps) { const ideMessenger = useContext(IdeMessengerContext); - - // To handle the case of a single-range edit - const hasSinglePendingApplyStates = pendingApplyStates.length === 1; + const isSingleRangeEdit = useAppSelector(selectIsSingleRangeEdit); async function handleAcceptOrReject(status: "acceptDiff" | "rejectDiff") { for (const { filepath, streamId } of pendingApplyStates) { @@ -37,7 +37,7 @@ export default function AcceptRejectAllButtons({ onClick={() => handleAcceptOrReject("rejectDiff")} > - {hasSinglePendingApplyStates ? ( + {isSingleRangeEdit ? ( Reject ({getMetaKeyLabel()}⇧⌫) ) : ( <> @@ -52,7 +52,7 @@ export default function AcceptRejectAllButtons({ onClick={() => handleAcceptOrReject("acceptDiff")} > - {hasSinglePendingApplyStates ? ( + {isSingleRangeEdit ? ( Accept ({getMetaKeyLabel()}⇧⏎) ) : ( <> diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 7b871ec0e..aae4bd80a 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -40,6 +40,7 @@ import { clearLastEmptyResponse, newSession, selectIsInEditMode, + selectIsSingleRangeEdit, setInactive, setMode, } from "../../redux/slices/sessionSlice"; @@ -160,6 +161,7 @@ export function Chat() { ); const hasPendingApplies = pendingApplyStates.length > 0; const isInEditMode = useAppSelector(selectIsInEditMode); + const isSingleRangeEdit = useAppSelector(selectIsSingleRangeEdit); const snapToBottom = useCallback(() => { if (!stepsDivRef.current) return; @@ -184,10 +186,6 @@ export function Chat() { ? "Back to Chat" : "Last Session"; - const isSingleRangeEdit = - codeToEdit.length === 0 || - (codeToEdit.length === 1 && "range" in codeToEdit[0]); - useEffect(() => { if (active) snapToBottom(); }, [active, snapToBottom]); @@ -518,11 +516,11 @@ export function Chat() { { - dispatch(clearCodeToEdit()); - dispatch(setMode("chat")); loadLastSession().catch((e) => console.error(`Failed to load last session: ${e}`), ); + + dispatch(completeEdit()); }} /> )} diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 592ad1232..f11f58dcb 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -506,6 +506,13 @@ export const sessionSlice = createSlice({ selectIsInEditMode: (state) => { return state.mode === "edit"; }, + selectIsSingleRangeEdit: (state) => { + return ( + state.mode === "edit" && + (state.codeToEdit.length === 0 || + (state.codeToEdit.length === 1 && "range" in state.codeToEdit[0])) + ); + }, }, extraReducers: (builder) => { addPassthroughCases(builder, [streamResponseThunk]); @@ -575,7 +582,10 @@ export const { setMode, } = sessionSlice.actions; -export const { selectIsGatheringContext, selectIsInEditMode } = - sessionSlice.selectors; +export const { + selectIsGatheringContext, + selectIsInEditMode, + selectIsSingleRangeEdit, +} = sessionSlice.selectors; export default sessionSlice.reducer; diff --git a/gui/src/redux/thunks/index.ts b/gui/src/redux/thunks/index.ts new file mode 100644 index 000000000..fda8d375d --- /dev/null +++ b/gui/src/redux/thunks/index.ts @@ -0,0 +1,8 @@ +export { completeEdit } from "./completeEdit"; +export { gatherContext } from "./gatherContext"; +export { handleErrors } from "./handleErrors"; +export { resetStateForNewMessage } from "./resetStateForNewMessage"; +export { streamNormalInput } from "./streamNormalInput"; +export { streamResponseThunk } from "./streamResponse"; +export { streamResponseAfterToolCall } from "./streamResponseAfterToolCall"; +export { streamSlashCommand } from "./streamSlashCommand"; From 1e334008c08eb8796510ba6aaac434073c44b3b8 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 11:08:04 -0600 Subject: [PATCH 012/113] fix: load last session when completing edits --- gui/src/components/Layout.tsx | 18 ++++++++++++++--- gui/src/components/mainInput/TipTapEditor.tsx | 20 ++++++++----------- gui/src/redux/slices/editModeState.ts | 3 --- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 35ddea331..50be235f7 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -11,6 +11,7 @@ import { addCodeToEdit, updateApplyState, setMode, + newSession, } from "../redux/slices/sessionSlice"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; import { getLocalStorage, setLocalStorage } from "../util/localStorage"; @@ -54,7 +55,7 @@ const Layout = () => { const dispatch = useAppDispatch(); const onboardingCard = useOnboardingCard(); const { pathname } = useLocation(); - const { saveSession } = useHistory(dispatch); + const { saveSession, loadLastSession } = useHistory(dispatch); const configError = useAppSelector((state) => state.config.configError); @@ -156,7 +157,7 @@ const Layout = () => { useWebviewListener( "focusEdit", async () => { - saveSession(); + await saveSession(true); dispatch(focusEdit()); dispatch(setMode("edit")); }, @@ -166,7 +167,7 @@ const Layout = () => { useWebviewListener( "focusEditWithoutClear", async () => { - saveSession(); + await saveSession(true); dispatch(focusEdit()); dispatch(setMode("edit")); }, @@ -185,11 +186,22 @@ const Layout = () => { "setEditStatus", async ({ status, fileAfterEdit }) => { dispatch(setEditStatus({ status, fileAfterEdit })); + + if (status === "done") { + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + dispatch(completeEdit()); + } }, [], ); useWebviewListener("exitEditMode", async () => { + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + dispatch(completeEdit()); }); diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 3d54cb7e5..3d20cc7e3 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -24,7 +24,6 @@ import { useRef, useState, } from "react"; -import { useDispatch } from "react-redux"; import styled from "styled-components"; import { v4 } from "uuid"; import { @@ -64,15 +63,14 @@ import { handleVSCMetaKeyIssues, } from "./handleMetaKeyIssues"; import { ComboBoxItem } from "./types"; -import { useAppSelector } from "../../redux/hooks"; +import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { selectDefaultModel } from "../../redux/slices/configSlice"; import { addCodeToEdit, clearCodeToEdit, selectIsInEditMode, - setMode, } from "../../redux/slices/sessionSlice"; -import { setEditDone } from "../../redux/slices/editModeState"; +import { completeEdit } from "../../redux/thunks"; const InputBoxDiv = styled.div<{ border?: string }>` resize: none; @@ -178,7 +176,7 @@ interface TipTapEditorProps { } function TipTapEditor(props: TipTapEditorProps) { - const dispatch = useDispatch(); + const dispatch = useAppDispatch(); const ideMessenger = useContext(IdeMessengerContext); const { getSubmenuContextItems } = useSubmenuContextProviders(); @@ -187,7 +185,7 @@ function TipTapEditor(props: TipTapEditorProps) { const useActiveFile = useAppSelector(selectUseActiveFile); - const { saveSession, loadSession } = useHistory(dispatch); + const { saveSession, loadSession, loadLastSession } = useHistory(dispatch); const posthog = usePostHog(); @@ -422,14 +420,12 @@ function TipTapEditor(props: TipTapEditorProps) { }, Escape: () => { if (isInEditModeRef.current) { - dispatch(setMode("chat")); - dispatch(clearCodeToEdit()); - dispatch(setEditDone()); - ideMessenger.post("edit/escape", undefined); - + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + dispatch(completeEdit()); return true; } - return false; }, ArrowDown: () => { diff --git a/gui/src/redux/slices/editModeState.ts b/gui/src/redux/slices/editModeState.ts index ade24ed1f..b0283a0ab 100644 --- a/gui/src/redux/slices/editModeState.ts +++ b/gui/src/redux/slices/editModeState.ts @@ -5,13 +5,11 @@ export interface EditModeState { editStatus: EditStatus; previousInputs: MessageContent[]; fileAfterEdit?: string; - isInEditMode: boolean; } const initialState: EditModeState = { editStatus: "not-started", previousInputs: [], - isInEditMode: false, }; export const editModeStateSlice = createSlice({ @@ -19,7 +17,6 @@ export const editModeStateSlice = createSlice({ initialState, reducers: { focusEdit: (state) => { - // state.isInEditMode = true; state.editStatus = "not-started"; state.previousInputs = []; state.fileAfterEdit = undefined; From ca06d669154be0abb1ff8303576cb575682c8e26 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 13:23:07 -0600 Subject: [PATCH 013/113] chore: update toolCall typos --- gui/src/components/Layout.tsx | 8 ++-- .../components/StepContainer/EditActions.tsx | 2 - gui/src/redux/thunks/cancelTool.ts | 44 +------------------ 3 files changed, 6 insertions(+), 48 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 50be235f7..20a61d8d9 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -157,21 +157,21 @@ const Layout = () => { useWebviewListener( "focusEdit", async () => { - await saveSession(true); + await saveSession(); dispatch(focusEdit()); dispatch(setMode("edit")); }, - [navigate], + [], ); useWebviewListener( "focusEditWithoutClear", async () => { - await saveSession(true); + await saveSession(); dispatch(focusEdit()); dispatch(setMode("edit")); }, - [navigate], + [], ); useWebviewListener( diff --git a/gui/src/components/StepContainer/EditActions.tsx b/gui/src/components/StepContainer/EditActions.tsx index ebb796f2c..55ebcab20 100644 --- a/gui/src/components/StepContainer/EditActions.tsx +++ b/gui/src/components/StepContainer/EditActions.tsx @@ -6,8 +6,6 @@ import { renderChatMessage } from "core/util/messageContent"; import { CopyIconButton } from "../gui/CopyIconButton"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import useHistory from "../../hooks/useHistory"; -import { useContext } from "react"; -import { IdeMessengerContext } from "../../context/IdeMessenger"; import { completeEdit } from "../../redux/thunks/completeEdit"; export interface EditActionsProps { diff --git a/gui/src/redux/thunks/cancelTool.ts b/gui/src/redux/thunks/cancelTool.ts index 03b0cc8ef..89c4e8e12 100644 --- a/gui/src/redux/thunks/cancelTool.ts +++ b/gui/src/redux/thunks/cancelTool.ts @@ -1,15 +1,11 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall"; -import { - cancelToolCall, - setCalling, - setToolCallOutput, -} from "../slices/sessionSlice"; +import { cancelToolCall } from "../slices/sessionSlice"; import { ThunkApiType } from "../store"; import { streamResponseAfterToolCall } from "./streamResponseAfterToolCall"; export const cancelTool = createAsyncThunk( - "chat/callTool", + "chat/cancelTool", async (_, { dispatch, extra, getState }) => { const state = getState(); const toolCallState = selectCurrentToolCall(state); @@ -40,39 +36,3 @@ export const cancelTool = createAsyncThunk( ); }, ); - -export const callTool = createAsyncThunk( - "chat/callTool", - async (_, { dispatch, extra, getState }) => { - const state = getState(); - const toolCallState = selectCurrentToolCall(state); - - console.log("calling tool", toolCallState.toolCall); - if (!toolCallState) { - return; - } - - if (toolCallState.status !== "generated") { - return; - } - - dispatch(setCalling()); - - const result = await extra.ideMessenger.request("tools/call", { - toolCall: toolCallState.toolCall, - }); - - if (result.status === "success") { - const contextItems = result.content.contextItems; - dispatch(setToolCallOutput(contextItems)); - - // Send to the LLM to continue the conversation - dispatch( - streamResponseAfterToolCall({ - toolCallId: toolCallState.toolCall.id, - toolOutput: contextItems, - }), - ); - } - }, -); From 804283e6c7cec50f3f5ca12f068759ef11991077 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 13:24:33 -0600 Subject: [PATCH 014/113] chore: remove console.log --- gui/src/components/markdown/StyledMarkdownPreview.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index 38f2cebbc..70be76bdc 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -222,8 +222,6 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( const language = getLanuageFromClassName(className); - console.log({ language }); - // If we don't have a filepath show the more basic toolbar // that is just action buttons on hover. // We also use this in JB since we haven't yet implemented From 83a20d7f8bfae923582e51caf76ab53c4eeeaaf3 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 13:29:59 -0600 Subject: [PATCH 015/113] Update CodeToEditListItem.tsx --- .../CodeToEditCard/CodeToEditListItem.tsx | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx b/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx index 59f630c9a..b457d3a69 100644 --- a/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx +++ b/gui/src/components/CodeToEditCard/CodeToEditListItem.tsx @@ -16,7 +16,6 @@ export interface CodeToEditListItemProps { onClickFilename: (codeToEdit: CodeToEdit) => void; } -// Easiest method to overwrite the top level styling of the markdown preview const NoPaddingWrapper = styled.div` > * { margin: 0 !important; @@ -67,7 +66,7 @@ export default function CodeToEditListItem({ onClick={() => setShowCodeSnippet((showCodeSnippet) => !showCodeSnippet)} >
@@ -82,22 +81,20 @@ export default function CodeToEditListItem({ {title} - {" "} - {/* Added flex-grow */} {fileSubpath}
-
-
+
+
{showCodeSnippet ? ( { e.stopPropagation(); setShowCodeSnippet(false); }} - className="text-lightgray hover:bg-lightgray hover:text-vsc-foreground h-3.5 w-3.5 cursor-pointer rounded-md rounded-sm p-0.5 hover:bg-opacity-20" + className="text-lightgray hover:bg-lightgray hover:text-vsc-foreground h-3.5 w-3.5 cursor-pointer rounded-sm p-0.5 hover:bg-opacity-20" /> ) : ( )}
- { - e.stopPropagation(); - onDelete(code); - }} - className="text-lightgray hover:bg-lightgray hover:text-vsc-foreground h-3.5 w-3.5 cursor-pointer rounded-md rounded-sm p-0.5 hover:bg-opacity-20" - /> +
+ { + e.stopPropagation(); + onDelete(code); + }} + className="text-lightgray hover:bg-lightgray hover:text-vsc-foreground h-3.5 w-3.5 cursor-pointer rounded-sm p-0.5 hover:bg-opacity-20" + /> +
From c78c092e1285f430a2898a44920a31517c91e2ee Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 13:43:23 -0600 Subject: [PATCH 016/113] chore: remove mode from msg type --- core/index.d.ts | 1 - gui/src/redux/slices/sessionSlice.ts | 16 +++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/core/index.d.ts b/core/index.d.ts index 34212cfac..bd56170b2 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -414,7 +414,6 @@ export interface ChatHistoryItem { modifiers?: InputModifiers; promptLogs?: PromptLog[]; toolCallState?: ToolCallState; - mode?: MessageModes; isGatheringContext?: boolean; checkpoint?: Checkpoint; isBeforeCheckpoint?: boolean; diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index f11f58dcb..ef712b7bf 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -54,9 +54,7 @@ function isCodeToEditEqual(a: CodeToEdit, b: CodeToEdit) { return a.filepath === b.filepath && a.contents === b.contents; } -function getBaseHistoryItem( - lastHistoryItem?: ChatHistoryItemWithMessageId, -): ChatHistoryItemWithMessageId { +function getBaseHistoryItem(): ChatHistoryItemWithMessageId { return { message: { id: uuidv4(), @@ -64,7 +62,6 @@ function getBaseHistoryItem( content: "", }, contextItems: [], - mode: lastHistoryItem?.mode ?? "chat", isGatheringContext: false, checkpoint: {}, isBeforeCheckpoint: false, @@ -167,7 +164,7 @@ export const sessionSlice = createSlice({ // Cut off history after the resubmitted message state.history = state.history .slice(0, payload.index + 1) - .concat(getBaseHistoryItem(lastHistoryItem)); + .concat(getBaseHistoryItem()); state.isStreaming = true; }, @@ -183,8 +180,7 @@ export const sessionSlice = createSlice({ editorState: JSONContent; }>, ) => { - const lastHistoryItem = state.history.at(-1); - const baseHistoryItem = getBaseHistoryItem(lastHistoryItem); + const baseHistoryItem = getBaseHistoryItem(); state.history.push({ ...baseHistoryItem, @@ -216,8 +212,7 @@ export const sessionSlice = createSlice({ }>, ) => { if (payload.index >= state.history.length) { - const lastHistoryItem = state.history.at(-1); - const baseHistoryItem = getBaseHistoryItem(lastHistoryItem); + const baseHistoryItem = getBaseHistoryItem(); state.history.push({ ...baseHistoryItem, @@ -286,8 +281,7 @@ export const sessionSlice = createSlice({ action.payload.role === "assistant" && action.payload.toolCalls?.length)) ) { - const lastHistoryItem = state.history.at(-1); - const baseHistoryItem = getBaseHistoryItem(lastHistoryItem); + const baseHistoryItem = getBaseHistoryItem(); // Create a new message const historyItem: ChatHistoryItemWithMessageId = { From a2b327fb5863e593552350d07357b940dccdf2bb Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 2 Dec 2024 16:11:49 -0500 Subject: [PATCH 017/113] markdown tables custom remark plugin p1 --- .../markdown/StyledMarkdownPreview.tsx | 5 +- .../components/markdown/markdown-tables.css | 11 + .../markdown/utils/remarkTables.tsx | 233 ++++++++++++++++++ 3 files changed, 247 insertions(+), 2 deletions(-) create mode 100644 gui/src/components/markdown/markdown-tables.css create mode 100644 gui/src/components/markdown/utils/remarkTables.tsx diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index 383891d5c..eee5eb223 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -15,6 +15,7 @@ import { import { getFontSize, isJetBrains } from "../../util"; import "./katex.css"; import "./markdown.css"; +import "./markdown-tables.css"; import { ctxItemToRifWithContents } from "core/commands/util"; import FilenameLink from "./FilenameLink"; import StepContainerPreToolbar from "./StepContainerPreToolbar"; @@ -26,6 +27,7 @@ import { ContextItemWithId, SymbolWithRange } from "core"; import SymbolLink from "./SymbolLink"; import { useSelector } from "react-redux"; import useUpdatingRef from "../../hooks/useUpdatingRef"; +import { remarkTables } from "./utils/remarkTables"; const StyledMarkdown = styled.div<{ fontSize?: number; @@ -177,11 +179,10 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( const [reactContent, setMarkdownSource] = useRemark({ remarkPlugins: [ + // remarkTables, // remarkGfm, remarkMath, () => processCodeBlocks, - // c - //c ], rehypePlugins: [ rehypeKatex as any, diff --git a/gui/src/components/markdown/markdown-tables.css b/gui/src/components/markdown/markdown-tables.css new file mode 100644 index 000000000..e0f80b6db --- /dev/null +++ b/gui/src/components/markdown/markdown-tables.css @@ -0,0 +1,11 @@ +table { + background-color: red; +} + +tr { + color: red; +} + +td { + color: red; +} diff --git a/gui/src/components/markdown/utils/remarkTables.tsx b/gui/src/components/markdown/utils/remarkTables.tsx new file mode 100644 index 000000000..d8e5bc84e --- /dev/null +++ b/gui/src/components/markdown/utils/remarkTables.tsx @@ -0,0 +1,233 @@ +// import { visit } from "unist-util-visit"; + +// // const markdownTableRegex = /(\|.+?\|)(\n\|(?:[-:]+?\|)+)(\n\|.+?\|)+/gm; +// const tableRegex = /(\|(?:[^\|]*\|)+(\s*\n\s*\|(?:[^\|]*\|)+)*\s*(\n|\r|\r\n)?\|(?:[-:\s]*\|)+(\s*\n\s*\|(?:[^\|]*\|)+)*)/g; + +// const parseMarkdownTable = (markdown) => { +// const rows = markdown.trim().split("\n"); +// const header = rows[0] +// .split("|") +// .slice(1, -1) +// .map((cell) => cell.trim()); +// const alignments = rows[1] +// .split("|") +// .slice(1, -1) +// .map((cell) => { +// if (cell.startsWith(":") && cell.endsWith(":")) return "center"; +// if (cell.startsWith(":")) return "left"; +// if (cell.endsWith(":")) return "right"; +// return null; +// }); +// const bodyRows = rows.slice(2).map((row) => +// row +// .split("|") +// .slice(1, -1) +// .map((cell) => cell.trim()), +// ); + +// return { header, alignments, bodyRows }; +// }; + +// const renderTable = ({ header, alignments, bodyRows }) => ( +// +// +// +// {header.map((cell, index) => ( +// +// ))} +// +// +// +// {bodyRows.map((row, rowIndex) => ( +// +// {row.map((cell, cellIndex) => ( +// +// ))} +// +// ))} +// +//
+// {cell} +//
+// {cell} +//
+// ); + +// export function remarkTables() { +// return (tree) => { +// visit(tree, "text", (node, index, parent) => { +// if (!node.value) return; + +// const matches = [...node.value.matchAll(markdownTableRegex)]; +// console.log("MATCHES", matches); +// if (matches.length === 0) return; + +// const fragments = []; +// let lastIndex = 0; + +// matches.forEach((match, idx) => { +// const [fullMatch] = match; +// const matchStart = match.index; +// const matchEnd = matchStart + fullMatch.length; + +// // Add text before the table +// if (matchStart > lastIndex) { +// fragments.push(node.value.slice(lastIndex, matchStart)); +// } + +// // Parse and render the markdown table +// const table = parseMarkdownTable(fullMatch); +// fragments.push(renderTable(table)); + +// lastIndex = matchEnd; +// }); + +// // Add remaining text after the last table +// if (lastIndex < node.value.length) { +// fragments.push(node.value.slice(lastIndex)); +// } + +// // Replace the parent node with a fragment containing the new nodes +// if (parent && parent.children) { +// parent.children.splice(index, 1, ...fragments); +// } +// }); +// }; +// } + +const visit = require("unist-util-visit"); + +export function remarkTables() { + return (tree) => { + visit(tree, "text", (node, index, parent) => { + const { value } = node; + // Inspired by + // https://stackoverflow.com/questions/9837935/regex-for-markdown-table-syntax + const tableRegex = + /^(\|[^\n]+\|(?:\r?\n| ))((?:\|:?[-]+:?)+\|)((?:\r?\n| )(?:\|[^\n]+\|(?:\r?\n| ))*)?$/gm; + let match; + let lastIndex = 0; + const newNodes = []; + + while ((match = tableRegex.exec(value)) !== null) { + console.log(match); + const tableText = match[0]; + + // Add any text before the table as a text node + if (match.index > lastIndex) { + newNodes.push({ + type: "text", + value: value.slice(lastIndex, match.index), + }); + } + + const tableNode = parseTable(tableText); + if (tableNode) { + newNodes.push(tableNode); + } else { + // If parsing failed, keep the original text + newNodes.push({ + type: "text", + value: tableText, + }); + } + + lastIndex = tableRegex.lastIndex; + } + + // Add any remaining text after the last table + if (lastIndex < value.length) { + newNodes.push({ + type: "text", + value: value.slice(lastIndex), + }); + } + + // Replace the original text node with the new nodes + if (newNodes.length > 0) { + parent.children.splice(index, 1, ...newNodes); + } + }); + }; +} + +// The parseTable function remains the same as before +function parseTable(tableText) { + const lines = tableText.trim().split(/\r?\n/); + + if (lines.length < 2) return null; // Not enough lines for a valid table + + const header = splitRow(lines[0]); + const separator = splitRow(lines[1]); + + // Validate the separator line + if (!separator.every((cell) => /^:?-+:?$/.test(cell.trim()))) { + return null; + } + + const alignments = separator.map((cell) => { + const trimmed = cell.trim(); + if (trimmed.startsWith(":") && trimmed.endsWith(":")) return "center"; + if (trimmed.endsWith(":")) return "right"; + if (trimmed.startsWith(":")) return "left"; + return null; + }); + + const tableNode = { + type: "element", + tagName: "table", + children: [ + { + type: "element", + tagName: "thead", + children: [ + { + type: "element", + tagName: "tr", + children: header.map((cell, i) => ({ + type: "element", + tagName: "th", + properties: { + align: alignments[i] || "left", + className: "text-" + alignments[i], + }, + children: [{ type: "text", value: cell.trim() }], + })), + }, + ], + }, + { + type: "element", + tagName: "tbody", + children: lines.slice(2).map((line) => { + const cells = splitRow(line); + return { + type: "element", + tagName: "tr", + children: cells.map((cell, i) => ({ + type: "element", + tagName: "td", + properties: { + align: alignments[i] || "left", + className: "text-" + alignments[i], + }, + children: [{ type: "text", value: cell.trim() }], + })), + }; + }), + }, + ], + }; + + return tableNode; +} + +function splitRow(row) { + return row + .trim() + .replace(/^\||\|$/g, "") // Remove leading and trailing pipes + .split("|"); +} From 68f3234fea48bda8b832a3f342b13648076f5591 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 2 Dec 2024 14:11:57 -0800 Subject: [PATCH 018/113] support predicted outputs for other models --- core/llm/llms/OpenAI.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index ed9810932..1ac63f8af 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -105,7 +105,8 @@ class OpenAI extends BaseLLM { } protected supportsPrediction(model: string): boolean { - return ["gpt-4o-mini", "gpt-4o"].includes(model); + const SUPPORTED_MODELS = ["gpt-4o-mini", "gpt-4o", "mistral-large"]; + return SUPPORTED_MODELS.some((m) => model.includes(m)); } private convertTool(tool: Tool): any { From 47f3d1e9bcc38c82adb77631bd86821c288b2a37 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 2 Dec 2024 19:26:55 -0500 Subject: [PATCH 019/113] latex truncation fix cleanup --- .../markdown/utils/fixDoubleDollarLatex.ts | 2 +- .../utils/fixDoubleDollarLatext.test.ts | 124 ------------------ 2 files changed, 1 insertion(+), 125 deletions(-) delete mode 100644 gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts diff --git a/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts b/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts index 53c110553..98b09f596 100644 --- a/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts +++ b/gui/src/components/markdown/utils/fixDoubleDollarLatex.ts @@ -1,5 +1,6 @@ /* Currently double dollar latext with new lines causes truncation error +So this pseudo-remark plugin removes internal newlines with double dollar signs */ export function fixDoubleDollarNewLineLatex(text: string): string { // Match LaTeX blocks delimited by $$ with newlines @@ -8,6 +9,5 @@ export function fixDoubleDollarNewLineLatex(text: string): string { // Replace each matched block with $$ without newline const replacedText = text.replace(pattern, "$$$$$1$$$$"); - console.log("RESULT", replacedText); return replacedText; } diff --git a/gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts b/gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts deleted file mode 100644 index c3c932657..000000000 --- a/gui/src/components/markdown/utils/fixDoubleDollarLatext.test.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { fixDoubleDollarNewLineLatex } from "./fixDoubleDollarLatex"; // Adjust the import based on your file structure - -/* - These tests are generated by claude sonnet, audit if failing. -*/ -describe("fixDoubleDollarNewLineLatex", () => { - it("replaces newlined $$ delimiters for a single LaTeX block", () => { - const input = ` - Here is some text. - - $$ - f(x) = ax^2 + bx + c - $$ - - End of text. - `; - const expectedOutput = ` - Here is some text. - - $$f(x) = ax^2 + bx + c$$ - - End of text. - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("does not modify text without LaTeX blocks", () => { - const input = ` - This is a simple text block. - `; - const expectedOutput = ` - This is a simple text block. - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("does not replace single $ delimiters", () => { - const input = ` - Price is $100. - `; - const expectedOutput = ` - Price is $100. - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("processes multiple LaTeX blocks separately", () => { - const input = ` - $$\nE = mc^2\n$$ - - Some text. - - $$\na^2 + b^2 = c^2\n$$ - `; - const expectedOutput = ` - $$E = mc^2$$ - - Some text. - - $$a^2 + b^2 = c^2$$ - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("leaves inline $$ delimiters untouched", () => { - const input = ` - You earned $$1,000 today. - `; - const expectedOutput = ` - You earned $$1,000 today. - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("handles no LaTeX correctly", () => { - const input = `Just a regular string, nothing fancy.`; - const expectedOutput = `Just a regular string, nothing fancy.`; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("ignores malformed LaTeX that lacks newlines", () => { - const input = ` - $$f(x) = ax^2 + bx + c$$ - `; - const expectedOutput = ` - $$f(x) = ax^2 + bx + c$$ - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("keeps text spacing unchanged except for newline removal", () => { - const input = ` - Start - - $$\nA = \pi r^2\n$$ - - End - `; - const expectedOutput = ` - Start - - $$A = \pi r^2$$ - - End - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("works with a completely empty string", () => { - const input = ""; - const expectedOutput = ""; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); - - it("ignores non-matching but similar text", () => { - const input = ` - Look at this: $$$Profit$$$ - `; - const expectedOutput = ` - Look at this: $$$Profit$$$ - `; - expect(fixDoubleDollarNewLineLatex(input)).toBe(expectedOutput); - }); -}); From 7c45b5bda4dd8f6e5c6211a2e81a5e930d3b41b6 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 19:36:07 -0600 Subject: [PATCH 020/113] Update Chat.tsx --- gui/src/pages/gui/Chat.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index aae4bd80a..7783af72b 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -322,6 +322,7 @@ export function Chat() { async () => { saveSession(); mainTextInputRef.current?.focus?.(); + dispatch(setMode("chat")); }, [saveSession], ); From 6cd6d62a9599cff0025b86725369e80554aa0523 Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 2 Dec 2024 19:51:04 -0600 Subject: [PATCH 021/113] Update Chat.tsx --- gui/src/pages/gui/Chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 7783af72b..8630c5427 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -322,7 +322,7 @@ export function Chat() { async () => { saveSession(); mainTextInputRef.current?.focus?.(); - dispatch(setMode("chat")); + dispatch(completeEdit()); }, [saveSession], ); From 288b129753bd910c13a13ba5e8c539c153da57e2 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 2 Dec 2024 21:16:01 -0800 Subject: [PATCH 022/113] include unstaged by default --- core/commands/slash/commit.ts | 2 +- core/config/promptFile.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/commands/slash/commit.ts b/core/commands/slash/commit.ts index 8fc1ae27b..c2d09adba 100644 --- a/core/commands/slash/commit.ts +++ b/core/commands/slash/commit.ts @@ -5,7 +5,7 @@ const CommitMessageCommand: SlashCommand = { name: "commit", description: "Generate a commit message for current changes", run: async function* ({ ide, llm, params }) { - const includeUnstaged = params?.includeUnstaged ?? false; + const includeUnstaged = params?.includeUnstaged ?? true; const diff = await ide.getDiff(includeUnstaged); if (diff.length === 0) { diff --git a/core/config/promptFile.ts b/core/config/promptFile.ts index 5020fc112..de17a7120 100644 --- a/core/config/promptFile.ts +++ b/core/config/promptFile.ts @@ -173,7 +173,7 @@ async function renderPrompt( const helpers = getContextProviderHelpers(context); // A few context providers that don't need to be in config.json to work in .prompt files - const diff = await context.ide.getDiff(false); + const diff = await context.ide.getDiff(true); const currentFile = await context.ide.getCurrentFile(); const inputData: Record = { diff: diff.join("\n"), From 34ca668d54364454821589719fc686b48aad8acb Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 3 Dec 2024 00:28:47 -0500 Subject: [PATCH 023/113] markdown tables: regex tinkering --- .../markdown/StyledMarkdownPreview.tsx | 2 +- .../markdown/utils/remarkTables.tsx | 20 ++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index eee5eb223..6df96df05 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -180,7 +180,7 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( const [reactContent, setMarkdownSource] = useRemark({ remarkPlugins: [ // remarkTables, - // remarkGfm, + remarkGfm, remarkMath, () => processCodeBlocks, ], diff --git a/gui/src/components/markdown/utils/remarkTables.tsx b/gui/src/components/markdown/utils/remarkTables.tsx index d8e5bc84e..797e9ed08 100644 --- a/gui/src/components/markdown/utils/remarkTables.tsx +++ b/gui/src/components/markdown/utils/remarkTables.tsx @@ -98,22 +98,35 @@ // }; // } -const visit = require("unist-util-visit"); +import { visit } from "unist-util-visit"; export function remarkTables() { return (tree) => { visit(tree, "text", (node, index, parent) => { const { value } = node; + // console.log("NODE", value); // Inspired by // https://stackoverflow.com/questions/9837935/regex-for-markdown-table-syntax const tableRegex = - /^(\|[^\n]+\|(?:\r?\n| ))((?:\|:?[-]+:?)+\|)((?:\r?\n| )(?:\|[^\n]+\|(?:\r?\n| ))*)?$/gm; - let match; + /((?:\| *[^|\n]+ *)+\|)(?:\r?\n)((?:\|[ :]?-+[ :]?)+\|)((?:(?:\r?\n)(?:\| *[^|\r\n]+ *)+\|)+)/g; + // /((?:\| *[^|\r\n]+ *)+\|)(?:\r?\n)((?:\|:?-+:?)+\|)((?:(?:\r?\n)(?:\| *[^|\r\n]+ *)+\|)+)/g; + // /((?:\| +[A-Za-z0-9 -_*#@$%:;?!.,\/\\]+ +)+\|)(?:\r?\n| )?((?:\|:?-+:?)+\|)((?:(?:\r?\n| )?(?:\| +[A-Za-z0-9 -_*#@$%:;?!.,\/\\^~]+ +)+\|)+)/g; // accepts space or nothing as separator between + // should probably change the (?:\r?\n| )? groups to (?:\r?\n) + // consider limiting table cells to chars e.g. A-Za-z0-9 -_*#@$%:;?!.,\/\\^~`{} + // /^(\|[^\n]+\|(?:\r?\n| ))((?:\|:?[-]+:?)+\|)((?:\r?\n| )(?:\|[^\n]+\|(?:\r?\n| ))*)?$/gm; + + let match: RegExpExecArray | null; let lastIndex = 0; const newNodes = []; + const matches = tableRegex.exec(value); //value.match(tableRegex); + // console.log("MATCHES FOR\n\n" + value, matches); + while ((match = tableRegex.exec(value)) !== null) { + // if(match.groups === 3){ console.log(match); + + // } const tableText = match[0]; // Add any text before the table as a text node @@ -156,6 +169,7 @@ export function remarkTables() { // The parseTable function remains the same as before function parseTable(tableText) { + // const header = tableText; const lines = tableText.trim().split(/\r?\n/); if (lines.length < 2) return null; // Not enough lines for a valid table From 78a0927b9c1771d683fa585aa7b31be53a3454f8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 3 Dec 2024 00:45:30 -0500 Subject: [PATCH 024/113] eslint package version --- gui/package-lock.json | 694 +++++++----------------------------------- gui/package.json | 2 +- 2 files changed, 118 insertions(+), 578 deletions(-) diff --git a/gui/package-lock.json b/gui/package-lock.json index 0e6075e35..91410e6df 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -83,7 +83,7 @@ "@vitest/coverage-v8": "^2.1.3", "@vitest/ui": "^2.1.3", "autoprefixer": "^10.4.13", - "eslint": "^9.15.0", + "eslint": "^8", "eslint-plugin-react": "^7.37.2", "eslint-plugin-strict-null-checks": "^0.1.3", "jsdom": "^25.0.1", @@ -972,61 +972,16 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint/config-array": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", - "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", - "dev": true, - "dependencies": { - "@eslint/object-schema": "^2.1.4", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/core": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", - "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", + "espree": "^9.6.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -1034,7 +989,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1067,12 +1022,15 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=18" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1097,33 +1055,12 @@ } }, "node_modules/@eslint/js": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", - "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", - "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", - "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", - "dev": true, - "dependencies": { - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@floating-ui/core": { @@ -1172,48 +1109,12 @@ "react": ">= 16" } }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, - "peer": true, "dependencies": { "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", @@ -1228,7 +1129,6 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1239,7 +1139,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1265,21 +1164,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "peer": true - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } + "dev": true }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -5143,62 +5028,59 @@ } }, "node_modules/eslint": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", - "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.15.0", - "@eslint/plugin-kit": "^0.2.3", - "@humanfs/node": "^0.16.6", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.5", + "cross-spawn": "^7.0.2", "debug": "^4.3.2", + "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", - "esquery": "^1.5.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", + "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-plugin-react": { @@ -5296,40 +5178,6 @@ "typescript": ">=3.9.4" } }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "peer": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/eslint-plugin-strict-null-checks/node_modules/@typescript-eslint/eslint-plugin": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", @@ -5537,172 +5385,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "peer": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/eslint-plugin-strict-null-checks/node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -5737,12 +5419,11 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/eslint/node_modules/eslint-scope": { + "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -5754,189 +5435,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "peer": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "peer": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "peer": true - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "peer": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint-plugin-strict-null-checks/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/eslint-visitor-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", @@ -6038,6 +5536,30 @@ "node": ">= 8" } }, + "node_modules/eslint/node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -6050,6 +5572,21 @@ "node": ">=10.13.0" } }, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6135,17 +5672,29 @@ } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6336,15 +5885,15 @@ "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==" }, "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "flat-cache": "^4.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=16.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/file-type": { @@ -6437,16 +5986,17 @@ } }, "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.4" + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=16" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { @@ -6603,8 +6153,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -7585,7 +7134,6 @@ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "peer": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -7918,7 +7466,6 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -9761,7 +9308,6 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -11421,7 +10967,6 @@ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "peer": true, "dependencies": { "glob": "^7.1.3" }, @@ -11437,7 +10982,6 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -11449,7 +10993,6 @@ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "peer": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -11470,7 +11013,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -12313,8 +11855,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/thenify": { "version": "3.3.1", @@ -12614,7 +12155,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, diff --git a/gui/package.json b/gui/package.json index 5d233766e..b5e16103d 100644 --- a/gui/package.json +++ b/gui/package.json @@ -91,7 +91,7 @@ "@vitest/coverage-v8": "^2.1.3", "@vitest/ui": "^2.1.3", "autoprefixer": "^10.4.13", - "eslint": "^9.15.0", + "eslint": "^8", "eslint-plugin-react": "^7.37.2", "eslint-plugin-strict-null-checks": "^0.1.3", "jsdom": "^25.0.1", From 4616f0ecd7c9ce42464a47f1668cf94fd1d2b6bf Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 3 Dec 2024 01:07:52 -0500 Subject: [PATCH 025/113] remove pre on error page --- gui/src/pages/error.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/src/pages/error.tsx b/gui/src/pages/error.tsx index 6e83f0c22..96171886a 100644 --- a/gui/src/pages/error.tsx +++ b/gui/src/pages/error.tsx @@ -31,12 +31,12 @@ const ErrorPage: React.FC = () => { }, 500); }, []); return ( -
+

Error in Continue UI

-
-        {error.statusText || error.message}
-      
+ + {error.statusText || error.message} +
)} + {isInEditMode && ( + { + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + + dispatch(exitEditMode()); + }} + > + + Esc to exit + + + )} + { if (props.onEnter) { diff --git a/gui/src/components/markdown/StepContainerPreToolbar/ApplyActions.tsx b/gui/src/components/markdown/StepContainerPreToolbar/ApplyActions.tsx index 42ee8e048..321fe2633 100644 --- a/gui/src/components/markdown/StepContainerPreToolbar/ApplyActions.tsx +++ b/gui/src/components/markdown/StepContainerPreToolbar/ApplyActions.tsx @@ -3,7 +3,7 @@ import { ApplyState } from "core"; import { useState } from "react"; import { lightGray, vscForeground } from "../.."; import { getMetaKeyLabel } from "../../../util"; -import Spinner from "./Spinner"; +import Spinner from "../../gui/Spinner"; import { ToolbarButtonWithTooltip } from "./ToolbarButtonWithTooltip"; interface ApplyActionsProps { diff --git a/gui/src/components/markdown/StepContainerPreToolbar/GeneratingCodeLoader.tsx b/gui/src/components/markdown/StepContainerPreToolbar/GeneratingCodeLoader.tsx index 2b256929f..c430c8d62 100644 --- a/gui/src/components/markdown/StepContainerPreToolbar/GeneratingCodeLoader.tsx +++ b/gui/src/components/markdown/StepContainerPreToolbar/GeneratingCodeLoader.tsx @@ -1,4 +1,4 @@ -import Spinner from "./Spinner"; +import Spinner from "../../gui/Spinner"; export interface GeneratingCodeLoaderProps { showLineCount: boolean; diff --git a/gui/src/pages/More/More.tsx b/gui/src/pages/More/More.tsx index 5f97f9b31..347220084 100644 --- a/gui/src/pages/More/More.tsx +++ b/gui/src/pages/More/More.tsx @@ -16,6 +16,7 @@ import useHistory from "../../hooks/useHistory"; import MoreHelpRow from "./MoreHelpRow"; import IndexingProgress from "./IndexingProgress"; import DocsIndexingStatuses from "../../components/indexing/DocsIndexingStatuses"; +import PageHeader from "../../components/PageHeader"; function MorePage() { useNavigationListener(); @@ -26,20 +27,7 @@ function MorePage() { return (
-
-
navigate("/")} - > - - Chat -
-
+ navigate("/")} title="Chat" />
diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 258a92013..325f60dff 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -70,6 +70,8 @@ import resolveEditorContent from "../../components/mainInput/resolveInput"; import AcceptRejectAllButtons from "../../components/StepContainer/AcceptRejectAllButtons"; import CodeToEditCard from "../../components/CodeToEditCard"; import { exitEditMode } from "../../redux/thunks/exitEditMode"; +import PageHeader from "../../components/PageHeader"; +import Spinner from "../../components/gui/Spinner"; const StopButton = styled.div` background-color: ${vscBackground}; @@ -135,7 +137,7 @@ export function Chat() { const { showTutorialCard, closeTutorialCard } = useTutorialCard(); const defaultModel = useAppSelector(selectDefaultModel); const ttsActive = useAppSelector((state) => state.ui.ttsActive); - const active = useAppSelector((state) => state.session.isStreaming); + const isStreaming = useAppSelector((state) => state.session.isStreaming); const [stepsOpen, setStepsOpen] = useState<(boolean | undefined)[]>([]); const mainTextInputRef = useRef(null); const stepsDivRef = useRef(null); @@ -181,13 +183,9 @@ export function Chat() { setIsAtBottom(true); }, [stepsDivRef, setIsAtBottom]); - const returnToLastSessionButtonText = isInEditMode - ? "Back to Chat" - : "Last Session"; - useEffect(() => { - if (active) snapToBottom(); - }, [active, snapToBottom]); + if (isStreaming) snapToBottom(); + }, [isStreaming, snapToBottom]); // useEffect(() => { // setTimeout(() => { @@ -211,7 +209,7 @@ export function Chat() { return () => { window.removeEventListener("keydown", listener); }; - }, [active]); + }, [isStreaming]); const handleScroll = () => { // Temporary fix to account for additional height when code blocks are added @@ -338,6 +336,21 @@ export function Chat() { return ( <> + {isInEditMode && ( + { + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); + + if (isInEditMode) { + dispatch(exitEditMode()); + } + }} + /> + )} + {widget} @@ -448,7 +461,7 @@ export function Chat() { ■ Stop TTS )} - {active && ( + {isStreaming && ( { dispatch(setInactive()); @@ -475,49 +488,40 @@ export function Chat() {
-
- {history.length === 0 && - getLastSessionId() && - !hasPendingApplies ? ( -
- { - loadLastSession().catch((e) => - console.error(`Failed to load last session: ${e}`), - ); - - if (isInEditMode) { - dispatch(exitEditMode()); - } - }} - className="flex items-center gap-2" - > - - {returnToLastSessionButtonText} - -
- ) : null} -
+ {history.length === 0 && getLastSessionId() && !isInEditMode && ( + + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ) + } + className="xs:inline flex hidden items-center gap-2" + > + + Last Session + + )}
{hasPendingApplies && isSingleRangeEditOrInsertion && ( { - loadLastSession().catch((e) => - console.error(`Failed to load last session: ${e}`), - ); + onAcceptOrReject={(outcome) => { + if (outcome === "acceptDiff") { + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ); - dispatch(exitEditMode()); + dispatch(exitEditMode()); + } }} /> )} - {history.length === 0 && ( <> {onboardingCard.show && ( diff --git a/gui/src/pages/gui/ToolCallDiv/ToolCallButtonsDiv.tsx b/gui/src/pages/gui/ToolCallDiv/ToolCallButtonsDiv.tsx index 291e15e74..9d4528f33 100644 --- a/gui/src/pages/gui/ToolCallDiv/ToolCallButtonsDiv.tsx +++ b/gui/src/pages/gui/ToolCallDiv/ToolCallButtonsDiv.tsx @@ -6,7 +6,7 @@ import { vscButtonBackground, vscButtonForeground, } from "../../../components"; -import Spinner from "../../../components/markdown/StepContainerPreToolbar/Spinner"; +import Spinner from "../../../components/gui/Spinner"; import { selectCurrentToolCall } from "../../../redux/selectors/selectCurrentToolCall"; import { callTool } from "../../../redux/thunks/callTool"; import { cancelTool } from "../../../redux/thunks/cancelTool"; diff --git a/gui/src/pages/gui/ToolCallDiv/index.tsx b/gui/src/pages/gui/ToolCallDiv/index.tsx index e1745c459..6ca16bf87 100644 --- a/gui/src/pages/gui/ToolCallDiv/index.tsx +++ b/gui/src/pages/gui/ToolCallDiv/index.tsx @@ -5,7 +5,7 @@ import { } from "@heroicons/react/24/outline"; import { ToolCall, ToolCallState, ToolStatus } from "core"; import { vscButtonBackground } from "../../../components"; -import Spinner from "../../../components/markdown/StepContainerPreToolbar/Spinner"; +import Spinner from "../../../components/gui/Spinner"; import FunctionSpecificToolCallDiv from "./FunctionSpecificToolCallDiv"; import { ThreadDiv } from "./ThreadDiv"; diff --git a/gui/src/pages/history/HistoryHeader.tsx b/gui/src/pages/history/HistoryHeader.tsx deleted file mode 100644 index 4dbdf90bb..000000000 --- a/gui/src/pages/history/HistoryHeader.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { ArrowLeftIcon } from "@heroicons/react/24/outline"; -import { useNavigate } from "react-router-dom"; -import { lightGray, vscBackground } from "../../components"; -import { useNavigationListener } from "../../hooks/useNavigationListener"; -import { getFontSize } from "../../util"; - -export const HistoryHeader = () => { - useNavigationListener(); - const navigate = useNavigate(); - - return ( -
-
-
navigate("/")} - > - - Chat -
-
- {/* {workspacePaths && workspacePaths.length > 0 && ( - setFilteringByWorkspace((prev) => !prev)} - title={`Show only sessions from ${lastPartOfPath( - workspacePaths[workspacePaths.length - 1] - )}/`} - /> - )} */} -
- ); -}; diff --git a/gui/src/pages/history/index.tsx b/gui/src/pages/history/index.tsx index 6d31c60bc..54b6cea0a 100644 --- a/gui/src/pages/history/index.tsx +++ b/gui/src/pages/history/index.tsx @@ -1,11 +1,14 @@ +import { useNavigate } from "react-router-dom"; import { History } from "../../components/History"; +import PageHeader from "../../components/PageHeader"; import { getFontSize } from "../../util"; -import { HistoryHeader } from "./HistoryHeader"; export default function HistoryPage() { + const navigate = useNavigate(); + return (
- + navigate("/")} title="Chat" />
); diff --git a/gui/src/redux/thunks/exitEditMode.ts b/gui/src/redux/thunks/exitEditMode.ts index 9faba123a..ad3503696 100644 --- a/gui/src/redux/thunks/exitEditMode.ts +++ b/gui/src/redux/thunks/exitEditMode.ts @@ -13,6 +13,7 @@ export const exitEditMode = createAsyncThunk( async (_, { dispatch, extra, getState }) => { const state = getState(); const isInEditMode = selectIsInEditMode(state); + const codeToEdit = state.session.codeToEdit; const isSingleRangeEditOrInsertion = selectIsSingleRangeEditOrInsertion(state); @@ -21,6 +22,13 @@ export const exitEditMode = createAsyncThunk( } dispatch(setMode("chat")); + + for (const code of codeToEdit) { + extra.ideMessenger.post("rejectDiff", { + filepath: code.filepath, + }); + } + dispatch(clearCodeToEdit()); dispatch(setEditDone()); From f4a1e60ab1b37ea30cf703a070349f62617548fe Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 4 Dec 2024 16:22:41 -0800 Subject: [PATCH 055/113] Update InputToolbar.tsx --- gui/src/components/mainInput/InputToolbar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index dcc2ac0f7..9348e5262 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -83,6 +83,7 @@ interface InputToolbarProps { } function InputToolbar(props: InputToolbarProps) { + const dispatch = useAppDispatch(); const fileInputRef = useRef(null); const defaultModel = useAppSelector(selectDefaultModel); const useActiveFile = useAppSelector(selectUseActiveFile); From 1edad2c09b677612550bb69e03ea13e4abe1ca18 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 4 Dec 2024 16:27:07 -0800 Subject: [PATCH 056/113] Update CodeToEditCard.tsx --- .../components/CodeToEditCard/CodeToEditCard.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gui/src/components/CodeToEditCard/CodeToEditCard.tsx b/gui/src/components/CodeToEditCard/CodeToEditCard.tsx index 4e71b8dcb..cac18f4e1 100644 --- a/gui/src/components/CodeToEditCard/CodeToEditCard.tsx +++ b/gui/src/components/CodeToEditCard/CodeToEditCard.tsx @@ -73,13 +73,15 @@ export default function CodeToEditCard() { ))} ) : ( -
setShowAddFileCombobox(true)} - > - - Add a file to get started -
+ !showAddFileCombobox && ( +
setShowAddFileCombobox(true)} + > + + Add a file to get started +
+ ) )} {showAddFileCombobox && ( From 99fb7c96c1dd86ed1b1aa24ecd6e715180f37ad9 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 4 Dec 2024 15:21:20 -0800 Subject: [PATCH 057/113] test: update e2e tests --- extensions/vscode/.gitignore | 7 +++---- extensions/vscode/e2e/GUI.test.ts | 20 +++++++++++++++++-- extensions/vscode/package.json | 12 ++++++----- ...sconfig.ui-test.json => tsconfig.e2e.json} | 5 ++--- 4 files changed, 30 insertions(+), 14 deletions(-) rename extensions/vscode/{tsconfig.ui-test.json => tsconfig.e2e.json} (80%) diff --git a/extensions/vscode/.gitignore b/extensions/vscode/.gitignore index 72c28e6c3..665d5a3b7 100644 --- a/extensions/vscode/.gitignore +++ b/extensions/vscode/.gitignore @@ -19,7 +19,6 @@ gui/** continue_rc_schema.json -e2e/compiled -test-resources/ -.test-extensions -some-folder +e2e/_output +e2e/.test-extensions +e2e/storage diff --git a/extensions/vscode/e2e/GUI.test.ts b/extensions/vscode/e2e/GUI.test.ts index 672c663c4..0055df1ba 100644 --- a/extensions/vscode/e2e/GUI.test.ts +++ b/extensions/vscode/e2e/GUI.test.ts @@ -5,6 +5,7 @@ import { By, WebElement, WebDriver, + Key, } from "vscode-extension-tester"; import { expect } from "chai"; @@ -44,7 +45,7 @@ describe("GUI Test", () => { let driver: WebDriver; before(async function () { - this.timeout(10000000); + this.timeout(10000); await new Workbench().executeCommand("continue.focusContinueInput"); @@ -59,12 +60,27 @@ describe("GUI Test", () => { await new EditorView().closeAllEditors(); }); - it("Find description", async () => { + it("should display correct panel description", async () => { const description = await view.findWebElement( By.xpath("//*[contains(text(), 'Quickly')]"), ); + expect(await description.getText()).has.string( "Quickly get up and running using our API keys.", ); }); + + it("should allow typing text in the editor", async () => { + const tiptap = await view.findWebElement(By.className("tiptap")); + + await tiptap.sendKeys("Hello world!"); + + expect(await tiptap.getText()).has.string("Hello world!"); + + // Just to show that we can + await tiptap.sendKeys(Key.ENTER); + await new Promise((res) => { + setTimeout(res, 5000); + }); + }).timeout(6000); }); diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 32fb95be1..abeeb1f79 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -618,11 +618,13 @@ "build:rust": "cargo-cp-artifact -ac sync sync.node -- cargo build --manifest-path ../../sync/Cargo.toml --message-format=json-render-diagnostics", "build-debug:rust": "npm run build:rust --", "build-release:rust": "npm run build:rust -- --release", - "compile-ui-tests": "tsc -p ./tsconfig.ui-test.json", - "get-chromedriver": "extest get-chromedriver --storage ./some-folder", - "get-vscode": "extest get-vscode --storage ./some-folder", - "install-vsix": "extest install-vsix -f ./build/continue-0.9.243.vsix --extensions_dir .test-extensions --storage ./some-folder", - "ui-test": "npm run install-vsix && extest run-tests './e2e/compiled/*.test.js' --code_settings settings.json --extensions_dir .test-extensions --storage ./some-folder" + "e2e:compile": "tsc -p ./tsconfig.e2e.json", + "e2e:create-storage": "mkdir -p ./e2e/storage", + "e2e:get-chromedriver": "extest get-chromedriver --storage ./e2e/storage", + "e2e:get-vscode": "extest get-vscode --storage ./e2e/storage && codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'", + "e2e:install-vsix": "extest install-vsix -f ./build/continue-0.9.243.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", + "e2e:test": "extest run-tests './e2e/_output/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", + "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:install-vsix && npm run e2e:test" }, "devDependencies": { "@biomejs/biome": "1.6.4", diff --git a/extensions/vscode/tsconfig.ui-test.json b/extensions/vscode/tsconfig.e2e.json similarity index 80% rename from extensions/vscode/tsconfig.ui-test.json rename to extensions/vscode/tsconfig.e2e.json index 6dd8f2e5f..256b67025 100644 --- a/extensions/vscode/tsconfig.ui-test.json +++ b/extensions/vscode/tsconfig.e2e.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "module": "Node16", + "module": "CommonJS", "target": "ES2022", - "outDir": "e2e/compiled", + "outDir": "e2e/_output", "sourceMap": true, "strict": true, "rootDir": "e2e", @@ -12,7 +12,6 @@ "exclude": [ "node_modules", ".vscode-test", - "test-resources", "e2e/resources/**", ".test-extensions" ], From c48dea8c93448219fa856965b6807ce4155ae99a Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 4 Dec 2024 16:47:47 -0800 Subject: [PATCH 058/113] improv: copy vsix --- extensions/vscode/.gitignore | 1 + extensions/vscode/e2e/get-latest-vsix.sh | 18 ++++++++++++++++++ extensions/vscode/package.json | 5 +++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 extensions/vscode/e2e/get-latest-vsix.sh diff --git a/extensions/vscode/.gitignore b/extensions/vscode/.gitignore index 665d5a3b7..23c012927 100644 --- a/extensions/vscode/.gitignore +++ b/extensions/vscode/.gitignore @@ -22,3 +22,4 @@ continue_rc_schema.json e2e/_output e2e/.test-extensions e2e/storage +e2e/vsix diff --git a/extensions/vscode/e2e/get-latest-vsix.sh b/extensions/vscode/e2e/get-latest-vsix.sh new file mode 100755 index 000000000..75e743f42 --- /dev/null +++ b/extensions/vscode/e2e/get-latest-vsix.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# echo pwd +echo "Current directory: $(pwd)" + +# Find the latest VSIX file in the build directory +latest_vsix=$(ls -t ./build/continue-*.vsix | head -n1) + +if [ -z "$latest_vsix" ]; then + echo "No VSIX file found in build directory" + exit 1 +fi + +# Create e2e/vsix directory if it doesn't exist +mkdir -p "./e2e/vsix" + +# Copy the file to e2e directory with fixed name +cp "$latest_vsix" "./e2e/vsix/continue.vsix" \ No newline at end of file diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index abeeb1f79..8bcfcfb37 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -622,9 +622,10 @@ "e2e:create-storage": "mkdir -p ./e2e/storage", "e2e:get-chromedriver": "extest get-chromedriver --storage ./e2e/storage", "e2e:get-vscode": "extest get-vscode --storage ./e2e/storage && codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'", - "e2e:install-vsix": "extest install-vsix -f ./build/continue-0.9.243.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", + "e2e:copy-vsix": "chmod +x ./e2e/get-latest-vsix.sh && bash ./e2e/get-latest-vsix.sh", + "e2e:install-vsix": "extest install-vsix -f ./e2e/vsix/continue.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", "e2e:test": "extest run-tests './e2e/_output/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", - "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:install-vsix && npm run e2e:test" + "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test" }, "devDependencies": { "@biomejs/biome": "1.6.4", From 2fd238c3fd7709ad8a225ae237a61475735c9937 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 4 Dec 2024 17:05:04 -0800 Subject: [PATCH 059/113] test: add e2e to CI --- .github/workflows/pr_checks.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index a879c3d9d..4918bb396 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -83,6 +83,11 @@ jobs: npx tsc --noEmit npm run lint + - name: Run VSCode e2e tests + run: | + cd extensions/vscode + npm run e2e:all + - name: core checks run: | cd core From ade32d428c5ef0fc8f5daefd52571b95387002f3 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 4 Dec 2024 17:10:31 -0800 Subject: [PATCH 060/113] fix: ci e2e tests --- .github/workflows/pr_checks.yaml | 2 +- extensions/vscode/package.json | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 4918bb396..4d1b13a44 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -86,7 +86,7 @@ jobs: - name: Run VSCode e2e tests run: | cd extensions/vscode - npm run e2e:all + npm run e2e:ci - name: core checks run: | diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 8bcfcfb37..acc5b947b 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -621,11 +621,13 @@ "e2e:compile": "tsc -p ./tsconfig.e2e.json", "e2e:create-storage": "mkdir -p ./e2e/storage", "e2e:get-chromedriver": "extest get-chromedriver --storage ./e2e/storage", - "e2e:get-vscode": "extest get-vscode --storage ./e2e/storage && codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'", + "e2e:get-vscode": "extest get-vscode --storage ./e2e/storage", + "e2e:sign-vscode": "codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'", "e2e:copy-vsix": "chmod +x ./e2e/get-latest-vsix.sh && bash ./e2e/get-latest-vsix.sh", "e2e:install-vsix": "extest install-vsix -f ./e2e/vsix/continue.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", "e2e:test": "extest run-tests './e2e/_output/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", - "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test" + "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test", + "e2e:ci": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test" }, "devDependencies": { "@biomejs/biome": "1.6.4", From 02f40d04bdb5f6e3d2ca23f081659a208552faf8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:21:04 -0800 Subject: [PATCH 061/113] core test cleanup --- .../root-path-context/test/testUtils.ts | 2 +- .../filtering/test/filter.test.ts | 5 +- core/autocomplete/filtering/test/util.ts | 2 +- core/config/ConfigHandler.test.ts | 4 +- .../providers/_context-providers.test.ts} | 12 +- core/indexing/CodeSnippetsIndex.test.ts | 4 +- core/indexing/CodebaseIndexer.test.ts | 12 +- .../FullTextSearchCodebaseIndex.test.ts | 2 +- core/indexing/LanceDbIndex.test.ts | 4 +- .../indexing/chunk/ChunkCodebaseIndex.test.ts | 6 +- core/indexing/docs/DocsCrawler.skip.ts | 2 +- core/{test/util => indexing/test}/indexing.ts | 17 +-- .../test/testWorkspaceDir.ts} | 2 +- core/indexing/walkDir.test.ts | 2 +- core/jest.setup-after-env.ts | 20 ++- core/{test => llm}/llm.test.ts | 8 +- core/package.json | 1 + core/test/.gitignore | 1 - core/test/editme.py | 2 - core/test/{util => }/fixtures.ts | 8 +- .../{_testEnv.test.ts => testEnv.test.ts} | 0 .../util/dedentAndGetCommonWhitespace.test.ts | 76 ----------- core/test/util/getLastNPathParts.test.ts | 51 -------- core/test/util/lcs.test.ts | 40 ------ core/test/util/merge.test.ts | 100 -------------- .../test/util/ranges/getRangeInString.test.ts | 105 --------------- core/test/util/ranges/intersection.test.ts | 123 ------------------ core/test/util/ranges/maxMinPosition.test.ts | 70 ---------- core/test/util/ranges/union.test.ts | 92 ------------- core/util/chatDescriber.ts | 15 +-- core/{test => }/util/history.test.ts | 6 +- core/util/markdown.ts | 13 ++ core/util/tts.ts | 20 +-- core/util/withExponentialBackoff.test.ts | 69 ---------- 34 files changed, 72 insertions(+), 824 deletions(-) rename core/{test/context/providers/index.skip.ts => context/providers/_context-providers.test.ts} (83%) rename core/{test/util => indexing/test}/indexing.ts (84%) rename core/{test/util/testDir.ts => indexing/test/testWorkspaceDir.ts} (92%) rename core/{test => llm}/llm.test.ts (95%) delete mode 100644 core/test/.gitignore delete mode 100644 core/test/editme.py rename core/test/{util => }/fixtures.ts (60%) rename core/test/{_testEnv.test.ts => testEnv.test.ts} (100%) delete mode 100644 core/test/util/dedentAndGetCommonWhitespace.test.ts delete mode 100644 core/test/util/getLastNPathParts.test.ts delete mode 100644 core/test/util/lcs.test.ts delete mode 100644 core/test/util/merge.test.ts delete mode 100644 core/test/util/ranges/getRangeInString.test.ts delete mode 100644 core/test/util/ranges/intersection.test.ts delete mode 100644 core/test/util/ranges/maxMinPosition.test.ts delete mode 100644 core/test/util/ranges/union.test.ts rename core/{test => }/util/history.test.ts (96%) create mode 100644 core/util/markdown.ts delete mode 100644 core/util/withExponentialBackoff.test.ts diff --git a/core/autocomplete/context/root-path-context/test/testUtils.ts b/core/autocomplete/context/root-path-context/test/testUtils.ts index 7a5c22aba..207b1d6d4 100644 --- a/core/autocomplete/context/root-path-context/test/testUtils.ts +++ b/core/autocomplete/context/root-path-context/test/testUtils.ts @@ -4,7 +4,7 @@ import path from "path"; import Parser from "web-tree-sitter"; import { Position } from "../../../.."; -import { testIde } from "../../../../test/util/fixtures"; +import { testIde } from "../../../../test/fixtures"; import { getAst, getTreePathAtCursor } from "../../../util/ast"; import { ImportDefinitionsService } from "../../ImportDefinitionsService"; import { RootPathContextService } from "../RootPathContextService"; diff --git a/core/autocomplete/filtering/test/filter.test.ts b/core/autocomplete/filtering/test/filter.test.ts index e6c07b951..3f81962ca 100644 --- a/core/autocomplete/filtering/test/filter.test.ts +++ b/core/autocomplete/filtering/test/filter.test.ts @@ -1,4 +1,7 @@ -import { setUpTestDir, tearDownTestDir } from "../../../test/util/testDir"; +import { + setUpTestDir, + tearDownTestDir, +} from "../../../indexing/test/testWorkspaceDir"; import { TEST_CASES_WITH_DIFF, TEST_CASES_WITHOUT_DIFF } from "./testCases"; import { diff --git a/core/autocomplete/filtering/test/util.ts b/core/autocomplete/filtering/test/util.ts index 8adaa101a..a052aace2 100644 --- a/core/autocomplete/filtering/test/util.ts +++ b/core/autocomplete/filtering/test/util.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import Mock from "../../../llm/llms/Mock"; -import { testConfigHandler, testIde } from "../../../test/util/fixtures"; +import { testConfigHandler, testIde } from "../../../test/fixtures"; import { CompletionProvider } from "../../CompletionProvider"; import { AutocompleteInput } from "../../util/types"; diff --git a/core/config/ConfigHandler.test.ts b/core/config/ConfigHandler.test.ts index 26de42ec7..90e07ba5c 100644 --- a/core/config/ConfigHandler.test.ts +++ b/core/config/ConfigHandler.test.ts @@ -1,8 +1,8 @@ import fs from "node:fs"; import path from "node:path"; -import { testConfigHandler } from "../test/util/fixtures"; -import { TEST_DIR } from "../test/util/testDir"; +import { testConfigHandler } from "../test/fixtures"; +import { TEST_DIR } from "../indexing/test/testWorkspaceDir"; import { getConfigTsPath } from "../util/paths"; import { defaultConfig } from "./default"; diff --git a/core/test/context/providers/index.skip.ts b/core/context/providers/_context-providers.test.ts similarity index 83% rename from core/test/context/providers/index.skip.ts rename to core/context/providers/_context-providers.test.ts index 1d4e9f1b1..8379083a9 100644 --- a/core/test/context/providers/index.skip.ts +++ b/core/context/providers/_context-providers.test.ts @@ -4,12 +4,12 @@ import { ContextProviderExtras, ContextProviderWithParams, IContextProvider, -} from "../../.."; -import { ConfigHandler } from "../../../config/ConfigHandler"; -import { contextProviderClassFromName } from "../../../context/providers"; -import { ControlPlaneClient } from "../../../control-plane/client"; -import FileSystemIde from "../../../util/filesystem"; -import { TEST_DIR } from "../../util/testDir"; +} from "../.."; +import { ConfigHandler } from "../../config/ConfigHandler"; +import { contextProviderClassFromName } from "."; +import { ControlPlaneClient } from "../../control-plane/client"; +import FileSystemIde from "../../util/filesystem"; +import { TEST_DIR } from "../../indexing/test/testWorkspaceDir"; const CONTEXT_PROVIDERS_TO_TEST: ContextProviderWithParams[] = [ { name: "diff", params: {} }, diff --git a/core/indexing/CodeSnippetsIndex.test.ts b/core/indexing/CodeSnippetsIndex.test.ts index 97d086d23..814927725 100644 --- a/core/indexing/CodeSnippetsIndex.test.ts +++ b/core/indexing/CodeSnippetsIndex.test.ts @@ -1,11 +1,11 @@ import { jest } from "@jest/globals"; -import { testIde } from "../test/util/fixtures"; +import { testIde } from "../test/fixtures"; import { insertMockChunks, mockPathAndCacheKey, updateIndexAndAwaitGenerator, -} from "../test/util/indexing"; +} from "./test/indexing"; import { CodeSnippetsCodebaseIndex } from "./CodeSnippetsIndex"; import { DatabaseConnection, SqliteDb } from "./refreshIndex"; diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index ee2f108f7..edd654dc7 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -5,13 +5,13 @@ import path from "node:path"; import { jest } from "@jest/globals"; import { ContinueServerClient } from "../continueServer/stubs/client.js"; -import { testConfigHandler, testIde } from "../test/util/fixtures.js"; +import { testConfigHandler, testIde } from "../test/fixtures.js"; import { addToTestDir, setUpTestDir, tearDownTestDir, TEST_DIR, -} from "../test/util/testDir.js"; +} from "./test/testWorkspaceDir.js"; import { getIndexSqlitePath } from "../util/paths.js"; import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js"; @@ -76,8 +76,8 @@ describe("CodebaseIndexer", () => { setUpTestDir(); execSync("git init", { cwd: TEST_DIR }); - execSync("git config user.email \"test@example.com\"", { cwd: TEST_DIR }); - execSync("git config user.name \"Test\"", { cwd: TEST_DIR }); + execSync('git config user.email "test@example.com"', { cwd: TEST_DIR }); + execSync('git config user.name "Test"', { cwd: TEST_DIR }); }); afterAll(async () => { @@ -100,9 +100,7 @@ describe("CodebaseIndexer", () => { async function refreshIndexFiles(files: string[]) { const updates = []; - for await (const update of codebaseIndexer.refreshFiles( - files, - )) { + for await (const update of codebaseIndexer.refreshFiles(files)) { updates.push(update); } return updates; diff --git a/core/indexing/FullTextSearchCodebaseIndex.test.ts b/core/indexing/FullTextSearchCodebaseIndex.test.ts index d46e47fd4..3aefafaaa 100644 --- a/core/indexing/FullTextSearchCodebaseIndex.test.ts +++ b/core/indexing/FullTextSearchCodebaseIndex.test.ts @@ -4,7 +4,7 @@ import { insertMockChunks, mockPathAndCacheKey, updateIndexAndAwaitGenerator, -} from "../test/util/indexing"; +} from "./test/indexing"; import { FullTextSearchCodebaseIndex } from "./FullTextSearchCodebaseIndex"; import { DatabaseConnection, SqliteDb } from "./refreshIndex"; diff --git a/core/indexing/LanceDbIndex.test.ts b/core/indexing/LanceDbIndex.test.ts index f0c711e93..1d15117fd 100644 --- a/core/indexing/LanceDbIndex.test.ts +++ b/core/indexing/LanceDbIndex.test.ts @@ -1,13 +1,13 @@ import { jest } from "@jest/globals"; import lance from "vectordb"; -import { testConfigHandler, testIde } from "../test/util/fixtures"; +import { testConfigHandler, testIde } from "../test/fixtures"; import { mockPathAndCacheKey, mockTag, testContinueServerClient, updateIndexAndAwaitGenerator, -} from "../test/util/indexing"; +} from "./test/indexing"; import { getLanceDbPath } from "../util/paths"; import { LanceDbIndex } from "./LanceDbIndex"; diff --git a/core/indexing/chunk/ChunkCodebaseIndex.test.ts b/core/indexing/chunk/ChunkCodebaseIndex.test.ts index c2f95d560..b5f373648 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.test.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.test.ts @@ -1,14 +1,14 @@ import { jest } from "@jest/globals"; -import { testIde } from "../../test/util/fixtures"; +import { testIde } from "../../test/fixtures"; import { mockFileContents, mockFilename, mockPathAndCacheKey, testContinueServerClient, updateIndexAndAwaitGenerator, -} from "../../test/util/indexing"; -import { addToTestDir } from "../../test/util/testDir"; +} from "../test/indexing"; +import { addToTestDir } from "../test/testWorkspaceDir"; import { DatabaseConnection, SqliteDb } from "../refreshIndex"; import { IndexResultType } from "../types"; diff --git a/core/indexing/docs/DocsCrawler.skip.ts b/core/indexing/docs/DocsCrawler.skip.ts index 57d712fed..97226c296 100644 --- a/core/indexing/docs/DocsCrawler.skip.ts +++ b/core/indexing/docs/DocsCrawler.skip.ts @@ -3,7 +3,7 @@ import os from "os"; import { jest } from "@jest/globals"; import { ContinueConfig } from "../.."; -import { testConfigHandler } from "../../test/util/fixtures"; +import { testConfigHandler } from "../../test/fixtures"; import FileSystemIde from "../../util/filesystem"; import DocsCrawler, { ChromiumInstaller, type PageData } from "./DocsCrawler"; diff --git a/core/test/util/indexing.ts b/core/indexing/test/indexing.ts similarity index 84% rename from core/test/util/indexing.ts rename to core/indexing/test/indexing.ts index 16137236a..6bc643e66 100644 --- a/core/test/util/indexing.ts +++ b/core/indexing/test/indexing.ts @@ -2,19 +2,12 @@ import { jest } from "@jest/globals"; import { IndexTag } from "../.."; import { IContinueServerClient } from "../../continueServer/interface"; -import { ChunkCodebaseIndex } from "../../indexing/chunk/ChunkCodebaseIndex"; -import { tagToString } from "../../indexing/refreshIndex"; -import { - CodebaseIndex, - PathAndCacheKey, - RefreshIndexResults, -} from "../../indexing/types"; - -import { testIde } from "./fixtures"; -import { addToTestDir, TEST_DIR } from "./testDir"; - - +import { ChunkCodebaseIndex } from "../chunk/ChunkCodebaseIndex"; +import { tagToString } from "../refreshIndex"; +import { CodebaseIndex, PathAndCacheKey, RefreshIndexResults } from "../types"; +import { testIde } from "../../test/fixtures"; +import { addToTestDir, TEST_DIR } from "./testWorkspaceDir"; export const mockFilename = "test.py"; export const mockPathAndCacheKey = { diff --git a/core/test/util/testDir.ts b/core/indexing/test/testWorkspaceDir.ts similarity index 92% rename from core/test/util/testDir.ts rename to core/indexing/test/testWorkspaceDir.ts index 62cbbb02c..0eae7ad0b 100644 --- a/core/test/util/testDir.ts +++ b/core/indexing/test/testWorkspaceDir.ts @@ -3,7 +3,7 @@ import os from "os"; import path from "path"; // Want this outside of the git repository so we can change branches in tests -export const TEST_DIR = path.join(os.tmpdir(), "testDir"); +export const TEST_DIR = path.join(os.tmpdir(), "testWorkspaceDir"); export function setUpTestDir() { if (fs.existsSync(TEST_DIR)) { diff --git a/core/indexing/walkDir.test.ts b/core/indexing/walkDir.test.ts index 748e958e9..9819de571 100644 --- a/core/indexing/walkDir.test.ts +++ b/core/indexing/walkDir.test.ts @@ -6,7 +6,7 @@ import { setUpTestDir, tearDownTestDir, addToTestDir, -} from "../test/util/testDir"; +} from "./test/testWorkspaceDir"; import FileSystemIde from "../util/filesystem"; const ide = new FileSystemIde(TEST_DIR); diff --git a/core/jest.setup-after-env.ts b/core/jest.setup-after-env.ts index d92f171dd..53f94ecea 100644 --- a/core/jest.setup-after-env.ts +++ b/core/jest.setup-after-env.ts @@ -1,5 +1,4 @@ -// https://github.com/mswjs/msw/issues/1576#issuecomment-1482643055 - +import fs from "fs"; import { TextDecoder, TextEncoder } from "util"; import { jest } from "@jest/globals"; @@ -12,23 +11,20 @@ if (process.env.DEBUG === "jest") { const globalThis = global as any; globalThis.jest = jest; + +// https://github.com/mswjs/msw/issues/1576#issuecomment-1482643055 globalThis.fetch = fetch; globalThis.Request = Request; globalThis.Response = Response; globalThis.TextEncoder = TextEncoder; globalThis.TextDecoder = TextDecoder; -// Trying to delete this when for some reason SQLite is still in use causes tests to fail -// globalThis.beforeAll(() => { -// // We can ignore TS warnings here since we set this explicitly in `./jest.global-setup.ts` +// TODO - currently causing tests to fail because sqlite is still running for some reason +// const clearTestDirectory = () => { // if (fs.existsSync(process.env.CONTINUE_GLOBAL_DIR!)) { // fs.rmSync(process.env.CONTINUE_GLOBAL_DIR!, { recursive: true }); // } -// }); +// }; -// globalThis.afterAll(() => { -// // We can ignore TS warnings here since we set this explicitly in `./jest.global-setup.ts` -// if (fs.existsSync(process.env.CONTINUE_GLOBAL_DIR!)) { -// fs.rmSync(process.env.CONTINUE_GLOBAL_DIR!, { recursive: true }); -// } -// }); +// globalThis.beforeAll(clearTestDirectory); +// globalThis.afterAll(clearTestDirectory); diff --git a/core/test/llm.test.ts b/core/llm/llm.test.ts similarity index 95% rename from core/test/llm.test.ts rename to core/llm/llm.test.ts index cf42e128a..cb2218d1d 100644 --- a/core/test/llm.test.ts +++ b/core/llm/llm.test.ts @@ -1,10 +1,8 @@ import * as dotenv from "dotenv"; -import { CompletionOptions } from "../"; -import { BaseLLM } from "../llm/"; -import OpenAI from "../llm/llms/OpenAI"; - -// jest.setTimeout(100_000); +import { CompletionOptions } from ".."; +import { BaseLLM } from "."; +import OpenAI from "./llms/OpenAI"; dotenv.config(); diff --git a/core/package.json b/core/package.json index 8aa6f9f9c..c18847ecf 100644 --- a/core/package.json +++ b/core/package.json @@ -4,6 +4,7 @@ "description": "The Continue Core contains functionality that can be shared across web, VS Code, or Node.js", "scripts": { "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", + "test:coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage && open ./coverage/lcov-report/index.html", "tsc:check": "tsc -p ./ --noEmit", "build:npm": "tsc -p ./tsconfig.npm.json", "lint": "eslint . --ext ts", diff --git a/core/test/.gitignore b/core/test/.gitignore deleted file mode 100644 index 227f3fc4f..000000000 --- a/core/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -scratch.test.ts \ No newline at end of file diff --git a/core/test/editme.py b/core/test/editme.py deleted file mode 100644 index c6077fb3b..000000000 --- a/core/test/editme.py +++ /dev/null @@ -1,2 +0,0 @@ -def average(nums: list) -> float: - pass diff --git a/core/test/util/fixtures.ts b/core/test/fixtures.ts similarity index 60% rename from core/test/util/fixtures.ts rename to core/test/fixtures.ts index e0aa06d14..8b75de75d 100644 --- a/core/test/util/fixtures.ts +++ b/core/test/fixtures.ts @@ -1,8 +1,8 @@ -import { ConfigHandler } from "../../config/ConfigHandler"; -import { ControlPlaneClient } from "../../control-plane/client"; -import FileSystemIde from "../../util/filesystem"; +import { ConfigHandler } from "../config/ConfigHandler"; +import { ControlPlaneClient } from "../control-plane/client"; +import FileSystemIde from "../util/filesystem"; -import { TEST_DIR } from "./testDir"; +import { TEST_DIR } from "../indexing/test/testWorkspaceDir"; export const testIde = new FileSystemIde(TEST_DIR); diff --git a/core/test/_testEnv.test.ts b/core/test/testEnv.test.ts similarity index 100% rename from core/test/_testEnv.test.ts rename to core/test/testEnv.test.ts diff --git a/core/test/util/dedentAndGetCommonWhitespace.test.ts b/core/test/util/dedentAndGetCommonWhitespace.test.ts deleted file mode 100644 index 5f3c6a4be..000000000 --- a/core/test/util/dedentAndGetCommonWhitespace.test.ts +++ /dev/null @@ -1,76 +0,0 @@ -// File generated by Continue -import { dedentAndGetCommonWhitespace } from "../../util"; - -describe("dedentAndGetCommonWhitespace", () => { - let originalString: string; - - beforeEach(() => { - // Setup any global variables or states if needed - originalString = " line1\n line2\n line3"; - }); - - afterEach(() => { - // Tear down any changes to global variables or states if needed - originalString = ""; - }); - - test("should dedent and return common whitespace for a simple case", () => { - const input = " line1\n line2\n line3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["line1\nline2\nline3", " "]); - }); - - test("should handle empty string", () => { - const input = ""; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["", ""]); - }); - - test("should handle string with only whitespace", () => { - const input = " "; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["", ""]); - }); - - test("should handle string with mixed whitespace and content", () => { - const input = " line1\n line2\n line3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual([" line1\nline2\n line3", " "]); - }); - - test("should handle string with no common leading whitespace", () => { - const input = "line1\n line2\n line3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual([input, ""]); - }); - - test("should handle string with empty lines", () => { - const input = " line1\n\n line3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["line1\n\nline3", " "]); - }); - - test("should handle string with only empty lines", () => { - const input = "\n\n"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["\n\n", ""]); - }); - - test("should handle string with tabs as whitespace", () => { - const input = "\tline1\n\tline2\n\tline3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["line1\nline2\nline3", "\t"]); - }); - - test("should handle string with mixed tabs and spaces", () => { - const input = "\t line1\n\t line2\n\t line3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual(["line1\nline2\nline3", "\t "]); - }); - - test("should handle string with different leading whitespace lengths", () => { - const input = " line1\n line2\n line3"; - const output = dedentAndGetCommonWhitespace(input); - expect(output).toEqual([" line1\nline2\n line3", " "]); - }); -}); diff --git a/core/test/util/getLastNPathParts.test.ts b/core/test/util/getLastNPathParts.test.ts deleted file mode 100644 index ba72b4520..000000000 --- a/core/test/util/getLastNPathParts.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -// File generated by Continue -import { getLastNPathParts } from "../../util"; - -describe("getLastNPathParts", () => { - const SEP_REGEX = /[\\/]+/; - - beforeAll(() => { - // Setup code if needed - }); - - afterAll(() => { - // Teardown code if needed - }); - - test("returns the last N parts of a filepath with forward slashes", () => { - const filepath = "home/user/documents/project/file.txt"; - expect(getLastNPathParts(filepath, 2)).toBe("project/file.txt"); - }); - - test("returns the last N parts of a filepath with backward slashes", () => { - const filepath = "C:\\home\\user\\documents\\project\\file.txt"; - expect(getLastNPathParts(filepath, 3)).toBe("documents/project/file.txt"); - }); - - test("returns the last part if N is 1", () => { - const filepath = "/home/user/documents/project/file.txt"; - expect(getLastNPathParts(filepath, 1)).toBe("file.txt"); - }); - - test("returns the entire path if N is greater than the number of parts", () => { - const filepath = "home/user/documents/project/file.txt"; - expect(getLastNPathParts(filepath, 10)).toBe( - "home/user/documents/project/file.txt", - ); - }); - - test("returns an empty string if N is 0", () => { - const filepath = "home/user/documents/project/file.txt"; - expect(getLastNPathParts(filepath, 0)).toBe(""); - }); - - test("handles paths with mixed forward and backward slashes", () => { - const filepath = "home\\user/documents\\project/file.txt"; - expect(getLastNPathParts(filepath, 3)).toBe("documents/project/file.txt"); - }); - - test("handles edge case with empty filepath", () => { - const filepath = ""; - expect(getLastNPathParts(filepath, 2)).toBe(""); - }); -}); diff --git a/core/test/util/lcs.test.ts b/core/test/util/lcs.test.ts deleted file mode 100644 index da10cdf90..000000000 --- a/core/test/util/lcs.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -// This file is generated by Continue -import { longestCommonSubsequence } from "../../util/lcs"; - -describe("longestCommonSubsequence", () => { - beforeAll(() => { - // Setup if needed - }); - - afterAll(() => { - // Teardown if needed - }); - - test("should return the longest common subsequence for non-empty strings", () => { - expect(longestCommonSubsequence("abcde", "ace")).toBe("ace"); - expect(longestCommonSubsequence("abc", "abc")).toBe("abc"); - expect(longestCommonSubsequence("abc", "def")).toBe(""); - }); - - test("should handle cases where one or both strings are empty", () => { - expect(longestCommonSubsequence("", "abc")).toBe(""); - expect(longestCommonSubsequence("abc", "")).toBe(""); - expect(longestCommonSubsequence("", "")).toBe(""); - }); - - test("should handle cases with no common subsequence", () => { - expect(longestCommonSubsequence("abc", "def")).toBe(""); - expect(longestCommonSubsequence("xyz", "abc")).toBe(""); - }); - - test("should handle cases with special characters", () => { - expect(longestCommonSubsequence("a!@#b$c", "!@#$")).toBe("!@#$"); - expect(longestCommonSubsequence("a!@#b$c", "xyz")).toBe(""); - }); - - test("should handle long strings efficiently", () => { - const str1 = "a".repeat(1000) + "b".repeat(1000); - const str2 = "a".repeat(1000) + "c".repeat(1000); - expect(longestCommonSubsequence(str1, str2)).toBe("a".repeat(1000)); - }); -}); diff --git a/core/test/util/merge.test.ts b/core/test/util/merge.test.ts deleted file mode 100644 index cf7ba99d5..000000000 --- a/core/test/util/merge.test.ts +++ /dev/null @@ -1,100 +0,0 @@ -// File generated by Continue -import { mergeJson } from "../../util/merge"; - -describe("mergeJson", () => { - it("should merge two simple JSON objects", () => { - const first = { a: 1, b: 2 }; - const second = { b: 3, c: 4 }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: 1, b: 3, c: 4 }); - }); - - it("should overwrite values when mergeBehavior is \"overwrite\"", () => { - const first = { a: 1, b: 2 }; - const second = { b: 3, c: 4 }; - const result = mergeJson(first, second, "overwrite"); - expect(result).toEqual({ a: 1, b: 3, c: 4 }); - }); - - it("should merge nested objects", () => { - const first = { a: { b: 1 } }; - const second = { a: { c: 2 } }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: { b: 1, c: 2 } }); - }); - - it("should merge arrays without mergeKeys", () => { - const first = { a: [1, 2] }; - const second = { a: [3, 4] }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: [1, 2, 3, 4] }); - }); - - it("should merge arrays with mergeKeys", () => { - const first = { - a: [ - { id: 1, value: "first" }, - { id: 2, value: "second" }, - ], - }; - const second = { - a: [ - { id: 2, value: "updated" }, - { id: 3, value: "third" }, - ], - }; - const mergeKeys = { - a: (item1: any, item2: any) => item1.id === item2.id, - }; - const result = mergeJson(first, second, undefined, mergeKeys); - expect(result).toEqual({ - a: [ - { id: 1, value: "first" }, - { id: 2, value: "updated" }, - { id: 3, value: "third" }, - ], - }); - }); - - it("should handle non-object values correctly", () => { - const first = { a: 1, b: "string", c: true }; - const second = { a: 2, b: "new string", c: false }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: 2, b: "new string", c: false }); - }); - - it("should handle null and undefined values correctly", () => { - const first = { a: 1, b: null }; - const second = { b: 2, c: undefined }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: 1, b: 2, c: undefined }); - }); - - it("should handle empty objects", () => { - const first = {}; - const second = { a: 1 }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: 1 }); - }); - - it("should handle empty second object", () => { - const first = { a: 1 }; - const second = {}; - const result = mergeJson(first, second); - expect(result).toEqual({ a: 1 }); - }); - - it("should handle errors gracefully", () => { - const first = { a: 1 }; - const second = { b: () => {} }; // Functions are not serializable in JSON - const result = mergeJson(first, second); - expect(result).toEqual({ a: 1, b: expect.any(Function) }); - }); - - it("should merge deeply nested objects", () => { - const first = { a: { b: { c: 1 } } }; - const second = { a: { b: { d: 2 } } }; - const result = mergeJson(first, second); - expect(result).toEqual({ a: { b: { c: 1, d: 2 } } }); - }); -}); diff --git a/core/test/util/ranges/getRangeInString.test.ts b/core/test/util/ranges/getRangeInString.test.ts deleted file mode 100644 index e0a4df67a..000000000 --- a/core/test/util/ranges/getRangeInString.test.ts +++ /dev/null @@ -1,105 +0,0 @@ -// This file is generated by Continue - -import { getRangeInString } from "../../../util/ranges"; - -describe.skip("getRangeInString", () => { - let content: string; - - beforeEach(() => { - content = `Line 1 -Line 2 -Line 3 -Line 4 -Line 5`; - }); - - afterEach(() => { - content = ""; - }); - - test("should return substring within the same line", () => { - const range = { - start: { line: 1, character: 0 }, - end: { line: 1, character: 4 }, - }; - expect(getRangeInString(content, range)).toBe("Line"); - }); - - test("should return substring spanning multiple lines", () => { - const range = { - start: { line: 1, character: 2 }, - end: { line: 3, character: 3 }, - }; - const expected = `ne 2 -Line 3 -Line 4`; - expect(getRangeInString(content, range)).toBe(expected); - }); - - test("should handle range that starts and ends at the same character", () => { - const range = { - start: { line: 2, character: 0 }, - end: { line: 2, character: 0 }, - }; - expect(getRangeInString(content, range)).toBe("L"); - }); - - test("should handle range that spans entire content", () => { - const range = { - start: { line: 0, character: 0 }, - end: { line: 4, character: 5 }, - }; - expect(getRangeInString(content, range)).toBe(content); - }); - - test("should handle range that spans to the end of the last line", () => { - const range = { - start: { line: 3, character: 2 }, - end: { line: 4, character: 5 }, - }; - const expected = `ne 4 -Line 5`; - expect(getRangeInString(content, range)).toBe(expected); - }); - - test("should handle empty content", () => { - content = ""; - const range = { - start: { line: 0, character: 0 }, - end: { line: 0, character: 0 }, - }; - expect(getRangeInString(content, range)).toBe(""); - }); - - test("should handle invalid range (start line > end line)", () => { - const range = { - start: { line: 3, character: 0 }, - end: { line: 2, character: 0 }, - }; - expect(getRangeInString(content, range)).toBe(""); - }); - - test("should handle invalid range (start character > end character on same line)", () => { - const range = { - start: { line: 1, character: 5 }, - end: { line: 1, character: 2 }, - }; - expect(getRangeInString(content, range)).toBe(""); - }); - - test("should handle range that starts and ends at the same line but different characters", () => { - const range = { - start: { line: 1, character: 2 }, - end: { line: 1, character: 6 }, - }; - expect(getRangeInString(content, range)).toBe("ne 2"); - }); - - test("should handle range that starts and ends at the same line and same characters", () => { - const range = { - start: { line: 1, character: 2 }, - end: { line: 1, character: 2 }, - }; - expect(getRangeInString(content, range)).toBe("n"); - }); -}); diff --git a/core/test/util/ranges/intersection.test.ts b/core/test/util/ranges/intersection.test.ts deleted file mode 100644 index 397dbc1a8..000000000 --- a/core/test/util/ranges/intersection.test.ts +++ /dev/null @@ -1,123 +0,0 @@ -// This file is generated by Continue - -import { intersection } from "../../../util/ranges"; - -interface Position { - line: number; - character: number; -} - -interface Range { - start: Position; - end: Position; -} - -describe("intersection", () => { - let rangeA: Range; - let rangeB: Range; - - beforeEach(() => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 3, character: 5 }, - }; - - rangeB = { - start: { line: 2, character: 2 }, - end: { line: 4, character: 0 }, - }; - }); - - test("returns correct intersection for overlapping ranges", () => { - const result = intersection(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 2, character: 2 }, - end: { line: 3, character: 5 }, - }); - }); - - test("returns null for non-overlapping ranges", () => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 2, character: 0 }, - }; - - rangeB = { - start: { line: 3, character: 0 }, - end: { line: 4, character: 0 }, - }; - - const result = intersection(rangeA, rangeB); - expect(result).toBeNull(); - }); - - // TODO - test.skip("returns correct intersection for single line overlap", () => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 1, character: 5 }, - }; - - rangeB = { - start: { line: 1, character: 3 }, - end: { line: 2, character: 0 }, - }; - - const result = intersection(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 1, character: 3 }, - end: { line: 1, character: 5 }, - }); - }); - - test("returns null for single line non-overlapping ranges", () => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 1, character: 2 }, - }; - - rangeB = { - start: { line: 1, character: 3 }, - end: { line: 1, character: 5 }, - }; - - const result = intersection(rangeA, rangeB); - expect(result).toBeNull(); - }); - - test("returns correct intersection when one range is fully within another", () => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 4, character: 5 }, - }; - - rangeB = { - start: { line: 2, character: 2 }, - end: { line: 3, character: 3 }, - }; - - const result = intersection(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 2, character: 2 }, - end: { line: 3, character: 3 }, - }); - }); - - test("returns correct intersection when ranges touch at the edge", () => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 2, character: 0 }, - }; - - rangeB = { - start: { line: 2, character: 0 }, - end: { line: 3, character: 0 }, - }; - - const result = intersection(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 2, character: 0 }, - end: { line: 2, character: 0 }, - }); - }); -}); diff --git a/core/test/util/ranges/maxMinPosition.test.ts b/core/test/util/ranges/maxMinPosition.test.ts deleted file mode 100644 index 0468df1cd..000000000 --- a/core/test/util/ranges/maxMinPosition.test.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { maxPosition, minPosition } from "../../../util/ranges"; - -// This file is generated by Continue -interface Position { - line: number; - character: number; -} - -describe("Position comparison functions", () => { - let pos1: Position; - let pos2: Position; - let pos3: Position; - let pos4: Position; - - beforeAll(() => { - // Setup: Initializing positions - pos1 = { line: 1, character: 5 }; - pos2 = { line: 2, character: 3 }; - pos3 = { line: 1, character: 7 }; - pos4 = { line: 2, character: 3 }; // Same as pos2 to test equality - }); - - describe("maxPosition", () => { - it("should return the position with the greater line number", () => { - expect(maxPosition(pos1, pos2)).toEqual(pos2); - }); - - it("should return the position with the greater character number when lines are equal", () => { - expect(maxPosition(pos1, pos3)).toEqual(pos3); - }); - - it("should return the first position when both positions are equal", () => { - expect(maxPosition(pos2, pos4)).toEqual(pos2); - }); - - it("should handle positions with negative line numbers", () => { - const posNegative = { line: -1, character: 0 }; - expect(maxPosition(posNegative, pos1)).toEqual(pos1); - }); - - it("should handle positions with negative character numbers", () => { - const posNegativeChar = { line: 1, character: -1 }; - expect(maxPosition(posNegativeChar, pos1)).toEqual(pos1); - }); - }); - - describe("minPosition", () => { - it("should return the position with the lesser line number", () => { - expect(minPosition(pos1, pos2)).toEqual(pos1); - }); - - it("should return the position with the lesser character number when lines are equal", () => { - expect(minPosition(pos1, pos3)).toEqual(pos1); - }); - - it("should return the first position when both positions are equal", () => { - expect(minPosition(pos2, pos4)).toEqual(pos2); - }); - - it("should handle positions with negative line numbers", () => { - const posNegative = { line: -1, character: 0 }; - expect(minPosition(posNegative, pos1)).toEqual(posNegative); - }); - - it("should handle positions with negative character numbers", () => { - const posNegativeChar = { line: 1, character: -1 }; - expect(minPosition(posNegativeChar, pos1)).toEqual(posNegativeChar); - }); - }); -}); diff --git a/core/test/util/ranges/union.test.ts b/core/test/util/ranges/union.test.ts deleted file mode 100644 index 9d06a97b4..000000000 --- a/core/test/util/ranges/union.test.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { union } from "../../../util/ranges"; - -// This file is generated by Continue -interface Position { - line: number; - character: number; -} - -interface Range { - start: Position; - end: Position; -} - -describe("union", () => { - let rangeA: Range; - let rangeB: Range; - - beforeEach(() => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 3, character: 5 }, - }; - - rangeB = { - start: { line: 2, character: 3 }, - end: { line: 4, character: 2 }, - }; - }); - - test("should return the union of two overlapping ranges", () => { - const result = union(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 1, character: 0 }, - end: { line: 4, character: 2 }, - }); - }); - - test("should return the union when ranges are identical", () => { - const result = union(rangeA, rangeA); - expect(result).toEqual(rangeA); - }); - - test("should return the union when ranges do not overlap but are adjacent", () => { - rangeB = { - start: { line: 3, character: 5 }, - end: { line: 4, character: 2 }, - }; - const result = union(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 1, character: 0 }, - end: { line: 4, character: 2 }, - }); - }); - - test("should return the union when one range is completely within the other", () => { - rangeB = { - start: { line: 2, character: 1 }, - end: { line: 2, character: 4 }, - }; - const result = union(rangeA, rangeB); - expect(result).toEqual(rangeA); - }); - - test("should return the union when ranges do not overlap and are not adjacent", () => { - rangeB = { - start: { line: 4, character: 3 }, - end: { line: 5, character: 1 }, - }; - const result = union(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 1, character: 0 }, - end: { line: 5, character: 1 }, - }); - }); - - // TODO - test.skip("should handle edge case where start and end lines are the same", () => { - rangeA = { - start: { line: 1, character: 0 }, - end: { line: 1, character: 5 }, - }; - rangeB = { - start: { line: 1, character: 3 }, - end: { line: 1, character: 7 }, - }; - const result = union(rangeA, rangeB); - expect(result).toEqual({ - start: { line: 1, character: 0 }, - end: { line: 1, character: 7 }, - }); - }); -}); diff --git a/core/util/chatDescriber.ts b/core/util/chatDescriber.ts index b52fd7696..e44ec85a0 100644 --- a/core/util/chatDescriber.ts +++ b/core/util/chatDescriber.ts @@ -4,20 +4,7 @@ import { removeQuotesAndEscapes } from "."; import type { FromCoreProtocol, ToCoreProtocol } from "../protocol"; import type { IMessenger } from "./messenger"; - -/** - * Removes code blocks from a message. - * - * Return modified message text. - */ -function removeCodeBlocksAndTrim(msgText: string): string { - const codeBlockRegex = /```[\s\S]*?```/g; - - // Remove code blocks from the message text - const textWithoutCodeBlocks = msgText.replace(codeBlockRegex, ""); - - return textWithoutCodeBlocks.trim(); -} +import { removeCodeBlocksAndTrim } from "./markdown"; export class ChatDescriber { static prompt: string | undefined = diff --git a/core/test/util/history.test.ts b/core/util/history.test.ts similarity index 96% rename from core/test/util/history.test.ts rename to core/util/history.test.ts index 270e81248..048087564 100644 --- a/core/test/util/history.test.ts +++ b/core/util/history.test.ts @@ -1,8 +1,8 @@ import { v4 as uuidv4 } from "uuid"; -import { Session } from "../.."; -import historyManager from "../../util/history"; -import { getSessionFilePath } from "../../util/paths"; +import { Session } from ".."; +import historyManager from "./history"; +import { getSessionFilePath } from "./paths"; const sessionId = uuidv4(); const testSession: Session = { diff --git a/core/util/markdown.ts b/core/util/markdown.ts new file mode 100644 index 000000000..f1cb8929c --- /dev/null +++ b/core/util/markdown.ts @@ -0,0 +1,13 @@ +/** + * Removes code blocks from a message. + * + * Return modified message text. + */ +export function removeCodeBlocksAndTrim(text: string): string { + const codeBlockRegex = /```[\s\S]*?```/g; + + // Remove code blocks from the message text + const textWithoutCodeBlocks = text.replace(codeBlockRegex, ""); + + return textWithoutCodeBlocks.trim(); +} diff --git a/core/util/tts.ts b/core/util/tts.ts index efae302c2..bf62c6e29 100644 --- a/core/util/tts.ts +++ b/core/util/tts.ts @@ -1,6 +1,8 @@ import { exec, ChildProcess } from "child_process"; import os from "node:os"; +import { removeCodeBlocksAndTrim } from "./markdown"; + import type { IMessenger } from "./messenger"; import type { FromCoreProtocol, ToCoreProtocol } from "../protocol"; @@ -8,27 +10,13 @@ import type { FromCoreProtocol, ToCoreProtocol } from "../protocol"; // a zombie after executing .kill() const ttsKillTimeout: number = 5000; -/** - * Removes code blocks from a message. - * - * Return modified message text. - */ -function removeCodeBlocks(msgText: string): string { - const codeBlockRegex = /```[\s\S]*?```/g; - - // Remove code blocks from the message text - const textWithoutCodeBlocks = msgText.replace(codeBlockRegex, ""); - - return textWithoutCodeBlocks.trim(); -} - /** * Cleans a message text to safely be used in 'exec' context on host. * * Return modified message text. */ -function sanitizeMessageForTTS(message: string): string { - message = removeCodeBlocks(message); +export function sanitizeMessageForTTS(message: string): string { + message = removeCodeBlocksAndTrim(message); // Remove or replace problematic characters message = message diff --git a/core/util/withExponentialBackoff.test.ts b/core/util/withExponentialBackoff.test.ts deleted file mode 100644 index 07298dfe7..000000000 --- a/core/util/withExponentialBackoff.test.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { - withExponentialBackoff, - RETRY_AFTER_HEADER, -} from "./withExponentialBackoff"; -const MAX_RETRIES = 4; -const INITIAL_DELAY = 0.01; // so the tests run fast - -describe("withExponentialBackoff", () => { - // beforeEach(() => { - // jest.useFakeTimers(); - // jest.clearAllMocks(); - // }); - - // afterEach(() => { - // jest.useRealTimers(); - // }); - - it("should return result on first successful API call", async () => { - const apiCall = jest.fn().mockResolvedValue("success"); - - const result = await withExponentialBackoff(apiCall, MAX_RETRIES); - - expect(result).toBe("success"); - expect(apiCall).toHaveBeenCalledTimes(1); - }); - it("should retry on API rate limit and succeed", async () => { - const apiCall = jest - .fn() - .mockRejectedValueOnce({ - response: { - status: 429, - headers: new Map([[RETRY_AFTER_HEADER, "1"]]), - }, - }) - .mockResolvedValue("success"); - - const start = Date.now(); - - const result = await withExponentialBackoff(apiCall, MAX_RETRIES); - - const duration = (Date.now() - start) / 1000; - - expect(result).toBe("success"); - expect(apiCall).toHaveBeenCalledTimes(2); - expect(duration).toBeGreaterThanOrEqual(1); - }); - it("should stop retrying after maxRetries and throw error", async () => { - const apiCall = jest.fn().mockRejectedValue({ - response: { - status: 429, - headers: new Map(), - }, - }); - - await expect( - withExponentialBackoff(apiCall, MAX_RETRIES, INITIAL_DELAY), - ).rejects.toThrow("Failed to make API call after multiple retries"); - expect(apiCall).toHaveBeenCalledTimes(MAX_RETRIES); - }); - - it("should throw on non-rate limit errors", async () => { - const apiCall = jest.fn().mockRejectedValue(new Error("Server Error")); - - await expect(withExponentialBackoff(apiCall, MAX_RETRIES)).rejects.toThrow( - "Server Error", - ); - expect(apiCall).toHaveBeenCalledTimes(1); - }); -}); From 520e9dc3b1f482de961deca74fce8391dc4a7f8e Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:22:25 -0800 Subject: [PATCH 062/113] core util prompt update --- .continue/prompts/core-util-test.prompt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.continue/prompts/core-util-test.prompt b/.continue/prompts/core-util-test.prompt index 3985432dc..c4175583b 100644 --- a/.continue/prompts/core-util-test.prompt +++ b/.continue/prompts/core-util-test.prompt @@ -4,22 +4,24 @@ description: Generate unit tests for core utilities Write jest tests for the provided code. Use jest version ^29 (e.g. jest 29.7.0) -Do NOT write tests for core/test/util/fixtures.ts` or `core/gui/src/components/mainInput/types.d.ts`, only use them as helpers for testing other files. Use best practices. Be clear and consise. Aim for 100% code coverage where reasonable. Multiple tests can be written, split up tests for best clarity and readability. Only use typescript, and if the file/code is not typescript, warn the user. Use given types to generate mock data if needed. -Additional types can be imported from @core/gui/src/components/mainInput/types.d.ts +Additional types can be imported from @core/index.d.ts If any needed type declaration is still not found, warn the user. -Existing test fixtures can be found in: -@core/test/util/fixtures.ts +Existing test fixtures can be found in @core/test/util/fixtures.ts - import and use `testIde` for any IDE type needs - import and use `testControlPlaneClient` for any ControlPlaneClient needs - import and use `testConfigHandler` for any ConfigHandler needs - import and use `ideSettingsPromise` for any IdeSettings needs +Do NOT write tests for `core/test/util/fixtures.ts` or `core/index.d.ts`, only use them as helpers for testing other files. If no other files are attached, just warn the user. + // This note is for if using edit mode to encourage it to create new files The tests are to be put in a new file with the same filepath but with a .test.ts extension rather than a .ts extension +Avoid casting functions to the jest.Mock type. Instead, use `jest.mocked(fn)` +Use double quotes (or backticks if needed) for strings, and observe eslint import order standards \ No newline at end of file From e284cecd6584b14bee43794d0d238d64c734a10a Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 4 Dec 2024 17:29:06 -0800 Subject: [PATCH 063/113] fix: missing package --- .github/workflows/pr_checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 4d1b13a44..9d4828ac4 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -86,6 +86,7 @@ jobs: - name: Run VSCode e2e tests run: | cd extensions/vscode + npm run package npm run e2e:ci - name: core checks From d19411aa0bd5c6b3c0f44d11a4e97682d12dd1d1 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:30:13 -0800 Subject: [PATCH 064/113] revert testdir location for less file changes --- .continue/prompts/core-util-test.prompt | 2 +- core/autocomplete/filtering/test/filter.test.ts | 5 +---- core/config/ConfigHandler.test.ts | 2 +- core/context/providers/_context-providers.test.ts | 2 +- core/indexing/CodebaseIndexer.test.ts | 2 +- core/indexing/chunk/ChunkCodebaseIndex.test.ts | 2 +- core/indexing/test/indexing.ts | 2 +- core/indexing/walkDir.test.ts | 2 +- core/test/fixtures.ts | 2 +- .../test/testWorkspaceDir.ts => test/util/testDir.ts} | 0 10 files changed, 9 insertions(+), 12 deletions(-) rename core/{indexing/test/testWorkspaceDir.ts => test/util/testDir.ts} (100%) diff --git a/.continue/prompts/core-util-test.prompt b/.continue/prompts/core-util-test.prompt index c4175583b..2a3ca399e 100644 --- a/.continue/prompts/core-util-test.prompt +++ b/.continue/prompts/core-util-test.prompt @@ -13,7 +13,7 @@ Use given types to generate mock data if needed. Additional types can be imported from @core/index.d.ts If any needed type declaration is still not found, warn the user. -Existing test fixtures can be found in @core/test/util/fixtures.ts +Existing test fixtures can be found in @core/test/util/fixtures.ts - import and use `testIde` for any IDE type needs - import and use `testControlPlaneClient` for any ControlPlaneClient needs - import and use `testConfigHandler` for any ConfigHandler needs diff --git a/core/autocomplete/filtering/test/filter.test.ts b/core/autocomplete/filtering/test/filter.test.ts index 3f81962ca..e6c07b951 100644 --- a/core/autocomplete/filtering/test/filter.test.ts +++ b/core/autocomplete/filtering/test/filter.test.ts @@ -1,7 +1,4 @@ -import { - setUpTestDir, - tearDownTestDir, -} from "../../../indexing/test/testWorkspaceDir"; +import { setUpTestDir, tearDownTestDir } from "../../../test/util/testDir"; import { TEST_CASES_WITH_DIFF, TEST_CASES_WITHOUT_DIFF } from "./testCases"; import { diff --git a/core/config/ConfigHandler.test.ts b/core/config/ConfigHandler.test.ts index 90e07ba5c..7dbb3bbfd 100644 --- a/core/config/ConfigHandler.test.ts +++ b/core/config/ConfigHandler.test.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import { testConfigHandler } from "../test/fixtures"; -import { TEST_DIR } from "../indexing/test/testWorkspaceDir"; +import { TEST_DIR } from "../test/util/testDir"; import { getConfigTsPath } from "../util/paths"; import { defaultConfig } from "./default"; diff --git a/core/context/providers/_context-providers.test.ts b/core/context/providers/_context-providers.test.ts index 8379083a9..2603a2d85 100644 --- a/core/context/providers/_context-providers.test.ts +++ b/core/context/providers/_context-providers.test.ts @@ -9,7 +9,7 @@ import { ConfigHandler } from "../../config/ConfigHandler"; import { contextProviderClassFromName } from "."; import { ControlPlaneClient } from "../../control-plane/client"; import FileSystemIde from "../../util/filesystem"; -import { TEST_DIR } from "../../indexing/test/testWorkspaceDir"; +import { TEST_DIR } from "../../test/util/testDir"; const CONTEXT_PROVIDERS_TO_TEST: ContextProviderWithParams[] = [ { name: "diff", params: {} }, diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index edd654dc7..5ed534d04 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -11,7 +11,7 @@ import { setUpTestDir, tearDownTestDir, TEST_DIR, -} from "./test/testWorkspaceDir.js"; +} from "../test/util/testDir.js"; import { getIndexSqlitePath } from "../util/paths.js"; import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js"; diff --git a/core/indexing/chunk/ChunkCodebaseIndex.test.ts b/core/indexing/chunk/ChunkCodebaseIndex.test.ts index b5f373648..13cefad91 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.test.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.test.ts @@ -8,7 +8,7 @@ import { testContinueServerClient, updateIndexAndAwaitGenerator, } from "../test/indexing"; -import { addToTestDir } from "../test/testWorkspaceDir"; +import { addToTestDir } from "../../test/util/testDir"; import { DatabaseConnection, SqliteDb } from "../refreshIndex"; import { IndexResultType } from "../types"; diff --git a/core/indexing/test/indexing.ts b/core/indexing/test/indexing.ts index 6bc643e66..3cd476dde 100644 --- a/core/indexing/test/indexing.ts +++ b/core/indexing/test/indexing.ts @@ -7,7 +7,7 @@ import { tagToString } from "../refreshIndex"; import { CodebaseIndex, PathAndCacheKey, RefreshIndexResults } from "../types"; import { testIde } from "../../test/fixtures"; -import { addToTestDir, TEST_DIR } from "./testWorkspaceDir"; +import { addToTestDir, TEST_DIR } from "../../test/util/testDir"; export const mockFilename = "test.py"; export const mockPathAndCacheKey = { diff --git a/core/indexing/walkDir.test.ts b/core/indexing/walkDir.test.ts index 9819de571..748e958e9 100644 --- a/core/indexing/walkDir.test.ts +++ b/core/indexing/walkDir.test.ts @@ -6,7 +6,7 @@ import { setUpTestDir, tearDownTestDir, addToTestDir, -} from "./test/testWorkspaceDir"; +} from "../test/util/testDir"; import FileSystemIde from "../util/filesystem"; const ide = new FileSystemIde(TEST_DIR); diff --git a/core/test/fixtures.ts b/core/test/fixtures.ts index 8b75de75d..2e27a8567 100644 --- a/core/test/fixtures.ts +++ b/core/test/fixtures.ts @@ -2,7 +2,7 @@ import { ConfigHandler } from "../config/ConfigHandler"; import { ControlPlaneClient } from "../control-plane/client"; import FileSystemIde from "../util/filesystem"; -import { TEST_DIR } from "../indexing/test/testWorkspaceDir"; +import { TEST_DIR } from "./util/testDir"; export const testIde = new FileSystemIde(TEST_DIR); diff --git a/core/indexing/test/testWorkspaceDir.ts b/core/test/util/testDir.ts similarity index 100% rename from core/indexing/test/testWorkspaceDir.ts rename to core/test/util/testDir.ts From a58b0ff7b5c54f22d7e39dbf9a2715c8837483ab Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:31:38 -0800 Subject: [PATCH 065/113] revert fixtures location for less file changes --- .../context/root-path-context/test/testUtils.ts | 2 +- core/autocomplete/filtering/test/util.ts | 2 +- core/config/ConfigHandler.test.ts | 2 +- core/indexing/CodeSnippetsIndex.test.ts | 2 +- core/indexing/CodebaseIndexer.test.ts | 2 +- core/indexing/LanceDbIndex.test.ts | 2 +- core/indexing/chunk/ChunkCodebaseIndex.test.ts | 2 +- core/indexing/docs/DocsCrawler.skip.ts | 2 +- core/indexing/test/indexing.ts | 2 +- core/test/{ => util}/fixtures.ts | 8 ++++---- 10 files changed, 13 insertions(+), 13 deletions(-) rename core/test/{ => util}/fixtures.ts (61%) diff --git a/core/autocomplete/context/root-path-context/test/testUtils.ts b/core/autocomplete/context/root-path-context/test/testUtils.ts index 207b1d6d4..7a5c22aba 100644 --- a/core/autocomplete/context/root-path-context/test/testUtils.ts +++ b/core/autocomplete/context/root-path-context/test/testUtils.ts @@ -4,7 +4,7 @@ import path from "path"; import Parser from "web-tree-sitter"; import { Position } from "../../../.."; -import { testIde } from "../../../../test/fixtures"; +import { testIde } from "../../../../test/util/fixtures"; import { getAst, getTreePathAtCursor } from "../../../util/ast"; import { ImportDefinitionsService } from "../../ImportDefinitionsService"; import { RootPathContextService } from "../RootPathContextService"; diff --git a/core/autocomplete/filtering/test/util.ts b/core/autocomplete/filtering/test/util.ts index a052aace2..8adaa101a 100644 --- a/core/autocomplete/filtering/test/util.ts +++ b/core/autocomplete/filtering/test/util.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import Mock from "../../../llm/llms/Mock"; -import { testConfigHandler, testIde } from "../../../test/fixtures"; +import { testConfigHandler, testIde } from "../../../test/util/fixtures"; import { CompletionProvider } from "../../CompletionProvider"; import { AutocompleteInput } from "../../util/types"; diff --git a/core/config/ConfigHandler.test.ts b/core/config/ConfigHandler.test.ts index 7dbb3bbfd..26de42ec7 100644 --- a/core/config/ConfigHandler.test.ts +++ b/core/config/ConfigHandler.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import path from "node:path"; -import { testConfigHandler } from "../test/fixtures"; +import { testConfigHandler } from "../test/util/fixtures"; import { TEST_DIR } from "../test/util/testDir"; import { getConfigTsPath } from "../util/paths"; diff --git a/core/indexing/CodeSnippetsIndex.test.ts b/core/indexing/CodeSnippetsIndex.test.ts index 814927725..c77f9903d 100644 --- a/core/indexing/CodeSnippetsIndex.test.ts +++ b/core/indexing/CodeSnippetsIndex.test.ts @@ -1,6 +1,6 @@ import { jest } from "@jest/globals"; -import { testIde } from "../test/fixtures"; +import { testIde } from "../test/util/fixtures"; import { insertMockChunks, mockPathAndCacheKey, diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 5ed534d04..483c178a0 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -5,7 +5,7 @@ import path from "node:path"; import { jest } from "@jest/globals"; import { ContinueServerClient } from "../continueServer/stubs/client.js"; -import { testConfigHandler, testIde } from "../test/fixtures.js"; +import { testConfigHandler, testIde } from "../test/util/fixtures.js"; import { addToTestDir, setUpTestDir, diff --git a/core/indexing/LanceDbIndex.test.ts b/core/indexing/LanceDbIndex.test.ts index 1d15117fd..c3584f3db 100644 --- a/core/indexing/LanceDbIndex.test.ts +++ b/core/indexing/LanceDbIndex.test.ts @@ -1,7 +1,7 @@ import { jest } from "@jest/globals"; import lance from "vectordb"; -import { testConfigHandler, testIde } from "../test/fixtures"; +import { testConfigHandler, testIde } from "../test/util/fixtures"; import { mockPathAndCacheKey, mockTag, diff --git a/core/indexing/chunk/ChunkCodebaseIndex.test.ts b/core/indexing/chunk/ChunkCodebaseIndex.test.ts index 13cefad91..7b233663a 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.test.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.test.ts @@ -1,6 +1,6 @@ import { jest } from "@jest/globals"; -import { testIde } from "../../test/fixtures"; +import { testIde } from "../../test/util/fixtures"; import { mockFileContents, mockFilename, diff --git a/core/indexing/docs/DocsCrawler.skip.ts b/core/indexing/docs/DocsCrawler.skip.ts index 97226c296..57d712fed 100644 --- a/core/indexing/docs/DocsCrawler.skip.ts +++ b/core/indexing/docs/DocsCrawler.skip.ts @@ -3,7 +3,7 @@ import os from "os"; import { jest } from "@jest/globals"; import { ContinueConfig } from "../.."; -import { testConfigHandler } from "../../test/fixtures"; +import { testConfigHandler } from "../../test/util/fixtures"; import FileSystemIde from "../../util/filesystem"; import DocsCrawler, { ChromiumInstaller, type PageData } from "./DocsCrawler"; diff --git a/core/indexing/test/indexing.ts b/core/indexing/test/indexing.ts index 3cd476dde..1506231ec 100644 --- a/core/indexing/test/indexing.ts +++ b/core/indexing/test/indexing.ts @@ -6,7 +6,7 @@ import { ChunkCodebaseIndex } from "../chunk/ChunkCodebaseIndex"; import { tagToString } from "../refreshIndex"; import { CodebaseIndex, PathAndCacheKey, RefreshIndexResults } from "../types"; -import { testIde } from "../../test/fixtures"; +import { testIde } from "../../test/util/fixtures"; import { addToTestDir, TEST_DIR } from "../../test/util/testDir"; export const mockFilename = "test.py"; diff --git a/core/test/fixtures.ts b/core/test/util/fixtures.ts similarity index 61% rename from core/test/fixtures.ts rename to core/test/util/fixtures.ts index 2e27a8567..e0aa06d14 100644 --- a/core/test/fixtures.ts +++ b/core/test/util/fixtures.ts @@ -1,8 +1,8 @@ -import { ConfigHandler } from "../config/ConfigHandler"; -import { ControlPlaneClient } from "../control-plane/client"; -import FileSystemIde from "../util/filesystem"; +import { ConfigHandler } from "../../config/ConfigHandler"; +import { ControlPlaneClient } from "../../control-plane/client"; +import FileSystemIde from "../../util/filesystem"; -import { TEST_DIR } from "./util/testDir"; +import { TEST_DIR } from "./testDir"; export const testIde = new FileSystemIde(TEST_DIR); From af5d38e653354c93c38c43bf98df3dc95355796a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:33:58 -0800 Subject: [PATCH 066/113] move some stuff back --- .continue/prompts/core-util-test.prompt | 2 +- .../context/root-path-context/test/testUtils.ts | 2 +- core/autocomplete/filtering/test/filter.test.ts | 2 +- core/autocomplete/filtering/test/util.ts | 2 +- core/config/ConfigHandler.test.ts | 4 ++-- core/context/providers/_context-providers.test.ts | 2 +- core/indexing/CodeSnippetsIndex.test.ts | 2 +- core/indexing/CodebaseIndexer.test.ts | 4 ++-- core/indexing/LanceDbIndex.test.ts | 2 +- core/indexing/chunk/ChunkCodebaseIndex.test.ts | 4 ++-- core/indexing/docs/DocsCrawler.skip.ts | 2 +- core/indexing/test/indexing.ts | 4 ++-- core/indexing/walkDir.test.ts | 2 +- core/package.json | 2 +- core/test/{util => }/fixtures.ts | 6 +++--- core/test/{util => }/testDir.ts | 0 16 files changed, 21 insertions(+), 21 deletions(-) rename core/test/{util => }/fixtures.ts (68%) rename core/test/{util => }/testDir.ts (100%) diff --git a/.continue/prompts/core-util-test.prompt b/.continue/prompts/core-util-test.prompt index 2a3ca399e..6cc7351a2 100644 --- a/.continue/prompts/core-util-test.prompt +++ b/.continue/prompts/core-util-test.prompt @@ -13,7 +13,7 @@ Use given types to generate mock data if needed. Additional types can be imported from @core/index.d.ts If any needed type declaration is still not found, warn the user. -Existing test fixtures can be found in @core/test/util/fixtures.ts +Existing test fixtures can be found in @core/test/fixtures.ts - import and use `testIde` for any IDE type needs - import and use `testControlPlaneClient` for any ControlPlaneClient needs - import and use `testConfigHandler` for any ConfigHandler needs diff --git a/core/autocomplete/context/root-path-context/test/testUtils.ts b/core/autocomplete/context/root-path-context/test/testUtils.ts index 7a5c22aba..207b1d6d4 100644 --- a/core/autocomplete/context/root-path-context/test/testUtils.ts +++ b/core/autocomplete/context/root-path-context/test/testUtils.ts @@ -4,7 +4,7 @@ import path from "path"; import Parser from "web-tree-sitter"; import { Position } from "../../../.."; -import { testIde } from "../../../../test/util/fixtures"; +import { testIde } from "../../../../test/fixtures"; import { getAst, getTreePathAtCursor } from "../../../util/ast"; import { ImportDefinitionsService } from "../../ImportDefinitionsService"; import { RootPathContextService } from "../RootPathContextService"; diff --git a/core/autocomplete/filtering/test/filter.test.ts b/core/autocomplete/filtering/test/filter.test.ts index e6c07b951..594e061ad 100644 --- a/core/autocomplete/filtering/test/filter.test.ts +++ b/core/autocomplete/filtering/test/filter.test.ts @@ -1,4 +1,4 @@ -import { setUpTestDir, tearDownTestDir } from "../../../test/util/testDir"; +import { setUpTestDir, tearDownTestDir } from "../../../test/testDir"; import { TEST_CASES_WITH_DIFF, TEST_CASES_WITHOUT_DIFF } from "./testCases"; import { diff --git a/core/autocomplete/filtering/test/util.ts b/core/autocomplete/filtering/test/util.ts index 8adaa101a..a052aace2 100644 --- a/core/autocomplete/filtering/test/util.ts +++ b/core/autocomplete/filtering/test/util.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import Mock from "../../../llm/llms/Mock"; -import { testConfigHandler, testIde } from "../../../test/util/fixtures"; +import { testConfigHandler, testIde } from "../../../test/fixtures"; import { CompletionProvider } from "../../CompletionProvider"; import { AutocompleteInput } from "../../util/types"; diff --git a/core/config/ConfigHandler.test.ts b/core/config/ConfigHandler.test.ts index 26de42ec7..e7d90f492 100644 --- a/core/config/ConfigHandler.test.ts +++ b/core/config/ConfigHandler.test.ts @@ -1,8 +1,8 @@ import fs from "node:fs"; import path from "node:path"; -import { testConfigHandler } from "../test/util/fixtures"; -import { TEST_DIR } from "../test/util/testDir"; +import { testConfigHandler } from "../test/fixtures"; +import { TEST_DIR } from "../test/testDir"; import { getConfigTsPath } from "../util/paths"; import { defaultConfig } from "./default"; diff --git a/core/context/providers/_context-providers.test.ts b/core/context/providers/_context-providers.test.ts index 2603a2d85..7e0fdbd73 100644 --- a/core/context/providers/_context-providers.test.ts +++ b/core/context/providers/_context-providers.test.ts @@ -9,7 +9,7 @@ import { ConfigHandler } from "../../config/ConfigHandler"; import { contextProviderClassFromName } from "."; import { ControlPlaneClient } from "../../control-plane/client"; import FileSystemIde from "../../util/filesystem"; -import { TEST_DIR } from "../../test/util/testDir"; +import { TEST_DIR } from "../../test/testDir"; const CONTEXT_PROVIDERS_TO_TEST: ContextProviderWithParams[] = [ { name: "diff", params: {} }, diff --git a/core/indexing/CodeSnippetsIndex.test.ts b/core/indexing/CodeSnippetsIndex.test.ts index c77f9903d..814927725 100644 --- a/core/indexing/CodeSnippetsIndex.test.ts +++ b/core/indexing/CodeSnippetsIndex.test.ts @@ -1,6 +1,6 @@ import { jest } from "@jest/globals"; -import { testIde } from "../test/util/fixtures"; +import { testIde } from "../test/fixtures"; import { insertMockChunks, mockPathAndCacheKey, diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 483c178a0..950e23ffd 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -5,13 +5,13 @@ import path from "node:path"; import { jest } from "@jest/globals"; import { ContinueServerClient } from "../continueServer/stubs/client.js"; -import { testConfigHandler, testIde } from "../test/util/fixtures.js"; +import { testConfigHandler, testIde } from "../test/fixtures.js"; import { addToTestDir, setUpTestDir, tearDownTestDir, TEST_DIR, -} from "../test/util/testDir.js"; +} from "../test/testDir.js"; import { getIndexSqlitePath } from "../util/paths.js"; import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js"; diff --git a/core/indexing/LanceDbIndex.test.ts b/core/indexing/LanceDbIndex.test.ts index c3584f3db..1d15117fd 100644 --- a/core/indexing/LanceDbIndex.test.ts +++ b/core/indexing/LanceDbIndex.test.ts @@ -1,7 +1,7 @@ import { jest } from "@jest/globals"; import lance from "vectordb"; -import { testConfigHandler, testIde } from "../test/util/fixtures"; +import { testConfigHandler, testIde } from "../test/fixtures"; import { mockPathAndCacheKey, mockTag, diff --git a/core/indexing/chunk/ChunkCodebaseIndex.test.ts b/core/indexing/chunk/ChunkCodebaseIndex.test.ts index 7b233663a..3f7904991 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.test.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.test.ts @@ -1,6 +1,6 @@ import { jest } from "@jest/globals"; -import { testIde } from "../../test/util/fixtures"; +import { testIde } from "../../test/fixtures"; import { mockFileContents, mockFilename, @@ -8,7 +8,7 @@ import { testContinueServerClient, updateIndexAndAwaitGenerator, } from "../test/indexing"; -import { addToTestDir } from "../../test/util/testDir"; +import { addToTestDir } from "../../test/testDir"; import { DatabaseConnection, SqliteDb } from "../refreshIndex"; import { IndexResultType } from "../types"; diff --git a/core/indexing/docs/DocsCrawler.skip.ts b/core/indexing/docs/DocsCrawler.skip.ts index 57d712fed..97226c296 100644 --- a/core/indexing/docs/DocsCrawler.skip.ts +++ b/core/indexing/docs/DocsCrawler.skip.ts @@ -3,7 +3,7 @@ import os from "os"; import { jest } from "@jest/globals"; import { ContinueConfig } from "../.."; -import { testConfigHandler } from "../../test/util/fixtures"; +import { testConfigHandler } from "../../test/fixtures"; import FileSystemIde from "../../util/filesystem"; import DocsCrawler, { ChromiumInstaller, type PageData } from "./DocsCrawler"; diff --git a/core/indexing/test/indexing.ts b/core/indexing/test/indexing.ts index 1506231ec..413c37e75 100644 --- a/core/indexing/test/indexing.ts +++ b/core/indexing/test/indexing.ts @@ -6,8 +6,8 @@ import { ChunkCodebaseIndex } from "../chunk/ChunkCodebaseIndex"; import { tagToString } from "../refreshIndex"; import { CodebaseIndex, PathAndCacheKey, RefreshIndexResults } from "../types"; -import { testIde } from "../../test/util/fixtures"; -import { addToTestDir, TEST_DIR } from "../../test/util/testDir"; +import { testIde } from "../../test/fixtures"; +import { addToTestDir, TEST_DIR } from "../../test/testDir"; export const mockFilename = "test.py"; export const mockPathAndCacheKey = { diff --git a/core/indexing/walkDir.test.ts b/core/indexing/walkDir.test.ts index 748e958e9..25ffdfc37 100644 --- a/core/indexing/walkDir.test.ts +++ b/core/indexing/walkDir.test.ts @@ -6,7 +6,7 @@ import { setUpTestDir, tearDownTestDir, addToTestDir, -} from "../test/util/testDir"; +} from "../test/testDir"; import FileSystemIde from "../util/filesystem"; const ide = new FileSystemIde(TEST_DIR); diff --git a/core/package.json b/core/package.json index c18847ecf..b02671dba 100644 --- a/core/package.json +++ b/core/package.json @@ -59,7 +59,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/core/test/util/fixtures.ts b/core/test/fixtures.ts similarity index 68% rename from core/test/util/fixtures.ts rename to core/test/fixtures.ts index e0aa06d14..add71d029 100644 --- a/core/test/util/fixtures.ts +++ b/core/test/fixtures.ts @@ -1,6 +1,6 @@ -import { ConfigHandler } from "../../config/ConfigHandler"; -import { ControlPlaneClient } from "../../control-plane/client"; -import FileSystemIde from "../../util/filesystem"; +import { ConfigHandler } from "../config/ConfigHandler"; +import { ControlPlaneClient } from "../control-plane/client"; +import FileSystemIde from "../util/filesystem"; import { TEST_DIR } from "./testDir"; diff --git a/core/test/util/testDir.ts b/core/test/testDir.ts similarity index 100% rename from core/test/util/testDir.ts rename to core/test/testDir.ts From c98cf5fc569e6ef4d5989ff4e4449ff274e2b527 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:37:30 -0800 Subject: [PATCH 067/113] core util test cleanup --- core/package-lock.json | 2 +- core/util/chatDescriber.ts | 3 +-- core/util/index.ts | 14 ++++++++++++++ core/util/tts.ts | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 3a3f77c43..41aeca5cb 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -27,7 +27,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/core/util/chatDescriber.ts b/core/util/chatDescriber.ts index e44ec85a0..d4c7413ae 100644 --- a/core/util/chatDescriber.ts +++ b/core/util/chatDescriber.ts @@ -1,10 +1,9 @@ import { ILLM, LLMFullCompletionOptions } from ".."; -import { removeQuotesAndEscapes } from "."; +import { removeQuotesAndEscapes, removeCodeBlocksAndTrim } from "."; import type { FromCoreProtocol, ToCoreProtocol } from "../protocol"; import type { IMessenger } from "./messenger"; -import { removeCodeBlocksAndTrim } from "./markdown"; export class ChatDescriber { static prompt: string | undefined = diff --git a/core/util/index.ts b/core/util/index.ts index 7f46278f9..9a896baff 100644 --- a/core/util/index.ts +++ b/core/util/index.ts @@ -328,3 +328,17 @@ export function dedent(strings: TemplateStringsArray, ...values: any[]) { return lines.join("\n"); } + +/** + * Removes code blocks from a message. + * + * Return modified message text. + */ +export function removeCodeBlocksAndTrim(text: string): string { + const codeBlockRegex = /```[\s\S]*?```/g; + + // Remove code blocks from the message text + const textWithoutCodeBlocks = text.replace(codeBlockRegex, ""); + + return textWithoutCodeBlocks.trim(); +} diff --git a/core/util/tts.ts b/core/util/tts.ts index bf62c6e29..1fd41607c 100644 --- a/core/util/tts.ts +++ b/core/util/tts.ts @@ -1,7 +1,7 @@ import { exec, ChildProcess } from "child_process"; import os from "node:os"; -import { removeCodeBlocksAndTrim } from "./markdown"; +import { removeCodeBlocksAndTrim } from "."; import type { IMessenger } from "./messenger"; import type { FromCoreProtocol, ToCoreProtocol } from "../protocol"; From 1d932779cf8d827296ba9daecccc1d086470acc8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 17:45:36 -0800 Subject: [PATCH 068/113] fix chat tests failing --- gui/src/pages/gui/Chat.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 000a06f12..1c266d0b4 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -133,6 +133,9 @@ export function Chat() { const ideMessenger = useContext(IdeMessengerContext); const onboardingCard = useOnboardingCard(); const { showTutorialCard, closeTutorialCard } = useTutorialCard(); + const selectedModelTitle = useAppSelector( + (store) => store.config.defaultModelTitle, + ); const defaultModel = useAppSelector(selectDefaultModel); const ttsActive = useAppSelector((state) => state.ui.ttsActive); const active = useAppSelector((state) => state.session.isStreaming); @@ -284,16 +287,17 @@ export function Chat() { ); async function handleSingleRangeEditOrInsertion(editorState: JSONContent) { - const [contextItems, __, userInstructions] = await resolveEditorContent( + const [contextItems, __, userInstructions] = await resolveEditorContent({ editorState, - { + modifiers: { noContext: true, useCodebase: false, }, ideMessenger, - [], + defaultContextProviders: [], dispatch, - ); + selectedModelTitle, + }); const prompt = [ ...contextItems.map((item) => item.content), From 4f84e332aba8db369eb4a471b017af1210379a41 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Dec 2024 18:09:22 -0800 Subject: [PATCH 069/113] remove duplicate markdown file --- core/util/markdown.ts | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 core/util/markdown.ts diff --git a/core/util/markdown.ts b/core/util/markdown.ts deleted file mode 100644 index f1cb8929c..000000000 --- a/core/util/markdown.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Removes code blocks from a message. - * - * Return modified message text. - */ -export function removeCodeBlocksAndTrim(text: string): string { - const codeBlockRegex = /```[\s\S]*?```/g; - - // Remove code blocks from the message text - const textWithoutCodeBlocks = text.replace(codeBlockRegex, ""); - - return textWithoutCodeBlocks.trim(); -} From 629641a4adf2a1e2fe1c9a69fd431718b34c4263 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 4 Dec 2024 18:52:35 -0800 Subject: [PATCH 070/113] feat(jb): add plugin actions --- .gitignore | 4 +- .../actions/ContinuePluginActions.kt | 24 +++ .../auth/ContinueAuthDialog.kt | 2 +- .../src/main/resources/META-INF/plugin.xml | 47 ++++-- gui/src/components/AccountDialog.tsx | 158 +++++++++--------- .../components/dialogs/ConfirmationDialog.tsx | 33 ++-- gui/src/components/dialogs/index.tsx | 3 +- gui/src/context/Auth.tsx | 7 +- gui/src/pages/error.tsx | 19 ++- 9 files changed, 168 insertions(+), 129 deletions(-) diff --git a/.gitignore b/.gitignore index 9e783860d..7c18e6b16 100644 --- a/.gitignore +++ b/.gitignore @@ -167,4 +167,6 @@ extensions/intellij/.idea/** extensions/intellij/bin extensions/.continue-debug/ -*.vsix \ No newline at end of file +*.vsix + +binary/.continue \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt index 62fcfbc07..a7ce42fd0 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt @@ -123,4 +123,28 @@ class ViewHistoryAction : AnAction() { val continuePluginService = getContinuePluginService(e.project) ?: return continuePluginService.sendToWebview("viewHistory", null) } +} + +class OpenConfigAction : AnAction() { + override fun actionPerformed(e: AnActionEvent) { + val continuePluginService = getContinuePluginService(e.project) ?: return + val params = mapOf("profileId" to null) + continuePluginService.coreMessenger?.request("config/openProfile", params, null) { _ -> } + } +} + +class OpenMorePageAction : AnAction() { + override fun actionPerformed(e: AnActionEvent) { + val continuePluginService = getContinuePluginService(e.project) ?: return + continuePluginService.continuePluginWindow?.content?.components?.get(0)?.requestFocus() + val params = mapOf("path" to "/more", "toggle" to true) + continuePluginService.sendToWebview("navigateTo", params) + } +} + +class OpenAccountDialogAction : AnAction() { + override fun actionPerformed(e: AnActionEvent) { + val continuePluginService = getContinuePluginService(e.project) ?: return + continuePluginService.sendToWebview("openDialogMessage", "account") + } } \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt index 7197bf348..b8a862fad 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt @@ -12,7 +12,7 @@ class ContinueAuthDialog(private val onTokenEntered: (String) -> Unit) : DialogW init { init() - title = "Enter Continue Authentication Token" + title = "Continue authentication" } override fun createCenterPanel(): JComponent { diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index f42b5f7c4..6b4023e39 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -15,7 +15,7 @@ - + @@ -120,10 +120,10 @@ + text="New Session" + description="New Session"> - + - + + + + + + + + + + + + + + + + + + + + + - - - - - diff --git a/gui/src/components/AccountDialog.tsx b/gui/src/components/AccountDialog.tsx index cd9ef0b55..7d8239378 100644 --- a/gui/src/components/AccountDialog.tsx +++ b/gui/src/components/AccountDialog.tsx @@ -1,12 +1,12 @@ import { Listbox, Transition } from "@headlessui/react"; import { ChevronUpDownIcon } from "@heroicons/react/24/outline"; +import { UserCircleIcon } from "@heroicons/react/24/solid"; import { Fragment, useContext } from "react"; import styled from "styled-components"; import { Button, SecondaryButton, vscInputBackground, - vscInputBorder, vscListActiveBackground, vscListActiveForeground, } from "."; @@ -14,8 +14,6 @@ import { IdeMessengerContext } from "../context/IdeMessenger"; import { useAuth } from "../context/Auth"; import { setSelectedProfileId } from "../redux/slices/sessionSlice"; import { useDispatch } from "react-redux"; -import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; -import { NewSessionButton } from "./mainInput/NewSessionButton"; const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>` background-color: ${({ selected }) => @@ -29,7 +27,7 @@ const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>` } `; -function AccountDialog() { +export default function AccountDialog() { const ideMessenger = useContext(IdeMessengerContext); const { session, @@ -43,24 +41,27 @@ function AccountDialog() { // These shouldn't usually show but just to be safe if (!session?.account?.id) { return ( -
-

Account

-

Not signed in

- +
+

Account

+ + Signed out + +
); } if (!controlServerBetaEnabled) { return ( -
-

Account

+
+

Account

- Continue for teams is not enabled. You can enable it in your IDE - settings + Continue For Teams is not enabled. You can enable it in your IDE + settings.

Using local config.

-
); } @@ -73,83 +74,74 @@ function AccountDialog() { }; return ( -
-

Account

+
+
+

Account

+ + {session.account.label === "" ? ( + "Signed in" + ) : ( + <> + Signed in as{" "} + {session.account.label} + + )} + +
-

Select a workspace

+
+ Current workspace - - {({ open }) => ( -
- - {selectedProfile?.title} -
-
-
+ + {({ open }) => ( +
+ + {selectedProfile?.title} +
+
+
- - - {profiles.map((option, idx) => ( - -
- {option.title} + + + {profiles.map((option, idx) => ( + + + {option.title} + + + ))} + {profiles.length === 0 && ( +
+ No workspaces found
- - ))} - {profiles.length === 0 ? ( -
- No workspaces found -
- ) : null} -
-
-
- )} - -

- {session.account.label === "" - ? "Signed in" - : `Signed in as ${session.account.label}`} -

-
- + )} + + +
+ )} + +
+ +
+
); } - -export default AccountDialog; diff --git a/gui/src/components/dialogs/ConfirmationDialog.tsx b/gui/src/components/dialogs/ConfirmationDialog.tsx index f41f04a20..08950d363 100644 --- a/gui/src/components/dialogs/ConfirmationDialog.tsx +++ b/gui/src/components/dialogs/ConfirmationDialog.tsx @@ -1,23 +1,8 @@ import { useDispatch } from "react-redux"; import styled from "styled-components"; -import { Button, lightGray, SecondaryButton } from ".."; +import { Button, SecondaryButton } from ".."; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; -const GridDiv = styled.div` - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 8px; - align-items: center; - - > * { - grid-column: 2; - } - - > :nth-last-child(2):first-child { - grid-column: 1; - } -`; - interface ConfirmationDialogProps { onConfirm: () => void; onCancel?: () => void; @@ -31,14 +16,18 @@ function ConfirmationDialog(props: ConfirmationDialogProps) { const dispatch = useDispatch(); return ( -
-

{props.title ?? "Confirmation"}

-

{props.text}

+
+

+ {props.title ?? "Confirmation"} +

+

+ {props.text} +

- +
{!!props.hideCancelButton || ( { dispatch(setShowDialog(false)); dispatch(setDialogMessage(undefined)); @@ -57,7 +46,7 @@ function ConfirmationDialog(props: ConfirmationDialogProps) { > {props.confirmText ?? "Confirm"} - +
); } diff --git a/gui/src/components/dialogs/index.tsx b/gui/src/components/dialogs/index.tsx index 9bdbec5de..9e515d6cb 100644 --- a/gui/src/components/dialogs/index.tsx +++ b/gui/src/components/dialogs/index.tsx @@ -78,8 +78,9 @@ const TextDialog = (props: TextDialogProps) => { > - + + {typeof props.message === "string" ? ( {props.message || ""} ) : !React.isValidElement(props.message) ? null : ( diff --git a/gui/src/context/Auth.tsx b/gui/src/context/Auth.tsx index 8653b360a..c2ad174f2 100644 --- a/gui/src/context/Auth.tsx +++ b/gui/src/context/Auth.tsx @@ -65,9 +65,8 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ dispatch( setDialogMessage( {}} @@ -85,7 +84,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ setDialogMessage( { ideMessenger.post("logoutOfControlPlane", undefined); }} diff --git a/gui/src/pages/error.tsx b/gui/src/pages/error.tsx index 96171886a..d7e10f51a 100644 --- a/gui/src/pages/error.tsx +++ b/gui/src/pages/error.tsx @@ -25,14 +25,16 @@ const ErrorPage: React.FC = () => { }; const [initialLoad, setInitialLoad] = useState(true); + useEffect(() => { setTimeout(() => { setInitialLoad(false); }, 500); }, []); + return (
-

Error in Continue UI

+

Oops! Something went wrong

{error.statusText || error.message} @@ -58,19 +60,22 @@ const ErrorPage: React.FC = () => { Continue -

Report the issue:

-
+

+ Report the issue on GitHub or Discord: +

+ +
openUrl(GITHUB_LINK)} - className="flex items-center space-x-2 rounded-lg px-4 py-2 text-white" + className="flex w-full items-center justify-center space-x-2 rounded-lg px-4 py-2 text-base text-white" > - + GitHub openUrl(DISCORD_LINK)} - className="flex items-center rounded-lg" + className="flex w-full items-center justify-center rounded-lg text-base" > - + Discord
From 2f3121c4b9bcd26dd4ff8d43bce64008594d263a Mon Sep 17 00:00:00 2001 From: Annoying Technology Date: Thu, 5 Dec 2024 16:42:14 +0100 Subject: [PATCH 071/113] Fixes #400, a bug that sents chunks too large for the embedding model --- core/indexing/docs/article.ts | 88 +++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/core/indexing/docs/article.ts b/core/indexing/docs/article.ts index 1bc74c62e..99992b415 100644 --- a/core/indexing/docs/article.ts +++ b/core/indexing/docs/article.ts @@ -25,56 +25,74 @@ function breakdownArticleComponent( max_chunk_size: number, ): Chunk[] { const chunks: Chunk[] = []; - - const lines = article.body.split("\n"); + const words = article.body.split(/\s+/); + let currentChunk = ""; let startLine = 0; - let endLine = 0; - let content = ""; let index = 0; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (content.length + line.length <= max_chunk_size) { - content += `${line}\n`; - endLine = i; - } else { - chunks.push({ - content: content.trim(), - startLine: startLine, - endLine: endLine, - otherMetadata: { - title: cleanHeader(article.title), - }, - index: index, - filepath: new URL( - `${subpath}#${cleanFragment(article.title)}`, - url, - ).toString(), - digest: subpath, - }); - content = `${line}\n`; - startLine = i; - endLine = i; - index += 1; - } - } - - // Push the last chunk - if (content) { + const createChunk = ( + content: string, + currentStartLine: number, + endLine: number, + ) => { chunks.push({ content: content.trim(), - startLine: startLine, + startLine: currentStartLine, endLine: endLine, otherMetadata: { title: cleanHeader(article.title), }, - index: index, + index: index++, filepath: new URL( `${subpath}#${cleanFragment(article.title)}`, url, ).toString(), digest: subpath, }); + }; + + for (let i = 0; i < words.length; i++) { + const word = words[i]; + + // If a single word is longer than max_chunk_size, split it + if (word.length > max_chunk_size) { + // First, push the current chunk if it has content + if (currentChunk.trim().length > 0) { + createChunk(currentChunk.trim(), startLine, i - 1); + currentChunk = ""; + } + + // Split the long word into smaller pieces + let remainingWord = word; + while (remainingWord.length > 0) { + const chunk = remainingWord.slice(0, max_chunk_size); + createChunk(chunk, i, i); + remainingWord = remainingWord.slice(max_chunk_size); + } + + startLine = i + 1; + continue; + } + + // Check if adding this word would exceed max_chunk_size + if (currentChunk.length + word.length + 1 > max_chunk_size) { + // Push current chunk if it has content + if (currentChunk.trim().length > 0) { + createChunk(currentChunk.trim(), startLine, i - 1); + } + + // Start new chunk with current word + currentChunk = word; + startLine = i; + } else { + // Add word to current chunk + currentChunk = currentChunk.length > 0 ? `${currentChunk} ${word}` : word; + } + } + + // Push the last chunk if it has content + if (currentChunk.trim().length > 0) { + createChunk(currentChunk.trim(), startLine, words.length - 1); } // Don't use small chunks. Probably they're a mistake. Definitely they'll confuse the embeddings model. From f1c7e5ad6b744a419b831afe6bd79ba1f591e9ab Mon Sep 17 00:00:00 2001 From: Annoying Technology Date: Thu, 5 Dec 2024 16:56:30 +0100 Subject: [PATCH 072/113] Preserves line breaks on doc chunking --- core/indexing/docs/article.ts | 76 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/core/indexing/docs/article.ts b/core/indexing/docs/article.ts index 99992b415..2ae0e7995 100644 --- a/core/indexing/docs/article.ts +++ b/core/indexing/docs/article.ts @@ -25,20 +25,21 @@ function breakdownArticleComponent( max_chunk_size: number, ): Chunk[] { const chunks: Chunk[] = []; - const words = article.body.split(/\s+/); - let currentChunk = ""; + const lines = article.body.split("\n"); let startLine = 0; + let endLine = 0; + let content = ""; let index = 0; const createChunk = ( - content: string, - currentStartLine: number, - endLine: number, + chunkContent: string, + chunkStartLine: number, + chunkEndLine: number, ) => { chunks.push({ - content: content.trim(), - startLine: currentStartLine, - endLine: endLine, + content: chunkContent.trim(), + startLine: chunkStartLine, + endLine: chunkEndLine, otherMetadata: { title: cleanHeader(article.title), }, @@ -51,51 +52,48 @@ function breakdownArticleComponent( }); }; - for (let i = 0; i < words.length; i++) { - const word = words[i]; + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; - // If a single word is longer than max_chunk_size, split it - if (word.length > max_chunk_size) { - // First, push the current chunk if it has content - if (currentChunk.trim().length > 0) { - createChunk(currentChunk.trim(), startLine, i - 1); - currentChunk = ""; + // Handle oversized lines by splitting them + if (line.length > max_chunk_size) { + // First push any accumulated content + if (content.trim().length > 0) { + createChunk(content, startLine, endLine); + content = ""; } - // Split the long word into smaller pieces - let remainingWord = word; - while (remainingWord.length > 0) { - const chunk = remainingWord.slice(0, max_chunk_size); - createChunk(chunk, i, i); - remainingWord = remainingWord.slice(max_chunk_size); + // Split the long line into chunks + let remainingLine = line; + let subLineStart = i; + while (remainingLine.length > 0) { + const chunk = remainingLine.slice(0, max_chunk_size); + createChunk(chunk, subLineStart, i); + remainingLine = remainingLine.slice(max_chunk_size); } - startLine = i + 1; continue; } - // Check if adding this word would exceed max_chunk_size - if (currentChunk.length + word.length + 1 > max_chunk_size) { - // Push current chunk if it has content - if (currentChunk.trim().length > 0) { - createChunk(currentChunk.trim(), startLine, i - 1); - } - - // Start new chunk with current word - currentChunk = word; - startLine = i; + // Normal line handling + if (content.length + line.length + 1 <= max_chunk_size) { + content += `${line}\n`; + endLine = i; } else { - // Add word to current chunk - currentChunk = currentChunk.length > 0 ? `${currentChunk} ${word}` : word; + if (content.trim().length > 0) { + createChunk(content, startLine, endLine); + } + content = `${line}\n`; + startLine = i; + endLine = i; } } - // Push the last chunk if it has content - if (currentChunk.trim().length > 0) { - createChunk(currentChunk.trim(), startLine, words.length - 1); + // Push the last chunk + if (content.trim().length > 0) { + createChunk(content, startLine, endLine); } - // Don't use small chunks. Probably they're a mistake. Definitely they'll confuse the embeddings model. return chunks.filter((c) => c.content.trim().length > 20); } From 5e46f83f06d9611be541805c377b3231578afe45 Mon Sep 17 00:00:00 2001 From: Annoying Technology Date: Thu, 5 Dec 2024 16:58:10 +0100 Subject: [PATCH 073/113] Adds the support for bedrock reranking in the reference documentation --- docs/docs/reference.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 0a5c02aad..df3f08e75 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -206,10 +206,11 @@ Configuration for the reranker model used in response ranking. **Properties:** -- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `free-trial`, `huggingface-tei` +- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `free-trial`, `huggingface-tei`, `bedrock` - `params`: - `model`: Model name - `apiKey`: Api key + - `region`: Region (for Bedrock only) Example From 9f2f9d895b2fe6678f49e394e4657f044e2aef2a Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 5 Dec 2024 09:33:12 -0800 Subject: [PATCH 074/113] fix: linux test env --- .github/workflows/pr_checks.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 9d4828ac4..c5bb037ed 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -83,11 +83,15 @@ jobs: npx tsc --noEmit npm run lint - - name: Run VSCode e2e tests + - name: Install Xvfb for Linux and run e2e tests run: | + sudo apt-get install -y xvfb # Install Xvfb + Xvfb :99 & # Start Xvfb + export DISPLAY=:99 # Export the display number to the environment cd extensions/vscode npm run package npm run e2e:ci + if: matrix.os == 'ubuntu-latest' - name: core checks run: | From fa9f86b6fd9ddb8cfab7dc52772c9f5a0623d654 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 5 Dec 2024 09:40:04 -0800 Subject: [PATCH 075/113] fix: ci --- .github/workflows/pr_checks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index c5bb037ed..2e70e426a 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -91,7 +91,6 @@ jobs: cd extensions/vscode npm run package npm run e2e:ci - if: matrix.os == 'ubuntu-latest' - name: core checks run: | From 03839c30813f3242d9a1fce91f39af110d8d85a7 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 5 Dec 2024 10:29:33 -0800 Subject: [PATCH 076/113] fix: include access to the Documents folder --- extensions/vscode/entitlements.plist | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/vscode/entitlements.plist b/extensions/vscode/entitlements.plist index 9e94cbbb5..700586ea1 100644 --- a/extensions/vscode/entitlements.plist +++ b/extensions/vscode/entitlements.plist @@ -4,5 +4,13 @@ com.apple.security.cs.disable-library-validation + com.apple.security.files.user-selected.read-write + + com.apple.security.files.downloads.read-write + + com.apple.security.files.documents.read-write + + com.apple.security.automation.apple-events + \ No newline at end of file From fc90bdb566c0113da5f1f2e5ac7de9bcdcfb3a9b Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 5 Dec 2024 11:40:13 -0800 Subject: [PATCH 077/113] bugfix: focus input on fullscreen reveal --- extensions/vscode/src/commands.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index c6acc5e14..0ae80c0bd 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -729,6 +729,7 @@ const getCommandsMap: ( if (fullScreenTab && fullScreenPanel) { // Full screen open, but not focused - focus it fullScreenPanel.reveal(); + vscode.commands.executeCommand("continue.focusContinueInput"); return; } From 2b611df53ba716c2b550ab3b275c571eed9d2c65 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 5 Dec 2024 13:06:40 -0800 Subject: [PATCH 078/113] fix: disable completions in the commit box --- extensions/vscode/src/autocomplete/completionProvider.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index 5d6faef3f..f9d397388 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -101,6 +101,10 @@ export class ContinueCompletionProvider return null; } + if (document.uri.scheme === "vscode-scm") { + return null; + } + // If the text at the range isn't a prefix of the intellisense text, // no completion will be displayed, regardless of what we return if ( From 16571200fd6bc4469ee6bbd8018979a61a04ab89 Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 5 Dec 2024 15:17:07 -0800 Subject: [PATCH 079/113] Update context-providers.md --- docs/docs/customize/context-providers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md index 2c7708cac..024786e14 100644 --- a/docs/docs/customize/context-providers.md +++ b/docs/docs/customize/context-providers.md @@ -444,7 +444,7 @@ Available connection types: ### `@Debugger` -Reference the contents of the local variables in the debugger. +Reference the contents of the local variables in the debugger. Currently only available in VS Code. ```json title="config.json" { From 7e466e73acf84b2aa1fd51341fbdb6c995d398dc Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 5 Dec 2024 16:02:17 -0800 Subject: [PATCH 080/113] bugfix: use correct config.json when applying --- .../continue/IdeProtocolClient.kt | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index 6dccf7f08..d0f0da761 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt @@ -51,6 +51,7 @@ import java.net.NetworkInterface import java.nio.charset.Charset import java.nio.file.Paths import java.util.* +import kotlin.coroutines.resume fun uuid(): String { @@ -106,7 +107,9 @@ class AsyncFileSaveListener(private val ideProtocolClient: IdeProtocolClient) : for (event in events) { if (event.path.endsWith(".continue/config.json") || event.path.endsWith(".continue/config.ts") || event.path.endsWith( ".continue\\config.json" - ) || event.path.endsWith(".continue\\config.ts") || event.path.endsWith(".continuerc.json") || event.path.endsWith(".continuerc.json") + ) || event.path.endsWith(".continue\\config.ts") || event.path.endsWith(".continuerc.json") || event.path.endsWith( + ".continuerc.json" + ) ) { return object : AsyncFileListener.ChangeApplier { override fun afterVfsChange() { @@ -662,18 +665,41 @@ class IdeProtocolClient( var llm = getModelByRole(config, "applyCodeBlock") if (llm == null) { - val models = (config as? Map<*, *>)?.get("models") as? List> - llm = models?.find { model -> model["title"] == curSelectedModelTitle } as Map + llm = try { + suspendCancellableCoroutine { continuation -> + continuePluginService.coreMessenger?.request( + "config/getSerializedProfileInfo", + null, + null + ) { response -> + val models = + ((response as Map)["config"] as Map)["models"] as List> + val foundModel = models.find { it["title"] == curSelectedModelTitle } - if (llm == null) { - showToast("error", "Model '$curSelectedModelTitle' not found in config.") + if (foundModel == null) { + launch { + showToast( + "error", + "Model '$curSelectedModelTitle' not found in config." + ) + } + continuation.resume(null) + } else { + continuation.resume(foundModel) + } + } + } + } catch (e: Exception) { + launch { showToast("error", "Failed to fetch model configuration") } respond(null) return@launch } } + val llmTitle = (llm as? Map<*, *>)?.get("title") as? String ?: "" + val prompt = "The following code was suggested as an edit:\n```\n${text}\n```\nPlease apply it to the previous code." From fd513edf96dbeb680d40cd12d5f30d09735df486 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 5 Dec 2024 18:15:07 -0800 Subject: [PATCH 081/113] fix lag --- extensions/vscode/package-lock.json | 6 +- gui/package-lock.json | 2 +- gui/src/context/IdeMessenger.ts | 30 ++-- gui/src/redux/slices/sessionSlice.ts | 134 +++++++++--------- gui/src/redux/thunks/streamNormalInput.ts | 11 +- .../thunks/streamResponseAfterToolCall.ts | 4 +- gui/src/redux/thunks/streamSlashCommand.ts | 17 ++- 7 files changed, 109 insertions(+), 95 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 9de97f4ac..923f4c9b5 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.243", + "version": "0.9.244", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.243", + "version": "0.9.244", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -115,7 +115,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/gui/package-lock.json b/gui/package-lock.json index af3d5cafa..91410e6df 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -121,7 +121,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/gui/src/context/IdeMessenger.ts b/gui/src/context/IdeMessenger.ts index bddd3fbbe..fbbfc21b1 100644 --- a/gui/src/context/IdeMessenger.ts +++ b/gui/src/context/IdeMessenger.ts @@ -37,14 +37,14 @@ export interface IIdeMessenger { messageType: T, data: FromWebviewProtocol[T][0], cancelToken?: AbortSignal, - ): FromWebviewProtocol[T][1]; + ): AsyncGenerator; llmStreamChat( modelTitle: string, cancelToken: AbortSignal | undefined, messages: ChatMessage[], options?: LLMFullCompletionOptions, - ): AsyncGenerator; + ): AsyncGenerator; ide: IDE; } @@ -147,11 +147,20 @@ export class IdeMessenger implements IIdeMessenger { }); } + /** + * Because of weird type stuff, we're actually yielding an array of the things + * that are streamed. For example, if the return type here says + * AsyncGenerator, then it's actually AsyncGenerator. + * This needs to be handled by the caller. + * + * Using unknown for now to make this more explicit + */ async *streamRequest( messageType: T, data: FromWebviewProtocol[T][0], cancelToken?: AbortSignal, - ): FromWebviewProtocol[T][1] { + ): AsyncGenerator { + // ): FromWebviewProtocol[T][1] { const messageId = uuidv4(); this.post(messageType, data, messageId); @@ -181,17 +190,16 @@ export class IdeMessenger implements IIdeMessenger { while (!done) { if (buffer.length > index) { - const chunk = buffer[index]; - index++; - yield chunk; + const chunks = buffer.slice(index); + index = buffer.length; + yield chunks; } await new Promise((resolve) => setTimeout(resolve, 50)); } - while (buffer.length > index) { - const chunk = buffer[index]; - index++; - yield chunk; + if (buffer.length > index) { + const chunks = buffer.slice(index); + yield chunks; } return returnVal; @@ -202,7 +210,7 @@ export class IdeMessenger implements IIdeMessenger { cancelToken: AbortSignal | undefined, messages: ChatMessage[], options: LLMFullCompletionOptions = {}, - ): AsyncGenerator { + ): AsyncGenerator { const gen = this.streamRequest( "llm/streamChat", { diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 46e9e21f5..1b6f4d7f4 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -10,21 +10,21 @@ import { ApplyState, ChatHistoryItem, ChatMessage, + CodeToEdit, + ContextItem, ContextItemWithId, FileSymbolMap, - Session, - PromptLog, - CodeToEdit, - ToolCall, - ContextItem, MessageModes, + PromptLog, + Session, + ToolCall, } from "core"; import { incrementalParseJson } from "core/util/incrementalParseJson"; import { renderChatMessage } from "core/util/messageContent"; import { v4 as uuidv4 } from "uuid"; +import { RootState } from "../store"; import { streamResponseThunk } from "../thunks/streamResponse"; import { findCurrentToolCall } from "../util"; -import { RootState } from "../store"; // We need this to handle reorderings (e.g. a mid-array deletion) of the messages array. // The proper fix is adding a UUID to all chat messages, but this is the temp workaround. @@ -284,72 +284,74 @@ export const sessionSlice = createSlice({ state.streamAborter.abort(); state.streamAborter = new AbortController(); }, - streamUpdate: (state, action: PayloadAction) => { + streamUpdate: (state, action: PayloadAction) => { if (state.history.length) { - const lastMessage = state.history[state.history.length - 1]; + for (const message of action.payload) { + const lastMessage = state.history[state.history.length - 1]; - if ( - action.payload.role && - (lastMessage.message.role !== action.payload.role || - // This is when a tool call comes after assistant text - (lastMessage.message.content !== "" && - action.payload.role === "assistant" && - action.payload.toolCalls?.length)) - ) { - const baseHistoryItem = getBaseHistoryItem(); - - // Create a new message - const historyItem: ChatHistoryItemWithMessageId = { - ...baseHistoryItem, - message: { ...baseHistoryItem.message, ...action.payload }, - }; - - if (action.payload.role === "assistant" && action.payload.toolCalls) { - const [_, parsedArgs] = incrementalParseJson( - action.payload.toolCalls[0].function.arguments, - ); - historyItem.toolCallState = { - status: "generating", - toolCall: action.payload.toolCalls[0] as ToolCall, - toolCallId: action.payload.toolCalls[0].id, - parsedArgs, - }; - } - - state.history.push(historyItem); - } else { - // Add to the existing message - const msg = state.history[state.history.length - 1].message; - if (action.payload.content) { - msg.content += renderChatMessage(action.payload); - } else if ( - action.payload.role === "assistant" && - action.payload.toolCalls && - msg.role === "assistant" + if ( + message.role && + (lastMessage.message.role !== message.role || + // This is when a tool call comes after assistant text + (lastMessage.message.content !== "" && + message.role === "assistant" && + message.toolCalls?.length)) ) { - if (!msg.toolCalls) { - msg.toolCalls = []; + const baseHistoryItem = getBaseHistoryItem(); + + // Create a new message + const historyItem: ChatHistoryItemWithMessageId = { + ...baseHistoryItem, + message: { ...baseHistoryItem.message, ...message }, + }; + + if (message.role === "assistant" && message.toolCalls) { + const [_, parsedArgs] = incrementalParseJson( + message.toolCalls[0].function.arguments, + ); + historyItem.toolCallState = { + status: "generating", + toolCall: message.toolCalls[0] as ToolCall, + toolCallId: message.toolCalls[0].id, + parsedArgs, + }; } - action.payload.toolCalls.forEach((toolCall, i) => { - if (msg.toolCalls.length <= i) { - msg.toolCalls.push(toolCall); - } else { - msg.toolCalls[i].function.arguments += - toolCall.function.arguments; - const [_, parsedArgs] = incrementalParseJson( - msg.toolCalls[i].function.arguments, - ); - - state.history[ - state.history.length - 1 - ].toolCallState.parsedArgs = parsedArgs; - state.history[ - state.history.length - 1 - ].toolCallState.toolCall.function.arguments += - toolCall.function.arguments; + state.history.push(historyItem); + } else { + // Add to the existing message + const msg = state.history[state.history.length - 1].message; + if (message.content) { + msg.content += renderChatMessage(message); + } else if ( + message.role === "assistant" && + message.toolCalls && + msg.role === "assistant" + ) { + if (!msg.toolCalls) { + msg.toolCalls = []; } - }); + message.toolCalls.forEach((toolCall, i) => { + if (msg.toolCalls.length <= i) { + msg.toolCalls.push(toolCall); + } else { + msg.toolCalls[i].function.arguments += + toolCall.function.arguments; + + const [_, parsedArgs] = incrementalParseJson( + msg.toolCalls[i].function.arguments, + ); + + state.history[ + state.history.length - 1 + ].toolCallState.parsedArgs = parsedArgs; + state.history[ + state.history.length - 1 + ].toolCallState.toolCall.function.arguments += + toolCall.function.arguments; + } + }); + } } } } diff --git a/gui/src/redux/thunks/streamNormalInput.ts b/gui/src/redux/thunks/streamNormalInput.ts index 3c3c49222..5a22a36b5 100644 --- a/gui/src/redux/thunks/streamNormalInput.ts +++ b/gui/src/redux/thunks/streamNormalInput.ts @@ -1,6 +1,7 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; import { ChatMessage, PromptLog } from "core"; import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall"; +import { selectDefaultModel } from "../slices/configSlice"; import { abortStream, addPromptCompletionPair, @@ -10,7 +11,6 @@ import { } from "../slices/sessionSlice"; import { ThunkApiType } from "../store"; import { callTool } from "./callTool"; -import { selectDefaultModel } from "../slices/configSlice"; export const streamNormalInput = createAsyncThunk< void, @@ -56,14 +56,9 @@ export const streamNormalInput = createAsyncThunk< break; } - const update = next.value as ChatMessage; - dispatch(streamUpdate(update)); + const updates = next.value as ChatMessage[]; + dispatch(streamUpdate(updates)); next = await gen.next(); - - // There has been lag when streaming tool calls. This is a temporary solution - if (update.role === "assistant" && update.toolCalls) { - await new Promise((resolve) => setTimeout(resolve, 10)); - } } // Attach prompt log diff --git a/gui/src/redux/thunks/streamResponseAfterToolCall.ts b/gui/src/redux/thunks/streamResponseAfterToolCall.ts index 0fe588f56..52b15c13f 100644 --- a/gui/src/redux/thunks/streamResponseAfterToolCall.ts +++ b/gui/src/redux/thunks/streamResponseAfterToolCall.ts @@ -2,6 +2,7 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; import { ChatMessage, ContextItem } from "core"; import { constructMessages } from "core/llm/constructMessages"; import { renderContextItems } from "core/util/messageContent"; +import { selectDefaultModel } from "../slices/configSlice"; import { addContextItemsAtIndex, setActive, @@ -11,7 +12,6 @@ import { ThunkApiType } from "../store"; import { handleErrors } from "./handleErrors"; import { resetStateForNewMessage } from "./resetStateForNewMessage"; import { streamNormalInput } from "./streamNormalInput"; -import { selectDefaultModel } from "../slices/configSlice"; export const streamResponseAfterToolCall = createAsyncThunk< void, @@ -39,7 +39,7 @@ export const streamResponseAfterToolCall = createAsyncThunk< toolCallId, }; - dispatch(streamUpdate(newMessage)); + dispatch(streamUpdate([newMessage])); dispatch( addContextItemsAtIndex({ index: initialHistory.length, diff --git a/gui/src/redux/thunks/streamSlashCommand.ts b/gui/src/redux/thunks/streamSlashCommand.ts index 314b5cc53..79336bb3d 100644 --- a/gui/src/redux/thunks/streamSlashCommand.ts +++ b/gui/src/redux/thunks/streamSlashCommand.ts @@ -5,9 +5,9 @@ import { RangeInFile, SlashCommandDescription, } from "core"; -import { ThunkApiType } from "../store"; -import { abortStream, streamUpdate } from "../slices/sessionSlice"; import { selectDefaultModel } from "../slices/configSlice"; +import { abortStream, streamUpdate } from "../slices/sessionSlice"; +import { ThunkApiType } from "../store"; export const streamSlashCommand = createAsyncThunk< void, @@ -62,8 +62,17 @@ export const streamSlashCommand = createAsyncThunk< dispatch(abortStream()); break; } - if (typeof update === "string") { - dispatch(streamUpdate(update)); + for (const item of update) { + if (typeof item === "string") { + dispatch( + streamUpdate([ + { + role: "assistant", + content: item, + }, + ]), + ); + } } } clearInterval(checkActiveInterval); From ac1906b108317a5105ad3bdc7aa27caac15b9a32 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 5 Dec 2024 18:29:42 -0800 Subject: [PATCH 082/113] items-center on last session button --- extensions/vscode/package-lock.json | 6 +-- gui/package-lock.json | 2 +- gui/src/pages/gui/Chat.tsx | 65 +++++++++++++++-------------- 3 files changed, 38 insertions(+), 35 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 9de97f4ac..923f4c9b5 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.243", + "version": "0.9.244", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.243", + "version": "0.9.244", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -115,7 +115,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/gui/package-lock.json b/gui/package-lock.json index af3d5cafa..91410e6df 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -121,7 +121,7 @@ "comment-json": "^4.2.3", "dbinfoz": "^0.14.0", "diff": "^7.0.0", - "dotenv": "^16.4.7", + "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", "google-auth-library": "^9.14.2", diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 309f536db..db0367969 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -7,6 +7,7 @@ import { import { Editor, JSONContent } from "@tiptap/react"; import { InputModifiers, RangeInFileWithContents, ToolCallState } from "core"; import { streamResponse } from "core/llm/stream"; +import { stripImages } from "core/util/messageContent"; import { usePostHog } from "posthog-js/react"; import { useCallback, useContext, useEffect, useRef, useState } from "react"; import { ErrorBoundary } from "react-error-boundary"; @@ -19,22 +20,30 @@ import { vscBackground, } from "../../components"; import { ChatScrollAnchor } from "../../components/ChatScrollAnchor"; +import CodeToEditCard from "../../components/CodeToEditCard"; +import FeedbackDialog from "../../components/dialogs/FeedbackDialog"; import { useFindWidget } from "../../components/find/FindWidget"; import TimelineItem from "../../components/gui/TimelineItem"; import ChatIndexingPeeks from "../../components/indexing/ChatIndexingPeeks"; import ContinueInputBox from "../../components/mainInput/ContinueInputBox"; import { NewSessionButton } from "../../components/mainInput/NewSessionButton"; +import resolveEditorContent from "../../components/mainInput/resolveInput"; import { TutorialCard } from "../../components/mainInput/TutorialCard"; import { OnboardingCard, useOnboardingCard, } from "../../components/OnboardingCard"; +import PageHeader from "../../components/PageHeader"; import StepContainer from "../../components/StepContainer"; +import AcceptRejectAllButtons from "../../components/StepContainer/AcceptRejectAllButtons"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import useHistory from "../../hooks/useHistory"; import { useTutorialCard } from "../../hooks/useTutorialCard"; import { useWebviewListener } from "../../hooks/useWebviewListener"; +import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { selectCurrentToolCall } from "../../redux/selectors/selectCurrentToolCall"; +import { selectDefaultModel } from "../../redux/slices/configSlice"; +import { submitEdit } from "../../redux/slices/editModeState"; import { clearLastEmptyResponse, newSession, @@ -42,6 +51,13 @@ import { selectIsSingleRangeEditOrInsertion, setInactive, } from "../../redux/slices/sessionSlice"; +import { + setDialogEntryOn, + setDialogMessage, + setShowDialog, +} from "../../redux/slices/uiSlice"; +import { RootState } from "../../redux/store"; +import { exitEditMode } from "../../redux/thunks/exitEditMode"; import { streamResponseThunk } from "../../redux/thunks/streamResponse"; import { getFontSize, @@ -49,29 +65,12 @@ import { isMetaEquivalentKeyPressed, } from "../../util"; import { FREE_TRIAL_LIMIT_REQUESTS } from "../../util/freeTrial"; +import getMultifileEditPrompt from "../../util/getMultifileEditPrompt"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import ConfigErrorIndicator from "./ConfigError"; import { ToolCallDiv } from "./ToolCallDiv"; import { ToolCallButtons } from "./ToolCallDiv/ToolCallButtonsDiv"; import ToolOutput from "./ToolCallDiv/ToolOutput"; -import { useAppDispatch, useAppSelector } from "../../redux/hooks"; -import { selectDefaultModel } from "../../redux/slices/configSlice"; -import { - setDialogMessage, - setDialogEntryOn, - setShowDialog, -} from "../../redux/slices/uiSlice"; -import { RootState } from "../../redux/store"; -import FeedbackDialog from "../../components/dialogs/FeedbackDialog"; -import getMultifileEditPrompt from "../../util/getMultifileEditPrompt"; -import { submitEdit } from "../../redux/slices/editModeState"; -import { stripImages } from "core/util/messageContent"; -import resolveEditorContent from "../../components/mainInput/resolveInput"; -import AcceptRejectAllButtons from "../../components/StepContainer/AcceptRejectAllButtons"; -import CodeToEditCard from "../../components/CodeToEditCard"; -import { exitEditMode } from "../../redux/thunks/exitEditMode"; -import PageHeader from "../../components/PageHeader"; -import Spinner from "../../components/gui/Spinner"; const StopButton = styled.div` background-color: ${vscBackground}; @@ -496,19 +495,23 @@ export function Chat() { }} >
- {history.length === 0 && getLastSessionId() && !isInEditMode && ( - - loadLastSession().catch((e) => - console.error(`Failed to load last session: ${e}`), - ) - } - className="xs:inline flex hidden items-center gap-2" - > - - Last Session - - )} +
+ {history.length === 0 && getLastSessionId() && !isInEditMode && ( +
+ + loadLastSession().catch((e) => + console.error(`Failed to load last session: ${e}`), + ) + } + className="flex items-center gap-2" + > + + Last Session + +
+ )} +
From 03d7a673ed80f0f8ad12071c2ba64f3348a4f65f Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 5 Dec 2024 18:30:15 -0800 Subject: [PATCH 083/113] bugfix: delete single word on linux/windows --- .../mainInput/handleMetaKeyIssues.ts | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/gui/src/components/mainInput/handleMetaKeyIssues.ts b/gui/src/components/mainInput/handleMetaKeyIssues.ts index 77cbbb4dc..867203a14 100644 --- a/gui/src/components/mainInput/handleMetaKeyIssues.ts +++ b/gui/src/components/mainInput/handleMetaKeyIssues.ts @@ -1,8 +1,9 @@ import { Editor } from "@tiptap/react"; import { KeyboardEvent } from "react"; -import { isWebEnvironment } from "../../util"; +import { getPlatform, isWebEnvironment } from "../../util"; const isWebEnv = isWebEnvironment(); +const platform = getPlatform(); /** * This handles various keypress issues when OSR is enabled @@ -56,15 +57,48 @@ export const handleVSCMetaKeyIssues = async ( } }; +const deleteSingleWord = (editor: Editor) => { + const textContent = + editor.state.doc.resolve(editor.state.selection.from).parent.textContent ?? + ""; + + const cursorPosition = editor.state.selection.from; + const nodeStartPosition = editor.state.doc.resolve(cursorPosition).start(); + + const textBeforeCursor = textContent.slice( + 0, + cursorPosition - nodeStartPosition, + ); + + // Match the last word including any trailing whitespace + const lastWordMatch = textBeforeCursor.match(/\S+\s*$/); + + if (lastWordMatch) { + const lastWordWithSpace = lastWordMatch[0]; + editor.commands.deleteRange({ + from: editor.state.selection.from - lastWordWithSpace.length, + to: editor.state.selection.from, + }); + } +}; + export const handleJetBrainsMetaBackspace = (editor: Editor) => { const { doc } = editor.state; for (let i = doc.content.childCount - 1; i >= 0; i--) { const node = doc.content.child(i); - if (node.type.name !== "codeBlock") { - editor.commands.deleteNode(node.type.name); + if (node.type.name === "codeBlock") { + continue; } + + // For Linux/Windows, only delete the word to the left of the cursor + if (platform !== "mac") { + deleteSingleWord(editor); + break; + } + + editor.commands.deleteNode(node.type.name); } // Add an empty string so the user can keep typing From db77b5020d9b93cb4a7504e213d81940dbee9eaa Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 5 Dec 2024 19:36:36 -0800 Subject: [PATCH 084/113] fix: enable OSR for mac after validations --- .../services/ContinueExtensionSettingsService.kt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt index 5db34ff29..2cf51b5de 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt @@ -271,12 +271,6 @@ class ContinueExtensionConfigurable : Configurable { * it's a simple integer without dot notation, making it easier to compare. */ private fun shouldRenderOffScreen(): Boolean { - // With the 0.0.77 release, non-Mac users have been reporting issues with paste functionality - // in the browser. Disabling OSR for all non-Mac users for now. - if (!SystemInfo.isMac) { - return false - } - val minBuildNumber = 233 val applicationInfo = ApplicationInfo.getInstance() val currentBuildNumber = applicationInfo.build.baselineVersion From aa73e87c13f3efd914c6e30ed4630d3debc9b867 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 5 Dec 2024 19:53:57 -0800 Subject: [PATCH 085/113] bump package.json version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index acc5b947b..42b504a66 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.244", + "version": "0.9.240", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 4d2eb1569b9792a2b72cf13fb477da7732e87741 Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 5 Dec 2024 20:04:30 -0800 Subject: [PATCH 086/113] Update gradle.properties --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index be8b0febb..b469e1e23 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=0.0.82 +pluginVersion=0.0.83 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension From b47110a60539c1469374dc4ce65256f2662c2a96 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 5 Dec 2024 20:15:50 -0800 Subject: [PATCH 087/113] increase login timeout --- extensions/vscode/src/stubs/WorkOsAuthProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts index 28f3f6032..486b0df12 100644 --- a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts +++ b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts @@ -408,7 +408,7 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { return await Promise.race([ codeExchangePromise.promise, new Promise((_, reject) => - setTimeout(() => reject("Cancelled"), 60000), + setTimeout(() => reject("Cancelled"), 15 * 60 * 1_000), ), promiseFromEvent( token.onCancellationRequested, From 100be30b413cca4c82fef05940865ac659d422d1 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 08:37:31 -0800 Subject: [PATCH 088/113] test macos-14 --- .github/workflows/main.yaml | 4 +- .github/workflows/preview.yaml | 167 +++++++++++++++++---------------- 2 files changed, 87 insertions(+), 84 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b73cdb3ad..f54d7bbe4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -49,11 +49,11 @@ jobs: platform: alpine arch: x64 npm_config_arch: x64 - - os: macos-12 # should migrate this to the newer x64 version of macos-14 + - os: macos-14 platform: darwin arch: x64 npm_config_arch: x64 - - os: macos-12 # same here, especially + - os: macos-14 # same here, especially platform: darwin arch: arm64 npm_config_arch: arm64 diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index a65e79c7f..7f50f37bf 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -1,8 +1,11 @@ name: Publish Preview Extension on: - release: - types: [prereleased] + push: + branches: + - nate/mac-14-ci + # release: + # types: [prereleased] jobs: check_release_name: @@ -49,11 +52,11 @@ jobs: platform: alpine arch: x64 npm_config_arch: x64 - - os: macos-12 # should migrate this to the newer x64 version of macos-14 + - os: macos-14 platform: darwin arch: x64 npm_config_arch: x64 - - os: macos-12 # same here, especially + - os: macos-14 platform: darwin arch: arm64 npm_config_arch: arm64 @@ -161,93 +164,93 @@ jobs: name: ${{ env.target }}-vsix path: "extensions/vscode/*.vsix" - release: - permissions: - contents: write - runs-on: ubuntu-latest - needs: - - build - steps: - - name: Checkout - uses: actions/checkout@v4 + # release: + # permissions: + # contents: write + # runs-on: ubuntu-latest + # needs: + # - build + # steps: + # - name: Checkout + # uses: actions/checkout@v4 - - name: Set up Git - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + # - name: Set up Git + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" - # Download the .vsix artifacts - - uses: actions/download-artifact@v4 - with: - pattern: "*-vsix" - path: vsix-artifacts - merge-multiple: true + # # Download the .vsix artifacts + # - uses: actions/download-artifact@v4 + # with: + # pattern: "*-vsix" + # path: vsix-artifacts + # merge-multiple: true - - name: Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ github.ref_name }} - files: | - vsix-artifacts/*.vsix - token: ${{ secrets.CI_GITHUB_TOKEN }} - repository: continuedev/continue - prerelease: true + # - name: Release + # uses: softprops/action-gh-release@v2 + # with: + # tag_name: ${{ github.ref_name }} + # files: | + # vsix-artifacts/*.vsix + # token: ${{ secrets.CI_GITHUB_TOKEN }} + # repository: continuedev/continue + # prerelease: true - publish: - runs-on: ubuntu-latest - needs: - - build - permissions: - contents: write - steps: - # 0. Setup git - - name: Checkout - uses: actions/checkout@v4 + # publish: + # runs-on: ubuntu-latest + # needs: + # - build + # permissions: + # contents: write + # steps: + # # 0. Setup git + # - name: Checkout + # uses: actions/checkout@v4 - - name: Set up Git - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + # - name: Set up Git + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" - - name: Pull latest changes - run: git pull origin main + # - name: Pull latest changes + # run: git pull origin main - # 1. Download the artifacts - - uses: actions/download-artifact@v4 - with: - pattern: "*-vsix" - path: vsix-artifacts - merge-multiple: true + # # 1. Download the artifacts + # - uses: actions/download-artifact@v4 + # with: + # pattern: "*-vsix" + # path: vsix-artifacts + # merge-multiple: true - # 2. Publish the extension to VS Code Marketplace - - name: Publish to VS Code Marketplace - run: | - cd extensions/vscode - npx vsce publish --pre-release --packagePath ../../vsix-artifacts/*.vsix - env: - VSCE_PAT: ${{ secrets.VSCE_TOKEN }} + # # 2. Publish the extension to VS Code Marketplace + # - name: Publish to VS Code Marketplace + # run: | + # cd extensions/vscode + # npx vsce publish --pre-release --packagePath ../../vsix-artifacts/*.vsix + # env: + # VSCE_PAT: ${{ secrets.VSCE_TOKEN }} - # 3. Publish the extension to Open VSX Registry - - name: Publish (Open VSX Registry) - continue-on-error: true - run: | - cd extensions/vscode - npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix + # # 3. Publish the extension to Open VSX Registry + # - name: Publish (Open VSX Registry) + # continue-on-error: true + # run: | + # cd extensions/vscode + # npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix - # 4. Update the package.json version and push changes - # - name: Update version in package.json - # run: | - # cd extensions/vscode - # npm version patch + # 4. Update the package.json version and push changes + # - name: Update version in package.json + # run: | + # cd extensions/vscode + # npm version patch - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "💚 Update package.json version [skip ci]" + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "💚 Update package.json version [skip ci]" - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} From 8d5030c1038ddbcf31b0bc0bef1224b2a89fbfce Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 09:10:40 -0800 Subject: [PATCH 089/113] don't check release name --- .github/workflows/preview.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 7f50f37bf..18e6161c4 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -8,23 +8,23 @@ on: # types: [prereleased] jobs: - check_release_name: - runs-on: ubuntu-latest - outputs: - should_run: ${{ steps.check.outputs.should_run }} - steps: - - id: check - working-directory: . - run: | - if [[ "${{ github.event.release.tag_name }}" == v0.9.*-vscode ]]; then - echo "should_run=true" >> $GITHUB_OUTPUT - else - echo "should_run=false" >> $GITHUB_OUTPUT - fi + # check_release_name: + # runs-on: ubuntu-latest + # outputs: + # should_run: ${{ steps.check.outputs.should_run }} + # steps: + # - id: check + # working-directory: . + # run: | + # if [[ "${{ github.event.release.tag_name }}" == v0.9.*-vscode ]]; then + # echo "should_run=true" >> $GITHUB_OUTPUT + # else + # echo "should_run=false" >> $GITHUB_OUTPUT + # fi build: - needs: check_release_name - if: needs.check_release_name.outputs.should_run == 'true' + # needs: check_release_name + # if: needs.check_release_name.outputs.should_run == 'true' strategy: matrix: include: From a5db0d46ae656dd04bf2150e74c0cc7885d81084 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 6 Dec 2024 11:01:59 -0800 Subject: [PATCH 090/113] Update Chat.tsx --- gui/src/pages/gui/Chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index db0367969..8545813bc 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -341,7 +341,7 @@ export function Chat() { <> {isInEditMode && ( { loadLastSession().catch((e) => console.error(`Failed to load last session: ${e}`), From 9e41fa1e678d165ae5554ffdb292ec7c0ba759eb Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 13:44:29 -0800 Subject: [PATCH 091/113] use 13 --- .github/workflows/main.yaml | 4 ++-- .github/workflows/preview.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f54d7bbe4..ae0359027 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -49,11 +49,11 @@ jobs: platform: alpine arch: x64 npm_config_arch: x64 - - os: macos-14 + - os: macos-13 platform: darwin arch: x64 npm_config_arch: x64 - - os: macos-14 # same here, especially + - os: macos-13 platform: darwin arch: arm64 npm_config_arch: arm64 diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 18e6161c4..9a3604f09 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -52,11 +52,11 @@ jobs: platform: alpine arch: x64 npm_config_arch: x64 - - os: macos-14 + - os: macos-13 platform: darwin arch: x64 npm_config_arch: x64 - - os: macos-14 + - os: macos-13 platform: darwin arch: arm64 npm_config_arch: arm64 From 608a157ef5742df182339749a67652adcdf50e58 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 5 Dec 2024 16:41:22 -0800 Subject: [PATCH 092/113] test: add utils --- core/autocomplete/filtering/test/util.ts | 4 +- core/index.d.ts | 1 + core/llm/llms/Mock.ts | 4 +- core/llm/llms/Test.ts | 39 +++++++++ core/llm/llms/index.ts | 6 +- extensions/vscode/e2e/GUI.test.ts | 86 ------------------- extensions/vscode/e2e/actions/GUI.actions.ts | 58 +++++++++++++ .../vscode/e2e/selectors/GUI.selectors.ts | 44 ++++++++++ .../vscode/e2e/selectors/SelectorUtils.ts | 16 ++++ extensions/vscode/e2e/test-files/config.json | 4 + extensions/vscode/e2e/tests/GUI.test.ts | 61 +++++++++++++ extensions/vscode/package.json | 9 +- gui/src/components/mainInput/InputToolbar.tsx | 1 + .../components/modelSelection/ModelSelect.tsx | 1 + 14 files changed, 239 insertions(+), 95 deletions(-) create mode 100644 core/llm/llms/Test.ts delete mode 100644 extensions/vscode/e2e/GUI.test.ts create mode 100644 extensions/vscode/e2e/actions/GUI.actions.ts create mode 100644 extensions/vscode/e2e/selectors/GUI.selectors.ts create mode 100644 extensions/vscode/e2e/selectors/SelectorUtils.ts create mode 100644 extensions/vscode/e2e/test-files/config.json create mode 100644 extensions/vscode/e2e/tests/GUI.test.ts diff --git a/core/autocomplete/filtering/test/util.ts b/core/autocomplete/filtering/test/util.ts index a052aace2..db8d99131 100644 --- a/core/autocomplete/filtering/test/util.ts +++ b/core/autocomplete/filtering/test/util.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import path from "node:path"; -import Mock from "../../../llm/llms/Mock"; +import MockLLM from "../../../llm/llms/Mock"; import { testConfigHandler, testIde } from "../../../test/fixtures"; import { CompletionProvider } from "../../CompletionProvider"; import { AutocompleteInput } from "../../util/types"; @@ -30,7 +30,7 @@ export async function testAutocompleteFiltering( const { prefix, suffix } = parseFimExample(test.input); // Setup necessary objects - const llm = new Mock({ + const llm = new MockLLM({ model: "mock", }); llm.completion = test.llmOutput; diff --git a/core/index.d.ts b/core/index.d.ts index 06fbd7275..4e050bb58 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -807,6 +807,7 @@ type ModelProvider = | "nvidia" | "vllm" | "mock" + | "test" | "cerebras" | "askSage" | "vertexai" diff --git a/core/llm/llms/Mock.ts b/core/llm/llms/Mock.ts index 5f3880e3c..6f564cce7 100644 --- a/core/llm/llms/Mock.ts +++ b/core/llm/llms/Mock.ts @@ -1,7 +1,7 @@ import { ChatMessage, CompletionOptions, ModelProvider } from "../../index.js"; import { BaseLLM } from "../index.js"; -class Mock extends BaseLLM { +class MockLLM extends BaseLLM { public completion: string = "Test Completion"; static providerName: ModelProvider = "mock"; @@ -27,4 +27,4 @@ class Mock extends BaseLLM { } } -export default Mock; +export default MockLLM; diff --git a/core/llm/llms/Test.ts b/core/llm/llms/Test.ts new file mode 100644 index 000000000..b35984f3e --- /dev/null +++ b/core/llm/llms/Test.ts @@ -0,0 +1,39 @@ +import { ChatMessage, CompletionOptions, ModelProvider } from "../../index.js"; +import { BaseLLM } from "../index.js"; + +const RESPONSES: Record = { + "How are you?": "I'm fine", +}; + +const HARDCODED_CHAT_RESPONSE = "THIS IS A HARDCODED RESPONSE"; + +class TestLLM extends BaseLLM { + static providerName: ModelProvider = "test"; + + private findResponse(prompt: string) { + return Object.entries(RESPONSES).find(([key]) => prompt.includes(key))?.[1]; + } + + protected async *_streamComplete( + prompt: string, + signal: AbortSignal, + options: CompletionOptions, + ): AsyncGenerator { + yield this.findResponse(prompt) || `PROMPT: ${prompt}`; + } + + protected async *_streamChat( + messages: ChatMessage[], + signal: AbortSignal, + options: CompletionOptions, + ): AsyncGenerator { + for (const char of HARDCODED_CHAT_RESPONSE) { + yield { + role: "assistant", + content: char, + }; + } + } +} + +export default TestLLM; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 632607ed1..9604cb9f6 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -31,7 +31,7 @@ import LlamaCpp from "./LlamaCpp"; import Llamafile from "./Llamafile"; import LMStudio from "./LMStudio"; import Mistral from "./Mistral"; -import Mock from "./Mock"; +import MockLLM from "./Mock"; import Moonshot from "./Moonshot"; import Msty from "./Msty"; import Nebius from "./Nebius"; @@ -50,6 +50,7 @@ import Vllm from "./Vllm"; import WatsonX from "./WatsonX"; import xAI from "./xAI"; import SiliconFlow from "./SiliconFlow"; +import TestLLM from "./Test"; const LLMs = [ Anthropic, @@ -87,7 +88,8 @@ const LLMs = [ Nvidia, Vllm, SambaNova, - Mock, + MockLLM, + TestLLM, Cerebras, Asksage, Nebius, diff --git a/extensions/vscode/e2e/GUI.test.ts b/extensions/vscode/e2e/GUI.test.ts deleted file mode 100644 index 0055df1ba..000000000 --- a/extensions/vscode/e2e/GUI.test.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { - Workbench, - EditorView, - WebView, - By, - WebElement, - WebDriver, - Key, -} from "vscode-extension-tester"; -import { expect } from "chai"; - -const switchToReactIframe = async (driver: WebDriver) => { - const iframes = await driver.findElements(By.css("iframe")); - let continueIFrame: WebElement | undefined = undefined; - for (let i = 0; i < iframes.length; i++) { - const iframe = iframes[i]; - const src = await iframe.getAttribute("src"); - if (src.includes("extensionId=Continue.continue")) { - continueIFrame = iframe; - break; - } - } - - if (!continueIFrame) { - throw new Error("Could not find continue iframe"); - } - - await driver.switchTo().frame(continueIFrame); - - await new Promise((res) => { - setTimeout(res, 500); - }); - - const reactIFrame = await driver.findElement(By.css("iframe")); - - if (!reactIFrame) { - throw new Error("Could not find React iframe"); - } - - await driver.switchTo().frame(reactIFrame); -}; - -describe("GUI Test", () => { - let view: WebView; - let driver: WebDriver; - - before(async function () { - this.timeout(10000); - - await new Workbench().executeCommand("continue.focusContinueInput"); - - view = new WebView(); - driver = view.getDriver(); - - await switchToReactIframe(driver); - }); - - after(async () => { - await view.switchBack(); - await new EditorView().closeAllEditors(); - }); - - it("should display correct panel description", async () => { - const description = await view.findWebElement( - By.xpath("//*[contains(text(), 'Quickly')]"), - ); - - expect(await description.getText()).has.string( - "Quickly get up and running using our API keys.", - ); - }); - - it("should allow typing text in the editor", async () => { - const tiptap = await view.findWebElement(By.className("tiptap")); - - await tiptap.sendKeys("Hello world!"); - - expect(await tiptap.getText()).has.string("Hello world!"); - - // Just to show that we can - await tiptap.sendKeys(Key.ENTER); - await new Promise((res) => { - setTimeout(res, 5000); - }); - }).timeout(6000); -}); diff --git a/extensions/vscode/e2e/actions/GUI.actions.ts b/extensions/vscode/e2e/actions/GUI.actions.ts new file mode 100644 index 000000000..1e59f1d15 --- /dev/null +++ b/extensions/vscode/e2e/actions/GUI.actions.ts @@ -0,0 +1,58 @@ +import { + WebDriver, + WebElement, + WebView, + Workbench, +} from "vscode-extension-tester"; +import { GUISelectors } from "../selectors/GUI.selectors"; + +export class GUIActions { + public static switchToReactIframe = async (driver: WebDriver) => { + const iframes = await GUISelectors.getAllIframes(driver); + let continueIFrame: WebElement | undefined = undefined; + for (let i = 0; i < iframes.length; i++) { + const iframe = iframes[i]; + const src = await iframe.getAttribute("src"); + if (src.includes("extensionId=Continue.continue")) { + continueIFrame = iframe; + break; + } + } + + if (!continueIFrame) { + throw new Error("Could not find continue iframe"); + } + + await driver.switchTo().frame(continueIFrame); + + await new Promise((res) => { + setTimeout(res, 500); + }); + + const reactIFrame = await GUISelectors.getReactIframe(driver); + + if (!reactIFrame) { + throw new Error("Could not find React iframe"); + } + + await driver.switchTo().frame(reactIFrame); + }; + + public static openGui = async () => { + return new Workbench().executeCommand("continue.focusContinueInput"); + }; + + public static selectModelFromDropdown = async ( + view: WebView, + option: string, + ) => { + const dropdownButton = await GUISelectors.getModelDropdownButton(view); + await dropdownButton.click(); + + const dropdownOption = await GUISelectors.getModelDropdownOption( + view, + option, + ); + await dropdownOption.click(); + }; +} diff --git a/extensions/vscode/e2e/selectors/GUI.selectors.ts b/extensions/vscode/e2e/selectors/GUI.selectors.ts new file mode 100644 index 000000000..1208d1a04 --- /dev/null +++ b/extensions/vscode/e2e/selectors/GUI.selectors.ts @@ -0,0 +1,44 @@ +import { By, WebDriver, WebView } from "vscode-extension-tester"; +import { SelectorUtils } from "./SelectorUtils"; + +export class GUISelectors { + public static getDescription(view: WebView) { + return view.findWebElement(By.xpath("//*[contains(text(), 'Quickly')]")); + } + + public static getTipTapEditor(view: WebView) { + return view.findWebElement(By.className("tiptap")); + } + + public static getAllIframes(driver: WebDriver) { + return driver.findElements(By.css("iframe")); + } + + public static getReactIframe(driver: WebDriver) { + return driver.findElement(By.css("iframe")); + } + + public static getSubmitInputButton(view: WebView) { + return SelectorUtils.getElementByDataTestId(view, "submit-input-button"); + } + + public static getModelDropdownButton(view: WebView) { + return SelectorUtils.getElementByDataTestId(view, "model-select-button"); + } + + public static getListbox(view: WebView) { + const listbox = view.findWebElement(By.css('[role="listbox"]')); + } + + public static getModelDropdownOption(view: WebView, option: string) { + return view.findWebElement( + By.xpath(`//*[@role="listbox"]//*[contains(text(), "${option}")]`), + ); + } + + public static getThreadMessageByText(view: WebView, text: string) { + return view.findWebElement( + By.xpath(`//*[@class="thread-message"]//*[contains(text(), "${text}")]`), + ); + } +} diff --git a/extensions/vscode/e2e/selectors/SelectorUtils.ts b/extensions/vscode/e2e/selectors/SelectorUtils.ts new file mode 100644 index 000000000..243e1bf44 --- /dev/null +++ b/extensions/vscode/e2e/selectors/SelectorUtils.ts @@ -0,0 +1,16 @@ +import { By, WebElement, WebView } from "vscode-extension-tester"; + +export class SelectorUtils { + /** + * Finds a web element by its data-testid attribute within a WebView. + * @param view - The WebView to search within. + * @param testId - The data-testid value to search for. + * @returns A promise that resolves to the WebElement found. + */ + public static getElementByDataTestId( + view: WebView, + testId: string, + ): Promise { + return view.findWebElement(By.css(`[data-testid='${testId}']`)); + } +} diff --git a/extensions/vscode/e2e/test-files/config.json b/extensions/vscode/e2e/test-files/config.json new file mode 100644 index 000000000..524cd8403 --- /dev/null +++ b/extensions/vscode/e2e/test-files/config.json @@ -0,0 +1,4 @@ +{ + "name": "Untitled.txt", + "content": "Hello, world!" +} diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts new file mode 100644 index 000000000..87837c69c --- /dev/null +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -0,0 +1,61 @@ +import { + EditorView, + WebView, + WebDriver, + Key, + VSBrowser, +} from "vscode-extension-tester"; +import { expect } from "chai"; +import { GUIActions } from "../actions/GUI.actions"; +import { GUISelectors } from "../selectors/GUI.selectors"; +import * as path from "path"; + +describe("GUI Test", () => { + let view: WebView; + let driver: WebDriver; + + before(async function () { + this.timeout(10000000); + + await VSBrowser.instance.openResources(path.join("e2e/test-files")); + + await GUIActions.openGui(); + + view = new WebView(); + driver = view.getDriver(); + + await GUIActions.switchToReactIframe(driver); + // await new Promise((res) => { + // setTimeout(res, 10000000); + // }); + }); + + after(async () => { + await view.switchBack(); + await new EditorView().closeAllEditors(); + }); + + it("should display correct panel description", async () => { + const description = await GUISelectors.getDescription(view); + + expect(await description.getText()).has.string( + "Quickly get up and running using our API keys.", + ); + }); + + it.only("should allow typing text in the editor", async () => { + await GUIActions.selectModelFromDropdown(view, "Mock"); + await GUIActions.selectModelFromDropdown(view, "TEST LLM"); + + const tiptap = await GUISelectors.getTipTapEditor(view); + + await tiptap.sendKeys("How are you?"); + (await GUISelectors.getSubmitInputButton(view)).click(); + + await new Promise((res) => { + setTimeout(res, 600000000); + }); + + await GUISelectors.getThreadMessageByText(view, "I'm fine"); + }).timeout(600000000); +}); diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index acc5b947b..9d353798f 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.244", + "version": "0.9.251", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -613,6 +613,7 @@ "quick-test": "npm run build-test && node ./out/runTestOnVSCodeHost.js", "prepackage": "node scripts/prepackage.js", "package": "node scripts/package.js", + "e2e:package": "CONTINUE_GLOBAL_DIR=e2e/test-files node scripts/package.js", "package-all": "node scripts/package-all.js", "package:pre-release": "node scripts/package.js --pre-release", "build:rust": "cargo-cp-artifact -ac sync sync.node -- cargo build --manifest-path ../../sync/Cargo.toml --message-format=json-render-diagnostics", @@ -625,8 +626,10 @@ "e2e:sign-vscode": "codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'", "e2e:copy-vsix": "chmod +x ./e2e/get-latest-vsix.sh && bash ./e2e/get-latest-vsix.sh", "e2e:install-vsix": "extest install-vsix -f ./e2e/vsix/continue.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", - "e2e:test": "extest run-tests './e2e/_output/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", - "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test", + "e2e:test": "extest run-tests './e2e/_output/tests/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", + "e2e:clean": "rm -rf ./e2e/_output", + "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test && npm run e2e:clean", + "e2e:quick": "CONTINUE_GLOBAL_DIR=e2e/test-files npm run e2e:compile && npm run e2e:test && npm run e2e:clean", "e2e:ci": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test" }, "devDependencies": { diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 9348e5262..f83c27d1e 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -208,6 +208,7 @@ function InputToolbar(props: InputToolbarProps) { )} { if (props.onEnter) { props.onEnter({ diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index a4d7fe364..c5edb5d7b 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -316,6 +316,7 @@ function ModelSelect() { >
Date: Fri, 6 Dec 2024 15:39:42 -0800 Subject: [PATCH 093/113] fix ImportDefinitionsService bug --- .../context/ImportDefinitionsService.ts | 13 +++++++++++-- core/util/LruCache.ts | 8 ++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/core/autocomplete/context/ImportDefinitionsService.ts b/core/autocomplete/context/ImportDefinitionsService.ts index 128dbf78e..309310738 100644 --- a/core/autocomplete/context/ImportDefinitionsService.ts +++ b/core/autocomplete/context/ImportDefinitionsService.ts @@ -29,14 +29,23 @@ export class ImportDefinitionsService { return this.cache.get(filepath); } - private async _getFileInfo(filepath: string): Promise { + private async _getFileInfo(filepath: string): Promise { const parser = await getParserForFile(filepath); if (!parser) { return { imports: {}, }; } - const ast = parser.parse(await this.ide.readFile(filepath), undefined, { + + let fileContents: string | undefined = undefined; + try { + fileContents = await this.ide.readFile(filepath); + } catch (err) { + // File removed + return null; + } + + const ast = parser.parse(fileContents, undefined, { includedRanges: [ { startIndex: 0, diff --git a/core/util/LruCache.ts b/core/util/LruCache.ts index f6d923fed..86925a6bc 100644 --- a/core/util/LruCache.ts +++ b/core/util/LruCache.ts @@ -1,7 +1,7 @@ export class PrecalculatedLruCache { private items: [string, V][] = []; constructor( - private readonly calculateValue: (key: string) => Promise, + private readonly calculateValue: (key: string) => Promise, private readonly N: number, ) {} @@ -11,7 +11,11 @@ export class PrecalculatedLruCache { if (index < 0) { // Calculate info for new file - const value: V = await this.calculateValue(key); + const value: V | null = await this.calculateValue(key); + + if (value === null) { + return; + } this.items.push([key, value]); if (this.items.length > this.N) { From b95956155f8c40beebd89894fdf1d2184295569c Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 15:45:57 -0800 Subject: [PATCH 094/113] preview.yaml back to normal --- .github/workflows/preview.yaml | 193 ++++++++++++++++----------------- 1 file changed, 95 insertions(+), 98 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 9a3604f09..f433e8fe0 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -1,30 +1,27 @@ name: Publish Preview Extension on: - push: - branches: - - nate/mac-14-ci - # release: - # types: [prereleased] + release: + types: [prereleased] jobs: - # check_release_name: - # runs-on: ubuntu-latest - # outputs: - # should_run: ${{ steps.check.outputs.should_run }} - # steps: - # - id: check - # working-directory: . - # run: | - # if [[ "${{ github.event.release.tag_name }}" == v0.9.*-vscode ]]; then - # echo "should_run=true" >> $GITHUB_OUTPUT - # else - # echo "should_run=false" >> $GITHUB_OUTPUT - # fi + check_release_name: + runs-on: ubuntu-latest + outputs: + should_run: ${{ steps.check.outputs.should_run }} + steps: + - id: check + working-directory: . + run: | + if [[ "${{ github.event.release.tag_name }}" == v0.9.*-vscode ]]; then + echo "should_run=true" >> $GITHUB_OUTPUT + else + echo "should_run=false" >> $GITHUB_OUTPUT + fi build: - # needs: check_release_name - # if: needs.check_release_name.outputs.should_run == 'true' + needs: check_release_name + if: needs.check_release_name.outputs.should_run == 'true' strategy: matrix: include: @@ -164,93 +161,93 @@ jobs: name: ${{ env.target }}-vsix path: "extensions/vscode/*.vsix" - # release: - # permissions: - # contents: write - # runs-on: ubuntu-latest - # needs: - # - build - # steps: - # - name: Checkout - # uses: actions/checkout@v4 + release: + permissions: + contents: write + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Checkout + uses: actions/checkout@v4 - # - name: Set up Git - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" + - name: Set up Git + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" - # # Download the .vsix artifacts - # - uses: actions/download-artifact@v4 - # with: - # pattern: "*-vsix" - # path: vsix-artifacts - # merge-multiple: true + # Download the .vsix artifacts + - uses: actions/download-artifact@v4 + with: + pattern: "*-vsix" + path: vsix-artifacts + merge-multiple: true - # - name: Release - # uses: softprops/action-gh-release@v2 - # with: - # tag_name: ${{ github.ref_name }} - # files: | - # vsix-artifacts/*.vsix - # token: ${{ secrets.CI_GITHUB_TOKEN }} - # repository: continuedev/continue - # prerelease: true + - name: Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + files: | + vsix-artifacts/*.vsix + token: ${{ secrets.CI_GITHUB_TOKEN }} + repository: continuedev/continue + prerelease: true - # publish: - # runs-on: ubuntu-latest - # needs: - # - build - # permissions: - # contents: write - # steps: - # # 0. Setup git - # - name: Checkout - # uses: actions/checkout@v4 + publish: + runs-on: ubuntu-latest + needs: + - build + permissions: + contents: write + steps: + # 0. Setup git + - name: Checkout + uses: actions/checkout@v4 - # - name: Set up Git - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" + - name: Set up Git + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" - # - name: Pull latest changes - # run: git pull origin main + - name: Pull latest changes + run: git pull origin main - # # 1. Download the artifacts - # - uses: actions/download-artifact@v4 - # with: - # pattern: "*-vsix" - # path: vsix-artifacts - # merge-multiple: true + # 1. Download the artifacts + - uses: actions/download-artifact@v4 + with: + pattern: "*-vsix" + path: vsix-artifacts + merge-multiple: true - # # 2. Publish the extension to VS Code Marketplace - # - name: Publish to VS Code Marketplace - # run: | - # cd extensions/vscode - # npx vsce publish --pre-release --packagePath ../../vsix-artifacts/*.vsix - # env: - # VSCE_PAT: ${{ secrets.VSCE_TOKEN }} + # 2. Publish the extension to VS Code Marketplace + - name: Publish to VS Code Marketplace + run: | + cd extensions/vscode + npx vsce publish --pre-release --packagePath ../../vsix-artifacts/*.vsix + env: + VSCE_PAT: ${{ secrets.VSCE_TOKEN }} - # # 3. Publish the extension to Open VSX Registry - # - name: Publish (Open VSX Registry) - # continue-on-error: true - # run: | - # cd extensions/vscode - # npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix + # 3. Publish the extension to Open VSX Registry + - name: Publish (Open VSX Registry) + continue-on-error: true + run: | + cd extensions/vscode + npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix - # 4. Update the package.json version and push changes - # - name: Update version in package.json - # run: | - # cd extensions/vscode - # npm version patch + 4. Update the package.json version and push changes + - name: Update version in package.json + run: | + cd extensions/vscode + npm version patch - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "💚 Update package.json version [skip ci]" + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "💚 Update package.json version [skip ci]" - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} From 39a0cab5e413ac060a492d1ab24bd9367688d3b8 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 15:47:12 -0800 Subject: [PATCH 095/113] comment --- .github/workflows/preview.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index f433e8fe0..2f3e0875d 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -234,20 +234,20 @@ jobs: cd extensions/vscode npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix - 4. Update the package.json version and push changes - - name: Update version in package.json - run: | - cd extensions/vscode - npm version patch + # 4. Update the package.json version and push changes + # - name: Update version in package.json + # run: | + # cd extensions/vscode + # npm version patch - - name: Commit changes - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git commit -am "💚 Update package.json version [skip ci]" + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "💚 Update package.json version [skip ci]" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} From a255583d2264b40a22546fd45871ceabaaf2c5d3 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 15:47:33 -0800 Subject: [PATCH 096/113] tab --- .github/workflows/preview.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 2f3e0875d..da46e9d49 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -234,20 +234,20 @@ jobs: cd extensions/vscode npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix - # 4. Update the package.json version and push changes - # - name: Update version in package.json - # run: | - # cd extensions/vscode - # npm version patch + # 4. Update the package.json version and push changes + # - name: Update version in package.json + # run: | + # cd extensions/vscode + # npm version patch - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "💚 Update package.json version [skip ci]" + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "💚 Update package.json version [skip ci]" - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} From 9857ea8df6d6833524cc279d72f2de61ae218c7e Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 15:47:57 -0800 Subject: [PATCH 097/113] tab --- .github/workflows/preview.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index da46e9d49..2f3e0875d 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -234,20 +234,20 @@ jobs: cd extensions/vscode npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix - # 4. Update the package.json version and push changes - # - name: Update version in package.json - # run: | - # cd extensions/vscode - # npm version patch + # 4. Update the package.json version and push changes + # - name: Update version in package.json + # run: | + # cd extensions/vscode + # npm version patch - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "💚 Update package.json version [skip ci]" + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "💚 Update package.json version [skip ci]" - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} From 321e079d527407e29fa78c595e30c0369639e2e6 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 15:48:16 -0800 Subject: [PATCH 098/113] more tabs --- .github/workflows/preview.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 2f3e0875d..bd5f4b7ac 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -234,20 +234,20 @@ jobs: cd extensions/vscode npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../vsix-artifacts/*.vsix - # 4. Update the package.json version and push changes - # - name: Update version in package.json - # run: | - # cd extensions/vscode - # npm version patch + # 4. Update the package.json version and push changes + # - name: Update version in package.json + # run: | + # cd extensions/vscode + # npm version patch - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "💚 Update package.json version [skip ci]" + # - name: Commit changes + # run: | + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" + # git commit -am "💚 Update package.json version [skip ci]" - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # branch: ${{ github.ref }} + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} From ba41678a398385300f11b2194c091a62b2ee4e94 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 16:47:20 -0800 Subject: [PATCH 099/113] test: set up test config.json and test project directory --- extensions/vscode/.gitignore | 3 +- extensions/vscode/.vscodeignore | 1 + .../vscode/e2e/test-continue/config.json | 44 +++++++++++++++++++ extensions/vscode/e2e/test-files/config.json | 4 -- extensions/vscode/e2e/tests/GUI.test.ts | 6 +-- extensions/vscode/package.json | 7 ++- 6 files changed, 53 insertions(+), 12 deletions(-) create mode 100644 extensions/vscode/e2e/test-continue/config.json delete mode 100644 extensions/vscode/e2e/test-files/config.json diff --git a/extensions/vscode/.gitignore b/extensions/vscode/.gitignore index 23c012927..f922ad032 100644 --- a/extensions/vscode/.gitignore +++ b/extensions/vscode/.gitignore @@ -18,8 +18,9 @@ gui/** continue_rc_schema.json - e2e/_output e2e/.test-extensions e2e/storage e2e/vsix +e2e/test-continue/* +!e2e/test-continue/config.json \ No newline at end of file diff --git a/extensions/vscode/.vscodeignore b/extensions/vscode/.vscodeignore index 9d59dbe5c..387be8ba5 100644 --- a/extensions/vscode/.vscodeignore +++ b/extensions/vscode/.vscodeignore @@ -21,6 +21,7 @@ esbuild.js esbuild.test.mjs importMetaUrl.js scripts +e2e server/exe/** !out/node_modules/** diff --git a/extensions/vscode/e2e/test-continue/config.json b/extensions/vscode/e2e/test-continue/config.json new file mode 100644 index 000000000..6ffeb7465 --- /dev/null +++ b/extensions/vscode/e2e/test-continue/config.json @@ -0,0 +1,44 @@ +{ + "ui": { + "displayRawMarkdown": false + }, + "models": [ + { + "title": "TEST LLM", + "provider": "test", + "model": "this field is not used" + }, + { + "title": "Mock", + "provider": "mock", + "model": "this field is not used" + } + ], + "analytics": { + "provider": "continue-proxy" + }, + "tabAutocompleteModel": { + "title": "Qwen", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "" + }, + "tabAutocompleteOptions": { + "useCache": false + }, + "contextProviders": [ + { + "name": "docs" + }, + { + "name": "diff" + }, + { + "name": "url" + }, + { + "name": "folder" + } + ], + "docs": [] +} diff --git a/extensions/vscode/e2e/test-files/config.json b/extensions/vscode/e2e/test-files/config.json deleted file mode 100644 index 524cd8403..000000000 --- a/extensions/vscode/e2e/test-files/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "Untitled.txt", - "content": "Hello, world!" -} diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index 87837c69c..abab249b9 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -17,7 +17,7 @@ describe("GUI Test", () => { before(async function () { this.timeout(10000000); - await VSBrowser.instance.openResources(path.join("e2e/test-files")); + await VSBrowser.instance.openResources(path.join("e2e/test-continue")); await GUIActions.openGui(); @@ -43,7 +43,7 @@ describe("GUI Test", () => { ); }); - it.only("should allow typing text in the editor", async () => { + it("should allow typing text in the editor", async () => { await GUIActions.selectModelFromDropdown(view, "Mock"); await GUIActions.selectModelFromDropdown(view, "TEST LLM"); @@ -53,7 +53,7 @@ describe("GUI Test", () => { (await GUISelectors.getSubmitInputButton(view)).click(); await new Promise((res) => { - setTimeout(res, 600000000); + setTimeout(res, 1000); }); await GUISelectors.getThreadMessageByText(view, "I'm fine"); diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9d353798f..b9b2fb022 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.251", + "version": "0.9.257", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -613,7 +613,6 @@ "quick-test": "npm run build-test && node ./out/runTestOnVSCodeHost.js", "prepackage": "node scripts/prepackage.js", "package": "node scripts/package.js", - "e2e:package": "CONTINUE_GLOBAL_DIR=e2e/test-files node scripts/package.js", "package-all": "node scripts/package-all.js", "package:pre-release": "node scripts/package.js --pre-release", "build:rust": "cargo-cp-artifact -ac sync sync.node -- cargo build --manifest-path ../../sync/Cargo.toml --message-format=json-render-diagnostics", @@ -628,8 +627,8 @@ "e2e:install-vsix": "extest install-vsix -f ./e2e/vsix/continue.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", "e2e:test": "extest run-tests './e2e/_output/tests/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", "e2e:clean": "rm -rf ./e2e/_output", - "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test && npm run e2e:clean", - "e2e:quick": "CONTINUE_GLOBAL_DIR=e2e/test-files npm run e2e:compile && npm run e2e:test && npm run e2e:clean", + "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean", + "e2e:quick": "npm run e2e:compile && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean", "e2e:ci": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test" }, "devDependencies": { From af5d5fadb0fa9e8ae9364eb77844b9a027280ac3 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:22:24 -0800 Subject: [PATCH 100/113] test: add waitForElement util --- extensions/vscode/e2e/TestUtils.ts | 27 +++++++++++++++++++++++++ extensions/vscode/e2e/tests/GUI.test.ts | 11 +++++----- 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 extensions/vscode/e2e/TestUtils.ts diff --git a/extensions/vscode/e2e/TestUtils.ts b/extensions/vscode/e2e/TestUtils.ts new file mode 100644 index 000000000..dc1fd556e --- /dev/null +++ b/extensions/vscode/e2e/TestUtils.ts @@ -0,0 +1,27 @@ +import { WebElement } from "vscode-extension-tester"; + +export class TestUtils { + public static async waitForElement( + locatorFn: () => Promise, + timeout: number = 1500, + interval: number = 500, + ): Promise { + const startTime = Date.now(); + + while (Date.now() - startTime < timeout) { + try { + const element = await locatorFn(); + if (element) { + return element; + } + } catch (e) { + if (Date.now() - startTime >= timeout) { + throw new Error(`Element not found after ${timeout}ms timeout`); + } + } + await new Promise((resolve) => setTimeout(resolve, interval)); + } + + throw new Error(`Element not found after ${timeout}ms timeout`); + } +} diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index abab249b9..d14eaad2a 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -2,13 +2,13 @@ import { EditorView, WebView, WebDriver, - Key, VSBrowser, } from "vscode-extension-tester"; import { expect } from "chai"; import { GUIActions } from "../actions/GUI.actions"; import { GUISelectors } from "../selectors/GUI.selectors"; import * as path from "path"; +import { TestUtils } from "../TestUtils"; describe("GUI Test", () => { let view: WebView; @@ -52,10 +52,9 @@ describe("GUI Test", () => { await tiptap.sendKeys("How are you?"); (await GUISelectors.getSubmitInputButton(view)).click(); - await new Promise((res) => { - setTimeout(res, 1000); - }); - - await GUISelectors.getThreadMessageByText(view, "I'm fine"); + await TestUtils.waitForElement( + () => GUISelectors.getThreadMessageByText(view, "I'm fine"), + 5000, + ); }).timeout(600000000); }); From ec121409f8bd813fc3360227adddcc869d10a29f Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:25:10 -0800 Subject: [PATCH 101/113] test: clean up code --- extensions/vscode/e2e/TestUtils.ts | 2 +- extensions/vscode/e2e/actions/GUI.actions.ts | 1 + extensions/vscode/e2e/selectors/GUI.selectors.ts | 4 ---- extensions/vscode/e2e/tests/GUI.test.ts | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/extensions/vscode/e2e/TestUtils.ts b/extensions/vscode/e2e/TestUtils.ts index dc1fd556e..47651d926 100644 --- a/extensions/vscode/e2e/TestUtils.ts +++ b/extensions/vscode/e2e/TestUtils.ts @@ -3,7 +3,7 @@ import { WebElement } from "vscode-extension-tester"; export class TestUtils { public static async waitForElement( locatorFn: () => Promise, - timeout: number = 1500, + timeout: number = 5000, interval: number = 500, ): Promise { const startTime = Date.now(); diff --git a/extensions/vscode/e2e/actions/GUI.actions.ts b/extensions/vscode/e2e/actions/GUI.actions.ts index 1e59f1d15..86fcb293b 100644 --- a/extensions/vscode/e2e/actions/GUI.actions.ts +++ b/extensions/vscode/e2e/actions/GUI.actions.ts @@ -5,6 +5,7 @@ import { Workbench, } from "vscode-extension-tester"; import { GUISelectors } from "../selectors/GUI.selectors"; +import { TestUtils } from "../TestUtils"; export class GUIActions { public static switchToReactIframe = async (driver: WebDriver) => { diff --git a/extensions/vscode/e2e/selectors/GUI.selectors.ts b/extensions/vscode/e2e/selectors/GUI.selectors.ts index 1208d1a04..b4c88aacb 100644 --- a/extensions/vscode/e2e/selectors/GUI.selectors.ts +++ b/extensions/vscode/e2e/selectors/GUI.selectors.ts @@ -26,10 +26,6 @@ export class GUISelectors { return SelectorUtils.getElementByDataTestId(view, "model-select-button"); } - public static getListbox(view: WebView) { - const listbox = view.findWebElement(By.css('[role="listbox"]')); - } - public static getModelDropdownOption(view: WebView, option: string) { return view.findWebElement( By.xpath(`//*[@role="listbox"]//*[contains(text(), "${option}")]`), diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index d14eaad2a..b01feb35e 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -54,7 +54,6 @@ describe("GUI Test", () => { await TestUtils.waitForElement( () => GUISelectors.getThreadMessageByText(view, "I'm fine"), - 5000, ); }).timeout(600000000); }); From b9f161f6d8b4e7400dff25912881f41f472a9137 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:43:13 -0800 Subject: [PATCH 102/113] fix: timeout --- extensions/vscode/e2e/actions/GUI.actions.ts | 4 ++++ extensions/vscode/e2e/tests/GUI.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/e2e/actions/GUI.actions.ts b/extensions/vscode/e2e/actions/GUI.actions.ts index 86fcb293b..9ad60e275 100644 --- a/extensions/vscode/e2e/actions/GUI.actions.ts +++ b/extensions/vscode/e2e/actions/GUI.actions.ts @@ -50,6 +50,10 @@ export class GUIActions { const dropdownButton = await GUISelectors.getModelDropdownButton(view); await dropdownButton.click(); + await new Promise((res) => { + setTimeout(res, 1000); + }); + const dropdownOption = await GUISelectors.getModelDropdownOption( view, option, diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index b01feb35e..66791cf74 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -52,8 +52,8 @@ describe("GUI Test", () => { await tiptap.sendKeys("How are you?"); (await GUISelectors.getSubmitInputButton(view)).click(); - await TestUtils.waitForElement( - () => GUISelectors.getThreadMessageByText(view, "I'm fine"), + await TestUtils.waitForElement(() => + GUISelectors.getThreadMessageByText(view, "I'm fine"), ); }).timeout(600000000); }); From 120e46fcbc31d0f743c3dd98e08c70fa21f5cdd5 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:50:18 -0800 Subject: [PATCH 103/113] test: timeout --- extensions/vscode/e2e/actions/GUI.actions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/vscode/e2e/actions/GUI.actions.ts b/extensions/vscode/e2e/actions/GUI.actions.ts index 9ad60e275..3c8f59100 100644 --- a/extensions/vscode/e2e/actions/GUI.actions.ts +++ b/extensions/vscode/e2e/actions/GUI.actions.ts @@ -5,7 +5,6 @@ import { Workbench, } from "vscode-extension-tester"; import { GUISelectors } from "../selectors/GUI.selectors"; -import { TestUtils } from "../TestUtils"; export class GUIActions { public static switchToReactIframe = async (driver: WebDriver) => { @@ -51,7 +50,7 @@ export class GUIActions { await dropdownButton.click(); await new Promise((res) => { - setTimeout(res, 1000); + setTimeout(res, 2000); }); const dropdownOption = await GUISelectors.getModelDropdownOption( From 8d06b9f381414ecc7c6c030d4730e89d80b41466 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:51:52 -0800 Subject: [PATCH 104/113] test: wait for element --- extensions/vscode/e2e/TestUtils.ts | 2 +- extensions/vscode/e2e/actions/GUI.actions.ts | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/extensions/vscode/e2e/TestUtils.ts b/extensions/vscode/e2e/TestUtils.ts index 47651d926..05e4bc5d1 100644 --- a/extensions/vscode/e2e/TestUtils.ts +++ b/extensions/vscode/e2e/TestUtils.ts @@ -5,7 +5,7 @@ export class TestUtils { locatorFn: () => Promise, timeout: number = 5000, interval: number = 500, - ): Promise { + ): Promise { const startTime = Date.now(); while (Date.now() - startTime < timeout) { diff --git a/extensions/vscode/e2e/actions/GUI.actions.ts b/extensions/vscode/e2e/actions/GUI.actions.ts index 3c8f59100..7a6e76c04 100644 --- a/extensions/vscode/e2e/actions/GUI.actions.ts +++ b/extensions/vscode/e2e/actions/GUI.actions.ts @@ -5,6 +5,7 @@ import { Workbench, } from "vscode-extension-tester"; import { GUISelectors } from "../selectors/GUI.selectors"; +import { TestUtils } from "../TestUtils"; export class GUIActions { public static switchToReactIframe = async (driver: WebDriver) => { @@ -49,14 +50,10 @@ export class GUIActions { const dropdownButton = await GUISelectors.getModelDropdownButton(view); await dropdownButton.click(); - await new Promise((res) => { - setTimeout(res, 2000); + const dropdownOption = await TestUtils.waitForElement(() => { + return GUISelectors.getModelDropdownOption(view, option); }); - const dropdownOption = await GUISelectors.getModelDropdownOption( - view, - option, - ); await dropdownOption.click(); }; } From fe06296bba7f86e270b93e234670f18d7cced594 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:57:42 -0800 Subject: [PATCH 105/113] test: timeouts --- extensions/vscode/e2e/tests/GUI.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index 66791cf74..6a5e820f8 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -41,7 +41,7 @@ describe("GUI Test", () => { expect(await description.getText()).has.string( "Quickly get up and running using our API keys.", ); - }); + }).timeout(20_000); it("should allow typing text in the editor", async () => { await GUIActions.selectModelFromDropdown(view, "Mock"); @@ -55,5 +55,5 @@ describe("GUI Test", () => { await TestUtils.waitForElement(() => GUISelectors.getThreadMessageByText(view, "I'm fine"), ); - }).timeout(600000000); + }).timeout(20_000); }); From 92a688c7a8c1fe1ace3426fe2be521b9f5d55afb Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 17:58:34 -0800 Subject: [PATCH 106/113] cancelStream --- gui/src/pages/gui/Chat.tsx | 3 ++- gui/src/redux/thunks/cancelStream.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 gui/src/redux/thunks/cancelStream.ts diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 8545813bc..851a6f13b 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -57,6 +57,7 @@ import { setShowDialog, } from "../../redux/slices/uiSlice"; import { RootState } from "../../redux/store"; +import { cancelStream } from "../../redux/thunks/cancelStream"; import { exitEditMode } from "../../redux/thunks/exitEditMode"; import { streamResponseThunk } from "../../redux/thunks/streamResponse"; import { @@ -203,7 +204,7 @@ export function Chat() { isMetaEquivalentKeyPressed(e) && !e.shiftKey ) { - // dispatch(cancelGeneration()); TODO!!! + dispatch(cancelStream()); } }; window.addEventListener("keydown", listener); diff --git a/gui/src/redux/thunks/cancelStream.ts b/gui/src/redux/thunks/cancelStream.ts new file mode 100644 index 000000000..0f1a6aeca --- /dev/null +++ b/gui/src/redux/thunks/cancelStream.ts @@ -0,0 +1,14 @@ +import { createAsyncThunk } from "@reduxjs/toolkit"; +import { setInactive } from "../slices/sessionSlice"; +import { ThunkApiType } from "../store"; + +export const cancelStream = createAsyncThunk( + "chat/cancelStream", + async (messages, { dispatch, extra, getState }) => { + dispatch(setInactive()); + + // If the assistant message is empty, then remove it and the user message, placing the user input in the main text box + // TODO: Waiting until next release + // dispatch(clearLastEmptyResponse()); + }, +); From 781f27728b468140b947dfd45767911ea64b6eec Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 17:59:44 -0800 Subject: [PATCH 107/113] test: ci --- extensions/vscode/e2e/tests/GUI.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index 6a5e820f8..e4db4df3b 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -44,7 +44,7 @@ describe("GUI Test", () => { }).timeout(20_000); it("should allow typing text in the editor", async () => { - await GUIActions.selectModelFromDropdown(view, "Mock"); + // await GUIActions.selectModelFromDropdown(view, "Mock"); await GUIActions.selectModelFromDropdown(view, "TEST LLM"); const tiptap = await GUISelectors.getTipTapEditor(view); From 1520d0815a4737228b729906cdb9d72851fbf63a Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 18:04:02 -0800 Subject: [PATCH 108/113] abortStream() --- gui/src/redux/thunks/cancelStream.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/redux/thunks/cancelStream.ts b/gui/src/redux/thunks/cancelStream.ts index 0f1a6aeca..dc23c04a6 100644 --- a/gui/src/redux/thunks/cancelStream.ts +++ b/gui/src/redux/thunks/cancelStream.ts @@ -1,11 +1,12 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; -import { setInactive } from "../slices/sessionSlice"; +import { abortStream, setInactive } from "../slices/sessionSlice"; import { ThunkApiType } from "../store"; export const cancelStream = createAsyncThunk( "chat/cancelStream", async (messages, { dispatch, extra, getState }) => { dispatch(setInactive()); + dispatch(abortStream()); // If the assistant message is empty, then remove it and the user message, placing the user input in the main text box // TODO: Waiting until next release From 90603a6ccd7a713596bb8354a1d3c211f96a5c37 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 18:04:33 -0800 Subject: [PATCH 109/113] test: log listbox --- extensions/vscode/e2e/selectors/GUI.selectors.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/selectors/GUI.selectors.ts b/extensions/vscode/e2e/selectors/GUI.selectors.ts index b4c88aacb..c1dbdbf78 100644 --- a/extensions/vscode/e2e/selectors/GUI.selectors.ts +++ b/extensions/vscode/e2e/selectors/GUI.selectors.ts @@ -26,7 +26,10 @@ export class GUISelectors { return SelectorUtils.getElementByDataTestId(view, "model-select-button"); } - public static getModelDropdownOption(view: WebView, option: string) { + public static async getModelDropdownOption(view: WebView, option: string) { + const listbox = await view.findWebElement(By.xpath('//*[@role="listbox"]')); + + console.log("LISTBOX", await listbox.getText()); return view.findWebElement( By.xpath(`//*[@role="listbox"]//*[contains(text(), "${option}")]`), ); From 27d20eb08b25b142a54641048670b036e201ea1d Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Fri, 6 Dec 2024 18:07:34 -0800 Subject: [PATCH 110/113] fix: ci tests --- extensions/vscode/e2e/selectors/GUI.selectors.ts | 5 +---- extensions/vscode/e2e/tests/GUI.test.ts | 2 +- extensions/vscode/package.json | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/extensions/vscode/e2e/selectors/GUI.selectors.ts b/extensions/vscode/e2e/selectors/GUI.selectors.ts index c1dbdbf78..b4c88aacb 100644 --- a/extensions/vscode/e2e/selectors/GUI.selectors.ts +++ b/extensions/vscode/e2e/selectors/GUI.selectors.ts @@ -26,10 +26,7 @@ export class GUISelectors { return SelectorUtils.getElementByDataTestId(view, "model-select-button"); } - public static async getModelDropdownOption(view: WebView, option: string) { - const listbox = await view.findWebElement(By.xpath('//*[@role="listbox"]')); - - console.log("LISTBOX", await listbox.getText()); + public static getModelDropdownOption(view: WebView, option: string) { return view.findWebElement( By.xpath(`//*[@role="listbox"]//*[contains(text(), "${option}")]`), ); diff --git a/extensions/vscode/e2e/tests/GUI.test.ts b/extensions/vscode/e2e/tests/GUI.test.ts index e4db4df3b..6a5e820f8 100644 --- a/extensions/vscode/e2e/tests/GUI.test.ts +++ b/extensions/vscode/e2e/tests/GUI.test.ts @@ -44,7 +44,7 @@ describe("GUI Test", () => { }).timeout(20_000); it("should allow typing text in the editor", async () => { - // await GUIActions.selectModelFromDropdown(view, "Mock"); + await GUIActions.selectModelFromDropdown(view, "Mock"); await GUIActions.selectModelFromDropdown(view, "TEST LLM"); const tiptap = await GUISelectors.getTipTapEditor(view); diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index f5beee189..9cf7db2b1 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -629,7 +629,7 @@ "e2e:clean": "rm -rf ./e2e/_output", "e2e:all": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean", "e2e:quick": "npm run e2e:compile && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean", - "e2e:ci": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:test" + "e2e:ci": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test" }, "devDependencies": { "@biomejs/biome": "1.6.4", From 2d09fdcb295d88295bb375078d14965f1fb6d156 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 18:57:30 -0800 Subject: [PATCH 111/113] clean up logs --- core/context/retrieval/repoMapRequest.ts | 1 - core/util/constants.ts | 1 + core/util/history.ts | 4 ++-- core/util/treeSitter.ts | 8 +++++++- extensions/vscode/package-lock.json | 4 ++-- gui/src/components/FileIcon.tsx | 10 ++++++++-- gui/src/components/mainInput/ContextItemsPeek.tsx | 6 +++--- gui/src/hooks/useHistory.tsx | 5 +++-- gui/src/redux/slices/sessionSlice.ts | 3 ++- 9 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 core/util/constants.ts diff --git a/core/context/retrieval/repoMapRequest.ts b/core/context/retrieval/repoMapRequest.ts index 57f2b339e..5c82ace95 100644 --- a/core/context/retrieval/repoMapRequest.ts +++ b/core/context/retrieval/repoMapRequest.ts @@ -66,7 +66,6 @@ This is the question that you should select relevant files for: "${input}"`; new AbortController().signal, ); const content = renderChatMessage(response); - console.debug("Repo map retrieval response: ", content); if (!content.includes("\n")) { return []; diff --git a/core/util/constants.ts b/core/util/constants.ts new file mode 100644 index 000000000..188fc0005 --- /dev/null +++ b/core/util/constants.ts @@ -0,0 +1 @@ +export const NEW_SESSION_TITLE = "New Session"; diff --git a/core/util/history.ts b/core/util/history.ts index 053c23455..622c2c9ce 100644 --- a/core/util/history.ts +++ b/core/util/history.ts @@ -3,8 +3,8 @@ import * as fs from "fs"; import { Session, SessionMetadata } from "../index.js"; import { ListHistoryOptions } from "../protocol/core.js"; +import { NEW_SESSION_TITLE } from "./constants.js"; import { getSessionFilePath, getSessionsListPath } from "./paths.js"; - function safeParseArray( value: string, errorMessage: string = "Error parsing array", @@ -80,7 +80,7 @@ class HistoryManager { console.log(`Error loading session: ${e}`); return { history: [], - title: "Failed to load session", + title: NEW_SESSION_TITLE, workspaceDirectory: "", sessionId: sessionId, }; diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index 8029c0609..daa12827d 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -231,7 +231,13 @@ export async function getSymbolsForFile( return; } - const tree = parser.parse(contents); + let tree: Parser.Tree; + try { + tree = parser.parse(contents); + } catch (e) { + console.log(`Error parsing file: ${filepath}`); + return; + } // console.log(`file: ${filepath}`); // Function to recursively find all named nodes (classes and functions) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 923f4c9b5..ea5966c13 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.244", + "version": "0.9.240", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.244", + "version": "0.9.240", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/gui/src/components/FileIcon.tsx b/gui/src/components/FileIcon.tsx index 8117ce734..96321348c 100644 --- a/gui/src/components/FileIcon.tsx +++ b/gui/src/components/FileIcon.tsx @@ -31,9 +31,15 @@ export default function FileIcon({ filename, height, width }: FileIconProps) { const sanitizedSVG = DOMPurify.sanitize(svg); return ( -
); } diff --git a/gui/src/components/mainInput/ContextItemsPeek.tsx b/gui/src/components/mainInput/ContextItemsPeek.tsx index 2f97af73b..1e3997930 100644 --- a/gui/src/components/mainInput/ContextItemsPeek.tsx +++ b/gui/src/components/mainInput/ContextItemsPeek.tsx @@ -9,11 +9,11 @@ import { getBasename } from "core/util"; import { useContext, useMemo, useState } from "react"; import { AnimatedEllipsis, lightGray, vscBackground } from ".."; import { IdeMessengerContext } from "../../context/IdeMessenger"; +import { useAppSelector } from "../../redux/hooks"; +import { selectIsGatheringContext } from "../../redux/slices/sessionSlice"; import FileIcon from "../FileIcon"; import SafeImg from "../SafeImg"; import { getIconFromDropdownItem } from "./MentionList"; -import { useAppSelector } from "../../redux/hooks"; -import { selectIsGatheringContext } from "../../redux/slices/sessionSlice"; interface ContextItemsPeekProps { contextItems?: ContextItemWithId[]; @@ -172,7 +172,7 @@ function ContextItemsPeek({ {isGatheringContext ? ( <> - Gathering context... + Gathering context ) : ( diff --git a/gui/src/hooks/useHistory.tsx b/gui/src/hooks/useHistory.tsx index 4fcb20035..63252d8f1 100644 --- a/gui/src/hooks/useHistory.tsx +++ b/gui/src/hooks/useHistory.tsx @@ -1,5 +1,6 @@ import { Dispatch } from "@reduxjs/toolkit"; import { Session, SessionMetadata } from "core"; +import { NEW_SESSION_TITLE } from "core/util/constants"; import { renderChatMessage } from "core/util/messageContent"; import { useCallback, useContext } from "react"; import { IdeMessengerContext } from "../context/IdeMessenger"; @@ -65,7 +66,7 @@ function useHistory(dispatch: Dispatch) { } let currentTitle = title; - if (config?.ui?.getChatTitles && currentTitle === "New Session") { + if (config?.ui?.getChatTitles && currentTitle === NEW_SESSION_TITLE) { try { // Check if we have first assistant response let assistantResponse = history @@ -82,7 +83,7 @@ function useHistory(dispatch: Dispatch) { // Fallback if we get an error above or if the user has not set getChatTitles let newTitle = - currentTitle === "New Session" + currentTitle === NEW_SESSION_TITLE ? truncateText( renderChatMessage(history[0].message) .split("\n") diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 1b6f4d7f4..871b1e7eb 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -19,6 +19,7 @@ import { Session, ToolCall, } from "core"; +import { NEW_SESSION_TITLE } from "core/util/constants"; import { incrementalParseJson } from "core/util/incrementalParseJson"; import { renderChatMessage } from "core/util/messageContent"; import { v4 as uuidv4 } from "uuid"; @@ -86,7 +87,7 @@ function getBaseHistoryItem(): ChatHistoryItemWithMessageId { const initialState: SessionState = { history: [], isStreaming: false, - title: "New Session", + title: NEW_SESSION_TITLE, id: uuidv4(), selectedProfileId: "local", curCheckpointIndex: 0, From 16cb2e34f2db56688e165f556c056ab9e45380f1 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 19:04:50 -0800 Subject: [PATCH 112/113] clean more logs --- core/core.ts | 5 +---- core/indexing/docs/DocsService.ts | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/core/core.ts b/core/core.ts index 4dce3ca64..ddfacf5b9 100644 --- a/core/core.ts +++ b/core/core.ts @@ -860,10 +860,7 @@ export class Core { this.indexingCancellationController && !this.indexingCancellationController.signal.aborted ) { - return console.debug( - "Codebase indexing already in progress, skipping indexing of files\n" + - files.join("\n"), - ); + return; } this.indexingCancellationController = new AbortController(); for await (const update of (await this.codebaseIndexerPromise).refreshFiles( diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index 6e841f6be..b52577a5f 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -7,9 +7,9 @@ import { ContinueConfig, EmbeddingsProvider, IDE, + IdeInfo, IndexingStatus, SiteIndexingConfig, - IdeInfo, } from "../.."; import { ConfigHandler } from "../../config/ConfigHandler"; import { addContextProvider } from "../../config/util"; @@ -69,7 +69,6 @@ export type AddParams = { favicon?: string; }; - /* General process: - On config update: @@ -476,8 +475,6 @@ export default class DocsService { const embeddings: number[][] = []; // Create embeddings of retrieved articles - console.debug(`Creating embeddings for ${articles.length} articles`); - for (let i = 0; i < articles.length; i++) { const article = articles[i]; From 12018ec24d70afff4c7915c62000f9c917f0fabb Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 6 Dec 2024 19:15:53 -0800 Subject: [PATCH 113/113] fix tests --- core/util/history.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/util/history.test.ts b/core/util/history.test.ts index 048087564..dbcf69619 100644 --- a/core/util/history.test.ts +++ b/core/util/history.test.ts @@ -1,6 +1,7 @@ import { v4 as uuidv4 } from "uuid"; import { Session } from ".."; +import { NEW_SESSION_TITLE } from "./constants"; import historyManager from "./history"; import { getSessionFilePath } from "./paths"; @@ -31,7 +32,7 @@ describe("No sessions have been created", () => { const session = historyManager.load(testSessionId); expect(session).toEqual({ history: [], - title: "Failed to load session", + title: NEW_SESSION_TITLE, workspaceDirectory: "", sessionId: testSessionId, });