Skip to content

Commit 6f07f10

Browse files
chore: generate
1 parent e8dd8f7 commit 6f07f10

4 files changed

Lines changed: 71 additions & 71 deletions

File tree

packages/opencode/src/cli/cmd/run/footer.view.tsx

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,30 @@ export function RunFooterView(props: RunFooterViewProps) {
155155
const current = route()
156156
return current.type === "subagent" ? subagent().details[current.sessionID] : undefined
157157
})
158-
const command = useKeymapSelector((keymap: OpenTuiKeymap) =>
159-
formatKeyBindings(
160-
keymap.getCommandBindings({ visibility: "registered", commands: ["command.palette.show"] }).get("command.palette.show"),
161-
props.tuiConfig,
162-
) ?? "",
158+
const command = useKeymapSelector(
159+
(keymap: OpenTuiKeymap) =>
160+
formatKeyBindings(
161+
keymap
162+
.getCommandBindings({ visibility: "registered", commands: ["command.palette.show"] })
163+
.get("command.palette.show"),
164+
props.tuiConfig,
165+
) ?? "",
163166
)
164-
const interrupt = useKeymapSelector((keymap: OpenTuiKeymap) =>
165-
formatKeyBindings(
166-
keymap.getCommandBindings({ visibility: "registered", commands: ["session.interrupt"] }).get("session.interrupt"),
167-
props.tuiConfig,
168-
) ?? "",
167+
const interrupt = useKeymapSelector(
168+
(keymap: OpenTuiKeymap) =>
169+
formatKeyBindings(
170+
keymap
171+
.getCommandBindings({ visibility: "registered", commands: ["session.interrupt"] })
172+
.get("session.interrupt"),
173+
props.tuiConfig,
174+
) ?? "",
169175
)
170-
const variantCycle = useKeymapSelector((keymap: OpenTuiKeymap) =>
171-
formatKeyBindings(
172-
keymap.getCommandBindings({ visibility: "registered", commands: ["variant.cycle"] }).get("variant.cycle"),
173-
props.tuiConfig,
174-
) ?? "",
176+
const variantCycle = useKeymapSelector(
177+
(keymap: OpenTuiKeymap) =>
178+
formatKeyBindings(
179+
keymap.getCommandBindings({ visibility: "registered", commands: ["variant.cycle"] }).get("variant.cycle"),
180+
props.tuiConfig,
181+
) ?? "",
175182
)
176183
const hints = createMemo(() => hintFlags(term().width))
177184
const busy = createMemo(() => props.state().phase === "running")

packages/opencode/src/cli/cmd/run/runtime.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,7 @@ async function runInteractiveRuntime(input: RunRuntimeInput): Promise<void> {
185185
variant: undefined,
186186
})
187187
const savedTask = resolveSavedVariant(ctx.model)
188-
const [tuiConfig, session, savedVariant] = await Promise.all([
189-
tuiConfigTask,
190-
sessionTask,
191-
savedTask,
192-
])
188+
const [tuiConfig, session, savedVariant] = await Promise.all([tuiConfigTask, sessionTask, savedTask])
193189
const state: RuntimeState = {
194190
shown: !session.first,
195191
aborting: false,

packages/opencode/src/cli/cmd/tui/keymap.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,7 @@ export function formatKeySequence(parts: Parameters<typeof formatKeySequenceExtr
196196
return formatKeySequenceExtra(parts, formatOptions(config))
197197
}
198198

199-
export function formatKeyBindings(
200-
bindings: Parameters<typeof formatCommandBindingsExtra>[0],
201-
config: FormatConfig,
202-
) {
199+
export function formatKeyBindings(bindings: Parameters<typeof formatCommandBindingsExtra>[0], config: FormatConfig) {
203200
return formatCommandBindingsExtra(bindings, formatOptions(config))
204201
}
205202

packages/opencode/test/cli/run/footer.view.test.tsx

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -178,18 +178,18 @@ async function renderFooter(input: { tuiConfig?: RunTuiConfig; onCycle?: () => v
178178
tuiConfig={config}
179179
agent="opencode"
180180
onSubmit={() => true}
181-
onPermissionReply={() => { }}
182-
onQuestionReply={() => { }}
183-
onQuestionReject={() => { }}
184-
onCycle={input.onCycle ?? (() => { })}
181+
onPermissionReply={() => {}}
182+
onQuestionReply={() => {}}
183+
onQuestionReject={() => {}}
184+
onCycle={input.onCycle ?? (() => {})}
185185
onInterrupt={() => false}
186-
onInputClear={() => { }}
187-
onExit={() => { }}
188-
onModelSelect={() => { }}
189-
onVariantSelect={() => { }}
190-
onRows={() => { }}
191-
onLayout={() => { }}
192-
onStatus={() => { }}
186+
onInputClear={() => {}}
187+
onExit={() => {}}
188+
onModelSelect={() => {}}
189+
onVariantSelect={() => {}}
190+
onRows={() => {}}
191+
onLayout={() => {}}
192+
onStatus={() => {}}
193193
/>
194194
</OpencodeKeymapProvider>
195195
)
@@ -278,14 +278,14 @@ test("direct command panel renders grouped command palette", async () => {
278278
subagents={subagents}
279279
variants={variants}
280280
variantCycle="ctrl+t"
281-
onClose={() => { }}
282-
onModel={() => { }}
283-
onSubagent={() => { }}
284-
onVariant={() => { }}
285-
onVariantCycle={() => { }}
286-
onCommand={() => { }}
287-
onNew={() => { }}
288-
onExit={() => { }}
281+
onClose={() => {}}
282+
onModel={() => {}}
283+
onSubagent={() => {}}
284+
onVariant={() => {}}
285+
onVariantCycle={() => {}}
286+
onCommand={() => {}}
287+
onNew={() => {}}
288+
onExit={() => {}}
289289
/>
290290
</box>
291291
),
@@ -336,14 +336,14 @@ test("direct command panel shows subagent entry when available", async () => {
336336
subagents={subagents}
337337
variants={variants}
338338
variantCycle="ctrl+t"
339-
onClose={() => { }}
340-
onModel={() => { }}
341-
onSubagent={() => { }}
342-
onVariant={() => { }}
343-
onVariantCycle={() => { }}
344-
onCommand={() => { }}
345-
onNew={() => { }}
346-
onExit={() => { }}
339+
onClose={() => {}}
340+
onModel={() => {}}
341+
onSubagent={() => {}}
342+
onVariant={() => {}}
343+
onVariantCycle={() => {}}
344+
onCommand={() => {}}
345+
onNew={() => {}}
346+
onExit={() => {}}
347347
/>
348348
</box>
349349
),
@@ -379,8 +379,8 @@ test("direct subagent panel renders active subagents", async () => {
379379
theme={() => RUN_THEME_FALLBACK.footer}
380380
tabs={tabs}
381381
current={current}
382-
onClose={() => { }}
383-
onSelect={() => { }}
382+
onClose={() => {}}
383+
onSelect={() => {}}
384384
onRows={(value) => {
385385
rows = value
386386
}}
@@ -506,18 +506,18 @@ test("direct footer shows subagent indicator while prompt is running", async ()
506506
tuiConfig={tuiConfig}
507507
agent="opencode"
508508
onSubmit={() => true}
509-
onPermissionReply={() => { }}
510-
onQuestionReply={() => { }}
511-
onQuestionReject={() => { }}
512-
onCycle={() => { }}
509+
onPermissionReply={() => {}}
510+
onQuestionReply={() => {}}
511+
onQuestionReject={() => {}}
512+
onCycle={() => {}}
513513
onInterrupt={() => false}
514-
onInputClear={() => { }}
515-
onExit={() => { }}
516-
onModelSelect={() => { }}
517-
onVariantSelect={() => { }}
518-
onRows={() => { }}
519-
onLayout={() => { }}
520-
onStatus={() => { }}
514+
onInputClear={() => {}}
515+
onExit={() => {}}
516+
onModelSelect={() => {}}
517+
onVariantSelect={() => {}}
518+
onRows={() => {}}
519+
onLayout={() => {}}
520+
onStatus={() => {}}
521521
/>
522522
</OpencodeKeymapProvider>
523523
)
@@ -572,7 +572,7 @@ test("direct question body separates single-select checkmark from label", async
572572
onReply={(input) => {
573573
replies.push(input)
574574
}}
575-
onReject={() => { }}
575+
onReject={() => {}}
576576
/>
577577
</box>
578578
),
@@ -622,7 +622,7 @@ test("direct custom answer submits through keymap return binding", async () => {
622622
onReply={(input) => {
623623
questions.push(input)
624624
}}
625-
onReject={() => { }}
625+
onReject={() => {}}
626626
/>
627627
</OpencodeKeymapProvider>
628628
)
@@ -676,7 +676,7 @@ test("direct permission rejection submits through keymap return binding", async
676676
onConfirm={() => {
677677
submits.push(text)
678678
}}
679-
onCancel={() => { }}
679+
onCancel={() => {}}
680680
/>
681681
</OpencodeKeymapProvider>
682682
)
@@ -718,8 +718,8 @@ test("direct model panel renders current model selector", async () => {
718718
theme={() => RUN_THEME_FALLBACK.footer}
719719
providers={providers}
720720
current={current}
721-
onClose={() => { }}
722-
onSelect={() => { }}
721+
onClose={() => {}}
722+
onSelect={() => {}}
723723
/>
724724
</box>
725725
),
@@ -757,8 +757,8 @@ test("direct variant panel renders current variant selector", async () => {
757757
theme={() => RUN_THEME_FALLBACK.footer}
758758
variants={variants}
759759
current={current}
760-
onClose={() => { }}
761-
onSelect={() => { }}
760+
onClose={() => {}}
761+
onSelect={() => {}}
762762
/>
763763
</box>
764764
),

0 commit comments

Comments
 (0)