feat: slash command autocomplete popup (#946) #957

Closed
sleepy wants to merge 1 commit from fix/946-slash-autocomplete into dev
Owner

Add popup autocomplete when typing / in the chat composer. Lists available slash commands with descriptions.

  • New slashAutocomplete.js module (313 lines)
  • Keyboard navigation (↑↓/Tab/Enter/Esc), click-to-select, scrollable
  • Integrated with existing slashCommands.js command list
  • 2 static regression tests passing

Closes #946

Add popup autocomplete when typing `/` in the chat composer. Lists available slash commands with descriptions. - New slashAutocomplete.js module (313 lines) - Keyboard navigation (↑↓/Tab/Enter/Esc), click-to-select, scrollable - Integrated with existing slashCommands.js command list - 2 static regression tests passing Closes #946
Ported from upstream commit 5ed9b74 (origin/Sirsyorrz/slash-autocomplete).

- New module: static/js/slashAutocomplete.js
  Reads COMMANDS + LEGACY_ALIASES from slashCommands.js.
  Shows a fixed popup when the composer starts with /.
  Keyboard-navigable (↑↓/Tab/Enter/Esc), click-to-select, scrollable.
  Groups entries by category, promotes short legacy aliases
  (/new, /clear, /web, etc.), excludes easter eggs.
  Lazy-imported on init to avoid blocking page load.

- slashCommands.js: export COMMANDS and LEGACY_ALIASES so the
  autocomplete module can read the command registry.

- chat.js: lazy-import slashAutocomplete on init, wire to #message textarea.

- style.css: popup + row styles using existing CSS variables.

- tests: port static regression tests for MAX_VISIBLE and
  _exactCommandGroupItems behavior.

Closes #946
sleepy closed this pull request 2026-06-18 18:33:48 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.