Skip to content

Conversation

@zerob13
Copy link
Collaborator

@zerob13 zerob13 commented Oct 27, 2025

add nowledge mem mcp as default mcp server

Summary by CodeRabbit

  • New Features

    • Added HTTP and SSE remote server support in MCP configuration and ability to persist custom base URLs and headers.
    • Introduced user-removal tracking for built-in servers so removed defaults stay hidden until re-added.
  • Bug Fixes

    • Ensures built-in servers are restored automatically unless explicitly removed; re-adding clears removal state.
  • Refactor

    • Improved MCP server form UI and validation with clearer field visibility for remote vs local server types.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Walkthrough

The PR replaces the default in-memory MCP server with an HTTP-based nowledge-mem entry, adds tracking for user-removed built-in servers via a removedBuiltInServers field, and updates the Vue form to treat remote transports (sse/http) uniformly with adjusted field visibility, parsing, and validation.

Changes

Cohort / File(s) Summary
MCP Config Backend
src/main/presenter/configPresenter/mcpConfHelper.ts
Replaced default memory server with nowledge-mem (HTTP) entry; added removedBuiltInServers?: string[] to IMcpSettings; introduced BUILT_IN_SERVER_NAMES; added helpers to get/set/clear/mark/unmark removed built-ins and cloneServerConfig; updated loading, add, remove, and reset flows to respect and maintain removal state.
MCP Server Form UI
src/renderer/src/components/mcp-config/mcpServerForm.vue
Added MCPServerTypeOption and VALID_MCP_TYPES; introduced isHttpTransportType and isRemoteType computed flags; unified remote-type handling for sse/http (baseUrl/customHeaders shown, command/args/env hidden); import parsing accepts customHeaders or headers and infers type; adjusted validation and submit output per type.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Form as mcpServerForm.vue
    participant Config as mcpConfHelper.ts
    participant Storage

    Note over Form,Config: Add built-in server flow
    User->>Form: Submit server (e.g., nowledge-mem)
    Form->>Config: addMcpServer(serverConfig)
    Config->>Config: isBuiltInServer? → true
    Config->>Config: unmarkBuiltInServerRemoved(name)
    Config->>Storage: persist removedBuiltInServers
    Config->>Form: return updated server list

    Note over Form,Config: Remove built-in server flow
    User->>Form: Remove server
    Form->>Config: removeMcpServer(name)
    Config->>Config: isBuiltInServer? → true
    Config->>Config: markBuiltInServerRemoved(name)
    Config->>Storage: persist removedBuiltInServers
    Config->>Form: return updated server list
Loading
sequenceDiagram
    participant User
    participant Form as mcpServerForm.vue

    Note over Form: Type selection and submit
    User->>Form: Select type (stdio / inmemory / sse / http)
    Form->>Form: set isRemoteType (sse or http)
    alt isRemoteType
        Form->>Form: show baseUrl & customHeaders, hide command/args/env
        Form->>Form: validate baseUrl/customHeaders
    else local type
        Form->>Form: show command/args/env, hide baseUrl/customHeaders
        Form->>Form: validate command/args/env
    end
    User->>Form: Submit
    Form->>Config: addMcpServer/update (payload shaped by type)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Focus review on mcpConfHelper.ts built-in tracking logic (mark/unmark/clone) and persistence interactions.
  • Verify mcpServerForm.vue import parsing and type inference, especially handling of headers vs customHeaders.
  • Confirm integration: form-generated configs match backend expectations for the new nowledge-mem HTTP entry and that reset/restore flows clear removedBuiltInServers as intended.

Poem

🐰 I nibble keys and hop in code,
Nowledge-mem hums down the road,
Built-ins hidden, found, then freed—
Headers, URLs, a rabbit's deed.
Configs align, the form's delight. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: add nowledge mem mcp" directly aligns with the primary objective stated in the PR description: "add nowledge mem mcp as default mcp server." The changeset confirms this main change, as it replaces the existing built-in "memory" MCP server with a new HTTP-based "nowledge-mem" server and updates related configurations. While the implementation includes supporting infrastructure such as removal tracking for built-in servers, refactored loading logic, and form updates, these are secondary infrastructure changes that enable the core feature. The title clearly and specifically captures the main feature being delivered.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-nowledge-mem-mcp

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8191914 and 76a52ba.

📒 Files selected for processing (1)
  • src/main/presenter/configPresenter/mcpConfHelper.ts (7 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)

**/*.{js,jsx,ts,tsx}: 使用 OxLint 进行代码检查
Log和注释使用英文书写

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/{main,renderer}/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

src/{main,renderer}/**/*.ts: Use context isolation for improved security
Implement proper inter-process communication (IPC) patterns
Optimize application startup time with lazy loading
Implement proper error handling and logging for debugging

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/main/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

