From a196569f5110875ab3ac52f6ce429cef6a844654 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Fri, 8 May 2026 11:56:55 +0000 Subject: [PATCH] chore: generate --- .../cli/cmd/tui/feature-plugins/system/which-key.tsx | 5 +---- packages/opencode/test/config/tui.test.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/feature-plugins/system/which-key.tsx b/packages/opencode/src/cli/cmd/tui/feature-plugins/system/which-key.tsx index 5eea0d87bb..2735939a00 100644 --- a/packages/opencode/src/cli/cmd/tui/feature-plugins/system/which-key.tsx +++ b/packages/opencode/src/cli/cmd/tui/feature-plugins/system/which-key.tsx @@ -263,10 +263,7 @@ function WhichKeyPanel(props: { (sum, item) => sum + (item.type === "tab" ? item.group.label.length + 2 : 3), 0, ) - return Math.max( - MIN_TAB_GAP, - Math.min(TAB_GAP, Math.floor((contentWidth() - itemWidth) / (itemCount - 1))), - ) + return Math.max(MIN_TAB_GAP, Math.min(TAB_GAP, Math.floor((contentWidth() - itemWidth) / (itemCount - 1)))) }) const nextMode = createMemo(() => (props.mode() === "dock" ? "overlay" : "dock")) const look = createMemo(() => skin(props.api)) diff --git a/packages/opencode/test/config/tui.test.ts b/packages/opencode/test/config/tui.test.ts index f94642abd5..4ad942b251 100644 --- a/packages/opencode/test/config/tui.test.ts +++ b/packages/opencode/test/config/tui.test.ts @@ -428,9 +428,7 @@ test("resolves semantic keymap sections", async () => { const config = await getTuiConfig(tmp.path) expect(config.keymap.sections.global.find((binding) => binding.cmd === "command.palette.show")?.key).toBe("alt+p") expect(config.keymap.sections.global.find((binding) => binding.cmd === "session.new")?.key).toBe("n") - expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle")?.key).toBe( - "alt+k", - ) + expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle")?.key).toBe("alt+k") expect(config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.layout.toggle")?.key).toBe( "ctrl+alt+shift+k", ) @@ -441,9 +439,11 @@ test("resolves semantic keymap sections", async () => { "ctrl+alt+right,ctrl+alt+]", ) expect( - (config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle") as - | { group?: unknown } - | undefined)?.group, + ( + config.keymap.sections.which_key.find((binding) => binding.cmd === "tui-which-key.toggle") as + | { group?: unknown } + | undefined + )?.group, ).toBe("System") expect(config.keymap.sections.prompt.find((binding) => binding.cmd === "prompt.editor")?.key).toBe("ctrl+e") expect(config.keymap.sections.autocomplete.find((binding) => binding.cmd === "prompt.autocomplete.next")?.key).toBe(