Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
style(tui): simplify picker overflow indicator
chengyongru509304f9bbd6
diff --git a/tui/src/app.test.ts b/tui/src/app.test.tsindex acb6a6dc8..81dd0d622 100644--- a/tui/src/app.test.ts+++ b/tui/src/app.test.ts@@ -1503,13 +1503,13 @@ describe("NanobotTui layout", () => {await waitUntil(() => ui.runtimeControls.visible)await setup.flush()expect(ui.runtimeControls.menuRoot.getChildren()).toHaveLength(9)- expect(setup.captureCharFrame()).toContain("1–8 of 11 · ↓")+ expect(setup.captureCharFrame()).toContain("1–8 of 11 ↓")expect(setup.captureCharFrame()).not.toContain("preset-8")for (let index = 0; index < 9; index += 1) setup.mockInput.pressArrow("down")await setup.flush()expect(setup.captureCharFrame()).toContain("› preset-8")- expect(setup.captureCharFrame()).toContain("3–10 of 11 · ↑↓")+ expect(setup.captureCharFrame()).toContain("3–10 of 11 ↑↓")setup.mockInput.pressEnter()await waitUntil(() => sent.includes("/model preset-8"))diff --git a/tui/src/picker-menu.test.ts b/tui/src/picker-menu.test.tsindex d3fafb5be..86a580489 100644--- a/tui/src/picker-menu.test.ts+++ b/tui/src/picker-menu.test.ts@@ -42,7 +42,7 @@ describe("PickerMenu", () => {await setup.renderOnce()expect(menu.root.getChildren().filter((child) => child.id !== "test-picker-overflow")).toHaveLength(3)- expect(setup.captureCharFrame()).toContain("1–3 of 5 · ↓")+ expect(setup.captureCharFrame()).toContain("1–3 of 5 ↓")expect(setup.captureCharFrame()).not.toContain("Choice 3")menu.move(1)@@ -50,7 +50,7 @@ describe("PickerMenu", () => {menu.move(1)await setup.flush()expect(menu.current()?.id).toBe("3")- expect(setup.captureCharFrame()).toContain("2–4 of 5 · ↑↓")+ expect(setup.captureCharFrame()).toContain("2–4 of 5 ↑↓")expect(setup.captureCharFrame()).toContain("› Choice 3")expect(setup.captureCharFrame()).not.toContain("Choice 0")@@ -60,7 +60,7 @@ describe("PickerMenu", () => {menu.move(-1)await setup.flush()expect(menu.current()?.id).toBe("4")- expect(setup.captureCharFrame()).toContain("3–5 of 5 · ↑")+ expect(setup.captureCharFrame()).toContain("3–5 of 5 ↑")const firstVisible = menu.root.getChildren()[0] as TextRenderable | undefinedif (!firstVisible) throw new Error("picker row was not rendered")@@ -88,7 +88,7 @@ describe("PickerMenu", () => {await setup.renderOnce()expect(menu.current()?.id).toBe("d")expect(setup.captureCharFrame()).toContain("› Choice d")- expect(setup.captureCharFrame()).toContain("2–3 of 3 · ↑")+ expect(setup.captureCharFrame()).toContain("2–3 of 3 ↑")menu.update("e", 2)await setup.flush()diff --git a/tui/src/picker-menu.ts b/tui/src/picker-menu.tsindex 840fdb1f9..3652a578f 100644--- a/tui/src/picker-menu.ts+++ b/tui/src/picker-menu.ts@@ -199,7 +199,7 @@ export class PickerMenu<T> {const directions = `${this.windowStart > 0 ? "↑" : ""}${end < this.matches.length ? "↓" : ""}`this.root.add(new TextRenderable(this.renderer, {id: `${this.options.id}-overflow`,- content: ` ${this.windowStart + 1}–${end} of ${this.matches.length} · ${directions}`,+ content: ` ${this.windowStart + 1}–${end} of ${this.matches.length} ${directions}`,width: "100%",height: 1,wrapMode: "none",