Skip to content

[ISSUE #15142] feat(ai): support drag-and-drop zip upload and batch skill upload - #15154

Merged
KomachiSion merged 8 commits into
alibaba:developfrom
saynoword:feat/suport-drag-and-batch-upload
May 15, 2026
Merged

KomachiSion merged 8 commits into
alibaba:developfrom
saynoword:feat/suport-drag-and-batch-upload

Conversation

@saynoword

Copy link
Copy Markdown
Contributor

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

Add drag-and-drop zip upload support to the Skill Management page and introduce a batch upload endpoint that accepts multi-skill zip archives, enabling users to upload multiple skills at once with clear per-skill feedback.

Brief changelog

  • Add BatchUploadResult model in api module for cross-module accessibility
  • Add parseMultipleSkillsFromZip to SkillZipParser returning MultiSkillParseResult that carries both parsed skills and parse failures
  • Invalid skill folders (malformed YAML, missing description, etc.) no longer block the entire batch — they are recorded as failures and other skills continue uploading
  • Detect sibling folders missing SKILL.md and report them as warnings in the batch result (showing only the folder name for clarity)
  • Silently ignore well-known non-skill directories (.git, __MACOSX, node_modules, etc.)
  • Extract doUploadSingleSkill private method to eliminate duplicate logic between uploadSkillFromZip and batchUploadSkillsFromZip
  • Add /v3/console/ai/skills/upload/batch endpoint wired through console handler chain and maintainer-client
  • Add HTML5 drag-and-drop with dropEffect='copy' and visual overlay to both console-ui and console-ui-next
  • Add batchUpload API method in console-ui-next calling the batch endpoint
  • Show per-skill colored results in toast (green checkmarks for success, red crosses with failure reasons)
  • Add i18n strings for drag hints and batch upload results (en-US / zh-CN)
  • Add unit tests for multi-skill zip parsing including invalid folder handling and nested structure detection

Commits

  • ea4fc91c0 feat(console): support drag-and-drop zip upload in skill management
  • ea791f1ba feat(ai): support batch upload skills from multi-skill zip archive
  • 53751fcf8 refactor(console): simplify batch upload toast to show per-skill results
  • e418e636c fix(ai): align resolveUploadVersion call with updated method signature
  • 881cea0ce feat(console): update frontend static assets for skill management UI
  • 5f40e10e6 refactor(ai): improve batch upload resilience and deduplicate upload logic

Verifying this change

  • mvn -B clean package apache-rat:check spotbugs:check -DskipTests
  • mvn test -pl ai -Dtest=SkillZipParserTest (23 tests, all pass)
  • mvn test -pl ai (1200 tests, all pass)
  • Manual: drag a multi-skill zip onto the Skill Management page, verify per-skill results display correctly
  • Manual: drag a zip containing an invalid skill folder, verify the failure is reported with folder name

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check spotbugs:check -DskipTests to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

@github-actions

Copy link
Copy Markdown

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API、新增配置参数、修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

saynoword and others added 7 commits May 15, 2026 11:26
Add HTML5 drag-and-drop support to both console-ui (legacy) and
console-ui-next frontends, allowing users to drag .zip files directly
onto the skill management page for upload. Key changes:

- Add page-level drag overlay with visual feedback
- Add drag event handlers with dropEffect='copy' to prevent browser
  default file-open behavior
- Add drag-and-drop to UploadSkillDialog drop zone
- Add batchUpload API method calling /upload/batch endpoint
- Show per-skill colored results (green success / red failure) in toast
- Add i18n strings for drag hints and batch upload results
Add batch upload endpoint that accepts a zip containing multiple skill
subdirectories (each with its own SKILL.md). Returns per-skill results
with succeeded/failed lists.

- Add BatchUploadResult model in api module for cross-module access
- Add /v3/console/ai/skills/upload/batch endpoint
- Add parseMultipleSkillsFromZip to SkillZipParser
- Wire batch upload through console handler chain and maintainer-client
- Add unit tests for multi-skill zip parsing
Show a one-line summary (succeeded/failed counts) as the toast title,
with per-skill details below: green checkmarks for succeeded skills and
red crosses with failure reasons for failed ones.
Add missing third parameter to resolveUploadVersion in batch upload path
to match the method signature change.
Rebuild console static resources with latest skill management changes
including UI refinements and removal of unused BizTagEditDialog.
…logic

- Extract doUploadSingleSkill to eliminate duplicate logic between
  uploadSkillFromZip and batchUploadSkillsFromZip
- Make parseMultipleSkillsFromZip return MultiSkillParseResult carrying
  both parsed skills and parse failures, so invalid folders don't block
  the entire batch and failures are reported to the user
- Detect sibling folders missing SKILL.md and report them as warnings
  in the batch upload result (showing only the folder name)
- Silently ignore well-known non-skill directories (.git, __MACOSX, etc.)
…ources

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@saynoword
saynoword force-pushed the feat/suport-drag-and-batch-upload branch from 5f40e10 to f3a098c Compare May 15, 2026 03:27
@KomachiSion
KomachiSion merged commit 9126979 into alibaba:develop May 15, 2026
5 checks passed
@KomachiSion KomachiSion linked an issue May 15, 2026 that may be closed by this pull request
@KomachiSion KomachiSion added kind/enhancement Category issues or prs related to enhancement. area/Nacos console Related to Nacos consle area/Skill labels May 15, 2026
@KomachiSion KomachiSion added this to the 3.2.2 milestone May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/Nacos console Related to Nacos consle area/Skill kind/enhancement Category issues or prs related to enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support drag-and-drop zip upload with multiple skills

3 participants