Add /settings command with unified settings menu (#312)

* Add /settings command with unified settings menu

- Add SettingsList component to tui package with support for:
  - Inline value cycling (Enter/Space toggles)
  - Submenus for complex selections
  - Selection preservation when returning from submenu

- Add /settings slash command consolidating:
  - Auto-compact (toggle)
  - Show images (toggle)
  - Queue mode (cycle)
  - Hide thinking (toggle)
  - Collapse changelog (toggle)
  - Thinking level (submenu)
  - Theme (submenu with preview)

- Update AGENTS.md to clarify no inline imports rule

Fixes #310

* Add /settings to README slash commands table

* Remove old settings slash commands, consolidate into /settings

- Remove /thinking, /queue, /theme, /autocompact, /show-images commands
- Remove unused selector methods and imports
- Update README references to use /settings
This commit is contained in:
Mario Zechner 2025-12-25 15:39:42 +01:00 committed by GitHub
parent 58c02ce02b
commit b4f7a957c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 527 additions and 152 deletions

View file

@ -807,3 +807,13 @@ export function getEditorTheme(): EditorTheme {
selectList: getSelectListTheme(),
};
}
export function getSettingsListTheme(): import("@mariozechner/pi-tui").SettingsListTheme {
return {
label: (text: string, selected: boolean) => (selected ? theme.fg("accent", text) : text),
value: (text: string, selected: boolean) => (selected ? theme.fg("accent", text) : theme.fg("muted", text)),
description: (text: string) => theme.fg("dim", text),
cursor: theme.fg("accent", "→ "),
hint: (text: string) => theme.fg("dim", text),
};
}