Skip to content

Conversation

@zerob13
Copy link
Collaborator

@zerob13 zerob13 commented Jul 27, 2025

  1. 支持内置知识库 (超强新功能)
  2. 支持会话整体导出为 markdown/txt/html
  3. Gemini 支持 thinking 相关的设置
  4. 新增了 Groq 供应商
  5. 修复e2b的bug

Summary by CodeRabbit

  • New Features

    • Added built-in knowledge base management, enabling offline file uploads, chunking, embedding, and similarity search with a user-friendly interface.
    • Introduced export functionality for conversation threads in Markdown, HTML, and plain text formats.
    • Added customizable dialog prompts with timeout and internationalization support.
    • Enhanced MCP tool management, allowing users to enable/disable individual tools per conversation.
    • Introduced advanced model settings, including Gemini "thinking budget" configuration.
  • Improvements

    • Enhanced knowledge base UI with file status tracking, search, and detailed configuration options.
    • Improved conversation list sorting, grouping, and export options.
    • Updated localization for new features in multiple languages.
    • Improved model and provider management, including support for new providers and models.
    • Refined tool selection and synchronization across chat and MCP stores.
  • Bug Fixes

    • Fixed tooltip and icon behaviors for improved usability.
    • Improved error handling and feedback for file operations and export failures.
  • Documentation

    • Added comprehensive documentation for knowledge base architecture, design, and usage.
  • Chores

    • Updated dependencies and scripts, including removal of unused packages and addition of new install routines.

These updates bring powerful offline knowledge management, richer export options, and improved customization to your chat experience.

hllshiro and others added 30 commits June 18, 2025 15:46
…hance BuiltinKnowledgeSettings with URL query parameter handling
…rs and loading logic for better user experience
… model listing with additional configuration properties
hllshiro and others added 17 commits July 24, 2025 16:37
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…task presenters; update text sanitization and localization
feat: add click outside to close sidebar functionality
* style(threads): optimize the operation logic of new sessions

* chore: format code
* chore(ci): add code lint check

* chore: remove linting steps from build workflow; add linting steps to PR check workflow
* fix: gemini reasoning by config

* feat: support gemini thinking

* fix: user define model config first

* fix: format

* chore: ignore md for format

* doc: remove empty line

