fix(issue #1275): [Feature]: 未发布插件导入支持 - #206
Open
openjiuwen-sync-bot[bot] wants to merge 1 commit into
Open
Conversation
|
|
|
head_sha: 变更摘要本次变更修复了 Agent 场景下未发布插件无法导入的问题(#1275)。根因是 主要改动
|
|
head_sha: 代码审查✅ 未发现问题 |
|
head_sha:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Paired: GitHub #206 ↔ GitCode !1781
Fixes #1275
机器人基于 issue 分析自动修复。
根因
根因分析:
Issue 作者报告的是前端
add-plugins.component.ts中canAdd逻辑硬编码问题。后端配置项plugin-publish设为true后,工作流(workflow)场景下未发布插件导入正常工作,但 agent 场景下不生效。代码证据:
代码检索确认
AddPluginsComponent(frontend/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: