Skip to content

feat(shell): open workspace folders in Zed when installed#685

Draft
ChristianLuciani wants to merge 2 commits into
iOfficeAI:mainfrom
ChristianLuciani:feat/shell-open-workspace-zed
Draft

feat(shell): open workspace folders in Zed when installed#685
ChristianLuciani wants to merge 2 commits into
iOfficeAI:mainfrom
ChristianLuciani:feat/shell-open-workspace-zed

Conversation

@ChristianLuciani

Copy link
Copy Markdown
Contributor

Summary

Adds Zed as an optional target for workspace open-with shell APIs, matching the existing VS Code path.

  • ToolType::Zed ("zed") in aionui-api-types
  • Detect: zed on PATH, or macOS /Applications/Zed.app/Contents/MacOS/cli
  • Open: zed <folder> (or absolute CLI path when PATH symlink is missing)
  • Windows: only invoke real zed / zed.exe on PATH (no bare .cmd spawn)

Refs: iOfficeAI/AionUi#3733
Related: iOfficeAI/AionUi#2210 (Windows open-workspace spawn lessons)

Non-goals

  • Not registering Zed as an ACP agent (Zed is an ACP client, like AionUi)
  • Not a generic multi-editor registry (design question lives on the AionUi issue)

AionUi UI PR will follow and use tool: "zed" against this API.

Test plan

  • cargo test -p aionui-api-types -p aionui-shell
  • cargo clippy -p aionui-api-types -p aionui-shell -- -D warnings
  • cargo fmt on touched crates
  • Manual: with Zed + CLI installed, check-tool-installed → true; open-folder-with opens project
  • Manual: without Zed, check → false; open returns ToolNotInstalled
  • Regression: vscode / terminal / explorer unchanged

Thanks for maintaining AionCore!

Add ToolType::Zed with install detection (PATH + macOS app CLI) and
open-folder-with parity for VS Code. Prefer real executables on Windows
to avoid .cmd spawn EINVAL (AionUi#2210).

Refs: iOfficeAI/AionUi#3733
Add a recording opener mock so open_folder_zed is proven to spawn
"zed" with the workspace directory, and cover ToolNotInstalled when
no CLI is available.

Refs: iOfficeAI/AionUi#3733
@ChristianLuciani

Copy link
Copy Markdown
Contributor Author

Follow-up commit after self-review:

  • Recording opener unit test: open_folder_zed must spawn zed with the workspace path
  • Coverage for ToolNotInstalled when no CLI is available (when Zed.app is also absent)

CI should re-run on the latest push.

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.

1 participant