tui(run): use keymap instead of raw key events (#30077)

Co-authored-by: Sebastian Herrlinger <hasta84@gmail.com>
This commit is contained in:
Simon Klee
2026-05-31 10:58:12 +02:00
committed by GitHub
co-authored by Sebastian Herrlinger
parent a291967206
commit e8dd8f7fe0
19 changed files with 760 additions and 891 deletions
@@ -4,9 +4,8 @@ import { useKeyboard, type JSX } from "@opentui/solid"
import fuzzysort from "fuzzysort"
import { createEffect, createMemo, createSignal, type Accessor } from "solid-js"
import { RunFooterMenu, createFooterMenuState, type RunFooterMenuItem } from "./footer.menu"
import { formatBindings } from "./keymap.shared"
import type { RunFooterTheme } from "./theme"
import type { FooterKeybinds, FooterSubagentTab, RunCommand, RunInput, RunProvider } from "./types"
import type { FooterSubagentTab, RunCommand, RunInput, RunProvider } from "./types"
type PanelEntry = RunFooterMenuItem & {
category: string
@@ -296,7 +295,7 @@ export function RunCommandMenuBody(props: {
commands: Accessor<RunCommand[] | undefined>
subagents: Accessor<FooterSubagentTab[]>
variants: Accessor<string[]>
keybinds: FooterKeybinds
variantCycle: string
onClose: () => void
onModel: () => void
onSubagent: () => void
@@ -334,7 +333,7 @@ export function RunCommandMenuBody(props: {
action: "variant.cycle",
category: "Suggested",
display: "Variant cycle",
footer: formatBindings(props.keybinds.variantCycle, props.keybinds.leader),
footer: props.variantCycle,
keywords: "variant cycle",
},
...(props.variants().length > 0