refactor(ui): replace middle-dot separators with clearer hierarchy (#6087)

* refactor(ui): replace middle-dot separators with clearer hierarchy

* refactor(ui): use layout instead of punctuation separators
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-07 15:19:55 +08:00
1 parent d6ddceed99
commit 7cb396788c
82 files changed
+433 -462

No files matched your search

+9 -9
View File
@@ -124,7 +124,7 @@ export class DiffViewer {
})
this.header = new TextRenderable(renderer, {
id: "nanobot-tui-diff-header",
content: "Diff · Last turn",
content: "Last turn changes",
width: "100%",
height: 1,
flexShrink: 0,
@@ -160,7 +160,7 @@ export class DiffViewer {
hideScrollbars(this.scroll)
this.footer = new TextRenderable(renderer, {
id: "nanobot-tui-diff-footer",
content: "←/→ file · pgup/pgdn scroll · esc close",
content: "←/→ file pgup/pgdn scroll esc close",
width: "100%",
height: 1,
flexShrink: 0,
@@ -223,8 +223,8 @@ export class DiffViewer {
resize(width: number): void {
this.footer.content = width >= 58
? "←/→ file · pgup/pgdn scroll · home/end · esc close"
: "←/→ file · pgup/pgdn · esc"
? "←/→ file pgup/pgdn scroll home/end esc close"
: "←/→ file pgup/pgdn esc"
}
setTheme(theme: DiffViewerTheme): void {
@@ -256,8 +256,8 @@ export class DiffViewer {
const totalDeleted = this.items.reduce((sum, item) => sum + Math.max(0, item.edit.deleted || 0), 0)
const count = this.items.length
this.header.content = count
? `Diff · Last turn · ${count} ${count === 1 ? "change" : "changes"} · +${totalAdded} -${totalDeleted}`
: "Diff · Last turn"
? `Last turn changes ${count} ${count === 1 ? "change" : "changes"} +${totalAdded} -${totalDeleted}`
: "Last turn changes"
const item = this.items[this.selected]
if (!item) {
this.fileHeader.content = "No file changes in the last turn."
@@ -265,9 +265,9 @@ export class DiffViewer {
return
}
const edit = item.edit
const index = this.items.length > 1 ? `${this.selected + 1}/${this.items.length} · ` : ""
const state = edit.status === "editing" ? " · editing" : edit.status === "error" ? " · failed" : ""
this.fileHeader.content = `${index}${edit.path || "Unknown file"} · ${stat(edit)}${state}`
const index = this.items.length > 1 ? `${this.selected + 1}/${this.items.length} ` : ""
const state = edit.status === "editing" ? " editing" : edit.status === "error" ? " failed" : ""
this.fileHeader.content = `${index}${edit.path || "Unknown file"} ${stat(edit)}${state}`
const text = edit.diff?.format === "unified" ? edit.diff.text?.trimEnd() : ""
if (text) {
this.scroll.add(new DiffRenderable(this.renderer, {