Conversation
- Remove 'chat' mode, keep only 'agent' and 'acp agent' modes - Migrate legacy 'chat' mode conversations to 'agent' mode silently - Remove web search feature (searchPresenter, search components, stores) - Remove search-related config (enableSearch, forcedSearch, searchStrategy) - Remove ContentEnricher and web content length limit - Update all ChatMode type definitions - Clean up i18n files for all 12 languages - Update toolPresenter to always load agent tools BREAKING CHANGE: 'chat' mode is no longer available
- Remove 'chat' mode, keep only 'agent' and 'acp agent' modes - Migrate legacy 'chat' mode conversations to 'agent' mode silently - Remove web search feature (searchPresenter, search components, stores) - Remove search-related config (enableSearch, forcedSearch, searchStrategy) - Remove ContentEnricher and web content length limit - Update all ChatMode type definitions - Clean up i18n files for all 12 languages - Update toolPresenter to always load agent tools BREAKING CHANGE: 'chat' mode is no longer available
- Remove 'chat' mode, keep only 'agent' and 'acp agent' modes - Migrate legacy 'chat' mode conversations to 'agent' mode silently - Remove web search feature (searchPresenter, search components, stores) - Remove search-related config (enableSearch, forcedSearch, searchStrategy) - Remove ContentEnricher and web content length limit - Update all ChatMode type definitions - Clean up i18n files for all 12 languages - Update toolPresenter to always load agent tools BREAKING CHANGE: 'chat' mode is no longer available
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRemoves the legacy "chat" mode and all web search functionality; narrows ChatMode to Changes
Sequence Diagram(s)sequenceDiagram
participant Tab as "Window/Tab"
participant TabPresenter as "tabPresenter"
participant SessionPresenter as "sessionPresenter"
participant AgentPresenter as "agentPresenter"
participant LLMProvider as "llmProviderPresenter"
participant AcpProv as "AcpProvider"
rect rgba(52,152,219,0.5)
Tab->>TabPresenter: WINDOW_CLOSED(viewId)
TabPresenter->>SessionPresenter: getActiveConversationIdSync(viewId)
alt conversationId found
TabPresenter->>AgentPresenter: cleanupConversation(conversationId)
AgentPresenter->>LLMProvider: clearAcpSession(conversationId)
LLMProvider->>AcpProv: clearSession(conversationId) (if ACP provider present)
AcpProv-->>LLMProvider: ack
LLMProvider-->>AgentPresenter: done
AgentPresenter-->>TabPresenter: cleanup complete
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
src/main/presenter/llmProviderPresenter/providers/dashscopeProvider.ts (1)
23-25:⚠️ Potential issue | 🟡 MinorStale JSDoc: still references
enable_search.The comment mentions
enable_searchwhich was removed in this PR.Proposed fix
- /** Override coreStream method to support DashScope's enable_thinking and enable_search parameters */ + /** Override coreStream method to support DashScope's enable_thinking parameter */src/renderer/src/i18n/fa-IR/settings.json (1)
1-62:⚠️ Potential issue | 🔴 CriticalPipeline failure: missing i18n key
common.charactersUnit.The CI check reports that
common.charactersUnitis missing from this file. It was likely removed along with the other web-content-length keys, but something in the codebase still references it. Either restore the key here (and in all other locale files) or remove the reference in the consuming code.#!/bin/bash # Find where common.charactersUnit is still referenced in the codebase rg -rn "charactersUnit" --type-add 'src:include:*.ts,*.tsx,*.vue,*.js,*.jsx' --type srcsrc/renderer/src/i18n/fr-FR/chat.json (1)
37-45:⚠️ Potential issue | 🟠 MajorRemove orphaned
searchtranslation keys from all 12 language files.The PR removes web search functionality, leaving the
searchsection inchat.jsonorphaned. This section is not referenced anywhere in the codebase and appears identically in all 12 language files (da-DK, en-US, fa-IR, fr-FR, he-IL, ja-JP, ko-KR, pt-BR, ru-RU, zh-CN, zh-HK, zh-TW). Delete these keys from all locales to keep translations synchronized and free of dead code.src/renderer/src/composables/useModelCapabilities.ts (1)
25-29:⚠️ Potential issue | 🟡 MinorStale JSDoc — still mentions "search capabilities".
The comment on line 28 reads "Handles reasoning support, thinking budget ranges, and search capabilities", but search capabilities have been removed from this composable.
Proposed fix
/** * Composable for fetching and managing model capabilities - * Handles reasoning support, thinking budget ranges, and search capabilities + * Handles reasoning support and thinking budget ranges */src/main/presenter/agentPresenter/permission/permissionHandler.ts (1)
80-99:⚠️ Potential issue | 🟡 MinorRemove unused
llmProviderPresenterfrom constructor options.The
llmProviderPresenterparameter accepted at line 84 is never assigned to a field—the class already accesses it throughBaseHandler's protected getter (this.llmProviderPresenterretrieves it fromthis.ctx.llmProviderPresenter). Remove this parameter and update all instantiation sites accordingly.Proposed fix
constructor( context: ThreadHandlerContext, options: { generatingMessages: Map<string, GeneratingMessageState> - llmProviderPresenter: ILlmProviderPresenter getMcpPresenter: () => IMCPPresenter getToolPresenter: () => IToolPresenter streamGenerationHandler: StreamGenerationHandler llmEventHandler: LLMEventHandler commandPermissionHandler: CommandPermissionService } ) {Also remove the unused
ILlmProviderPresenterimport on line 4.Update instantiation at
src/main/presenter/agentPresenter/index.ts:102to remove thellmProviderPresenterproperty.src/renderer/src/components/chat-input/ChatInput.vue (1)
335-353: 🛠️ Refactor suggestion | 🟠 MajorRemove stale search config bindings from
<ChatConfig>that are no longer supported.Lines 342–344 pass
v-model:enable-search,v-model:forced-search, andv-model:search-strategyto<ChatConfig>, but this component no longer accepts these props in itsdefinePropsordefineEmits. Additionally, the fallback config object (lines 671–673) still definesconfigEnableSearch,configForcedSearch, andconfigSearchStrategy, which are never returned fromusePromptInputConfig()and unused whenvariant === 'chat'(the only timeChatConfigrenders).Vue silently ignores unrecognized
v-modelprops, so this won't cause a runtime crash, but these are dead bindings representing incomplete refactoring. Remove all three search-related v-model bindings from the<ChatConfig>component and the corresponding properties from the fallback config object.Proposed changes
<ChatConfig v-model:system-prompt="config.configSystemPrompt.value" v-model:temperature="config.configTemperature.value" v-model:context-length="config.configContextLength.value" v-model:max-tokens="config.configMaxTokens.value" v-model:artifacts="config.configArtifacts.value" v-model:thinking-budget="config.configThinkingBudget.value" - v-model:enable-search="config.configEnableSearch.value" - v-model:forced-search="config.configForcedSearch.value" - v-model:search-strategy="config.configSearchStrategy.value" v-model:reasoning-effort="config.configReasoningEffort.value" v-model:verbosity="config.configVerbosity.value"- configEnableSearch: ref(false), - configForcedSearch: ref(false), - configSearchStrategy: ref(''),src/shared/types/presenters/session.presenter.d.ts (1)
34-36:⚠️ Potential issue | 🟠 MajorIncomplete cleanup: Removing search fields from
SessionConfigrequires updating all usages across the codebase.Lines 34–36 in
session.presenter.d.tscontain search-related fields that are actively referenced in 30+ locations: renderer stores (agentModelStore.ts,modelStore.ts), Vue components (ModelConfigItem.vue,OllamaProviderSettingsDetail.vue,ProviderModelList.vue), provider implementations inllmProviderPresenter, the knowledge memory exporter, and multiple tests. Removing these fields from the type definition alone will break these references.The commit "feat(core): remove chat mode and web search" (363c941) explicitly aims to remove web search, and the local
SessionConfiginsrc/main/presenter/sessionPresenter/types.tshas already been cleaned. However, the removal is incomplete: search fields remain in multiple shared type definitions (llmprovider.presenter.d.ts,thread.presenter.d.ts,legacy.presenters.d.ts) and are still actively used throughout the renderer and main process code.Complete the removal by:
- Remove
enableSearch,forcedSearch,searchStrategyfromsession.presenter.d.tslines 34–36- Update all usages in renderer stores and components
- Clean up provider implementations that set these fields
- Remove search-related assertions from tests
- Update the specification checklist in
docs/specs/remove-chat-mode/spec.md
🤖 Fix all issues with AI agents
In `@docs/specs/remove-chat-mode/plan.md`:
- Around line 82-88: The plan and implementation disagree on handling legacy
settings.chatMode === 'chat'; update the runtime logic in sessionResolver.ts to
match the plan by explicitly treating 'chat' as legacy: replace the current
expression settings.chatMode || input.fallbackChatMode || 'agent' with logic
that checks if settings.chatMode exists and is not 'chat' (e.g. if
(settings.chatMode && settings.chatMode !== 'chat') use it; else use
input.fallbackChatMode || 'agent'), and keep the comment behavior that migrating
settings.chatMode === 'chat' to 'agent' is runtime-only (persist only via
updateConversationSettings).
In `@src/main/presenter/agentPresenter/message/messageBuilder.ts`:
- Around line 120-126: conversation.settings.chatMode may contain the legacy
string 'chat' at runtime which bypasses the nullish fallback; update the
initialization in messageBuilder.ts so you validate and normalize the runtime
value first (e.g., read rawChatMode = conversation.settings.chatMode, if
rawChatMode === 'chat' set normalized = 'agent', else if rawChatMode is 'agent'
or 'acp agent' use it, otherwise fall back to await
presenter.configPresenter.getSetting('input_chatMode') and then to 'agent');
then compute isAgentMode from the normalized value and leave isToolPromptMode =
true. Ensure you reference conversation.settings.chatMode,
presenter.configPresenter.getSetting, isAgentMode, and isToolPromptMode when
making the change.
In `@src/main/presenter/agentPresenter/session/sessionManager.ts`:
- Around line 112-117: The fallbackChatMode assignment in sessionManager
currently casts getSetting('input_chatMode') to only 'agent' | 'acp agent' |
undefined which hides legacy values like 'chat' that may be persisted; update
the logic around getSetting('input_chatMode') in sessionManager (the
fallbackChatMode computation) to read the raw value, explicitly sanitize/mapping
legacy 'chat' to 'agent' (or map any unknown value to the default 'agent'), and
then return the sanitized chatMode (instead of relying on the type cast and ??
only handling undefined).
In `@src/main/presenter/agentPresenter/session/sessionResolver.ts`:
- Around line 12-13: The current assignment to chatMode (settings.chatMode ||
input.fallbackChatMode || 'agent') does not remap the legacy string 'chat' to
'agent'; update the logic where chatMode is computed (the chatMode variable in
sessionResolver.ts) to explicitly normalize legacy values: read
settings.chatMode and input.fallbackChatMode, then if either equals the string
'chat' set chatMode to 'agent', otherwise use the existing value or default to
'agent'; ensure the final chatMode value conforms to the expected union ('agent'
| 'acp agent') so downstream code will not receive the legacy 'chat' value.
- Around line 15-16: SessionContextResolved.chatMode may receive legacy values
from persisted CONVERSATION_SETTINGS.chatMode (e.g., 'chat'); validate
settings.chatMode against the allowed set before assigning to the returned
chatMode: if settings.chatMode is one of 'agent' or 'acp agent' use it,
otherwise fall back to input.fallbackChatMode and then to 'agent'; update the
assignment in sessionResolver.ts (the variable currently using settings.chatMode
|| input.fallbackChatMode || 'agent') to perform this whitelist check (mirror
the approach used in messageBuilder.ts where a cast/validation is applied).
In `@src/renderer/src/components/chat-input/composables/useChatMode.ts`:
- Around line 104-112: The migration bug: legacy saved value 'chat' is accepted
as a ChatMode and ends up assigned to currentMode; update the logic in the
useChatMode composable around savedMode/currentMode to treat 'chat' as an
invalid legacy value and map it to 'agent' (same behavior as the existing 'acp
agent' fallback). Concretely, when savedMode === 'chat' (or when savedMode ===
'acp agent' && !hasAcpAgents.value) set currentMode.value = 'agent' and call
configPresenter.setSetting('input_chatMode','agent') to persist the corrected
value; otherwise assign currentMode.value = savedMode. Ensure you reference
savedMode, currentMode, hasAcpAgents, and configPresenter.setSetting in the
change.
In `@src/renderer/src/i18n/fa-IR/settings.json`:
- Line 51: The value for the JSON key "loggingRestartNotice" uses a Latin
question mark; replace the trailing "?" with the Persian question mark "؟" so it
matches the same phrase pattern used elsewhere (e.g., "آیا میخواهید ادامه
دهید؟") and keep the rest of the string unchanged.
🧹 Nitpick comments (10)
src/main/presenter/llmProviderPresenter/providers/geminiProvider.ts (1)
819-821: LGTM — clean simplification of tool loading.The removal of
GoogleSearchgating and unconditional MCP tool loading aligns with the PR objective. The logic is correct.Nit: consider adding braces for the multi-line
ifbody for consistency with the rest of the file (e.g., theif (geminiTools.length > 0)block at line 840).🔧 Optional: add braces
// Load MCP tools if available - if (mcpTools.length > 0) - geminiTools = await presenter.mcpPresenter.mcpToolsToGeminiTools(mcpTools, this.provider.id) + if (mcpTools.length > 0) { + geminiTools = await presenter.mcpPresenter.mcpToolsToGeminiTools(mcpTools, this.provider.id) + }src/main/presenter/llmProviderPresenter/providers/githubCopilotProvider.ts (1)
18-18: Pre-existing: Comments and error messages are in Chinese throughout this file.The coding guidelines require all logs and comments to be in English (
All logs and comments must be in English), but this file has extensive Chinese text in comments (e.g., line 18, 48, 75, 87) and user-facing error messages (e.g., lines 121–136, 438–451, 694–713). This is pre-existing and not introduced by this PR, but worth addressing in a follow-up. As per coding guidelines, "All logs and comments must be in English".Also applies to: 48-48, 75-75, 87-87, 96-96, 108-108, 121-136
src/main/presenter/llmProviderPresenter/providers/dashscopeProvider.ts (1)
39-62: Consider restoring the originalcreatemethod after the generator completes.The monkey-patch on
this.openai.chat.completions.create(line 43) is never reverted. IfcoreStreamis called when thinking is enabled and then later when it isn't, the patchedcreatefrom the first call persists on the instance. This is a pre-existing concern, but the simplified flow makes it a good time to address it — e.g., wrap theyield*in atry/finallythat restoresoriginalCreate.Suggested approach
if (shouldAddEnableThinking) { const originalCreate = this.openai.chat.completions.create.bind(this.openai.chat.completions) // Replace create method to add enable_thinking parameter this.openai.chat.completions.create = ((params: any, options?: any) => { const modifiedParams = { ...params } if (shouldAddEnableThinking) { modifiedParams.enable_thinking = true const dbBudget = modelCapabilities.getThinkingBudgetRange( this.provider.id, modelId ).default const budget = modelConfig?.thinkingBudget ?? dbBudget if (typeof budget === 'number') { modifiedParams.thinking_budget = budget } } return originalCreate(modifiedParams, options) }) as typeof this.openai.chat.completions.create - } - yield* super.coreStream(messages, modelId, modelConfig, temperature, maxTokens, mcpTools) + try { + yield* super.coreStream(messages, modelId, modelConfig, temperature, maxTokens, mcpTools) + } finally { + this.openai.chat.completions.create = originalCreate + } + return + } + + yield* super.coreStream(messages, modelId, modelConfig, temperature, maxTokens, mcpTools)src/renderer/src/components/settings/ModelConfigDialog.vue (1)
809-822: Consider using descriptive names for the destructured capability results.The search-related capability fetches were correctly removed, and the remaining destructured values line up with the
Promise.allcalls. However, since this line was touched, the single/two-letter names (sr,br,se,ed,sv,vd) hurt readability—especially for newcomers to the file.♻️ Suggested rename for clarity
- const [sr, br, se, ed, sv, vd] = await Promise.all([ + const [ + supportsReasoning, + budgetRange, + supportsEffort, + effortDefault, + supportsVerbosity, + verbosityDefault + ] = await Promise.all([ configPresenter.supportsReasoningCapability?.(props.providerId, props.modelId), configPresenter.getThinkingBudgetRange?.(props.providerId, props.modelId), configPresenter.supportsReasoningEffortCapability?.(props.providerId, props.modelId), configPresenter.getReasoningEffortDefault?.(props.providerId, props.modelId), configPresenter.supportsVerbosityCapability?.(props.providerId, props.modelId), configPresenter.getVerbosityDefault?.(props.providerId, props.modelId) ]) - capabilitySupportsReasoning.value = typeof sr === 'boolean' ? sr : null - capabilityBudgetRange.value = br || {} - capabilitySupportsEffort.value = typeof se === 'boolean' ? se : null - capabilityEffortDefault.value = ed - capabilitySupportsVerbosity.value = typeof sv === 'boolean' ? sv : null - capabilityVerbosityDefault.value = vd + capabilitySupportsReasoning.value = typeof supportsReasoning === 'boolean' ? supportsReasoning : null + capabilityBudgetRange.value = budgetRange || {} + capabilitySupportsEffort.value = typeof supportsEffort === 'boolean' ? supportsEffort : null + capabilityEffortDefault.value = effortDefault + capabilitySupportsVerbosity.value = typeof supportsVerbosity === 'boolean' ? supportsVerbosity : null + capabilityVerbosityDefault.value = verbosityDefaultsrc/renderer/src/components/chat-input/composables/useChatMode.ts (1)
39-39:isAgentModeis now alwaystrue— consider removing or simplifying.Since
'chat'mode no longer exists,isAgentModeis triviallytruefor both remaining modes. If any consumer relies on this to distinguish'agent'from'acp agent', the name is misleading. Consider removing it from the public API or at minimum adding a comment explaining it's kept for backward compatibility.src/renderer/src/components/chat-input/composables/useWorkspaceMention.ts (1)
15-20:isEnabledcheck forisAgentModeis now alwaystrue.Since
chatModecan only be'agent'or'acp agent', theisAgentModecheck on Line 17 is alwaystrue, makingisEnabledeffectively just!!options.workspacePath.value. This is a minor simplification opportunity.src/shared/types/presenters/legacy.presenters.d.ts (1)
483-487: Stale optional methods onIConfigPresenter:supportsSearchCapabilityandgetSearchDefaults.These optional methods are still defined but should be removed alongside the broader search feature removal for consistency. They won't cause runtime issues (optional with
?), but they add dead surface area to the interface.src/main/presenter/agentPresenter/session/sessionManager.ts (1)
88-102:elsebranch on line 100 is now dead code.Since
resolved.chatModeis typed as'agent' | 'acp agent', theelsebranch after theif ('agent')/else if ('acp agent')checks can never execute. Consider removing it for clarity, or keep it as a defensive fallback with a comment.test/main/presenter/agentPresenter/sessionManager.test.ts (1)
53-64: Migration test doesn't verify that the upgraded mode is persisted.The test asserts that
context.chatModebecomes'agent', but it doesn't check thatsessionPresenter.updateConversationSettingswas called with the migratedchatMode. Without this assertion, you could have a bug where each load re-migrates without persisting, causing unnecessary writes on everyresolveWorkspaceContextcall. Consider adding:expect(sessionPresenter.updateConversationSettings).toHaveBeenCalledWith( conversation.id, expect.objectContaining({ chatMode: 'agent' }) )src/main/presenter/agentPresenter/index.ts (1)
491-498: Leftoversearch: falsefield in continue payload.The
searchfield in the continue payload is a remnant of the removed web search feature. While it's harmless (set tofalse), it's dead data that could be confusing post-removal.Suggested cleanup
const continuePayload = JSON.stringify({ text: 'continue', files: [], links: [], - search: false, think: false, continue: true })
src/renderer/src/components/chat-input/composables/useChatMode.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/i18n/ko-KR/settings.json (1)
8-33:⚠️ Potential issue | 🟡 MinorRemove orphaned search-engine i18n keys from all 12 language files.
The keys
searchEngine,searchEngineSelect,searchPreview,searchAssistantModel,selectModel, and the custom-search-engine block (lines 22–33) are not referenced anywhere in the codebase. With the removal of SearchEngineStore, SearchAssistantStore, and SearchPresenter, these translations are now dead code and should be cleaned up.Remove these keys from all language files: da-DK, en-US, fa-IR, fr-FR, he-IL, ja-JP, ko-KR, pt-BR, ru-RU, zh-CN, zh-HK, zh-TW.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/main/presenter/agentPresenter/session/sessionResolver.ts`:
- Line 34: The current expression assigns chatMode using
normalizeChatMode(rawChatMode) ?? normalizeChatMode(rawFallback) ?? 'agent', but
normalizeChatMode never returns undefined so the fallback rawFallback is never
used; update the logic by introducing or using a validating normalizer that
returns undefined for invalid/absent values (e.g., validateChatMode) and replace
the calls to normalizeChatMode with that validator (apply to rawChatMode and
rawFallback) so the nullish coalescing works as intended and the user's settings
fallback is honored; ensure references to normalizeChatMode, rawChatMode,
rawFallback, and the chatMode assignment are updated accordingly.
🧹 Nitpick comments (8)
src/renderer/src/components/chat-input/composables/useChatMode.ts (2)
39-39:isAgentModeis now a constanttrue— consider removing or deprecating.With
'chat'gone,isAgentModeis unconditionallytrue. If no consumers branch on it, it's dead code. If consumers still reference it, keeping it avoids churn now — but consider removing it in a follow-up to avoid misleading future readers.#!/bin/bash # Check how isAgentMode is consumed across the codebase rg -n --type=ts --type=vue 'isAgentMode' -C2
9-9:ChatModetype is duplicated across renderer and main process.This same type is defined in
sessionResolver.ts(line 4) and here (line 9). Consider sharing it from a single source insrc/shared/to avoid drift.src/main/presenter/agentPresenter/session/sessionResolver.ts (1)
16-24:normalizeChatModeandisLegacyChatModeare duplicated across files.The same
normalizeChatModepattern appears inmessageBuilder.ts(lines 121–124). Consider extracting both helpers into a shared utility alongside theChatModetype to keep them in sync.src/main/presenter/agentPresenter/session/sessionManager.ts (2)
117-119: Unreachableelsebranch —chatModecan only be'agent'or'acp agent'.Since
resolveSessionContextguarantees the result is one of those two values, this branch is dead code. It's harmless as defensive coding, but could be removed for clarity.
73-75: RepeatedrawFallbackreading pattern — consider extracting a private helper.The same
getSetting('input_chatMode') as string | undefined→ normalize-to-ChatModelogic appears three times (resolveSession,resolveWorkspaceContext, and its error path). A small private method likegetPreferredChatMode(): ChatModewould reduce duplication and ensure consistent normalization.♻️ Proposed helper
+ private getPreferredChatMode(): ChatMode { + const raw = this.options.configPresenter.getSetting('input_chatMode') as string | undefined + return raw === 'acp agent' ? 'acp agent' : 'agent' + }Then replace each occurrence with
this.getPreferredChatMode().Also applies to: 129-131, 152-154
src/main/presenter/agentPresenter/message/messageBuilder.ts (3)
132-132:isToolPromptModeis alwaystrue— dead variable.Similar to
isAgentModein the renderer, this constant can be inlined. Line 194's conditionisToolPromptMode && toolDefinitions.length > 0would simplify totoolDefinitions.length > 0.
387-392: Non-English prompt string in main process code.Line 388 contains a Chinese-language prompt:
'以上是你刚执行的工具调用及其响应信息…'. While this is a model prompt (not a UI string or log), the coding guidelines require English for all text. This appears to be pre-existing, but worth flagging since the surrounding code was modified.As per coding guidelines:
**/*.{ts,tsx,js,jsx,vue}: "Use English for all logs and comments" andsrc/renderer/**/*.{ts,tsx,js,jsx,vue}: "All user-facing strings must use i18n keys (supports 12 languages)".
36-46:searchResultsparameter is now dead — consider removing from the interface and all call sites.
searchResultsis renamed to_searchResults(unused) on line 109, but still declared in thePreparePromptContentParamsinterface on line 40. Multiple call sites passsearchResults: null(e.g., utilityHandler.ts:355, streamGenerationHandler.ts:95, streamGenerationHandler.ts:251), so removing this requires updating those locations.Note: The
SearchResultimport on line 5 is used elsewhere in the codebase (e.g., sessionPresenter), so it cannot be removed.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/renderer/src/components/chat-input/ChatInput.vue (1)
342-344:⚠️ Potential issue | 🟠 MajorRemove stale search-related props passed to
ChatConfig.The v-model bindings for
enable-search,forced-search, andsearch-strategyare passed toChatConfig(lines 342–344), butChatConfig.vueno longer declares these props, causing Vue warnings. Remove these three v-model bindings and delete the corresponding config refs (configEnableSearch,configForcedSearch,configSearchStrategyat lines 671–673 in ChatInput.vue).src/main/presenter/sessionPresenter/index.ts (1)
933-934:⚠️ Potential issue | 🟠 MajorStale
'chat'fallback intoSession— should be'agent'after this PR.Line 933 uses
conversation.settings.chatMode ?? 'chat'as the defaultresolvedChatMode. Since this PR removes'chat'as a valid mode, this fallback should be updated to'agent'to stay consistent with the migration.Proposed fix
context: { - resolvedChatMode: (conversation.settings.chatMode ?? - 'chat') as Session['context']['resolvedChatMode'], + resolvedChatMode: (conversation.settings.chatMode ?? + 'agent') as Session['context']['resolvedChatMode'],
- Add tools and prompts watchers back to useMentionData - Improve workspace search with registration state tracking - Add fallback handling when ripgrep is unavailable
Summary by CodeRabbit
Breaking Changes
Removed Features
Other Changes