reassign action palette to asterisk

This commit is contained in:
booleanmaybe 2026-04-19 17:02:07 -04:00
parent 0312ad8fca
commit 8838c29149
7 changed files with 17 additions and 17 deletions

View file

@ -4,7 +4,7 @@ import "path"
// AITool defines a supported AI coding assistant.
// To add a new tool, add an entry to the aiTools slice below.
// NOTE: the action palette (press ?) surfaces available actions; update docs if tool names change.
// NOTE: the action palette (press *) surfaces available actions; update docs if tool names change.
type AITool struct {
Key string // config identifier: "claude", "gemini", "codex", "opencode"
DisplayName string // human-readable label for UI: "Claude Code"

View file

@ -272,7 +272,7 @@ func DefaultGlobalActions() *ActionRegistry {
r.Register(Action{ID: ActionQuit, Key: tcell.KeyRune, Rune: 'q', Label: "Quit", ShowInHeader: true})
r.Register(Action{ID: ActionRefresh, Key: tcell.KeyRune, Rune: 'r', Label: "Refresh", ShowInHeader: true})
r.Register(Action{ID: ActionToggleHeader, Key: tcell.KeyF10, Label: "Toggle Header", ShowInHeader: true})
r.Register(Action{ID: ActionOpenPalette, Key: tcell.KeyRune, Rune: '?', Label: "All", ShowInHeader: true, HideFromPalette: true})
r.Register(Action{ID: ActionOpenPalette, Key: tcell.KeyRune, Rune: '*', Label: "All", ShowInHeader: true, HideFromPalette: true})
return r
}

View file

@ -106,14 +106,14 @@ func (ir *InputRouter) SetPaletteConfig(pc *model.ActionPaletteConfig) {
func (ir *InputRouter) HandleInput(event *tcell.EventKey, currentView *ViewEntry) bool {
slog.Debug("input received", "name", event.Name(), "key", int(event.Key()), "rune", string(event.Rune()), "modifiers", int(event.Modifiers()))
// if the input box is focused, let it handle all input (including '?' and F10)
// if the input box is focused, let it handle all input (including '*' and F10)
if activeView := ir.navController.GetActiveView(); activeView != nil {
if iv, ok := activeView.(InputableView); ok && iv.IsInputBoxFocused() {
return false
}
}
// pre-gate: ActionOpenPalette (?) and ActionToggleHeader (F10) must fire before
// pre-gate: ActionOpenPalette (*) and ActionToggleHeader (F10) must fire before
// task-edit Prepare and before search/fullscreen/editor gates, so they stay truly
// global without triggering edit-session setup or focus churn.
if action := ir.globalActions.Match(event); action != nil {

View file

@ -13,10 +13,10 @@ func TestActionPalette_OpenAndClose(t *testing.T) {
defer ta.Cleanup()
ta.Draw()
// ? opens the palette
ta.SendKey(tcell.KeyRune, '?', tcell.ModNone)
// * opens the palette
ta.SendKey(tcell.KeyRune, '*', tcell.ModNone)
if !ta.GetPaletteConfig().IsVisible() {
t.Fatal("palette should be visible after pressing '?'")
t.Fatal("palette should be visible after pressing '*'")
}
// Esc closes it
@ -56,7 +56,7 @@ func TestActionPalette_ModalBlocksGlobals(t *testing.T) {
startVisible := hc.IsVisible()
// open palette
ta.SendKey(tcell.KeyRune, '?', tcell.ModNone)
ta.SendKey(tcell.KeyRune, '*', tcell.ModNone)
if !ta.GetPaletteConfig().IsVisible() {
t.Fatal("palette should be open")
}
@ -72,23 +72,23 @@ func TestActionPalette_ModalBlocksGlobals(t *testing.T) {
ta.SendKey(tcell.KeyEscape, 0, tcell.ModNone)
}
func TestActionPalette_QuestionMarkFiltersInPalette(t *testing.T) {
func TestActionPalette_AsteriskFiltersInPalette(t *testing.T) {
ta := testutil.NewTestApp(t)
defer ta.Cleanup()
ta.Draw()
// open palette
ta.SendKey(tcell.KeyRune, '?', tcell.ModNone)
ta.SendKey(tcell.KeyRune, '*', tcell.ModNone)
if !ta.GetPaletteConfig().IsVisible() {
t.Fatal("palette should be open")
}
// typing '?' while palette is open should be treated as filter text, not open another palette
ta.SendKeyToFocused(tcell.KeyRune, '?', tcell.ModNone)
// typing '*' while palette is open should be treated as filter text, not open another palette
ta.SendKeyToFocused(tcell.KeyRune, '*', tcell.ModNone)
// palette should still be open
if !ta.GetPaletteConfig().IsVisible() {
t.Fatal("palette should remain open when '?' is typed as filter")
t.Fatal("palette should remain open when '*' is typed as filter")
}
ta.SendKey(tcell.KeyEscape, 0, tcell.ModNone)

View file

@ -383,8 +383,8 @@ func TestInputAction_PaletteBlockedDuringModal(t *testing.T) {
t.Fatal("input box should be focused")
}
// '?' should be typed into the input box as text, not open the palette
ta.SendKey(tcell.KeyRune, '?', tcell.ModNone)
// '*' should be typed into the input box as text, not open the palette
ta.SendKey(tcell.KeyRune, '*', tcell.ModNone)
if ta.GetPaletteConfig().IsVisible() {
t.Fatal("palette should not open while input box is editing")
}

View file

@ -10,7 +10,7 @@ import (
// InstallGlobalInputCapture installs the global keyboard handler
// (palette modal short-circuit, statusline auto-hide dismiss, router dispatch).
// F10 (toggle header) and ? (open palette) are both routed through InputRouter
// F10 (toggle header) and * (open palette) are both routed through InputRouter
// rather than handled here, so keyboard and palette-entered globals behave identically.
func InstallGlobalInputCapture(
app *tview.Application,

View file

@ -90,7 +90,7 @@ func (dv *DokiView) build() {
// The default Help plugin previously used this with embedded markdown:
// cnt := map[string]string{"Help": helpMd, "tiki.md": tikiMd, "view.md": customMd}
// provider := &internalDokiProvider{content: cnt}
// That usage was replaced by the action palette (press ? to open).
// That usage was replaced by the action palette (press * to open).
case "internal":
provider := &internalDokiProvider{content: map[string]string{}}
content, err = provider.FetchContent(nav.NavElement{Text: dv.pluginDef.Text})