-
Notifications
You must be signed in to change notification settings - Fork 614
fix: Multiple Issues Affecting Conversation Flow and Model Settings #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe PR modifies message context construction in promptBuilder.ts, adds provider exclusion filtering (specifically for 'acp') across model selection components and the search assistant store, updates component styling with inherited typography values, and increases the temperature slider maximum configuration value. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/renderer/settings/components/common/SearchAssistantModelSection.vue (1)
31-35: LGTM with a minor suggestion.The
exclude-providersbinding correctly filters out the ACP provider from model selection. This aligns with the filtering logic insearchAssistantStore.ts.Consider extracting the excluded providers list (
['acp']) to a shared constant to avoid magic strings and ensure consistency across the codebase if this exclusion is needed elsewhere.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/main/presenter/threadPresenter/utils/promptBuilder.ts(4 hunks)src/renderer/settings/components/common/SearchAssistantModelSection.vue(1 hunks)src/renderer/src/components/ModelSelect.vue(1 hunks)src/renderer/src/components/mcp-config/components/McpToolPanel.vue(1 hunks)src/renderer/src/components/think-content/ThinkContent.vue(1 hunks)src/renderer/src/composables/useChatConfigFields.ts(1 hunks)src/renderer/src/stores/searchAssistantStore.ts(6 hunks)
🧰 Additional context used
📓 Path-based instructions (30)
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use English for logs and comments (Chinese text exists in legacy code, but new code should use English)
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Enable and maintain strict TypeScript type checking for all files
**/*.{ts,tsx}: Always use try-catch to handle possible errors in TypeScript code
Provide meaningful error messages when catching errors
Log detailed error logs including error details, context, and stack traces
Distinguish and handle different error types (UserError, NetworkError, SystemError, BusinessError) with appropriate handlers in TypeScript
Use structured logging with logger.error(), logger.warn(), logger.info(), logger.debug() methods from logging utilities
Do not suppress errors (avoid empty catch blocks or silently ignoring errors)
Provide user-friendly error messages for user-facing errors in TypeScript components
Implement error retry mechanisms for transient failures in TypeScript
Avoid logging sensitive information (passwords, tokens, PII) in logs
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use the
usePresenter.tscomposable for renderer-to-main IPC communication to call presenter methods directly
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/stores/searchAssistantStore.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Do not include AI co-authoring information (e.g., 'Co-Authored-By: Claude') in git commits
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
**/*.{js,ts,jsx,tsx,mjs,cjs}
📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)
Write logs and comments in English
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
{src/main/presenter/**/*.ts,src/renderer/**/*.ts}
📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)
Implement proper inter-process communication (IPC) patterns using Electron's ipcRenderer and ipcMain APIs
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/**/*.{vue,ts,tsx}: All user-facing strings must use i18n keys with vue-i18n framework in the renderer
Import and use useI18n() composable with the t() function to access translations in Vue components and TypeScript files
Use the dynamic locale.value property to switch languages at runtime
Avoid hardcoding user-facing text and ensure all user-visible text uses the i18n translation system
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/**/*
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
New features should be developed in the
srcdirectory
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/**/*.{vue,js,ts}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Renderer process code should be placed in
src/renderer(Vue 3 application)
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability in Vue.js applications
Implement proper state management with Pinia in Vue.js applications
Utilize Vue Router for navigation and route management in Vue.js applications
Leverage Vue's built-in reactivity system for efficient data handling
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,tsx,vue}: Write concise, technical TypeScript code with accurate examples
Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
Avoid enums; use const objects instead
Use arrow functions for methods and computed properties
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statementsVue 3 app code in
src/renderer/srcshould be organized intocomponents/,stores/,views/,i18n/,lib/directories with shell UI insrc/renderer/shell/
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/**
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Use lowercase with dashes for directories (e.g., components/auth-wizard)
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/**/composables/*.ts
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/composables/*.ts: Use camelCase for composables (e.g., useAuthState.ts)
Use VueUse for common composables and utility functions
Implement custom composables for reusable logic
Files:
src/renderer/src/composables/useChatConfigFields.ts
src/renderer/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Use TypeScript for all code; prefer types over interfaces
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/**/*.{ts,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching
Leverage ref, reactive, and computed for reactive state management
Use provide/inject for dependency injection when appropriate
Use Iconify/Vue for icon implementation
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/renderer/src/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
src/renderer/src/**/*.{ts,tsx,vue}: Use TypeScript with Vue 3 Composition API for the renderer application
All user-facing strings must use vue-i18n keys insrc/renderer/src/i18n
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/renderer/src/stores/searchAssistantStore.ts
src/**/*.{ts,tsx,vue,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier with single quotes, no semicolons, and 100 character width
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vuesrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use OxLint for linting JavaScript and TypeScript files
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,tsx}: Use camelCase for variable and function names in TypeScript files
Use PascalCase for type and class names in TypeScript
Use SCREAMING_SNAKE_CASE for constant names
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Use EventBus for inter-process communication events
Files:
src/renderer/src/composables/useChatConfigFields.tssrc/main/presenter/threadPresenter/utils/promptBuilder.tssrc/renderer/src/stores/searchAssistantStore.ts
**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.vue: Use Vue 3 Composition API for all components instead of Options API
Use Tailwind CSS with scoped styles for component styling
Files:
src/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vue
src/renderer/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/**/*.vue: All user-facing strings must use i18n keys via vue-i18n for internationalization
Ensure proper error handling and loading states in all UI components
Implement responsive design using Tailwind CSS utilities for all UI components
src/renderer/**/*.vue: Use composition API and declarative programming patterns; avoid options API
Structure files: exported component, composables, helpers, static content, types
Use PascalCase for component names (e.g., AuthWizard.vue)
Use Vue 3 with TypeScript, leveraging defineComponent and PropType
Use template syntax for declarative rendering
Use Shadcn Vue, Radix Vue, and Tailwind for components and styling
Implement responsive design with Tailwind CSS; use a mobile-first approach
Use Suspense for asynchronous components
Use <script setup> syntax for concise component definitions
Prefer 'lucide:' icon family as the primary choice for Iconify icons
Import Icon component from '@iconify/vue' and use with lucide icons following pattern '{collection}:{icon-name}'
Files:
src/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/settings/components/common/SearchAssistantModelSection.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vue
src/renderer/src/**/*.vue
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
Use scoped styles to prevent CSS conflicts between Vue components
Files:
src/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vue
src/renderer/src/components/**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
src/renderer/src/components/**/*.vue: Use Tailwind for styles in Vue components
Vue component files must use PascalCase naming (e.g.,ChatInput.vue)
Files:
src/renderer/src/components/mcp-config/components/McpToolPanel.vuesrc/renderer/src/components/ModelSelect.vuesrc/renderer/src/components/think-content/ThinkContent.vue
src/main/presenter/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Organize core business logic into dedicated Presenter classes, with one presenter per functional domain
Files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
src/main/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use EventBus from
src/main/eventbus.tsfor main-to-renderer communication, broadcasting events viamainWindow.webContents.send()
src/main/**/*.ts: Use EventBus pattern for inter-process communication within the main process to decouple modules
Use Electron's built-in APIs for file system and native dialogs instead of Node.js or custom implementations
src/main/**/*.ts: Electron main process code belongs insrc/main/with presenters inpresenter/(Window/Tab/Thread/Mcp/Config/LLMProvider) andeventbus.tsfor app events
Use the Presenter pattern in the main process for UI coordination
Files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
src/main/**/*.{js,ts}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Main process code for Electron should be placed in
src/main
Files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
src/renderer/src/stores/**/*.{vue,ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/pinia-best-practices.mdc)
src/renderer/src/stores/**/*.{vue,ts,tsx,js,jsx}: Use modules to organize related state and actions in Pinia stores
Implement proper state persistence for maintaining data across sessions in Pinia stores
Use getters for computed state properties in Pinia stores
Utilize actions for side effects and asynchronous operations in Pinia stores
Keep Pinia stores focused on global state, not component-specific data
Files:
src/renderer/src/stores/searchAssistantStore.ts
src/renderer/**/stores/*.ts
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Use Pinia for state management
Files:
src/renderer/src/stores/searchAssistantStore.ts
src/renderer/src/stores/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Use Pinia for state management
Files:
src/renderer/src/stores/searchAssistantStore.ts
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T05:26:11.312Z
Learning: Applies to src/main/presenter/configPresenter/**/*.ts : Store and retrieve custom prompts via `configPresenter.getCustomPrompts()` for config-based data source management
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/llm-agent-loop.mdc:0-0
Timestamp: 2025-11-25T05:27:12.209Z
Learning: Applies to src/main/presenter/llmProviderPresenter/providers/*.ts : In Provider implementations, include helper methods for Provider-specific operations such as `formatMessages`, `convertToProviderTools`, `parseFunctionCalls`, and `prepareFunctionCallPrompt`
📚 Learning: 2025-11-25T05:28:04.454Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/vue-shadcn.mdc:0-0
Timestamp: 2025-11-25T05:28:04.454Z
Learning: Applies to src/renderer/**/*.{ts,vue} : Use provide/inject for dependency injection when appropriate
Applied to files:
src/renderer/src/components/ModelSelect.vue
📚 Learning: 2025-11-25T05:27:39.200Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/provider-guidelines.mdc:0-0
Timestamp: 2025-11-25T05:27:39.200Z
Learning: Applies to **/*Provider**/index.ts : Do not introduce renderer dependencies inside Provider implementations
Applied to files:
src/renderer/src/components/ModelSelect.vuesrc/renderer/src/stores/searchAssistantStore.ts
📚 Learning: 2025-11-25T05:27:39.200Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/provider-guidelines.mdc:0-0
Timestamp: 2025-11-25T05:27:39.200Z
Learning: Applies to **/*Provider**/index.ts : Output only discriminated union `LLMCoreStreamEvent` in Provider implementations, do not use single interface with optional fields
Applied to files:
src/renderer/src/components/ModelSelect.vue
📚 Learning: 2025-11-25T05:27:39.200Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/provider-guidelines.mdc:0-0
Timestamp: 2025-11-25T05:27:39.200Z
Learning: Applies to **/*Provider**/index.ts : Every event construction in Provider implementations must use factory functions
Applied to files:
src/renderer/src/components/ModelSelect.vue
📚 Learning: 2025-08-28T08:07:05.182Z
Learnt from: neoragex2002
Repo: ThinkInAIXYZ/deepchat PR: 807
File: src/renderer/src/components/markdown/MarkdownRenderer.vue:58-58
Timestamp: 2025-08-28T08:07:05.182Z
Learning: In src/renderer/src/components/markdown/MarkdownRenderer.vue, the unscoped <style> tag is intentionally used for global prose styles and the anchor .markdown-renderer fix, as confirmed by user neoragex2002.
Applied to files:
src/renderer/src/components/think-content/ThinkContent.vue
📚 Learning: 2025-11-25T05:28:04.454Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/vue-shadcn.mdc:0-0
Timestamp: 2025-11-25T05:28:04.454Z
Learning: Applies to src/renderer/**/*.vue : Structure files: exported component, composables, helpers, static content, types
Applied to files:
src/renderer/src/components/think-content/ThinkContent.vue
📚 Learning: 2025-11-25T05:28:04.454Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/vue-shadcn.mdc:0-0
Timestamp: 2025-11-25T05:28:04.454Z
Learning: Applies to src/renderer/**/*.vue : Use Shadcn Vue, Radix Vue, and Tailwind for components and styling
Applied to files:
src/renderer/src/components/think-content/ThinkContent.vue
📚 Learning: 2025-11-25T05:28:20.513Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:28:20.513Z
Learning: Applies to src/renderer/src/components/**/*.vue : Use Tailwind for styles in Vue components
Applied to files:
src/renderer/src/components/think-content/ThinkContent.vue
📚 Learning: 2025-11-25T05:27:12.209Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/llm-agent-loop.mdc:0-0
Timestamp: 2025-11-25T05:27:12.209Z
Learning: Applies to src/main/presenter/llmProviderPresenter/providers/*.ts : In Provider implementations, include helper methods for Provider-specific operations such as `formatMessages`, `convertToProviderTools`, `parseFunctionCalls`, and `prepareFunctionCallPrompt`
Applied to files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
📚 Learning: 2025-11-25T05:26:43.510Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/i18n.mdc:0-0
Timestamp: 2025-11-25T05:26:43.510Z
Learning: Applies to src/renderer/src/**/*.{vue,ts,tsx} : Avoid hardcoding user-facing text and ensure all user-visible text uses the i18n translation system
Applied to files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
📚 Learning: 2025-11-25T05:27:12.209Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/llm-agent-loop.mdc:0-0
Timestamp: 2025-11-25T05:27:12.209Z
Learning: Applies to src/main/presenter/llmProviderPresenter/providers/*.ts : In Provider implementations, handle native tool support by converting MCP tools to Provider format using `convertToProviderTools` and including them in the API request; for Providers without native function call support, prepare messages using `prepareFunctionCallPrompt` before making the API call
Applied to files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
📚 Learning: 2025-11-25T05:27:12.209Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: .cursor/rules/llm-agent-loop.mdc:0-0
Timestamp: 2025-11-25T05:27:12.209Z
Learning: Applies to src/main/presenter/llmProviderPresenter/index.ts : In `src/main/presenter/llmProviderPresenter/index.ts`, listen for standardized events yielded by `coreStream` and handle them accordingly: buffer text content (`currentContent`), handle `tool_call_start/chunk/end` events by collecting tool details and calling `presenter.mcpPresenter.callTool`, send frontend events via `eventBus` with tool call status, format tool results for the next LLM call, and set `needContinueConversation = true`
Applied to files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
📚 Learning: 2025-11-25T05:26:11.312Z
Learnt from: CR
Repo: ThinkInAIXYZ/deepchat PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T05:26:11.312Z
Learning: Applies to src/main/presenter/configPresenter/**/*.ts : Store and retrieve custom prompts via `configPresenter.getCustomPrompts()` for config-based data source management
Applied to files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
📚 Learning: 2025-06-21T15:49:17.044Z
Learnt from: neoragex2002
Repo: ThinkInAIXYZ/deepchat PR: 550
File: src/renderer/src/stores/chat.ts:1011-1035
Timestamp: 2025-06-21T15:49:17.044Z
Learning: In src/renderer/src/stores/chat.ts, the user prefers to keep both `text` and `content` properties in the `handleMeetingInstruction` function's `sendMessage` call, even though they are redundant, rather than removing the `content` property.
Applied to files:
src/main/presenter/threadPresenter/utils/promptBuilder.ts
🧬 Code graph analysis (1)
src/main/presenter/threadPresenter/utils/promptBuilder.ts (1)
src/main/presenter/threadPresenter/utils/messageContent.ts (1)
buildUserMessageContext(156-165)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-check (x64)
🔇 Additional comments (12)
src/renderer/src/components/mcp-config/components/McpToolPanel.vue (1)
169-169: LGTM!Adding
window-no-drag-regionto the SheetHeader ensures interactive elements within the header (close button, title area) remain clickable rather than being captured by the window drag region. This is a sensible fix for Electron window management.src/renderer/src/components/ModelSelect.vue (2)
74-78: LGTM!The new
excludeProvidersprop is well-designed with:
- Proper TypeScript typing via
PropType<string[]>- Factory function default
() => []to prevent shared reference issues- Clean integration with the existing provider filtering logic
84-84: LGTM!The filter logic cleanly combines the existing
provider.enablecheck with the new exclusion filter. The use ofincludes()is appropriate for the expected small array size.src/main/presenter/threadPresenter/utils/promptBuilder.ts (2)
448-464: LGTM!The refactor to use
buildUserMessageContextinstead ofgetNormalizedUserMessageTextcorrectly enriches user messages with file context. The implementation:
- Extracts
finalUserContextonce and reuses it for both vision (with images) and plain text paths- Maintains consistency with the non-function-call branch below
Based on the provided snippet,
buildUserMessageContextcombines the normalized text with file context, which improves the LLM's awareness of attached files.
535-551: LGTM!The non-function-call path mirrors the function-call branch correctly, using
buildUserMessageContextto include file context in user messages. This ensures consistent behavior regardless of whether the model supports function calls.src/renderer/src/stores/searchAssistantStore.ts (5)
29-35: LGTM!The helper predicates cleanly encapsulate the provider filtering logic:
isProviderAllowedprovides a single point of control for provider exclusionisModelEnabledForProvidercorrectly validates model availability against the enabled models listThis abstraction improves maintainability by centralizing the filtering logic.
44-46: LGTM!The early continue for disallowed providers in
findPriorityModelis efficient and prevents unnecessary iteration through models of excluded providers.
78-82: Defensive guard for disallowed providers.Good defensive programming to reinitialize when an attempt is made to set a model from a disallowed provider. This could occur if the store is called with stale data or from code paths that don't pre-filter.
100-112: Verify the saved model validation logic.The condition at line 104
(!hasEnabledModels || isModelEnabledForProvider(...))allows using a saved model whenenabledModelsis empty. This seems intentional for initial startup scenarios, but verify this is the desired behavior.If the intent is to always validate saved models against enabled providers when data is available, consider simplifying:
- const usableSavedModel = - savedModel && - isProviderAllowed(savedModel.providerId) && - (!hasEnabledModels || isModelEnabledForProvider(savedModel.model, savedModel.providerId)) - ? savedModel - : null + const usableSavedModel = + savedModel && + isProviderAllowed(savedModel.providerId) && + isModelEnabledForProvider(savedModel.model, savedModel.providerId) + ? savedModel + : null
139-146: LGTM!The provider allowance check in
checkAndUpdateSearchAssistantModelensures that if a previously valid model's provider becomes disallowed (e.g., through config changes), the store reinitializes to a valid model. TheresolvedProviderIdfallback chain handles cases whereproviderRefmight be empty.src/renderer/src/composables/useChatConfigFields.ts (1)
69-82: Verify LLM provider support for temperature values up to 2.0 before approving.The temperature slider max value is configured to 2.0 for non-GPT-5 models. Major LLM providers (OpenAI, Anthropic) support this range, but this should be confirmed across all providers integrated in this application, particularly custom or less common ones. Check provider implementations and API documentation to ensure none reject temperature values > 1.5, as this could cause runtime errors when users attempt to set higher temperatures through the UI slider.
src/renderer/src/components/think-content/ThinkContent.vue (1)
112-113: LGTM! Clean refactoring to inherited styles.The change from fixed typography values to
inheritimproves maintainability by centralizing styling in the parent component. The effective font-size (12px) and line-height (16px) remain the same via the parent'stext-xs leading-4classes.Note: Link color now inherits the parent's 50% opacity (previously 60%), making links slightly lighter. They remain distinguishable via underline, but this subtle reduction in emphasis is worth verifying against your design intent.
Also applies to: 120-120
* feat: Hebrew (he-IL) Translation * feat: add workspace view to acp agents (#1158) * feat: add workspaceview for acp agent * feat: support workspace dirs * fix: workspace file refresh * fix: tool call status * fix: review refactor * chore: update readme * fix: add file context actions (#1160) * fix: keep last file list * feat(acp-workspace): add file context actions * fix(acp-workspace): move path helpers to preload * fix(preload): allow empty relative path * fix(preload): escape quotes when formatting paths * chore: update docs * fix: Multiple Issues Affecting Conversation Flow and Model Settings (#1166) * fix: #1164 support maxtoken 2 * fix: mcp tool panel close btn #1163 * fix: #1162 file content in converation * fix(search-assistant): exclude acp models * fix: #1072 thinkcontent respects the global font size set * feat: add new i18n translation
* fix: Multiple Issues Affecting Conversation Flow and Model Settings (#1166) * fix: #1164 support maxtoken 2 * fix: mcp tool panel close btn #1163 * fix: #1162 file content in converation * fix(search-assistant): exclude acp models * fix: #1072 thinkcontent respects the global font size set * feat: Hebrew (he-IL) Translation (#1157) * feat: Hebrew (he-IL) Translation * feat: add workspace view to acp agents (#1158) * feat: add workspaceview for acp agent * feat: support workspace dirs * fix: workspace file refresh * fix: tool call status * fix: review refactor * chore: update readme * fix: add file context actions (#1160) * fix: keep last file list * feat(acp-workspace): add file context actions * fix(acp-workspace): move path helpers to preload * fix(preload): allow empty relative path * fix(preload): escape quotes when formatting paths * chore: update docs * fix: Multiple Issues Affecting Conversation Flow and Model Settings (#1166) * fix: #1164 support maxtoken 2 * fix: mcp tool panel close btn #1163 * fix: #1162 file content in converation * fix(search-assistant): exclude acp models * fix: #1072 thinkcontent respects the global font size set * feat: add new i18n translation * feat: add custom font setting (#1167) * feat(settings): add font customization controls * feat: change font with monaco * chore: remove log and remove unuse key * fix: linux font parse * feat: use font-list to get font * fix: font setting not work on settings page (#1169) * style: unify scroll bar style (#1173) * feat: acp init and process manage (#1171) * feat: init acp process on select * feat: warm up acp process on new thread * fix: reuse warmup process * fix: vue warning * chore: add plan for acp debug panel * feat: add debugview for acp * feat: add i18n for debug * fix: code review * fix: ai review * fix: Shutdown may skip releasing warmup‑only processes due to using warmupKey instead of agentId. * chore: update markdown renderer * chore: update mermaid node * Merge commit from fork * chore: update markstream-vue to version 0.0.3-beta.3 fix link renderer feat html_inline render * fix: increase button size for web content limit adjustment * fix: close app kill all acp processes (#1175) * fix: close app kill all acp processes * fix: disable tool call merge * fix: handle uncatch error * fix: remove redundant type * feat: add shell to powerpack (#1178) * chore(powerpack): randomize shell workdir * feat: exclusive inmem server in terminal display * fix: add sandbox in shell script --------- Co-authored-by: xiaomo <[email protected]> Co-authored-by: Simon He <[email protected]> Co-authored-by: Simon He <[email protected]>
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Style
✏️ Tip: You can customize this high-level summary in your review settings.