feat(config): add hotbar slot persistence

Add durable [[hotbar]] config bindings for slots 1-8, including default
  bindings when no hotbar config is present.

  Validate bindings without panicking: skip out-of-range slots, use the last
  duplicate slot, and preserve unknown actions so future UI layers can show
  disabled placeholders.
This commit is contained in:
reidliu41
2026-06-07 14:42:52 +08:00
parent fde931ee89
commit 00407b5bf8
3 changed files with 352 additions and 1 deletions
+20
View File
@@ -88,6 +88,26 @@ cost_currency = "usd" # usd | cny
check_for_updates = true
# update_uri = "https://internal.mirror.example/codewhale/releases/latest"
# ─────────────────────────────────────────────────────────────────────────────────
# Hotbar slots (#2061 / #2064)
# ─────────────────────────────────────────────────────────────────────────────────
# Optional 1-8 sidebar hotbar bindings. When no [[hotbar]] tables are present,
# the TUI uses built-in defaults:
# 1 voice.toggle 2 session.compact 3 mode.plan 4 mode.agent
# 5 mode.yolo 6 palette.open 7 sidebar.toggle 8 trust.toggle
#
# Invalid slots are skipped with a warning, duplicate slots use the last entry,
# and unknown actions are preserved so the UI can show a disabled placeholder.
#
# [[hotbar]]
# slot = 1
# label = "voice"
# action = "voice.toggle"
#
# [[hotbar]]
# slot = 2
# action = "session.compact"
# ─────────────────────────────────────────────────────────────────────────────────
# Paths
# ─────────────────────────────────────────────────────────────────────────────────