Skip to content

fix(skills): clone agent import source - #2037

Merged
zhangmo8 merged 1 commit into
devfrom
fix/agent-skill-import-ipc
Jul 27, 2026
Merged

fix(skills): clone agent import source#2037
zhangmo8 merged 1 commit into
devfrom
fix/agent-skill-import-ipc

Conversation

@zhangmo8

@zhangmo8 zhangmo8 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Convert the reactive Agent import source to a plain IPC DTO before previewing or executing an import, preventing Electron structured-clone failures.
  • Add regression assertions that both Agent-import calls receive non-reactive source objects.
  • Add a localized common.retry message to every supported locale.

UI layout

Before:

[Skills import preview error]
An object could not be cloned.
[ common.retry ]

After:

[Skills import preview]
Available Skills
[ Retry / 重试 ]

Validation

  • pnpm run format
  • pnpm run i18n
  • pnpm vitest run test/renderer/components/ImportSkillsFromAgentDialog.test.ts
  • pnpm run lint
  • pnpm run typecheck:web

Summary by CodeRabbit

  • Bug Fixes

    • Improved skill imports by consistently normalizing internal and external sources before previewing or executing imports.
    • Prevented reactive UI objects from being passed directly into import operations.
  • New Features

    • Added a localized “Retry” action across supported languages, enabling clearer recovery from failed actions.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f9f617c0-245f-4f5b-ab86-7a2a15d5a02e

📥 Commits

Reviewing files that changed from the base of the PR and between 4334d6a and d141cbc.

📒 Files selected for processing (23)
  • src/renderer/settings/components/skills/ImportSkillsFromAgentDialog.vue
  • src/renderer/src/i18n/da-DK/common.json
  • src/renderer/src/i18n/de-DE/common.json
  • src/renderer/src/i18n/en-US/common.json
  • src/renderer/src/i18n/es-ES/common.json
  • src/renderer/src/i18n/fa-IR/common.json
  • src/renderer/src/i18n/fr-FR/common.json
  • src/renderer/src/i18n/he-IL/common.json
  • src/renderer/src/i18n/id-ID/common.json
  • src/renderer/src/i18n/it-IT/common.json
  • src/renderer/src/i18n/ja-JP/common.json
  • src/renderer/src/i18n/ko-KR/common.json
  • src/renderer/src/i18n/ms-MY/common.json
  • src/renderer/src/i18n/pl-PL/common.json
  • src/renderer/src/i18n/pt-BR/common.json
  • src/renderer/src/i18n/ru-RU/common.json
  • src/renderer/src/i18n/tr-TR/common.json
  • src/renderer/src/i18n/vi-VN/common.json
  • src/renderer/src/i18n/zh-CN/common.json
  • src/renderer/src/i18n/zh-HK/common.json
  • src/renderer/src/i18n/zh-TW/common.json
  • src/types/i18n.d.ts
  • test/renderer/components/ImportSkillsFromAgentDialog.test.ts

📝 Walkthrough

Walkthrough

Changes

Agent import normalization

Layer / File(s) Summary
Normalize agent import requests
src/renderer/settings/components/skills/ImportSkillsFromAgentDialog.vue, test/renderer/components/ImportSkillsFromAgentDialog.test.ts
Agent sources are converted to explicit internal or external objects before preview and execution; tests verify the API receives non-proxy sources.

Retry localization

Layer / File(s) Summary
Add retry locale messages
src/types/i18n.d.ts, src/renderer/src/i18n/*/common.json
The locale message type and supported translations add the retry string.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • ThinkInAIXYZ/deepchat#2007: Introduced the agent-skill import source type and agent-scoped import routes used by this normalization.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: cloning the agent import source to avoid reactive structured-clone issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 fix/agent-skill-import-ipc

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.

@zhangmo8
zhangmo8 merged commit 906243b into dev Jul 27, 2026
12 checks passed
@zhangmo8
zhangmo8 deleted the fix/agent-skill-import-ipc branch July 27, 2026 06:56
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.

1 participant