chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-31 08:59:27 +00:00
parent e8dd8f7fe0
commit 6f07f10dd2
4 changed files with 71 additions and 71 deletions
@@ -155,23 +155,30 @@ export function RunFooterView(props: RunFooterViewProps) {
const current = route() const current = route()
return current.type === "subagent" ? subagent().details[current.sessionID] : undefined return current.type === "subagent" ? subagent().details[current.sessionID] : undefined
}) })
const command = useKeymapSelector((keymap: OpenTuiKeymap) => const command = useKeymapSelector(
formatKeyBindings( (keymap: OpenTuiKeymap) =>
keymap.getCommandBindings({ visibility: "registered", commands: ["command.palette.show"] }).get("command.palette.show"), formatKeyBindings(
props.tuiConfig, keymap
) ?? "", .getCommandBindings({ visibility: "registered", commands: ["command.palette.show"] })
.get("command.palette.show"),
props.tuiConfig,
) ?? "",
) )
const interrupt = useKeymapSelector((keymap: OpenTuiKeymap) => const interrupt = useKeymapSelector(
formatKeyBindings( (keymap: OpenTuiKeymap) =>
keymap.getCommandBindings({ visibility: "registered", commands: ["session.interrupt"] }).get("session.interrupt"), formatKeyBindings(
props.tuiConfig, keymap
) ?? "", .getCommandBindings({ visibility: "registered", commands: ["session.interrupt"] })
.get("session.interrupt"),
props.tuiConfig,
) ?? "",
) )
const variantCycle = useKeymapSelector((keymap: OpenTuiKeymap) => const variantCycle = useKeymapSelector(
formatKeyBindings( (keymap: OpenTuiKeymap) =>
keymap.getCommandBindings({ visibility: "registered", commands: ["variant.cycle"] }).get("variant.cycle"), formatKeyBindings(
props.tuiConfig, keymap.getCommandBindings({ visibility: "registered", commands: ["variant.cycle"] }).get("variant.cycle"),
) ?? "", props.tuiConfig,
) ?? "",
) )
const hints = createMemo(() => hintFlags(term().width)) const hints = createMemo(() => hintFlags(term().width))
const busy = createMemo(() => props.state().phase === "running") const busy = createMemo(() => props.state().phase === "running")
+1 -5
View File
@@ -185,11 +185,7 @@ async function runInteractiveRuntime(input: RunRuntimeInput): Promise<void> {
variant: undefined, variant: undefined,
}) })
const savedTask = resolveSavedVariant(ctx.model) const savedTask = resolveSavedVariant(ctx.model)
const [tuiConfig, session, savedVariant] = await Promise.all([ const [tuiConfig, session, savedVariant] = await Promise.all([tuiConfigTask, sessionTask, savedTask])
tuiConfigTask,
sessionTask,
savedTask,
])
const state: RuntimeState = { const state: RuntimeState = {
shown: !session.first, shown: !session.first,
aborting: false, aborting: false,
+1 -4
View File
@@ -196,10 +196,7 @@ export function formatKeySequence(parts: Parameters<typeof formatKeySequenceExtr
return formatKeySequenceExtra(parts, formatOptions(config)) return formatKeySequenceExtra(parts, formatOptions(config))
} }
export function formatKeyBindings( export function formatKeyBindings(bindings: Parameters<typeof formatCommandBindingsExtra>[0], config: FormatConfig) {
bindings: Parameters<typeof formatCommandBindingsExtra>[0],
config: FormatConfig,
) {
return formatCommandBindingsExtra(bindings, formatOptions(config)) return formatCommandBindingsExtra(bindings, formatOptions(config))
} }
@@ -178,18 +178,18 @@ async function renderFooter(input: { tuiConfig?: RunTuiConfig; onCycle?: () => v
tuiConfig={config} tuiConfig={config}
agent="opencode" agent="opencode"
onSubmit={() => true} onSubmit={() => true}
onPermissionReply={() => { }} onPermissionReply={() => {}}
onQuestionReply={() => { }} onQuestionReply={() => {}}
onQuestionReject={() => { }} onQuestionReject={() => {}}
onCycle={input.onCycle ?? (() => { })} onCycle={input.onCycle ?? (() => {})}
onInterrupt={() => false} onInterrupt={() => false}
onInputClear={() => { }} onInputClear={() => {}}
onExit={() => { }} onExit={() => {}}
onModelSelect={() => { }} onModelSelect={() => {}}
onVariantSelect={() => { }} onVariantSelect={() => {}}
onRows={() => { }} onRows={() => {}}
onLayout={() => { }} onLayout={() => {}}
onStatus={() => { }} onStatus={() => {}}
/> />
</OpencodeKeymapProvider> </OpencodeKeymapProvider>
) )
@@ -278,14 +278,14 @@ test("direct command panel renders grouped command palette", async () => {
subagents={subagents} subagents={subagents}
variants={variants} variants={variants}
variantCycle="ctrl+t" variantCycle="ctrl+t"
onClose={() => { }} onClose={() => {}}
onModel={() => { }} onModel={() => {}}
onSubagent={() => { }} onSubagent={() => {}}
onVariant={() => { }} onVariant={() => {}}
onVariantCycle={() => { }} onVariantCycle={() => {}}
onCommand={() => { }} onCommand={() => {}}
onNew={() => { }} onNew={() => {}}
onExit={() => { }} onExit={() => {}}
/> />
</box> </box>
), ),
@@ -336,14 +336,14 @@ test("direct command panel shows subagent entry when available", async () => {
subagents={subagents} subagents={subagents}
variants={variants} variants={variants}
variantCycle="ctrl+t" variantCycle="ctrl+t"
onClose={() => { }} onClose={() => {}}
onModel={() => { }} onModel={() => {}}
onSubagent={() => { }} onSubagent={() => {}}
onVariant={() => { }} onVariant={() => {}}
onVariantCycle={() => { }} onVariantCycle={() => {}}
onCommand={() => { }} onCommand={() => {}}
onNew={() => { }} onNew={() => {}}
onExit={() => { }} onExit={() => {}}
/> />
</box> </box>
), ),
@@ -379,8 +379,8 @@ test("direct subagent panel renders active subagents", async () => {
theme={() => RUN_THEME_FALLBACK.footer} theme={() => RUN_THEME_FALLBACK.footer}
tabs={tabs} tabs={tabs}
current={current} current={current}
onClose={() => { }} onClose={() => {}}
onSelect={() => { }} onSelect={() => {}}
onRows={(value) => { onRows={(value) => {
rows = value rows = value
}} }}
@@ -506,18 +506,18 @@ test("direct footer shows subagent indicator while prompt is running", async ()
tuiConfig={tuiConfig} tuiConfig={tuiConfig}
agent="opencode" agent="opencode"
onSubmit={() => true} onSubmit={() => true}
onPermissionReply={() => { }} onPermissionReply={() => {}}
onQuestionReply={() => { }} onQuestionReply={() => {}}
onQuestionReject={() => { }} onQuestionReject={() => {}}
onCycle={() => { }} onCycle={() => {}}
onInterrupt={() => false} onInterrupt={() => false}
onInputClear={() => { }} onInputClear={() => {}}
onExit={() => { }} onExit={() => {}}
onModelSelect={() => { }} onModelSelect={() => {}}
onVariantSelect={() => { }} onVariantSelect={() => {}}
onRows={() => { }} onRows={() => {}}
onLayout={() => { }} onLayout={() => {}}
onStatus={() => { }} onStatus={() => {}}
/> />
</OpencodeKeymapProvider> </OpencodeKeymapProvider>
) )
@@ -572,7 +572,7 @@ test("direct question body separates single-select checkmark from label", async
onReply={(input) => { onReply={(input) => {
replies.push(input) replies.push(input)
}} }}
onReject={() => { }} onReject={() => {}}
/> />
</box> </box>
), ),
@@ -622,7 +622,7 @@ test("direct custom answer submits through keymap return binding", async () => {
onReply={(input) => { onReply={(input) => {
questions.push(input) questions.push(input)
}} }}
onReject={() => { }} onReject={() => {}}
/> />
</OpencodeKeymapProvider> </OpencodeKeymapProvider>
) )
@@ -676,7 +676,7 @@ test("direct permission rejection submits through keymap return binding", async
onConfirm={() => { onConfirm={() => {
submits.push(text) submits.push(text)
}} }}
onCancel={() => { }} onCancel={() => {}}
/> />
</OpencodeKeymapProvider> </OpencodeKeymapProvider>
) )
@@ -718,8 +718,8 @@ test("direct model panel renders current model selector", async () => {
theme={() => RUN_THEME_FALLBACK.footer} theme={() => RUN_THEME_FALLBACK.footer}
providers={providers} providers={providers}
current={current} current={current}
onClose={() => { }} onClose={() => {}}
onSelect={() => { }} onSelect={() => {}}
/> />
</box> </box>
), ),
@@ -757,8 +757,8 @@ test("direct variant panel renders current variant selector", async () => {
theme={() => RUN_THEME_FALLBACK.footer} theme={() => RUN_THEME_FALLBACK.footer}
variants={variants} variants={variants}
current={current} current={current}
onClose={() => { }} onClose={() => {}}
onSelect={() => { }} onSelect={() => {}}
/> />
</box> </box>
), ),