mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
Add slash command autocomplete popup
Typing / in the chat composer now shows a filtered popup listing all available commands with their description. Arrow keys or Tab to select, Enter/Tab to insert, Esc to close, click also works. - New module: static/js/slashAutocomplete.js Reads the existing COMMANDS registry (and LEGACY_ALIASES) from slashCommands.js — no command logic added here, just discovery UI. Excludes easter-egg commands (flip, roll, 8ball, fortune, odyssey, ascii). Promotes short legacy aliases (/new, /clear, /web, /compact, /research, etc.) as first-class rows so users don't have to know the full /session new form. - slashCommands.js: export COMMANDS and LEGACY_ALIASES so the new module can read the registry. - chat.js: lazy-import slashAutocomplete on init, wire to #message textarea. - style.css: popup + row styles using existing CSS variables.
This commit is contained in:
@@ -5650,7 +5650,7 @@ const COMMANDS = {
|
||||
// ── Legacy aliases ────────────────────────────────────────────────
|
||||
// Maps old flat command names to { parent, sub } so `/new` still works.
|
||||
|
||||
const LEGACY_ALIASES = {
|
||||
export const LEGACY_ALIASES = {
|
||||
'new': { parent: 'session', sub: 'new' },
|
||||
'create': { parent: 'session', sub: 'new' },
|
||||
'delete': { parent: 'session', sub: 'delete' },
|
||||
@@ -5950,7 +5950,7 @@ export function clearSetupMode(preservePendingState = false) {
|
||||
}
|
||||
}
|
||||
|
||||
export { handleSlashCommand, handleSetupInput, handleSetupWizard, slashReply, typewriterReply };
|
||||
export { handleSlashCommand, handleSetupInput, handleSetupWizard, slashReply, typewriterReply, COMMANDS };
|
||||
|
||||
const slashCommands = {
|
||||
initSlashCommands,
|
||||
|
||||
Reference in New Issue
Block a user