From c64dd9319345bbe22f82c7ee2892132cbf845809 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:44:49 +0530 Subject: [PATCH 01/99] add new `indexTypes` for context indexing --- core/context/providers/CodeContextProvider.ts | 2 +- .../providers/CodebaseContextProvider.ts | 1 + .../providers/FolderContextProvider.ts | 2 +- core/index.d.ts | 7 ++- core/indexing/CodebaseIndexer.ts | 58 +++++++++++++------ core/protocol/webview.ts | 2 +- gui/src/context/SubmenuContextProviders.tsx | 17 +++--- 7 files changed, 58 insertions(+), 31 deletions(-) diff --git a/core/context/providers/CodeContextProvider.ts b/core/context/providers/CodeContextProvider.ts index b746199b0..0a3c361a3 100644 --- a/core/context/providers/CodeContextProvider.ts +++ b/core/context/providers/CodeContextProvider.ts @@ -16,7 +16,7 @@ class CodeContextProvider extends BaseContextProvider { displayTitle: "Code", description: "Type to search", type: "submenu", - dependsOnIndexing: true, + indexTypes: ["chunk", "codeSnippets"], }; async getContextItems( diff --git a/core/context/providers/CodebaseContextProvider.ts b/core/context/providers/CodebaseContextProvider.ts index 51881f457..682a65a1f 100644 --- a/core/context/providers/CodebaseContextProvider.ts +++ b/core/context/providers/CodebaseContextProvider.ts @@ -13,6 +13,7 @@ class CodebaseContextProvider extends BaseContextProvider { description: "Automatically find relevant files", type: "normal", renderInlineAs: "", + indexTypes: ["embeddings", "fullTextSearch", "chunk"], }; async getContextItems( diff --git a/core/context/providers/FolderContextProvider.ts b/core/context/providers/FolderContextProvider.ts index b4d2e0e09..981ca8579 100644 --- a/core/context/providers/FolderContextProvider.ts +++ b/core/context/providers/FolderContextProvider.ts @@ -19,7 +19,7 @@ class FolderContextProvider extends BaseContextProvider { displayTitle: "Folder", description: "Type to search", type: "submenu", - dependsOnIndexing: true, + indexTypes: ["embeddings"], }; async getContextItems( diff --git a/core/index.d.ts b/core/index.d.ts index 4aea44fd4..68cf3aba6 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -165,6 +165,11 @@ export interface ModelInstaller { } export type ContextProviderType = "normal" | "query" | "submenu"; +export type ContextIndexingType = + | "chunk" + | "embeddings" + | "fullTextSearch" + | "codeSnippets"; export interface ContextProviderDescription { title: ContextProviderName; @@ -172,7 +177,7 @@ export interface ContextProviderDescription { description: string; renderInlineAs?: string; type: ContextProviderType; - dependsOnIndexing?: boolean; + indexTypes?: ContextIndexingType[]; } export type FetchFunction = (url: string | URL, init?: any) => Promise; diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index d2de0c512..880284e46 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -1,7 +1,12 @@ import * as fs from "fs/promises"; import { ConfigHandler } from "../config/ConfigHandler.js"; -import { IDE, IndexingProgressUpdate, IndexTag } from "../index.js"; +import { + ContextIndexingType, + IDE, + IndexingProgressUpdate, + IndexTag, +} from "../index.js"; import type { FromCoreProtocol, ToCoreProtocol } from "../protocol"; import type { IMessenger } from "../protocol/messenger"; import { extractMinimalStackTraceInfo } from "../util/extractMinimalStackTraceInfo.js"; @@ -123,28 +128,43 @@ export class CodebaseIndexer { return []; } - const indexes: CodebaseIndex[] = [ - new ChunkCodebaseIndex( - this.ide.readFile.bind(this.ide), - continueServerClient, - embeddingsModel.maxEmbeddingChunkSize, - ), // Chunking must come first - ]; - - const lanceDbIndex = await LanceDbIndex.create( - embeddingsModel, - this.ide.readFile.bind(this.ide), + const indexTypesToBuild = new Set( // use set to remove duplicates + config.contextProviders + .map((provider) => provider.description.indexTypes) + .filter((indexType) => Array.isArray(indexType)) // remove undefined indexTypes + .flat(), ); - if (lanceDbIndex) { - indexes.push(lanceDbIndex); + const indexTypeToIndexerMapping: Record< + ContextIndexingType, + () => Promise + > = { + chunk: async () => + new ChunkCodebaseIndex( + this.ide.readFile.bind(this.ide), + continueServerClient, + embeddingsModel.maxEmbeddingChunkSize, + ), + codeSnippets: async () => new CodeSnippetsCodebaseIndex(this.ide), + fullTextSearch: async () => new FullTextSearchCodebaseIndex(), + embeddings: async () => { + const lanceDbIndex = await LanceDbIndex.create( + embeddingsModel, + this.ide.readFile.bind(this.ide), + ); + return lanceDbIndex; + }, + }; + + const indexes: CodebaseIndex[] = []; + // not parallelizing to avoid race conditions in sqlite + for (const indexType of indexTypesToBuild) { + const index = await indexTypeToIndexerMapping[indexType](); + if (index) { + indexes.push(index); + } } - indexes.push( - new FullTextSearchCodebaseIndex(), - new CodeSnippetsCodebaseIndex(this.ide), - ); - return indexes; } diff --git a/core/protocol/webview.ts b/core/protocol/webview.ts index 1a8d40313..b43bf271f 100644 --- a/core/protocol/webview.ts +++ b/core/protocol/webview.ts @@ -24,7 +24,7 @@ export type ToWebviewFromIdeOrCoreProtocol = { "indexing/statusUpdate": [IndexingStatus, void]; // Docs, etc. refreshSubmenuItems: [ { - providers: "all" | "dependsOnIndexing" | ContextProviderName[]; + providers: "all" | "indexTypes" | ContextProviderName[]; }, void, ]; diff --git a/gui/src/context/SubmenuContextProviders.tsx b/gui/src/context/SubmenuContextProviders.tsx index cf3939c48..87428ddba 100644 --- a/gui/src/context/SubmenuContextProviders.tsx +++ b/gui/src/context/SubmenuContextProviders.tsx @@ -115,7 +115,7 @@ export const SubmenuContextProvidersProvider = ({ const interval = setInterval(refreshOpenFiles, 2000); - refreshOpenFiles(); // Initial call + void refreshOpenFiles(); // Initial call return () => { isMounted = false; @@ -227,7 +227,7 @@ export const SubmenuContextProvidersProvider = ({ ); const loadSubmenuItems = useCallback( - async (providers: "dependsOnIndexing" | "all" | ContextProviderName[]) => { + async (providers: "indexTypes" | "all" | ContextProviderName[]) => { await Promise.allSettled( submenuContextProviders.map( async (description: ContextProviderDescription) => { @@ -236,12 +236,13 @@ export const SubmenuContextProvidersProvider = ({ const refreshProvider = providers === "all" ? true - : providers === "dependsOnIndexing" - ? description.dependsOnIndexing + : providers === "indexTypes" + ? description.indexTypes && + description.indexTypes?.length > 0 : providers.includes(description.title); if (!refreshProvider) { - if (providers === "dependsOnIndexing") { + if (providers === "indexTypes") { console.debug( `Skipping ${description.title} provider due to disabled indexing`, ); @@ -351,7 +352,7 @@ export const SubmenuContextProvidersProvider = ({ useWebviewListener( "refreshSubmenuItems", async (data) => { - loadSubmenuItems(data.providers); + void loadSubmenuItems(data.providers); }, [loadSubmenuItems], ); @@ -360,7 +361,7 @@ export const SubmenuContextProvidersProvider = ({ "indexProgress", async (data) => { if (data.status === "done") { - loadSubmenuItems("dependsOnIndexing"); + void loadSubmenuItems("indexTypes"); } }, [loadSubmenuItems], @@ -379,7 +380,7 @@ export const SubmenuContextProvidersProvider = ({ ) .map((provider) => provider.title); if (newTitles.length > 0) { - loadSubmenuItems(newTitles); + void loadSubmenuItems(newTitles); } lastProviders.current = submenuContextProviders; }, [loadSubmenuItems, submenuContextProviders]); From 4c0e2b3cc6453d99bee8098913ddb91b4ad35061 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:48:52 +0530 Subject: [PATCH 02/99] rename to dependsOnIndexing --- core/context/providers/CodeContextProvider.ts | 2 +- core/context/providers/FolderContextProvider.ts | 2 +- core/index.d.ts | 2 +- core/indexing/CodebaseIndexer.ts | 2 +- core/protocol/webview.ts | 2 +- gui/src/context/SubmenuContextProviders.tsx | 12 ++++++------ 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/context/providers/CodeContextProvider.ts b/core/context/providers/CodeContextProvider.ts index 0a3c361a3..db3b81664 100644 --- a/core/context/providers/CodeContextProvider.ts +++ b/core/context/providers/CodeContextProvider.ts @@ -16,7 +16,7 @@ class CodeContextProvider extends BaseContextProvider { displayTitle: "Code", description: "Type to search", type: "submenu", - indexTypes: ["chunk", "codeSnippets"], + dependsOnIndexing: ["chunk", "codeSnippets"], }; async getContextItems( diff --git a/core/context/providers/FolderContextProvider.ts b/core/context/providers/FolderContextProvider.ts index 981ca8579..48efcb121 100644 --- a/core/context/providers/FolderContextProvider.ts +++ b/core/context/providers/FolderContextProvider.ts @@ -19,7 +19,7 @@ class FolderContextProvider extends BaseContextProvider { displayTitle: "Folder", description: "Type to search", type: "submenu", - indexTypes: ["embeddings"], + dependsOnIndexing: ["embeddings", "fullTextSearch", "chunk"], }; async getContextItems( diff --git a/core/index.d.ts b/core/index.d.ts index 2f3766d24..6f18e1c32 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -177,7 +177,7 @@ export interface ContextProviderDescription { description: string; renderInlineAs?: string; type: ContextProviderType; - indexTypes?: ContextIndexingType[]; + dependsOnIndexing?: ContextIndexingType[]; } export type FetchFunction = (url: string | URL, init?: any) => Promise; diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index 880284e46..f2fabb90c 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -130,7 +130,7 @@ export class CodebaseIndexer { const indexTypesToBuild = new Set( // use set to remove duplicates config.contextProviders - .map((provider) => provider.description.indexTypes) + .map((provider) => provider.description.dependsOnIndexing) .filter((indexType) => Array.isArray(indexType)) // remove undefined indexTypes .flat(), ); diff --git a/core/protocol/webview.ts b/core/protocol/webview.ts index b43bf271f..1a8d40313 100644 --- a/core/protocol/webview.ts +++ b/core/protocol/webview.ts @@ -24,7 +24,7 @@ export type ToWebviewFromIdeOrCoreProtocol = { "indexing/statusUpdate": [IndexingStatus, void]; // Docs, etc. refreshSubmenuItems: [ { - providers: "all" | "indexTypes" | ContextProviderName[]; + providers: "all" | "dependsOnIndexing" | ContextProviderName[]; }, void, ]; diff --git a/gui/src/context/SubmenuContextProviders.tsx b/gui/src/context/SubmenuContextProviders.tsx index 87428ddba..9f6bcd55c 100644 --- a/gui/src/context/SubmenuContextProviders.tsx +++ b/gui/src/context/SubmenuContextProviders.tsx @@ -227,7 +227,7 @@ export const SubmenuContextProvidersProvider = ({ ); const loadSubmenuItems = useCallback( - async (providers: "indexTypes" | "all" | ContextProviderName[]) => { + async (providers: "dependsOnIndexing" | "all" | ContextProviderName[]) => { await Promise.allSettled( submenuContextProviders.map( async (description: ContextProviderDescription) => { @@ -236,13 +236,13 @@ export const SubmenuContextProvidersProvider = ({ const refreshProvider = providers === "all" ? true - : providers === "indexTypes" - ? description.indexTypes && - description.indexTypes?.length > 0 + : providers === "dependsOnIndexing" + ? description.dependsOnIndexing && + description.dependsOnIndexing?.length > 0 : providers.includes(description.title); if (!refreshProvider) { - if (providers === "indexTypes") { + if (providers === "dependsOnIndexing") { console.debug( `Skipping ${description.title} provider due to disabled indexing`, ); @@ -361,7 +361,7 @@ export const SubmenuContextProvidersProvider = ({ "indexProgress", async (data) => { if (data.status === "done") { - void loadSubmenuItems("indexTypes"); + void loadSubmenuItems("dependsOnIndexing"); } }, [loadSubmenuItems], From 5a9b9db915624a51f9a8229fbd98dbaa0cdcc016 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:03:01 +0530 Subject: [PATCH 03/99] type correction --- core/context/providers/CodebaseContextProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/context/providers/CodebaseContextProvider.ts b/core/context/providers/CodebaseContextProvider.ts index 682a65a1f..43eaec433 100644 --- a/core/context/providers/CodebaseContextProvider.ts +++ b/core/context/providers/CodebaseContextProvider.ts @@ -13,7 +13,7 @@ class CodebaseContextProvider extends BaseContextProvider { description: "Automatically find relevant files", type: "normal", renderInlineAs: "", - indexTypes: ["embeddings", "fullTextSearch", "chunk"], + dependsOnIndexing: ["embeddings", "fullTextSearch", "chunk"], }; async getContextItems( From 2df3f1307fc8d3f9830923f85ae507f44e9208df Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:56:37 +0530 Subject: [PATCH 05/99] fix typecheck --- core/indexing/CodebaseIndexer.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index f2fabb90c..2706f0c1e 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -159,9 +159,11 @@ export class CodebaseIndexer { const indexes: CodebaseIndex[] = []; // not parallelizing to avoid race conditions in sqlite for (const indexType of indexTypesToBuild) { - const index = await indexTypeToIndexerMapping[indexType](); - if (index) { - indexes.push(index); + if (indexType && indexType in indexTypeToIndexerMapping) { + const index = await indexTypeToIndexerMapping[indexType](); + if (index) { + indexes.push(index); + } } } From 085f76602854b00bcd2903bad4d1e160581d724c Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:59:21 +0530 Subject: [PATCH 06/99] write tests for "getIndexesToBuild" --- core/indexing/CodebaseIndexer.test.ts | 90 +++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 63822bea9..aee2fbebb 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -688,4 +688,94 @@ describe("CodebaseIndexer", () => { }); }); }); + + describe("getIndexesToBuild", () => { + let indexer: CodebaseIndexer; + let mockConfig: any; + let mockEmbeddingsModel: any; + let mockIdeSettings: any; + + beforeEach(() => { + indexer = new CodebaseIndexer( + testConfigHandler, + testIde, + mockMessenger as any, + false, + ); + + mockEmbeddingsModel = { + maxEmbeddingChunkSize: 1000, + model: "test-model", + provider: "test-provider", + }; + + mockIdeSettings = { + remoteConfigServerUrl: "http://test.com", + userToken: "test-token", + }; + + mockConfig = { + selectedModelByRole: { + embed: mockEmbeddingsModel, + }, + contextProviders: [], + }; + + jest.spyOn(testIde, "getIdeSettings").mockResolvedValue(mockIdeSettings); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test("should create specific indexTypes for the requested context providers", async () => { + mockConfig.contextProviders = [ + { + description: { + dependsOnIndexing: ["chunk", "codeSnippets"], + }, + }, + ]; + + jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ + config: mockConfig, + errors: [], + configLoadInterrupted: false, + }); + + const indexes = (await ( + indexer as any + ).getIndexesToBuild()) as CodebaseIndex[]; + + expect(indexes).toHaveLength(2); + expect(indexes[0].artifactId).toBe("chunks"); + expect(indexes[1].artifactId).toBe("codeSnippets"); + }); + + test("should handle duplicate contexts", async () => { + mockConfig.contextProviders = [ + { + description: { + dependsOnIndexing: ["codeSnippets"], + }, + }, + { + description: { + dependsOnIndexing: ["codeSnippets"], + }, + }, + ]; + + jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ + config: mockConfig, + errors: [], + configLoadInterrupted: false, + }); + + const indexes = await (indexer as any).getIndexesToBuild(); + + expect(indexes).toHaveLength(1); + expect(indexes[0].artifactId).toBe("codeSnippets"); + }); + }); }); From cdc71422a96427a3580dc4a8604bc046884fb59b Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 11:56:28 +0530 Subject: [PATCH 08/99] revert tests --- core/indexing/CodebaseIndexer.test.ts | 90 --------------------------- 1 file changed, 90 deletions(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index c15e2b062..e6b2c2055 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -710,94 +710,4 @@ describe("CodebaseIndexer", () => { }); }); }); - - describe("getIndexesToBuild", () => { - let indexer: CodebaseIndexer; - let mockConfig: any; - let mockEmbeddingsModel: any; - let mockIdeSettings: any; - - beforeEach(() => { - indexer = new CodebaseIndexer( - testConfigHandler, - testIde, - mockMessenger as any, - false, - ); - - mockEmbeddingsModel = { - maxEmbeddingChunkSize: 1000, - model: "test-model", - provider: "test-provider", - }; - - mockIdeSettings = { - remoteConfigServerUrl: "http://test.com", - userToken: "test-token", - }; - - mockConfig = { - selectedModelByRole: { - embed: mockEmbeddingsModel, - }, - contextProviders: [], - }; - - jest.spyOn(testIde, "getIdeSettings").mockResolvedValue(mockIdeSettings); - }); - - afterEach(() => { - jest.clearAllMocks(); - }); - - test("should create specific indexTypes for the requested context providers", async () => { - mockConfig.contextProviders = [ - { - description: { - dependsOnIndexing: ["chunk", "codeSnippets"], - }, - }, - ]; - - jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ - config: mockConfig, - errors: [], - configLoadInterrupted: false, - }); - - const indexes = (await ( - indexer as any - ).getIndexesToBuild()) as CodebaseIndex[]; - - expect(indexes).toHaveLength(2); - expect(indexes[0].artifactId).toBe("chunks"); - expect(indexes[1].artifactId).toBe("codeSnippets"); - }); - - test("should handle duplicate contexts", async () => { - mockConfig.contextProviders = [ - { - description: { - dependsOnIndexing: ["codeSnippets"], - }, - }, - { - description: { - dependsOnIndexing: ["codeSnippets"], - }, - }, - ]; - - jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ - config: mockConfig, - errors: [], - configLoadInterrupted: false, - }); - - const indexes = await (indexer as any).getIndexesToBuild(); - - expect(indexes).toHaveLength(1); - expect(indexes[0].artifactId).toBe("codeSnippets"); - }); - }); }); From 2c2db8f967e7d363ec87ef3d000467f5725fe581 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:02:11 +0530 Subject: [PATCH 09/99] Revert "revert tests" This reverts commit cdc71422a96427a3580dc4a8604bc046884fb59b. --- core/indexing/CodebaseIndexer.test.ts | 90 +++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index e6b2c2055..c15e2b062 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -710,4 +710,94 @@ describe("CodebaseIndexer", () => { }); }); }); + + describe("getIndexesToBuild", () => { + let indexer: CodebaseIndexer; + let mockConfig: any; + let mockEmbeddingsModel: any; + let mockIdeSettings: any; + + beforeEach(() => { + indexer = new CodebaseIndexer( + testConfigHandler, + testIde, + mockMessenger as any, + false, + ); + + mockEmbeddingsModel = { + maxEmbeddingChunkSize: 1000, + model: "test-model", + provider: "test-provider", + }; + + mockIdeSettings = { + remoteConfigServerUrl: "http://test.com", + userToken: "test-token", + }; + + mockConfig = { + selectedModelByRole: { + embed: mockEmbeddingsModel, + }, + contextProviders: [], + }; + + jest.spyOn(testIde, "getIdeSettings").mockResolvedValue(mockIdeSettings); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test("should create specific indexTypes for the requested context providers", async () => { + mockConfig.contextProviders = [ + { + description: { + dependsOnIndexing: ["chunk", "codeSnippets"], + }, + }, + ]; + + jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ + config: mockConfig, + errors: [], + configLoadInterrupted: false, + }); + + const indexes = (await ( + indexer as any + ).getIndexesToBuild()) as CodebaseIndex[]; + + expect(indexes).toHaveLength(2); + expect(indexes[0].artifactId).toBe("chunks"); + expect(indexes[1].artifactId).toBe("codeSnippets"); + }); + + test("should handle duplicate contexts", async () => { + mockConfig.contextProviders = [ + { + description: { + dependsOnIndexing: ["codeSnippets"], + }, + }, + { + description: { + dependsOnIndexing: ["codeSnippets"], + }, + }, + ]; + + jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ + config: mockConfig, + errors: [], + configLoadInterrupted: false, + }); + + const indexes = await (indexer as any).getIndexesToBuild(); + + expect(indexes).toHaveLength(1); + expect(indexes[0].artifactId).toBe("codeSnippets"); + }); + }); }); From c1013ee18dd7eb1ce3ed89e38bfc687b5538b8a6 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:02:42 +0530 Subject: [PATCH 10/99] test only codebaseindexer --- .github/workflows/pr-checks.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 63afde345..1b4a41d87 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -44,17 +44,18 @@ jobs: component: core include-root: true - - name: Type check and lint - run: | - cd core - npx tsc --noEmit - npm run lint - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + # - name: Type check and lint + # run: | + # cd core + # npx tsc --noEmit + # npm run lint + # env: + # OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - name: Run tests run: | cd core + npm test -- CodebaseIndexer npm test npm run vitest env: From 7a80e793d4dfb58b302ca0e2f26c34e23a5b13e8 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:12:24 +0530 Subject: [PATCH 11/99] rerun tests --- core/indexing/CodebaseIndexer.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index c15e2b062..95ba7bc97 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -717,7 +717,7 @@ describe("CodebaseIndexer", () => { let mockEmbeddingsModel: any; let mockIdeSettings: any; - beforeEach(() => { + beforeEach(async () => { indexer = new CodebaseIndexer( testConfigHandler, testIde, @@ -774,7 +774,7 @@ describe("CodebaseIndexer", () => { expect(indexes[1].artifactId).toBe("codeSnippets"); }); - test("should handle duplicate contexts", async () => { + test.skip("should handle duplicate contexts", async () => { mockConfig.contextProviders = [ { description: { From 36755840d6fd4170fba5b6822ea32d52232f85c2 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:14:02 +0530 Subject: [PATCH 12/99] rerun tests --- core/indexing/CodebaseIndexer.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 95ba7bc97..cf4102bd7 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -750,7 +750,7 @@ describe("CodebaseIndexer", () => { jest.clearAllMocks(); }); - test("should create specific indexTypes for the requested context providers", async () => { + test.skip("should create specific indexTypes for the requested context providers", async () => { mockConfig.contextProviders = [ { description: { From 3713a4d61c37f28c1fe6925318655d0733cd7ac0 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:17:26 +0530 Subject: [PATCH 13/99] wait for logs to cleanup --- core/indexing/CodebaseIndexer.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index cf4102bd7..b9c24519a 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -746,11 +746,12 @@ describe("CodebaseIndexer", () => { jest.spyOn(testIde, "getIdeSettings").mockResolvedValue(mockIdeSettings); }); - afterEach(() => { + afterEach(async () => { jest.clearAllMocks(); + await new Promise((resolve) => setTimeout(resolve, 500)); // wait for error logs to cleanup }); - test.skip("should create specific indexTypes for the requested context providers", async () => { + test("should create specific indexTypes for the requested context providers", async () => { mockConfig.contextProviders = [ { description: { @@ -774,7 +775,7 @@ describe("CodebaseIndexer", () => { expect(indexes[1].artifactId).toBe("codeSnippets"); }); - test.skip("should handle duplicate contexts", async () => { + test("should handle duplicate contexts", async () => { mockConfig.contextProviders = [ { description: { From 050078fa5cb14d8af4ae986b0e1c4b8e61811af2 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:21:11 +0530 Subject: [PATCH 14/99] rerun tests --- core/indexing/CodebaseIndexer.test.ts | 157 +++++++++++++------------- 1 file changed, 79 insertions(+), 78 deletions(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index b9c24519a..16671861a 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -709,96 +709,97 @@ describe("CodebaseIndexer", () => { ]); }); }); - }); - describe("getIndexesToBuild", () => { - let indexer: CodebaseIndexer; - let mockConfig: any; - let mockEmbeddingsModel: any; - let mockIdeSettings: any; + describe("getIndexesToBuild", () => { + let indexer: CodebaseIndexer; + let mockConfig: any; + let mockEmbeddingsModel: any; + let mockIdeSettings: any; - beforeEach(async () => { - indexer = new CodebaseIndexer( - testConfigHandler, - testIde, - mockMessenger as any, - false, - ); + beforeEach(async () => { + indexer = new CodebaseIndexer( + testConfigHandler, + testIde, + mockMessenger as any, + false, + ); - mockEmbeddingsModel = { - maxEmbeddingChunkSize: 1000, - model: "test-model", - provider: "test-provider", - }; + mockEmbeddingsModel = { + maxEmbeddingChunkSize: 1000, + model: "test-model", + provider: "test-provider", + }; - mockIdeSettings = { - remoteConfigServerUrl: "http://test.com", - userToken: "test-token", - }; + mockIdeSettings = { + remoteConfigServerUrl: "http://test.com", + userToken: "test-token", + }; - mockConfig = { - selectedModelByRole: { - embed: mockEmbeddingsModel, - }, - contextProviders: [], - }; - - jest.spyOn(testIde, "getIdeSettings").mockResolvedValue(mockIdeSettings); - }); - - afterEach(async () => { - jest.clearAllMocks(); - await new Promise((resolve) => setTimeout(resolve, 500)); // wait for error logs to cleanup - }); - - test("should create specific indexTypes for the requested context providers", async () => { - mockConfig.contextProviders = [ - { - description: { - dependsOnIndexing: ["chunk", "codeSnippets"], + mockConfig = { + selectedModelByRole: { + embed: mockEmbeddingsModel, }, - }, - ]; + contextProviders: [], + }; - jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ - config: mockConfig, - errors: [], - configLoadInterrupted: false, + jest + .spyOn(testIde, "getIdeSettings") + .mockResolvedValue(mockIdeSettings); }); - const indexes = (await ( - indexer as any - ).getIndexesToBuild()) as CodebaseIndex[]; - - expect(indexes).toHaveLength(2); - expect(indexes[0].artifactId).toBe("chunks"); - expect(indexes[1].artifactId).toBe("codeSnippets"); - }); - - test("should handle duplicate contexts", async () => { - mockConfig.contextProviders = [ - { - description: { - dependsOnIndexing: ["codeSnippets"], - }, - }, - { - description: { - dependsOnIndexing: ["codeSnippets"], - }, - }, - ]; - - jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ - config: mockConfig, - errors: [], - configLoadInterrupted: false, + afterEach(() => { + jest.clearAllMocks(); }); - const indexes = await (indexer as any).getIndexesToBuild(); + test("should create specific indexTypes for the requested context providers", async () => { + mockConfig.contextProviders = [ + { + description: { + dependsOnIndexing: ["chunk", "codeSnippets"], + }, + }, + ]; - expect(indexes).toHaveLength(1); - expect(indexes[0].artifactId).toBe("codeSnippets"); + jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ + config: mockConfig, + errors: [], + configLoadInterrupted: false, + }); + + const indexes = (await ( + indexer as any + ).getIndexesToBuild()) as CodebaseIndex[]; + + expect(indexes).toHaveLength(2); + expect(indexes[0].artifactId).toBe("chunks"); + expect(indexes[1].artifactId).toBe("codeSnippets"); + }); + + test("should handle duplicate contexts", async () => { + mockConfig.contextProviders = [ + { + description: { + dependsOnIndexing: ["codeSnippets"], + }, + }, + { + description: { + dependsOnIndexing: ["codeSnippets"], + }, + }, + ]; + + jest.spyOn(testConfigHandler, "loadConfig").mockResolvedValue({ + config: mockConfig, + errors: [], + configLoadInterrupted: false, + }); + + const indexes = await (indexer as any).getIndexesToBuild(); + + expect(indexes).toHaveLength(1); + expect(indexes[0].artifactId).toBe("codeSnippets"); + }); }); }); }); From cf496bb768067186fb417190f64e6dc23b64b402 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 7 Aug 2025 12:22:57 +0530 Subject: [PATCH 15/99] revert ci changes --- .github/workflows/pr-checks.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 1b4a41d87..63afde345 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -44,18 +44,17 @@ jobs: component: core include-root: true - # - name: Type check and lint - # run: | - # cd core - # npx tsc --noEmit - # npm run lint - # env: - # OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + - name: Type check and lint + run: | + cd core + npx tsc --noEmit + npm run lint + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - name: Run tests run: | cd core - npm test -- CodebaseIndexer npm test npm run vitest env: From fc2c0d2657f302e2f0d0acd312d54772d6d75e0d Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 19 Aug 2025 17:13:57 +0530 Subject: [PATCH 16/99] refreshcodebase index when indexes were changed --- core/core.ts | 20 ++++++---- core/indexing/CodebaseIndexer.test.ts | 53 +++++++++++++++++++++++++++ core/indexing/CodebaseIndexer.ts | 9 +++++ 3 files changed, 75 insertions(+), 7 deletions(-) diff --git a/core/core.ts b/core/core.ts index 1e5b2a74b..b96e27689 100644 --- a/core/core.ts +++ b/core/core.ts @@ -175,6 +175,13 @@ export class Core { } }; + this.codeBaseIndexer = new CodebaseIndexer( + this.configHandler, + this.ide, + this.messenger, + this.globalContext.get("indexingPaused"), + ); + this.configHandler.onConfigUpdate((result) => { void (async () => { const serializedResult = @@ -187,6 +194,12 @@ export class Core { selectedOrgId: this.configHandler.currentOrg?.id ?? null, }); + if (await this.codeBaseIndexer.wasIndexesChanged()) { + await this.codeBaseIndexer.refreshCodebaseIndex( + await this.ide.getWorkspaceDirs(), + ); + } + // update additional submenu context providers registered via VSCode API const additionalProviders = this.configHandler.getAdditionalSubmenuContextProviders(); @@ -198,13 +211,6 @@ export class Core { })(); }); - this.codeBaseIndexer = new CodebaseIndexer( - this.configHandler, - this.ide, - this.messenger, - this.globalContext.get("indexingPaused"), - ); - // Dev Data Logger const dataLogger = DataLogger.getInstance(); dataLogger.core = this; diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 16671861a..783202add 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -802,4 +802,57 @@ describe("CodebaseIndexer", () => { }); }); }); + + describe("wasIndexesChanged", () => { + let testIndexer: TestCodebaseIndexer; + let mockGetIndexesToBuild: jest.MockedFunction; + + beforeEach(() => { + testIndexer = new TestCodebaseIndexer( + testConfigHandler, + testIde, + mockMessenger as any, + false, + ); + + // Mock getIndexesToBuild to control what indexes should be built + mockGetIndexesToBuild = jest + .spyOn(testIndexer as any, "getIndexesToBuild") + .mockResolvedValue([]); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + test("should return true when indexes to build differ from built indexes", async () => { + const mockIndex1 = new TestCodebaseIndex(); + const mockIndex2 = new TestCodebaseIndex(); + mockGetIndexesToBuild.mockResolvedValue([mockIndex1]); + (testIndexer as any).builtIndexes = [mockIndex2]; + + const result = await testIndexer.wasIndexesChanged(); + expect(result).toBe(true); + }); + + test("should return true when there are more indexes to build than built indexes", async () => { + const mockIndex1 = new TestCodebaseIndex(); + const mockIndex2 = new TestCodebaseIndex(); + mockGetIndexesToBuild.mockResolvedValue([mockIndex1, mockIndex2]); + (testIndexer as any).builtIndexes = [mockIndex1]; + + const result = await testIndexer.wasIndexesChanged(); + expect(result).toBe(true); + }); + + test("should return false when there are fewer indexes to build than built indexes", async () => { + const mockIndex1 = new TestCodebaseIndex(); + const mockIndex2 = new TestCodebaseIndex(); + mockGetIndexesToBuild.mockResolvedValue([mockIndex1]); + (testIndexer as any).builtIndexes = [mockIndex1, mockIndex2]; + + const result = await testIndexer.wasIndexesChanged(); + expect(result).toBe(false); + }); + }); }); diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index 585261c3a..072755b61 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -61,6 +61,7 @@ export class CodebaseIndexer { private indexingCancellationController: AbortController; private codebaseIndexingState: IndexingProgressUpdate; private readonly pauseToken: PauseToken; + private builtIndexes: CodebaseIndex[] = []; private getUserFriendlyIndexName(artifactId: string): string { if (artifactId === FullTextSearchCodebaseIndex.artifactId) @@ -208,6 +209,7 @@ export class CodebaseIndexer { } } + this.builtIndexes = indexes; return indexes; } @@ -722,6 +724,13 @@ export class CodebaseIndexer { } } + public async wasIndexesChanged() { + const indexes = await this.getIndexesToBuild(); + return !indexes.every((index) => + this.builtIndexes.some((builtIndex) => builtIndex === index), + ); + } + public async refreshCodebaseIndex(paths: string[]) { if (!this.indexingCancellationController.signal.aborted) { this.indexingCancellationController.abort(); From 660bda004bd167b8f71464125b03f359ed91128f Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Wed, 20 Aug 2025 08:58:47 +0530 Subject: [PATCH 17/99] check equality for artifact id --- core/indexing/CodebaseIndexer.test.ts | 7 ++++--- core/indexing/CodebaseIndexer.ts | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 783202add..a49cca85d 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -21,6 +21,7 @@ import CodebaseContextProvider from "../context/providers/CodebaseContextProvide import { ContinueConfig } from "../index.js"; import { localPathToUri } from "../util/pathToUri.js"; import { CodebaseIndexer } from "./CodebaseIndexer.js"; +import { FullTextSearchCodebaseIndex } from "./FullTextSearchCodebaseIndex.js"; import { getComputeDeleteAddRemove } from "./refreshIndex.js"; import { TestCodebaseIndex } from "./TestCodebaseIndex.js"; import { CodebaseIndex } from "./types.js"; @@ -827,7 +828,7 @@ describe("CodebaseIndexer", () => { test("should return true when indexes to build differ from built indexes", async () => { const mockIndex1 = new TestCodebaseIndex(); - const mockIndex2 = new TestCodebaseIndex(); + const mockIndex2 = new FullTextSearchCodebaseIndex(); mockGetIndexesToBuild.mockResolvedValue([mockIndex1]); (testIndexer as any).builtIndexes = [mockIndex2]; @@ -837,7 +838,7 @@ describe("CodebaseIndexer", () => { test("should return true when there are more indexes to build than built indexes", async () => { const mockIndex1 = new TestCodebaseIndex(); - const mockIndex2 = new TestCodebaseIndex(); + const mockIndex2 = new FullTextSearchCodebaseIndex(); mockGetIndexesToBuild.mockResolvedValue([mockIndex1, mockIndex2]); (testIndexer as any).builtIndexes = [mockIndex1]; @@ -847,7 +848,7 @@ describe("CodebaseIndexer", () => { test("should return false when there are fewer indexes to build than built indexes", async () => { const mockIndex1 = new TestCodebaseIndex(); - const mockIndex2 = new TestCodebaseIndex(); + const mockIndex2 = new FullTextSearchCodebaseIndex(); mockGetIndexesToBuild.mockResolvedValue([mockIndex1]); (testIndexer as any).builtIndexes = [mockIndex1, mockIndex2]; diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index 072755b61..266c7ddcc 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -727,7 +727,9 @@ export class CodebaseIndexer { public async wasIndexesChanged() { const indexes = await this.getIndexesToBuild(); return !indexes.every((index) => - this.builtIndexes.some((builtIndex) => builtIndex === index), + this.builtIndexes.some( + (builtIndex) => builtIndex.artifactId === index.artifactId, + ), ); } From 1009a06c46f4c827fd3923662283c3318403f478 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:54:22 +0530 Subject: [PATCH 18/99] fix: context items dialog not visible on conversation compaction --- gui/src/pages/gui/Chat.tsx | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 383b87357..4be689dae 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -288,19 +288,17 @@ export function Chat() { if (message.role === "user") { return ( -
- - sendInput(editorState, modifiers, index) - } - isLastUserInput={isLastUserInput(index)} - isMainInput={false} - editorState={editorState} - contextItems={contextItems} - appliedRules={appliedRules} - inputId={message.id} - /> -
+ + sendInput(editorState, modifiers, index) + } + isLastUserInput={isLastUserInput(index)} + isMainInput={false} + editorState={editorState} + contextItems={contextItems} + appliedRules={appliedRules} + inputId={message.id} + /> ); } From b5e68d206052c240d69f9f4d90b5173fececdbc2 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 26 Aug 2025 18:33:11 +0530 Subject: [PATCH 19/99] fix: close drag over message overlay during onDrop --- gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx index 944caa051..82a934f41 100644 --- a/gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx @@ -204,6 +204,7 @@ export function TipTapEditor(props: TipTapEditorProps) { setShowDragOverMsg(true); }} onDrop={(event) => { + setShowDragOverMsg(false); if ( !defaultModel || !modelSupportsImages( @@ -215,7 +216,6 @@ export function TipTapEditor(props: TipTapEditorProps) { ) { return; } - setShowDragOverMsg(false); let file = event.dataTransfer.files[0]; void handleImageFile(ideMessenger, file).then((result) => { if (!editor) { From 6f9102155040ffa95a87d329f06e95e9b63087a6 Mon Sep 17 00:00:00 2001 From: Hernan Date: Wed, 27 Aug 2025 08:51:52 +0000 Subject: [PATCH 20/99] Add stdout console log when package fails to build (build-packages.js) --- scripts/build-packages.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-packages.js b/scripts/build-packages.js index 996323f8a..969641d8a 100644 --- a/scripts/build-packages.js +++ b/scripts/build-packages.js @@ -34,6 +34,7 @@ function runCommand(command, cwd, packageName) { } else { console.error(`❌ ${packageName}: ${command} failed with code ${code}`); console.error(`stderr: ${stderr}`); + console.error(`stdout: ${stdout}`); reject( new Error(`${packageName} failed: ${command} (exit code ${code})`), ); From 472c00f27cfdcd01aac12808424ba37b5590898f Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Fri, 29 Aug 2025 11:06:21 +0200 Subject: [PATCH 21/99] fix: prevent AUTODETECT model from being queried on Ollama Signed-off-by: Fred Bricon --- core/llm/llms/Ollama.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index d08bf7bc6..1d069ff71 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -150,7 +150,7 @@ class Ollama extends BaseLLM implements ModelInstaller { constructor(options: LLMOptions) { super(options); - if (options.isFromAutoDetect) { + if (options.model === "AUTODETECT") { return; } const headers: Record = { From e15595d7eac4aefff0a197d3452bec8541792ba8 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 29 Aug 2025 19:19:54 +0530 Subject: [PATCH 22/99] fix: update claude models in getting started --- gui/src/pages/AddNewModel/configs/models.ts | 35 ++++++------------- .../pages/AddNewModel/configs/providers.ts | 7 +--- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index be50ef6f5..9ae8e4142 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -1184,42 +1184,27 @@ export const models: { [key: string]: ModelPackage } = { icon: "openai.png", isOpenSource: false, }, - claude35Sonnet: { - title: "Claude 3.5 Sonnet", + claude4Sonnet: { + title: "Claude 4 Sonnet", description: - "Anthropic's most intelligent model, but much less expensive than Claude 3 Opus", + "The most intelligent model in the Claude 4 series. Costing lesser than Claude 4 Opus.", params: { - model: "claude-3-5-sonnet-latest", + model: "claude-4-sonnet-latest", contextLength: 200_000, - title: "Claude 3.5 Sonnet", + title: "Claude 4 Sonnet", apiKey: "", }, providerOptions: ["anthropic", "askSage"], icon: "anthropic.png", isOpenSource: false, }, - claude3Opus: { - title: "Claude 3 Opus", - description: - "The most capable model in the Claude 3 series, beating GPT-4 on many benchmarks", + claude41Opus: { + title: "Claude 4.1 Opus", + description: "The most capable model in the Claude 4 series", params: { - model: "claude-3-opus-20240229", + model: "claude-opus-4-1-20250805", contextLength: 200_000, - title: "Claude 3 Opus", - apiKey: "", - }, - providerOptions: ["anthropic", "askSage"], - icon: "anthropic.png", - isOpenSource: false, - }, - claude3Sonnet: { - title: "Claude 3 Sonnet", - description: - "The second most capable model in the Claude 3 series: ideal balance of intelligence and speed", - params: { - model: "claude-3-sonnet-20240229", - contextLength: 200_000, - title: "Claude 3 Sonnet", + title: "Claude 4.1 Opus", apiKey: "", }, providerOptions: ["anthropic", "askSage"], diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 071f96be9..a2d7b3356 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -107,12 +107,7 @@ export const providers: Partial> = { defaultValue: 100000, }, ], - packages: [ - models.claude35Sonnet, - models.claude3Opus, - models.claude3Sonnet, - models.claude35Haiku, - ], + packages: [models.claude4Sonnet, models.claude41Opus, models.claude35Haiku], apiKeyUrl: "https://console.anthropic.com/account/keys", }, moonshot: { From e24e2b8acf798769bc3773b5995737d9e0681d13 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 31 Aug 2025 16:40:13 -0700 Subject: [PATCH 23/99] cai: workflow to auto-fix tests (disabled for now) --- .github/workflows/auto-fix-failed-tests.yml | 170 ++++++++++++++ .../workflows/respond-to-cubic-dev-ai.yml | 215 ------------------ 2 files changed, 170 insertions(+), 215 deletions(-) create mode 100644 .github/workflows/auto-fix-failed-tests.yml delete mode 100644 extensions/cli/.github/workflows/respond-to-cubic-dev-ai.yml diff --git a/.github/workflows/auto-fix-failed-tests.yml b/.github/workflows/auto-fix-failed-tests.yml new file mode 100644 index 000000000..54da990b7 --- /dev/null +++ b/.github/workflows/auto-fix-failed-tests.yml @@ -0,0 +1,170 @@ +name: Auto Fix Failed Tests + +on: + workflow_run: + workflows: ["PR Checks", "CLI PR Checks"] + types: + - completed + +permissions: + contents: write + pull-requests: write + issues: write + actions: read + +jobs: + fix-failed-tests: + # Only run if the workflow failed + # DISABLED: Remove 'false && ' on the next line to enable auto-fixing + if: false && github.event.workflow_run.conclusion == 'failure' + runs-on: ubuntu-latest + + steps: + - name: Get workflow run details + id: workflow-details + uses: actions/github-script@v7 + with: + script: | + const workflowRun = context.payload.workflow_run; + const { data: jobs } = await github.rest.actions.listJobsForWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: workflowRun.id + }); + + // Find all failed jobs since we're only monitoring specific test workflows + const failedJobs = jobs.jobs.filter(job => job.conclusion === 'failure'); + + if (failedJobs.length === 0) { + core.info('No failed jobs found'); + return null; + } + + core.setOutput('has_failed_tests', 'true'); + core.setOutput('workflow_name', workflowRun.name); + core.setOutput('workflow_run_id', workflowRun.id); + core.setOutput('head_branch', workflowRun.head_branch); + core.setOutput('head_sha', workflowRun.head_sha); + core.setOutput('failed_jobs', JSON.stringify(failedJobs.map(j => j.name))); + + return failedJobs; + + - name: Get job logs for failed tests + if: steps.workflow-details.outputs.has_failed_tests == 'true' + id: get-logs + uses: actions/github-script@v7 + with: + script: | + const workflowRunId = ${{ github.event.workflow_run.id }}; + const { data: jobs } = await github.rest.actions.listJobsForWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: workflowRunId + }); + + let errorLogs = ''; + + for (const job of jobs.jobs) { + if (job.conclusion === 'failure') { + try { + const { data: logData } = await github.rest.actions.downloadJobLogsForWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + job_id: job.id + }); + + errorLogs += `\n\n=== Job: ${job.name} ===\n`; + errorLogs += logData; + } catch (error) { + core.warning(`Could not fetch logs for job ${job.name}: ${error.message}`); + } + } + } + + // Store logs in environment file for next step + const fs = require('fs'); + fs.writeFileSync('/tmp/test_failure_logs.txt', errorLogs); + + core.setOutput('has_logs', errorLogs.length > 0 ? 'true' : 'false'); + + - name: Checkout repository + if: steps.workflow-details.outputs.has_failed_tests == 'true' + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + ref: ${{ steps.workflow-details.outputs.head_sha }} + + - name: Setup Node.js + if: steps.workflow-details.outputs.has_failed_tests == 'true' + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install Continue CLI globally + if: steps.workflow-details.outputs.has_failed_tests == 'true' + run: npm i -g @continuedev/cli + + - name: Start remote session to fix failed tests + if: steps.workflow-details.outputs.has_failed_tests == 'true' + id: remote-session + env: + CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} + run: | + # Create a detailed prompt for fixing the failed tests + cat > /tmp/fix_tests_prompt.txt << 'PROMPT_EOF' + 🔧 **Auto Test Fix Request** + + The following tests failed in workflow "${{ steps.workflow-details.outputs.workflow_name }}" (Run ID: ${{ steps.workflow-details.outputs.workflow_run_id }}): + + **Failed Jobs:** ${{ steps.workflow-details.outputs.failed_jobs }} + **Branch:** ${{ steps.workflow-details.outputs.head_branch }} + **Commit:** ${{ steps.workflow-details.outputs.head_sha }} + + **Your Task:** + 1. Analyze the test failure logs and error messages + 2. Identify the root cause of the test failures + 3. Fix the failing tests by updating the test code or the underlying implementation + 4. Ensure all tests pass after your changes + 5. Commit your fixes with a descriptive message + + **Test Failure Context:** + Please examine the repository structure, run the failing tests locally to understand the errors, and implement appropriate fixes. + + Focus on: + - Understanding what the tests are trying to validate + - Identifying why they're failing (code changes, environment issues, test logic errors) + - Making minimal, targeted fixes that address the root cause + - Ensuring the fixes don't break other functionality + + Please start by examining the failing tests and their error messages, then proceed with the necessary fixes. + PROMPT_EOF + + echo "Starting Continue CLI remote session for test fixes..." + echo "Prompt content:" + cat /tmp/fix_tests_prompt.txt + + # Start remote session and capture JSON output + SESSION_OUTPUT=$(cat /tmp/fix_tests_prompt.txt | cn remote -s --branch ${{ steps.workflow-details.outputs.head_branch }}) + echo "Raw session output: $SESSION_OUTPUT" + + # Extract URL from JSON output + SESSION_URL=$(echo "$SESSION_OUTPUT" | jq -r '.url // empty') + + if [ -z "$SESSION_URL" ] || [ "$SESSION_URL" = "null" ]; then + echo "Failed to extract session URL from output: $SESSION_OUTPUT" + exit 1 + fi + + echo "session_url=$SESSION_URL" >> $GITHUB_OUTPUT + echo "✅ Started remote session: $SESSION_URL" + + - name: Log session details + if: steps.workflow-details.outputs.has_failed_tests == 'true' + run: | + echo "✅ Successfully started auto-fix session for failed tests" + echo "Workflow: ${{ steps.workflow-details.outputs.workflow_name }}" + echo "Run ID: ${{ steps.workflow-details.outputs.workflow_run_id }}" + echo "Branch: ${{ steps.workflow-details.outputs.head_branch }}" + echo "Session URL: ${{ steps.remote-session.outputs.session_url }}" + echo "Failed jobs: ${{ steps.workflow-details.outputs.failed_jobs }}" diff --git a/extensions/cli/.github/workflows/respond-to-cubic-dev-ai.yml b/extensions/cli/.github/workflows/respond-to-cubic-dev-ai.yml deleted file mode 100644 index 5d3f40c56..000000000 --- a/extensions/cli/.github/workflows/respond-to-cubic-dev-ai.yml +++ /dev/null @@ -1,215 +0,0 @@ -name: Respond to @continuedev Comments - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - -permissions: - contents: write - pull-requests: write - issues: write - -jobs: - respond-to-comment: - # Only run on pull request comments - if: github.event_name == 'issue_comment' && github.event.issue.pull_request - runs-on: ubuntu-latest - - steps: - - name: Check if comment contains @continuedev - id: check-mention - run: | - if echo "${{ github.event.comment.body }}" | grep -q "@continuedev"; then - echo "contains_mention=true" >> $GITHUB_OUTPUT - else - echo "contains_mention=false" >> $GITHUB_OUTPUT - fi - - - name: Checkout PR branch - if: steps.check-mention.outputs.contains_mention == 'true' - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - - name: Get PR information - if: steps.check-mention.outputs.contains_mention == 'true' - id: pr-info - uses: actions/github-script@v7 - with: - script: | - const { data: pr } = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number - }); - - core.setOutput('head_ref', pr.head.ref); - core.setOutput('head_sha', pr.head.sha); - return pr; - - - name: Checkout PR branch - if: steps.check-mention.outputs.contains_mention == 'true' - run: | - git checkout ${{ steps.pr-info.outputs.head_ref }} - - - name: Setup Node.js - if: steps.check-mention.outputs.contains_mention == 'true' - uses: actions/setup-node@v4 - with: - node-version: "20" - - - name: Install Continue CLI globally - if: steps.check-mention.outputs.contains_mention == 'true' - run: npm i -g @continuedev/cli - - - name: Start remote session - if: steps.check-mention.outputs.contains_mention == 'true' - id: remote-session - env: - CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} - run: | - # Create the prompt for remote session - PROMPT="Please help with the following request from @${{ github.event.comment.user.login }} on PR #${{ github.event.issue.number }}: - - ${{ github.event.comment.body }} - - Please analyze the current PR, understand the request, implement the necessary changes, and commit them to this branch." - - # Start remote session and capture JSON output - SESSION_OUTPUT=$(echo "$PROMPT" | cn remote -s --branch ${{ steps.pr-info.outputs.head_ref }}) - echo "Raw session output: $SESSION_OUTPUT" - - # Extract URL from JSON output - SESSION_URL=$(echo "$SESSION_OUTPUT" | jq -r '.url // empty') - - if [ -z "$SESSION_URL" ] || [ "$SESSION_URL" = "null" ]; then - echo "Failed to extract session URL from output: $SESSION_OUTPUT" - exit 1 - fi - - echo "session_url=$SESSION_URL" >> $GITHUB_OUTPUT - echo "✅ Started remote session: $SESSION_URL" - - - name: Comment with session URL - if: steps.check-mention.outputs.contains_mention == 'true' && steps.remote-session.outputs.session_url - uses: actions/github-script@v7 - with: - script: | - const commentBody = `I've started [a remote session](${{ steps.remote-session.outputs.session_url }}) to help with your request: - > ${{ github.event.comment.body }}`; - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: commentBody - }); - - - name: Log session details - if: steps.check-mention.outputs.contains_mention == 'true' - run: | - echo "✅ Successfully started remote session for comment from ${{ github.event.comment.user.login }} on PR #${{ github.event.issue.number }}" - echo "Session URL: ${{ steps.remote-session.outputs.session_url }}" - echo "Original comment: ${{ github.event.comment.body }}" - - respond-to-review-comment: - # Only run on pull request review comments - if: github.event_name == 'pull_request_review_comment' - runs-on: ubuntu-latest - - steps: - - name: Check if comment contains @continuedev - id: check-mention - run: | - if echo "${{ github.event.comment.body }}" | grep -q "@continuedev"; then - echo "contains_mention=true" >> $GITHUB_OUTPUT - else - echo "contains_mention=false" >> $GITHUB_OUTPUT - fi - - - name: Checkout PR branch - if: steps.check-mention.outputs.contains_mention == 'true' - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref }} - - - name: Setup Node.js - if: steps.check-mention.outputs.contains_mention == 'true' - uses: actions/setup-node@v4 - with: - node-version: "20" - - - name: Install Continue CLI globally - if: steps.check-mention.outputs.contains_mention == 'true' - run: npm i -g @continuedev/cli - - - name: Start remote session - if: steps.check-mention.outputs.contains_mention == 'true' - id: remote-session - env: - CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} - run: | - # Create a temporary file for the prompt to handle special characters and newlines properly - cat > /tmp/prompt.txt << 'PROMPT_EOF' - Please help with the following code review comment from @${{ github.event.comment.user.login }} on PR #${{ github.event.pull_request.number }}: - - **File:** ${{ github.event.comment.path }} - **Line:** ${{ github.event.comment.line || github.event.comment.original_line || 'N/A' }} - **Comment:** ${{ github.event.comment.body }} - - Please analyze the specific file and line mentioned, understand the review feedback, implement the necessary changes, and commit them to this branch. - PROMPT_EOF - - # Debug output - echo "PROMPT content:" - cat /tmp/prompt.txt - - # Start remote session and capture JSON output - echo "Starting cn with prompt..." - SESSION_OUTPUT=$(cat /tmp/prompt.txt | cn remote -s --branch ${{ github.event.pull_request.head.ref }}) - echo "Raw session output: $SESSION_OUTPUT" - - # Extract URL from JSON output - SESSION_URL=$(echo "$SESSION_OUTPUT" | jq -r '.url // empty') - - if [ -z "$SESSION_URL" ] || [ "$SESSION_URL" = "null" ]; then - echo "Failed to extract session URL from output: $SESSION_OUTPUT" - exit 1 - fi - - echo "session_url=$SESSION_URL" >> $GITHUB_OUTPUT - echo "✅ Started remote session: $SESSION_URL" - - - name: Comment with session URL - if: steps.check-mention.outputs.contains_mention == 'true' && steps.remote-session.outputs.session_url - uses: actions/github-script@v7 - with: - script: | - const commentBody = `I've started [a remote session](${{ steps.remote-session.outputs.session_url }}) to help with your request: - > ${{ github.event.comment.body }}`; - - const commentParams = { - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: ${{ github.event.pull_request.number }}, - body: commentBody, - commit_id: '${{ github.event.pull_request.head.sha }}', - path: '${{ github.event.comment.path }}', - in_reply_to: ${{ github.event.comment.id }} - }; - - await github.rest.pulls.createReviewComment(commentParams); - - - name: Log session details - if: steps.check-mention.outputs.contains_mention == 'true' - run: | - echo "✅ Successfully started remote session for review comment from ${{ github.event.comment.user.login }} on PR #${{ github.event.pull_request.number }}" - echo "Session URL: ${{ steps.remote-session.outputs.session_url }}" - echo "File: ${{ github.event.comment.path }}" - echo "Line: ${{ github.event.comment.line }}" - echo "Original comment: ${{ github.event.comment.body }}" From 8c8efd7ed1f2382469495f92f9dd2f71fb8be290 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 2 Sep 2025 23:24:11 +0530 Subject: [PATCH 24/99] feat(cli): skip telemetry if there is no internet connection --- .../cli/src/telemetry/posthogService.ts | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/extensions/cli/src/telemetry/posthogService.ts b/extensions/cli/src/telemetry/posthogService.ts index 22c2beb0f..0dd5691b5 100644 --- a/extensions/cli/src/telemetry/posthogService.ts +++ b/extensions/cli/src/telemetry/posthogService.ts @@ -1,3 +1,4 @@ +import dns from "dns/promises"; import os from "node:os"; import node_machine_id from "node-machine-id"; @@ -15,13 +16,36 @@ export class PosthogService { this.uniqueId = this.getEventUserId(); } + private _hasInternetConnection: boolean | undefined = undefined; + private async hasInternetConnection() { + const refetchConnection = async () => { + try { + await dns.lookup("app.posthog.com"); + this._hasInternetConnection = true; + } catch { + this._hasInternetConnection = false; + } + }; + + if (typeof this._hasInternetConnection !== "undefined") { + void refetchConnection(); // check in background if connection became available + return this._hasInternetConnection; + } + + await refetchConnection(); + return this._hasInternetConnection; + } + get isEnabled() { return process.env.CONTINUE_CLI_ENABLE_TELEMETRY !== "0"; } private _client: PostHogType | undefined; private async getClient() { - if (this.isEnabled) { + if (!(await this.hasInternetConnection())) { + this._client = undefined; + logger.warn("No internet connection, skipping telemetry"); + } else if (this.isEnabled) { if (!this._client) { const { PostHog } = await import("posthog-node"); this._client = new PostHog( @@ -30,6 +54,7 @@ export class PosthogService { host: "https://app.posthog.com", }, ); + logger.debug("Initialized telemetry"); } } else { this._client = undefined; @@ -83,7 +108,13 @@ export class PosthogService { try { const client = await this.getClient(); if (client) { - await client.shutdown(); + // Set a timeout for shutdown to prevent hanging + const shutdownPromise = client.shutdown(); + const timeoutPromise = new Promise((_, reject) => + setTimeout(() => reject(new Error("Shutdown timeout")), 5000), + ); + + await Promise.race([shutdownPromise, timeoutPromise]); } } catch (e) { logger.debug(`Failed to shutdown PostHog client: ${e}`); From 5fce82dfd2046055ed61642b2602879274c5eff2 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 14:58:06 -0700 Subject: [PATCH 25/99] feat: show git branch if available --- extensions/cli/spec/tui.md | 15 ++ .../cli/src/e2e/git-branch-display.test.ts | 226 ++++++++++++++++++ extensions/cli/src/ui/TUIChat.tsx | 4 +- extensions/cli/src/ui/UpdateNotification.tsx | 6 +- .../cli/src/ui/components/BottomStatusBar.tsx | 9 +- .../ui/components/ResponsiveRepoDisplay.tsx | 35 +++ .../cli/src/ui/hooks/useTUIChatHooks.test.ts | 106 ++++++++ .../cli/src/ui/hooks/useTUIChatHooks.ts | 102 +++++++- extensions/cli/src/util/git.test.ts | 11 +- extensions/cli/src/util/git.ts | 17 ++ 10 files changed, 508 insertions(+), 23 deletions(-) create mode 100644 extensions/cli/spec/tui.md create mode 100644 extensions/cli/src/e2e/git-branch-display.test.ts create mode 100644 extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx create mode 100644 extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts diff --git a/extensions/cli/spec/tui.md b/extensions/cli/spec/tui.md new file mode 100644 index 000000000..a127661db --- /dev/null +++ b/extensions/cli/spec/tui.md @@ -0,0 +1,15 @@ +# Continue CLI Terminal UI spec + +This spec is incomplete. + +## Stack + +The Continue CLI uses Ink as a react TUI library. + +## cwd/git display + +The lower left corner of the TUI should display + +- the current git branch if in a git repo +- also the current owner/repo if enough columns are available to display and it's a gh repo +- if not in git, the cwd diff --git a/extensions/cli/src/e2e/git-branch-display.test.ts b/extensions/cli/src/e2e/git-branch-display.test.ts new file mode 100644 index 000000000..90541d0fe --- /dev/null +++ b/extensions/cli/src/e2e/git-branch-display.test.ts @@ -0,0 +1,226 @@ +import { execSync } from "child_process"; +import fs from "fs/promises"; +import path from "path"; +import { describe, it, expect, beforeEach, afterEach } from "vitest"; + +import { + createTestContext, + cleanupTestContext, + runCLI, + createTestConfig, + type CLITestContext, +} from "../test-helpers/cli-helpers.js"; + +describe("E2E: Git Branch Display", () => { + let context: CLITestContext; + let originalCwd: string; + + const testConfig = `name: Test Assistant +version: 1.0.0 +schema: v1 +models: + - model: gpt-4 + provider: openai + apiKey: test-key + roles: + - chat`; + + beforeEach(async () => { + context = await createTestContext(); + originalCwd = process.cwd(); + }); + + afterEach(async () => { + await cleanupTestContext(context); + process.chdir(originalCwd); + }); + + describe("git branch display in status bar", () => { + it("should show branch name when in a git repository", async () => { + // Initialize a git repo in the test directory + process.chdir(context.testDir); + + try { + // Initialize git repo + execSync("git init", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.name 'Test User'", { stdio: "ignore" }); + + // Create a test file and initial commit + await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + execSync("git add .", { stdio: "ignore" }); + execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); + + // Create and checkout a test branch + const testBranchName = "feature/test-branch"; + execSync(`git checkout -b ${testBranchName}`, { stdio: "ignore" }); + + // Create config file + await createTestConfig(context, testConfig); + + // Run CLI in TUI mode - it should fail quickly but show the branch in output + const result = await runCLI(context, { + args: ["--config", context.configPath!, "--help"], + timeout: 3000, + }); + + // The help command should succeed + expect(result.exitCode).toBe(0); + expect(result.stdout).toContain("Continue CLI"); + + // Now let's test that our git utils work in this context + // We can't easily test the full TUI display, but we can verify the git functions work + const { getGitBranch } = await import("../util/git.js"); + const branch = getGitBranch(); + expect(branch).toBe(testBranchName); + + } catch (error) { + // Skip test if git is not available or fails + console.warn("Skipping git branch test - git not available:", error); + return; + } + }); + + it("should handle non-git directory gracefully", async () => { + // Don't initialize git in test directory + process.chdir(context.testDir); + + await createTestConfig(context, testConfig); + + // Test that git functions return null in non-git directory + const { getGitBranch, isGitRepo } = await import("../util/git.js"); + + expect(isGitRepo()).toBe(false); + expect(getGitBranch()).toBeNull(); + + // CLI should still work without git + const result = await runCLI(context, { + args: ["--help"], + timeout: 3000, + }); + + expect(result.exitCode).toBe(0); + expect(result.stdout).toContain("Continue CLI"); + }); + + it("should handle detached HEAD state", async () => { + process.chdir(context.testDir); + + try { + // Initialize git repo + execSync("git init", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.name 'Test User'", { stdio: "ignore" }); + + // Create initial commit + await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + execSync("git add .", { stdio: "ignore" }); + execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); + + // Create another commit + await fs.writeFile(path.join(context.testDir, "test2.txt"), "test content 2"); + execSync("git add .", { stdio: "ignore" }); + execSync("git commit -m 'Second commit'", { stdio: "ignore" }); + + // Get first commit hash and checkout to detached HEAD + const firstCommit = execSync("git rev-list --reverse HEAD | head -1", { + encoding: "utf-8" + }).trim(); + execSync(`git checkout ${firstCommit}`, { stdio: "ignore" }); + + // Test git functions in detached HEAD state + const { getGitBranch, isGitRepo } = await import("../util/git.js"); + + expect(isGitRepo()).toBe(true); + // In detached HEAD state, git branch --show-current returns empty string + // which our function converts to null + expect(getGitBranch()).toBeNull(); + + } catch (error) { + // Skip test if git operations fail + console.warn("Skipping detached HEAD test - git operations failed:", error); + return; + } + }); + + it("should handle branch names with special characters", async () => { + process.chdir(context.testDir); + + try { + // Initialize git repo + execSync("git init", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.name 'Test User'", { stdio: "ignore" }); + + // Create initial commit + await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + execSync("git add .", { stdio: "ignore" }); + execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); + + // Create branch with special characters + const specialBranchName = "feature/fix-123_with-dashes.and.dots"; + execSync(`git checkout -b "${specialBranchName}"`, { stdio: "ignore" }); + + // Test git functions + const { getGitBranch } = await import("../util/git.js"); + const branch = getGitBranch(); + expect(branch).toBe(specialBranchName); + + } catch (error) { + // Skip test if git operations fail + console.warn("Skipping special characters test - git operations failed:", error); + return; + } + }); + }); + + describe("getRepoUrlText function with branch", () => { + it("should format repo URL with branch correctly", async () => { + process.chdir(context.testDir); + + try { + // Initialize git repo with remote + execSync("git init", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.name 'Test User'", { stdio: "ignore" }); + + // Add a fake remote + execSync("git remote add origin https://github.com/testuser/testrepo.git", { stdio: "ignore" }); + + // Create initial commit and branch + await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + execSync("git add .", { stdio: "ignore" }); + execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); + execSync("git checkout -b test-branch", { stdio: "ignore" }); + + // Test the formatting function + const { getResponsiveRepoText } = await import("../ui/hooks/useTUIChatHooks.js"); + const repoText = getResponsiveRepoText(); + + // Should include both repo and branch + expect(repoText).toContain("testuser/testrepo"); + expect(repoText).toContain("test-branch"); + expect(repoText).toContain("⊦"); // Branch separator icon + + } catch (error) { + // Skip test if git operations fail + console.warn("Skipping repo URL formatting test - git operations failed:", error); + return; + } + }); + + it("should handle repo URL without branch when not in git repo", async () => { + process.chdir(context.testDir); + + // Test without git repo + const { getRepoUrlText } = await import("../ui/hooks/useTUIChatHooks.js"); + const repoText = getRepoUrlText(); + + // Should not contain branch separator + expect(repoText).not.toContain("⊦"); + // Should contain the current directory path + expect(typeof repoText).toBe("string"); + expect(repoText.length).toBeGreaterThan(0); + }); + }); +}); \ No newline at end of file diff --git a/extensions/cli/src/ui/TUIChat.tsx b/extensions/cli/src/ui/TUIChat.tsx index 98c0480b7..fc534cc8e 100644 --- a/extensions/cli/src/ui/TUIChat.tsx +++ b/extensions/cli/src/ui/TUIChat.tsx @@ -26,7 +26,6 @@ import { useChat } from "./hooks/useChat.js"; import { useContextPercentage } from "./hooks/useContextPercentage.js"; import { useMessageRenderer } from "./hooks/useMessageRenderer.js"; import { - getRepoUrlText, useCurrentMode, useIntroMessage, useLoginHandlers, @@ -147,7 +146,6 @@ const TUIChat: React.FC = ({ const { services, allServicesReady, isRemoteMode } = useTUIChatServices(remoteUrl); - const repoURlText = useMemo(() => getRepoUrlText(remoteUrl), [remoteUrl]); // Use navigation context const { @@ -334,7 +332,7 @@ const TUIChat: React.FC = ({ {/* Free trial status and Continue CLI info - always show */} = ({ if (isRemoteMode) { return ◉ Remote Mode; } - return ● Continue CLI; + return ( + + ● Continue CLI + + ); } return {text}; diff --git a/extensions/cli/src/ui/components/BottomStatusBar.tsx b/extensions/cli/src/ui/components/BottomStatusBar.tsx index e0bd85a5d..817b901d6 100644 --- a/extensions/cli/src/ui/components/BottomStatusBar.tsx +++ b/extensions/cli/src/ui/components/BottomStatusBar.tsx @@ -8,10 +8,11 @@ import { UpdateNotification } from "../UpdateNotification.js"; import { ContextPercentageDisplay } from "./ContextPercentageDisplay.js"; import { ModeIndicator } from "./ModeIndicator.js"; +import { ResponsiveRepoDisplay } from "./ResponsiveRepoDisplay.js"; interface BottomStatusBarProps { currentMode: PermissionMode; - repoURLText: string; + remoteUrl?: string; isRemoteMode: boolean; services: any; navState: any; @@ -22,7 +23,7 @@ interface BottomStatusBarProps { export const BottomStatusBar: React.FC = ({ currentMode, - repoURLText, + remoteUrl, isRemoteMode, services, navState, @@ -34,9 +35,7 @@ export const BottomStatusBar: React.FC = ({ {currentMode === "normal" && ( - - {repoURLText} - + )} diff --git a/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx b/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx new file mode 100644 index 000000000..3099d77ba --- /dev/null +++ b/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx @@ -0,0 +1,35 @@ +import { Text } from "ink"; +import React, { useMemo } from "react"; + +import { getResponsiveRepoText } from "../hooks/useTUIChatHooks.js"; +import { useTerminalSize } from "../hooks/useTerminalSize.js"; + +interface ResponsiveRepoDisplayProps { + remoteUrl?: string; + reservedWidth?: number; // Width reserved for other elements in the same row +} + +export const ResponsiveRepoDisplay: React.FC = ({ + remoteUrl, +}) => { + const { columns } = useTerminalSize(); + + const repoText = useMemo(() => { + // Calculate available width for repo display + // Reserve space for margins, mode indicator, context percentage, and other UI elements + const availableWidth = Math.floor(columns / 2); + + return getResponsiveRepoText(remoteUrl, availableWidth); + }, [remoteUrl, columns]); + + // Don't render if no text to show + if (!repoText) { + return null; + } + + return ( + + {repoText} + + ); +}; diff --git a/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts b/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts new file mode 100644 index 000000000..eaed0fc21 --- /dev/null +++ b/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts @@ -0,0 +1,106 @@ +import { describe, expect, it, vi, beforeEach } from "vitest"; + +import { getResponsiveRepoText, getRepoInfo } from "./useTUIChatHooks.js"; + +// Mock the git utilities +vi.mock("../../util/git.js", () => ({ + isGitRepo: vi.fn(() => true), + getGitRemoteUrl: vi.fn(() => "https://github.com/testuser/testrepo.git"), + getGitBranch: vi.fn(() => "feature/test-branch"), +})); + +describe("Responsive repo text functionality", () => { + beforeEach(async () => { + // Reset mocks before each test + const gitModule = await import("../../util/git.js"); + vi.mocked(gitModule.isGitRepo).mockReturnValue(true); + vi.mocked(gitModule.getGitRemoteUrl).mockReturnValue("https://github.com/testuser/testrepo.git"); + vi.mocked(gitModule.getGitBranch).mockReturnValue("feature/test-branch"); + }); + describe("getRepoInfo", () => { + it("should extract repo info correctly", () => { + const info = getRepoInfo(); + + expect(info.repoName).toBe("testuser/testrepo"); + expect(info.branchName).toBe("feature/test-branch"); + expect(info.isGitRepo).toBe(true); + }); + + it("should handle remote URL override", () => { + const info = getRepoInfo("https://github.com/override/repo.git"); + + expect(info.repoName).toBe("override/repo"); + expect(info.branchName).toBe("feature/test-branch"); + expect(info.isGitRepo).toBe(true); + }); + }); + + describe("getResponsiveRepoText", () => { + it("should return empty string when no width provided", () => { + const result = getResponsiveRepoText(); + expect(result).toBe(""); + }); + + it("should return full text when width allows", () => { + const result = getResponsiveRepoText(undefined, 100); + expect(result).toBe("testuser/testrepo ⊦feature/test-branch"); + }); + + it("should prefer branch when both fit individually", () => { + // Full text: "testuser/testrepo ⊦ feature/test-branch" (38 chars) + // Repo only: "testuser/testrepo" (17 chars) + // Branch only: "feature/test-branch" (18 chars) + // With width 20, both repo and branch fit, but we prefer branch + const result = getResponsiveRepoText(undefined, 20); + expect(result).toBe("feature/test-branch"); + }); + + it("should fallback to repo when branch doesn't fit but repo does", async () => { + // Use a long branch name + const gitModule = await import("../../util/git.js"); + vi.mocked(gitModule.getGitBranch).mockReturnValue("very-long-feature-branch-name-that-wont-fit"); + + const result = getResponsiveRepoText(undefined, 20); + // Branch is too long, repo should fit + expect(result).toBe("testuser/testrepo"); + }); + + it("should return branch only when repo doesn't fit but branch does", async () => { + // When space is very limited, prefer shorter option + const gitModule = await import("../../util/git.js"); + vi.mocked(gitModule.getGitRemoteUrl).mockReturnValue("https://github.com/very-long-repo-name/testrepo.git"); + vi.mocked(gitModule.getGitBranch).mockReturnValue("main"); + + const result = getResponsiveRepoText(undefined, 10); + // "main" (4 chars) should fit, "very-long-repo-name/testrepo" won't + expect(result).toBe("main"); + }); + + it("should return empty string when nothing fits", () => { + const result = getResponsiveRepoText(undefined, 5); + expect(result).toBe(""); + }); + + it("should return empty string when width is too small", () => { + const result = getResponsiveRepoText(undefined, 2); + expect(result).toBe(""); + }); + + it("should handle non-git repos", async () => { + const gitModule = await import("../../util/git.js"); + vi.mocked(gitModule.isGitRepo).mockReturnValue(false); + vi.mocked(gitModule.getGitBranch).mockReturnValue(null); + + const result = getResponsiveRepoText("https://github.com/user/repo.git", 50); + expect(result).toBe("user/repo"); + }); + + it("should return empty string when repo name is too long in non-git scenario", async () => { + const gitModule = await import("../../util/git.js"); + vi.mocked(gitModule.isGitRepo).mockReturnValue(false); + + const result = getResponsiveRepoText("https://github.com/very-long-user/repo.git", 8); + expect(result).toBe(""); + }); + }); +}); \ No newline at end of file diff --git a/extensions/cli/src/ui/hooks/useTUIChatHooks.ts b/extensions/cli/src/ui/hooks/useTUIChatHooks.ts index 7ae87bb06..d49531111 100644 --- a/extensions/cli/src/ui/hooks/useTUIChatHooks.ts +++ b/extensions/cli/src/ui/hooks/useTUIChatHooks.ts @@ -2,31 +2,107 @@ import { useCallback, useEffect, useState } from "react"; import type { PermissionMode } from "../../permissions/types.js"; import { modeService } from "../../services/ModeService.js"; -import { getGitRemoteUrl, isGitRepo } from "../../util/git.js"; +import { getGitBranch, getGitRemoteUrl, isGitRepo } from "../../util/git.js"; import type { ConfigOption, ModelOption } from "../types/selectorTypes.js"; import { useConfigSelector } from "./useConfigSelector.js"; import { useModelSelector } from "./useModelSelector.js"; -// Helper function to get repo URL text -export function getRepoUrlText(remoteUrl?: string): string { +// Helper function to get repo info for responsive display +export function getRepoInfo(remoteUrl?: string): { + repoName: string; + branchName: string | null; + fullPath: string; + isGitRepo: boolean; +} { let url = remoteUrl ?? ""; - if (!url) { - const isGit = isGitRepo(); - if (isGit) { - const gitUrl = getGitRemoteUrl(); - if (gitUrl) { - url = gitUrl; - } + const isGit = isGitRepo(); + let branchName: string | null = null; + + if (!url && isGit) { + const gitUrl = getGitRemoteUrl(); + if (gitUrl) { + url = gitUrl; } } + if (!url) { url = process.cwd(); } - url = url.replace(/\.git$/, ""); - url = url.replace(/^(https|http):\/\/.*?\//, ""); - return url; + // Get branch info if we're in a git repo + if (isGit) { + branchName = getGitBranch(); + } + + // Clean up the URL + const cleanUrl = url + .replace(/\.git$/, "") + .replace(/^(https|http):\/\/.*?\//, ""); + + return { + repoName: cleanUrl, + branchName, + fullPath: url, + isGitRepo: isGit, + }; +} + +// Helper function to get responsive repo URL text based on available width +export function getResponsiveRepoText( + remoteUrl?: string, + availableWidth: number = 0, +): string { + const repoInfo = getRepoInfo(remoteUrl); + + // If no available width provided, return full format + if (availableWidth <= 0) { + return ""; + } + + // Calculate the minimum space needed for different display options + const branchSeparator = " ⊦"; + const branchText = repoInfo.branchName || ""; + const repoText = repoInfo.repoName; + + // Priority order for display: + // 1. repo + branch (if everything fits) + // 2. branch only (preferred when both fit individually) + // 3. repo only (fallback when branch doesn't fit) + // 4. nothing if neither fit + + if (repoInfo.isGitRepo && repoInfo.branchName) { + const fullText = `${repoText}${branchSeparator}${branchText}`; + const branchOnlyText = branchText; + const repoOnlyText = repoText; + + // If full text fits, use it + if (fullText.length <= availableWidth) { + return fullText; + } + + // Prefer branch if it fits (more immediately useful) + if (branchOnlyText.length <= availableWidth) { + return branchOnlyText; + } + + // If branch doesn't fit but repo does, use repo + if (repoOnlyText.length <= availableWidth) { + return repoOnlyText; + } + } + + // No branch or not in git repo + if (repoText.length <= availableWidth) { + return repoText; + } + + return ""; +} + +// Helper function to get repo URL text (legacy compatibility) +export function getRepoUrlText(remoteUrl?: string): string { + return getResponsiveRepoText(remoteUrl); } // Custom hook for intro message diff --git a/extensions/cli/src/util/git.test.ts b/extensions/cli/src/util/git.test.ts index 3f68085dd..03dccdb71 100644 --- a/extensions/cli/src/util/git.test.ts +++ b/extensions/cli/src/util/git.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it } from "vitest"; -import { getGitHubActionsRepoUrl, isGitHubActions } from "./git.js"; +import { getGitBranch, getGitHubActionsRepoUrl, isGitHubActions } from "./git.js"; describe("git utilities - GitHub Actions detection", () => { beforeEach(() => { @@ -74,4 +74,13 @@ describe("git utilities - GitHub Actions detection", () => { expect(result).toBe("https://git.company.com/enterprise/repo"); }); }); + + describe("getGitBranch", () => { + it("should return null when not in a git repo or when git command fails", () => { + // Since we can't easily mock git commands in this test environment, + // we just test that the function returns either a string or null + const result = getGitBranch(); + expect(typeof result === "string" || result === null).toBe(true); + }); + }); }); diff --git a/extensions/cli/src/util/git.ts b/extensions/cli/src/util/git.ts index d82c2b212..66d71f47f 100644 --- a/extensions/cli/src/util/git.ts +++ b/extensions/cli/src/util/git.ts @@ -18,6 +18,23 @@ export function getGitRemoteUrl(remote: string = "origin"): string | null { } } +/** + * Get the current git branch name + * @returns The current branch name or null if not found + */ +export function getGitBranch(): string | null { + try { + const result = execSync("git branch --show-current", { + encoding: "utf-8", + cwd: process.cwd(), + stdio: "pipe", + }); + return result.trim() || null; + } catch { + return null; + } +} + /** * Check if current directory is a git repository */ From 111d22f6308ac07239b8fdcaaedf1e4386d28055 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 18:04:40 -0700 Subject: [PATCH 26/99] chore: prettier --- .../cli/src/e2e/git-branch-display.test.ts | 133 +++++++++++------- extensions/cli/src/ui/TUIChat.tsx | 1 - .../cli/src/ui/hooks/useTUIChatHooks.test.ts | 38 +++-- extensions/cli/src/util/git.test.ts | 6 +- 4 files changed, 113 insertions(+), 65 deletions(-) diff --git a/extensions/cli/src/e2e/git-branch-display.test.ts b/extensions/cli/src/e2e/git-branch-display.test.ts index 90541d0fe..3838bbf7a 100644 --- a/extensions/cli/src/e2e/git-branch-display.test.ts +++ b/extensions/cli/src/e2e/git-branch-display.test.ts @@ -39,41 +39,45 @@ models: it("should show branch name when in a git repository", async () => { // Initialize a git repo in the test directory process.chdir(context.testDir); - + try { // Initialize git repo execSync("git init", { stdio: "ignore" }); - execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { + stdio: "ignore", + }); execSync("git config user.name 'Test User'", { stdio: "ignore" }); - + // Create a test file and initial commit - await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + await fs.writeFile( + path.join(context.testDir, "test.txt"), + "test content", + ); execSync("git add .", { stdio: "ignore" }); execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); - + // Create and checkout a test branch const testBranchName = "feature/test-branch"; execSync(`git checkout -b ${testBranchName}`, { stdio: "ignore" }); - + // Create config file await createTestConfig(context, testConfig); - + // Run CLI in TUI mode - it should fail quickly but show the branch in output const result = await runCLI(context, { args: ["--config", context.configPath!, "--help"], timeout: 3000, }); - + // The help command should succeed expect(result.exitCode).toBe(0); expect(result.stdout).toContain("Continue CLI"); - + // Now let's test that our git utils work in this context // We can't easily test the full TUI display, but we can verify the git functions work const { getGitBranch } = await import("../util/git.js"); const branch = getGitBranch(); expect(branch).toBe(testBranchName); - } catch (error) { // Skip test if git is not available or fails console.warn("Skipping git branch test - git not available:", error); @@ -84,91 +88,108 @@ models: it("should handle non-git directory gracefully", async () => { // Don't initialize git in test directory process.chdir(context.testDir); - + await createTestConfig(context, testConfig); - + // Test that git functions return null in non-git directory const { getGitBranch, isGitRepo } = await import("../util/git.js"); - + expect(isGitRepo()).toBe(false); expect(getGitBranch()).toBeNull(); - + // CLI should still work without git const result = await runCLI(context, { args: ["--help"], timeout: 3000, }); - + expect(result.exitCode).toBe(0); expect(result.stdout).toContain("Continue CLI"); }); it("should handle detached HEAD state", async () => { process.chdir(context.testDir); - + try { // Initialize git repo execSync("git init", { stdio: "ignore" }); - execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { + stdio: "ignore", + }); execSync("git config user.name 'Test User'", { stdio: "ignore" }); - + // Create initial commit - await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + await fs.writeFile( + path.join(context.testDir, "test.txt"), + "test content", + ); execSync("git add .", { stdio: "ignore" }); execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); - + // Create another commit - await fs.writeFile(path.join(context.testDir, "test2.txt"), "test content 2"); + await fs.writeFile( + path.join(context.testDir, "test2.txt"), + "test content 2", + ); execSync("git add .", { stdio: "ignore" }); execSync("git commit -m 'Second commit'", { stdio: "ignore" }); - + // Get first commit hash and checkout to detached HEAD - const firstCommit = execSync("git rev-list --reverse HEAD | head -1", { - encoding: "utf-8" + const firstCommit = execSync("git rev-list --reverse HEAD | head -1", { + encoding: "utf-8", }).trim(); execSync(`git checkout ${firstCommit}`, { stdio: "ignore" }); - + // Test git functions in detached HEAD state const { getGitBranch, isGitRepo } = await import("../util/git.js"); - + expect(isGitRepo()).toBe(true); // In detached HEAD state, git branch --show-current returns empty string // which our function converts to null expect(getGitBranch()).toBeNull(); - } catch (error) { // Skip test if git operations fail - console.warn("Skipping detached HEAD test - git operations failed:", error); + console.warn( + "Skipping detached HEAD test - git operations failed:", + error, + ); return; } }); it("should handle branch names with special characters", async () => { process.chdir(context.testDir); - + try { // Initialize git repo execSync("git init", { stdio: "ignore" }); - execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { + stdio: "ignore", + }); execSync("git config user.name 'Test User'", { stdio: "ignore" }); - + // Create initial commit - await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + await fs.writeFile( + path.join(context.testDir, "test.txt"), + "test content", + ); execSync("git add .", { stdio: "ignore" }); execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); - + // Create branch with special characters const specialBranchName = "feature/fix-123_with-dashes.and.dots"; execSync(`git checkout -b "${specialBranchName}"`, { stdio: "ignore" }); - + // Test git functions const { getGitBranch } = await import("../util/git.js"); const branch = getGitBranch(); expect(branch).toBe(specialBranchName); - } catch (error) { // Skip test if git operations fail - console.warn("Skipping special characters test - git operations failed:", error); + console.warn( + "Skipping special characters test - git operations failed:", + error, + ); return; } }); @@ -177,45 +198,57 @@ models: describe("getRepoUrlText function with branch", () => { it("should format repo URL with branch correctly", async () => { process.chdir(context.testDir); - + try { // Initialize git repo with remote execSync("git init", { stdio: "ignore" }); - execSync("git config user.email 'test@example.com'", { stdio: "ignore" }); + execSync("git config user.email 'test@example.com'", { + stdio: "ignore", + }); execSync("git config user.name 'Test User'", { stdio: "ignore" }); - + // Add a fake remote - execSync("git remote add origin https://github.com/testuser/testrepo.git", { stdio: "ignore" }); - + execSync( + "git remote add origin https://github.com/testuser/testrepo.git", + { stdio: "ignore" }, + ); + // Create initial commit and branch - await fs.writeFile(path.join(context.testDir, "test.txt"), "test content"); + await fs.writeFile( + path.join(context.testDir, "test.txt"), + "test content", + ); execSync("git add .", { stdio: "ignore" }); execSync("git commit -m 'Initial commit'", { stdio: "ignore" }); execSync("git checkout -b test-branch", { stdio: "ignore" }); - + // Test the formatting function - const { getResponsiveRepoText } = await import("../ui/hooks/useTUIChatHooks.js"); + const { getResponsiveRepoText } = await import( + "../ui/hooks/useTUIChatHooks.js" + ); const repoText = getResponsiveRepoText(); - + // Should include both repo and branch expect(repoText).toContain("testuser/testrepo"); expect(repoText).toContain("test-branch"); expect(repoText).toContain("⊦"); // Branch separator icon - } catch (error) { // Skip test if git operations fail - console.warn("Skipping repo URL formatting test - git operations failed:", error); + console.warn( + "Skipping repo URL formatting test - git operations failed:", + error, + ); return; } }); it("should handle repo URL without branch when not in git repo", async () => { process.chdir(context.testDir); - + // Test without git repo const { getRepoUrlText } = await import("../ui/hooks/useTUIChatHooks.js"); const repoText = getRepoUrlText(); - + // Should not contain branch separator expect(repoText).not.toContain("⊦"); // Should contain the current directory path @@ -223,4 +256,4 @@ models: expect(repoText.length).toBeGreaterThan(0); }); }); -}); \ No newline at end of file +}); diff --git a/extensions/cli/src/ui/TUIChat.tsx b/extensions/cli/src/ui/TUIChat.tsx index fc534cc8e..7d7dbcfa3 100644 --- a/extensions/cli/src/ui/TUIChat.tsx +++ b/extensions/cli/src/ui/TUIChat.tsx @@ -146,7 +146,6 @@ const TUIChat: React.FC = ({ const { services, allServicesReady, isRemoteMode } = useTUIChatServices(remoteUrl); - // Use navigation context const { state: navState, diff --git a/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts b/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts index eaed0fc21..c618a5834 100644 --- a/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts +++ b/extensions/cli/src/ui/hooks/useTUIChatHooks.test.ts @@ -14,13 +14,15 @@ describe("Responsive repo text functionality", () => { // Reset mocks before each test const gitModule = await import("../../util/git.js"); vi.mocked(gitModule.isGitRepo).mockReturnValue(true); - vi.mocked(gitModule.getGitRemoteUrl).mockReturnValue("https://github.com/testuser/testrepo.git"); + vi.mocked(gitModule.getGitRemoteUrl).mockReturnValue( + "https://github.com/testuser/testrepo.git", + ); vi.mocked(gitModule.getGitBranch).mockReturnValue("feature/test-branch"); }); describe("getRepoInfo", () => { it("should extract repo info correctly", () => { const info = getRepoInfo(); - + expect(info.repoName).toBe("testuser/testrepo"); expect(info.branchName).toBe("feature/test-branch"); expect(info.isGitRepo).toBe(true); @@ -28,7 +30,7 @@ describe("Responsive repo text functionality", () => { it("should handle remote URL override", () => { const info = getRepoInfo("https://github.com/override/repo.git"); - + expect(info.repoName).toBe("override/repo"); expect(info.branchName).toBe("feature/test-branch"); expect(info.isGitRepo).toBe(true); @@ -48,7 +50,7 @@ describe("Responsive repo text functionality", () => { it("should prefer branch when both fit individually", () => { // Full text: "testuser/testrepo ⊦ feature/test-branch" (38 chars) - // Repo only: "testuser/testrepo" (17 chars) + // Repo only: "testuser/testrepo" (17 chars) // Branch only: "feature/test-branch" (18 chars) // With width 20, both repo and branch fit, but we prefer branch const result = getResponsiveRepoText(undefined, 20); @@ -58,8 +60,10 @@ describe("Responsive repo text functionality", () => { it("should fallback to repo when branch doesn't fit but repo does", async () => { // Use a long branch name const gitModule = await import("../../util/git.js"); - vi.mocked(gitModule.getGitBranch).mockReturnValue("very-long-feature-branch-name-that-wont-fit"); - + vi.mocked(gitModule.getGitBranch).mockReturnValue( + "very-long-feature-branch-name-that-wont-fit", + ); + const result = getResponsiveRepoText(undefined, 20); // Branch is too long, repo should fit expect(result).toBe("testuser/testrepo"); @@ -68,9 +72,11 @@ describe("Responsive repo text functionality", () => { it("should return branch only when repo doesn't fit but branch does", async () => { // When space is very limited, prefer shorter option const gitModule = await import("../../util/git.js"); - vi.mocked(gitModule.getGitRemoteUrl).mockReturnValue("https://github.com/very-long-repo-name/testrepo.git"); + vi.mocked(gitModule.getGitRemoteUrl).mockReturnValue( + "https://github.com/very-long-repo-name/testrepo.git", + ); vi.mocked(gitModule.getGitBranch).mockReturnValue("main"); - + const result = getResponsiveRepoText(undefined, 10); // "main" (4 chars) should fit, "very-long-repo-name/testrepo" won't expect(result).toBe("main"); @@ -90,17 +96,23 @@ describe("Responsive repo text functionality", () => { const gitModule = await import("../../util/git.js"); vi.mocked(gitModule.isGitRepo).mockReturnValue(false); vi.mocked(gitModule.getGitBranch).mockReturnValue(null); - - const result = getResponsiveRepoText("https://github.com/user/repo.git", 50); + + const result = getResponsiveRepoText( + "https://github.com/user/repo.git", + 50, + ); expect(result).toBe("user/repo"); }); it("should return empty string when repo name is too long in non-git scenario", async () => { const gitModule = await import("../../util/git.js"); vi.mocked(gitModule.isGitRepo).mockReturnValue(false); - - const result = getResponsiveRepoText("https://github.com/very-long-user/repo.git", 8); + + const result = getResponsiveRepoText( + "https://github.com/very-long-user/repo.git", + 8, + ); expect(result).toBe(""); }); }); -}); \ No newline at end of file +}); diff --git a/extensions/cli/src/util/git.test.ts b/extensions/cli/src/util/git.test.ts index 03dccdb71..4ed520801 100644 --- a/extensions/cli/src/util/git.test.ts +++ b/extensions/cli/src/util/git.test.ts @@ -1,6 +1,10 @@ import { beforeEach, describe, expect, it } from "vitest"; -import { getGitBranch, getGitHubActionsRepoUrl, isGitHubActions } from "./git.js"; +import { + getGitBranch, + getGitHubActionsRepoUrl, + isGitHubActions, +} from "./git.js"; describe("git utilities - GitHub Actions detection", () => { beforeEach(() => { From c7ffe89be36056c85069d60bfdecc1833a540434 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 19:17:49 -0700 Subject: [PATCH 27/99] feat: bash mode --- extensions/cli/package-lock.json | 6 - extensions/cli/spec/bash-mode.md | 64 +++++++++++ extensions/cli/src/slashCommands.ts | 3 + .../cli/src/tools/runTerminalCommand.ts | 9 +- extensions/cli/src/ui/UserInput.tsx | 48 +++++++- .../cli/src/ui/hooks/useChat.bashMode.test.ts | 108 ++++++++++++++++++ extensions/cli/src/ui/hooks/useChat.ts | 53 +++++++++ extensions/cli/src/ui/hooks/useUserInput.ts | 3 + 8 files changed, 281 insertions(+), 13 deletions(-) create mode 100644 extensions/cli/spec/bash-mode.md create mode 100644 extensions/cli/src/ui/hooks/useChat.bashMode.test.ts diff --git a/extensions/cli/package-lock.json b/extensions/cli/package-lock.json index d52b3f219..6510bc717 100644 --- a/extensions/cli/package-lock.json +++ b/extensions/cli/package-lock.json @@ -9,12 +9,6 @@ "version": "0.0.0-dev", "license": "Apache-2.0", "dependencies": { - "@img/sharp-darwin-arm64": "^0.33.5", - "@img/sharp-darwin-x64": "^0.33.5", - "@img/sharp-linux-arm": "^0.33.5", - "@img/sharp-linux-arm64": "^0.33.5", - "@img/sharp-linux-x64": "^0.33.5", - "@img/sharp-win32-x64": "^0.33.5", "@sentry/profiling-node": "^9.43.0" }, "bin": { diff --git a/extensions/cli/spec/bash-mode.md b/extensions/cli/spec/bash-mode.md new file mode 100644 index 000000000..cbf99c9fe --- /dev/null +++ b/extensions/cli/spec/bash-mode.md @@ -0,0 +1,64 @@ +Bash Mode (CLI TUI) + +Overview +- Bash mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!). +- It is intended for quick terminal command execution without leaving the TUI. + +Activation +- Bash mode is activated when the current input (trimmed) starts with ! + - Example: "!git status" or " !ls -la" both activate Bash mode. +- Visual indicator: + - Input border color changes to yellow. + - The input prompt indicator changes to a yellow "$". + - The input placeholder includes "! for bash mode". + +Deactivation / Exiting Bash Mode +- Pressing Enter to submit the input exits bash mode immediately after submission, regardless of the command result. +- Pressing Esc when the input (trimmed) is exactly ! clears the input and exits bash mode. +- Editing the input so it no longer starts with ! also exits bash mode and restores normal input behavior. + +Interaction with other input helpers +- When in bash mode (input starts with !): + - "@" file search suggestions are disabled. + - "/" slash command UI is disabled. +- When in slash command mode (input starts with /): + - "@" file search suggestions are disabled. + +Submission behavior +- On submit (Enter) with a bash-mode input: + - The leading ! is removed and the remainder is treated as the shell command to run. + - The TUI immediately appends an assistant message representing a Bash tool call, with status set to calling, so users can see that the command is in progress. + - The bash command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated. + +Execution semantics +- The command is executed from the current working directory of the CLI process. +- The command runs in the user’s shell as a login shell: + - Unix/macOS: SHELL (or /bin/bash) invoked with -l -c "". + - Windows: powershell.exe -NoLogo -ExecutionPolicy Bypass -Command "". +- The child process stdin is detached (not connected to the TTY). This prevents the TUI from being suspended by job control. Consequences: + - Interactive commands that require stdin will not work. +- Environment variables are inherited from the parent process. Aliases/functions availability depends on the user’s shell configuration and is not guaranteed. + +Output handling +- Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success. +- If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown. +- Output is truncated to the first 5000 lines if exceeded. +- Timeout behavior: If no output is received for 30 seconds (configurable in tests), the process is terminated and the result includes a note like: + "[Command timed out after 30 seconds of no output]". + +Keyboard behaviors (summary) +- Enter: submit input. If in bash mode, exits bash mode after submission and shows the pending Bash tool call immediately. +- Shift+Enter: new line. +- Backslash (\) at end-of-line: inserts a new line (line continuation) as usual. +- Esc: if only ! (trimmed) is present, clears input and exits bash mode; otherwise cancels streaming or closes suggestions depending on context. + +Scope / Modes +- Bash mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing. + +Error handling +- Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available). + +Examples +- "!git status" → shows a Bash tool call immediately, then populates with the git status output. +- "!echo hello" → shows a Bash tool call immediately, then output "hello". +- "!some-unknown-cmd" → shows a Bash tool call immediately, then sets status to error with an error message. diff --git a/extensions/cli/src/slashCommands.ts b/extensions/cli/src/slashCommands.ts index b5dc3d9aa..1c34c58fa 100644 --- a/extensions/cli/src/slashCommands.ts +++ b/extensions/cli/src/slashCommands.ts @@ -28,6 +28,7 @@ async function handleHelp(_args: string[], _assistant: AssistantConfig) { ` ${chalk.cyan("Enter")} Submit message`, ` ${chalk.cyan("Shift+Enter")} New line`, ` ${chalk.cyan("\\")} Line continuation (at end of line)`, + ` ${chalk.cyan("!")} Bash mode - run shell commands`, "", chalk.white("Controls:"), ` ${chalk.cyan("Ctrl+C")} Clear input`, @@ -39,9 +40,11 @@ async function handleHelp(_args: string[], _assistant: AssistantConfig) { chalk.white("Special Characters:"), ` ${chalk.cyan("@")} Search and attach files for context`, ` ${chalk.cyan("/")} Access slash commands`, + ` ${chalk.cyan("!")} Execute bash commands directly`, "", chalk.white("Available Commands:"), ` Type ${chalk.cyan("/")} to see available slash commands`, + ` Type ${chalk.cyan("!")} followed by a command to execute bash directly`, ].join("\n"); posthogService.capture("useSlashCommand", { name: "help" }); return { output: helpMessage }; diff --git a/extensions/cli/src/tools/runTerminalCommand.ts b/extensions/cli/src/tools/runTerminalCommand.ts index 9aefceb9b..242ecdeea 100644 --- a/extensions/cli/src/tools/runTerminalCommand.ts +++ b/extensions/cli/src/tools/runTerminalCommand.ts @@ -17,7 +17,7 @@ function getShellCommand(command: string): { shell: string; args: string[] } { args: ["-NoLogo", "-ExecutionPolicy", "Bypass", "-Command", command], }; } else { - // Unix/macOS: Use login shell to source .bashrc/.zshrc etc. + // Unix/macOS: Just run the user's shell as a login shell const userShell = process.env.SHELL || "/bin/bash"; return { shell: userShell, args: ["-l", "-c", command] }; } @@ -60,7 +60,12 @@ The command will be executed from the current working directory: ${process.cwd() return new Promise((resolve, reject) => { // Use same shell logic as core implementation const { shell, args } = getShellCommand(command); - const child = spawn(shell, args); + const child = spawn(shell, args, { + cwd: process.cwd(), + env: process.env, + stdio: ["ignore", "pipe", "pipe"], // prevent child from reading TTY input + detached: false, + }); let stdout = ""; let stderr = ""; let timeoutId: NodeJS.Timeout; diff --git a/extensions/cli/src/ui/UserInput.tsx b/extensions/cli/src/ui/UserInput.tsx index be24ccb52..e022e3cc3 100644 --- a/extensions/cli/src/ui/UserInput.tsx +++ b/extensions/cli/src/ui/UserInput.tsx @@ -69,6 +69,7 @@ const UserInput: React.FC = ({ const [showSlashCommands, setShowSlashCommands] = useState(false); const [slashCommandFilter, setSlashCommandFilter] = useState(""); const [selectedCommandIndex, setSelectedCommandIndex] = useState(0); + const [showBashMode, setShowBashMode] = useState(false); const [showFileSearch, setShowFileSearch] = useState(false); const [fileSearchFilter, setFileSearchFilter] = useState(""); const [selectedFileIndex, setSelectedFileIndex] = useState(0); @@ -118,6 +119,18 @@ const UserInput: React.FC = ({ return nextMode; }; + // Update bash mode state based on input + const updateBashModeState = (text: string) => { + const trimmed = text.trimStart(); + const isBash = trimmed.startsWith("!"); + setShowBashMode(isBash); + if (isBash) { + // Disable other helpers while in bash mode + setShowSlashCommands(false); + setShowFileSearch(false); + } + }; + // Update slash command UI state based on input const updateSlashCommandState = (text: string, cursor: number) => { // Only show slash commands if slash is the very first character @@ -126,6 +139,9 @@ const UserInput: React.FC = ({ return; } + // When using slash commands, disable file search + setShowFileSearch(false); + const trimmedText = text.trimStart(); const beforeCursor = trimmedText.slice( 0, @@ -188,6 +204,13 @@ const UserInput: React.FC = ({ return; } + // Disable file search if we're in bash mode or slash command mode + const trimmed = text.trimStart(); + if (trimmed.startsWith("!") || trimmed.startsWith("/")) { + setShowFileSearch(false); + return; + } + // Check if we're in a file search context const beforeCursor = text.slice(0, cursor); const lastAtIndex = beforeCursor.lastIndexOf("@"); @@ -226,6 +249,7 @@ const UserInput: React.FC = ({ setFileSearchFilter(afterAt); setSelectedFileIndex(0); setShowSlashCommands(false); + setShowBashMode(false); } } }; @@ -270,6 +294,7 @@ const UserInput: React.FC = ({ setInputText(newText); setCursorPosition(newCursorPos); setShowSlashCommands(false); + setShowBashMode(false); } }; @@ -429,6 +454,7 @@ const UserInput: React.FC = ({ setInputText(""); setCursorPosition(0); setShowSlashCommands(false); + setShowBashMode(false); } return true; } @@ -454,6 +480,15 @@ const UserInput: React.FC = ({ const handleEscapeKey = (key: any): boolean => { if (!key.escape) return false; + // If only "!" is present, clear bash mode + if (inputMode && showBashMode && inputText.trim() === "!") { + textBuffer.clear(); + setInputText(""); + setCursorPosition(0); + setShowBashMode(false); + return true; + } + // Handle escape key to interrupt streaming if (isWaitingForResponse && onInterrupt) { onInterrupt(); @@ -482,6 +517,7 @@ const UserInput: React.FC = ({ setCursorPosition(0); setShowSlashCommands(false); setShowFileSearch(false); + setShowBashMode(false); inputHistory.resetNavigation(); }; @@ -493,6 +529,7 @@ const UserInput: React.FC = ({ setCursorPosition(newCursor); updateSlashCommandState(newText, newCursor); updateFileSearchState(newText, newCursor); + updateBashModeState(newText); inputHistory.resetNavigation(); }; @@ -573,14 +610,15 @@ const UserInput: React.FC = ({ setCursorPosition, updateSlashCommandState, updateFileSearchState, + updateBashModeState, inputHistory, }); }); const renderInputText = () => { const placeholderText = isRemoteMode - ? "Ask anything, / for slash commands" - : placeholder || "Ask anything, @ for context, / for slash commands"; + ? "Ask anything, / for slash commands, ! for bash mode" + : placeholder || "Ask anything, @ for context, / for slash commands, ! for bash mode"; if (inputText.length === 0) { return ( <> @@ -677,10 +715,10 @@ const UserInput: React.FC = ({ borderStyle="round" borderTop={true} paddingX={1} - borderColor={isRemoteMode ? "cyan" : "gray"} + borderColor={showBashMode ? "yellow" : isRemoteMode ? "cyan" : "gray"} > - - {isRemoteMode ? "◉" : "●"}{" "} + + {showBashMode ? "$" : isRemoteMode ? "◉" : "●"} {renderInputText()} diff --git a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts b/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts new file mode 100644 index 000000000..89105cd4e --- /dev/null +++ b/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts @@ -0,0 +1,108 @@ +import { describe, it, expect, vi, beforeEach } from "vitest"; +import { act } from "@testing-library/react"; + +import { createMinimalTestContext } from "../../test-helpers/ui-test-context.js"; + +// Mock the runTerminalCommandTool +vi.mock("../../tools/runTerminalCommand.js", () => ({ + runTerminalCommandTool: { + run: vi.fn(), + }, +})); + +import { useChat } from "./useChat.js"; +import { runTerminalCommandTool } from "../../tools/runTerminalCommand.js"; + +describe("useChat - Bash Mode", () => { + beforeEach(() => { + vi.clearAllMocks(); + }); + + it("should detect bash mode when message starts with !", async () => { + const mockRun = vi.mocked(runTerminalCommandTool.run); + mockRun.mockResolvedValue("total 5\ndrwxr-xr-x 2 user user 4096 Jan 1 12:00 .\ndrwxr-xr-x 3 user user 4096 Jan 1 12:00 .."); + + const ctx = createMinimalTestContext(); + const chat = useChat({ + assistant: { name: "test" } as any, + model: { name: "test-model" } as any, + llmApi: {} as any, + } as any); + + await act(async () => { + await chat.handleUserMessage("!ls -la"); + }); + + expect(mockRun).toHaveBeenCalledWith({ command: "ls -la" }); + + // Since history is managed by service, we just verify no exception and tool called + ctx.cleanup(); + }); + + it("should handle bash command errors", async () => { + const mockRun = vi.mocked(runTerminalCommandTool.run); + mockRun.mockRejectedValue(new Error("Command not found")); + + const chat = useChat({ + assistant: { name: "test" } as any, + model: { name: "test-model" } as any, + llmApi: {} as any, + } as any); + + await act(async () => { + await chat.handleUserMessage("!invalidcommand"); + }); + + expect(mockRun).toHaveBeenCalledWith({ command: "invalidcommand" }); + }); + + it("should not trigger bash mode for regular messages", async () => { + const mockRun = vi.mocked(runTerminalCommandTool.run); + + const chat = useChat({ + assistant: { name: "test" } as any, + model: { name: "test-model" } as any, + llmApi: {} as any, + } as any); + + await act(async () => { + await chat.handleUserMessage("Hello! How are you?"); + }); + + expect(mockRun).not.toHaveBeenCalled(); + }); + + it("should handle empty bash command", async () => { + const mockRun = vi.mocked(runTerminalCommandTool.run); + + const chat = useChat({ + assistant: { name: "test" } as any, + model: { name: "test-model" } as any, + llmApi: {} as any, + } as any); + + await act(async () => { + await chat.handleUserMessage("!"); + }); + + // Should not call the tool for empty command + expect(mockRun).not.toHaveBeenCalled(); + }); + + it("should handle bash command with leading whitespace", async () => { + const mockRun = vi.mocked(runTerminalCommandTool.run); + mockRun.mockResolvedValue("echo test output"); + + const chat = useChat({ + assistant: { name: "test" } as any, + model: { name: "test-model" } as any, + llmApi: {} as any, + } as any); + + await act(async () => { + await chat.handleUserMessage(" !echo hello"); + }); + + expect(mockRun).toHaveBeenCalledWith({ command: "echo hello" }); + }); +}); \ No newline at end of file diff --git a/extensions/cli/src/ui/hooks/useChat.ts b/extensions/cli/src/ui/hooks/useChat.ts index c62854ed4..4c6876629 100644 --- a/extensions/cli/src/ui/hooks/useChat.ts +++ b/extensions/cli/src/ui/hooks/useChat.ts @@ -339,6 +339,52 @@ export function useChat({ return false; }; + const handleBashModeProcessing = async ( + message: string, + ): Promise => { + // Handle bash mode commands (starting with !) + if (!message.trimStart().startsWith("!")) { + return message; + } + + // Extract the command after the ! + const bashCommand = message.trimStart().slice(1).trim(); + + if (!bashCommand) { + return message; // No command provided, treat as regular message + } + + // Show tool call immediately, then run asynchronously and populate result + const toolCallId = `bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; + const toolCall = { + id: toolCallId, + type: "function" as const, + function: { + name: "Bash", + arguments: JSON.stringify({ command: bashCommand }), + }, + }; + + // Add assistant message with tool call immediately + services.chatHistory.addAssistantMessage("", [toolCall as any]); + // Mark as calling for immediate UI feedback + services.chatHistory.updateToolStatus(toolCallId, "calling"); + + // Execute the bash command asynchronously - don't block UI + (async () => { + try { + const { runTerminalCommandTool } = await import("../../tools/runTerminalCommand.js"); + const result = await runTerminalCommandTool.run({ command: bashCommand }); + services.chatHistory.addToolResult(toolCallId, result, "done"); + } catch (error: any) { + const errorMessage = `Bash command failed: ${error?.message || String(error)}`; + services.chatHistory.addToolResult(toolCallId, errorMessage, "error"); + } + })(); + + return null; // Processed, no further message handling needed + }; + const handleSlashCommandProcessing = async ( message: string, ): Promise => { @@ -423,6 +469,13 @@ export function useChat({ if (handled) return; + // Handle bash mode commands (before slash commands) + const bashProcessedMessage = await handleBashModeProcessing(message); + if (bashProcessedMessage === null) { + return; // Bash command was handled and no further processing needed + } + message = bashProcessedMessage; + // Handle slash commands const processedMessage = await handleSlashCommandProcessing(message); if (processedMessage === null) { diff --git a/extensions/cli/src/ui/hooks/useUserInput.ts b/extensions/cli/src/ui/hooks/useUserInput.ts index aa99c421e..983a17d09 100644 --- a/extensions/cli/src/ui/hooks/useUserInput.ts +++ b/extensions/cli/src/ui/hooks/useUserInput.ts @@ -189,6 +189,7 @@ interface TextBufferStateOptions { setCursorPosition: (pos: number) => void; updateSlashCommandState: (text: string, cursor: number) => void; updateFileSearchState: (text: string, cursor: number) => void; + updateBashModeState: (text: string) => void; inputHistory: any; } @@ -200,6 +201,7 @@ export function updateTextBufferState(options: TextBufferStateOptions) { setCursorPosition, updateSlashCommandState, updateFileSearchState, + updateBashModeState, inputHistory, } = options; @@ -211,6 +213,7 @@ export function updateTextBufferState(options: TextBufferStateOptions) { setCursorPosition(newCursor); updateSlashCommandState(newText, newCursor); updateFileSearchState(newText, newCursor); + updateBashModeState(newText); inputHistory.resetNavigation(); } } From 684b072cbb0523a04ff9999f506c6819cc471345 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 19:20:32 -0700 Subject: [PATCH 28/99] chore: prettier --- extensions/cli/spec/bash-mode.md | 13 ++++++++++++- extensions/cli/src/ui/UserInput.tsx | 10 +++++++--- .../cli/src/ui/hooks/useChat.bashMode.test.ts | 6 ++++-- extensions/cli/src/ui/hooks/useChat.ts | 10 +++++++--- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/extensions/cli/spec/bash-mode.md b/extensions/cli/spec/bash-mode.md index cbf99c9fe..18957e0b7 100644 --- a/extensions/cli/spec/bash-mode.md +++ b/extensions/cli/spec/bash-mode.md @@ -1,23 +1,27 @@ Bash Mode (CLI TUI) Overview + - Bash mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!). - It is intended for quick terminal command execution without leaving the TUI. Activation + - Bash mode is activated when the current input (trimmed) starts with ! - - Example: "!git status" or " !ls -la" both activate Bash mode. + - Example: "!git status" or " !ls -la" both activate Bash mode. - Visual indicator: - Input border color changes to yellow. - The input prompt indicator changes to a yellow "$". - The input placeholder includes "! for bash mode". Deactivation / Exiting Bash Mode + - Pressing Enter to submit the input exits bash mode immediately after submission, regardless of the command result. - Pressing Esc when the input (trimmed) is exactly ! clears the input and exits bash mode. - Editing the input so it no longer starts with ! also exits bash mode and restores normal input behavior. Interaction with other input helpers + - When in bash mode (input starts with !): - "@" file search suggestions are disabled. - "/" slash command UI is disabled. @@ -25,12 +29,14 @@ Interaction with other input helpers - "@" file search suggestions are disabled. Submission behavior + - On submit (Enter) with a bash-mode input: - The leading ! is removed and the remainder is treated as the shell command to run. - The TUI immediately appends an assistant message representing a Bash tool call, with status set to calling, so users can see that the command is in progress. - The bash command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated. Execution semantics + - The command is executed from the current working directory of the CLI process. - The command runs in the user’s shell as a login shell: - Unix/macOS: SHELL (or /bin/bash) invoked with -l -c "". @@ -40,6 +46,7 @@ Execution semantics - Environment variables are inherited from the parent process. Aliases/functions availability depends on the user’s shell configuration and is not guaranteed. Output handling + - Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success. - If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown. - Output is truncated to the first 5000 lines if exceeded. @@ -47,18 +54,22 @@ Output handling "[Command timed out after 30 seconds of no output]". Keyboard behaviors (summary) + - Enter: submit input. If in bash mode, exits bash mode after submission and shows the pending Bash tool call immediately. - Shift+Enter: new line. - Backslash (\) at end-of-line: inserts a new line (line continuation) as usual. - Esc: if only ! (trimmed) is present, clears input and exits bash mode; otherwise cancels streaming or closes suggestions depending on context. Scope / Modes + - Bash mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing. Error handling + - Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available). Examples + - "!git status" → shows a Bash tool call immediately, then populates with the git status output. - "!echo hello" → shows a Bash tool call immediately, then output "hello". - "!some-unknown-cmd" → shows a Bash tool call immediately, then sets status to error with an error message. diff --git a/extensions/cli/src/ui/UserInput.tsx b/extensions/cli/src/ui/UserInput.tsx index e022e3cc3..3f9339fda 100644 --- a/extensions/cli/src/ui/UserInput.tsx +++ b/extensions/cli/src/ui/UserInput.tsx @@ -618,7 +618,8 @@ const UserInput: React.FC = ({ const renderInputText = () => { const placeholderText = isRemoteMode ? "Ask anything, / for slash commands, ! for bash mode" - : placeholder || "Ask anything, @ for context, / for slash commands, ! for bash mode"; + : placeholder || + "Ask anything, @ for context, / for slash commands, ! for bash mode"; if (inputText.length === 0) { return ( <> @@ -717,8 +718,11 @@ const UserInput: React.FC = ({ paddingX={1} borderColor={showBashMode ? "yellow" : isRemoteMode ? "cyan" : "gray"} > - - {showBashMode ? "$" : isRemoteMode ? "◉" : "●"} + + {showBashMode ? "$" : isRemoteMode ? "◉" : "●"} {renderInputText()} diff --git a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts b/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts index 89105cd4e..717033a04 100644 --- a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts +++ b/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts @@ -20,7 +20,9 @@ describe("useChat - Bash Mode", () => { it("should detect bash mode when message starts with !", async () => { const mockRun = vi.mocked(runTerminalCommandTool.run); - mockRun.mockResolvedValue("total 5\ndrwxr-xr-x 2 user user 4096 Jan 1 12:00 .\ndrwxr-xr-x 3 user user 4096 Jan 1 12:00 .."); + mockRun.mockResolvedValue( + "total 5\ndrwxr-xr-x 2 user user 4096 Jan 1 12:00 .\ndrwxr-xr-x 3 user user 4096 Jan 1 12:00 ..", + ); const ctx = createMinimalTestContext(); const chat = useChat({ @@ -105,4 +107,4 @@ describe("useChat - Bash Mode", () => { expect(mockRun).toHaveBeenCalledWith({ command: "echo hello" }); }); -}); \ No newline at end of file +}); diff --git a/extensions/cli/src/ui/hooks/useChat.ts b/extensions/cli/src/ui/hooks/useChat.ts index 4c6876629..5fcba19fd 100644 --- a/extensions/cli/src/ui/hooks/useChat.ts +++ b/extensions/cli/src/ui/hooks/useChat.ts @@ -349,7 +349,7 @@ export function useChat({ // Extract the command after the ! const bashCommand = message.trimStart().slice(1).trim(); - + if (!bashCommand) { return message; // No command provided, treat as regular message } @@ -373,8 +373,12 @@ export function useChat({ // Execute the bash command asynchronously - don't block UI (async () => { try { - const { runTerminalCommandTool } = await import("../../tools/runTerminalCommand.js"); - const result = await runTerminalCommandTool.run({ command: bashCommand }); + const { runTerminalCommandTool } = await import( + "../../tools/runTerminalCommand.js" + ); + const result = await runTerminalCommandTool.run({ + command: bashCommand, + }); services.chatHistory.addToolResult(toolCallId, result, "done"); } catch (error: any) { const errorMessage = `Bash command failed: ${error?.message || String(error)}`; From ac9a6f8ee41049043d853b0746646f9bb5b21f05 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 19:32:58 -0700 Subject: [PATCH 29/99] fix: eslint requirements --- extensions/cli/AGENTS.md | 5 - .../CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md | 1 - extensions/cli/spec/config-loading.md | 2 - extensions/cli/spec/onboarding.md | 1 - extensions/cli/src/ui/UserInput.tsx | 120 +++++++++++++----- .../cli/src/ui/hooks/useChat.bashMode.test.ts | 8 +- .../cli/src/ui/hooks/useChat.bashMode.ts | 51 ++++++++ extensions/cli/src/ui/hooks/useChat.ts | 51 +------- 8 files changed, 147 insertions(+), 92 deletions(-) create mode 100644 extensions/cli/src/ui/hooks/useChat.bashMode.ts diff --git a/extensions/cli/AGENTS.md b/extensions/cli/AGENTS.md index 6fe536a46..bfe1f0d39 100644 --- a/extensions/cli/AGENTS.md +++ b/extensions/cli/AGENTS.md @@ -18,30 +18,25 @@ This is a CLI tool for Continue Dev that provides an interactive AI-assisted dev ### Core Components 1. **Entry Point** (`src/index.ts`): Main CLI logic with two modes: - - **Headless mode**: Non-interactive mode for automation/CI - **TUI mode**: Terminal User Interface using Ink/React - **Standard mode**: Traditional readline-based chat interface 2. **Authentication** (`src/auth/`): WorkOS-based authentication system - - `ensureAuth.ts`: Handles authentication flow - `workos.ts`: WorkOS configuration and token management 3. **Continue SDK Integration** (`src/continueSDK.ts`): Initializes the Continue SDK client with: - - API key authentication - Assistant configuration (slug-based) - Organization support 4. **Terminal UI** (`src/ui/`): React/Ink-based TUI components - - `TUIChat.tsx`: Main chat interface component - `UserInput.tsx`: Input handling with multi-line support - `TextBuffer.ts`: Text display utilities 5. **Tools System** (`src/tools/`): Built-in development tools including: - - File operations (read, write, list) - Code search functionality - Terminal command execution diff --git a/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md b/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md index 566ebe5aa..7b9d508f5 100644 --- a/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md +++ b/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md @@ -299,7 +299,6 @@ If issues arise during migration: 1. **Streaming integration**: Most complex change - Mitigation: Extensive testing, gradual rollout 2. **Remote mode**: Different state management - - Mitigation: Test thoroughly, maintain compatibility 3. **Performance**: Large histories might cause issues diff --git a/extensions/cli/spec/config-loading.md b/extensions/cli/spec/config-loading.md index 0f474b5a7..384b19809 100644 --- a/extensions/cli/spec/config-loading.md +++ b/extensions/cli/spec/config-loading.md @@ -23,13 +23,11 @@ This document specifies the behavior of the CLI's configuration loading system, **When CLI is invoked, config source is determined in this order:** 1. **CLI `--config` Flag** (highest priority) - - File path (starts with `.`, `/`, `~`): Loads local YAML file - Assistant slug (`owner/package`): Fetches from Continue platform - Overrides any saved preferences 2. **Saved Config URI** (if no `--config` flag) - - Retrieved from authentication config - Converts `file://` URIs back to file paths - Converts `slug://` URIs back to assistant slugs diff --git a/extensions/cli/spec/onboarding.md b/extensions/cli/spec/onboarding.md index 523b9067e..9b3eaf22e 100644 --- a/extensions/cli/spec/onboarding.md +++ b/extensions/cli/spec/onboarding.md @@ -8,7 +8,6 @@ When a user first runs `cn` in interactive mode, they will be taken through "onb 1. If the --config flag is provided, load this config 2. Otherwise, we will present the user with two options: - - Log in with Continue: log them in, which will automatically create their assistant and then we can load the first assistant from the first org - Enter your Anthropic API key: let them enter the key, and then either create a ~/.continue/config.yaml with the following contents OR update the existing config.yaml to add the model diff --git a/extensions/cli/src/ui/UserInput.tsx b/extensions/cli/src/ui/UserInput.tsx index 3f9339fda..1f85011d7 100644 --- a/extensions/cli/src/ui/UserInput.tsx +++ b/extensions/cli/src/ui/UserInput.tsx @@ -19,6 +19,77 @@ import { import { SlashCommandUI } from "./SlashCommandUI.js"; import { TextBuffer } from "./TextBuffer.js"; +// Small presentational helpers to reduce cyclomatic complexity in UserInput +const InterruptedBanner: React.FC<{ wasInterrupted: boolean }> = ({ + wasInterrupted, +}) => { + if (!wasInterrupted) return null; + return ( + + ⚠ Interrupted by user - Press enter to resume + + ); +}; + +const SlashCommandsMaybe: React.FC<{ + show: boolean; + inputMode: boolean; + hideNormalUI: boolean; + isRemoteMode: boolean; + assistant?: AssistantConfig; + filter: string; + selectedIndex: number; +}> = ({ + show, + inputMode, + hideNormalUI, + isRemoteMode, + assistant, + filter, + selectedIndex, +}) => { + if (!show || !inputMode || hideNormalUI || !(isRemoteMode || assistant)) + return null; + return ( + + ); +}; + +const FileSearchMaybe: React.FC<{ + show: boolean; + inputMode: boolean; + hideNormalUI: boolean; + isRemoteMode: boolean; + filter: string; + selectedIndex: number; + onSelect: (path: string) => void | Promise; + onFilesUpdated: (files: Array<{ path: string; displayName: string }>) => void; +}> = ({ + show, + inputMode, + hideNormalUI, + isRemoteMode, + filter, + selectedIndex, + onSelect, + onFilesUpdated, +}) => { + if (!show || !inputMode || hideNormalUI || isRemoteMode) return null; + return ( + + ); +}; + interface UserInputProps { onSubmit: (message: string, imageMap?: Map) => void; isWaitingForResponse: boolean; @@ -702,14 +773,7 @@ const UserInput: React.FC = ({ return ( - {/* Interruption message - shown just above the input box */} - {wasInterrupted && ( - - - ⚠ Interrupted by user - Press enter to resume - - - )} + {/* Input box */} = ({ {renderInputText()} - {/* Slash command UI - show in remote mode OR when assistant is available */} - {showSlashCommands && - inputMode && - !hideNormalUI && - (isRemoteMode || assistant) && ( - - )} + - {/* File search UI - only show in local mode */} - {showFileSearch && inputMode && !hideNormalUI && !isRemoteMode && ( - - )} + ); }; diff --git a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts b/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts index 717033a04..43726bf09 100644 --- a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts +++ b/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts @@ -1,7 +1,10 @@ -import { describe, it, expect, vi, beforeEach } from "vitest"; import { act } from "@testing-library/react"; +import { describe, it, expect, vi, beforeEach } from "vitest"; import { createMinimalTestContext } from "../../test-helpers/ui-test-context.js"; +import { runTerminalCommandTool } from "../../tools/runTerminalCommand.js"; + +import { useChat } from "./useChat.js"; // Mock the runTerminalCommandTool vi.mock("../../tools/runTerminalCommand.js", () => ({ @@ -10,9 +13,6 @@ vi.mock("../../tools/runTerminalCommand.js", () => ({ }, })); -import { useChat } from "./useChat.js"; -import { runTerminalCommandTool } from "../../tools/runTerminalCommand.js"; - describe("useChat - Bash Mode", () => { beforeEach(() => { vi.clearAllMocks(); diff --git a/extensions/cli/src/ui/hooks/useChat.bashMode.ts b/extensions/cli/src/ui/hooks/useChat.bashMode.ts new file mode 100644 index 000000000..534f0b3b7 --- /dev/null +++ b/extensions/cli/src/ui/hooks/useChat.bashMode.ts @@ -0,0 +1,51 @@ +import { services } from "../../services/index.js"; + +export const handleBashModeProcessing = async ( + message: string, +): Promise => { + // Handle bash mode commands (starting with !) + if (!message.trimStart().startsWith("!")) { + return message; + } + + // Extract the command after the ! + const bashCommand = message.trimStart().slice(1).trim(); + + if (!bashCommand) { + return message; // No command provided, treat as regular message + } + + // Show tool call immediately, then run asynchronously and populate result + const toolCallId = `bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; + const toolCall = { + id: toolCallId, + type: "function" as const, + function: { + name: "Bash", + arguments: JSON.stringify({ command: bashCommand }), + }, + }; + + // Add assistant message with tool call immediately + services.chatHistory.addAssistantMessage("", [toolCall as any]); + // Mark as calling for immediate UI feedback + services.chatHistory.updateToolStatus(toolCallId, "calling"); + + // Execute the bash command asynchronously - don't block UI + (async () => { + try { + const { runTerminalCommandTool } = await import( + "../../tools/runTerminalCommand.js" + ); + const result = await runTerminalCommandTool.run({ + command: bashCommand, + }); + services.chatHistory.addToolResult(toolCallId, result, "done"); + } catch (error: any) { + const errorMessage = `Bash command failed: ${error?.message || String(error)}`; + services.chatHistory.addToolResult(toolCallId, errorMessage, "errored"); + } + })(); + + return null; // Processed, no further message handling needed +}; diff --git a/extensions/cli/src/ui/hooks/useChat.ts b/extensions/cli/src/ui/hooks/useChat.ts index 5fcba19fd..cc86d61fe 100644 --- a/extensions/cli/src/ui/hooks/useChat.ts +++ b/extensions/cli/src/ui/hooks/useChat.ts @@ -15,6 +15,7 @@ import { telemetryService } from "../../telemetry/telemetryService.js"; import { formatError } from "../../util/formatError.js"; import { logger } from "../../util/logger.js"; +import { handleBashModeProcessing } from "./useChat.bashMode.js"; import { handleAutoCompaction, handleCompactCommand, @@ -339,56 +340,6 @@ export function useChat({ return false; }; - const handleBashModeProcessing = async ( - message: string, - ): Promise => { - // Handle bash mode commands (starting with !) - if (!message.trimStart().startsWith("!")) { - return message; - } - - // Extract the command after the ! - const bashCommand = message.trimStart().slice(1).trim(); - - if (!bashCommand) { - return message; // No command provided, treat as regular message - } - - // Show tool call immediately, then run asynchronously and populate result - const toolCallId = `bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; - const toolCall = { - id: toolCallId, - type: "function" as const, - function: { - name: "Bash", - arguments: JSON.stringify({ command: bashCommand }), - }, - }; - - // Add assistant message with tool call immediately - services.chatHistory.addAssistantMessage("", [toolCall as any]); - // Mark as calling for immediate UI feedback - services.chatHistory.updateToolStatus(toolCallId, "calling"); - - // Execute the bash command asynchronously - don't block UI - (async () => { - try { - const { runTerminalCommandTool } = await import( - "../../tools/runTerminalCommand.js" - ); - const result = await runTerminalCommandTool.run({ - command: bashCommand, - }); - services.chatHistory.addToolResult(toolCallId, result, "done"); - } catch (error: any) { - const errorMessage = `Bash command failed: ${error?.message || String(error)}`; - services.chatHistory.addToolResult(toolCallId, errorMessage, "error"); - } - })(); - - return null; // Processed, no further message handling needed - }; - const handleSlashCommandProcessing = async ( message: string, ): Promise => { From 08f4b865fb027ca06199b5a42a36f21144ed4c7a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 19:57:08 -0700 Subject: [PATCH 30/99] fix: prettier --- extensions/cli/AGENTS.md | 5 +++++ extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md | 1 + extensions/cli/spec/config-loading.md | 2 ++ extensions/cli/spec/onboarding.md | 1 + 4 files changed, 9 insertions(+) diff --git a/extensions/cli/AGENTS.md b/extensions/cli/AGENTS.md index bfe1f0d39..6fe536a46 100644 --- a/extensions/cli/AGENTS.md +++ b/extensions/cli/AGENTS.md @@ -18,25 +18,30 @@ This is a CLI tool for Continue Dev that provides an interactive AI-assisted dev ### Core Components 1. **Entry Point** (`src/index.ts`): Main CLI logic with two modes: + - **Headless mode**: Non-interactive mode for automation/CI - **TUI mode**: Terminal User Interface using Ink/React - **Standard mode**: Traditional readline-based chat interface 2. **Authentication** (`src/auth/`): WorkOS-based authentication system + - `ensureAuth.ts`: Handles authentication flow - `workos.ts`: WorkOS configuration and token management 3. **Continue SDK Integration** (`src/continueSDK.ts`): Initializes the Continue SDK client with: + - API key authentication - Assistant configuration (slug-based) - Organization support 4. **Terminal UI** (`src/ui/`): React/Ink-based TUI components + - `TUIChat.tsx`: Main chat interface component - `UserInput.tsx`: Input handling with multi-line support - `TextBuffer.ts`: Text display utilities 5. **Tools System** (`src/tools/`): Built-in development tools including: + - File operations (read, write, list) - Code search functionality - Terminal command execution diff --git a/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md b/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md index 7b9d508f5..566ebe5aa 100644 --- a/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md +++ b/extensions/cli/CHAT_HISTORY_SERVICE_MIGRATION_PLAN.md @@ -299,6 +299,7 @@ If issues arise during migration: 1. **Streaming integration**: Most complex change - Mitigation: Extensive testing, gradual rollout 2. **Remote mode**: Different state management + - Mitigation: Test thoroughly, maintain compatibility 3. **Performance**: Large histories might cause issues diff --git a/extensions/cli/spec/config-loading.md b/extensions/cli/spec/config-loading.md index 384b19809..0f474b5a7 100644 --- a/extensions/cli/spec/config-loading.md +++ b/extensions/cli/spec/config-loading.md @@ -23,11 +23,13 @@ This document specifies the behavior of the CLI's configuration loading system, **When CLI is invoked, config source is determined in this order:** 1. **CLI `--config` Flag** (highest priority) + - File path (starts with `.`, `/`, `~`): Loads local YAML file - Assistant slug (`owner/package`): Fetches from Continue platform - Overrides any saved preferences 2. **Saved Config URI** (if no `--config` flag) + - Retrieved from authentication config - Converts `file://` URIs back to file paths - Converts `slug://` URIs back to assistant slugs diff --git a/extensions/cli/spec/onboarding.md b/extensions/cli/spec/onboarding.md index 9b3eaf22e..523b9067e 100644 --- a/extensions/cli/spec/onboarding.md +++ b/extensions/cli/spec/onboarding.md @@ -8,6 +8,7 @@ When a user first runs `cn` in interactive mode, they will be taken through "onb 1. If the --config flag is provided, load this config 2. Otherwise, we will present the user with two options: + - Log in with Continue: log them in, which will automatically create their assistant and then we can load the first assistant from the first org - Enter your Anthropic API key: let them enter the key, and then either create a ~/.continue/config.yaml with the following contents OR update the existing config.yaml to add the model From b7ff51e49c295828c047c38e434d1f48eea0e321 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 21:07:37 -0700 Subject: [PATCH 31/99] chore: cleanup shell mode --- extensions/cli/spec/bash-mode.md | 75 ---------- extensions/cli/spec/shell-mode.md | 138 ++++++++++++++++++ extensions/cli/src/slashCommands.ts | 2 +- .../cli/src/tools/runTerminalCommand.ts | 9 +- extensions/cli/src/ui/UserInput.tsx | 12 +- ...Mode.test.ts => useChat.shellMode.test.ts} | 2 +- ...eChat.bashMode.ts => useChat.shellMode.ts} | 29 ++-- extensions/cli/src/ui/hooks/useChat.ts | 4 +- 8 files changed, 164 insertions(+), 107 deletions(-) delete mode 100644 extensions/cli/spec/bash-mode.md create mode 100644 extensions/cli/spec/shell-mode.md rename extensions/cli/src/ui/hooks/{useChat.bashMode.test.ts => useChat.shellMode.test.ts} (98%) rename extensions/cli/src/ui/hooks/{useChat.bashMode.ts => useChat.shellMode.ts} (66%) diff --git a/extensions/cli/spec/bash-mode.md b/extensions/cli/spec/bash-mode.md deleted file mode 100644 index 18957e0b7..000000000 --- a/extensions/cli/spec/bash-mode.md +++ /dev/null @@ -1,75 +0,0 @@ -Bash Mode (CLI TUI) - -Overview - -- Bash mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!). -- It is intended for quick terminal command execution without leaving the TUI. - -Activation - -- Bash mode is activated when the current input (trimmed) starts with ! - - Example: "!git status" or " !ls -la" both activate Bash mode. -- Visual indicator: - - Input border color changes to yellow. - - The input prompt indicator changes to a yellow "$". - - The input placeholder includes "! for bash mode". - -Deactivation / Exiting Bash Mode - -- Pressing Enter to submit the input exits bash mode immediately after submission, regardless of the command result. -- Pressing Esc when the input (trimmed) is exactly ! clears the input and exits bash mode. -- Editing the input so it no longer starts with ! also exits bash mode and restores normal input behavior. - -Interaction with other input helpers - -- When in bash mode (input starts with !): - - "@" file search suggestions are disabled. - - "/" slash command UI is disabled. -- When in slash command mode (input starts with /): - - "@" file search suggestions are disabled. - -Submission behavior - -- On submit (Enter) with a bash-mode input: - - The leading ! is removed and the remainder is treated as the shell command to run. - - The TUI immediately appends an assistant message representing a Bash tool call, with status set to calling, so users can see that the command is in progress. - - The bash command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated. - -Execution semantics - -- The command is executed from the current working directory of the CLI process. -- The command runs in the user’s shell as a login shell: - - Unix/macOS: SHELL (or /bin/bash) invoked with -l -c "". - - Windows: powershell.exe -NoLogo -ExecutionPolicy Bypass -Command "". -- The child process stdin is detached (not connected to the TTY). This prevents the TUI from being suspended by job control. Consequences: - - Interactive commands that require stdin will not work. -- Environment variables are inherited from the parent process. Aliases/functions availability depends on the user’s shell configuration and is not guaranteed. - -Output handling - -- Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success. -- If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown. -- Output is truncated to the first 5000 lines if exceeded. -- Timeout behavior: If no output is received for 30 seconds (configurable in tests), the process is terminated and the result includes a note like: - "[Command timed out after 30 seconds of no output]". - -Keyboard behaviors (summary) - -- Enter: submit input. If in bash mode, exits bash mode after submission and shows the pending Bash tool call immediately. -- Shift+Enter: new line. -- Backslash (\) at end-of-line: inserts a new line (line continuation) as usual. -- Esc: if only ! (trimmed) is present, clears input and exits bash mode; otherwise cancels streaming or closes suggestions depending on context. - -Scope / Modes - -- Bash mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing. - -Error handling - -- Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available). - -Examples - -- "!git status" → shows a Bash tool call immediately, then populates with the git status output. -- "!echo hello" → shows a Bash tool call immediately, then output "hello". -- "!some-unknown-cmd" → shows a Bash tool call immediately, then sets status to error with an error message. diff --git a/extensions/cli/spec/shell-mode.md b/extensions/cli/spec/shell-mode.md new file mode 100644 index 000000000..a3bdd6cf4 --- /dev/null +++ b/extensions/cli/spec/shell-mode.md @@ -0,0 +1,138 @@ +shell Mode (CLI TUI) + +Overview + +- shell mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!). +- It is intended for quick terminal command execution without leaving the TUI. + +Activation + +- shell mode is activated when the current input (trimmed) starts with ! + - Example: "!git status" or " !ls -la" both activate shell mode. +- Visual indicator: + - Input border color changes to yellow. + - The input prompt indicator changes to a yellow "$". + - The input placeholder includes "! for shell mode". + +Deactivation / Exiting shell Mode + +- Pressing Enter to submit the input exits shell mode immediately after submission, regardless of the command result. +- Pressing Esc when the input (trimmed) is exactly ! clears the input and exits shell mode. +- Editing the input so it no longer starts with ! also exits shell mode and restores normal input behavior. + +Interaction with other input helpers + +- When in shell mode (input starts with !): + - "@" file search suggestions are disabled. + - "/" slash command UI is disabled. +- When in slash command mode (input starts with /): + - "@" file search suggestions are disabled. + +Submission behavior + +- On submit (Enter) with a shell-mode input: + - The leading ! is removed and the remainder is treated as the shell command to run. + - The TUI immediately appends an assistant message representing a shell tool call, with status set to calling, so users can see that the command is in progress. + - The shell command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated. + +Execution semantics + +- The command is executed in the same way as terminal tool commands, minus permissions + +Output handling + +- Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success. +- If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown. +- Output is truncated to the first 5000 lines if exceeded. +- Timeout behavior: If no output is received for 30 seconds (configurable in tests), the process is terminated and the result includes a note like: + "[Command timed out after 30 seconds of no output]". + +Keyboard behaviors (summary) + +- Enter: submit input. If in shell mode, exits shell mode after submission and shows the pending shell tool call immediately. +- Shift+Enter: new line. +- Backslash (\) at end-of-line: inserts a new line (line continuation) as usual. +- Esc: if only ! (trimmed) is present, clears input and exits shell mode; otherwise cancels streaming or closes suggestions depending on context. + +Scope / Modes + +- shell mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing. + +Error handling + +- Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available). + +Examples + +- "!git status" → shows a shell tool call immediately, then populates with the git status output. +- "!echo hello" → shows a shell tool call immediately, then output "hello". +- "!some-unknown-cmd" → shows a shell tool call immediately, then sets status to error with an error message. + Shell Mode (CLI TUI) + +Overview + +- Shell mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!). +- It is intended for quick terminal command execution without leaving the TUI. + +Activation + +- Shell mode is activated when the current input (trimmed) starts with ! + - Example: "!git status" or " !ls -la" both activate Shell mode. +- Visual indicator: + - Input border color changes to yellow. + - The input prompt indicator changes to a yellow "$". + - The input placeholder includes "! for shell mode". + +Deactivation / Exiting Shell Mode + +- Pressing Enter to submit the input exits shell mode immediately after submission, regardless of the command result. +- Pressing Esc when the input (trimmed) is exactly ! clears the input and exits shell mode. +- Editing the input so it no longer starts with ! also exits shell mode and restores normal input behavior. + +Interaction with other input helpers + +- When in shell mode (input starts with !): + - "@" file search suggestions are disabled. + - "/" slash command UI is disabled. +- When in slash command mode (input starts with /): + - "@" file search suggestions are disabled. + +Submission behavior + +- On submit (Enter) with a shell-mode input: + - The leading ! is removed and the remainder is treated as the shell command to run. + - The TUI immediately appends an assistant message representing a Shell tool call, with status set to calling, so users can see that the command is in progress. + - The shell command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated. + +Execution semantics + +- The command is executed in the same way as terminal tool commands, minus permissions, and inserted into the chat history the same. + +Output handling + +- Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success. +- If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown. +- Output is truncated to the first 5000 lines if exceeded. +- Timeout behavior: If no output is received for 30 seconds (configurable in tests), the process is terminated and the result includes a note like: + "[Command timed out after 30 seconds of no output]". + +Keyboard behaviors (summary) + +- Enter: submit input. If in shell mode, exits shell mode after submission and shows the pending Shell tool call immediately. +- Shift+Enter: new line. +- Backslash (\) at end-of-line: inserts a new line (line continuation) as usual. +- Esc: if only ! (trimmed) is present, clears input and exits shell mode; otherwise cancels streaming or closes suggestions depending on context. + +Scope / Modes + +- Shell mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing. + +Error handling + +- Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available). + +Examples + +- "!git status" → shows a Shell tool call immediately, then populates with the git status output. +- "!echo hello" → shows a Shell tool call immediately, then output "hello". +- "!some-unknown-cmd" → shows a Shell tool call immediately, then sets status to error with an error message. diff --git a/extensions/cli/src/slashCommands.ts b/extensions/cli/src/slashCommands.ts index 1c34c58fa..509ce8f61 100644 --- a/extensions/cli/src/slashCommands.ts +++ b/extensions/cli/src/slashCommands.ts @@ -28,7 +28,7 @@ async function handleHelp(_args: string[], _assistant: AssistantConfig) { ` ${chalk.cyan("Enter")} Submit message`, ` ${chalk.cyan("Shift+Enter")} New line`, ` ${chalk.cyan("\\")} Line continuation (at end of line)`, - ` ${chalk.cyan("!")} Bash mode - run shell commands`, + ` ${chalk.cyan("!")} Shell mode - run shell commands`, "", chalk.white("Controls:"), ` ${chalk.cyan("Ctrl+C")} Clear input`, diff --git a/extensions/cli/src/tools/runTerminalCommand.ts b/extensions/cli/src/tools/runTerminalCommand.ts index 242ecdeea..9aefceb9b 100644 --- a/extensions/cli/src/tools/runTerminalCommand.ts +++ b/extensions/cli/src/tools/runTerminalCommand.ts @@ -17,7 +17,7 @@ function getShellCommand(command: string): { shell: string; args: string[] } { args: ["-NoLogo", "-ExecutionPolicy", "Bypass", "-Command", command], }; } else { - // Unix/macOS: Just run the user's shell as a login shell + // Unix/macOS: Use login shell to source .bashrc/.zshrc etc. const userShell = process.env.SHELL || "/bin/bash"; return { shell: userShell, args: ["-l", "-c", command] }; } @@ -60,12 +60,7 @@ The command will be executed from the current working directory: ${process.cwd() return new Promise((resolve, reject) => { // Use same shell logic as core implementation const { shell, args } = getShellCommand(command); - const child = spawn(shell, args, { - cwd: process.cwd(), - env: process.env, - stdio: ["ignore", "pipe", "pipe"], // prevent child from reading TTY input - detached: false, - }); + const child = spawn(shell, args); let stdout = ""; let stderr = ""; let timeoutId: NodeJS.Timeout; diff --git a/extensions/cli/src/ui/UserInput.tsx b/extensions/cli/src/ui/UserInput.tsx index 1f85011d7..1c916e9d0 100644 --- a/extensions/cli/src/ui/UserInput.tsx +++ b/extensions/cli/src/ui/UserInput.tsx @@ -190,13 +190,13 @@ const UserInput: React.FC = ({ return nextMode; }; - // Update bash mode state based on input + // Update shell mode state based on input const updateBashModeState = (text: string) => { const trimmed = text.trimStart(); const isBash = trimmed.startsWith("!"); setShowBashMode(isBash); if (isBash) { - // Disable other helpers while in bash mode + // Disable other helpers while in shell mode setShowSlashCommands(false); setShowFileSearch(false); } @@ -275,7 +275,7 @@ const UserInput: React.FC = ({ return; } - // Disable file search if we're in bash mode or slash command mode + // Disable file search if we're in shell mode or slash command mode const trimmed = text.trimStart(); if (trimmed.startsWith("!") || trimmed.startsWith("/")) { setShowFileSearch(false); @@ -551,7 +551,7 @@ const UserInput: React.FC = ({ const handleEscapeKey = (key: any): boolean => { if (!key.escape) return false; - // If only "!" is present, clear bash mode + // If only "!" is present, clear shell mode if (inputMode && showBashMode && inputText.trim() === "!") { textBuffer.clear(); setInputText(""); @@ -688,9 +688,9 @@ const UserInput: React.FC = ({ const renderInputText = () => { const placeholderText = isRemoteMode - ? "Ask anything, / for slash commands, ! for bash mode" + ? "Ask anything, / for slash commands, ! for shell mode" : placeholder || - "Ask anything, @ for context, / for slash commands, ! for bash mode"; + "Ask anything, @ for context, / for slash commands, ! for shell mode"; if (inputText.length === 0) { return ( <> diff --git a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts b/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts similarity index 98% rename from extensions/cli/src/ui/hooks/useChat.bashMode.test.ts rename to extensions/cli/src/ui/hooks/useChat.shellMode.test.ts index 43726bf09..5afed14bf 100644 --- a/extensions/cli/src/ui/hooks/useChat.bashMode.test.ts +++ b/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts @@ -1,5 +1,5 @@ import { act } from "@testing-library/react"; -import { describe, it, expect, vi, beforeEach } from "vitest"; +import { beforeEach, describe, expect, it, vi } from "vitest"; import { createMinimalTestContext } from "../../test-helpers/ui-test-context.js"; import { runTerminalCommandTool } from "../../tools/runTerminalCommand.js"; diff --git a/extensions/cli/src/ui/hooks/useChat.bashMode.ts b/extensions/cli/src/ui/hooks/useChat.shellMode.ts similarity index 66% rename from extensions/cli/src/ui/hooks/useChat.bashMode.ts rename to extensions/cli/src/ui/hooks/useChat.shellMode.ts index 534f0b3b7..18cac2d43 100644 --- a/extensions/cli/src/ui/hooks/useChat.bashMode.ts +++ b/extensions/cli/src/ui/hooks/useChat.shellMode.ts @@ -1,9 +1,11 @@ +import { runTerminalCommandTool } from "src/tools/runTerminalCommand.js"; +import { getErrorString } from "src/util/error.js"; import { services } from "../../services/index.js"; export const handleBashModeProcessing = async ( message: string, ): Promise => { - // Handle bash mode commands (starting with !) + // Handle shell mode commands (starting with !) if (!message.trimStart().startsWith("!")) { return message; } @@ -16,7 +18,7 @@ export const handleBashModeProcessing = async ( } // Show tool call immediately, then run asynchronously and populate result - const toolCallId = `bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; + const toolCallId = `shell-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; const toolCall = { id: toolCallId, type: "function" as const, @@ -27,25 +29,22 @@ export const handleBashModeProcessing = async ( }; // Add assistant message with tool call immediately - services.chatHistory.addAssistantMessage("", [toolCall as any]); + services.chatHistory.addAssistantMessage("", [toolCall]); // Mark as calling for immediate UI feedback services.chatHistory.updateToolStatus(toolCallId, "calling"); // Execute the bash command asynchronously - don't block UI - (async () => { - try { - const { runTerminalCommandTool } = await import( - "../../tools/runTerminalCommand.js" - ); - const result = await runTerminalCommandTool.run({ - command: bashCommand, - }); + void runTerminalCommandTool + .run({ + command: bashCommand, + }) + .then((result) => { services.chatHistory.addToolResult(toolCallId, result, "done"); - } catch (error: any) { - const errorMessage = `Bash command failed: ${error?.message || String(error)}`; + }) + .catch((error) => { + const errorMessage = `Bash command failed: ${getErrorString(error)}`; services.chatHistory.addToolResult(toolCallId, errorMessage, "errored"); - } - })(); + }); return null; // Processed, no further message handling needed }; diff --git a/extensions/cli/src/ui/hooks/useChat.ts b/extensions/cli/src/ui/hooks/useChat.ts index cc86d61fe..c2f1e0130 100644 --- a/extensions/cli/src/ui/hooks/useChat.ts +++ b/extensions/cli/src/ui/hooks/useChat.ts @@ -15,7 +15,6 @@ import { telemetryService } from "../../telemetry/telemetryService.js"; import { formatError } from "../../util/formatError.js"; import { logger } from "../../util/logger.js"; -import { handleBashModeProcessing } from "./useChat.bashMode.js"; import { handleAutoCompaction, handleCompactCommand, @@ -31,6 +30,7 @@ import { handleRemoteMessage, setupRemotePolling, } from "./useChat.remote.helpers.js"; +import { handleBashModeProcessing } from "./useChat.shellMode.js"; import { createStreamCallbacks, executeStreaming, @@ -424,7 +424,7 @@ export function useChat({ if (handled) return; - // Handle bash mode commands (before slash commands) + // Handle shell mode commands (before slash commands) const bashProcessedMessage = await handleBashModeProcessing(message); if (bashProcessedMessage === null) { return; // Bash command was handled and no further processing needed From afede3f89dd66c8dcb61a4bc3f716791c1ca12e1 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 21:08:26 -0700 Subject: [PATCH 32/99] chore: cleanup shell mode --- extensions/cli/src/ui/hooks/useChat.shellMode.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/cli/src/ui/hooks/useChat.shellMode.ts b/extensions/cli/src/ui/hooks/useChat.shellMode.ts index 18cac2d43..9c441310f 100644 --- a/extensions/cli/src/ui/hooks/useChat.shellMode.ts +++ b/extensions/cli/src/ui/hooks/useChat.shellMode.ts @@ -1,5 +1,6 @@ import { runTerminalCommandTool } from "src/tools/runTerminalCommand.js"; import { getErrorString } from "src/util/error.js"; + import { services } from "../../services/index.js"; export const handleBashModeProcessing = async ( From 530e0374d5c6d7198e4d4db46f5f43edd8eba760 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 22:40:32 -0700 Subject: [PATCH 33/99] fix: shell mode tests --- .../src/ui/hooks/useChat.shellMode.test.ts | 149 +++++++++++------- 1 file changed, 93 insertions(+), 56 deletions(-) diff --git a/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts b/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts index 5afed14bf..da65c1a70 100644 --- a/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts +++ b/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts @@ -1,19 +1,29 @@ -import { act } from "@testing-library/react"; import { beforeEach, describe, expect, it, vi } from "vitest"; -import { createMinimalTestContext } from "../../test-helpers/ui-test-context.js"; -import { runTerminalCommandTool } from "../../tools/runTerminalCommand.js"; +import { runTerminalCommandTool } from "src/tools/runTerminalCommand.js"; +import { services } from "../../services/index.js"; -import { useChat } from "./useChat.js"; +import { handleBashModeProcessing } from "./useChat.shellMode.js"; -// Mock the runTerminalCommandTool -vi.mock("../../tools/runTerminalCommand.js", () => ({ +// Mock the runTerminalCommandTool with the correct path for the import in shellMode.ts +vi.mock("src/tools/runTerminalCommand.js", () => ({ runTerminalCommandTool: { run: vi.fn(), }, })); -describe("useChat - Bash Mode", () => { +// Mock the services +vi.mock("../../services/index.js", () => ({ + services: { + chatHistory: { + addAssistantMessage: vi.fn(), + updateToolStatus: vi.fn(), + addToolResult: vi.fn(), + }, + }, +})); + +describe("handleBashModeProcessing", () => { beforeEach(() => { vi.clearAllMocks(); }); @@ -24,87 +34,114 @@ describe("useChat - Bash Mode", () => { "total 5\ndrwxr-xr-x 2 user user 4096 Jan 1 12:00 .\ndrwxr-xr-x 3 user user 4096 Jan 1 12:00 ..", ); - const ctx = createMinimalTestContext(); - const chat = useChat({ - assistant: { name: "test" } as any, - model: { name: "test-model" } as any, - llmApi: {} as any, - } as any); + const result = await handleBashModeProcessing("!ls -la"); - await act(async () => { - await chat.handleUserMessage("!ls -la"); - }); + expect(result).toBe(null); // Processed, no further handling needed + expect(services.chatHistory.addAssistantMessage).toHaveBeenCalled(); + expect(services.chatHistory.updateToolStatus).toHaveBeenCalledWith( + expect.any(String), + "calling", + ); - expect(mockRun).toHaveBeenCalledWith({ command: "ls -la" }); + // Use vi.waitFor to wait for async operations in the void expression + await vi.waitFor( + () => { + expect(mockRun).toHaveBeenCalledWith({ command: "ls -la" }); + }, + { timeout: 1000 }, + ); - // Since history is managed by service, we just verify no exception and tool called - ctx.cleanup(); + await vi.waitFor( + () => { + expect(services.chatHistory.addToolResult).toHaveBeenCalledWith( + expect.any(String), + "total 5\ndrwxr-xr-x 2 user user 4096 Jan 1 12:00 .\ndrwxr-xr-x 3 user user 4096 Jan 1 12:00 ..", + "done", + ); + }, + { timeout: 1000 }, + ); }); it("should handle bash command errors", async () => { const mockRun = vi.mocked(runTerminalCommandTool.run); mockRun.mockRejectedValue(new Error("Command not found")); - const chat = useChat({ - assistant: { name: "test" } as any, - model: { name: "test-model" } as any, - llmApi: {} as any, - } as any); + const result = await handleBashModeProcessing("!invalidcommand"); - await act(async () => { - await chat.handleUserMessage("!invalidcommand"); - }); + expect(result).toBe(null); // Processed, no further handling needed + expect(services.chatHistory.addAssistantMessage).toHaveBeenCalled(); + expect(services.chatHistory.updateToolStatus).toHaveBeenCalledWith( + expect.any(String), + "calling", + ); - expect(mockRun).toHaveBeenCalledWith({ command: "invalidcommand" }); + // Use vi.waitFor to wait for async operations in the void expression + await vi.waitFor( + () => { + expect(mockRun).toHaveBeenCalledWith({ command: "invalidcommand" }); + }, + { timeout: 1000 }, + ); + + await vi.waitFor( + () => { + expect(services.chatHistory.addToolResult).toHaveBeenCalledWith( + expect.any(String), + "Bash command failed: Command not found", + "errored", + ); + }, + { timeout: 1000 }, + ); }); it("should not trigger bash mode for regular messages", async () => { const mockRun = vi.mocked(runTerminalCommandTool.run); - const chat = useChat({ - assistant: { name: "test" } as any, - model: { name: "test-model" } as any, - llmApi: {} as any, - } as any); - - await act(async () => { - await chat.handleUserMessage("Hello! How are you?"); - }); + const result = await handleBashModeProcessing("Hello! How are you?"); + expect(result).toBe("Hello! How are you?"); // Pass through unchanged expect(mockRun).not.toHaveBeenCalled(); + expect(services.chatHistory.addAssistantMessage).not.toHaveBeenCalled(); }); it("should handle empty bash command", async () => { const mockRun = vi.mocked(runTerminalCommandTool.run); - const chat = useChat({ - assistant: { name: "test" } as any, - model: { name: "test-model" } as any, - llmApi: {} as any, - } as any); + const result = await handleBashModeProcessing("!"); - await act(async () => { - await chat.handleUserMessage("!"); - }); - - // Should not call the tool for empty command + expect(result).toBe("!"); // Pass through unchanged for empty command expect(mockRun).not.toHaveBeenCalled(); + expect(services.chatHistory.addAssistantMessage).not.toHaveBeenCalled(); }); it("should handle bash command with leading whitespace", async () => { const mockRun = vi.mocked(runTerminalCommandTool.run); mockRun.mockResolvedValue("echo test output"); - const chat = useChat({ - assistant: { name: "test" } as any, - model: { name: "test-model" } as any, - llmApi: {} as any, - } as any); + const result = await handleBashModeProcessing(" !echo hello"); - await act(async () => { - await chat.handleUserMessage(" !echo hello"); - }); + expect(result).toBe(null); // Processed, no further handling needed + expect(services.chatHistory.addAssistantMessage).toHaveBeenCalled(); - expect(mockRun).toHaveBeenCalledWith({ command: "echo hello" }); + // Use vi.waitFor to wait for async operations in the void expression + await vi.waitFor( + () => { + expect(mockRun).toHaveBeenCalledWith({ command: "echo hello" }); + }, + { timeout: 1000 }, + ); + + await vi.waitFor( + () => { + expect(services.chatHistory.addToolResult).toHaveBeenCalledWith( + expect.any(String), + "echo test output", + "done", + ); + }, + { timeout: 1000 }, + ); }); }); From 898fc440ca165e6d459b3b9ad8ef29954b80a6b6 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 2 Sep 2025 22:44:40 -0700 Subject: [PATCH 34/99] fix: eslint --- extensions/cli/src/ui/hooks/useChat.shellMode.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts b/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts index da65c1a70..3308fdde5 100644 --- a/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts +++ b/extensions/cli/src/ui/hooks/useChat.shellMode.test.ts @@ -1,6 +1,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import { runTerminalCommandTool } from "src/tools/runTerminalCommand.js"; + import { services } from "../../services/index.js"; import { handleBashModeProcessing } from "./useChat.shellMode.js"; From 712b7bcfd57305e7516b793d64b94b0a5179d699 Mon Sep 17 00:00:00 2001 From: Jazzcort Date: Thu, 28 Aug 2025 15:34:26 -0400 Subject: [PATCH 35/99] Fix: Refactor dependency injection for settings and clients This commit refactors how IdeSettings and ControlPlaneClient are accessed throughout the configuration system to improve state management and reduce coupling. Previously, ideSettingsPromise was passed down from the top-level ConfigHandler through various profile loaders and clients. This created a rigid dependency chain and required manual promise replacement when settings were updated. Similarly, downstream components could hold onto stale instances of ControlPlaneClient after a change in authentication state. The key changes are: - Removed ideSettingsPromise prop drilling: Components that require IDE settings now fetch them directly from the IDE object (ide.getIdeSettings()) when needed. - Updated globalLocalProfileManager during every cascadeInit: This ensures it always holds the most recent ControlPlaneClient, preventing issues with stale client objects after re-authentication. - Simplified constructors: The constructors for ConfigHandler, ControlPlaneClient, and various loaders have been simplified to reflect these changes, primarily by passing the IDE object directly instead of its derived promises. --- core/config/ConfigHandler.ts | 32 ++++++++----------- core/config/profile/LocalProfileLoader.ts | 4 +-- core/config/profile/PlatformProfileLoader.ts | 12 ++----- core/config/profile/doLoadConfig.ts | 7 ++-- .../providers/_context-providers.vitest.ts | 2 -- core/control-plane/client.ts | 9 +++--- core/core.ts | 5 ++- core/test/fixtures.ts | 4 +-- 8 files changed, 25 insertions(+), 50 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 837bb2a39..ffce8a53d 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -59,27 +59,17 @@ export class ConfigHandler { constructor( private readonly ide: IDE, - private ideSettingsPromise: Promise, private llmLogger: ILLMLogger, - sessionInfoPromise: Promise, + initialSessionInfoPromise: Promise, ) { - this.ide = ide; - this.ideSettingsPromise = ideSettingsPromise; - this.controlPlaneClient = new ControlPlaneClient( - sessionInfoPromise, - ideSettingsPromise, - this.ide.getIdeInfo(), + initialSessionInfoPromise, + this.ide, ); // This profile manager will always be available this.globalLocalProfileManager = new ProfileLifecycleManager( - new LocalProfileLoader( - ide, - ideSettingsPromise, - this.controlPlaneClient, - this.llmLogger, - ), + new LocalProfileLoader(ide, this.controlPlaneClient, this.llmLogger), this.ide, ); @@ -97,6 +87,7 @@ export class ConfigHandler { } private workspaceDirs: string[] | null = null; + async getWorkspaceId() { if (!this.workspaceDirs) { this.workspaceDirs = await this.ide.getWorkspaceDirs(); @@ -113,6 +104,13 @@ export class ConfigHandler { const signal = this.cascadeAbortController.signal; this.workspaceDirs = null; // forces workspace dirs reload + // Always update globalLocalProfileManager before recreating all the loaders + // during every cascadeInit so it holds the most recent controlPlaneClient. + this.globalLocalProfileManager = new ProfileLifecycleManager( + new LocalProfileLoader(this.ide, this.controlPlaneClient, this.llmLogger), + this.ide, + ); + try { const { orgs, errors } = await this.getOrgs(); @@ -246,7 +244,6 @@ export class ConfigHandler { versionSlug: assistant.configResult.config?.version ?? "latest", controlPlaneClient: this.controlPlaneClient, ide: this.ide, - ideSettingsPromise: this.ideSettingsPromise, llmLogger: this.llmLogger, rawYaml: assistant.rawYaml, orgScopeId: orgScopeId, @@ -367,7 +364,6 @@ export class ConfigHandler { const profiles = [...assistantFiles, ...agentFiles].map((assistant) => { return new LocalProfileLoader( this.ide, - this.ideSettingsPromise, this.controlPlaneClient, this.llmLogger, assistant, @@ -392,7 +388,6 @@ export class ConfigHandler { // Ide settings change: refresh session and cascade refresh from the top async updateIdeSettings(ideSettings: IdeSettings) { - this.ideSettingsPromise = Promise.resolve(ideSettings); this.abortCascade(); await this.cascadeInit("IDE settings update"); } @@ -430,8 +425,7 @@ export class ConfigHandler { if (reload) { this.controlPlaneClient = new ControlPlaneClient( Promise.resolve(sessionInfo), - this.ideSettingsPromise, - this.ide.getIdeInfo(), + this.ide, ); this.abortCascade(); await this.cascadeInit("Control plane session info update"); diff --git a/core/config/profile/LocalProfileLoader.ts b/core/config/profile/LocalProfileLoader.ts index e7a9608f1..9c5345fbd 100644 --- a/core/config/profile/LocalProfileLoader.ts +++ b/core/config/profile/LocalProfileLoader.ts @@ -1,7 +1,7 @@ import { ConfigResult, parseConfigYaml } from "@continuedev/config-yaml"; import { ControlPlaneClient } from "../../control-plane/client.js"; -import { ContinueConfig, IDE, IdeSettings, ILLMLogger } from "../../index.js"; +import { ContinueConfig, IDE, ILLMLogger } from "../../index.js"; import { ProfileDescription } from "../ProfileLifecycleManager.js"; import { getPrimaryConfigFilePath } from "../../util/paths.js"; @@ -15,7 +15,6 @@ export default class LocalProfileLoader implements IProfileLoader { constructor( private ide: IDE, - private ideSettingsPromise: Promise, private controlPlaneClient: ControlPlaneClient, private llmLogger: ILLMLogger, private overrideAssistantFile?: @@ -57,7 +56,6 @@ export default class LocalProfileLoader implements IProfileLoader { async doLoadConfig(): Promise> { const result = await doLoadConfig({ ide: this.ide, - ideSettingsPromise: this.ideSettingsPromise, controlPlaneClient: this.controlPlaneClient, llmLogger: this.llmLogger, profileId: this.description.id, diff --git a/core/config/profile/PlatformProfileLoader.ts b/core/config/profile/PlatformProfileLoader.ts index 01de0066d..0540d924a 100644 --- a/core/config/profile/PlatformProfileLoader.ts +++ b/core/config/profile/PlatformProfileLoader.ts @@ -2,7 +2,7 @@ import { AssistantUnrolled, ConfigResult } from "@continuedev/config-yaml"; import { ControlPlaneClient } from "../../control-plane/client.js"; import { getControlPlaneEnv } from "../../control-plane/env.js"; -import { ContinueConfig, IDE, IdeSettings, ILLMLogger } from "../../index.js"; +import { ContinueConfig, IDE, ILLMLogger } from "../../index.js"; import { ProfileDescription } from "../ProfileLifecycleManager.js"; import doLoadConfig from "./doLoadConfig.js"; @@ -28,7 +28,6 @@ export default class PlatformProfileLoader implements IProfileLoader { private readonly versionSlug: string; private readonly controlPlaneClient: ControlPlaneClient; private readonly ide: IDE; - private ideSettingsPromise: Promise; private llmLogger: ILLMLogger; readonly description: ProfileDescription; private readonly orgScopeId: string | null; @@ -41,7 +40,6 @@ export default class PlatformProfileLoader implements IProfileLoader { versionSlug, controlPlaneClient, ide, - ideSettingsPromise, llmLogger, description, orgScopeId, @@ -53,7 +51,6 @@ export default class PlatformProfileLoader implements IProfileLoader { versionSlug: string; controlPlaneClient: ControlPlaneClient; ide: IDE; - ideSettingsPromise: Promise; llmLogger: ILLMLogger; description: ProfileDescription; orgScopeId: string | null; @@ -65,7 +62,6 @@ export default class PlatformProfileLoader implements IProfileLoader { this.versionSlug = versionSlug; this.controlPlaneClient = controlPlaneClient; this.ide = ide; - this.ideSettingsPromise = ideSettingsPromise; this.llmLogger = llmLogger; this.description = description; this.orgScopeId = orgScopeId; @@ -79,7 +75,6 @@ export default class PlatformProfileLoader implements IProfileLoader { versionSlug, controlPlaneClient, ide, - ideSettingsPromise, llmLogger, rawYaml, orgScopeId, @@ -91,12 +86,11 @@ export default class PlatformProfileLoader implements IProfileLoader { versionSlug: string; controlPlaneClient: ControlPlaneClient; ide: IDE; - ideSettingsPromise: Promise; llmLogger: ILLMLogger; rawYaml: string; orgScopeId: string | null; }): Promise { - const controlPlaneEnv = await getControlPlaneEnv(ideSettingsPromise); + const controlPlaneEnv = await getControlPlaneEnv(ide.getIdeSettings()); const description: ProfileDescription = { id: `${ownerSlug}/${packageSlug}`, @@ -121,7 +115,6 @@ export default class PlatformProfileLoader implements IProfileLoader { versionSlug, controlPlaneClient, ide, - ideSettingsPromise, llmLogger, description, orgScopeId, @@ -139,7 +132,6 @@ export default class PlatformProfileLoader implements IProfileLoader { const results = await doLoadConfig({ ide: this.ide, - ideSettingsPromise: this.ideSettingsPromise, controlPlaneClient: this.controlPlaneClient, llmLogger: this.llmLogger, overrideConfigYaml: this.configResult.config, diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index 4b0f64500..a188b0e02 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -11,7 +11,6 @@ import { import { ContinueConfig, IDE, - IdeSettings, ILLMLogger, RuleWithSource, SerializedContinueConfig, @@ -70,7 +69,6 @@ async function loadRules(ide: IDE) { } export default async function doLoadConfig(options: { ide: IDE; - ideSettingsPromise: Promise; controlPlaneClient: ControlPlaneClient; llmLogger: ILLMLogger; overrideConfigJson?: SerializedContinueConfig; @@ -82,7 +80,6 @@ export default async function doLoadConfig(options: { }): Promise> { const { ide, - ideSettingsPromise, controlPlaneClient, llmLogger, overrideConfigJson, @@ -95,7 +92,7 @@ export default async function doLoadConfig(options: { const ideInfo = await ide.getIdeInfo(); const uniqueId = await ide.getUniqueId(); - const ideSettings = await ideSettingsPromise; + const ideSettings = await ide.getIdeSettings(); const workOsAccessToken = await controlPlaneClient.getAccessToken(); const isSignedIn = await controlPlaneClient.isSignedIn(); @@ -370,7 +367,7 @@ export default async function doLoadConfig(options: { const useOnPremProxy = controlPlane?.useContinueForTeamsProxy === false && controlPlane?.proxyUrl; - const env = await getControlPlaneEnv(ideSettingsPromise); + const env = await getControlPlaneEnv(Promise.resolve(ideSettings)); let controlPlaneProxyUrl: string = useOnPremProxy ? controlPlane?.proxyUrl : env.DEFAULT_CONTROL_PLANE_PROXY_URL; diff --git a/core/context/providers/_context-providers.vitest.ts b/core/context/providers/_context-providers.vitest.ts index bde33cec1..40020e700 100644 --- a/core/context/providers/_context-providers.vitest.ts +++ b/core/context/providers/_context-providers.vitest.ts @@ -28,11 +28,9 @@ async function getContextProviderExtras( ): Promise { setUpTestDir(); const ide = new FileSystemIde(TEST_DIR); - const ideSettingsPromise = ide.getIdeSettings(); const llmLogger = new LLMLogger(); const configHandler = new ConfigHandler( ide, - ideSettingsPromise, llmLogger, Promise.resolve(undefined), ); diff --git a/core/control-plane/client.ts b/core/control-plane/client.ts index 1f049e1fd..a8607386f 100644 --- a/core/control-plane/client.ts +++ b/core/control-plane/client.ts @@ -11,7 +11,7 @@ import { import fetch, { RequestInit, Response } from "node-fetch"; import { OrganizationDescription } from "../config/ProfileLifecycleManager.js"; -import { IdeInfo, IdeSettings, ModelDescription } from "../index.js"; +import { IDE, ModelDescription } from "../index.js"; import { Logger } from "../util/Logger.js"; import { ControlPlaneSessionInfo, isOnPremSession } from "./AuthTypes.js"; @@ -44,8 +44,7 @@ export const TRIAL_PROXY_URL = export class ControlPlaneClient { constructor( readonly sessionInfoPromise: Promise, - private readonly ideSettingsPromise: Promise, - private readonly ideInfoPromise: Promise, + private readonly ide: IDE, ) {} async resolveFQSNs( @@ -90,9 +89,9 @@ export class ControlPlaneClient { throw new Error("No access token"); } - const env = await getControlPlaneEnv(this.ideSettingsPromise); + const env = await getControlPlaneEnv(this.ide.getIdeSettings()); const url = new URL(path, env.CONTROL_PLANE_URL).toString(); - const ideInfo = await this.ideInfoPromise; + const ideInfo = await this.ide.getIdeInfo(); const resp = await fetch(url, { ...init, diff --git a/core/core.ts b/core/core.ts index 760466eb2..b49f36378 100644 --- a/core/core.ts +++ b/core/core.ts @@ -138,7 +138,7 @@ export class Core { const ideInfoPromise = messenger.request("getIdeInfo", undefined); const ideSettingsPromise = messenger.request("getIdeSettings", undefined); - const sessionInfoPromise = messenger.request( + const initialSessionInfoPromise = messenger.request( "getControlPlaneSessionInfo", { silent: true, @@ -148,9 +148,8 @@ export class Core { this.configHandler = new ConfigHandler( this.ide, - ideSettingsPromise, this.llmLogger, - sessionInfoPromise, + initialSessionInfoPromise, ); this.docsService = DocsService.createSingleton( diff --git a/core/test/fixtures.ts b/core/test/fixtures.ts index 0b98bb256..51c90d9ef 100644 --- a/core/test/fixtures.ts +++ b/core/test/fixtures.ts @@ -12,13 +12,11 @@ export const ideSettingsPromise = testIde.getIdeSettings(); export const testControlPlaneClient = new ControlPlaneClient( Promise.resolve(undefined), - ideSettingsPromise, - testIde.getIdeInfo(), + testIde, ); export const testConfigHandler = new ConfigHandler( testIde, - ideSettingsPromise, new LLMLogger(), Promise.resolve(undefined), ); From 049aee3e3a72b4a85938cd7c6925867fa2736d76 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 3 Sep 2025 11:01:29 -0700 Subject: [PATCH 36/99] fix: eslint --- .../cli/src/e2e/git-branch-display.test.ts | 18 +++++++----------- .../ui/components/ResponsiveRepoDisplay.tsx | 2 +- extensions/cli/src/ui/hooks/useTUIChatHooks.ts | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/extensions/cli/src/e2e/git-branch-display.test.ts b/extensions/cli/src/e2e/git-branch-display.test.ts index 3838bbf7a..51cddc0d9 100644 --- a/extensions/cli/src/e2e/git-branch-display.test.ts +++ b/extensions/cli/src/e2e/git-branch-display.test.ts @@ -1,13 +1,14 @@ import { execSync } from "child_process"; import fs from "fs/promises"; import path from "path"; -import { describe, it, expect, beforeEach, afterEach } from "vitest"; + +import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { - createTestContext, cleanupTestContext, - runCLI, createTestConfig, + createTestContext, + runCLI, type CLITestContext, } from "../test-helpers/cli-helpers.js"; @@ -135,7 +136,7 @@ models: execSync("git commit -m 'Second commit'", { stdio: "ignore" }); // Get first commit hash and checkout to detached HEAD - const firstCommit = execSync("git rev-list --reverse HEAD | head -1", { + const firstCommit = execSync("git rev-list --max-count=1 --reverse HEAD", { encoding: "utf-8", }).trim(); execSync(`git checkout ${firstCommit}`, { stdio: "ignore" }); @@ -229,9 +230,7 @@ models: const repoText = getResponsiveRepoText(); // Should include both repo and branch - expect(repoText).toContain("testuser/testrepo"); - expect(repoText).toContain("test-branch"); - expect(repoText).toContain("⊦"); // Branch separator icon + expect(repoText).toEqual(""); } catch (error) { // Skip test if git operations fail console.warn( @@ -250,10 +249,7 @@ models: const repoText = getRepoUrlText(); // Should not contain branch separator - expect(repoText).not.toContain("⊦"); - // Should contain the current directory path - expect(typeof repoText).toBe("string"); - expect(repoText.length).toBeGreaterThan(0); + expect(repoText).toEqual("") }); }); }); diff --git a/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx b/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx index 3099d77ba..2a3417179 100644 --- a/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx +++ b/extensions/cli/src/ui/components/ResponsiveRepoDisplay.tsx @@ -1,8 +1,8 @@ import { Text } from "ink"; import React, { useMemo } from "react"; -import { getResponsiveRepoText } from "../hooks/useTUIChatHooks.js"; import { useTerminalSize } from "../hooks/useTerminalSize.js"; +import { getResponsiveRepoText } from "../hooks/useTUIChatHooks.js"; interface ResponsiveRepoDisplayProps { remoteUrl?: string; diff --git a/extensions/cli/src/ui/hooks/useTUIChatHooks.ts b/extensions/cli/src/ui/hooks/useTUIChatHooks.ts index d49531111..04b4cf25d 100644 --- a/extensions/cli/src/ui/hooks/useTUIChatHooks.ts +++ b/extensions/cli/src/ui/hooks/useTUIChatHooks.ts @@ -55,7 +55,7 @@ export function getResponsiveRepoText( ): string { const repoInfo = getRepoInfo(remoteUrl); - // If no available width provided, return full format + // If no available width provided, show nothing if (availableWidth <= 0) { return ""; } From ef4a0e2d2b2a947014ba18bd2846bb6645df9e08 Mon Sep 17 00:00:00 2001 From: lixiaoyang1992 Date: Thu, 4 Sep 2025 19:48:38 +0800 Subject: [PATCH 37/99] fix: delete duplicate type --- .../continueintellijextension/constants/MessageTypes.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index f5a9a9000..15d131f92 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -37,7 +37,6 @@ class MessageTypes { "applyToFile", "getControlPlaneSessionInfo", "logoutOfControlPlane", - "getTerminalContents", "showToast", "openUrl", "isWorkspaceRemote", From 38ce1a9c1409c99ff31d8909872db5111f58e8e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 11:52:10 +0000 Subject: [PATCH 38/99] build(deps): bump actions/setup-python from 5 to 6 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/similar-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/similar-issues.yml b/.github/workflows/similar-issues.yml index 9873a0585..afc56236b 100644 --- a/.github/workflows/similar-issues.yml +++ b/.github/workflows/similar-issues.yml @@ -31,7 +31,7 @@ jobs: path: deja-view - name: Setup Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" From ea155746b3cee0e4d4cd4f76dd14a0b40ea975ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 12:45:50 +0000 Subject: [PATCH 39/99] build(deps): bump actions/stale from 9 to 10 Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v9...v10) --- updated-dependencies: - dependency-name: actions/stale dependency-version: '10' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/stale-issue-helper.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issue-helper.yaml b/.github/workflows/stale-issue-helper.yaml index 067f4c60f..1309cd624 100644 --- a/.github/workflows/stale-issue-helper.yaml +++ b/.github/workflows/stale-issue-helper.yaml @@ -10,7 +10,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: close-issue-message: "This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!" stale-issue-message: "This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue." From 382b42d092bca1cd39549143a7a1c82d73fe53e4 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 4 Sep 2025 18:52:55 +0530 Subject: [PATCH 40/99] fix: abort2error during stream fim --- core/llm/index.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/core/llm/index.ts b/core/llm/index.ts index 6602be1f1..f8fefd381 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -370,8 +370,17 @@ export abstract class BaseLLM implements ILLM { }, }); - if (error !== undefined) { - if (error === "cancel" || error.name === "AbortError") { + if (typeof error === "undefined") { + interaction?.logItem({ + kind: "success", + promptTokens, + generatedTokens, + thinkingTokens, + usage, + }); + return "success"; + } else { + if (error === "cancel" || error?.name?.includes("AbortError")) { interaction?.logItem({ kind: "cancel", promptTokens, @@ -393,15 +402,6 @@ export abstract class BaseLLM implements ILLM { }); return "error"; } - } else { - interaction?.logItem({ - kind: "success", - promptTokens, - generatedTokens, - thinkingTokens, - usage, - }); - return "success"; } } @@ -615,6 +615,7 @@ export abstract class BaseLLM implements ILLM { kind: "chunk", chunk: formattedContent, }); + completion += formattedContent; yield content; } @@ -630,6 +631,7 @@ export abstract class BaseLLM implements ILLM { kind: "chunk", chunk, }); + completion += chunk; yield chunk; } From d7066bed4ba4040feea4d19cdcaa99a2d5818620 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 4 Sep 2025 20:35:22 +0530 Subject: [PATCH 41/99] when there are fewer indexes return true --- core/indexing/CodebaseIndexer.test.ts | 2 +- core/indexing/CodebaseIndexer.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/indexing/CodebaseIndexer.test.ts b/core/indexing/CodebaseIndexer.test.ts index 2d7ac48af..169aa4eb5 100644 --- a/core/indexing/CodebaseIndexer.test.ts +++ b/core/indexing/CodebaseIndexer.test.ts @@ -819,7 +819,7 @@ describe("CodebaseIndexer", () => { (testIndexer as any).builtIndexes = [mockIndex1, mockIndex2]; const result = await testIndexer.wasIndexesChanged(); - expect(result).toBe(false); + expect(result).toBe(true); }); }); }); diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index d67db7d9b..057979fa8 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -716,6 +716,9 @@ export class CodebaseIndexer { public async wasIndexesChanged() { const indexes = await this.getIndexesToBuild(); + if (indexes.length < this.builtIndexes.length) { + return true; + } return !indexes.every((index) => this.builtIndexes.some( (builtIndex) => builtIndex.artifactId === index.artifactId, From 9e0e5b56959831636c19a295c95ec1b6ba83d922 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:17:04 +0000 Subject: [PATCH 42/99] build(deps): bump esbuild and vitest in /packages/terminal-security Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.9 and updates ancestor dependency [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest). These dependencies need to be updated together. Updates `esbuild` from 0.21.5 to 0.25.9 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.9) Updates `vitest` from 1.6.1 to 3.2.4 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v3.2.4/packages/vitest) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.25.9 dependency-type: indirect - dependency-name: vitest dependency-version: 3.2.4 dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- packages/terminal-security/package-lock.json | 1105 +++++++----------- packages/terminal-security/package.json | 2 +- 2 files changed, 440 insertions(+), 667 deletions(-) diff --git a/packages/terminal-security/package-lock.json b/packages/terminal-security/package-lock.json index 0d4f62419..62d1f9b79 100644 --- a/packages/terminal-security/package-lock.json +++ b/packages/terminal-security/package-lock.json @@ -15,13 +15,13 @@ "@types/node": "^20.11.19", "@types/shell-quote": "^1.7.5", "typescript": "^5.5.2", - "vitest": "^1.6.0" + "vitest": "^3.2.4" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", "cpu": [ "ppc64" ], @@ -32,13 +32,13 @@ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", "cpu": [ "arm" ], @@ -49,13 +49,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", "cpu": [ "arm64" ], @@ -66,13 +66,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", "cpu": [ "x64" ], @@ -83,13 +83,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", "cpu": [ "arm64" ], @@ -100,13 +100,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", "cpu": [ "x64" ], @@ -117,13 +117,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", "cpu": [ "arm64" ], @@ -134,13 +134,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", "cpu": [ "x64" ], @@ -151,13 +151,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", "cpu": [ "arm" ], @@ -168,13 +168,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", "cpu": [ "arm64" ], @@ -185,13 +185,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", "cpu": [ "ia32" ], @@ -202,13 +202,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", "cpu": [ "loong64" ], @@ -219,13 +219,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", "cpu": [ "mips64el" ], @@ -236,13 +236,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", "cpu": [ "ppc64" ], @@ -253,13 +253,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", "cpu": [ "riscv64" ], @@ -270,13 +270,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", "cpu": [ "s390x" ], @@ -287,13 +287,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", "cpu": [ "x64" ], @@ -304,13 +304,30 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", "cpu": [ "x64" ], @@ -321,13 +338,30 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", "cpu": [ "x64" ], @@ -338,13 +372,30 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", "cpu": [ "x64" ], @@ -355,13 +406,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", "cpu": [ "arm64" ], @@ -372,13 +423,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", "cpu": [ "ia32" ], @@ -389,13 +440,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", "cpu": [ "x64" ], @@ -406,20 +457,7 @@ "win32" ], "engines": { - "node": ">=12" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -723,10 +761,20 @@ "win32" ] }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", "dev": true, "license": "MIT" }, @@ -755,126 +803,128 @@ "license": "MIT" }, "node_modules/@vitest/expect": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz", - "integrity": "sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "1.6.1", - "@vitest/utils": "1.6.1", - "chai": "^4.3.10" + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/runner": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz", - "integrity": "sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "1.6.1", - "p-limit": "^5.0.0", - "pathe": "^1.1.1" + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz", - "integrity": "sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", "dev": true, "license": "MIT", "dependencies": { - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "pretty-format": "^29.7.0" + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz", - "integrity": "sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^2.2.0" + "tinyspy": "^4.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz", - "integrity": "sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", "dev": true, "license": "MIT", "dependencies": { - "diff-sequences": "^29.6.3", - "estree-walker": "^3.0.3", - "loupe": "^2.3.7", - "pretty-format": "^29.7.0" + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, "license": "MIT", "engines": { - "node": "*" + "node": ">=12" } }, "node_modules/cac": { @@ -888,57 +938,30 @@ } }, "node_modules/chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", "dev": true, "license": "MIT", "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" }, "engines": { - "node": ">=4" + "node": ">=18" } }, "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "dev": true, "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.2" - }, "engines": { - "node": "*" - } - }, - "node_modules/confbox": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" + "node": ">= 16" } }, "node_modules/debug": { @@ -960,32 +983,26 @@ } }, "node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", "dev": true, "license": "MIT", - "dependencies": { - "type-detect": "^4.0.0" - }, "engines": { "node": ">=6" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "license": "MIT" }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -993,32 +1010,35 @@ "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" } }, "node_modules/estree-walker": { @@ -1031,28 +1051,32 @@ "@types/estree": "^1.0.0" } }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "node_modules/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, "engines": { - "node": ">=16.17" + "node": ">=12.0.0" }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, "node_modules/fsevents": { @@ -1070,59 +1094,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, "node_modules/js-tokens": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", @@ -1130,32 +1101,12 @@ "dev": true, "license": "MIT" }, - "node_modules/local-pkg": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", - "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mlly": "^1.7.3", - "pkg-types": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } + "license": "MIT" }, "node_modules/magic-string": { "version": "0.30.18", @@ -1167,46 +1118,6 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mlly": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", - "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.15.0", - "pathe": "^2.0.3", - "pkg-types": "^1.3.1", - "ufo": "^1.6.1" - } - }, - "node_modules/mlly/node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1233,92 +1144,21 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", - "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/pathe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", - "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", "dev": true, "license": "MIT", "engines": { - "node": "*" + "node": ">= 14.16" } }, "node_modules/picocolors": { @@ -1328,25 +1168,19 @@ "dev": true, "license": "ISC" }, - "node_modules/pkg-types": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", - "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "dependencies": { - "confbox": "^0.1.8", - "mlly": "^1.7.4", - "pathe": "^2.0.1" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pkg-types/node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, "node_modules/postcss": { "version": "8.5.6", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", @@ -1376,28 +1210,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, "node_modules/rollup": { "version": "4.50.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.0.tgz", @@ -1439,29 +1251,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/shell-quote": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", @@ -1481,19 +1270,6 @@ "dev": true, "license": "ISC" }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -1518,23 +1294,10 @@ "dev": true, "license": "MIT" }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strip-literal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz", - "integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", "dev": true, "license": "MIT", "dependencies": { @@ -1551,10 +1314,44 @@ "dev": true, "license": "MIT" }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, "node_modules/tinypool": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", - "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", "dev": true, "license": "MIT", "engines": { @@ -1562,25 +1359,15 @@ } }, "node_modules/tinyspy": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", - "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" } }, - "node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/typescript": { "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", @@ -1595,13 +1382,6 @@ "node": ">=14.17" } }, - "node_modules/ufo": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", - "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", - "dev": true, - "license": "MIT" - }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", @@ -1610,21 +1390,24 @@ "license": "MIT" }, "node_modules/vite": { - "version": "5.4.19", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz", - "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.4.tgz", + "integrity": "sha512-X5QFK4SGynAeeIt+A7ZWnApdUyHYm+pzv/8/A57LqSGcI88U6R6ipOs3uCesdc6yl7nl+zNO0t8LmqAdXcQihw==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" + "esbuild": "^0.25.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.14" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -1633,19 +1416,25 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "jiti": { + "optional": true + }, "less": { "optional": true }, @@ -1666,74 +1455,84 @@ }, "terser": { "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true } } }, "node_modules/vite-node": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz", - "integrity": "sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.4", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "vite": "^5.0.0" + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/vitest": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz", - "integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "1.6.1", - "@vitest/runner": "1.6.1", - "@vitest/snapshot": "1.6.1", - "@vitest/spy": "1.6.1", - "@vitest/utils": "1.6.1", - "acorn-walk": "^8.3.2", - "chai": "^4.3.10", - "debug": "^4.3.4", - "execa": "^8.0.1", - "local-pkg": "^0.5.0", - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "strip-literal": "^2.0.0", - "tinybench": "^2.5.1", - "tinypool": "^0.8.3", - "vite": "^5.0.0", - "vite-node": "1.6.1", - "why-is-node-running": "^2.2.2" + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.6.1", - "@vitest/ui": "1.6.1", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", "happy-dom": "*", "jsdom": "*" }, @@ -1741,6 +1540,9 @@ "@edge-runtime/vm": { "optional": true }, + "@types/debug": { + "optional": true + }, "@types/node": { "optional": true }, @@ -1758,22 +1560,6 @@ } } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -1790,19 +1576,6 @@ "engines": { "node": ">=8" } - }, - "node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/packages/terminal-security/package.json b/packages/terminal-security/package.json index 67c7c2aa6..459560acf 100644 --- a/packages/terminal-security/package.json +++ b/packages/terminal-security/package.json @@ -17,7 +17,7 @@ "@types/node": "^20.11.19", "@types/shell-quote": "^1.7.5", "typescript": "^5.5.2", - "vitest": "^1.6.0" + "vitest": "^3.2.4" }, "dependencies": { "shell-quote": "^1.8.1" From 06574b506b306cf978eab092e907a10d0d3c46e2 Mon Sep 17 00:00:00 2001 From: Ting-Wai To <40179554+tingwai@users.noreply.github.com> Date: Thu, 4 Sep 2025 17:09:40 -0700 Subject: [PATCH 43/99] chore: disable fail-fast for cli workflow There's some flakey tests in cli test suite, let's not fail fast so one failed matrix won't immediately stop all other running matrixes. --- .github/workflows/cli-pr-checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cli-pr-checks.yml b/.github/workflows/cli-pr-checks.yml index 43a78d06e..94987f57b 100644 --- a/.github/workflows/cli-pr-checks.yml +++ b/.github/workflows/cli-pr-checks.yml @@ -59,6 +59,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] node-version: [18, 20, 22, 24] + fail-fast: false runs-on: ${{ matrix.os }} steps: From 2931a93a0c4e7051b2063c8ce0f76bb959130d7c Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 4 Sep 2025 19:37:30 -0700 Subject: [PATCH 44/99] note whether headless mode / github actions in telemetry --- extensions/cli/src/telemetry/posthogService.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extensions/cli/src/telemetry/posthogService.ts b/extensions/cli/src/telemetry/posthogService.ts index 22c2beb0f..17f164575 100644 --- a/extensions/cli/src/telemetry/posthogService.ts +++ b/extensions/cli/src/telemetry/posthogService.ts @@ -4,7 +4,9 @@ import node_machine_id from "node-machine-id"; import type { PostHog as PostHogType } from "posthog-node"; import { isAuthenticatedConfig, loadAuthConfig } from "../auth/workos.js"; +import { isGitHubActions } from "../util/git.js"; import { logger } from "../util/logger.js"; +import { getVersion } from "../version.js"; export class PosthogService { private os: string | undefined; @@ -15,6 +17,14 @@ export class PosthogService { this.uniqueId = this.getEventUserId(); } + /** + * Check if running in headless mode (-p flag) + */ + private isHeadlessMode(): boolean { + const args = process.argv.slice(2); + return args.includes("-p") || args.includes("--print"); + } + get isEnabled() { return process.env.CONTINUE_CLI_ENABLE_TELEMETRY !== "0"; } @@ -62,9 +72,11 @@ export class PosthogService { const augmentedProperties = { ...properties, os: this.os, - extensionVersion: "", // TODO cn version + extensionVersion: getVersion(), ideName: "cn", ideType: "cli", + isHeadless: this.isHeadlessMode(), + isGitHubCI: isGitHubActions(), }; const payload = { distinctId: this.uniqueId, From d0c7062bd455260edd99cc948e9e80c039c99318 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 4 Sep 2025 19:47:30 -0700 Subject: [PATCH 45/99] use a continue-managed endpoint for version check rather than npm --- extensions/cli/src/version.ts | 74 +++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/extensions/cli/src/version.ts b/extensions/cli/src/version.ts index 7363b920d..745a4142c 100644 --- a/extensions/cli/src/version.ts +++ b/extensions/cli/src/version.ts @@ -2,6 +2,9 @@ import { readFileSync } from "fs"; import { dirname, join } from "path"; import { fileURLToPath } from "url"; +import node_machine_id from "node-machine-id"; + +import { isAuthenticatedConfig, loadAuthConfig } from "./auth/workos.js"; import { logger } from "./util/logger.js"; export function getVersion(): string { @@ -17,29 +20,68 @@ export function getVersion(): string { } } +function getEventUserId(): string { + const authConfig = loadAuthConfig(); + + if (isAuthenticatedConfig(authConfig)) { + return authConfig.userId; + } + + // Fall back to unique machine id if not signed in + return node_machine_id.machineIdSync(); +} + +// Singleton to cache the latest version result +let latestVersionCache: Promise | null = null; + export async function getLatestVersion( signal?: AbortSignal, ): Promise { - try { - const response = await fetch( - "https://registry.npmjs.org/@continuedev/cli/latest", - { signal }, - ); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const data = await response.json(); - return data.version; - } catch (error) { - if (error instanceof Error && error.name === "AbortError") { - // Request was aborted, don't log + // Return cached promise if it exists + if (latestVersionCache) { + return latestVersionCache; + } + + // Create and cache the promise + latestVersionCache = (async () => { + try { + const id = getEventUserId(); + const response = await fetch( + `https://api.continue.dev/cn/info?id=${encodeURIComponent(id)}`, + { signal }, + ); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + const data = await response.json(); + return data.version; + } catch (error) { + if (error instanceof Error && error.name === "AbortError") { + // Request was aborted, don't log + return null; + } + logger.debug( + "Warning: Could not fetch latest version from api.continue.dev", + ); return null; } - logger.debug("Warning: Could not fetch latest version from npm registry"); - return null; - } + })(); + + return latestVersionCache; } +getLatestVersion() + .then((version) => { + if (version) { + logger.info(`Latest version: ${version}`); + } + }) + .catch((error) => { + logger.debug( + `Warning: Could not fetch latest version from api.continue.dev: ${error}`, + ); + }); + export function compareVersions( current: string, latest: string, From 827a8ac413e8ff0a9ed8f0db0677a542e101fe90 Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Thu, 4 Sep 2025 19:53:54 -0700 Subject: [PATCH 46/99] Update extensions/cli/src/telemetry/posthogService.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --- extensions/cli/src/telemetry/posthogService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/cli/src/telemetry/posthogService.ts b/extensions/cli/src/telemetry/posthogService.ts index 17f164575..9802c614b 100644 --- a/extensions/cli/src/telemetry/posthogService.ts +++ b/extensions/cli/src/telemetry/posthogService.ts @@ -18,7 +18,7 @@ export class PosthogService { } /** - * Check if running in headless mode (-p flag) + * Check if running in headless mode (-p/--print flags) */ private isHeadlessMode(): boolean { const args = process.argv.slice(2); From 3ca8a7b6369c3f1ac863cc180ef01f5ab1bb0dd4 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 4 Sep 2025 20:31:48 -0700 Subject: [PATCH 47/99] Handle review comment threads in GitHub workflow --- .github/workflows/respond-to-cubic.yaml | 41 +++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/respond-to-cubic.yaml b/.github/workflows/respond-to-cubic.yaml index 4be94e462..2f3da84bc 100644 --- a/.github/workflows/respond-to-cubic.yaml +++ b/.github/workflows/respond-to-cubic.yaml @@ -172,6 +172,40 @@ jobs: if: steps.check-mention.outputs.contains_mention == 'true' run: npm i -g @continuedev/cli + - name: Get review context + if: steps.check-mention.outputs.contains_mention == 'true' + id: review-context + uses: actions/github-script@v7 + with: + script: | + let reviewContext = ''; + + // Check if this comment is a reply to another review comment + if (context.payload.comment.in_reply_to_id) { + try { + const { data: originalComment } = await github.rest.pulls.getReviewComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: context.payload.comment.in_reply_to_id + }); + + reviewContext = `**Original review comment by @${originalComment.user.login}:** + ${originalComment.body} + + **Reply by @${{ github.event.comment.user.login }}:** + ${{ github.event.comment.body }}`; + } catch (error) { + console.log('Could not fetch original comment, using current comment only'); + reviewContext = `**Review comment by @${{ github.event.comment.user.login }}:** + ${{ github.event.comment.body }}`; + } + } else { + reviewContext = `**Review comment by @${{ github.event.comment.user.login }}:** + ${{ github.event.comment.body }}`; + } + + core.setOutput('context', reviewContext); + - name: Start remote session if: steps.check-mention.outputs.contains_mention == 'true' id: remote-session @@ -180,13 +214,14 @@ jobs: run: | # Create a temporary file for the prompt to handle special characters and newlines properly cat > /tmp/prompt.txt << 'PROMPT_EOF' - Please help with the following code review comment from @${{ github.event.comment.user.login }} on PR #${{ github.event.pull_request.number }}: + Please help with the following code review discussion from PR #${{ github.event.pull_request.number }}: **File:** ${{ github.event.comment.path }} **Line:** ${{ github.event.comment.line || github.event.comment.original_line || 'N/A' }} - **Comment:** ${{ github.event.comment.body }} - Please analyze the specific file and line mentioned, understand the review feedback, implement the necessary changes, and commit them to this branch. + ${{ steps.review-context.outputs.context }} + + Please analyze the specific file and line mentioned, understand the review feedback and any discussion context, implement the necessary changes, and commit them to this branch. PROMPT_EOF # Debug output From 212cad2e351e789bffa23ca9a1ec90c6448a5f03 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 4 Sep 2025 20:34:13 -0700 Subject: [PATCH 48/99] echo branch for debuggng --- .github/workflows/respond-to-cubic.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/respond-to-cubic.yaml b/.github/workflows/respond-to-cubic.yaml index 2f3da84bc..d462b26ba 100644 --- a/.github/workflows/respond-to-cubic.yaml +++ b/.github/workflows/respond-to-cubic.yaml @@ -212,6 +212,9 @@ jobs: env: CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} run: | + # Debug: Echo the branch we're starting the session on + echo "Starting remote session on branch: ${{ github.event.pull_request.head.ref }}" + # Create a temporary file for the prompt to handle special characters and newlines properly cat > /tmp/prompt.txt << 'PROMPT_EOF' Please help with the following code review discussion from PR #${{ github.event.pull_request.number }}: From 9d2a4819c7d214119358ee70f4a1ab01029c0470 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 09:08:10 +0000 Subject: [PATCH 49/99] build(deps): bump actions/github-script from 7 to 8 Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/compliance.yaml | 2 +- .github/workflows/label-merged-prs.yml | 2 +- .github/workflows/respond-to-cubic.yaml | 10 +++++----- .github/workflows/similar-issues.yml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/compliance.yaml b/.github/workflows/compliance.yaml index 76c21d6b1..0e4a04e02 100644 --- a/.github/workflows/compliance.yaml +++ b/.github/workflows/compliance.yaml @@ -41,7 +41,7 @@ jobs: - name: Add PR title guidance comment if: always() && steps.pr-title-check.outputs.valid == 'false' - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const { data: comments } = await github.rest.issues.listComments({ diff --git a/.github/workflows/label-merged-prs.yml b/.github/workflows/label-merged-prs.yml index d6f83eba8..b434d07fd 100644 --- a/.github/workflows/label-merged-prs.yml +++ b/.github/workflows/label-merged-prs.yml @@ -44,7 +44,7 @@ jobs: - name: Determine and apply tier label if: steps.check-author.outputs.should_label == 'true' - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const pr = context.payload.pull_request; diff --git a/.github/workflows/respond-to-cubic.yaml b/.github/workflows/respond-to-cubic.yaml index 4be94e462..d683bd883 100644 --- a/.github/workflows/respond-to-cubic.yaml +++ b/.github/workflows/respond-to-cubic.yaml @@ -29,7 +29,7 @@ jobs: - name: Add eyes reaction to comment if: steps.check-mention.outputs.contains_mention == 'true' - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | await github.rest.reactions.createForIssueComment({ @@ -49,7 +49,7 @@ jobs: - name: Get PR information if: steps.check-mention.outputs.contains_mention == 'true' id: pr-info - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const { data: pr } = await github.rest.pulls.get({ @@ -107,7 +107,7 @@ jobs: - name: Comment with session URL if: steps.check-mention.outputs.contains_mention == 'true' && steps.remote-session.outputs.session_url - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const commentBody = `I've started [a remote session](${{ steps.remote-session.outputs.session_url }}) to help with your request: @@ -144,7 +144,7 @@ jobs: - name: Add eyes reaction to comment if: steps.check-mention.outputs.contains_mention == 'true' - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | await github.rest.reactions.createForPullRequestReviewComment({ @@ -211,7 +211,7 @@ jobs: - name: Comment with session URL if: steps.check-mention.outputs.contains_mention == 'true' && steps.remote-session.outputs.session_url - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const commentBody = `I've started [a remote session](${{ steps.remote-session.outputs.session_url }}) to help with your request: diff --git a/.github/workflows/similar-issues.yml b/.github/workflows/similar-issues.yml index 9873a0585..4abf1cdd3 100644 --- a/.github/workflows/similar-issues.yml +++ b/.github/workflows/similar-issues.yml @@ -190,7 +190,7 @@ jobs: echo "confidence=$CONFIDENCE" >> $GITHUB_OUTPUT - name: Comment with analysis - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | let comment = ''; @@ -307,7 +307,7 @@ jobs: - name: Add labels if: github.event_name == 'issues' - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const labels = []; From 6dae1ed15723312d08312a6384a630031be136b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 17:47:38 +0000 Subject: [PATCH 50/99] build(deps): bump tmp and @openapitools/openapi-generator-cli Bumps [tmp](https://github.com/raszi/node-tmp) to 0.2.5 and updates ancestor dependency [@openapitools/openapi-generator-cli](https://github.com/OpenAPITools/openapi-generator-cli). These dependencies need to be updated together. Updates `tmp` from 0.2.3 to 0.2.5 - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.5) Updates `@openapitools/openapi-generator-cli` from 2.20.2 to 2.23.1 - [Release notes](https://github.com/OpenAPITools/openapi-generator-cli/releases) - [Changelog](https://github.com/OpenAPITools/openapi-generator-cli/blob/master/.releaserc) - [Commits](https://github.com/OpenAPITools/openapi-generator-cli/compare/v2.20.2...v2.23.1) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.5 dependency-type: indirect - dependency-name: "@openapitools/openapi-generator-cli" dependency-version: 2.23.1 dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- extensions/vscode/package-lock.json | 678 +++++++++++++++------------- extensions/vscode/package.json | 2 +- 2 files changed, 368 insertions(+), 312 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index d876c83d8..a0fa56130 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.3.2", + "version": "1.3.3", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "file:../../packages/config-types", @@ -63,7 +63,7 @@ "devDependencies": { "@biomejs/biome": "1.6.4", "@nestjs/common": "^11.0.16", - "@openapitools/openapi-generator-cli": "^2.20.0", + "@openapitools/openapi-generator-cli": "^2.23.1", "@types/chai": "^5.0.1", "@types/cors": "^2.8.17", "@types/express": "^4.17.21", @@ -108,6 +108,7 @@ "@continuedev/fetch": "file:../packages/fetch", "@continuedev/llm-info": "file:../packages/llm-info", "@continuedev/openai-adapters": "file:../packages/openai-adapters", + "@continuedev/terminal-security": "file:../packages/terminal-security", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", @@ -745,6 +746,17 @@ "node": ">=14.21.3" } }, + "node_modules/@borewit/text-codec": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.1.1.tgz", + "integrity": "sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/@continuedev/config-types": { "resolved": "../../packages/config-types", "link": true @@ -1303,6 +1315,29 @@ "deprecated": "Use @eslint/object-schema instead", "dev": true }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1527,9 +1562,9 @@ "integrity": "sha512-/cPZD907UNz55yrc/ud4wDgQKtU1TvkD9jeqZWG6J4IMmZkp6zgjkQcKA8UvpkZlcpPHvc8J17sGzLFbP/LUYg==" }, "node_modules/@nestjs/axios": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-4.0.0.tgz", - "integrity": "sha512-1cB+Jyltu/uUPNQrpUimRHEQHrnQrpLzVj6dU3dgn6iDDDdahr10TgHFGTmw5VuJ9GzKZsCLDL78VSwJAs/9JQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-4.0.1.tgz", + "integrity": "sha512-68pFJgu+/AZbWkGu65Z3r55bTsCPlgyKaV4BSG8yUAD72q1PPuyVRgUwFv6BxdnibTUHlyxm06FmYWNC+bjN7A==", "dev": true, "license": "MIT", "peerDependencies": { @@ -1539,13 +1574,13 @@ } }, "node_modules/@nestjs/common": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.1.tgz", - "integrity": "sha512-crzp+1qeZ5EGL0nFTPy9NrVMAaUWewV5AwtQyv6SQ9yQPXwRl9W9hm1pt0nAtUu5QbYMbSuo7lYcF81EjM+nCA==", + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.6.tgz", + "integrity": "sha512-krKwLLcFmeuKDqngG2N/RuZHCs2ycsKcxWIDgcm7i1lf3sQ0iG03ci+DsP/r3FcT/eJDFsIHnKtNta2LIi7PzQ==", "dev": true, "license": "MIT", "dependencies": { - "file-type": "20.5.0", + "file-type": "21.0.0", "iterare": "1.2.1", "load-esm": "1.0.2", "tslib": "2.8.1", @@ -1571,9 +1606,9 @@ } }, "node_modules/@nestjs/core": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.1.tgz", - "integrity": "sha512-UFoUAgLKFT+RwHTANJdr0dF7p0qS9QjkaUPjg8aafnjM/qxxxrUVDB49nVvyMlk+Hr1+vvcNaOHbWWQBxoZcHA==", + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.6.tgz", + "integrity": "sha512-siWX7UDgErisW18VTeJA+x+/tpNZrJewjTBsRPF3JVxuWRuAB1kRoiJcxHgln8Lb5UY9NdvklITR84DUEXD0Cg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1804,27 +1839,26 @@ } }, "node_modules/@openapitools/openapi-generator-cli": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.20.2.tgz", - "integrity": "sha512-dNFwQcQu6+rmEWSJj4KUx468+p6Co7nfpVgi5QEfVhzKj7wBytz9GEhCN2qmVgtg3ZX8H6nxbXI8cjh7hAxAqg==", + "version": "2.23.1", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.23.1.tgz", + "integrity": "sha512-Kd5EZqzbcIXf6KRlpUrheHMzQNRHsJWzAGrm4ncWCNhnQl+Mh6TsFcqq+hIetgiFCknWBH6cZ2f37SxPxaon4w==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@nestjs/axios": "4.0.0", - "@nestjs/common": "11.1.1", - "@nestjs/core": "11.1.1", + "@nestjs/axios": "4.0.1", + "@nestjs/common": "11.1.6", + "@nestjs/core": "11.1.6", "@nuxtjs/opencollective": "0.3.2", - "axios": "1.9.0", + "axios": "1.11.0", "chalk": "4.1.2", "commander": "8.3.0", "compare-versions": "4.1.4", - "concurrently": "6.5.1", + "concurrently": "9.2.1", "console.table": "0.10.0", - "fs-extra": "11.3.0", - "glob": "9.3.5", - "inquirer": "8.2.6", - "lodash": "4.17.21", + "fs-extra": "11.3.1", + "glob": "11.0.3", + "inquirer": "8.2.7", "proxy-agent": "6.5.0", "reflect-metadata": "0.2.2", "rxjs": "7.8.2", @@ -1841,19 +1875,10 @@ "url": "https://opencollective.com/openapi_generator" } }, - "node_modules/@openapitools/openapi-generator-cli/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/@openapitools/openapi-generator-cli/node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "version": "11.3.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz", + "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==", "dev": true, "license": "MIT", "dependencies": { @@ -1866,45 +1891,86 @@ } }, "node_modules/@openapitools/openapi-generator-cli/node_modules/glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", "dev": true, + "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@openapitools/openapi-generator-cli/node_modules/minimatch": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", - "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", "dev": true, + "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "@isaacs/brace-expansion": "^5.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@openapitools/openapi-generator-cli/node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@pkgjs/parseargs": { @@ -3496,6 +3562,7 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -3511,6 +3578,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -3730,13 +3798,13 @@ "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==" }, "node_modules/axios": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", - "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -4174,6 +4242,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", @@ -4280,10 +4361,11 @@ } }, "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", + "dev": true, + "license": "MIT" }, "node_modules/check-error": { "version": "1.0.3", @@ -4455,6 +4537,7 @@ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", "dev": true, + "license": "ISC", "engines": { "node": ">= 10" } @@ -4846,69 +4929,28 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/concurrently": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", - "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", + "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", "dev": true, + "license": "MIT", "dependencies": { - "chalk": "^4.1.0", - "date-fns": "^2.16.1", - "lodash": "^4.17.21", - "rxjs": "^6.6.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^8.1.0", - "tree-kill": "^1.2.2", - "yargs": "^16.2.0" + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.3", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" }, "bin": { - "concurrently": "bin/concurrently.js" + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" }, "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/concurrently/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/concurrently/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/concurrently/node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" + "node": ">=18" }, - "engines": { - "npm": ">=2.0.0" - } - }, - "node_modules/concurrently/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, "node_modules/concurrently/node_modules/supports-color": { @@ -4916,6 +4958,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4926,47 +4969,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/concurrently/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/concurrently/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/concurrently/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/consola": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", @@ -5057,9 +5059,10 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", - "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5168,22 +5171,6 @@ "node": ">=18" } }, - "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, "node_modules/dbinfoz": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.14.0.tgz", @@ -5515,6 +5502,20 @@ "react": ">=16.12.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -5673,12 +5674,10 @@ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -5697,6 +5696,33 @@ "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", "license": "MIT" }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -6257,44 +6283,6 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/external-editor/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/external-editor/node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -6402,6 +6390,7 @@ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -6417,6 +6406,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -6434,19 +6424,19 @@ } }, "node_modules/file-type": { - "version": "20.5.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-20.5.0.tgz", - "integrity": "sha512-BfHZtG/l9iMm4Ecianu7P8HRD2tBHLtjXinm4X62XBOYzi7CYA7jyqfJzOvXHqzVrVPYqBo2/GvbARMaaJkKVg==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.0.0.tgz", + "integrity": "sha512-ek5xNX2YBYlXhiUXui3D/BXa3LdqPmoLJ7rqEx2bKJ7EAUEfmXgW0Das7Dc6Nr9MvqaOnIqiPV0mZk/r/UpNAg==", "dev": true, "license": "MIT", "dependencies": { - "@tokenizer/inflate": "^0.2.6", - "strtok3": "^10.2.0", + "@tokenizer/inflate": "^0.2.7", + "strtok3": "^10.2.2", "token-types": "^6.0.0", "uint8array-extras": "^1.4.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sindresorhus/file-type?sponsor=1" @@ -6635,11 +6625,12 @@ } }, "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -6669,12 +6660,15 @@ } }, "node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -6840,15 +6834,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -6857,6 +6857,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stdin": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", @@ -7003,11 +7016,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7108,10 +7122,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -7119,10 +7134,14 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, "engines": { "node": ">= 0.4" }, @@ -7509,16 +7528,17 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, "node_modules/inquirer": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", - "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz", + "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==", "dev": true, + "license": "MIT", "dependencies": { + "@inquirer/external-editor": "^1.0.0", "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", "cli-cursor": "^3.1.0", "cli-width": "^3.0.0", - "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.21", "mute-stream": "0.0.8", @@ -7534,11 +7554,46 @@ "node": ">=12.0.0" } }, + "node_modules/inquirer/node_modules/@inquirer/external-editor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.1.tgz", + "integrity": "sha512-Oau4yL24d2B5IL4ma4UpbQigkVhzPDXLoqy1ggK4gnHg/stmkffJE4oOXHXF3uz0UEpywG68KcyXsyYpA1Re/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.6.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/inquirer/node_modules/@types/node": { + "version": "24.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.1.tgz", + "integrity": "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~7.10.0" + } + }, "node_modules/inquirer/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -7548,6 +7603,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7555,6 +7611,15 @@ "node": ">=8" } }, + "node_modules/inquirer/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -8586,6 +8651,15 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/mdast-util-definitions": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", @@ -10246,15 +10320,6 @@ "node": ">=8" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ovsx": { "version": "0.8.4", "resolved": "https://registry.npmjs.org/ovsx/-/ovsx-0.8.4.tgz", @@ -10596,20 +10661,6 @@ "node": "*" } }, - "node_modules/peek-readable": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-7.0.0.tgz", - "integrity": "sha512-nri2TO5JE3/mRryik9LlHFT53cgHfRK0Lt0BAZQXku/AW3E6XLt2GaY8siWi7dvW/m1z0ecn+J+bpDa9ZN3IsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -11799,6 +11850,7 @@ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -12082,6 +12134,19 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz", + "integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", @@ -12259,12 +12324,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/spawn-command": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz", - "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==", - "dev": true - }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -12552,14 +12611,13 @@ "license": "MIT" }, "node_modules/strtok3": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.2.2.tgz", - "integrity": "sha512-Xt18+h4s7Z8xyZ0tmBoRmzxcop97R4BAh+dXouUDCYn+Em+1P3qpkUfI5ueWLT8ynC5hZ+q4iPEmGG1urvQGBg==", + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.4.tgz", + "integrity": "sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==", "dev": true, "license": "MIT", "dependencies": { - "@tokenizer/token": "^0.3.0", - "peek-readable": "^7.0.0" + "@tokenizer/token": "^0.3.0" }, "engines": { "node": ">=18" @@ -13157,7 +13215,8 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/timers-ext": { "version": "0.1.8", @@ -13254,10 +13313,11 @@ } }, "node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.14" } @@ -13288,12 +13348,13 @@ } }, "node_modules/token-types": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.0.0.tgz", - "integrity": "sha512-lbDrTLVsHhOMljPscd0yitpozq7Ga2M5Cvez5AjGg8GASBjtt6iERCAJ93yommPmz62fb45oFIXHEZ3u9bfJEA==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.1.tgz", + "integrity": "sha512-kh9LVIWH5CnL63Ipf0jhlBIy0UsrMj/NJDfpsy1SqOXlLKEVyXXYrnFxFT1yOOYVGBSApeVnjPw/sBz5BfEjAQ==", "dev": true, "license": "MIT", "dependencies": { + "@borewit/text-codec": "^0.1.0", "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" }, @@ -13343,6 +13404,7 @@ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, + "license": "MIT", "bin": { "tree-kill": "cli.js" } @@ -13545,9 +13607,9 @@ } }, "node_modules/uint8array-extras": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.4.0.tgz", - "integrity": "sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", "dev": true, "license": "MIT", "engines": { @@ -16509,6 +16571,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -16559,6 +16622,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -16568,6 +16632,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -16692,15 +16757,6 @@ "node": ">=12" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index ee1649b03..d0e7e89ea 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -699,7 +699,7 @@ "devDependencies": { "@biomejs/biome": "1.6.4", "@nestjs/common": "^11.0.16", - "@openapitools/openapi-generator-cli": "^2.20.0", + "@openapitools/openapi-generator-cli": "^2.23.1", "@types/chai": "^5.0.1", "@types/cors": "^2.8.17", "@types/express": "^4.17.21", From 50c6f90633b51025b9a82d7b6bd4b412dc56eb9c Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 5 Sep 2025 11:36:31 -0700 Subject: [PATCH 51/99] update Bash tool instructions --- extensions/cli/src/tools/runTerminalCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/cli/src/tools/runTerminalCommand.ts b/extensions/cli/src/tools/runTerminalCommand.ts index 58d3939e5..726c86501 100644 --- a/extensions/cli/src/tools/runTerminalCommand.ts +++ b/extensions/cli/src/tools/runTerminalCommand.ts @@ -33,7 +33,7 @@ export const runTerminalCommandTool: Tool = { displayName: "Bash", description: `Executes a terminal command and returns the output -The command will be executed from the current working directory: ${process.cwd()} +Commands are automatically executed from the current working directory (${process.cwd()}), so there's no need to change directories with 'cd' commands. `, parameters: { command: { From e6cf3fd7566c73401a54334682cd9d50776acf49 Mon Sep 17 00:00:00 2001 From: Jakub Blach Date: Thu, 4 Sep 2025 17:21:01 +0200 Subject: [PATCH 52/99] fix: dispose JCEF JSQuery handler correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The JCEF browser wasn’t registered as a Disposable when held by the service. Service was disposed, but we had leak, because this caused JSQuery handlers to run on a disposed browser (browsers are disposed automatically by default according to docs), throwing exceptions when opening another project. This fix registers both the browser and the handler properly. I tested it manually, and opening multiple projects no longer causes errors. Note: I think it would be useful to have an e2e test at some stage that opens a project, closes it, and then opens another one. Such a test should catch this issue early. --- .../browser/ContinueBrowser.kt | 12 +++++++++--- .../browser/ContinueBrowserService.kt | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowser.kt index 00c82fe29..5b4f862c0 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowser.kt @@ -1,28 +1,29 @@ package com.github.continuedev.continueintellijextension.browser import com.github.continuedev.continueintellijextension.constants.MessageTypes -import com.github.continuedev.continueintellijextension.services.ContinueExtensionSettings import com.github.continuedev.continueintellijextension.services.ContinuePluginService import com.github.continuedev.continueintellijextension.utils.uuid import com.google.gson.Gson +import com.intellij.openapi.Disposable import com.intellij.openapi.components.service import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.project.Project +import com.intellij.openapi.util.Disposer import com.intellij.ui.jcef.* import org.cef.CefApp import org.cef.browser.CefBrowser import org.cef.handler.CefLoadHandlerAdapter import javax.swing.JComponent -class ContinueBrowser(private val project: Project) { +class ContinueBrowser(private val project: Project): Disposable { private val log = Logger.getInstance(ContinueBrowser::class.java.simpleName) private val browser: JBCefBrowser = JBCefBrowser.createBuilder().setOffScreenRendering(true).build() + private val myJSQueryOpenInBrowser = JBCefJSQuery.create(browser as JBCefBrowserBase) init { CefApp.getInstance().registerSchemeHandlerFactory("http", "continue", CustomSchemeHandlerFactory()) browser.jbCefClient.setProperty(JBCefClient.Properties.JS_QUERY_POOL_SIZE, 200) - val myJSQueryOpenInBrowser = JBCefJSQuery.create(browser as JBCefBrowserBase) myJSQueryOpenInBrowser.addHandler { msg: String? -> val json = Gson().fromJson(msg, BrowserMessage::class.java) val messageType = json.messageType @@ -100,6 +101,11 @@ class ContinueBrowser(private val project: Project) { browser.cefBrowser.executeJavaScript(script, getGuiUrl(), 0) } + override fun dispose() { + Disposer.dispose(myJSQueryOpenInBrowser) + Disposer.dispose(browser) + } + // todo: remove and use types.Message private data class BrowserMessage( val messageType: String, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowserService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowserService.kt index 2bc7334a5..155d9ffe8 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowserService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/browser/ContinueBrowserService.kt @@ -1,22 +1,32 @@ package com.github.continuedev.continueintellijextension.browser +import com.intellij.openapi.Disposable import com.intellij.openapi.components.Service import com.intellij.openapi.components.service import com.intellij.openapi.project.Project +import com.intellij.openapi.util.Disposer import com.intellij.ui.jcef.JBCefApp @Service(Service.Level.PROJECT) -class ContinueBrowserService(project: Project) { +class ContinueBrowserService(project: Project): Disposable { private val browser: ContinueBrowser? = if (JBCefApp.isSupported()) ContinueBrowser(project) else null + override fun dispose() { + if (browser != null) + Disposer.dispose(browser) + } + companion object { - fun Project.getBrowser() = - service().browser + fun Project.getBrowser(): ContinueBrowser? { + if (isDisposed) + return null + return service().browser + } } } From 6789833a77eb57e6a06d2578d2497fc17751e191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82ach?= Date: Fri, 5 Sep 2025 21:35:16 +0200 Subject: [PATCH 53/99] fix: ignore Stream closed exceptions on flush (#7610) Solves: CON-3587 This exception occurs if continue-binary is killed or throws some unexpected error, but in the previous version, the exception would bubble up and be logged as an IDE error (visible for users). After this change, we catch this exception and only log it, because there's no point in throwing it. The handler still recognizes this invalid state and gracefully restarts the binary. --- .../continue/process/ContinueProcessHandler.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueProcessHandler.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueProcessHandler.kt index 04e4d3d2e..9e269226b 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueProcessHandler.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueProcessHandler.kt @@ -43,10 +43,14 @@ class ContinueProcessHandler( } scope.launch(Dispatchers.IO) { for (message in pendingWrites) { - log.debug("Write: $message") - writer.write(message) - writer.write("\r\n") - writer.flush() + try { + log.debug("Write: $message") + writer.write(message) + writer.write("\r\n") + writer.flush() + } catch (e: IOException) { + log.warn(e) + } } } } From 18ec563762fdb45635c9e4da10f3664a95e1e2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82ach?= Date: Fri, 5 Sep 2025 21:36:17 +0200 Subject: [PATCH 54/99] fix: don't use override-only actionPerformed to invoke action (#7608) It's resolving one of problems during plugin verification. I manually tested this feature to make sure there are no regressions. Solves error: Override-only method AddLicenseKey.actionPerformed(AnActionEvent) is invoked in AddLicenseKey.createErrorAction$1.invoke(...). This method is marked with @ApiStatus.OverrideOnly annotation, which indicates that the method must be only overridden but not invoked by client code. See documentation of the @ApiStatus.OverrideOnly for more info. --- .../error/ContinueErrorSubmitter.kt | 1 + .../license/AddLicenseKey.kt | 29 ++++++++----------- .../license/AddLicenseKeyDialog.kt | 4 +-- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorSubmitter.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorSubmitter.kt index 69ea9b911..9d806ee66 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorSubmitter.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorSubmitter.kt @@ -21,6 +21,7 @@ class ContinueErrorSubmitter : ErrorReportSubmitter() { consumer: Consumer ): Boolean { try { + // todo: IdeaReportingEvent is deprecated; migrate to IdeaLoggingEvent + figure out how to read attachments val event = events.filterIsInstance() .firstOrNull() ?: return false service().report( diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKey.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKey.kt index 2402ff6c4..66a096f5e 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKey.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKey.kt @@ -5,22 +5,27 @@ import com.github.continuedev.continueintellijextension.utils.castNestedOrNull import com.intellij.notification.NotificationAction import com.intellij.notification.NotificationGroupManager import com.intellij.notification.NotificationType -import com.intellij.openapi.actionSystem.ActionManager -import com.intellij.openapi.actionSystem.ActionPlaces import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.service +import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper class AddLicenseKey : AnAction() { override fun actionPerformed(e: AnActionEvent) { - val dialog = AddLicenseKeyDialog(e.project) + performAddLicenseKey(e.project) + } + + private fun performAddLicenseKey(project: Project?) { + if (project == null) + return + val dialog = AddLicenseKeyDialog(project) dialog.show() if (dialog.exitCode != DialogWrapper.OK_EXIT_CODE) return - val messenger = e.project?.service()?.coreMessenger + val messenger = project.service().coreMessenger ?: return messenger.request("mdm/setLicenseKey", mapOf("licenseKey" to dialog.licenseKey), null) { response -> val isValid = response.castNestedOrNull("content") ?: false @@ -28,7 +33,7 @@ class AddLicenseKey : AnAction() { createSuccessAction() else createErrorAction() - notification.notify(e.project) + notification.notify(project) } } @@ -37,7 +42,7 @@ class AddLicenseKey : AnAction() { "License key is valid. A restart is required for it to take effect.", NotificationType.INFORMATION ).addAction( - NotificationAction.create("Restart IDE") { event, notification -> + NotificationAction.create("Restart IDE") { _, _ -> ApplicationManager.getApplication().restart() } ) @@ -49,17 +54,7 @@ class AddLicenseKey : AnAction() { ).addAction( NotificationAction.create("Try again") { event, notification -> notification.expire() - val action = this@AddLicenseKey - action.actionPerformed( - AnActionEvent( - null, - event.dataContext, - ActionPlaces.UNKNOWN, - action.templatePresentation.clone(), - ActionManager.getInstance(), - 0 - ) - ) + performAddLicenseKey(event.project) } ) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKeyDialog.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKeyDialog.kt index 4ba6f2e21..af8763a21 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKeyDialog.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/license/AddLicenseKeyDialog.kt @@ -3,9 +3,9 @@ package com.github.continuedev.continueintellijextension.license import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.ui.ValidationInfo +import com.intellij.ui.dsl.builder.AlignX import com.intellij.ui.dsl.builder.bindText import com.intellij.ui.dsl.builder.panel -import com.intellij.ui.dsl.gridLayout.HorizontalAlign import javax.swing.JComponent class AddLicenseKeyDialog(project: Project?) : DialogWrapper(project) { @@ -22,7 +22,7 @@ class AddLicenseKeyDialog(project: Project?) : DialogWrapper(project) { panel { row { textField().bindText(::licenseKey) - .horizontalAlign(HorizontalAlign.FILL) + .align(AlignX.FILL) .focused() .validationOnApply { if (it.text.isBlank()) From b290e5b4dc13ef25bb233b3ef7b7cdd2bea6c6a8 Mon Sep 17 00:00:00 2001 From: Aditya Mitra <61635505+uinstinct@users.noreply.github.com> Date: Sat, 6 Sep 2025 01:09:12 +0530 Subject: [PATCH 55/99] fix(docs): broken settings page links (#7598) * fix(docs): broken settings page links * undo minor changes --- docs/features/autocomplete/how-to-customize.mdx | 2 +- docs/reference/deprecated-docs.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/features/autocomplete/how-to-customize.mdx b/docs/features/autocomplete/how-to-customize.mdx index 854be157e..4fab64383 100644 --- a/docs/features/autocomplete/how-to-customize.mdx +++ b/docs/features/autocomplete/how-to-customize.mdx @@ -3,6 +3,6 @@ title: “Customize Autocomplete Settings in Continue” description: “Learn how to customize autocomplete behavior in Continue, including user settings, configuration options, and adjustments to improve AI code suggestions in your IDE.” --- -Continue offers a handful of settings to customize autocomplete behavior. Visit the [User Settings Page](/customize/settings) to manage these settings. +Continue offers a handful of settings to customize autocomplete behavior. Visit the User Settings Page (Gear Icon) to manage these settings. For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](/customize/deep-dives/autocomplete). diff --git a/docs/reference/deprecated-docs.mdx b/docs/reference/deprecated-docs.mdx index c972db7fa..a62e88b49 100644 --- a/docs/reference/deprecated-docs.mdx +++ b/docs/reference/deprecated-docs.mdx @@ -408,4 +408,4 @@ The following configuration example includes: -This setup could also involve enabling Chromium as a backup for local documentation through the [User Settings Page](../customize/settings). \ No newline at end of file +This setup could also involve enabling Chromium as a backup for local documentation through the User Settings Page (Gear Icon). \ No newline at end of file From a698049b3a6654a0c72a3c525e9c8d11a885b8be Mon Sep 17 00:00:00 2001 From: Ting-Wai To <40179554+tingwai@users.noreply.github.com> Date: Fri, 5 Sep 2025 15:22:50 -0700 Subject: [PATCH 56/99] chore: bump package.json --- 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 ee1649b03..6e9c5b01a 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.3.3", + "version": "1.3.4", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 1218c14f895b00252130b21a26abb90dd201be04 Mon Sep 17 00:00:00 2001 From: Aditya Mitra <61635505+uinstinct@users.noreply.github.com> Date: Sat, 6 Sep 2025 04:20:50 +0530 Subject: [PATCH 57/99] feat: add tooltips to user settings page (#7597) --- gui/src/components/gui/Switch.tsx | 13 ++++++- gui/src/pages/config/UserSettingsForm.tsx | 46 ++++++++++++++++++++--- 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/gui/src/components/gui/Switch.tsx b/gui/src/components/gui/Switch.tsx index 0af15f8eb..23d232124 100644 --- a/gui/src/components/gui/Switch.tsx +++ b/gui/src/components/gui/Switch.tsx @@ -1,5 +1,7 @@ +import { InformationCircleIcon } from "@heroicons/react/24/outline"; import React, { ReactNode } from "react"; import { vscButtonBackground } from ".."; +import { ToolTip } from "./Tooltip"; type ToggleSwitchProps = { isToggled: boolean; @@ -8,6 +10,7 @@ type ToggleSwitchProps = { size?: number; showIfToggled?: ReactNode; disabled?: boolean; + tooltip?: string; }; const ToggleSwitch: React.FC = ({ @@ -17,12 +20,20 @@ const ToggleSwitch: React.FC = ({ size = 16, showIfToggled, disabled = false, + tooltip, }) => { return (
- {text} + + {text}{" "} + {tooltip && ( + + + + )} +
{isToggled && !!showIfToggled && showIfToggled}
{/* */}