mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-01 08:42:20 +03:00
style(tui): replace header dots with spacing
This commit is contained in:
+4
-4
@@ -205,7 +205,7 @@ describe("NanobotTui layout", () => {
|
|||||||
expect(occurrences(frame, "Ask nanobot anything")).toBe(1)
|
expect(occurrences(frame, "Ask nanobot anything")).toBe(1)
|
||||||
expect(occurrences(frame, "Ready")).toBe(0)
|
expect(occurrences(frame, "Ready")).toBe(0)
|
||||||
expect(occurrences(frame, "Getting ready…")).toBe(1)
|
expect(occurrences(frame, "Getting ready…")).toBe(1)
|
||||||
expect(occurrences(frame, "nanobot · test/model")).toBe(1)
|
expect(occurrences(frame, "nanobot test/model")).toBe(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
app.accept({ event: "attached", chat_id: "chat" })
|
app.accept({ event: "attached", chat_id: "chat" })
|
||||||
@@ -1182,7 +1182,7 @@ describe("NanobotTui layout", () => {
|
|||||||
model_preset: "Codex",
|
model_preset: "Codex",
|
||||||
})
|
})
|
||||||
await setup.flush()
|
await setup.flush()
|
||||||
expect(ui.runtimeControls.modelText.plainText).toContain("Codex · openai/gpt-5.6")
|
expect(ui.runtimeControls.modelText.plainText).toContain("Codex openai/gpt-5.6")
|
||||||
|
|
||||||
app.accept({
|
app.accept({
|
||||||
event: "runtime_model_updated",
|
event: "runtime_model_updated",
|
||||||
@@ -1190,7 +1190,7 @@ describe("NanobotTui layout", () => {
|
|||||||
model_preset: "DeepSeek",
|
model_preset: "DeepSeek",
|
||||||
})
|
})
|
||||||
await setup.flush()
|
await setup.flush()
|
||||||
expect(ui.runtimeControls.modelText.plainText).toContain("Codex · openai/gpt-5.6")
|
expect(ui.runtimeControls.modelText.plainText).toContain("Codex openai/gpt-5.6")
|
||||||
expect(ui.runtimeControls.modelText.plainText).not.toContain("DeepSeek")
|
expect(ui.runtimeControls.modelText.plainText).not.toContain("DeepSeek")
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1959,7 +1959,7 @@ describe("NanobotTui layout", () => {
|
|||||||
} else if (width >= 28 && height >= 9) {
|
} else if (width >= 28 && height >= 9) {
|
||||||
expect(occurrences(frame, "Enter now · Tab next")).toBe(1)
|
expect(occurrences(frame, "Enter now · Tab next")).toBe(1)
|
||||||
}
|
}
|
||||||
expect(occurrences(frame, "nanobot · test/model")).toBe(height >= 14 ? 1 : 0)
|
expect(occurrences(frame, "nanobot test/model")).toBe(height >= 14 ? 1 : 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1962,7 +1962,7 @@ export class NanobotTui {
|
|||||||
this.titleText.content = identity
|
this.titleText.content = identity
|
||||||
const context = this.contextTokens === null
|
const context = this.contextTokens === null
|
||||||
? ""
|
? ""
|
||||||
: ` · ~${formatTokenCount(this.contextTokens)}${this.contextWindowTokens
|
: ` ~${formatTokenCount(this.contextTokens)}${this.contextWindowTokens
|
||||||
? `/${formatTokenCount(this.contextWindowTokens)}`
|
? `/${formatTokenCount(this.contextWindowTokens)}`
|
||||||
: ""} ctx`
|
: ""} ctx`
|
||||||
this.runtimeControls.updateModel(this.modelName, this.modelPreset)
|
this.runtimeControls.updateModel(this.modelName, this.modelPreset)
|
||||||
|
|||||||
@@ -310,11 +310,11 @@ export class RuntimeControls {
|
|||||||
|
|
||||||
private render(): void {
|
private render(): void {
|
||||||
const runtime = this.modelPreset !== "default"
|
const runtime = this.modelPreset !== "default"
|
||||||
? [this.modelPreset, this.model].filter(Boolean).join(" · ")
|
? [this.modelPreset, this.model].filter(Boolean).join(" ")
|
||||||
: this.model
|
: this.model
|
||||||
this.modelText.content = ` · ${runtime} ▾`
|
this.modelText.content = ` ${runtime} ▾`
|
||||||
const access = this.scope.access_mode === "full" ? "full access" : "workspace access"
|
const access = this.scope.access_mode === "full" ? "full access" : "workspace access"
|
||||||
this.accessText.content = ` · ${access} ▾`
|
this.accessText.content = ` ${access} ▾`
|
||||||
this.renderColors()
|
this.renderColors()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ export class Transcript {
|
|||||||
const title = this.createText(`>_ nanobot v${options.version}`, "text", true)
|
const title = this.createText(`>_ nanobot v${options.version}`, "text", true)
|
||||||
const context = this.createText([
|
const context = this.createText([
|
||||||
"",
|
"",
|
||||||
`${options.model} · ${options.access}`,
|
`${options.model} ${options.access}`,
|
||||||
options.workspace,
|
options.workspace,
|
||||||
].join("\n"), "muted")
|
].join("\n"), "muted")
|
||||||
row.add(title)
|
row.add(title)
|
||||||
|
|||||||
Reference in New Issue
Block a user