Use Electron's built-in APIs for file system and native dialogs

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-logging.mdc)

**/*.{ts,tsx}: 始终使用 try-catch 处理可能的错误
提供有意义的错误信息
记录详细的错误日志
优雅降级处理
日志应包含时间戳、日志级别、错误代码、错误描述、堆栈跟踪(如适用)、相关上下文信息
日志级别应包括 ERROR、WARN、INFO、DEBUG
不要吞掉错误
提供用户友好的错误信息
实现错误重试机制
避免记录敏感信息
使用结构化日志
设置适当的日志级别

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/main/**/*.{ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

主进程代码放在 src/main

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use English for all logs and comments

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)

Use PascalCase for TypeScript types and classes

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/main/presenter/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Place Electron main-process presenters under src/main/presenter/ (Window, Tab, Thread, Mcp, Config, LLMProvider)

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx,js,jsx,vue,css,scss,md,json,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

Prettier style: single quotes, no semicolons, print width 100; run pnpm run format

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,vue}: Use OxLint for JS/TS code; keep lint clean
Use camelCase for variables and functions
Use SCREAMING_SNAKE_CASE for constants

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
🧠 Learnings (1)
📚 Learning: 2025-09-06T03:07:23.817Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-06T03:07:23.817Z
Learning: Applies to src/main/presenter/mcpPresenter/inMemoryServers/*.ts : Implement new MCP tools under src/main/presenter/mcpPresenter/inMemoryServers/

Applied to files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
🧬 Code graph analysis (1)
src/main/presenter/configPresenter/mcpConfHelper.ts (1)
src/shared/types/presenters/legacy.presenters.d.ts (1)
  • MCPServerConfig (1122-1136)
⏰ 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 (6)
src/main/presenter/configPresenter/mcpConfHelper.ts (6)

25-25: LGTM! Clear tracking field for user-removed built-in servers.

The removedBuiltInServers field is well-typed and properly documented, enabling persistent tracking of which built-in servers users have explicitly removed.


320-320: LGTM! Efficient built-in server lookup.

The BUILT_IN_SERVER_NAMES set provides O(1) lookups for built-in server checking and follows the SCREAMING_SNAKE_CASE convention for constants.


345-386: LGTM! Well-structured removal tracking helpers.

The private helper methods are cleanly implemented:

  • Proper type safety and null-handling
  • setRemovedBuiltInServers uses Set for deduplication (line 350)
  • cloneServerConfig properly handles both structuredClone and JSON fallback, addressing the mutation concern from past reviews

394-414: LGTM! Proper removal tracking and cloning.

The updated logic correctly:

  • Respects user-removed built-in servers via removedBuiltInServers check (lines 397-399)
  • Clones configurations before insertion (line 402), preventing shared reference mutations as flagged in past reviews

557-559: LGTM! Consistent bidirectional removal tracking.

The integration points properly maintain removal state:

  • addMcpServer unmarks when re-adding a built-in (lines 557-559)
  • removeMcpServer marks when removing a built-in (lines 648-650)
  • resetToDefaultServers clears all removal tracking (line 701)

Also applies to: 648-650, 701-701


339-340: LGTM! Proper initialization of removal tracking.

The removedBuiltInServers: [] default correctly initializes the tracking state with no servers removed.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

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/mcp-config/mcpServerForm.vue (2)

493-513: Do not persist baseUrl for non-remote servers.

Currently, baseUrl is written even for stdio/inmemory, which can misclassify servers later. Only include baseUrl for remote types.

As per coding guidelines

   } else {
     // STDIO 或 inmemory 类型的服务器
     serverConfig = {
       ...baseConfig,
       command: command.value.trim(),
       // args 从 argumentsList 更新,所以直接使用 split 即可,或者直接使用 argumentsList.value
       args: args.value.split(/\s+/).filter(Boolean),
-      env: parsedEnv,
-      baseUrl: baseUrl.value.trim()
+      env: parsedEnv
     }
   }

874-903: Eliminate hardcoded UI fallbacks; use i18n keys only.

Remove literal fallbacks like '模型选择'/'添加文件夹'/'未选择任何文件夹' and localize aria-labels.

As per coding guidelines

-            {{ t('settings.mcp.serverForm.imageModel') || '模型选择' }}
+            {{ t('settings.mcp.serverForm.imageModel') }}
@@
-            {{ t('settings.mcp.serverForm.folders') || '可访问的文件夹' }}
+            {{ t('settings.mcp.serverForm.folders') }}
@@
-              {{ t('settings.mcp.serverForm.addFolder') || '添加文件夹' }}
+              {{ t('settings.mcp.serverForm.addFolder') }}
@@
-              {{ t('settings.mcp.serverForm.noFoldersSelected') || '未选择任何文件夹' }}
+              {{ t('settings.mcp.serverForm.noFoldersSelected') }}
@@
-                :aria-label="`Remove ${arg}`"
+                :aria-label="t('settings.mcp.serverForm.removeArg', { arg })"

Also applies to: 904-949, 1151-1187, 971-973

🧹 Nitpick comments (7)
src/renderer/src/components/mcp-config/mcpServerForm.vue (6)

193-199: Remove debug log and align logs to English.

Drop console.log('type', ...) and keep logs meaningful and English-only as per guidelines.

As per coding guidelines

-    console.log('type', type.value, baseUrl.value)
+    // no-op: avoid noisy logs in production

Also applies to: 201-208


725-727: Localize the placeholder string.

customHeadersPlaceholder is user-facing; move to i18n instead of hardcoded text.

As per coding guidelines

-const customHeadersPlaceholder = `Authorization=Bearer your_token
-
-HTTP-Referer=deepchatai.cn`
+const customHeadersPlaceholder = t('settings.mcp.serverForm.customHeadersPlaceholder')

229-235: Use English logs and avoid mixed-language messages.

Replace Chinese log messages with English; prefer structured context.

As per coding guidelines

-    console.error('解析JSON配置失败:', error)
+    console.error('[MCP Server Form] Failed to parse JSON config:', error)
@@
-    console.error('选择文件夹失败:', error)
+    console.error('[MCP Server Form] Directory selection failed:', error)
@@
-          console.warn(`未找到匹配的模型: ${providerId} ${modelId}`)
+          console.warn(`[MCP Server Form] Model not found for provider=${providerId} modelId=${modelId}`)

Also applies to: 333-339, 636-637


184-185: Avoid any; prefer unknown with narrowing.

Replace any with precise types or unknown + guards.

As per coding guidelines

-    const [serverName, serverConfig] = serverEntries[0] as [string, any]
+    interface ImportedMcpConfig {
+      command?: string
+      args?: string[]
+      env?: Record<string, unknown>
+      descriptions?: string
+      icons?: string
+      type?: MCPServerTypeOption
+      url?: string
+      baseUrl?: string
+      headers?: Record<string, string>
+      customHeaders?: Record<string, string>
+      autoApprove?: string[]
+    }
+    const [serverName, serverConfig] = serverEntries[0] as [string, ImportedMcpConfig]
@@
-        const envConfig = newConfig.env as Record<string, any>
+        const envConfig = newConfig.env as Record<string, unknown>
         useE2B.value = envConfig.USE_E2B === true || envConfig.USE_E2B === 'true'
-        e2bApiKey.value = envConfig.E2B_API_KEY || ''
+        e2bApiKey.value = (envConfig.E2B_API_KEY as string) || ''

Also applies to: 662-667


669-675: Support headers alias in edit mode for consistency.

parseJsonConfig reads headers or customHeaders; edit-mode init should too.

-      if (newConfig.customHeaders) {
-        customHeaders.value = formatJsonHeaders(newConfig.customHeaders)
+      if (newConfig.customHeaders || (newConfig as any).headers) {
+        const hdrs = newConfig.customHeaders ?? ((newConfig as any).headers as Record<string, string>)
+        customHeaders.value = formatJsonHeaders(hdrs)
       } else {
         customHeaders.value = ''
       }

81-89: Naming nit: BuiltIn vs BuildIn.

Consider isBuiltInFileSystem for readability; current spelling mirrors server key but reads oddly in code.

src/main/presenter/configPresenter/mcpConfHelper.ts (1)

701-777: Casting ExtendedMCPServerConfig to MCPServerConfig.

Consider extending MCPServerConfig (or storing metadata separately) to avoid casting and preserve type safety.

Also applies to: 803-827

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7a8d06 and 8191914.

📒 Files selected for processing (2)
  • src/main/presenter/configPresenter/mcpConfHelper.ts (7 hunks)
  • src/renderer/src/components/mcp-config/mcpServerForm.vue (9 hunks)
🧰 Additional context used
📓 Path-based instructions (22)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)

**/*.{js,jsx,ts,tsx}: 使用 OxLint 进行代码检查
Log和注释使用英文书写

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/{main,renderer}/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

