[PR #6829] fix(app): fix custom slash commands not showing on initial / #12129

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

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

State: closed
Merged: Yes


Problem

Custom commands (like /init, /review, /commit) were not showing in the slash command menu when first typing /. Users had to type a character and backspace to see them.

Cause

The useFilteredList hook doesn't re-run when sync.data.command loads asynchronously after the initial render.

Solution

Added a createEffect that calls slashRefetch() when sync.data.command changes, ensuring custom commands appear immediately.

Changes

  • packages/app/src/components/prompt-input.tsx: Added refetch trigger when commands load

Before

https://github.com/user-attachments/assets/96032dbc-8c83-4b9a-a682-bfaae916b0e8

After

https://github.com/user-attachments/assets/52070813-50b5-4efa-a07c-9e9f9a7133c7

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6829 **State:** closed **Merged:** Yes --- ### Problem Custom commands (like `/init`, `/review`, `/commit`) were not showing in the slash command menu when first typing `/`. Users had to type a character and backspace to see them. ### Cause The `useFilteredList` hook doesn't re-run when `sync.data.command` loads asynchronously after the initial render. ### Solution Added a `createEffect` that calls `slashRefetch()` when `sync.data.command` changes, ensuring custom commands appear immediately. ### Changes - `packages/app/src/components/prompt-input.tsx`: Added refetch trigger when commands load #### Before https://github.com/user-attachments/assets/96032dbc-8c83-4b9a-a682-bfaae916b0e8 #### After https://github.com/user-attachments/assets/52070813-50b5-4efa-a07c-9e9f9a7133c7
yindo added the pull-request label 2026-02-16 18:17:03 -05:00
yindo closed this issue 2026-02-16 18:17:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12129