Skip to content

feat: 回复工具执行时注入更多上下文字段,修复 cron 格式,增强 Skill 导入冲突策略 - #62

Merged
AQing-527 merged 1 commit into
mainfrom
feature/add_more_context_during_execution
Jun 2, 2026
Merged

feat: 回复工具执行时注入更多上下文字段,修复 cron 格式,增强 Skill 导入冲突策略#62
AQing-527 merged 1 commit into
mainfrom
feature/add_more_context_during_execution

Conversation

@AQing-527

Copy link
Copy Markdown
Collaborator

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:

  • Added a new enum SkillImportConflictStrategy to 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]
  • Updated SkillExchangeController and InMemorySkillExchangeService to 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:

  • Enhanced BaseReplyCodeactTool to define constants for metadata keys and to copy additional channel metadata (like channel_type and channel_id) into the execution context extensions, improving support for channel-specific reply tools. [1] [2]
  • Added a unit test (BaseReplyCodeactToolTest) to verify that channel metadata is correctly copied into the execution context extensions.
  • Fixed a bug in FastIntentReactHook where user_id was incorrectly set as tenantId; it now correctly sets the userId field.

Documentation and Usability Improvements:

  • Improved documentation for cron expressions in SubscribeTriggerCodeactTool, specifying that a 6-field cron format is expected, and updated code examples accordingly. [1] [2] [3]

Dependency Version Updates:

  • Bumped the parent version from 0.2.6 to 0.2.7 in all module pom.xml files to reflect the new release. [1] [2] [3] [4] [5] [6]

Copilot AI review requested due to automatic review settings June 2, 2026 07:10
@AQing-527
AQing-527 force-pushed the feature/add_more_context_during_execution branch from 5090ca2 to bf4af52 Compare June 2, 2026 07:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 SkillImportConflictStrategy and 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; fix FastIntentReactHook incorrectly mapping user_id to tenantId.
  • 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.

@AQing-527 AQing-527 changed the title fix: CodeactTool 自动发现机制修复及 Skill 导入增强 feat: 回复工具执行时注入更多上下文字段,修复 cron 格式,增强 Skill 导入冲突策略 Jun 2, 2026
- 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
AQing-527 force-pushed the feature/add_more_context_during_execution branch from bf4af52 to e62f823 Compare June 2, 2026 07:45

@canfuu canfuu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@AQing-527
AQing-527 merged commit 5ed9b3a into main Jun 2, 2026
1 check passed
@AQing-527
AQing-527 deleted the feature/add_more_context_during_execution branch June 2, 2026 07:54
PKPKPIKK pushed a commit to PKPKPIKK/AssistantAgent that referenced this pull request Jul 22, 2026
…e/add_more_context_during_execution

feat: 回复工具执行时注入更多上下文字段,修复 cron 格式,增强 Skill 导入冲突策略
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.

3 participants