src/{main,renderer}/**/*.ts: Use context isolation for improved security
Implement proper inter-process communication (IPC) patterns
Optimize application startup time with lazy loading
Implement proper error handling and logging for debugging

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/main/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)

Use Electron's built-in APIs for file system and native dialogs

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/error-logging.mdc)

**/*.{ts,tsx}: 始终使用 try-catch 处理可能的错误
提供有意义的错误信息
记录详细的错误日志
优雅降级处理
日志应包含时间戳、日志级别、错误代码、错误描述、堆栈跟踪(如适用)、相关上下文信息
日志级别应包括 ERROR、WARN、INFO、DEBUG
不要吞掉错误
提供用户友好的错误信息
实现错误重试机制
避免记录敏感信息
使用结构化日志
设置适当的日志级别

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
src/main/**/*.{ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

主进程代码放在 src/main

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use English for all logs and comments

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
  • src/renderer/src/components/mcp-config/mcpServerForm.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)

Use PascalCase for TypeScript types and classes

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/main/presenter/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Place Electron main-process presenters under src/main/presenter/ (Window, Tab, Thread, Mcp, Config, LLMProvider)

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
**/*.{ts,tsx,js,jsx,vue,css,scss,md,json,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

Prettier style: single quotes, no semicolons, print width 100; run pnpm run format

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
  • src/renderer/src/components/mcp-config/mcpServerForm.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,vue}: Use OxLint for JS/TS code; keep lint clean
Use camelCase for variables and functions
Use SCREAMING_SNAKE_CASE for constants

Files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/src/**/*

📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)

src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/**/*.{vue,ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

渲染进程代码放在 src/renderer

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
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
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/src/**/*.vue

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

Use scoped styles to prevent CSS conflicts between components

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
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 statements.

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/**/*.{vue,ts}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

Implement lazy loading for routes and components.

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/**/*.{ts,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.

Use Pinia for frontend state management (do not introduce alternative state libraries)

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/{src,shell,floating}/**/*.vue

📄 CodeRabbit inference engine (CLAUDE.md)

src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/src/components/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Organize UI components by feature within src/renderer/src/

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/src/**

📄 CodeRabbit inference engine (AGENTS.md)

Place Vue 3 app source under src/renderer/src (components, stores, views, i18n, lib)

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/src/**/*.{vue,ts}

📄 CodeRabbit inference engine (AGENTS.md)

All user-facing strings must use vue-i18n ($t/keys) rather than hardcoded literals

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
src/renderer/**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

Name Vue component files in PascalCase (e.g., ChatInput.vue)

Files:

  • src/renderer/src/components/mcp-config/mcpServerForm.vue
🧠 Learnings (1)
📚 Learning: 2025-09-06T03:07:23.817Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-06T03:07:23.817Z
Learning: Applies to src/main/presenter/mcpPresenter/inMemoryServers/*.ts : Implement new MCP tools under src/main/presenter/mcpPresenter/inMemoryServers/

Applied to files:

  • src/main/presenter/configPresenter/mcpConfHelper.ts
🧬 Code graph analysis (1)
src/main/presenter/configPresenter/mcpConfHelper.ts (1)
src/shared/types/presenters/legacy.presenters.d.ts (1)
  • MCPServerConfig (1122-1136)
⏰ 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 (6)
src/renderer/src/components/mcp-config/mcpServerForm.vue (3)

55-61: Type alias and whitelist look good.

Union alias MCPServerTypeOption and VALID_MCP_TYPES simplify correctness across the form.


86-88: Remote-type gating is clean.

isRemoteType and showBaseUrl centralize visibility rules for SSE/HTTP.

Also applies to: 139-143


243-253: Validation changes make sense.

Command optional for remote types; baseUrl required only for remote; overall form validity logic reads well.

Also applies to: 263-266, 297-311

src/main/presenter/configPresenter/mcpConfHelper.ts (3)

543-546: Built-in removal tracking is correct.

Unmark on add; mark on remove; aligns with getMcpServers behavior.

Also applies to: 634-637


334-341: Defaults initialization includes removal tracking.

Added removedBuiltInServers: [] with other defaults; good.


847-994: Upgrade/migration handlers look safe.

Migrations guard by version, handle platform services, and clean defaults.

@wey-gu
Copy link

wey-gu commented Oct 27, 2025

@zerob13 thanks a lot, you are amazing!

Our side tight integration is on the way!

@zerob13
Copy link
Collaborator Author

zerob13 commented Oct 27, 2025

@zerob13 thanks a lot, you are amazing!

Our side tight integration is on the way!

Really looking forward to your future API — I’m confident we can build some very cool integrations together.

@zerob13 zerob13 merged commit a849eaa into dev Oct 27, 2025
6 checks passed
@zerob13 zerob13 deleted the feat/add-nowledge-mem-mcp branch November 6, 2025 10:52
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.

3 participants