From 717e11321b9ece0781b9b531a3a2b329ae339b42 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 16 Jul 2025 17:26:01 -0700 Subject: [PATCH 01/48] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4a0595a38..4ff2b89da 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,6 +11,7 @@ body: attributes: label: Before submitting your bug report options: + - label: I've tried using the "Ask AI" feature on the [Continue docs site](https://docs.continue.dev/) to see if the docs have an answer - label: I believe this is a bug. I'll try to join the [Continue Discord](https://discord.gg/NWtdYexhMs) for questions required: false - label: I'm not able to find an [open issue](https://github.com/continuedev/continue/issues?q=is%3Aopen+is%3Aissue) that reports the same bug From a69900c1462110a991ece8f5857de6abc3e1cc77 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 16 Jul 2025 17:27:44 -0700 Subject: [PATCH 02/48] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4ff2b89da..cc85d0d0a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -12,6 +12,7 @@ body: label: Before submitting your bug report options: - label: I've tried using the "Ask AI" feature on the [Continue docs site](https://docs.continue.dev/) to see if the docs have an answer + required: false - label: I believe this is a bug. I'll try to join the [Continue Discord](https://discord.gg/NWtdYexhMs) for questions required: false - label: I'm not able to find an [open issue](https://github.com/continuedev/continue/issues?q=is%3Aopen+is%3Aissue) that reports the same bug From 194b802ed3b1c67afeb6abfa7153401acecd51b6 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sat, 19 Jul 2025 19:39:09 +0200 Subject: [PATCH 03/48] fix: set high default pruning length, let server throw error unless context length known --- core/llm/constants.ts | 2 ++ core/llm/countTokens.ts | 10 ++++++---- core/llm/index.ts | 13 ++++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/core/llm/constants.ts b/core/llm/constants.ts index 90de5c64d..b6759663d 100644 --- a/core/llm/constants.ts +++ b/core/llm/constants.ts @@ -1,6 +1,7 @@ const DEFAULT_MAX_TOKENS = 4096; const DEFAULT_CONTEXT_LENGTH = 32_768; const DEFAULT_TEMPERATURE = 0.5; +const DEFAULT_PRUNING_LENGTH = 128000; const DEFAULT_ARGS = { maxTokens: DEFAULT_MAX_TOKENS, @@ -24,5 +25,6 @@ export { DEFAULT_MAX_BATCH_SIZE, DEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_TOKENS, + DEFAULT_PRUNING_LENGTH, PROXY_URL, }; diff --git a/core/llm/countTokens.ts b/core/llm/countTokens.ts index 852638d1c..03a106144 100644 --- a/core/llm/countTokens.ts +++ b/core/llm/countTokens.ts @@ -17,6 +17,7 @@ import { import { renderChatMessage } from "../util/messageContent.js"; import { AsyncEncoder, LlamaAsyncEncoder } from "./asyncEncoder.js"; +import { DEFAULT_PRUNING_LENGTH } from "./constants.js"; import llamaTokenizer from "./llamaTokenizer.js"; interface Encoding { encode: Tiktoken["encode"]; @@ -409,14 +410,14 @@ function pruneRawPromptFromTop( function compileChatMessages({ modelName, msgs, - contextLength, + knownContextLength, maxTokens, supportsImages, tools, }: { modelName: string; msgs: ChatMessage[]; - contextLength: number; + knownContextLength: number | undefined; maxTokens: number; supportsImages: boolean; tools?: Tool[]; @@ -465,6 +466,7 @@ function compileChatMessages({ toolTokens = countToolsTokens(tools, modelName); } + const contextLength = knownContextLength ?? DEFAULT_PRUNING_LENGTH; const countingSafetyBuffer = getTokenCountingBufferSafety(contextLength); const minOutputTokens = Math.min(MIN_RESPONSE_TOKENS, maxTokens); @@ -480,12 +482,12 @@ function compileChatMessages({ inputTokensAvailable -= lastMessagesTokens; // Make sure there's enough context for the non-excludable items - if (inputTokensAvailable < 0) { + if (knownContextLength !== undefined && inputTokensAvailable < 0) { throw new Error( `Not enough context available to include the system message, last user message, and tools. There must be at least ${minOutputTokens} tokens remaining for output. Request had the following token counts: - - contextLength: ${contextLength} + - contextLength: ${knownContextLength} - counting safety buffer: ${countingSafetyBuffer} - tools: ~${toolTokens} - system message: ~${systemMsgTokens} diff --git a/core/llm/index.ts b/core/llm/index.ts index fa16b8591..4d31e0902 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -145,7 +145,7 @@ export abstract class BaseLLM implements ILLM { baseChatSystemMessage?: string; basePlanSystemMessage?: string; baseAgentSystemMessage?: string; - contextLength: number; + _contextLength: number | undefined; maxStopWords?: number | undefined; completionOptions: CompletionOptions; requestOptions?: RequestOptions; @@ -217,8 +217,7 @@ export abstract class BaseLLM implements ILLM { this.baseAgentSystemMessage = options.baseAgentSystemMessage; this.basePlanSystemMessage = options.basePlanSystemMessage; this.baseChatSystemMessage = options.baseChatSystemMessage; - this.contextLength = - options.contextLength ?? llmInfo?.contextLength ?? DEFAULT_CONTEXT_LENGTH; + this._contextLength = options.contextLength ?? llmInfo?.contextLength; this.maxStopWords = options.maxStopWords ?? this.maxStopWords; this.completionOptions = { ...options.completionOptions, @@ -292,6 +291,10 @@ export abstract class BaseLLM implements ILLM { this.autocompleteOptions = options.autocompleteOptions; } + get contextLength() { + return this._contextLength ?? DEFAULT_CONTEXT_LENGTH; + } + getConfigurationStatus() { return LLMConfigurationStatuses.VALID; } @@ -895,7 +898,7 @@ export abstract class BaseLLM implements ILLM { return compileChatMessages({ modelName: completionOptions.model, msgs: message, - contextLength: this.contextLength, + knownContextLength: this._contextLength, maxTokens: completionOptions.maxTokens ?? DEFAULT_MAX_TOKENS, supportsImages: this.supportsImages(), tools: options.tools, @@ -944,7 +947,7 @@ export abstract class BaseLLM implements ILLM { const { compiledChatMessages } = compileChatMessages({ modelName: completionOptions.model, msgs: _messages, - contextLength: this.contextLength, + knownContextLength: this._contextLength, maxTokens: completionOptions.maxTokens ?? DEFAULT_MAX_TOKENS, supportsImages: this.supportsImages(), tools: options.tools, From 32911c07790b0cf2f7e2d9ff67ad5081184dbb67 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sat, 19 Jul 2025 19:47:01 +0200 Subject: [PATCH 04/48] fix: assign to contextLength basellm getter --- core/llm/llms/HuggingFaceTGI.ts | 2 +- core/llm/llms/Ollama.ts | 2 +- core/llm/llms/Vllm.ts | 2 +- core/util/generateRepoMap.test.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/llm/llms/HuggingFaceTGI.ts b/core/llm/llms/HuggingFaceTGI.ts index 8a86634c8..ca4acc6d9 100644 --- a/core/llm/llms/HuggingFaceTGI.ts +++ b/core/llm/llms/HuggingFaceTGI.ts @@ -25,7 +25,7 @@ class HuggingFaceTGI extends BaseLLM { } const json = await response.json(); this.model = json.model_id; - this.contextLength = Number.parseInt(json.max_input_length); + this._contextLength = Number.parseInt(json.max_input_length); }) .catch((e) => { console.log(`Failed to list models for HuggingFace TGI: ${e.message}`); diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 106f99e1b..a944f90f9 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -184,7 +184,7 @@ class Ollama extends BaseLLM implements ModelInstaller { let value = parts[2]; switch (key) { case "num_ctx": - this.contextLength = + this._contextLength = options.contextLength ?? Number.parseInt(value); break; case "stop": diff --git a/core/llm/llms/Vllm.ts b/core/llm/llms/Vllm.ts index ac550f153..97bd936cb 100644 --- a/core/llm/llms/Vllm.ts +++ b/core/llm/llms/Vllm.ts @@ -72,7 +72,7 @@ class Vllm extends OpenAI { const json = await response.json(); const data = json.data[0]; this.model = data.id; - this.contextLength = Number.parseInt(data.max_model_len); + this._contextLength = Number.parseInt(data.max_model_len); }) .catch((e) => { console.log(`Failed to list models for vLLM: ${e.message}`); diff --git a/core/util/generateRepoMap.test.ts b/core/util/generateRepoMap.test.ts index 78f879f63..67c58c6fd 100644 --- a/core/util/generateRepoMap.test.ts +++ b/core/util/generateRepoMap.test.ts @@ -55,7 +55,7 @@ describe.skip("generateRepoMap", () => { }); // Set testLLM properties - testLLM.contextLength = 2048; + testLLM._contextLength = 2048; testLLM.countTokens = jest.fn().mockReturnValue(10); // Act @@ -115,7 +115,7 @@ describe.skip("generateRepoMap", () => { }); // Set testLLM properties - testLLM.contextLength = 2048; + testLLM._contextLength = 2048; testLLM.countTokens = jest.fn().mockReturnValue(10); // Act @@ -184,7 +184,7 @@ describe.skip("generateRepoMap", () => { .mockImplementation(() => {}); // Set testLLM properties - testLLM.contextLength = 2048; + testLLM._contextLength = 2048; testLLM.countTokens = jest.fn().mockReturnValue(10); // Act From 5c46a1e90b506319d71bca4db95fd37a16d02784 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 21 Jul 2025 11:00:54 -0700 Subject: [PATCH 05/48] feat: clarify mode alert in tools section --- .../tool-policies/ToolPoliciesSection.tsx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPoliciesSection.tsx b/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPoliciesSection.tsx index 8adfa75d2..5aee1466f 100644 --- a/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPoliciesSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPoliciesSection.tsx @@ -1,4 +1,4 @@ -import { Tool } from "core"; +import { MessageModes, Tool } from "core"; import { useMemo } from "react"; import { useAppDispatch, useAppSelector } from "../../../../../redux/hooks"; import { toggleToolGroupSetting } from "../../../../../redux/slices/uiSlice"; @@ -43,20 +43,28 @@ export const ToolPoliciesSection = () => { const allToolsOff = mode === "chat"; - const message = - mode === "chat" - ? "All tools disabled (Chat)" - : mode === "plan" - ? "Read-only/MCP tools available (Plan)" - : "All tools available (Agent)"; + const getMessage = (mode: MessageModes) => { + switch (mode) { + case "chat": + return "All tools disabled in Chat, switch to Plan or Agent mode to use tools"; + case "plan": + return "Read-only/MCP tools available in Plan mode"; + default: + return ""; + } + }; + + const message = getMessage(mode); return ( <> -
- - {message} - -
+ {(mode === "chat" || mode === "plan") && ( +
+ + {message} + +
+ )} {toolsByGroup.map(([groupName, tools]) => { const isGroupEnabled = !allToolsOff && toolGroupSettings[groupName] !== "exclude"; From 24574d354437539d2d80501e1bb631f26c37c713 Mon Sep 17 00:00:00 2001 From: Ting-Wai To <40179554+tingwai@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:16:39 -0700 Subject: [PATCH 06/48] test: verify chunkDocument filters out chunks exceeding maxChunkSize --- core/indexing/chunk/chunk.test.ts | 60 ++++++++++++++++++++++++++++++- core/llm/countTokens.test.ts | 8 ++++- core/llm/countTokens.ts | 7 ++++ 3 files changed, 73 insertions(+), 2 deletions(-) diff --git a/core/indexing/chunk/chunk.test.ts b/core/indexing/chunk/chunk.test.ts index 7a8ce6f76..16bcdd2d9 100644 --- a/core/indexing/chunk/chunk.test.ts +++ b/core/indexing/chunk/chunk.test.ts @@ -1,6 +1,8 @@ import path from "path"; -import { shouldChunk } from "./chunk"; +import { Chunk } from "../../index.js"; +import { cleanupAsyncEncoders } from "../../llm/countTokens.js"; +import { chunkDocument, shouldChunk } from "./chunk"; describe("shouldChunk", () => { test("should chunk a typescript file", () => { @@ -28,6 +30,62 @@ describe("shouldChunk", () => { }); }); +describe("chunkDocument", () => { + afterAll(async () => { + // Clean up the global async encoders to prevent Jest from hanging + await cleanupAsyncEncoders(); + }); + + test("should return multiple chunks for large content with small maxChunkSize", async () => { + const filepath = "/test/file.txt"; + const maxChunkSize = 10; // small limit + const digest = "test-digest"; + + // Create content with multiple short lines - each line should fit within maxChunkSize + const lines = ["short line", "another line", "third line"]; + const contents = lines.join("\n"); + + const chunks: Chunk[] = []; + for await (const chunk of chunkDocument({ + filepath, + contents, + maxChunkSize, + digest, + })) { + chunks.push(chunk); + } + + // Verify chunks have valid content + chunks.forEach((chunk) => { + expect(chunk.content.length).toBeGreaterThan(0); + }); + }); + + test("should filter out chunks that exceed maxChunkSize in tokens", async () => { + const filepath = "/test/large.txt"; + const maxChunkSize = 10; // small limit + const digest = "test-digest-2"; + + const contents = + "This is a much longer line with many words that will likely exceed the maxChunkSize token limit and should be filtered out by the chunkDocument function. This is a much longer line with many words that will likely exceed the maxChunkSize token limit and should be filtered out by the chunkDocument function."; + + const chunks: Chunk[] = []; + for await (const chunk of chunkDocument({ + filepath, + contents, + maxChunkSize, + digest, + })) { + chunks.push(chunk); + } + + // Verify that no chunks were created since the content exceeds maxChunkSize + chunks.forEach((chunk) => { + expect(chunk.content.length).toBe(0); + }); + }); +}); + function generateString(length: number) { return "a".repeat(length); } diff --git a/core/llm/countTokens.test.ts b/core/llm/countTokens.test.ts index 9b08dca21..4cbe13a5b 100644 --- a/core/llm/countTokens.test.ts +++ b/core/llm/countTokens.test.ts @@ -2,6 +2,7 @@ // Generated by continue import { ChatMessage, MessagePart, ToolCall } from "../index.js"; import { + cleanupAsyncEncoders, compileChatMessages, countTokens, countTokensAsync, @@ -27,7 +28,12 @@ describe.skip("countTokens", () => { }); }); -describe.skip("countTokensAsync", () => { +describe("countTokensAsync", () => { + afterAll(async () => { + // Clean up the global async encoders to prevent Jest from hanging + await cleanupAsyncEncoders(); + }); + it("should count tokens asynchronously for a simple string", async () => { const content = "Hello world!"; const tokenCount = await countTokensAsync(content, "gpt-4"); diff --git a/core/llm/countTokens.ts b/core/llm/countTokens.ts index 852638d1c..8120c9167 100644 --- a/core/llm/countTokens.ts +++ b/core/llm/countTokens.ts @@ -536,7 +536,14 @@ function compileChatMessages({ }; } +async function cleanupAsyncEncoders(): Promise { + try { + await llamaAsyncEncoder.close(); + } catch (e) {} +} + export { + cleanupAsyncEncoders, compileChatMessages, countTokens, countTokensAsync, From 6bdae841d83c0c8fc129765acff1a0a9201f2894 Mon Sep 17 00:00:00 2001 From: Ting-Wai To <40179554+tingwai@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:44:17 -0700 Subject: [PATCH 07/48] test: chunkDocumentWithoutId --- core/indexing/chunk/chunk.test.ts | 68 ++++++++++++++++++++++++++++++- core/indexing/chunk/chunk.ts | 2 +- 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/core/indexing/chunk/chunk.test.ts b/core/indexing/chunk/chunk.test.ts index 16bcdd2d9..90febfa73 100644 --- a/core/indexing/chunk/chunk.test.ts +++ b/core/indexing/chunk/chunk.test.ts @@ -1,8 +1,8 @@ import path from "path"; -import { Chunk } from "../../index.js"; +import { Chunk, ChunkWithoutID } from "../../index.js"; import { cleanupAsyncEncoders } from "../../llm/countTokens.js"; -import { chunkDocument, shouldChunk } from "./chunk"; +import { chunkDocument, chunkDocumentWithoutId, shouldChunk } from "./chunk"; describe("shouldChunk", () => { test("should chunk a typescript file", () => { @@ -86,6 +86,70 @@ describe("chunkDocument", () => { }); }); +describe("chunkDocumentWithoutId", () => { + afterAll(async () => { + await cleanupAsyncEncoders(); + }); + + test("should return no chunks for empty content", async () => { + const contents = ""; + const chunks: ChunkWithoutID[] = []; + for await (const chunk of chunkDocumentWithoutId( + "file.txt", + contents, + 100, + )) { + chunks.push(chunk); + } + expect(chunks).toHaveLength(0); + }); + + test("should chunk text files", async () => { + const contents = "Line 1\nLine 2\nLine 3"; + const chunks: ChunkWithoutID[] = []; + for await (const chunk of chunkDocumentWithoutId( + "file.txt", + contents, + 100, + )) { + chunks.push(chunk); + } + expect(chunks.length).toBeGreaterThan(0); + expect(chunks[0].content).toContain("Line 1"); + }); + + test("should chunk for code files", async () => { + const contents = "function test() {\n return 42;\n}"; + const chunks: ChunkWithoutID[] = []; + for await (const chunk of chunkDocumentWithoutId( + "file.js", + contents, + 100, + )) { + chunks.push(chunk); + } + expect(chunks.length).toBeGreaterThan(0); + expect(chunks[0].content).toContain("function test"); + }); + + test("should chunk large content", async () => { + const contents = Array(100).fill("short line").join("\n"); // Large content with many lines + const maxChunkSize = 50; + const chunks: ChunkWithoutID[] = []; + for await (const chunk of chunkDocumentWithoutId( + "file.txt", + contents, + maxChunkSize, + )) { + chunks.push(chunk); + } + expect(chunks.length).toBeGreaterThan(1); // Should create multiple chunks + chunks.forEach((chunk) => { + expect(chunk.content.length).toBeGreaterThan(0); // Each chunk should have content + }); + }); +}); + function generateString(length: number) { return "a".repeat(length); } diff --git a/core/indexing/chunk/chunk.ts b/core/indexing/chunk/chunk.ts index d46dd2e3b..de9a33f9c 100644 --- a/core/indexing/chunk/chunk.ts +++ b/core/indexing/chunk/chunk.ts @@ -13,7 +13,7 @@ export type ChunkDocumentParam = { digest: string; }; -async function* chunkDocumentWithoutId( +export async function* chunkDocumentWithoutId( fileUri: string, contents: string, maxChunkSize: number, From 8819712cf5a02262dd61256da2d9d406dd70d69d Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 24 Jul 2025 12:51:09 +0530 Subject: [PATCH 08/48] fix: missing `alwaysApply` in local rule block --- core/config/yaml/loadYaml.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index b1682e751..4f1a1632f 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -57,6 +57,7 @@ function convertYamlRuleToContinueRule(rule: Rule): RuleWithSource { globs: rule.globs, name: rule.name, ruleFile: rule.sourceFile, + alwaysApply: rule.alwaysApply, }; } } From 90f703724dbbbd852afdc96926fade0e3a574fbc Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 24 Jul 2025 19:52:53 +0530 Subject: [PATCH 09/48] improve: add filepath in editoutcome dev data --- extensions/vscode/src/extension/EditOutcomeTracker.ts | 1 + packages/config-yaml/src/schemas/data/editOutcome/index.ts | 1 + packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/extensions/vscode/src/extension/EditOutcomeTracker.ts b/extensions/vscode/src/extension/EditOutcomeTracker.ts index c69dbac72..69ac452fa 100644 --- a/extensions/vscode/src/extension/EditOutcomeTracker.ts +++ b/extensions/vscode/src/extension/EditOutcomeTracker.ts @@ -65,6 +65,7 @@ class EditOutcomeTracker { newCodeLines: pendingEdit.newCodeLines, lineChange: pendingEdit.lineChange, accepted, + filepath: pendingEdit.filepath, }, }); diff --git a/packages/config-yaml/src/schemas/data/editOutcome/index.ts b/packages/config-yaml/src/schemas/data/editOutcome/index.ts index ec902364c..32c34632c 100644 --- a/packages/config-yaml/src/schemas/data/editOutcome/index.ts +++ b/packages/config-yaml/src/schemas/data/editOutcome/index.ts @@ -12,4 +12,5 @@ export const editOutcomeEventAllSchema = baseDevDataAllSchema.extend({ newCodeLines: z.number(), lineChange: z.number(), accepted: z.boolean(), + filepath: z.string(), }); diff --git a/packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts b/packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts index 1fdbfb967..acd3be4bd 100644 --- a/packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts +++ b/packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts @@ -20,6 +20,7 @@ export const editOutcomeEventSchema_0_2_0 = editOutcomeEventAllSchema.pick({ previousCodeLines: true, newCodeLines: true, lineChange: true, + filepath: true, }); export const editOutcomeEventSchema_0_2_0_noCode = From 55f5ed580f0e8ab5cc0dad2a524066af8187b667 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Thu, 24 Jul 2025 11:49:35 -0700 Subject: [PATCH 10/48] fix: use loading state for loading indicator, better error messages --- core/config/ConfigHandler.ts | 6 +++--- gui/src/components/modelSelection/ModelSelect.tsx | 3 +-- gui/src/redux/slices/configSlice.ts | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 1ca09b1e2..f936196fa 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -438,7 +438,7 @@ export class ConfigHandler { if (!this.currentProfile) { return { config: undefined, - errors: [], + errors: [{ message: "Current profile not found", fatal: true }], configLoadInterrupted: true, }; } @@ -494,7 +494,7 @@ export class ConfigHandler { if (!this.currentProfile) { return { config: undefined, - errors: [], + errors: [{ message: "Current profile not found", fatal: true }], configLoadInterrupted: true, }; } @@ -507,7 +507,7 @@ export class ConfigHandler { if (!this.currentProfile) { return { config: undefined, - errors: [], + errors: [{ message: "Current profile not found", fatal: true }], configLoadInterrupted: true, }; } diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index d474fe58a..a93009965 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -11,7 +11,6 @@ import { useAuth } from "../../context/Auth"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { AddModelForm } from "../../forms/AddModelForm"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; -import { EMPTY_CONFIG } from "../../redux/slices/configSlice"; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; import { updateSelectedModelByRole } from "../../redux/thunks/updateSelectedModelByRole"; import { @@ -94,6 +93,7 @@ function ModelSelect() { const isInEdit = useAppSelector((store) => store.session.isInEdit); const config = useAppSelector((state) => state.config.config); + const isConfigLoading = useAppSelector((state) => state.config.loading); const ideMessenger = useContext(IdeMessengerContext); const buttonRef = useRef(null); const [options, setOptions] = useState([]); @@ -192,7 +192,6 @@ function ModelSelect() { ); } - const isConfigLoading = config === EMPTY_CONFIG; const hasNoModels = allModels?.length === 0; return ( diff --git a/gui/src/redux/slices/configSlice.ts b/gui/src/redux/slices/configSlice.ts index 8766014a2..0deb9f6e4 100644 --- a/gui/src/redux/slices/configSlice.ts +++ b/gui/src/redux/slices/configSlice.ts @@ -68,6 +68,7 @@ export const configSlice = createSlice({ } else { state.config = config; } + state.loading = false; }, updateConfig: ( state, From 92f494488a4ef598f5164cf447378be0516ebee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82ach?= Date: Thu, 24 Jul 2025 21:46:47 +0200 Subject: [PATCH 11/48] fix: use JAVA_HOME instead of macOS-specific JVM (#6778) The previous homebrew-17 is specific to macOS and requires switching to JAVA_HOME on Windows/Linux. Workaround: ./idea/gradle.xml can be marked as unstaged, but this is inconvenient for developers. JAVA_HOME is a standard IMO. --- .idea/gradle.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index c277e816e..324ac997a 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,7 @@