Skip to content

feat: scope plugins skills and MCP by agent#1853

Merged
zerob13 merged 3 commits into
devfrom
feat/agent-scoped-extensions
Jun 30, 2026
Merged

feat: scope plugins skills and MCP by agent#1853
zerob13 merged 3 commits into
devfrom
feat/agent-scoped-extensions

Conversation

@zhangmo8

@zhangmo8 zhangmo8 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add DeepChat agent policy fields for plugins, skills, and MCP allowlists and enforce them in runtime tool/skill/MCP paths
  • keep /plugins/skills and /plugins/mcp on the original management views while making enable/disable toggles update the current agent policy
  • add agent policy panel, SDD docs, i18n strings, and regression tests for global MCP state, wrapper pages, effective config, and managed MCP toggles

Validation

  • pnpm run format
  • pnpm run i18n
  • pnpm run lint
  • pnpm run typecheck:web
  • pnpm vitest run test/main/presenter/toolPresenter/toolPresenter.test.ts test/renderer/components/McpSettings.test.ts test/renderer/components/McpServers.test.ts test/renderer/components/PluginPageWrappers.test.ts test/renderer/components/SkillsSettingsAgentScope.test.ts test/renderer/components/AgentExtensionPolicyPanel.test.ts
  • commit hooks: pnpm run typecheck (typecheck:node + typecheck:web)

Note: local environment prints Node engine warnings because current Node is v26.0.0 while package expects >=24.14.1 <25.

Summary by CodeRabbit

  • New Features

    • Added agent-scoped policy controls for plugins, skills, and MCP servers, including a dedicated policy panel.
    • Updated Plugins/Skills/MCP settings to support an agent-scoped view with per-agent enable/disable toggles and summaries.
  • Bug Fixes

    • Tool and skill availability now strictly follows the selected agent’s extension policy for discovery, viewing, and execution.
    • MCP tool listing, permission checks, and calls are filtered consistently, including plugin-owned MCP servers.
  • Tests

    • Added/expanded automated coverage for agent-scoped policy behavior across settings UI and runtime tool routing.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds per-agent plugin, skill, and MCP allow-list fields to DeepChat agent config. Backend presenters now resolve and enforce those policies during tool, MCP, and skill handling. The settings UI adds agent-scoped policy editors and page wiring, with locale updates across supported languages.

Changes

Agent-scoped Plugins, Skills, and MCP

