feat: 回复工具执行时注入更多上下文字段,修复 cron 格式,增强 Skill 导入冲突策略 - #62
Merged
Conversation
AQing-527
force-pushed
the
feature/add_more_context_during_execution
branch
from
June 2, 2026 07:12
5090ca2 to
bf4af52
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the assistant agent’s extensibility and UX around skill import by (1) fixing/expanding CodeactTool auto-discovery, (2) adding skill package import conflict-handling with optional replace/keep-both strategies (plus UI prompting), and (3) enhancing reply-tool context propagation and adding tests. It also updates cron expression documentation and bumps module versions to 0.2.7.
Changes:
- Add
SkillImportConflictStrategyand extend skill package import APIs to support conflict reporting and optional resolution (REPLACE / KEEP_BOTH), including management-console UI prompting and new tests. - Enhance reply tools to propagate channel metadata (
channel_type,channel_id) into execution context extensions and add a unit test; fixFastIntentReactHookincorrectly mappinguser_idtotenantId. - Fix CodeactTool Spring auto-discovery merge behavior; update cron docs/examples; bump Maven versions to
0.2.7.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Bump parent version to 0.2.7 |
| assistant-agent-start/src/main/java/com/alibaba/assistant/agent/start/config/CodeactAgentConfig.java | Merge Spring-autodiscovered CodeactTool beans into agent tool list |
| assistant-agent-start/pom.xml | Version bump to 0.2.7 |
| assistant-agent-prompt-builder/pom.xml | Version bump to 0.2.7 |
| assistant-agent-management/src/test/java/com/alibaba/assistant/agent/management/internal/InMemorySkillExchangeServiceTest.java | Add tests for import conflict behaviors |
| assistant-agent-management/src/main/resources/static/exp-console/app.js | Add conflict prompt UX and import query param for strategy |
| assistant-agent-management/src/main/java/com/alibaba/assistant/agent/management/spi/SkillExchangeService.java | Add overload supporting conflict strategy |
| assistant-agent-management/src/main/java/com/alibaba/assistant/agent/management/model/SkillPackageImportResult.java | Add conflict info to import result |
| assistant-agent-management/src/main/java/com/alibaba/assistant/agent/management/model/SkillImportConflictStrategy.java | New enum for conflict strategy |
| assistant-agent-management/src/main/java/com/alibaba/assistant/agent/management/internal/InMemorySkillExchangeService.java | Implement conflict detection + strategy handling + name-based lookup |
| assistant-agent-management/src/main/java/com/alibaba/assistant/agent/management/controller/SkillExchangeController.java | Accept conflictStrategy param; return 200 on conflict/no-save |
| assistant-agent-management/pom.xml | Version bump to 0.2.7 |
| assistant-agent-extensions/src/test/java/com/alibaba/assistant/agent/extension/reply/tools/BaseReplyCodeactToolTest.java | New unit test for metadata copying |
| assistant-agent-extensions/src/main/java/com/alibaba/assistant/agent/extension/trigger/tools/SubscribeTriggerCodeactTool.java | Clarify 6-field cron format in docs/examples |
| assistant-agent-extensions/src/main/java/com/alibaba/assistant/agent/extension/reply/tools/BaseReplyCodeactTool.java | Copy channel metadata into execution context extensions |
| assistant-agent-extensions/src/main/java/com/alibaba/assistant/agent/extension/experience/hook/FastIntentReactHook.java | Fix user_id mapping to userId |
| assistant-agent-extensions/pom.xml | Version bump to 0.2.7 |
| assistant-agent-evaluation/pom.xml | Version bump to 0.2.7 |
| assistant-agent-core/pom.xml | Version bump to 0.2.7 |
| assistant-agent-common/pom.xml | Version bump to 0.2.7 |
| assistant-agent-autoconfigure/pom.xml | Version bump to 0.2.7 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- fix: SubscribeTriggerCodeactTool cron 示例从5位改为6位,匹配 Spring CronTrigger 格式 (#53) - fix: BaseReplyCodeactTool 新增 channel 等上下文字段注入到 extensions - feat: Skill 导入支持冲突策略(覆盖/跳过/重命名) - feat: Skill 导入返回 SkillPackageImportResult 支持逐文件结果 - feat: SkillExchangeService 支持按 skillGroupId 查询 - feat: 经验控制台前端增加 skillGroupId 编辑和 skill 名称链接 - test: 新增 BaseReplyCodeactToolTest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AQing-527
force-pushed
the
feature/add_more_context_during_execution
branch
from
June 2, 2026 07:45
bf4af52 to
e62f823
Compare
PKPKPIKK
pushed a commit
to PKPKPIKK/AssistantAgent
that referenced
this pull request
Jul 22, 2026
…e/add_more_context_during_execution feat: 回复工具执行时注入更多上下文字段,修复 cron 格式,增强 Skill 导入冲突策略
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.
This pull request introduces several improvements and bug fixes across the codebase. The most significant changes are in the skill package import logic, which now supports conflict resolution strategies, and in the reply tool extensions, which enhance metadata handling and test coverage. Additionally, there are minor updates to cron expression documentation and version bumps for multiple modules.
Skill Package Import Conflict Handling:
SkillImportConflictStrategyto specify how to handle conflicts when importing skills with the same name (options: REPLACE or KEEP_BOTH). If no strategy is provided and a conflict is detected, the import returns conflict info without saving, allowing the frontend to prompt the user. [1] [2] [3] [4] [5]SkillExchangeControllerandInMemorySkillExchangeServiceto support the new conflict strategy parameter and logic, including improved preview behavior and more robust detection of existing skills by name. [1] [2] [3] [4] [5]Reply Tool Extensions and Metadata Handling:
BaseReplyCodeactToolto define constants for metadata keys and to copy additional channel metadata (likechannel_typeandchannel_id) into the execution context extensions, improving support for channel-specific reply tools. [1] [2]BaseReplyCodeactToolTest) to verify that channel metadata is correctly copied into the execution context extensions.FastIntentReactHookwhereuser_idwas incorrectly set astenantId; it now correctly sets theuserIdfield.Documentation and Usability Improvements:
SubscribeTriggerCodeactTool, specifying that a 6-field cron format is expected, and updated code examples accordingly. [1] [2] [3]Dependency Version Updates:
0.2.6to0.2.7in all modulepom.xmlfiles to reflect the new release. [1] [2] [3] [4] [5] [6]