[PR #11810] feat(app): add workspace toggle command to command palette and prompt input #13936

Closed
opened 2026-02-16 18:18:45 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11810

State: closed
Merged: Yes


closes #11813

Summary

This PR adds a new command to toggle workspaces, accessible via the command palette and the prompt input slash command menu.

What does this PR do?

  1. Adds workspace toggle command to command palette (packages/app/src/pages/layout.tsx):

    • New command ID: workspace.toggle
    • Category: Workspace
    • Accessible via Ctrl/Cmd+Shift+P → search "Toggle workspaces"
      image
  2. Adds slash command support (packages/app/src/pages/layout.tsx):

    • Slash trigger: /workspace
    • Appears in the prompt input's slash command menu
image
  1. Adds toast notifications (packages/app/src/pages/layout.tsx):

    • Shows confirmation when workspaces are enabled/disabled via command to make it obvious the command was applied
    • Toast messages in all 15 supported languages
      image
  2. Adds translations (packages/app/src/i18n/*.ts):

    • Command title and description (English only for description)
    • Toast messages for enabled/disabled states

How did you verify your code works?

  • e2e test: same pass/fail
  • manual testing:

A. From prompt input:

  1. type '/workspace'
  2. new command shows up, description is correct
  3. click the command
  4. observe that workspace mode is toggled
  5. toast is correct

B: From command pallete:

  1. type 'workspace'
  2. See 'toggle workspace' command, description is correct
  3. call the command
  4. observe that workspace mode is toggled
  5. toast is correct
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11810 **State:** closed **Merged:** Yes --- closes #11813 ## Summary This PR adds a new command to toggle workspaces, accessible via the command palette and the prompt input slash command menu. ### What does this PR do? 1. **Adds workspace toggle command to command palette** (`packages/app/src/pages/layout.tsx`): - New command ID: `workspace.toggle` - Category: Workspace - Accessible via `Ctrl/Cmd+Shift+P` → search "Toggle workspaces" <img width="691" height="174" alt="image" src="https://github.com/user-attachments/assets/54e4bdff-e252-402a-8241-7f6ee1362a51" /> 2. **Adds slash command support** (`packages/app/src/pages/layout.tsx`): - Slash trigger: `/workspace` - Appears in the prompt input's slash command menu - <img width="429" height="154" alt="image" src="https://github.com/user-attachments/assets/586738d1-7612-4eb7-ad76-b84605fa7e5c" /> 3. **Adds toast notifications** (`packages/app/src/pages/layout.tsx`): - Shows confirmation when workspaces are enabled/disabled via command to make it obvious the command was applied - Toast messages in all 15 supported languages <img width="355" height="137" alt="image" src="https://github.com/user-attachments/assets/a24277d5-f307-460d-9e41-c49b2ffea619" /> 4. **Adds translations** (`packages/app/src/i18n/*.ts`): - Command title and description (English only for description) - Toast messages for enabled/disabled states ### How did you verify your code works? - e2e test: same pass/fail - manual testing: A. From prompt input: 1. type '/workspace' 2. new command shows up, description is correct 3. click the command 4. observe that workspace mode is toggled 5. toast is correct B: From command pallete: 1. type 'workspace' 2. See 'toggle workspace' command, description is correct 3. call the command 4. observe that workspace mode is toggled 5. toast is correct
yindo added the pull-request label 2026-02-16 18:18:45 -05:00
yindo closed this issue 2026-02-16 18:18:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13936