* fix: ai review
…ration of 200& update the include configuration in the tsconfig.web.json file (#640)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 27, 2025

Caution

Review failed

Failed to post review comments.

Walkthrough

This update introduces a comprehensive built-in knowledge base feature, including a modular RAG architecture with configuration management, a DuckDB-based vector database, task queue, and UI components for managing, searching, and exporting knowledge bases. It also adds a conversation export feature (Markdown, HTML, plain text), Groq provider integration, per-conversation MCP tool filtering, a dialog system, and multiple enhancements to model config, localization, and workflow automation.

Changes

Files / Areas Change Summary
Knowledge Base Architecture & Implementation
docs/builtin-knowledge-architecture.md, docs/builtin-knowledge-design.md, docs/builtin-knowledge.md, src/main/presenter/knowledgePresenter/*, src/main/presenter/configPresenter/knowledgeConfHelper.ts, src/main/presenter/configPresenter/index.ts, src/main/presenter/configPresenter/mcpConfHelper.ts, src/main/presenter/mcpPresenter/inMemoryServers/builder.ts, src/main/presenter/mcpPresenter/inMemoryServers/builtinKnowledgeServer.ts, src/renderer/src/components/settings/BuiltinKnowledgeSettings.vue, src/renderer/src/components/settings/KnowledgeFile.vue, src/renderer/src/components/settings/KnowledgeFileItem.vue, src/renderer/src/components/settings/KnowledgeBaseSettings.vue
Adds a built-in knowledge base system with configuration, vector DB, task queue, file management, UI, and server integration.
Text Splitting & Vector Utilities
src/main/lib/textsplitters/*, src/main/utils/vector.ts, src/main/utils/strings.ts
Introduces modular text splitting, document types, and vector normalization utilities.
Groq Provider Integration
src/main/presenter/llmProviderPresenter/providers/groqProvider.ts, src/main/presenter/llmProviderPresenter/index.ts, src/main/presenter/configPresenter/providers.ts
Adds Groq provider support with model fetching, config, and instantiation.
Model Config & Embedding Enhancements
src/main/presenter/configPresenter/modelConfig.ts, src/main/presenter/configPresenter/modelDefaultSettings.ts, src/main/presenter/llmProviderPresenter/providers/openAICompatibleProvider.ts, src/main/presenter/llmProviderPresenter/providers/ollamaProvider.ts, src/main/presenter/llmProviderPresenter/baseProvider.ts, src/main/presenter/llmProviderPresenter/providers/geminiProvider.ts, src/main/presenter/llmProviderPresenter/providers/githubCopilotProvider.ts, src/main/presenter/llmProviderPresenter/index.ts, src/renderer/src/components/settings/ModelConfigDialog.vue, src/renderer/src/components/settings/ModelConfigItem.vue, src/renderer/src/components/settings/OllamaProviderSettingsDetail.vue, src/renderer/src/stores/settings.ts
Improves model config handling, embedding API, thinking budget UI, and model list logic.
Conversation Export Feature
docs/EXPORT_IMPLEMENTATION.md, src/main/presenter/threadPresenter/index.ts, src/renderer/src/components/ThreadItem.vue, src/renderer/src/stores/chat.ts, src/renderer/src/i18n/*/thread.json
Adds export (Markdown, HTML, plain text) for conversations with UI and i18n.
Per-Conversation MCP Tool Filtering
src/main/presenter/threadPresenter/index.ts, src/main/presenter/mcpPresenter/toolManager.ts, src/main/presenter/mcpPresenter/index.ts, src/main/presenter/sqlitePresenter/tables/conversations.ts, src/renderer/src/components/NewThread.vue, src/renderer/src/components/mcpToolsList.vue, src/renderer/src/stores/chat.ts, src/renderer/src/stores/mcp.ts
Enables per-conversation enabled MCP tools, propagates through LLM and MCP layers, updates DB schema and UI.
Dialog System
docs/dialog-presenter.md, src/main/events.ts, src/renderer/src/events.ts, src/main/presenter/dialogPresenter/index.ts, src/renderer/src/components/ui/MessageDialog.vue, src/renderer/src/stores/dialog.ts, src/renderer/src/App.vue
Adds a main-renderer dialog system with store, UI, and event integration.
UI/UX & Workflow Enhancements
src/renderer/src/components/ChatConfig.vue, src/renderer/src/components/FileItem.vue, src/renderer/src/components/ModelSelect.vue, src/renderer/src/components/ThreadsView.vue, src/renderer/src/components/icons/ModelIcon.vue, src/renderer/src/components/settings/DifyKnowledgeSettings.vue, src/renderer/src/components/settings/FastGptKnowledgeSettings.vue, src/renderer/src/components/settings/RagflowKnowledgeSettings.vue, src/renderer/src/components/ui/UpdateDialog.vue, src/renderer/src/lib/utils.ts
Adds tooltip delay, icon helpers, new sidebar button, export UI, and improved settings dialogs.
Localization
src/renderer/src/i18n/*
Adds/updates i18n for knowledge base, export, thinking budget, and error messages in multiple languages.
Build, Scripts, and Workflow
package.json, scripts/installVss.js, electron.vite.config.ts, .github/workflows/prcheck.yml, .prettierignore
Adds lint/format check, new install script, removes pyodide, updates dependencies, and workflow steps.
Refactoring & Cleanup
src/main/presenter/mcpPresenter/inMemoryServers/appleServer.ts, src/main/presenter/mcpPresenter/inMemoryServers/powerpackServer.ts, src/main/presenter/mcpPresenter/pythonRunner/index.ts, src/main/presenter/mcpPresenter/pythonRunner/prepareEnv.ts, src/main/presenter/filePresenter/BaseFileAdapter.ts, src/main/presenter/filePresenter/FilePresenter.ts, src/main/presenter/index.ts, src/main/presenter/trayPresenter.ts, src/main/presenter/upgradePresenter/index.ts, src/main/lib/textsplitters/document/index.ts, src/renderer/src/components/message/MessageItemUser.vue
Removes local Python runner, refactors for clarity, updates method signatures, and minor formatting.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RendererUI
    participant ChatStore
    participant MainThread
    participant KnowledgePresenter
    participant KnowledgeStorePresenter
    participant DuckDBPresenter
    participant LLMProvider

    User->>RendererUI: Upload file / Search KB / Export conversation
    RendererUI->>ChatStore: addFile / search / exportThread
    ChatStore->>MainThread: IPC call (addFile/search/export)
    MainThread->>KnowledgePresenter: addFile/queryFile/similarityQuery/exportConversation
    KnowledgePresenter->>KnowledgeStorePresenter: addFile/queryFile/similarityQuery
    KnowledgeStorePresenter->>DuckDBPresenter: Insert/query vectors/files
    KnowledgeStorePresenter->>LLMProvider: getEmbeddings (for chunking/search)
    KnowledgePresenter-->>MainThread: Result/Progress/Error
    MainThread-->>ChatStore: IPC response
    ChatStore-->>RendererUI: Update UI with result/progress
    RendererUI-->>User: Show status, search results, or download file
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90–120 minutes

  • Complexity: High — new architecture (RAG, vector DB, task queue), multiple new modules and UIs, workflow and config changes, major feature additions, and extensive i18n.
  • Volume: Dozens of new files, significant modifications across main and renderer, and documentation.
  • Scope: Touches core knowledge management, LLM provider integration, export, dialog, and UI.

Possibly related PRs

  • Feature/export to html #632: Implements conversation export (Markdown, HTML, plain text) with matching methods and UI—directly related to this PR's export feature.
  • Feature/builtin knowledge #630: Introduces the built-in knowledge base system, including the KnowledgePresenter, vector DB, and task queue—directly related to this PR's knowledge base architecture.
  • Bugfix/gemini thinking #639: Refines getModelConfig with cache key sanitization and user-defined config handling—directly related to this PR's model config changes.

Suggested reviewers

  • deepinfect

Poem

🐇
In the warren of code, new knowledge takes root,
With vectors and tasks, our search is astute.
Export in Markdown, HTML, or plain text delight,
Dialogs pop up, making UX just right.
Groq joins the chat, and tool filters are keen—
This bunny’s release is the best you’ve seen!
🥕✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@zerob13
Copy link
Collaborator Author

zerob13 commented Jul 27, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 27, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants