Skip to content

fix(issue #1275): [Feature]: 未发布插件导入支持 - #206

Open
openjiuwen-sync-bot[bot] wants to merge 1 commit into
openJiuwen-ai:studio-2.0-devfrom
openjiuwenai:sync/pr-1781
Open

fix(issue #1275): [Feature]: 未发布插件导入支持#206
openjiuwen-sync-bot[bot] wants to merge 1 commit into
openJiuwen-ai:studio-2.0-devfrom
openjiuwenai:sync/pr-1781

Conversation

@openjiuwen-sync-bot

@openjiuwen-sync-bot openjiuwen-sync-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

Paired: GitHub #206GitCode !1781

Fixes #​1275

机器人基于 issue 分析自动修复。

根因

根因分析:

Issue 作者报告的是前端 add-plugins.component.tscanAdd 逻辑硬编码问题。后端配置项 plugin-publish 设为 true 后,工作流(workflow)场景下未发布插件导入正常工作,但 agent 场景下不生效。

代码证据:

代码检索确认 AddPluginsComponentfrontend/src/routes/agent-center/app-agent/components/add-plugins/add-plugins.component.ts)是 agent 侧插件添加的核心组件,被 config-tools.component.ts 调用。作者指出的第 574 行硬编码 canAdd = !isPersonal || plugin.last_version_id 逻辑确实存在——该条件仅检查是否为个人插件或是否有已发布版本(last_version_id),未读取后端 plugin_publish_choice 配置项,导致即使后端开启了未发布插件


由 issues-robot auto-fix 生成,复核后可合并。

Linked Closing Issues:

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@openjiuwen-collaboration-bot

openjiuwen-collaboration-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

head_sha: 2be393425f242e27083efc04c7f51ebce6898367

变更摘要

本次变更修复了 Agent 场景下未发布插件无法导入的问题(#​1275)。根因是 AddPluginsComponentcanAdd 的判断逻辑仅检查了是否为个人插件(isPersonal)或插件是否存在已发布版本(last_version_id),而未读取后端配置项 plugin_publish_choice,导致即使后端已开启未发布插件支持,Agent 侧依然无法添加未发布插件。修复方式是在 canAdd 条件中追加对 configServ.getConfigs()?.plugin_publish_choice 的读取,使前端逻辑与后端配置保持一致。

主要改动

  • 扩展 canAdd 判断条件:在 add-plugins.component.ts 第 574 行,为 canAdd 变量新增 this.configServ.getConfigs()?.plugin_publish_choice 条件分支,使得当后端配置项 plugin_publish_choice 为真时,即使插件无 last_version_id,也允许添加。
  • 修复 Agent 与 Workflow 场景行为不一致:此前 Workflow 场景下未发布插件导入已正常工作,而 Agent 场景因硬编码逻辑未同步该配置项导致失效;本次修改使两个场景行为对齐。

@openjiuwen-collaboration-bot

openjiuwen-collaboration-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

head_sha: 2be393425f242e27083efc04c7f51ebce6898367

代码审查

✅ 未发现问题

@openjiuwen-collaboration-bot

Copy link
Copy Markdown

head_sha: 2be393425f242e27083efc04c7f51ebce6898367

TASK STATUS DETAILS
CodeCheck ✅SUCCESS Click here
AntiPoison ✅SUCCESS Click here
Software Composition Analysis ✅SUCCESS Click here
Npm Build ✅SUCCESS See CHECK tab
Ruff Check ✅SUCCESS See CHECK tab
UT测试 ✅SUCCESS 点此跳转

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants