feat(library): add open-folder action for skills in management page#16190
Draft
Pleasurecruise wants to merge 1 commit into
Draft
feat(library): add open-folder action for skills in management page#16190Pleasurecruise wants to merge 1 commit into
Pleasurecruise wants to merge 1 commit into
Conversation
Add an "Open folder" item to each skill's card menu on the Skills management page that reveals the skill's on-disk folder in Finder / File Explorer, reusing the existing getAppInfo + resolvePath + file.showInFolder IPC. Closes #15955. Signed-off-by: Pleasurecruise <3196812536@qq.com>
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.
What this PR does
Before this PR:
Skills in Cherry Studio live as folders on disk (SKILL.md plus scripts/assets), but the Skills management page offered no way to get from a skill to its folder — users had to hunt for the install location manually to share, back up, or zip a skill.
After this PR:
Each skill's card menu on the Skills management page gains an Open folder action that reveals the skill's on-disk directory in the OS file manager (Finder on macOS, File Explorer on Windows), with the skill's folder selected/highlighted. From there users can copy/zip the real skill directory directly.
Fixes #15955
Why we need it and why it was done in this way
The skill folder lives at
feature.agents.skills({userData}/Data/Skills/<folderName>) in the main-process path registry. Rather than add a new IPC channel, the action reuses existing renderer APIs end-to-end:window.api.getAppInfo()→appDataPathwindow.api.resolvePath()to normalize the path cross-platformwindow.api.file.showInFolder()to reveal it (this already does an existence check and callsshell.showItemInFolder, which highlights the folder)showInFolderthrows when the folder doesn't resolve, so the negative case surfaces a toast instead of a broken/erroring action.The following tradeoffs were made:
${appDataPath}/Data/Skills/<folderName>, which hardcodes the skill-storage subpath that otherwise lives only in the main-process path registry (feature.agents.skills). This keeps the change purely renderer-side with zero new IPC surface, at the cost of a silent break if that registry path ever moves. An alternative (exposingskillsPathviaApp_Info, or a dedicatedSkill_OpenFolderIPC) was considered and intentionally not taken to keep the change minimal.The following alternatives were considered:
Skill_OpenFolderIPC (resolve + reveal in main) — rejected as redundant given the existing reveal IPC.skillsPathtoApp_Info— rejected to avoid widening the app-info payload.Links to places where the discussion took place: N/A
Breaking changes
None.
Special notes for your reviewer
The action is shown for every skill in the management list (all are installed on disk). Built-in skills (e.g.
skill-creator) are intentionally included, matching the issue's verification example.Checklist
mainfor active development,v1for v1 maintenance fixesRelease note