From 69dfc3d1f2581af14088f0e271dc8188bede4a80 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Jul 2025 15:29:22 -0700 Subject: [PATCH 01/46] refactor: remove optInNextEditFeature from experimental config --- core/config/sharedConfig.ts | 9 ++++----- core/index.d.ts | 5 ----- gui/src/pages/config/ContinueFeaturesMenu.tsx | 10 ---------- gui/src/pages/config/UserSettingsForm.tsx | 8 -------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/core/config/sharedConfig.ts b/core/config/sharedConfig.ts index 568a30af8..cda243c79 100644 --- a/core/config/sharedConfig.ts +++ b/core/config/sharedConfig.ts @@ -19,7 +19,6 @@ export const sharedConfigSchema = z readResponseTTS: z.boolean(), promptPath: z.string(), useCurrentFileAsContext: z.boolean(), - optInNextEditFeature: z.boolean(), enableExperimentalTools: z.boolean(), codebaseToolCallingOnly: z.boolean(), enableStaticContextualization: z.boolean(), @@ -181,10 +180,10 @@ export function modifyAnyConfigWithSharedConfig< configCopy.experimental.useCurrentFileAsContext = sharedConfig.useCurrentFileAsContext; } - if (sharedConfig.optInNextEditFeature !== undefined) { - configCopy.experimental.optInNextEditFeature = - sharedConfig.optInNextEditFeature; - } + // if (sharedConfig.optInNextEditFeature !== undefined) { + // configCopy.experimental.optInNextEditFeature = + // sharedConfig.optInNextEditFeature; + // } if (sharedConfig.codebaseToolCallingOnly !== undefined) { configCopy.experimental.codebaseToolCallingOnly = sharedConfig.codebaseToolCallingOnly; diff --git a/core/index.d.ts b/core/index.d.ts index f9fdc34cf..57e456273 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -1540,11 +1540,6 @@ export interface ExperimentalConfig { */ useCurrentFileAsContext?: boolean; - /** - * If enabled, will enable next edit in place of autocomplete - */ - optInNextEditFeature?: boolean; - /** * If enabled, @codebase will only use tool calling * instead of embeddings, FTS, recently edited files, etc. diff --git a/gui/src/pages/config/ContinueFeaturesMenu.tsx b/gui/src/pages/config/ContinueFeaturesMenu.tsx index 5d8d05687..45b46ff23 100644 --- a/gui/src/pages/config/ContinueFeaturesMenu.tsx +++ b/gui/src/pages/config/ContinueFeaturesMenu.tsx @@ -1,14 +1,10 @@ import ToggleSwitch from "../../components/gui/Switch"; interface ContinueFeaturesMenuProps { - optInNextEditFeature: boolean; - handleOptInNextEditToggle: (value: boolean) => void; enableStaticContextualization: boolean; handleEnableStaticContextualizationToggle: (value: boolean) => void; } export function ContinueFeaturesMenu({ - optInNextEditFeature, - handleOptInNextEditToggle, enableStaticContextualization, handleEnableStaticContextualizationToggle, }: ContinueFeaturesMenuProps) { @@ -18,12 +14,6 @@ export function ContinueFeaturesMenu({ 🚧 INTERNAL SETTINGS 🚧
- handleOptInNextEditToggle(!optInNextEditFeature)} - text="Enable Next Edit Over Autocomplete" - /> - diff --git a/gui/src/pages/config/UserSettingsForm.tsx b/gui/src/pages/config/UserSettingsForm.tsx index d507ef133..2267d85a2 100644 --- a/gui/src/pages/config/UserSettingsForm.tsx +++ b/gui/src/pages/config/UserSettingsForm.tsx @@ -67,10 +67,6 @@ export function UserSettingsForm() { }); }; - const handleOptInNextEditToggle = (value: boolean) => { - handleUpdate({ optInNextEditFeature: value }); - }; - const handleEnableStaticContextualizationToggle = (value: boolean) => { handleUpdate({ enableStaticContextualization: value }); }; @@ -92,8 +88,6 @@ export function UserSettingsForm() { config.experimental?.useCurrentFileAsContext ?? false; const enableExperimentalTools = config.experimental?.enableExperimentalTools ?? false; - const optInNextEditFeature = - config.experimental?.optInNextEditFeature ?? false; const codebaseToolCallingOnly = config.experimental?.codebaseToolCallingOnly ?? false; const enableStaticContextualization = @@ -437,8 +431,6 @@ export function UserSettingsForm() { {hasContinueEmail && ( Date: Tue, 22 Jul 2025 15:29:36 -0700 Subject: [PATCH 02/46] feat: update next edit e2e test --- .../vscode/e2e/actions/NextEdit.actions.ts | 14 +- .../e2e/selectors/NextEdit.selectors.ts | 1 + extensions/vscode/e2e/tests/NextEdit.test.ts | 148 +++++++++--------- 3 files changed, 85 insertions(+), 78 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 0f610b680..261561ea5 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -35,24 +35,32 @@ export class NextEditActions { // Check if the editor text didn't change. const editorText = await editor.getText(); - return editorText === "def main():\n "; + return editorText === "def main():\n s"; } /** * Force a Next Edit suggestion using command. */ public static async forceNextEdit(editor: TextEditor): Promise { - await editor.setText("def main():\n "); + console.log("Starting forceNextEdit..."); + await editor.setText("def main():\n s"); + console.log("Text set in editor"); await editor.moveCursor(2, 4); + console.log("Cursor moved to position 2, 4"); await new Workbench().executeCommand("Continue: Force Next Edit"); - await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); + console.log("Executed 'Force Next Edit' command"); + + console.log("Waiting for SVG decoration to appear..."); + await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.MD); // Add a reasonable wait + console.log("Wait completed, looking for decoration..."); const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), DEFAULT_TIMEOUT.XL, ); + console.log("SVG decoration search result:", svgDecoration !== null); return svgDecoration !== null; } diff --git a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts index 7ac1e0bb7..0ee766fef 100644 --- a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts +++ b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts @@ -9,6 +9,7 @@ export class NextEditSelectors { const decorations = await driver.findElement( // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") By.css("[class*='TextEditorDecorationType']"), + // By.css("div[class*='TextEditorDecorationType'][style*='filter']") ); return decorations ?? null; } catch (error) { diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 754d1b3a8..e67a388fc 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -1,69 +1,67 @@ import { expect } from "chai"; -import * as fs from "fs/promises"; import { EditorView, TextEditor } from "vscode-extension-tester"; import { GlobalActions } from "../actions/Global.actions"; import { NextEditActions } from "../actions/NextEdit.actions"; import { DEFAULT_TIMEOUT } from "../constants"; -import { TestUtils } from "../TestUtils"; describe("Next Edit", () => { let editor: TextEditor; - before(async function () { - // this.timeout(DEFAULT_TIMEOUT.XL); + // before(async function () { + // // this.timeout(DEFAULT_TIMEOUT.XL); - const globalContextPath = TestUtils.getGlobalContextFilePath(); + // // const globalContextPath = TestUtils.getGlobalContextFilePath(); - // Update config.json to add optInNextEditFeature. - // globalContext.json does not exist in CI before this test runs. - if (await TestUtils.fileExists(globalContextPath)) { - const globalContext = await fs.readFile(globalContextPath, "utf8"); - const sharedConfig = JSON.parse(globalContext).sharedConfig; + // // // Update config.json to add optInNextEditFeature. + // // // globalContext.json does not exist in CI before this test runs. + // // if (await TestUtils.fileExists(globalContextPath)) { + // // const globalContext = await fs.readFile(globalContextPath, "utf8"); + // // const sharedConfig = JSON.parse(globalContext).sharedConfig; - const sharedConfigWithNextEditEnabled = { - ...sharedConfig, - optInNextEditFeature: true, - }; + // // const sharedConfigWithNextEditEnabled = { + // // ...sharedConfig, + // // optInNextEditFeature: true, + // // }; - const globalContextWithNextEditEnabled = { - ...JSON.parse(globalContext), - sharedConfig: sharedConfigWithNextEditEnabled, - }; + // // const globalContextWithNextEditEnabled = { + // // ...JSON.parse(globalContext), + // // sharedConfig: sharedConfigWithNextEditEnabled, + // // }; - await fs.writeFile( - globalContextPath, - JSON.stringify(globalContextWithNextEditEnabled, null, 2), - "utf8", - ); - } else { - await fs.writeFile( - globalContextPath, - JSON.stringify( - { - sharedConfig: { - optInNextEditFeature: true, - }, - selectedModelsByProfileId: { - local: { - chat: "TEST LLM", - edit: "TEST LLM", - apply: "TEST LLM", - embed: "Transformers.js (Built-In)", - autocomplete: "TEST LLM", - rerank: null, - summarize: null, - }, - }, - }, - null, - 2, - ), - ); - } + // // await fs.writeFile( + // // globalContextPath, + // // JSON.stringify(globalContextWithNextEditEnabled, null, 2), + // // "utf8", + // // ); + // // } else { + // // await fs.writeFile( + // // globalContextPath, + // // JSON.stringify( + // // { + // // sharedConfig: { + // // optInNextEditFeature: true, + // // }, + // // selectedModelsByProfileId: { + // // local: { + // // chat: "TEST LLM", + // // edit: "TEST LLM", + // // apply: "TEST LLM", + // // embed: "Transformers.js (Built-In)", + // // autocomplete: "TEST LLM", + // // rerank: null, + // // summarize: null, + // // }, + // // }, + // // }, + // // null, + // // 2, + // // ), + // // ); + // // } - await NextEditActions.reload(); - }).timeout(DEFAULT_TIMEOUT.XL); + // await NextEditActions.reload(); + // }).timeout(DEFAULT_TIMEOUT.XL); beforeEach(async function () { // this.timeout(DEFAULT_TIMEOUT.XL); @@ -79,31 +77,31 @@ describe("Next Edit", () => { await new EditorView().closeAllEditors(); }).timeout(DEFAULT_TIMEOUT.XL); - after(async function () { - // this.timeout(DEFAULT_TIMEOUT.XL); + // after(async function () { + // // this.timeout(DEFAULT_TIMEOUT.XL); - // Update config.json to delete optInNextEditFeature. - const globalContext = await fs.readFile( - TestUtils.getGlobalContextFilePath(), - "utf8", - ); - const sharedConfig = JSON.parse(globalContext).sharedConfig; + // // Update config.json to delete optInNextEditFeature. + // // const globalContext = await fs.readFile( + // // TestUtils.getGlobalContextFilePath(), + // // "utf8", + // // ); + // // const sharedConfig = JSON.parse(globalContext).sharedConfig; - const sharedConfigWithoutNextEdit = { ...sharedConfig }; - delete sharedConfigWithoutNextEdit.optInNextEditFeature; + // // const sharedConfigWithoutNextEdit = { ...sharedConfig }; + // // delete sharedConfigWithoutNextEdit.optInNextEditFeature; - const globalContextWithNextEditEnabled = { - ...JSON.parse(globalContext), - sharedConfig: sharedConfigWithoutNextEdit, - }; + // // const globalContextWithNextEditEnabled = { + // // ...JSON.parse(globalContext), + // // sharedConfig: sharedConfigWithoutNextEdit, + // // }; - await fs.writeFile( - TestUtils.getGlobalContextFilePath(), - JSON.stringify(globalContextWithNextEditEnabled, null, 2), - "utf8", - ); - await NextEditActions.reload(); - }).timeout(DEFAULT_TIMEOUT.XL); + // // await fs.writeFile( + // // TestUtils.getGlobalContextFilePath(), + // // JSON.stringify(globalContextWithNextEditEnabled, null, 2), + // // "utf8", + // // ); + // await NextEditActions.reload(); + // }).timeout(DEFAULT_TIMEOUT.XL); // it("Should enable Next Edit feature in settings", async () => { // expect(false).to.be.true; @@ -113,18 +111,18 @@ describe("Next Edit", () => { // expect(false).to.be.true; // }).timeout(DEFAULT_TIMEOUT.XL); - it("Should force a Next Edit", async () => { + it.only("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XL); }); From 7c3fa1a10b82e8e6e188fd7b000e7945ea813c60 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Jul 2025 15:30:27 -0700 Subject: [PATCH 03/46] feat: check for autocomplete and turn on/off next edit accordingly --- extensions/vscode/src/extension/VsCodeExtension.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index f0137bd0c..a6c66b310 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -42,6 +42,7 @@ import { VsCodeIde } from "../VsCodeIde"; import { ConfigYamlDocumentLinkProvider } from "./ConfigYamlDocumentLinkProvider"; import { VsCodeMessenger } from "./VsCodeMessenger"; +import { isModelCapableOfNextEdit } from "core/nextEdit/utils"; import setupNextEditWindowManager, { NextEditWindowManager, } from "../activation/NextEditWindowManager"; @@ -165,10 +166,13 @@ export class VsCodeExtension { this.configHandler.onConfigUpdate( async ({ config: newConfig, configLoadInterrupted }) => { - if (newConfig?.experimental?.optInNextEditFeature) { + const autocompleteModel = newConfig?.selectedModelByRole.autocomplete; + if ( + autocompleteModel && + isModelCapableOfNextEdit(autocompleteModel.model) + ) { // Set up next edit window manager only for Continue team members await setupNextEditWindowManager(context); - this.activateNextEdit(); await NextEditWindowManager.freeTabAndEsc(); } else { From 4081419839389205fd5c2b4586b2a6a2810d16e7 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Jul 2025 15:36:07 -0700 Subject: [PATCH 04/46] feat: add a utility function to check if model is capable of next edit --- core/nextEdit/utils.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 core/nextEdit/utils.ts diff --git a/core/nextEdit/utils.ts b/core/nextEdit/utils.ts new file mode 100644 index 000000000..3e7ad0111 --- /dev/null +++ b/core/nextEdit/utils.ts @@ -0,0 +1,9 @@ +type NextEditModelName = "mercury-coder-nextedit" | "this field is not used"; + +export function isModelCapableOfNextEdit(modelName: string): boolean { + const supportedModels: NextEditModelName[] = [ + "mercury-coder-nextedit", + "this field is not used", + ]; + return supportedModels.some((supported) => modelName.includes(supported)); +} From 6ae38bfba454ea2a4d086b4420f4a24fe38a64e6 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Jul 2025 15:43:54 -0700 Subject: [PATCH 05/46] fix: MD doesn't work on CI, use XL again --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 261561ea5..f121d23d0 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -52,7 +52,7 @@ export class NextEditActions { console.log("Executed 'Force Next Edit' command"); console.log("Waiting for SVG decoration to appear..."); - await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.MD); // Add a reasonable wait + await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); console.log("Wait completed, looking for decoration..."); const svgDecoration = await TestUtils.waitForSuccess( From 127a5dc3757ee2af09d1e94a7fb7a6ade96cecc0 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Jul 2025 15:45:13 -0700 Subject: [PATCH 06/46] fix: remove it.only --- extensions/vscode/e2e/tests/NextEdit.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index e67a388fc..47950c0f6 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -111,7 +111,7 @@ describe("Next Edit", () => { // expect(false).to.be.true; // }).timeout(DEFAULT_TIMEOUT.XL); - it.only("Should force a Next Edit", async () => { + it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; }).timeout(DEFAULT_TIMEOUT.XL); From c5a22b3e4ad06be973184b7a7563df66000f89c4 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 22 Jul 2025 17:07:58 -0700 Subject: [PATCH 07/46] fix: test --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 2 +- extensions/vscode/e2e/tests/NextEdit.test.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index f121d23d0..2851cd2c9 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -18,7 +18,7 @@ export class NextEditActions { ); // Check if HELLO is written into the editor. - const editorText = await editor.getTextAtLine(1); + const editorText = await editor.getTextAtLine(2); return editorText === "HELLO"; } diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 47950c0f6..7a834783f 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -64,14 +64,14 @@ describe("Next Edit", () => { // }).timeout(DEFAULT_TIMEOUT.XL); beforeEach(async function () { - // this.timeout(DEFAULT_TIMEOUT.XL); + this.timeout(DEFAULT_TIMEOUT.XL); await GlobalActions.openTestWorkspace(); ({ editor } = await GlobalActions.createAndOpenNewTextFile()); }).timeout(DEFAULT_TIMEOUT.XL); afterEach(async function () { - // this.timeout(DEFAULT_TIMEOUT.XL); + this.timeout(DEFAULT_TIMEOUT.XL); await editor.clearText(); await new EditorView().closeAllEditors(); @@ -114,15 +114,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); }); From 8e8b42f301f94ec971d2de0ced8f67fa01ef75d6 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 09:38:00 -0700 Subject: [PATCH 08/46] feat: add a test only env variable --- core/nextEdit/utils.ts | 16 +++- .../vscode/e2e/tests/Autocomplete.test.ts | 4 + extensions/vscode/e2e/tests/NextEdit.test.ts | 93 ++----------------- 3 files changed, 21 insertions(+), 92 deletions(-) diff --git a/core/nextEdit/utils.ts b/core/nextEdit/utils.ts index 3e7ad0111..152e55933 100644 --- a/core/nextEdit/utils.ts +++ b/core/nextEdit/utils.ts @@ -1,9 +1,15 @@ -type NextEditModelName = "mercury-coder-nextedit" | "this field is not used"; +type NextEditModelName = "mercury-coder-nextedit"; export function isModelCapableOfNextEdit(modelName: string): boolean { - const supportedModels: NextEditModelName[] = [ - "mercury-coder-nextedit", - "this field is not used", - ]; + // In test mode, we can control whether next edit is enabled via environment variable. + if (process.env.NEXT_EDIT_TEST_ENABLED === "false") { + return false; + } + + if (process.env.NEXT_EDIT_TEST_ENABLED === "true") { + return true; + } + + const supportedModels: NextEditModelName[] = ["mercury-coder-nextedit"]; return supportedModels.some((supported) => modelName.includes(supported)); } diff --git a/extensions/vscode/e2e/tests/Autocomplete.test.ts b/extensions/vscode/e2e/tests/Autocomplete.test.ts index 7685d52ae..6f213d0cb 100644 --- a/extensions/vscode/e2e/tests/Autocomplete.test.ts +++ b/extensions/vscode/e2e/tests/Autocomplete.test.ts @@ -8,6 +8,10 @@ import { DEFAULT_TIMEOUT } from "../constants"; describe("Autocomplete", () => { let editor: TextEditor; + before(async function () { + process.env.NEXT_EDIT_TEST_ENABLED = "false"; + }) + beforeEach(async function () { this.timeout(DEFAULT_TIMEOUT.XL); diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 7a834783f..6a44e0a70 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -8,60 +8,9 @@ import { DEFAULT_TIMEOUT } from "../constants"; describe("Next Edit", () => { let editor: TextEditor; - // before(async function () { - // // this.timeout(DEFAULT_TIMEOUT.XL); - - // // const globalContextPath = TestUtils.getGlobalContextFilePath(); - - // // // Update config.json to add optInNextEditFeature. - // // // globalContext.json does not exist in CI before this test runs. - // // if (await TestUtils.fileExists(globalContextPath)) { - // // const globalContext = await fs.readFile(globalContextPath, "utf8"); - // // const sharedConfig = JSON.parse(globalContext).sharedConfig; - - // // const sharedConfigWithNextEditEnabled = { - // // ...sharedConfig, - // // optInNextEditFeature: true, - // // }; - - // // const globalContextWithNextEditEnabled = { - // // ...JSON.parse(globalContext), - // // sharedConfig: sharedConfigWithNextEditEnabled, - // // }; - - // // await fs.writeFile( - // // globalContextPath, - // // JSON.stringify(globalContextWithNextEditEnabled, null, 2), - // // "utf8", - // // ); - // // } else { - // // await fs.writeFile( - // // globalContextPath, - // // JSON.stringify( - // // { - // // sharedConfig: { - // // optInNextEditFeature: true, - // // }, - // // selectedModelsByProfileId: { - // // local: { - // // chat: "TEST LLM", - // // edit: "TEST LLM", - // // apply: "TEST LLM", - // // embed: "Transformers.js (Built-In)", - // // autocomplete: "TEST LLM", - // // rerank: null, - // // summarize: null, - // // }, - // // }, - // // }, - // // null, - // // 2, - // // ), - // // ); - // // } - - // await NextEditActions.reload(); - // }).timeout(DEFAULT_TIMEOUT.XL); + before(async function () { + process.env.NEXT_EDIT_TEST_ENABLED = "true"; + }) beforeEach(async function () { this.timeout(DEFAULT_TIMEOUT.XL); @@ -77,39 +26,9 @@ describe("Next Edit", () => { await new EditorView().closeAllEditors(); }).timeout(DEFAULT_TIMEOUT.XL); - // after(async function () { - // // this.timeout(DEFAULT_TIMEOUT.XL); - - // // Update config.json to delete optInNextEditFeature. - // // const globalContext = await fs.readFile( - // // TestUtils.getGlobalContextFilePath(), - // // "utf8", - // // ); - // // const sharedConfig = JSON.parse(globalContext).sharedConfig; - - // // const sharedConfigWithoutNextEdit = { ...sharedConfig }; - // // delete sharedConfigWithoutNextEdit.optInNextEditFeature; - - // // const globalContextWithNextEditEnabled = { - // // ...JSON.parse(globalContext), - // // sharedConfig: sharedConfigWithoutNextEdit, - // // }; - - // // await fs.writeFile( - // // TestUtils.getGlobalContextFilePath(), - // // JSON.stringify(globalContextWithNextEditEnabled, null, 2), - // // "utf8", - // // ); - // await NextEditActions.reload(); - // }).timeout(DEFAULT_TIMEOUT.XL); - - // it("Should enable Next Edit feature in settings", async () => { - // expect(false).to.be.true; - // }).timeout(DEFAULT_TIMEOUT.XL); - - // it("Should check that autocomplete is disabled when next edit is enabled", async () => { - // expect(false).to.be.true; - // }).timeout(DEFAULT_TIMEOUT.XL); + after(async function () { + process.env.NEXT_EDIT_TEST_ENABLED = "false"; + }) it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); From 950ead2f9f9239ba361f5fd099d51a2618610e54 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 09:38:34 -0700 Subject: [PATCH 09/46] chore: bump version --- extensions/vscode/package-lock.json | 7 ++++--- gui/package-lock.json | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 8780ab1e2..a6a86e3b4 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.63", + "version": "1.1.66", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.63", + "version": "1.1.66", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -129,6 +129,7 @@ "handlebars": "^4.7.8", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", + "iconv-lite": "^0.6.3", "ignore": "^5.3.1", "is-localhost-ip": "^2.0.0", "jinja-js": "0.1.8", @@ -142,7 +143,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "onnxruntime-node": "1.14.0", - "openai": "^4.76.0", + "openai": "^4.104.0", "p-limit": "^6.1.0", "partial-json": "^0.1.7", "pg": "^8.11.3", diff --git a/gui/package-lock.json b/gui/package-lock.json index d611543e2..c9ad23ed0 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -140,6 +140,7 @@ "handlebars": "^4.7.8", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", + "iconv-lite": "^0.6.3", "ignore": "^5.3.1", "is-localhost-ip": "^2.0.0", "jinja-js": "0.1.8", @@ -153,7 +154,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "onnxruntime-node": "1.14.0", - "openai": "^4.76.0", + "openai": "^4.104.0", "p-limit": "^6.1.0", "partial-json": "^0.1.7", "pg": "^8.11.3", From c638a958549616e580c4bb3d32e2e0979c693a47 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 10:07:37 -0700 Subject: [PATCH 10/46] feat: fix flake --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 4 ++-- .../vscode/e2e/selectors/NextEdit.selectors.ts | 9 +++++++-- extensions/vscode/e2e/tests/NextEdit.test.ts | 14 +++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 2851cd2c9..1321a8c57 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -52,12 +52,12 @@ export class NextEditActions { console.log("Executed 'Force Next Edit' command"); console.log("Waiting for SVG decoration to appear..."); - await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); + // await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); console.log("Wait completed, looking for decoration..."); const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XL, + DEFAULT_TIMEOUT.XXL, ); console.log("SVG decoration search result:", svgDecoration !== null); diff --git a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts index 0ee766fef..04010d1b4 100644 --- a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts +++ b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts @@ -11,10 +11,15 @@ export class NextEditSelectors { By.css("[class*='TextEditorDecorationType']"), // By.css("div[class*='TextEditorDecorationType'][style*='filter']") ); - return decorations ?? null; + + if (!decorations) { + throw new Error("SVG decoraton not found"); + } + + return decorations; } catch (error) { console.error("Error finding SVG decoration:", error); - return null; + throw error; } } } diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 6a44e0a70..e33767fd9 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -10,38 +10,38 @@ describe("Next Edit", () => { before(async function () { process.env.NEXT_EDIT_TEST_ENABLED = "true"; - }) + }); beforeEach(async function () { this.timeout(DEFAULT_TIMEOUT.XL); await GlobalActions.openTestWorkspace(); ({ editor } = await GlobalActions.createAndOpenNewTextFile()); - }).timeout(DEFAULT_TIMEOUT.XL); + }); afterEach(async function () { this.timeout(DEFAULT_TIMEOUT.XL); await editor.clearText(); await new EditorView().closeAllEditors(); - }).timeout(DEFAULT_TIMEOUT.XL); + }); after(async function () { process.env.NEXT_EDIT_TEST_ENABLED = "false"; - }) + }); it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XL); }); From 3d23869c98ccc791081f7663a7cded0271a6e49d Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 10:19:17 -0700 Subject: [PATCH 11/46] fix: rollback timeout --- extensions/vscode/e2e/selectors/NextEdit.selectors.ts | 1 - extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts index 04010d1b4..13435e058 100644 --- a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts +++ b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts @@ -18,7 +18,6 @@ export class NextEditSelectors { return decorations; } catch (error) { - console.error("Error finding SVG decoration:", error); throw error; } } diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index e33767fd9..76670789c 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); }); From afbcb58b6a889c0d4f665cc386f73ac6834a0b8e Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 10:37:31 -0700 Subject: [PATCH 12/46] fix: add more time --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 2 +- extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 1321a8c57..c42656a96 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -57,7 +57,7 @@ export class NextEditActions { const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XXL, + DEFAULT_TIMEOUT.XXLP, ); console.log("SVG decoration search result:", svgDecoration !== null); diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 76670789c..afffc2024 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XXLP); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XXLP); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XXLP); }); From e5e6e9ebf937f706a90aa7bd8f37ddd46a1102d3 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 10:40:39 -0700 Subject: [PATCH 13/46] feat: add XXLP --- extensions/vscode/e2e/constants.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode/e2e/constants.ts b/extensions/vscode/e2e/constants.ts index d2fb8f422..39863ca81 100644 --- a/extensions/vscode/e2e/constants.ts +++ b/extensions/vscode/e2e/constants.ts @@ -6,4 +6,5 @@ export const DEFAULT_TIMEOUT = { MD: BASELINE, XL: BASELINE * 5, XXL: BASELINE * 7, + XXLP: BASELINE * 8, }; From 8223010f298302327e6f4b0d5f59eff15c58a9c7 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 10:49:35 -0700 Subject: [PATCH 14/46] feat: wait for SVG --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index c42656a96..8c0b76109 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -52,7 +52,7 @@ export class NextEditActions { console.log("Executed 'Force Next Edit' command"); console.log("Waiting for SVG decoration to appear..."); - // await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); + await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); console.log("Wait completed, looking for decoration..."); const svgDecoration = await TestUtils.waitForSuccess( From 569dc58202fdbb5d5eb39fe33c30af2262c9d38c Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 10:59:51 -0700 Subject: [PATCH 15/46] feat: wait longer for decoration to appear --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 8c0b76109..0b169a1c7 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -52,12 +52,12 @@ export class NextEditActions { console.log("Executed 'Force Next Edit' command"); console.log("Waiting for SVG decoration to appear..."); - await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XL); + await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XXL); console.log("Wait completed, looking for decoration..."); const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XXLP, + DEFAULT_TIMEOUT.XXL, ); console.log("SVG decoration search result:", svgDecoration !== null); From 3b170263e64d8dde8958fc5ec83c2d3594fb1c35 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 11:17:51 -0700 Subject: [PATCH 16/46] fix: calculate svgDecoration before --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 0b169a1c7..c6a469b61 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -51,17 +51,19 @@ export class NextEditActions { await new Workbench().executeCommand("Continue: Force Next Edit"); console.log("Executed 'Force Next Edit' command"); - console.log("Waiting for SVG decoration to appear..."); - await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XXL); - console.log("Wait completed, looking for decoration..."); + // console.log("Waiting for SVG decoration to appear..."); + // await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XXL); + // console.log("Wait completed, looking for decoration..."); + console.log("Looking for decoration...") const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), DEFAULT_TIMEOUT.XXL, ); - console.log("SVG decoration search result:", svgDecoration !== null); - return svgDecoration !== null; + const result = svgDecoration !== null; + console.log("SVG decoration search result:", result); + return result; } public static async reload(): Promise { From da2bfa1a0f9c9e59b0c4c70b272a5e0ea56162de Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 11:49:43 -0700 Subject: [PATCH 17/46] feat: use a selector uitl --- .../vscode/e2e/actions/NextEdit.actions.ts | 2 +- .../e2e/selectors/NextEdit.selectors.ts | 62 ++++++++++++++----- .../vscode/e2e/selectors/SelectorUtils.ts | 13 +++- extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +- 4 files changed, 64 insertions(+), 19 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index c6a469b61..7fafe53df 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -58,7 +58,7 @@ export class NextEditActions { const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XXL, + DEFAULT_TIMEOUT.XL, ); const result = svgDecoration !== null; diff --git a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts index 13435e058..75585b2e7 100644 --- a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts +++ b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts @@ -1,24 +1,58 @@ -import { By, WebDriver } from "vscode-extension-tester"; +import { WebDriver } from "vscode-extension-tester"; + +import { SelectorUtils } from "./SelectorUtils"; export class NextEditSelectors { /** * Get the SVG decoration element if present (for next edit). */ public static async getSvgDecoration(driver: WebDriver) { - try { - const decorations = await driver.findElement( - // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") - By.css("[class*='TextEditorDecorationType']"), - // By.css("div[class*='TextEditorDecorationType'][style*='filter']") - ); + return SelectorUtils.getElementByClassName( + driver, + "TextEditorDecorationType", + ); + // try { + // const decorations = await driver.findElement( + // // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") + // By.css("[class*='TextEditorDecorationType']"), + // // By.css("div[class*='TextEditorDecorationType'][style*='filter']") + // ); - if (!decorations) { - throw new Error("SVG decoraton not found"); - } + // if (!decorations) { + // throw new Error("SVG decoraton not found"); + // } - return decorations; - } catch (error) { - throw error; - } + // return decorations; + // } catch (error) { + // throw error; + // } } + + // public static async getSvgDecoration(driver: WebDriver) { + // console.log("Attempting to find SVG decoration"); + // try { + // // First check if any decoration elements exist at all + // try { + // const allDecorations = await driver.findElements(By.css("[class*='TextEditorDecorationType']")); + // console.log(`Found ${allDecorations.length} elements with TextEditorDecorationType class`); + // } catch (e) { + // console.log("No decoration elements found:", e.message); + // } + + // const decorations = await driver.findElement( + // By.css("[class*='TextEditorDecorationType']"), + // ); + + // if (!decorations) { + // console.log("SVG decoration not found (null returned)"); + // throw new Error("SVG decoration not found (null returned)"); + // } + + // console.log("SVG decoration found"); + // return decorations; + // } catch (error) { + // console.log(`Error finding SVG decoration: ${error.message}`); + // throw error; + // } + // } } diff --git a/extensions/vscode/e2e/selectors/SelectorUtils.ts b/extensions/vscode/e2e/selectors/SelectorUtils.ts index 7a7067b05..ee8dfcd5e 100644 --- a/extensions/vscode/e2e/selectors/SelectorUtils.ts +++ b/extensions/vscode/e2e/selectors/SelectorUtils.ts @@ -1,4 +1,4 @@ -import { By, WebElement, WebView } from "vscode-extension-tester"; +import { By, WebDriver, WebElement, WebView } from "vscode-extension-tester"; export class SelectorUtils { /** @@ -26,4 +26,15 @@ export class SelectorUtils { ): Promise { return view.findWebElement(By.css(`[aria-label='${ariaLabel}']`)); } + + public static getElementByClassName( + driver: WebDriver, + className: string + ): Promise { + return driver.findElement( + // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") + By.css(`[class*='${className}']`), + // By.css("div[class*='TextEditorDecorationType'][style*='filter']") + ); + } } diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index afffc2024..e33767fd9 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXLP); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXLP); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXLP); + }).timeout(DEFAULT_TIMEOUT.XL); }); From 6c046263eac2484284854bf4837d6877a571ae62 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 12:02:05 -0700 Subject: [PATCH 18/46] fix: try using xpath --- extensions/vscode/e2e/selectors/SelectorUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/selectors/SelectorUtils.ts b/extensions/vscode/e2e/selectors/SelectorUtils.ts index ee8dfcd5e..3521626f7 100644 --- a/extensions/vscode/e2e/selectors/SelectorUtils.ts +++ b/extensions/vscode/e2e/selectors/SelectorUtils.ts @@ -33,7 +33,8 @@ export class SelectorUtils { ): Promise { return driver.findElement( // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") - By.css(`[class*='${className}']`), + // By.css(`[class*='${className}']`), + By.xpath("//span[contains(@class, '${className}')]"), // By.css("div[class*='TextEditorDecorationType'][style*='filter']") ); } From c4d50e794361f59256d892adc3dba9ece22cc357 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 12:07:39 -0700 Subject: [PATCH 19/46] fix: use template literal --- extensions/vscode/e2e/selectors/SelectorUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/e2e/selectors/SelectorUtils.ts b/extensions/vscode/e2e/selectors/SelectorUtils.ts index 3521626f7..9edf63247 100644 --- a/extensions/vscode/e2e/selectors/SelectorUtils.ts +++ b/extensions/vscode/e2e/selectors/SelectorUtils.ts @@ -34,7 +34,7 @@ export class SelectorUtils { return driver.findElement( // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") // By.css(`[class*='${className}']`), - By.xpath("//span[contains(@class, '${className}')]"), + By.xpath(`//span[contains(@class, '${className}')]`), // By.css("div[class*='TextEditorDecorationType'][style*='filter']") ); } From 945cd4a8542ec35130c26d0a0056f3daee84ea3b Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 12:19:18 -0700 Subject: [PATCH 20/46] fix: add more time --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 2 +- extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 7fafe53df..c6a469b61 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -58,7 +58,7 @@ export class NextEditActions { const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XL, + DEFAULT_TIMEOUT.XXL, ); const result = svgDecoration !== null; diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index e33767fd9..76670789c 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XL); + }).timeout(DEFAULT_TIMEOUT.XXL); }); From c7fcbff7b00594c4cc0bcc887e592f0c99b05c9a Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 13:35:49 -0700 Subject: [PATCH 21/46] test: would doubling the time work? --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 2 +- extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index c6a469b61..75134c558 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -58,7 +58,7 @@ export class NextEditActions { const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XXL, + DEFAULT_TIMEOUT.XXL * 2, ); const result = svgDecoration !== null; diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 76670789c..0d7ffe44a 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XXL * 2 + 60000); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XXL * 2 + 60000); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL); + }).timeout(DEFAULT_TIMEOUT.XXL * 2 + 60000); }); From bf916bc44ce9fa6db5fe1ebfa687a2389524544b Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 13:50:19 -0700 Subject: [PATCH 22/46] fix: try long polling --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 3 ++- extensions/vscode/e2e/selectors/SelectorUtils.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index 75134c558..f3cc6f81d 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -52,13 +52,14 @@ export class NextEditActions { console.log("Executed 'Force Next Edit' command"); // console.log("Waiting for SVG decoration to appear..."); - // await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.XXL); + await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.MD); // console.log("Wait completed, looking for decoration..."); console.log("Looking for decoration...") const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), DEFAULT_TIMEOUT.XXL * 2, + 5000 ); const result = svgDecoration !== null; diff --git a/extensions/vscode/e2e/selectors/SelectorUtils.ts b/extensions/vscode/e2e/selectors/SelectorUtils.ts index 9edf63247..42b0b901a 100644 --- a/extensions/vscode/e2e/selectors/SelectorUtils.ts +++ b/extensions/vscode/e2e/selectors/SelectorUtils.ts @@ -33,7 +33,7 @@ export class SelectorUtils { ): Promise { return driver.findElement( // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") - // By.css(`[class*='${className}']`), + // By.css(`*[class*='${className}']`), By.xpath(`//span[contains(@class, '${className}')]`), // By.css("div[class*='TextEditorDecorationType'][style*='filter']") ); From 1238a66b2daa324ec6f36689dbbcf630acf4309d Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 23 Jul 2025 14:49:00 -0700 Subject: [PATCH 23/46] stash: works locally --- extensions/vscode/e2e/actions/NextEdit.actions.ts | 3 +-- extensions/vscode/e2e/selectors/NextEdit.selectors.ts | 1 + extensions/vscode/e2e/selectors/SelectorUtils.ts | 4 ++-- extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index f3cc6f81d..df642face 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -58,8 +58,7 @@ export class NextEditActions { const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XXL * 2, - 5000 + DEFAULT_TIMEOUT.XXL, ); const result = svgDecoration !== null; diff --git a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts index 75585b2e7..26ce7082c 100644 --- a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts +++ b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts @@ -7,6 +7,7 @@ export class NextEditSelectors { * Get the SVG decoration element if present (for next edit). */ public static async getSvgDecoration(driver: WebDriver) { + console.log("===") return SelectorUtils.getElementByClassName( driver, "TextEditorDecorationType", diff --git a/extensions/vscode/e2e/selectors/SelectorUtils.ts b/extensions/vscode/e2e/selectors/SelectorUtils.ts index 42b0b901a..eef58e04e 100644 --- a/extensions/vscode/e2e/selectors/SelectorUtils.ts +++ b/extensions/vscode/e2e/selectors/SelectorUtils.ts @@ -33,8 +33,8 @@ export class SelectorUtils { ): Promise { return driver.findElement( // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") - // By.css(`*[class*='${className}']`), - By.xpath(`//span[contains(@class, '${className}')]`), + By.css(`*[class*='${className}']`), + // By.xpath(`//span[contains(@class, '${className}')]`), // By.css("div[class*='TextEditorDecorationType'][style*='filter']") ); } diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index 0d7ffe44a..f778aeb03 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL * 2 + 60000); + }).timeout(DEFAULT_TIMEOUT.XXL + 60000); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL * 2 + 60000); + }).timeout(DEFAULT_TIMEOUT.XXL + 60000); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL * 2 + 60000); + }).timeout(DEFAULT_TIMEOUT.XXL + 60000); }); From 1f84b2994aa3fe22c034c28b3d47f3342d8f7506 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 25 Jul 2025 16:01:54 -0700 Subject: [PATCH 24/46] fix: reduce time --- .../vscode/e2e/actions/NextEdit.actions.ts | 6 +-- .../e2e/selectors/NextEdit.selectors.ts | 45 ++++++++++++++++--- extensions/vscode/e2e/tests/NextEdit.test.ts | 6 +-- 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/extensions/vscode/e2e/actions/NextEdit.actions.ts b/extensions/vscode/e2e/actions/NextEdit.actions.ts index df642face..626626843 100644 --- a/extensions/vscode/e2e/actions/NextEdit.actions.ts +++ b/extensions/vscode/e2e/actions/NextEdit.actions.ts @@ -52,13 +52,13 @@ export class NextEditActions { console.log("Executed 'Force Next Edit' command"); // console.log("Waiting for SVG decoration to appear..."); - await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.MD); + // await TestUtils.waitForTimeout(DEFAULT_TIMEOUT.MD); // console.log("Wait completed, looking for decoration..."); - console.log("Looking for decoration...") + console.log("Looking for decoration..."); const svgDecoration = await TestUtils.waitForSuccess( () => NextEditSelectors.getSvgDecoration(VSBrowser.instance.driver), - DEFAULT_TIMEOUT.XXL, + DEFAULT_TIMEOUT.XL, ); const result = svgDecoration !== null; diff --git a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts index 26ce7082c..de5ff6e65 100644 --- a/extensions/vscode/e2e/selectors/NextEdit.selectors.ts +++ b/extensions/vscode/e2e/selectors/NextEdit.selectors.ts @@ -1,6 +1,5 @@ -import { WebDriver } from "vscode-extension-tester"; +import { By, WebDriver } from "vscode-extension-tester"; -import { SelectorUtils } from "./SelectorUtils"; export class NextEditSelectors { /** @@ -8,10 +7,44 @@ export class NextEditSelectors { */ public static async getSvgDecoration(driver: WebDriver) { console.log("===") - return SelectorUtils.getElementByClassName( - driver, - "TextEditorDecorationType", - ); + // return SelectorUtils.getElementByClassName( + // driver, + // "TextEditorDecorationType", + // ); + return Promise.any( + [ + await driver.findElement( + By.css("[class*='TextEditorDecorationType']") + ), + await driver.findElement( + By.css("[class*=TextEditorDecorationType]") + ), + await driver.findElement( + By.css("*[class*='TextEditorDecorationType']") + ), + await driver.findElement( + By.css("*[class*=TextEditorDecorationType]") + ), + await driver.findElement( + By.css("span[class*='TextEditorDecorationType']") + ), + await driver.findElement( + By.css("span[class*=TextEditorDecorationType]") + ), + await driver.findElement( + By.xpath(`//span[contains(@class, 'TextEditorDecorationType')]`) + ), + await driver.findElement( + By.xpath(`//span[contains(@class, TextEditorDecorationType)]`) + ), + await driver.findElement( + By.xpath(`//*[contains(@class, 'TextEditorDecorationType')]`) + ), + await driver.findElement( + By.xpath(`//*[contains(@class, TextEditorDecorationType)]`) + ), + ] + ) // try { // const decorations = await driver.findElement( // // By.xpath("//*[contains(@class, 'ced-') and matches(@class, 'ced-2-TextEditorDecorationType[0-9]+-4')]") diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.ts index f778aeb03..e33767fd9 100644 --- a/extensions/vscode/e2e/tests/NextEdit.test.ts +++ b/extensions/vscode/e2e/tests/NextEdit.test.ts @@ -33,15 +33,15 @@ describe("Next Edit", () => { it("Should force a Next Edit", async () => { const hasDecoration = await NextEditActions.forceNextEdit(editor); expect(hasDecoration).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL + 60000); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should accept Next Edit suggestion with Tab", async () => { const accepted = await NextEditActions.acceptNextEditSuggestion(editor); expect(accepted).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL + 60000); + }).timeout(DEFAULT_TIMEOUT.XL); it("Should reject Next Edit suggestion with Esc", async () => { const rejected = await NextEditActions.rejectNextEditSuggestion(editor); expect(rejected).to.be.true; - }).timeout(DEFAULT_TIMEOUT.XXL + 60000); + }).timeout(DEFAULT_TIMEOUT.XL); }); From 7544cef8b967b3381b488b3353c0adfdd23461c0 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 28 Jul 2025 14:23:08 +0530 Subject: [PATCH 25/46] show yellow border for staging env --- core/core.ts | 4 ++++ core/protocol/core.ts | 6 +++++- core/protocol/passThrough.ts | 3 ++- gui/src/components/Layout.tsx | 23 ++++++++++++++++++----- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/core/core.ts b/core/core.ts index d8275b8ff..69be1f484 100644 --- a/core/core.ts +++ b/core/core.ts @@ -407,6 +407,10 @@ export class Core { await this.messenger.request("openUrl", url); }); + on("controlPlane/getEnvironmentType", async (msg) => { + return await getControlPlaneEnv(this.ide.getIdeSettings()); + }); + on("controlPlane/getFreeTrialStatus", async (msg) => { return this.configHandler.controlPlaneClient.getFreeTrialStatus(); }); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 743556d15..abb6d40d2 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -43,7 +43,10 @@ import { AutocompleteCodeSnippet } from "../autocomplete/snippets/types"; import { GetLspDefinitionsFunction } from "../autocomplete/types"; import { ConfigHandler } from "../config/ConfigHandler"; import { SerializedOrgWithProfiles } from "../config/ProfileLifecycleManager"; -import { ControlPlaneSessionInfo } from "../control-plane/AuthTypes"; +import { + ControlPlaneEnv, + ControlPlaneSessionInfo, +} from "../control-plane/AuthTypes"; import { FreeTrialStatus } from "../control-plane/client"; export enum OnboardingModes { @@ -248,6 +251,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { ]; "clipboardCache/add": [{ content: string }, void]; "controlPlane/openUrl": [{ path: string; orgSlug?: string }, void]; + "controlPlane/getEnvironmentType": [undefined, ControlPlaneEnv]; "controlPlane/getFreeTrialStatus": [undefined, FreeTrialStatus | null]; "controlPlane/getModelsAddOnUpgradeUrl": [ { vsCodeUriScheme?: string }, diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 6e25e5f54..69df93852 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -68,10 +68,11 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "tools/call", "controlPlane/openUrl", "controlPlane/getModelsAddOnUpgradeUrl", + "controlPlane/getEnvironmentType", + "controlPlane/getFreeTrialStatus", "isItemTooBig", "process/markAsBackgrounded", "process/isBackgrounded", - "controlPlane/getFreeTrialStatus", ]; // Message types to pass through from core to webview diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index d41da483f..0ace1cda2 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -1,5 +1,5 @@ import { OnboardingModes } from "core/protocol/core"; -import { useContext, useEffect } from "react"; +import { useContext, useEffect, useState } from "react"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; import styled from "styled-components"; import { CustomScrollbarDiv } from "."; @@ -28,8 +28,9 @@ import { import OSRContextMenu from "./OSRContextMenu"; import PostHogPageView from "./PosthogPageView"; -const LayoutTopDiv = styled(CustomScrollbarDiv)` +const LayoutTopDiv = styled(CustomScrollbarDiv)<{ showBorder: boolean }>` height: 100%; + border-top: ${(props) => (props.showBorder ? "1px solid yellow" : "none")}; position: relative; overflow-x: hidden; `; @@ -42,12 +43,12 @@ const GridDiv = styled.div` `; const Layout = () => { + const [showBorder, setShowBorder] = useState(false); const navigate = useNavigate(); const location = useLocation(); const dispatch = useAppDispatch(); const onboardingCard = useOnboardingCard(); const ideMessenger = useContext(IdeMessengerContext); - const currentSessionId = useAppSelector((state) => state.session.id); const { mainEditor } = useMainEditor(); const dialogMessage = useAppSelector((state) => state.ui.dialogMessage); @@ -55,6 +56,18 @@ const Layout = () => { const showDialog = useAppSelector((state) => state.ui.showDialog); const isInEdit = useAppSelector((store) => store.session.isInEdit); + useEffect(() => { + (async () => { + const response = await ideMessenger.request( + "controlPlane/getEnvironmentType", + undefined, + ); + console.log("debug2 response was", response); + response.status === "success" && + setShowBorder(response.content.AUTH_TYPE.includes("staging")); + })(); + }, []); + useWebviewListener( "newSession", async () => { @@ -235,7 +248,7 @@ const Layout = () => { return ( - +
{ message={dialogMessage} /> - + From c84631678df08be1b0030539beaa8f70b124e098 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 28 Jul 2025 14:23:58 +0530 Subject: [PATCH 26/46] rename protocol to getEnvironment --- core/core.ts | 2 +- core/protocol/core.ts | 2 +- core/protocol/passThrough.ts | 2 +- gui/src/components/Layout.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/core.ts b/core/core.ts index 69be1f484..8df4992d4 100644 --- a/core/core.ts +++ b/core/core.ts @@ -407,7 +407,7 @@ export class Core { await this.messenger.request("openUrl", url); }); - on("controlPlane/getEnvironmentType", async (msg) => { + on("controlPlane/getEnvironment", async (msg) => { return await getControlPlaneEnv(this.ide.getIdeSettings()); }); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index abb6d40d2..1a6e4dc20 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -251,7 +251,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { ]; "clipboardCache/add": [{ content: string }, void]; "controlPlane/openUrl": [{ path: string; orgSlug?: string }, void]; - "controlPlane/getEnvironmentType": [undefined, ControlPlaneEnv]; + "controlPlane/getEnvironment": [undefined, ControlPlaneEnv]; "controlPlane/getFreeTrialStatus": [undefined, FreeTrialStatus | null]; "controlPlane/getModelsAddOnUpgradeUrl": [ { vsCodeUriScheme?: string }, diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 69df93852..ba14d7594 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -68,7 +68,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "tools/call", "controlPlane/openUrl", "controlPlane/getModelsAddOnUpgradeUrl", - "controlPlane/getEnvironmentType", + "controlPlane/getEnvironment", "controlPlane/getFreeTrialStatus", "isItemTooBig", "process/markAsBackgrounded", diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 0ace1cda2..2ada98d9d 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -59,7 +59,7 @@ const Layout = () => { useEffect(() => { (async () => { const response = await ideMessenger.request( - "controlPlane/getEnvironmentType", + "controlPlane/getEnvironment", undefined, ); console.log("debug2 response was", response); From ae04dec8768c28245adde3f320021dc49c55e9f0 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 28 Jul 2025 13:39:49 -0700 Subject: [PATCH 27/46] chore: remove unused workflow --- .github/auto_assign.yml | 10 ---------- .github/workflows/auto-assign-pr.yaml | 10 ---------- 2 files changed, 20 deletions(-) delete mode 100644 .github/auto_assign.yml delete mode 100644 .github/workflows/auto-assign-pr.yaml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index ed05df6f9..000000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Reference: https://github.com/marketplace/actions/auto-assign-action -addAssignees: true - -assignees: - - sestinj - - Patrick-Erichsen - - tomasz-stefaniak - - RomneyDa - -numberOfAssignees: 2 diff --git a/.github/workflows/auto-assign-pr.yaml b/.github/workflows/auto-assign-pr.yaml deleted file mode 100644 index 4fd701a15..000000000 --- a/.github/workflows/auto-assign-pr.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: PR assignment -on: - pull_request: - types: [opened, ready_for_review] - -jobs: - add-reviews: - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/auto-assign-action@v2.0.0 From 02838e768d0dd224dffcf701fdabd82dc067f189 Mon Sep 17 00:00:00 2001 From: Ty Dunn Date: Mon, 28 Jul 2025 13:57:08 -0700 Subject: [PATCH 28/46] add qwen-3-coder --- docs/features/chat/model-setup.mdx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/features/chat/model-setup.mdx b/docs/features/chat/model-setup.mdx index c1ebd019a..b583093bb 100644 --- a/docs/features/chat/model-setup.mdx +++ b/docs/features/chat/model-setup.mdx @@ -18,6 +18,20 @@ Its strong tool calling and reasoning capabilities make it the best model for Ag These models have varying tool calling and reasoning capabilities. +[Kimi K2](https://hub.continue.dev/togetherai/kimi-k2-instruct) from Moonshot AI + +1. Get your API key from [Together AI](https://api.together.ai) +2. Add [Kimi K2](https://hub.continue.dev/togetherai/kimi-k2-instruct) to your assistant on Continue Hub +3. Add `TOGETHER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) +4. Click `Reload config` in the assistant selector in the Continue IDE extension + +[Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b-a35b-instruct-fp8) from Qwen + +1. Get your API key from [Together AI](https://api.together.ai) +2. Add [Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b-a35b-instruct-fp8) to your assistant on Continue Hub +3. Add `TOGETHER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) +4. Click `Reload config` in the assistant selector in the Continue IDE extension + [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) from Google 1. Get your API key from [Google AI Studio](https://aistudio.google.com) @@ -25,13 +39,6 @@ These models have varying tool calling and reasoning capabilities. 3. Add `GEMINI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) 4. Click `Reload config` in the assistant selector in the Continue IDE extension -[Kimi K2](hub.continue.dev/togetherai/kimi-k2-instruct) from Moonshot AI - -1. Get your API key from [Together AI](https://api.together.ai) -2. Add [Kimi K2](hub.continue.dev/togetherai/kimi-k2-instruct) to your assistant on Continue Hub -3. Add `TOGETHER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) -4. Click `Reload config` in the assistant selector in the Continue IDE extension - [o3](https://hub.continue.dev/openai/o3) from OpenAI 1. Get your API key from [OpenAI](https://platform.openai.com) From 2bba03d8e5fe8c62a21ebbf8cc8eda8adeca8a11 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Mon, 28 Jul 2025 15:09:49 -0700 Subject: [PATCH 29/46] fix: skip test --- .../vscode/e2e/tests/{NextEdit.test.ts => NextEdit.test.skip.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename extensions/vscode/e2e/tests/{NextEdit.test.ts => NextEdit.test.skip.ts} (100%) diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.test.skip.ts similarity index 100% rename from extensions/vscode/e2e/tests/NextEdit.test.ts rename to extensions/vscode/e2e/tests/NextEdit.test.skip.ts From cc168347faea3393739abd2393d1439dbd017384 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Mon, 28 Jul 2025 15:36:51 -0700 Subject: [PATCH 30/46] fix: prettier --- core/config/sharedConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/config/sharedConfig.ts b/core/config/sharedConfig.ts index 5e639a575..85a0c084a 100644 --- a/core/config/sharedConfig.ts +++ b/core/config/sharedConfig.ts @@ -181,7 +181,7 @@ export function modifyAnyConfigWithSharedConfig< configCopy.experimental.useCurrentFileAsContext = sharedConfig.useCurrentFileAsContext; } - + if (sharedConfig.onlyUseSystemMessageTools !== undefined) { configCopy.experimental.onlyUseSystemMessageTools = sharedConfig.onlyUseSystemMessageTools; From ec0d7deb5405fa8ac42300bf57273a8fe8a4c9d9 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 16:54:47 -0700 Subject: [PATCH 31/46] feat: use system message tools for default for openrouter, except with claude --- .../shouldAutoEnableSystemMessageTools.ts | 31 ++++++ ...ouldAutoEnableSystemMessageTools.vitest.ts | 85 ++++++++++++++ gui/src/components/ModeSelect/ModeSelect.tsx | 6 +- .../selectUseSystemMessageTools.test.ts | 105 ++++++++++++++++++ .../selectors/selectUseSystemMessageTools.ts | 37 ++++++ gui/src/redux/thunks/streamNormalInput.ts | 6 +- 6 files changed, 265 insertions(+), 5 deletions(-) create mode 100644 core/config/shouldAutoEnableSystemMessageTools.ts create mode 100644 core/config/shouldAutoEnableSystemMessageTools.vitest.ts create mode 100644 gui/src/redux/selectors/selectUseSystemMessageTools.test.ts create mode 100644 gui/src/redux/selectors/selectUseSystemMessageTools.ts diff --git a/core/config/shouldAutoEnableSystemMessageTools.ts b/core/config/shouldAutoEnableSystemMessageTools.ts new file mode 100644 index 000000000..bdebaab1c --- /dev/null +++ b/core/config/shouldAutoEnableSystemMessageTools.ts @@ -0,0 +1,31 @@ +import { ModelDescription } from "../index.d"; + +/** + * Determines if system message tools should be auto-enabled for the given model. + * This is used to automatically enable system message tools for certain provider/model combinations + * where we have a strong preference, taking priority over user manual settings. + * + * System message tools are an alternative to native tool calling where tool definitions and calls + * are embedded in the system message as text rather than using the provider's native tool calling API. + * This can be beneficial for providers/models that don't support native tool calling or have + * poor tool calling performance. + * + * Current auto-enable rules: + * - OpenRouter provider: true for all models except those containing "claude" (since Claude models + * generally have good native tool calling support) + * - All other providers: undefined (no auto-preference, use manual setting) + * + * @param model The model description to check + * @returns true to force enable, false to force disable, undefined for no auto-preference + */ +export function shouldAutoEnableSystemMessageTools( + model: ModelDescription, +): boolean | undefined { + // Auto-enable for OpenRouter, but exclude Claude models which have good native tool calling + if (model.provider === "openrouter") { + return !model.model.toLowerCase().includes("claude"); + } + + // No auto-preference for all other providers - use manual setting + return undefined; +} diff --git a/core/config/shouldAutoEnableSystemMessageTools.vitest.ts b/core/config/shouldAutoEnableSystemMessageTools.vitest.ts new file mode 100644 index 000000000..9e0e9c59c --- /dev/null +++ b/core/config/shouldAutoEnableSystemMessageTools.vitest.ts @@ -0,0 +1,85 @@ +import { describe, expect, test } from "vitest"; +import { ModelDescription } from "../index.d"; +import { shouldAutoEnableSystemMessageTools } from "./shouldAutoEnableSystemMessageTools"; + +describe("shouldAutoEnableSystemMessageTools", () => { + const createModel = (provider: string, model: string): ModelDescription => ({ + title: "Test Model", + provider, + underlyingProviderName: provider, + model, + }); + + test("should return true for OpenRouter models that don't contain 'claude'", () => { + expect( + shouldAutoEnableSystemMessageTools(createModel("openrouter", "gpt-4o")), + ).toBe(true); + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "llama-3.3-70b-instruct"), + ), + ).toBe(true); + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "qwen/qwen-2.5-72b-instruct"), + ), + ).toBe(true); + }); + + test("should return false for OpenRouter Claude models", () => { + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "anthropic/claude-3-sonnet"), + ), + ).toBe(false); + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "anthropic/claude-3.5-sonnet"), + ), + ).toBe(false); + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "claude-3-haiku"), + ), + ).toBe(false); + }); + + test("should return undefined for all other providers", () => { + expect( + shouldAutoEnableSystemMessageTools(createModel("openai", "gpt-4o")), + ).toBe(undefined); + expect( + shouldAutoEnableSystemMessageTools( + createModel("anthropic", "claude-3.5-sonnet"), + ), + ).toBe(undefined); + expect( + shouldAutoEnableSystemMessageTools( + createModel("groq", "llama-3.3-70b-versatile"), + ), + ).toBe(undefined); + expect( + shouldAutoEnableSystemMessageTools( + createModel("together", "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo"), + ), + ).toBe(undefined); + }); + + test("should be case insensitive for 'claude' detection", () => { + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "CLAUDE-models"), + ), + ).toBe(false); + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "Claude-3.5"), + ), + ).toBe(false); + expect( + shouldAutoEnableSystemMessageTools( + createModel("openrouter", "some-model-Claude"), + ), + ).toBe(false); + }); +}); diff --git a/gui/src/components/ModeSelect/ModeSelect.tsx b/gui/src/components/ModeSelect/ModeSelect.tsx index 002e5dce2..07de26fe7 100644 --- a/gui/src/components/ModeSelect/ModeSelect.tsx +++ b/gui/src/components/ModeSelect/ModeSelect.tsx @@ -12,6 +12,7 @@ import { import { capitalize } from "lodash"; import { useCallback, useEffect, useMemo } from "react"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; +import { selectUseSystemMessageTools } from "../../redux/selectors/selectUseSystemMessageTools"; import { selectSelectedChatModel } from "../../redux/slices/configSlice"; import { setMode } from "../../redux/slices/sessionSlice"; import { getFontSize, getMetaKeyLabel } from "../../util"; @@ -24,9 +25,8 @@ export function ModeSelect() { const dispatch = useAppDispatch(); const mode = useAppSelector((store) => store.session.mode); const selectedModel = useAppSelector(selectSelectedChatModel); - const useSystemTools = useAppSelector( - (state) => state.config.config.experimental?.onlyUseSystemMessageTools, - ); + const useSystemTools = useAppSelector(selectUseSystemMessageTools); + const isAgentSupported = useMemo(() => { if (!selectedModel) { return undefined; diff --git a/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts b/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts new file mode 100644 index 000000000..a3100508e --- /dev/null +++ b/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts @@ -0,0 +1,105 @@ +import { ModelDescription } from "core"; +import { describe, expect, test, vi } from "vitest"; +import { RootState } from "../store"; +import { selectUseSystemMessageTools } from "./selectUseSystemMessageTools"; + +// Mock the shouldAutoEnableSystemMessageTools function +vi.mock("core/config/shouldAutoEnableSystemMessageTools", () => ({ + shouldAutoEnableSystemMessageTools: vi.fn((model: ModelDescription) => { + if (model.provider === "openrouter") { + return !model.model.toLowerCase().includes("claude"); + } + return undefined; // No auto-preference for other providers + }), +})); + +// Mock the selectSelectedChatModel selector +vi.mock("../slices/configSlice", () => ({ + selectSelectedChatModel: vi.fn((state: RootState) => state.selectedModel), +})); + +describe("selectUseSystemMessageTools", () => { + const createMockState = ( + manualSetting?: boolean, + selectedModel?: ModelDescription, + ): RootState => + ({ + selectedModel, + config: { + config: { + experimental: { + onlyUseSystemMessageTools: manualSetting, + }, + }, + }, + }) as any; + + const createModel = (provider: string, model: string): ModelDescription => ({ + title: "Test Model", + provider, + underlyingProviderName: provider, + model, + }); + + test("auto-detection takes priority: OpenRouter non-Claude returns true even with manual false", () => { + const state = createMockState(false, createModel("openrouter", "gpt-4")); + expect(selectUseSystemMessageTools(state)).toBe(true); + }); + + test("auto-detection takes priority: OpenRouter Claude returns false even with manual true", () => { + const state = createMockState( + true, + createModel("openrouter", "claude-3.5-sonnet"), + ); + expect(selectUseSystemMessageTools(state)).toBe(false); + }); + + test("falls back to manual setting when no auto-preference: manual true", () => { + const state = createMockState(true, createModel("openai", "gpt-4")); + expect(selectUseSystemMessageTools(state)).toBe(true); + }); + + test("falls back to manual setting when no auto-preference: manual false", () => { + const state = createMockState( + false, + createModel("anthropic", "claude-3.5-sonnet"), + ); + expect(selectUseSystemMessageTools(state)).toBe(false); + }); + + test("defaults to false when no auto-preference and no manual setting", () => { + const state = createMockState( + undefined, + createModel("groq", "llama-3.3-70b"), + ); + expect(selectUseSystemMessageTools(state)).toBe(false); + }); + + test("handles missing selected model: uses manual setting", () => { + const state = createMockState(true, undefined); + expect(selectUseSystemMessageTools(state)).toBe(true); + }); + + test("handles missing selected model: defaults to false when no manual setting", () => { + const state = createMockState(undefined, undefined); + expect(selectUseSystemMessageTools(state)).toBe(false); + }); + + test("auto-enable works for various OpenRouter models", () => { + expect( + selectUseSystemMessageTools( + createMockState(false, createModel("openrouter", "gpt-4o")), + ), + ).toBe(true); + expect( + selectUseSystemMessageTools( + createMockState(false, createModel("openrouter", "llama-3.3-70b")), + ), + ).toBe(true); + expect( + selectUseSystemMessageTools( + createMockState(true, createModel("openrouter", "claude-haiku")), + ), + ).toBe(false); + }); +}); diff --git a/gui/src/redux/selectors/selectUseSystemMessageTools.ts b/gui/src/redux/selectors/selectUseSystemMessageTools.ts new file mode 100644 index 000000000..b5b09de0b --- /dev/null +++ b/gui/src/redux/selectors/selectUseSystemMessageTools.ts @@ -0,0 +1,37 @@ +import { shouldAutoEnableSystemMessageTools } from "core/config/shouldAutoEnableSystemMessageTools"; +import { selectSelectedChatModel } from "../slices/configSlice"; +import { RootState } from "../store"; + +/** + * Selector that determines if system message tools should be used. + * This prioritizes auto-detection over manual configuration where we have a strong preference. + * + * Priority order: + * 1. Auto-detection (if it returns true/false) + * 2. Manual user configuration (if auto-detection returns undefined) + * 3. Default to false + * + * @param state The Redux root state + * @returns true if system message tools should be used, false otherwise + */ +export function selectUseSystemMessageTools(state: RootState): boolean { + const selectedModel = selectSelectedChatModel(state); + const manualSetting = + state.config.config.experimental?.onlyUseSystemMessageTools; + + // If no model is selected, fall back to manual setting or default + if (!selectedModel) { + return manualSetting ?? false; + } + + // Check auto-detection first + const autoSetting = shouldAutoEnableSystemMessageTools(selectedModel); + + // If auto-detection has a preference, use it (takes priority) + if (autoSetting !== undefined) { + return autoSetting; + } + + // If no auto-preference, use manual setting or default to false + return manualSetting ?? false; +} diff --git a/gui/src/redux/thunks/streamNormalInput.ts b/gui/src/redux/thunks/streamNormalInput.ts index 62e6147db..fbff48d23 100644 --- a/gui/src/redux/thunks/streamNormalInput.ts +++ b/gui/src/redux/thunks/streamNormalInput.ts @@ -4,6 +4,7 @@ import { getRuleId } from "core/llm/rules/getSystemMessageWithRules"; import { ToCoreProtocol } from "core/protocol"; import { BuiltInToolNames } from "core/tools/builtIn"; import { selectActiveTools } from "../selectors/selectActiveTools"; +import { selectUseSystemMessageTools } from "../selectors/selectUseSystemMessageTools"; import { selectSelectedChatModel } from "../slices/configSlice"; import { abortStream, @@ -141,8 +142,9 @@ export const streamNormalInput = createAsyncThunk< const allActiveTools = selectActiveTools(state); const activeTools = filterToolsForModel(allActiveTools, selectedChatModel); const supportsNativeTools = modelSupportsNativeTools(selectedChatModel); - const useSystemTools = - !!state.config.config.experimental?.onlyUseSystemMessageTools; + + // Use the centralized selector to determine if system message tools should be used + const useSystemTools = selectUseSystemMessageTools(state); const useNativeTools = !useSystemTools && supportsNativeTools; // Construct completion options From ffb8b4bb0694b667bc10a601c17e7bf55eed0a37 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 17:11:43 -0700 Subject: [PATCH 32/46] fix: type error --- .../selectors/selectUseSystemMessageTools.test.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts b/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts index a3100508e..cec0d3459 100644 --- a/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts +++ b/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts @@ -14,17 +14,20 @@ vi.mock("core/config/shouldAutoEnableSystemMessageTools", () => ({ })); // Mock the selectSelectedChatModel selector +const mockSelectSelectedChatModel = vi.fn(); vi.mock("../slices/configSlice", () => ({ - selectSelectedChatModel: vi.fn((state: RootState) => state.selectedModel), + selectSelectedChatModel: mockSelectSelectedChatModel, })); describe("selectUseSystemMessageTools", () => { const createMockState = ( manualSetting?: boolean, selectedModel?: ModelDescription, - ): RootState => - ({ - selectedModel, + ): RootState => { + // Set up the mock to return the selected model for this test + mockSelectSelectedChatModel.mockReturnValue(selectedModel); + + return { config: { config: { experimental: { @@ -32,7 +35,8 @@ describe("selectUseSystemMessageTools", () => { }, }, }, - }) as any; + } as any; + }; const createModel = (provider: string, model: string): ModelDescription => ({ title: "Test Model", From bdda704a601b43fc5bb312af52fbc259b4df0042 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 17:18:35 -0700 Subject: [PATCH 33/46] another fix --- .../selectUseSystemMessageTools.test.ts | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts b/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts index cec0d3459..600d52532 100644 --- a/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts +++ b/gui/src/redux/selectors/selectUseSystemMessageTools.test.ts @@ -1,7 +1,6 @@ import { ModelDescription } from "core"; import { describe, expect, test, vi } from "vitest"; import { RootState } from "../store"; -import { selectUseSystemMessageTools } from "./selectUseSystemMessageTools"; // Mock the shouldAutoEnableSystemMessageTools function vi.mock("core/config/shouldAutoEnableSystemMessageTools", () => ({ @@ -13,20 +12,19 @@ vi.mock("core/config/shouldAutoEnableSystemMessageTools", () => ({ }), })); -// Mock the selectSelectedChatModel selector -const mockSelectSelectedChatModel = vi.fn(); +// Mock the selectSelectedChatModel selector - we'll control its return value in tests vi.mock("../slices/configSlice", () => ({ - selectSelectedChatModel: mockSelectSelectedChatModel, + selectSelectedChatModel: vi.fn(), })); -describe("selectUseSystemMessageTools", () => { - const createMockState = ( - manualSetting?: boolean, - selectedModel?: ModelDescription, - ): RootState => { - // Set up the mock to return the selected model for this test - mockSelectSelectedChatModel.mockReturnValue(selectedModel); +// Import after mocking +import { selectSelectedChatModel } from "../slices/configSlice"; +import { selectUseSystemMessageTools } from "./selectUseSystemMessageTools"; +describe("selectUseSystemMessageTools", () => { + const mockSelectSelectedChatModel = selectSelectedChatModel as any; + + const createMockState = (manualSetting?: boolean): RootState => { return { config: { config: { @@ -46,64 +44,69 @@ describe("selectUseSystemMessageTools", () => { }); test("auto-detection takes priority: OpenRouter non-Claude returns true even with manual false", () => { - const state = createMockState(false, createModel("openrouter", "gpt-4")); + mockSelectSelectedChatModel.mockReturnValue( + createModel("openrouter", "gpt-4"), + ); + const state = createMockState(false); expect(selectUseSystemMessageTools(state)).toBe(true); }); test("auto-detection takes priority: OpenRouter Claude returns false even with manual true", () => { - const state = createMockState( - true, + mockSelectSelectedChatModel.mockReturnValue( createModel("openrouter", "claude-3.5-sonnet"), ); + const state = createMockState(true); expect(selectUseSystemMessageTools(state)).toBe(false); }); test("falls back to manual setting when no auto-preference: manual true", () => { - const state = createMockState(true, createModel("openai", "gpt-4")); + mockSelectSelectedChatModel.mockReturnValue(createModel("openai", "gpt-4")); + const state = createMockState(true); expect(selectUseSystemMessageTools(state)).toBe(true); }); test("falls back to manual setting when no auto-preference: manual false", () => { - const state = createMockState( - false, + mockSelectSelectedChatModel.mockReturnValue( createModel("anthropic", "claude-3.5-sonnet"), ); + const state = createMockState(false); expect(selectUseSystemMessageTools(state)).toBe(false); }); test("defaults to false when no auto-preference and no manual setting", () => { - const state = createMockState( - undefined, + mockSelectSelectedChatModel.mockReturnValue( createModel("groq", "llama-3.3-70b"), ); + const state = createMockState(undefined); expect(selectUseSystemMessageTools(state)).toBe(false); }); test("handles missing selected model: uses manual setting", () => { - const state = createMockState(true, undefined); + mockSelectSelectedChatModel.mockReturnValue(undefined); + const state = createMockState(true); expect(selectUseSystemMessageTools(state)).toBe(true); }); test("handles missing selected model: defaults to false when no manual setting", () => { - const state = createMockState(undefined, undefined); + mockSelectSelectedChatModel.mockReturnValue(undefined); + const state = createMockState(undefined); expect(selectUseSystemMessageTools(state)).toBe(false); }); test("auto-enable works for various OpenRouter models", () => { - expect( - selectUseSystemMessageTools( - createMockState(false, createModel("openrouter", "gpt-4o")), - ), - ).toBe(true); - expect( - selectUseSystemMessageTools( - createMockState(false, createModel("openrouter", "llama-3.3-70b")), - ), - ).toBe(true); - expect( - selectUseSystemMessageTools( - createMockState(true, createModel("openrouter", "claude-haiku")), - ), - ).toBe(false); + mockSelectSelectedChatModel.mockReturnValue( + createModel("openrouter", "gpt-4o"), + ); + expect(selectUseSystemMessageTools(createMockState(false))).toBe(true); + + mockSelectSelectedChatModel.mockReturnValue( + createModel("openrouter", "llama-3.3-70b"), + ); + expect(selectUseSystemMessageTools(createMockState(false))).toBe(true); + + mockSelectSelectedChatModel.mockReturnValue( + createModel("openrouter", "claude-haiku"), + ); + expect(selectUseSystemMessageTools(createMockState(true))).toBe(false); }); }); From b9a390192078a6e4399b8fdd6a4625c83672016c Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 17:25:40 -0700 Subject: [PATCH 34/46] remove o1-preview (deprecated) from tests --- core/llm/llm.test.ts | 2 +- core/llm/llms/OpenAI.vitest.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/llm/llm.test.ts b/core/llm/llm.test.ts index c3acdb211..f3afd4c4b 100644 --- a/core/llm/llm.test.ts +++ b/core/llm/llm.test.ts @@ -213,7 +213,7 @@ describe("LLM", () => { testToolCall: true, }); testLLM( - new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "o1-preview" }), + new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "o3-mini" }), { skip: false, timeout: 60000 }, ); testLLM(new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "o1" }), { diff --git a/core/llm/llms/OpenAI.vitest.ts b/core/llm/llms/OpenAI.vitest.ts index d48bbd403..c047a3b5e 100644 --- a/core/llm/llms/OpenAI.vitest.ts +++ b/core/llm/llms/OpenAI.vitest.ts @@ -275,7 +275,7 @@ describe("OpenAI", () => { test("should handle O1 models correctly", async () => { const openai = new OpenAI({ apiKey: "test-api-key", - model: "o1-preview", + model: "o1", apiBase: "https://api.openai.com/v1/", }); @@ -296,7 +296,7 @@ describe("OpenAI", () => { "api-key": "test-api-key", }, body: { - model: "o1-preview", + model: "o1", messages: [{ role: "user", content: "hello" }], stream: true, max_completion_tokens: 100, From 27396389ab52b0730e535f488377570bfcca000f Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Mon, 28 Jul 2025 17:48:37 -0700 Subject: [PATCH 35/46] docs: fix broken link to context in chat docs --- docs/features/chat/how-it-works.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/chat/how-it-works.mdx b/docs/features/chat/how-it-works.mdx index 43f3794d3..eeb35276f 100644 --- a/docs/features/chat/how-it-works.mdx +++ b/docs/features/chat/how-it-works.mdx @@ -51,8 +51,8 @@ View the exact prompt sent to the AI model in the [prompt logs](/troubleshooting Learn more about how context providers work: -- [Codebase Context](/customization/overview#codebase-context) -- [Documentation Context](/customization/overview#documentation-context) +- [Codebase Context](/customize/context/codebase) +- [Documentation Context](/customize/context/documentation) --- From 2befbcd306a9e74663794559175f29faf9cb4ec5 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Mon, 28 Jul 2025 17:52:55 -0700 Subject: [PATCH 36/46] fix: adds redirect --- docs/docs.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs.json b/docs/docs.json index ec993cdb7..04fc66d35 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -988,6 +988,14 @@ { "source": "/agent/context-selection", "destination": "/features/agent/context-selection" + }, + { + "source": "/customization/overview#codebase-context", + "destination": "/customize/context/codebase" + }, + { + "source": "/customization/overview#documentation-context", + "destination": "/customize/context/documentation" } ] } From 763e5f87369684e9ba6ab6c70280dbfab3cb7a37 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 17:57:31 -0700 Subject: [PATCH 37/46] try to fix tests again --- core/llm/llms/OpenAI.vitest.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/llm/llms/OpenAI.vitest.ts b/core/llm/llms/OpenAI.vitest.ts index c047a3b5e..b07f05b15 100644 --- a/core/llm/llms/OpenAI.vitest.ts +++ b/core/llm/llms/OpenAI.vitest.ts @@ -275,7 +275,7 @@ describe("OpenAI", () => { test("should handle O1 models correctly", async () => { const openai = new OpenAI({ apiKey: "test-api-key", - model: "o1", + model: "o3-mini", apiBase: "https://api.openai.com/v1/", }); @@ -296,7 +296,7 @@ describe("OpenAI", () => { "api-key": "test-api-key", }, body: { - model: "o1", + model: "o3-mini", messages: [{ role: "user", content: "hello" }], stream: true, max_completion_tokens: 100, From 2fc7106c6f31e485740032bd52598d8b3abac41e Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 18:17:25 -0700 Subject: [PATCH 38/46] test: skip next edit e2e test due to flake --- .../vscode/e2e/tests/{NextEdit.test.ts => NextEdit.skip.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename extensions/vscode/e2e/tests/{NextEdit.test.ts => NextEdit.skip.ts} (100%) diff --git a/extensions/vscode/e2e/tests/NextEdit.test.ts b/extensions/vscode/e2e/tests/NextEdit.skip.ts similarity index 100% rename from extensions/vscode/e2e/tests/NextEdit.test.ts rename to extensions/vscode/e2e/tests/NextEdit.skip.ts From f659aa69bb94de0e37e30e1d941620f063193592 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 18:36:22 -0700 Subject: [PATCH 39/46] Bump version to 1.1.70 --- 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 a3ca3a6b7..2413c9ead 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": "1.1.69", + "version": "1.1.70", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 745be48927ada907574ea5c54ca775c24a213d49 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 29 Jul 2025 09:27:32 +0530 Subject: [PATCH 40/46] resolve nits --- core/protocol/passThrough.ts | 4 ++-- gui/src/components/Layout.tsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index ba14d7594..967e0262e 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -66,10 +66,10 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "didChangeSelectedProfile", "didChangeSelectedOrg", "tools/call", - "controlPlane/openUrl", - "controlPlane/getModelsAddOnUpgradeUrl", "controlPlane/getEnvironment", "controlPlane/getFreeTrialStatus", + "controlPlane/getModelsAddOnUpgradeUrl", + "controlPlane/openUrl", "isItemTooBig", "process/markAsBackgrounded", "process/isBackgrounded", diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 2ada98d9d..0f5bb264c 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -62,7 +62,6 @@ const Layout = () => { "controlPlane/getEnvironment", undefined, ); - console.log("debug2 response was", response); response.status === "success" && setShowBorder(response.content.AUTH_TYPE.includes("staging")); })(); From 83b14343c21212c04dab40204608fd7337d33faf Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 29 Jul 2025 09:35:52 +0530 Subject: [PATCH 41/46] show a yellow dot --- gui/src/components/Layout.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 0f5bb264c..afc8ffc37 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -28,9 +28,8 @@ import { import OSRContextMenu from "./OSRContextMenu"; import PostHogPageView from "./PosthogPageView"; -const LayoutTopDiv = styled(CustomScrollbarDiv)<{ showBorder: boolean }>` +const LayoutTopDiv = styled(CustomScrollbarDiv)` height: 100%; - border-top: ${(props) => (props.showBorder ? "1px solid yellow" : "none")}; position: relative; overflow-x: hidden; `; @@ -43,7 +42,7 @@ const GridDiv = styled.div` `; const Layout = () => { - const [showBorder, setShowBorder] = useState(false); + const [showStagingIndicator, setShowStagingIndicator] = useState(false); const navigate = useNavigate(); const location = useLocation(); const dispatch = useAppDispatch(); @@ -63,7 +62,7 @@ const Layout = () => { undefined, ); response.status === "success" && - setShowBorder(response.content.AUTH_TYPE.includes("staging")); + setShowStagingIndicator(response.content.AUTH_TYPE.includes("staging")); })(); }, []); @@ -247,7 +246,16 @@ const Layout = () => { return ( - + + {showStagingIndicator && ( +
+ )}
Date: Mon, 28 Jul 2025 23:38:20 -0700 Subject: [PATCH 42/46] update docs recommendations to use openrouter --- docs/features/chat/model-setup.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/features/chat/model-setup.mdx b/docs/features/chat/model-setup.mdx index b583093bb..74031148e 100644 --- a/docs/features/chat/model-setup.mdx +++ b/docs/features/chat/model-setup.mdx @@ -18,18 +18,18 @@ Its strong tool calling and reasoning capabilities make it the best model for Ag These models have varying tool calling and reasoning capabilities. -[Kimi K2](https://hub.continue.dev/togetherai/kimi-k2-instruct) from Moonshot AI +[Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) from Moonshot AI -1. Get your API key from [Together AI](https://api.together.ai) -2. Add [Kimi K2](https://hub.continue.dev/togetherai/kimi-k2-instruct) to your assistant on Continue Hub -3. Add `TOGETHER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) +1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys) +2. Add [Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) to your assistant on Continue Hub +3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) 4. Click `Reload config` in the assistant selector in the Continue IDE extension -[Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b-a35b-instruct-fp8) from Qwen +[Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b) from Qwen -1. Get your API key from [Together AI](https://api.together.ai) -2. Add [Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b-a35b-instruct-fp8) to your assistant on Continue Hub -3. Add `TOGETHER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) +1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys) +2. Add [Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b) to your assistant on Continue Hub +3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) 4. Click `Reload config` in the assistant selector in the Continue IDE extension [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) from Google From c3f2137d2ccc84e6dcfd5ef243d165196ecaee32 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 28 Jul 2025 23:57:38 -0700 Subject: [PATCH 43/46] fix slugs --- docs/features/chat/model-setup.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/chat/model-setup.mdx b/docs/features/chat/model-setup.mdx index 74031148e..9e0a1c213 100644 --- a/docs/features/chat/model-setup.mdx +++ b/docs/features/chat/model-setup.mdx @@ -25,10 +25,10 @@ These models have varying tool calling and reasoning capabilities. 3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) 4. Click `Reload config` in the assistant selector in the Continue IDE extension -[Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b) from Qwen +[Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) from Qwen 1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys) -2. Add [Qwen Coder 3 480B](https://hub.continue.dev/togetherai/qwen3-coder-480b) to your assistant on Continue Hub +2. Add [Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) to your assistant on Continue Hub 3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets) 4. Click `Reload config` in the assistant selector in the Continue IDE extension From aa3a7238488d7a4889eb6d4430a8ce12424ecf47 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 29 Jul 2025 00:02:50 -0700 Subject: [PATCH 44/46] chore: bump to 71 --- 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 2413c9ead..536b032ec 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": "1.1.70", + "version": "1.1.71", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 8037671ac7e73c6e276cd30641856401f7bcc759 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 29 Jul 2025 14:02:32 +0530 Subject: [PATCH 45/46] resolve comment --- gui/src/components/Layout.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index afc8ffc37..503fd2fb4 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -248,8 +248,8 @@ const Layout = () => { {showStagingIndicator && ( -
Date: Tue, 29 Jul 2025 09:09:39 -0700 Subject: [PATCH 46/46] docs: add correct title to yaml codeblocks in reference (#6851) Update reference.mdx --- docs/reference.mdx | 67 ++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 50 deletions(-) diff --git a/docs/reference.mdx b/docs/reference.mdx index 670100f24..7ea087fc5 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -79,9 +79,7 @@ Local blocks utilizing mustache notation for secrets (`${{ secrets.SECRET_NAME } Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows: -Block config.yaml - -```yaml +```yaml title="config.yaml" name: myprofile/custom-model models: - name: My Favorite Model @@ -91,11 +89,9 @@ models: temperature: ${{ inputs.TEMP }} ``` -Which can then be imported like +Which can then be imported like this: -Assistant config.yaml - -```yaml +```yaml title="config.yaml" name: myprofile/custom-assistant models: - uses: myprofile/custom-model @@ -110,9 +106,7 @@ Note that hub secrets can be passed as inputs, using a similar mustache format: Block properties can be also be directly overriden using `override`. For example: -Assistant config.yaml - -```yaml +```yaml title="config.yaml" name: myprofile/custom-assistant models: - uses: myprofile/custom-model @@ -149,9 +143,7 @@ The top-level properties in the `config.yaml` configuration file are: The `name` property specifies the name of your project or configuration. -config.yaml - -```yaml +```yaml title="config.yaml" name: MyProject ``` @@ -230,11 +222,9 @@ The `models` section defines the language models used in your configuration. Mod - `key`: Path to the client certificate key file. - `passphrase`: Optional passphrase for the client certificate key file. -#### Example +**Example:** -config.yaml - -```yaml +```yaml title="config.yaml" models: - name: GPT-4o provider: openai @@ -279,9 +269,7 @@ More information about usage/params for each context provider can be found [here **Example:** -config.yaml - -```yaml +```yaml title="config.yaml" context: - provider: file - provider: code @@ -310,9 +298,7 @@ Explicit rules can either be simple text or an object with the following propert - `rule` (**required**): The text content of the rule - `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). -config.yaml - -```yaml +```yaml title="config.yaml"l rules: - Always annotate Python functions with their parameter and return types - name: TypeScript best practices @@ -334,9 +320,7 @@ rules: A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. -config.yaml - -```yaml +```yaml title="config.yaml" prompts: - name: check description: Check for mistakes in my code @@ -360,11 +344,9 @@ List of documentation sites to index. - `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). - `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler. -Example +**Example:** -config.yaml - -```yaml +```yaml title="config.yaml" docs: - name: Continue startUrl: https://docs.continue.dev/intro @@ -388,9 +370,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a **Example:** -config.yaml - -```yaml +```yaml title="config.yaml" mcpServers: - name: My MCP Server command: uvx @@ -410,27 +390,18 @@ Destinations to which [development data](/customize/overview#development-data) w **Properties:** - `name` (**required**): The display name of the data destination - - `destination` (**required**): The destination/endpoint that will receive the data. Can be: - - an HTTP endpoint that will receive a POST request with a JSON blob - a file URL to a directory in which events will be dumpted to `.jsonl` files - - `schema` (**required**): the schema version of the JSON blobs to be sent. Options include `0.1.0` and `0.2.0` - - `events`: an array of event names to include. Defaults to all events if not specified. - - `level`: a pre-defined filter for event fields. Options include `all` and `noCode`; the latter excludes data like file contents, prompts, and completions. Defaults to `all` - - `apiKey`: api key to be sent with request (Bearer header) - - `requestOptions`: Options for event POST requests. Same format as [model requestOptions](#models). - **Example:** +**Example:** -config.yaml - -```yaml +```yaml title="config.yaml" data: - name: Local Data Bank destination: file:///Users/dallin/Documents/code/continuedev/continue-extras/external-data @@ -451,9 +422,7 @@ data: Putting it all together, here's a complete example of a `config.yaml` configuration file: -config.yaml - -```yaml +```yaml title="config.yaml" name: MyProject version: 0.0.1 schema: v1 @@ -527,9 +496,7 @@ data: You can also use node anchors to avoid duplication of properties. To do so, adding the YAML version header `%YAML 1.1` is needed, here's an example of a `config.yaml` configuration file using anchors: -config.yaml - -```yaml +```yaml title="config.yaml" %YAML 1.1 --- name: MyProject