Layer / File(s) Summary
Shared contracts and architecture docs
src/shared/contracts/domainSchemas.ts, src/shared/types/agent-interface.d.ts, src/shared/types/presenters/core.presenter.d.ts, src/shared/types/presenters/tool.presenter.d.ts, docs/architecture/agent-scoped-extensions/*
Adds the three optional policy fields to agent config, extends presenter contracts with access context, and adds spec/plan/tasks docs for the scoped-extension model.
Agent config merge and runtime policy resolution
src/main/presenter/agentRepository/index.ts, src/main/presenter/agentRuntimePresenter/index.ts
Normalizes and merges nullable policy lists, resolves per-agent extension policy at runtime, filters skills and tool definitions, updates tool-profile fingerprints, and forwards policy to tool execution.
Tool, MCP, and skill access routing
src/main/presenter/toolPresenter/index.ts, src/main/presenter/mcpPresenter/index.ts, src/main/presenter/mcpPresenter/toolManager.ts, src/main/presenter/skillPresenter/skillTools.ts, src/main/presenter/toolPresenter/agentTools/agentToolManager.ts
Stores per-conversation MCP access context, forwards agent/server/plugin allow-lists through MCP presenter and tool manager, blocks disallowed MCP calls, and filters skill list/view access by allowed skill names.
Agent-scoped settings UI
src/renderer/src/pages/plugins/AgentExtensionPolicyPanel.vue, src/renderer/settings/components/McpSettings.vue, src/renderer/settings/components/skills/SkillsSettings.vue, src/renderer/src/components/mcp-config/components/McpServers.vue, src/renderer/src/pages/plugins/McpPluginsPage.vue, src/renderer/src/pages/plugins/PluginsCatalogPage.vue, src/renderer/src/pages/plugins/SkillsPluginsPage.vue
Adds the new policy editor panel, enables agent-scoped MCP/skill settings modes, adds agent-scoped server toggle wiring, and routes plugin pages into the agent scope flow.
Locale strings
src/renderer/src/i18n/*/settings.json
Adds the new agent-scope pluginsHub strings across all locale files.
Tests
test/main/presenter/*, test/renderer/components/*
Adds coverage for config inheritance, MCP/tool routing, skill allow-lists, agent-scoped UI saving, and page wrapper rendering.

Sequence Diagram(s)

sequenceDiagram
  participant Session
  participant AgentRuntimePresenter
  participant ToolPresenter
  participant McpPresenter
  participant ToolManager

  Session->>AgentRuntimePresenter: load tool definitions for agentId
  AgentRuntimePresenter->>AgentRuntimePresenter: resolveAgentExtensionPolicy()
  AgentRuntimePresenter->>ToolPresenter: getAllToolDefinitions(policy context)
  ToolPresenter->>McpPresenter: getAllToolDefinitions(access context)
  McpPresenter->>ToolManager: getAllToolDefinitions(access context)
  ToolManager-->>McpPresenter: filtered MCP tools
  McpPresenter-->>ToolPresenter: filtered tool list
  ToolPresenter-->>AgentRuntimePresenter: merged definitions

  Session->>AgentRuntimePresenter: execute deferred tool call
  AgentRuntimePresenter->>ToolPresenter: callTool(policy context)
  ToolPresenter->>McpPresenter: callTool(access context)
  McpPresenter->>ToolManager: callTool(access)
  ToolManager-->>Session: allowed tool result or disallowed error
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • ThinkInAIXYZ/deepchat#635: Both PRs change MCP tool-definition retrieval filtering in McpPresenter/ToolManager, with this PR adding agent policy context on top.
  • ThinkInAIXYZ/deepchat#1208: Both PRs touch the shared tool-routing layer in src/main/presenter/toolPresenter/index.ts and related call forwarding.
  • ThinkInAIXYZ/deepchat#1597: Both PRs modify plugin-owned MCP server handling and filtering in mcpPresenter/toolManager.

Suggested reviewers

  • deepinfect

Poem

A bunny hops through plugin trails,
with skills and MCP behind soft veils.
null means inherit, [] says no,
and chosen tools now neatly go.
🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: scoping plugins, skills, and MCP access by agent.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/agent-scoped-extensions

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

🟡 Minor comments (20)
src/renderer/src/i18n/tr-TR/settings.json-2751-2768 (1)

2751-2768: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new Turkish strings before shipping.

These new agentScope* values are still English (Current agent scope, Refresh, Select all, etc.), so the new panel will render mixed-language UI for tr-TR users.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/tr-TR/settings.json` around lines 2751 - 2768, The new
agentScope* translations in settings.json are still in English, so localize
these strings for tr-TR before shipping. Update the affected keys under the
agent scope section, including agentScopeTitle, agentScopeDescription,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and
agentScopeNoMcp, so the new panel matches the rest of the Turkish UI.
src/main/presenter/skillPresenter/skillTools.ts-57-70 (1)

57-70: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Pass the normalized skill name to viewSkill.

requestedSkillName is trimmed for the allowlist check, but Line 69 still forwards input.name. A request like ' code-review ' will clear the policy gate and then miss in the presenter lookup.

Suggested fix
-    return await this.skillPresenter.viewSkill(input.name, {
+    return await this.skillPresenter.viewSkill(requestedSkillName, {
       filePath: input.file_path,
       conversationId
     })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/presenter/skillPresenter/skillTools.ts` around lines 57 - 70, The
skill lookup in skillTools.ts should use the normalized name consistently: after
trimming input.name into requestedSkillName for the allowlist check, pass
requestedSkillName into skillPresenter.viewSkill instead of the raw input.name.
This keeps the presenter lookup aligned with the policy gate and avoids failures
for names with leading or trailing whitespace.
src/renderer/src/i18n/fr-FR/settings.json-2760-2777 (1)

2760-2777: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Translate the new French locale entries instead of shipping English placeholders.

Most of these new fr-FR strings are still English, so the agent-scope UI will render mixed-language copy for French users.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/fr-FR/settings.json` around lines 2760 - 2777, The new
agent-scope strings in the fr-FR locale are still in English, so update the
entries in settings.json with proper French translations. Keep the existing keys
like agentScopeTitle, agentScopeDescription, agentScopeInheritedSummary, and
agentScopeNoMcp, and translate each corresponding value consistently with the
rest of the French locale.
src/renderer/src/i18n/it-IT/settings.json-2751-2768 (1)

2751-2768: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Translate the new Italian locale entries instead of leaving them in English.

These additions are still English in it-IT, so the new agent-scope UI will show mixed-language copy for Italian users.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/it-IT/settings.json` around lines 2751 - 2768, The new
agent-scope locale entries in the it-IT settings translation are still in
English, so translate the added keys to Italian rather than keeping the current
DeepChat agent scope strings unchanged. Update the corresponding entries in
settings.json for agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp.
src/renderer/src/i18n/zh-HK/settings.json-2760-2777 (1)

2760-2777: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new agent-scope strings for zh-HK.

These additions are still English, so the new agent-scope view will show mixed-language copy for Hong Kong users.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/zh-HK/settings.json` around lines 2760 - 2777, The new
agent-scope translation keys in the zh-HK locale are still in English, so
localize the added strings in settings.json for Hong Kong Chinese users. Update
the newly added agentScope* entries (such as agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported, and the
summary/action labels) to proper zh-HK wording, keeping the existing key names
unchanged so the agent-scope UI renders consistently.
src/renderer/src/i18n/he-IL/settings.json-2760-2777 (1)

2760-2777: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new agent-scope strings for he-IL.

These keys are still English, so Hebrew users will see mixed-language text throughout the new agent-scope panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/he-IL/settings.json` around lines 2760 - 2777, The new
agent-scope entries in the he-IL translation file are still English, so localize
all related keys under the agent-scope section to Hebrew. Update the strings for
agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp to match the existing translation style
in settings.json.
src/renderer/src/i18n/pl-PL/settings.json-2751-2768 (1)

2751-2768: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new agent-scope strings for pl-PL.

These entries are still in English, so the new agent-scope UI will render as a mixed Polish/English experience for this locale.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/pl-PL/settings.json` around lines 2751 - 2768, The new
agent-scope strings in the pl-PL translation file are still untranslated, so
update the existing keys like agentScopeTitle, agentScopeDescription,
agentScopeNoAgent, agentScopeUnsupported, agentScopeRefresh, and the rest of the
agentScope* entries with proper Polish text. Keep the translations consistent
with the surrounding DeepChat UI terminology and ensure every key in this block
is localized in src/renderer/src/i18n/pl-PL/settings.json.
docs/architecture/agent-scoped-extensions/plan.md-45-45 (1)

45-45: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Hyphenate the compound modifiers in these bullets.

agent-enabled and MCP-scoped read correctly here and avoid the current grammar hiccup in the design doc.

Also applies to: 99-99

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/agent-scoped-extensions/plan.md` at line 45, The bullet
text uses unhyphenated compound modifiers, so update the phrasing in the plan
doc to use hyphenated forms like agent-enabled and MCP-scoped where those
descriptors modify nouns. Locate the affected bullet(s) in the
agent-scoped-extensions plan content and adjust the wording consistently across
the referenced occurrences so the grammar reads cleanly.

Source: Linters/SAST tools

src/renderer/src/i18n/da-DK/settings.json-2760-2777 (1)

2760-2777: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new Danish agent-scope strings.

Lines 2760-2777 are still English in the da-DK locale file, so Danish users will get a mixed-language settings panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/da-DK/settings.json` around lines 2760 - 2777, The new
agent-scope entries in settings.json are still English in the da-DK locale, so
translate the agentScope* strings into Danish to keep the settings panel
consistent. Update the existing keys under the agent scope section—such as
agentScopeTitle, agentScopeDescription, agentScopeInheritedSummary, and the
no-items labels—with proper Danish text, preserving the same placeholders like
{count}.
src/renderer/src/i18n/fa-IR/settings.json-2760-2777 (1)

2760-2777: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new fa-IR agent-scope strings.

These new user-facing values are still English in the Persian locale.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/fa-IR/settings.json` around lines 2760 - 2777, The new
agentScope* entries in the fa-IR locale are still in English and need Persian
translations. Update the string values in settings.json for the agent scope UI
labels and summaries (including agentScopeTitle, agentScopeDescription,
agentScopeNoAgent, agentScopeUnsupported, agentScopeRefresh, agentScopePlugins,
agentScopeSkills, agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp) so they match the existing localization
style used elsewhere in this file.
src/renderer/src/i18n/zh-TW/settings.json-2760-2777 (1)

2760-2777: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new zh-TW agent-scope strings.

These new user-facing values are still English in the Traditional Chinese locale.

Suggested localization pass
-    "agentScopeTitle": "Current agent scope",
-    "agentScopeDescription": "Choose which globally installed plugins, skills, and MCP servers the current DeepChat agent can use. Plugin-owned MCP servers follow plugin selection.",
-    "agentScopeNoAgent": "No DeepChat agent is selected.",
-    "agentScopeUnsupported": "Agent-scoped extensions are only available for DeepChat agents.",
-    "agentScopeRefresh": "Refresh",
-    "agentScopePlugins": "Plugins",
-    "agentScopeSkills": "Skills",
-    "agentScopeMcp": "MCP servers",
-    "agentScopeInherited": "Inherited",
-    "agentScopeCustom": "Custom",
-    "agentScopeInheritedSummary": "Use the default availability ({count} available).",
-    "agentScopeDenyAllSummary": "None selected; this category is disabled for this agent.",
-    "agentScopeSelectedSummary": "{count} selected",
-    "agentScopeSelectAll": "Select all",
-    "agentScopeClearAll": "Clear",
-    "agentScopeNoPlugins": "No enabled plugins available.",
-    "agentScopeNoSkills": "No skills available.",
-    "agentScopeNoMcp": "No global MCP servers available."
+    "agentScopeTitle": "目前代理範圍",
+    "agentScopeDescription": "選擇目前 DeepChat 代理可以使用的全域已安裝插件、技能和 MCP 伺服器。插件擁有的 MCP 伺服器會跟隨插件選擇。",
+    "agentScopeNoAgent": "未選取 DeepChat 代理。",
+    "agentScopeUnsupported": "代理範圍擴充功能僅適用於 DeepChat 代理。",
+    "agentScopeRefresh": "重新整理",
+    "agentScopePlugins": "插件",
+    "agentScopeSkills": "技能",
+    "agentScopeMcp": "MCP 伺服器",
+    "agentScopeInherited": "繼承",
+    "agentScopeCustom": "自訂",
+    "agentScopeInheritedSummary": "使用預設可用項目({count} 個可用)。",
+    "agentScopeDenyAllSummary": "未選取;此類別已對此代理停用。",
+    "agentScopeSelectedSummary": "已選取 {count} 個",
+    "agentScopeSelectAll": "全選",
+    "agentScopeClearAll": "清除",
+    "agentScopeNoPlugins": "沒有可用的已啟用插件。",
+    "agentScopeNoSkills": "沒有可用技能。",
+    "agentScopeNoMcp": "沒有可用的全域 MCP 伺服器。"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/zh-TW/settings.json` around lines 2760 - 2777, The new
agent-scope entries in zh-TW are still in English; update the localized strings
in settings.json to Traditional Chinese for all keys added in the agent-scope
block, including agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp. Keep the wording consistent with
existing zh-TW UI tone and preserve placeholders like {count}.
src/renderer/src/i18n/es-ES/settings.json-2751-2768 (1)

2751-2768: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new agent-scope strings in this locale.

These new entries are still English, so Spanish users will see untranslated copy throughout the agent-scope UI.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/es-ES/settings.json` around lines 2751 - 2768, The new
agent-scope localization entries in settings.json are still in English and need
Spanish translations. Update the agentScope* keys added in this block, keeping
the same meaning and placeholders like {count}, so the agent-scope UI shows
localized copy for Spanish users.
src/renderer/src/i18n/de-DE/settings.json-2751-2768 (1)

2751-2768: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new agent-scope strings in this locale.

These strings are still English, so the German locale will render the new agent-scope controls untranslated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/de-DE/settings.json` around lines 2751 - 2768, The new
agent-scope entries in the German locale are still untranslated, so update the
strings in settings.json for the agentScope* keys to proper German text. Keep
the existing key names and translate the labels, summaries, and empty states
consistently with the rest of the locale, matching the tone used by nearby
DeepChat settings strings.
src/renderer/src/i18n/ko-KR/settings.json-2760-2777 (1)

2760-2777: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new agent-scope strings in this locale.

Most of these new keys are still English, so the Korean UI will ship mixed-language copy in the new panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/ko-KR/settings.json` around lines 2760 - 2777,
Translate the new agentScope* strings in ko-KR settings.json from English to
Korean so the agent-scope panel is fully localized. Update the newly added
entries under the agent scope section, including agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and
agentScopeNoMcp, while keeping placeholders like {count} intact.
src/renderer/src/i18n/id-ID/settings.json-2751-2768 (1)

2751-2768: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new agent-scope strings in this locale.

These new keys are still English, so the Indonesian locale will ship untranslated text for the agent-scope panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/id-ID/settings.json` around lines 2751 - 2768,
Translate the new agent-scope localization entries in settings.json for the
id-ID locale instead of leaving the English strings in place. Update the agent
scope keys such as agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp to proper Indonesian equivalents while
preserving placeholders like {count}.
src/renderer/src/i18n/ms-MY/settings.json-2751-2768 (1)

2751-2768: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localize the new agentScope* entries in this locale bundle.

These additions are still English, so ms-MY users will see a mixed-language agent policy panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/ms-MY/settings.json` around lines 2751 - 2768, The new
agentScope* strings in the ms-MY locale bundle are still in English, so
translate each added entry into Malay to match this locale. Update the agent
scope labels, summaries, empty states, and actions in the settings.json
localization block so they are consistent with the rest of the ms-MY
translations.
src/renderer/src/i18n/ru-RU/settings.json-2760-2777 (1)

2760-2777: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localize the new agentScope* entries in this locale bundle.

These additions are still English, so ru-RU users will see a mixed-language agent policy panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/ru-RU/settings.json` around lines 2760 - 2777, The new
agentScope* strings in the ru-RU locale bundle are still in English, so replace
each added entry with proper Russian translations to keep the agent policy panel
fully localized. Update the corresponding keys in settings.json for the agent
scope UI text, including the title, description, status messages, summaries, and
empty-state labels, while preserving the same keys and placeholders such as
{count}.
src/renderer/src/i18n/pt-BR/settings.json-2760-2777 (1)

2760-2777: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localize the new agentScope* entries in this locale bundle.

These additions are still English, so pt-BR users will see a mixed-language agent policy panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/pt-BR/settings.json` around lines 2760 - 2777, The new
agentScope* strings in the pt-BR locale bundle are still in English, so they
need proper Brazilian Portuguese translations. Update the added entries under
the agent scope section in settings.json, keeping the existing keys like
agentScopeTitle, agentScopeDescription, agentScopeInheritedSummary, and
agentScopeNoMcp intact while translating only their values to match the rest of
the pt-BR localization.
src/renderer/src/i18n/vi-VN/settings.json-2751-2768 (1)

2751-2768: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localize the new agentScope* entries in this locale bundle.

These additions are still English, so vi-VN users will see a mixed-language agent policy panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/vi-VN/settings.json` around lines 2751 - 2768, The new
agentScope* strings in the vi-VN locale bundle are still in English, so
translate each of these entries into Vietnamese to match the rest of the locale.
Update the values for the agent scope UI copy in settings.json, keeping the same
keys such as agentScopeTitle, agentScopeDescription, agentScopeInheritedSummary,
and agentScopeNoMcp, and preserve any placeholders like {count}.
src/renderer/src/i18n/ja-JP/settings.json-2760-2777 (1)

2760-2777: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localize the new agentScope* entries in this locale bundle.

These additions are still English, so ja-JP users will see a mixed-language agent policy panel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/renderer/src/i18n/ja-JP/settings.json` around lines 2760 - 2777, The new
agentScope* strings in the ja-JP locale bundle are still in English, so
translate each added key to natural Japanese in the same settings.json section.
Update the values for agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp to match the existing Japanese tone and
terminology used elsewhere in this file.
🧹 Nitpick comments (2)
test/renderer/components/PluginPageWrappers.test.ts (1)

1-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Mirror this suite under the page test path.

This file tests src/renderer/src/pages/plugins/*, but it lives under test/renderer/components/. Please move it under a matching test/renderer/pages/plugins/ path so renderer tests stay aligned with the source tree.

As per coding guidelines, test/**/*.{test,spec}.ts: Vitest test suites should mirror source structure under test/main/** and test/renderer/** with setup files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/renderer/components/PluginPageWrappers.test.ts` around lines 1 - 17,
Move this Vitest suite to the matching renderer page test location so it mirrors
the source tree under test/renderer/pages/plugins/. Update the test placement
for the plugins page wrapper checks while keeping the same assertions against
SkillsPluginsPage.vue and McpPluginsPage.vue; the identifying symbols to
preserve are describe('plugins page wrappers'), skillsSource, and mcpSource.

Source: Coding guidelines

test/renderer/components/AgentExtensionPolicyPanel.test.ts (1)

1-191: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move this suite under the mirrored test/renderer path for the page it covers.

AgentExtensionPolicyPanel.vue lives under src/renderer/src/pages/plugins/, but this suite is under test/renderer/components/. Please keep the test tree aligned with the source tree so page-level coverage stays discoverable. As per coding guidelines, "Vitest test suites should mirror source structure under test/main/** and test/renderer/** with setup files".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/renderer/components/AgentExtensionPolicyPanel.test.ts` around lines 1 -
191, The test suite path is not mirrored to the page component it covers, so
move this AgentExtensionPolicyPanel suite from the components area to the
matching test/renderer/pages/plugins location to keep the test tree aligned with
src/renderer/src/pages/plugins. Update only the suite placement/organization;
keep the existing AgentExtensionPolicyPanel mountPanel helper and assertions
intact so page-level coverage remains discoverable under the mirrored structure.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/presenter/mcpPresenter/index.ts`:
- Around line 125-130: `isAllowedServerConfig` is not applying the
plugin-ownership gate for servers whose `source` is `'plugin'`, so they can fall
through to `enabledServerIds` or be allowed broadly. Update the logic in
`isAllowedServerConfig` to mirror `isPluginOwnedServerConfig` by treating
`source === 'plugin'` as plugin-owned and checking `context.enabledPluginIds`
for those configs, while keeping the existing `ownerPluginId` handling intact.
Ensure plugin-owned servers never use the server-id fallback path.

In `@src/main/presenter/mcpPresenter/toolManager.ts`:
- Around line 309-313: Update the MCP server gating logic in the helper that
checks server eligibility in toolManager.ts so plugin-sourced servers are always
validated against the owning plugin policy, not the server allowlist. In the
method that currently derives ownerPluginId and falls back to enabledServerIds,
also recognize serverConfig.source === 'plugin' with sourceId (or equivalent
plugin identifier) and require it to be present in context.enabledPluginIds
before allowing the server. Keep the existing server-name fallback only for
non-plugin sources.

In `@src/main/presenter/toolPresenter/agentTools/agentToolManager.ts`:
- Around line 2131-2134: `executeDeferredToolCall` is normalizing an omitted
`activeSkillNames` override into an empty array, which changes the meaning for
`skill_list` and `skill_view`. Update the `effectiveActiveSkills` handling in
`agentToolManager.ts` so that `undefined` stays `undefined` when no override is
provided, and only normalize when an actual value is passed. Keep the call sites
to `SkillTools.handleSkillList` and `SkillTools.handleSkillView` aligned with
this behavior so existing callers continue to omit the override safely.

In `@src/renderer/settings/components/McpSettings.vue`:
- Around line 399-433: `loadAgentPolicy()` in `McpSettings.vue` needs to be made
stale-safe because `watch(targetAgentId)` can trigger overlapping async loads
that overwrite `targetAgent` and `targetAgentConfig` with an outdated response.
Add a request/token guard inside `loadAgentPolicy` (or equivalent
cancellation/latest-only check) so only the most recent `targetAgentId` result
is applied, and keep `agentPolicyLoading` correct for stale requests. Also avoid
calling `resolveDeepChatAgentConfig()` in `Promise.all` until `listAgents()`
confirms the selected `targetAgentId` is actually a DeepChat agent; use the
returned agent from `configClient.listAgents` to gate the config lookup before
updating state.

In `@src/renderer/settings/components/skills/SkillsSettings.vue`:
- Around line 378-423: Guard the asynchronous fetch in loadAgentPolicy() against
out-of-order completion, since the targetAgentId and agentScopedSkills watchers
can trigger overlapping requests. Add a request/token check inside
loadAgentPolicy() so only the latest invocation is allowed to update targetAgent
and targetAgentConfig, and ignore stale results or errors from earlier calls.
Use the existing loadAgentPolicy, targetAgentId, targetAgent, and
targetAgentConfig symbols to keep the fix localized.
- Around line 250-262: The computed targetAgentId in SkillsSettings.vue should
not fall back to the literal deepchat agent when neither
sessionStore.activeSession.agentId nor agentStore.selectedAgentId is present.
Update the agent-scoped loading logic around targetAgentId and loadAgentPolicy
so that an empty/no-agent state is preserved: when there is no active or
selected agent, clear targetAgent and targetAgentConfig and return early instead
of fetching or writing policies for deepchat. Ensure any agent-scoped toggles
respect this null/absent state rather than silently retargeting to the default
agent.

In `@src/renderer/src/pages/plugins/AgentExtensionPolicyPanel.vue`:
- Around line 230-233: The global MCP filtering in AgentExtensionPolicyPanel.vue
is only excluding servers by ownerPluginId, so plugin-owned entries with source
equal to plugin and a sourceId can still leak into the standalone list. Update
the filter used for the MCP server list to also exclude any config whose source
indicates it comes from a plugin, alongside the existing enabled/disable checks
in the server.config predicate.

---

Minor comments:
In `@docs/architecture/agent-scoped-extensions/plan.md`:
- Line 45: The bullet text uses unhyphenated compound modifiers, so update the
phrasing in the plan doc to use hyphenated forms like agent-enabled and
MCP-scoped where those descriptors modify nouns. Locate the affected bullet(s)
in the agent-scoped-extensions plan content and adjust the wording consistently
across the referenced occurrences so the grammar reads cleanly.

In `@src/main/presenter/skillPresenter/skillTools.ts`:
- Around line 57-70: The skill lookup in skillTools.ts should use the normalized
name consistently: after trimming input.name into requestedSkillName for the
allowlist check, pass requestedSkillName into skillPresenter.viewSkill instead
of the raw input.name. This keeps the presenter lookup aligned with the policy
gate and avoids failures for names with leading or trailing whitespace.

In `@src/renderer/src/i18n/da-DK/settings.json`:
- Around line 2760-2777: The new agent-scope entries in settings.json are still
English in the da-DK locale, so translate the agentScope* strings into Danish to
keep the settings panel consistent. Update the existing keys under the agent
scope section—such as agentScopeTitle, agentScopeDescription,
agentScopeInheritedSummary, and the no-items labels—with proper Danish text,
preserving the same placeholders like {count}.

In `@src/renderer/src/i18n/de-DE/settings.json`:
- Around line 2751-2768: The new agent-scope entries in the German locale are
still untranslated, so update the strings in settings.json for the agentScope*
keys to proper German text. Keep the existing key names and translate the
labels, summaries, and empty states consistently with the rest of the locale,
matching the tone used by nearby DeepChat settings strings.

In `@src/renderer/src/i18n/es-ES/settings.json`:
- Around line 2751-2768: The new agent-scope localization entries in
settings.json are still in English and need Spanish translations. Update the
agentScope* keys added in this block, keeping the same meaning and placeholders
like {count}, so the agent-scope UI shows localized copy for Spanish users.

In `@src/renderer/src/i18n/fa-IR/settings.json`:
- Around line 2760-2777: The new agentScope* entries in the fa-IR locale are
still in English and need Persian translations. Update the string values in
settings.json for the agent scope UI labels and summaries (including
agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp) so they match the existing localization
style used elsewhere in this file.

In `@src/renderer/src/i18n/fr-FR/settings.json`:
- Around line 2760-2777: The new agent-scope strings in the fr-FR locale are
still in English, so update the entries in settings.json with proper French
translations. Keep the existing keys like agentScopeTitle,
agentScopeDescription, agentScopeInheritedSummary, and agentScopeNoMcp, and
translate each corresponding value consistently with the rest of the French
locale.

In `@src/renderer/src/i18n/he-IL/settings.json`:
- Around line 2760-2777: The new agent-scope entries in the he-IL translation
file are still English, so localize all related keys under the agent-scope
section to Hebrew. Update the strings for agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and agentScopeNoMcp
to match the existing translation style in settings.json.

In `@src/renderer/src/i18n/id-ID/settings.json`:
- Around line 2751-2768: Translate the new agent-scope localization entries in
settings.json for the id-ID locale instead of leaving the English strings in
place. Update the agent scope keys such as agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and agentScopeNoMcp
to proper Indonesian equivalents while preserving placeholders like {count}.

In `@src/renderer/src/i18n/it-IT/settings.json`:
- Around line 2751-2768: The new agent-scope locale entries in the it-IT
settings translation are still in English, so translate the added keys to
Italian rather than keeping the current DeepChat agent scope strings unchanged.
Update the corresponding entries in settings.json for agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and
agentScopeNoMcp.

In `@src/renderer/src/i18n/ja-JP/settings.json`:
- Around line 2760-2777: The new agentScope* strings in the ja-JP locale bundle
are still in English, so translate each added key to natural Japanese in the
same settings.json section. Update the values for agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and agentScopeNoMcp
to match the existing Japanese tone and terminology used elsewhere in this file.

In `@src/renderer/src/i18n/ko-KR/settings.json`:
- Around line 2760-2777: Translate the new agentScope* strings in ko-KR
settings.json from English to Korean so the agent-scope panel is fully
localized. Update the newly added entries under the agent scope section,
including agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp, while keeping placeholders like {count}
intact.

In `@src/renderer/src/i18n/ms-MY/settings.json`:
- Around line 2751-2768: The new agentScope* strings in the ms-MY locale bundle
are still in English, so translate each added entry into Malay to match this
locale. Update the agent scope labels, summaries, empty states, and actions in
the settings.json localization block so they are consistent with the rest of the
ms-MY translations.

In `@src/renderer/src/i18n/pl-PL/settings.json`:
- Around line 2751-2768: The new agent-scope strings in the pl-PL translation
file are still untranslated, so update the existing keys like agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, and the rest of the agentScope* entries with proper Polish
text. Keep the translations consistent with the surrounding DeepChat UI
terminology and ensure every key in this block is localized in
src/renderer/src/i18n/pl-PL/settings.json.

In `@src/renderer/src/i18n/pt-BR/settings.json`:
- Around line 2760-2777: The new agentScope* strings in the pt-BR locale bundle
are still in English, so they need proper Brazilian Portuguese translations.
Update the added entries under the agent scope section in settings.json, keeping
the existing keys like agentScopeTitle, agentScopeDescription,
agentScopeInheritedSummary, and agentScopeNoMcp intact while translating only
their values to match the rest of the pt-BR localization.

In `@src/renderer/src/i18n/ru-RU/settings.json`:
- Around line 2760-2777: The new agentScope* strings in the ru-RU locale bundle
are still in English, so replace each added entry with proper Russian
translations to keep the agent policy panel fully localized. Update the
corresponding keys in settings.json for the agent scope UI text, including the
title, description, status messages, summaries, and empty-state labels, while
preserving the same keys and placeholders such as {count}.

In `@src/renderer/src/i18n/tr-TR/settings.json`:
- Around line 2751-2768: The new agentScope* translations in settings.json are
still in English, so localize these strings for tr-TR before shipping. Update
the affected keys under the agent scope section, including agentScopeTitle,
agentScopeDescription, agentScopeRefresh, agentScopePlugins, agentScopeSkills,
agentScopeMcp, agentScopeInherited, agentScopeCustom,
agentScopeInheritedSummary, agentScopeDenyAllSummary, agentScopeSelectedSummary,
agentScopeSelectAll, agentScopeClearAll, agentScopeNoPlugins,
agentScopeNoSkills, and agentScopeNoMcp, so the new panel matches the rest of
the Turkish UI.

In `@src/renderer/src/i18n/vi-VN/settings.json`:
- Around line 2751-2768: The new agentScope* strings in the vi-VN locale bundle
are still in English, so translate each of these entries into Vietnamese to
match the rest of the locale. Update the values for the agent scope UI copy in
settings.json, keeping the same keys such as agentScopeTitle,
agentScopeDescription, agentScopeInheritedSummary, and agentScopeNoMcp, and
preserve any placeholders like {count}.

In `@src/renderer/src/i18n/zh-HK/settings.json`:
- Around line 2760-2777: The new agent-scope translation keys in the zh-HK
locale are still in English, so localize the added strings in settings.json for
Hong Kong Chinese users. Update the newly added agentScope* entries (such as
agentScopeTitle, agentScopeDescription, agentScopeNoAgent,
agentScopeUnsupported, and the summary/action labels) to proper zh-HK wording,
keeping the existing key names unchanged so the agent-scope UI renders
consistently.

In `@src/renderer/src/i18n/zh-TW/settings.json`:
- Around line 2760-2777: The new agent-scope entries in zh-TW are still in
English; update the localized strings in settings.json to Traditional Chinese
for all keys added in the agent-scope block, including agentScopeTitle,
agentScopeDescription, agentScopeNoAgent, agentScopeUnsupported,
agentScopeRefresh, agentScopePlugins, agentScopeSkills, agentScopeMcp,
agentScopeInherited, agentScopeCustom, agentScopeInheritedSummary,
agentScopeDenyAllSummary, agentScopeSelectedSummary, agentScopeSelectAll,
agentScopeClearAll, agentScopeNoPlugins, agentScopeNoSkills, and
agentScopeNoMcp. Keep the wording consistent with existing zh-TW UI tone and
preserve placeholders like {count}.

---

Nitpick comments:
In `@test/renderer/components/AgentExtensionPolicyPanel.test.ts`:
- Around line 1-191: The test suite path is not mirrored to the page component
it covers, so move this AgentExtensionPolicyPanel suite from the components area
to the matching test/renderer/pages/plugins location to keep the test tree
aligned with src/renderer/src/pages/plugins. Update only the suite
placement/organization; keep the existing AgentExtensionPolicyPanel mountPanel
helper and assertions intact so page-level coverage remains discoverable under
the mirrored structure.

In `@test/renderer/components/PluginPageWrappers.test.ts`:
- Around line 1-17: Move this Vitest suite to the matching renderer page test
location so it mirrors the source tree under test/renderer/pages/plugins/.
Update the test placement for the plugins page wrapper checks while keeping the
same assertions against SkillsPluginsPage.vue and McpPluginsPage.vue; the
identifying symbols to preserve are describe('plugins page wrappers'),
skillsSource, and mcpSource.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b7843d1b-20c3-4b6c-9759-d692e1ae93db

📥 Commits

Reviewing files that changed from the base of the PR and between 970129b and 3102e6d.

📒 Files selected for processing (50)
  • docs/architecture/agent-scoped-extensions/plan.md
  • docs/architecture/agent-scoped-extensions/spec.md
  • docs/architecture/agent-scoped-extensions/tasks.md
  • src/main/presenter/agentRepository/index.ts
  • src/main/presenter/agentRuntimePresenter/index.ts
  • src/main/presenter/mcpPresenter/index.ts
  • src/main/presenter/mcpPresenter/toolManager.ts
  • src/main/presenter/skillPresenter/skillTools.ts
  • src/main/presenter/toolPresenter/agentTools/agentToolManager.ts
  • src/main/presenter/toolPresenter/index.ts
  • src/renderer/settings/components/McpSettings.vue
  • src/renderer/settings/components/skills/SkillsSettings.vue
  • src/renderer/src/components/mcp-config/components/McpServers.vue
  • src/renderer/src/i18n/da-DK/settings.json
  • src/renderer/src/i18n/de-DE/settings.json
  • src/renderer/src/i18n/en-US/settings.json
  • src/renderer/src/i18n/es-ES/settings.json
  • src/renderer/src/i18n/fa-IR/settings.json
  • src/renderer/src/i18n/fr-FR/settings.json
  • src/renderer/src/i18n/he-IL/settings.json
  • src/renderer/src/i18n/id-ID/settings.json
  • src/renderer/src/i18n/it-IT/settings.json
  • src/renderer/src/i18n/ja-JP/settings.json
  • src/renderer/src/i18n/ko-KR/settings.json
  • src/renderer/src/i18n/ms-MY/settings.json
  • src/renderer/src/i18n/pl-PL/settings.json
  • src/renderer/src/i18n/pt-BR/settings.json
  • src/renderer/src/i18n/ru-RU/settings.json
  • src/renderer/src/i18n/tr-TR/settings.json
  • src/renderer/src/i18n/vi-VN/settings.json
  • src/renderer/src/i18n/zh-CN/settings.json
  • src/renderer/src/i18n/zh-HK/settings.json
  • src/renderer/src/i18n/zh-TW/settings.json
  • src/renderer/src/pages/plugins/AgentExtensionPolicyPanel.vue
  • src/renderer/src/pages/plugins/McpPluginsPage.vue
  • src/renderer/src/pages/plugins/PluginsCatalogPage.vue
  • src/renderer/src/pages/plugins/SkillsPluginsPage.vue
  • src/shared/contracts/domainSchemas.ts
  • src/shared/types/agent-interface.d.ts
  • src/shared/types/presenters/core.presenter.d.ts
  • src/shared/types/presenters/tool.presenter.d.ts
  • test/main/presenter/agentRepository.test.ts
  • test/main/presenter/mcpPresenter/toolManager.test.ts
  • test/main/presenter/skillPresenter/skillTools.test.ts
  • test/main/presenter/toolPresenter/toolPresenter.test.ts
  • test/renderer/components/AgentExtensionPolicyPanel.test.ts
  • test/renderer/components/McpServers.test.ts
  • test/renderer/components/McpSettings.test.ts
  • test/renderer/components/PluginPageWrappers.test.ts
  • test/renderer/components/SkillsSettingsAgentScope.test.ts

Comment thread src/main/presenter/mcpPresenter/index.ts Outdated
Comment thread src/main/presenter/mcpPresenter/toolManager.ts Outdated
Comment thread src/main/presenter/toolPresenter/agentTools/agentToolManager.ts
Comment thread src/renderer/settings/components/McpSettings.vue
Comment thread src/renderer/settings/components/skills/SkillsSettings.vue
Comment thread src/renderer/settings/components/skills/SkillsSettings.vue
Comment thread src/renderer/src/pages/plugins/AgentExtensionPolicyPanel.vue

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/renderer/components/SkillsSettingsAgentScope.test.ts (1)

94-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move this suite under the mirrored renderer test path.

This test targets src/renderer/settings/components/skills/SkillsSettings.vue, so it should live under the matching test/renderer/settings/components/skills/** path instead of test/renderer/components/**. As per coding guidelines, test/**/*.{test,spec}.ts: Vitest test suites should mirror source structure under test/main/** and test/renderer/** with setup files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/renderer/components/SkillsSettingsAgentScope.test.ts` around lines 94 -
97, Move the `SkillsSettingsAgentScope.test.ts` suite to the mirrored renderer
test location so it matches
`src/renderer/settings/components/skills/SkillsSettings.vue`. Update the test
path under `test/renderer/settings/components/skills/**` and keep the existing
`mountAgentScopeSkillsSettings` helper and related assertions intact, since the
issue is the suite’s placement rather than its behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/renderer/components/SkillsSettingsAgentScope.test.ts`:
- Around line 94-97: Move the `SkillsSettingsAgentScope.test.ts` suite to the
mirrored renderer test location so it matches
`src/renderer/settings/components/skills/SkillsSettings.vue`. Update the test
path under `test/renderer/settings/components/skills/**` and keep the existing
`mountAgentScopeSkillsSettings` helper and related assertions intact, since the
issue is the suite’s placement rather than its behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f86f2d7f-8c56-419c-a9c2-b7c5c925990d

📥 Commits

Reviewing files that changed from the base of the PR and between 3102e6d and df371d6.

📒 Files selected for processing (14)
  • docs/architecture/agent-scoped-extensions/tasks.md
  • src/main/presenter/mcpPresenter/index.ts
  • src/main/presenter/mcpPresenter/toolManager.ts
  • src/main/presenter/skillPresenter/skillTools.ts
  • src/main/presenter/toolPresenter/agentTools/agentToolManager.ts
  • src/renderer/settings/components/McpSettings.vue
  • src/renderer/settings/components/skills/SkillsSettings.vue
  • src/renderer/src/pages/plugins/AgentExtensionPolicyPanel.vue
  • test/main/presenter/mcpPresenter.test.ts
  • test/main/presenter/mcpPresenter/toolManager.test.ts
  • test/main/presenter/skillPresenter/skillTools.test.ts
  • test/main/presenter/toolPresenter/agentTools/agentToolManagerSettings.test.ts
  • test/renderer/components/AgentExtensionPolicyPanel.test.ts
  • test/renderer/components/SkillsSettingsAgentScope.test.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/architecture/agent-scoped-extensions/tasks.md
🚧 Files skipped from review as they are similar to previous changes (10)
  • test/main/presenter/skillPresenter/skillTools.test.ts
  • test/main/presenter/mcpPresenter/toolManager.test.ts
  • test/renderer/components/AgentExtensionPolicyPanel.test.ts
  • src/main/presenter/skillPresenter/skillTools.ts
  • src/main/presenter/toolPresenter/agentTools/agentToolManager.ts
  • src/renderer/settings/components/McpSettings.vue
  • src/main/presenter/mcpPresenter/index.ts
  • src/renderer/src/pages/plugins/AgentExtensionPolicyPanel.vue
  • src/renderer/settings/components/skills/SkillsSettings.vue
  • src/main/presenter/mcpPresenter/toolManager.ts

@zerob13 zerob13 merged commit 7510050 into dev Jun 30, 2026
3 checks passed
@zhangmo8 zhangmo8 deleted the feat/agent-scoped-extensions branch June 30, 2026 12:36
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.

2 participants