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
fix(tui): remove redundant launch header details
chengyongru3cf6ed60ced4
diff --git a/tui/src/app.test.ts b/tui/src/app.test.tsindex 81dd0d622..3f4afb629 100644--- a/tui/src/app.test.ts+++ b/tui/src/app.test.ts@@ -240,6 +240,28 @@ describe("NanobotTui layout", () => {expect(frame).toContain("Ready · 1.2s")})+ test("keeps model and access details in the composer controls only", async () => {+ setup = await createRenderer({ width: 100, height: 24, screenMode: "alternate-screen" })+ NanobotTui.mount(+ setup.renderer,+ {+ ...options,+ model: "provider/resolved-model",+ modelPreset: "selected-preset",+ access: "full access",+ },+ client(),+ new MockTreeSitterClient({ autoResolveTimeout: 0 }),+ )+ await setup.renderOnce()++ const frame = setup.captureCharFrame()+ expect(frame).not.toContain("provider/resolved-model")+ expect(frame).toContain("selected-preset ▾")+ expect(occurrences(frame, "full access")).toBe(1)+ expect(frame).toContain(options.workspace)+ })+test("uses the available transcript width before wrapping the workspace", async () => {setup = await createRenderer({ width: 100, height: 24, screenMode: "alternate-screen" })const workspace = String.raw`D:\Documents\GitHub\nanobot\.worktrees\responsive-header-fixture`@@ -3230,7 +3252,7 @@ describe("NanobotTui layout", () => {expect((failure as TextRenderable).fg.toInts().slice(0, 3)).toEqual([1, 3, 5,].map((offset) => Number.parseInt(ui.palette.error.slice(offset, offset + 2), 16)))- ui.transcript.reset({ model: "model", workspace: "workspace", version: "test", access: "workspace" })+ ui.transcript.reset({ workspace: "workspace", version: "test" })app.accept({ event: "context_compaction", chat_id: "chat", compaction_id: "recent", phase: "started" })await setup.renderOnce()expect(setup.captureCharFrame()).toContain("Compacting conversation…")diff --git a/tui/src/app.ts b/tui/src/app.tsindex 11220afea..8d0c193a3 100644--- a/tui/src/app.ts+++ b/tui/src/app.ts@@ -911,7 +911,7 @@ export class NanobotTui {this.renderer.console.onCopySelection = (text) => void this.copySelection(text)this.handleResize()this.composer.focus()- this.transcript.header(options)+ this.transcript.header({ workspace: options.workspace, version: options.version })}static async create(options: AppOptions): Promise<NanobotTui> {@@ -1435,10 +1435,8 @@ export class NanobotTui {this.historyHasMore = falsethis.historyLoadingOlder = falsethis.transcript.reset({- model: this.modelName || this.modelPreset,workspace: this.options.workspace,version: this.options.version,- access: this.options.access,})}if (restoring || (!this.historyLoaded && this.options.chatId)) {diff --git a/tui/src/transcript.ts b/tui/src/transcript.tsindex 2c6f6f7e0..98ab4c012 100644--- a/tui/src/transcript.ts+++ b/tui/src/transcript.ts@@ -38,10 +38,8 @@ export interface TranscriptTheme {}export interface TranscriptHeader {- model: stringworkspace: stringversion: string- access: string}export interface TranscriptNavigation {@@ -215,11 +213,7 @@ export class Transcript {paddingRight: 1,})const title = this.createText(`>_ nanobot v${options.version}`, "text", true)- const context = this.createText([- "",- `${options.model} ${options.access}`,- options.workspace,- ].join("\n"), "muted")+ const context = this.createText(["", options.workspace].join("\n"), "muted")row.add(title)row.add(context)this.root.add(row)