Skip to content

[Feature]: Collapse skill IPC results into native IpcApi errors #16092

@kangfenmao

Description

@kangfenmao

Issue Checklist

  • I understand that issues are for reporting problems and requesting features, not for off-topic comments, and I will provide as much detail as possible to help resolve the issue.
  • I have checked the pinned issues and searched through the existing open issues, closed issues, and discussions and did not find a similar suggestion.
  • I have provided a short and descriptive title so that developers can quickly understand the issue when browsing the issue list.
  • The latest version of Cherry Studio does not include the feature I am suggesting.

Platform

macOS

Version

main / PR #16060

Is your feature request related to an existing issue?

PR #16060 migrates skill commands from legacy preload IPC to IpcApi but intentionally preserves the existing SkillResult<T> success/failure envelope for compatibility during the migration.

That envelope now duplicates IpcApi's native error transport: handlers catch errors and return { success: false, error }, while callers either immediately rethrow through unwrapSkillResult() or branch on result.success where a normal try/catch would work.

Desired Solution

Follow up after PR #16060 by moving skill command failures to native IpcApi errors and removing the parallel SkillResult error channel where feasible.

Expected cleanup:

  • Remove the skill-specific result wrapper schema if no longer needed.
  • Remove or simplify unwrapSkillResult().
  • Update install, uninstall, toggle, install_from_zip, install_from_directory, read_file, and list_files handlers/callers to use the standard IpcApi error model.
  • Keep user-visible behavior stable.

Alternative Solutions

Keep SkillResult<T> permanently for these routes, but that would preserve a second error model on top of IpcApi and make future route migrations less consistent.

Additional Information

Tracked from PR review feedback on #16060.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions