mirror of
https://github.com/different-ai/openwork
synced 2026-05-15 03:26:24 +02:00
Type / at the start of an empty input to trigger a command picker popup. Commands are fetched from the OpenCode SDK (command.list()) and displayed with fuzzy filtering via fuzzysort. Keyboard navigation (arrows, tab, enter, escape) works like the existing @-mention popup. Selecting a command inserts /<name> into the editor so the user can add arguments. On submit, text starting with / is detected and routed through session.command() instead of session.promptAsync(). Changes: - types.ts: add SlashCommandOption type and command field on ComposerDraft - composer.tsx: slash detection, popup UI, keyboard nav, command selection - session.tsx: pass listCommands prop through to Composer - app.tsx: add listCommands(), route command drafts via session.command()