mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 16:21:50 +03:00
fix(tui): pin hosted task on narrow panes
This commit is contained in:
@@ -1946,6 +1946,10 @@ describe("NanobotTui in a Herdr pane", () => {
|
|||||||
action: "Approval required",
|
action: "Approval required",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
setup.resize(42, 6)
|
||||||
|
await setup.renderOnce()
|
||||||
|
expect(setup.captureCharFrame()).toContain("› Ship the Herdr integration")
|
||||||
|
|
||||||
app.accept({
|
app.accept({
|
||||||
event: "user_message",
|
event: "user_message",
|
||||||
chat_id: "chat",
|
chat_id: "chat",
|
||||||
|
|||||||
+3
-1
@@ -1534,7 +1534,9 @@ export class NanobotTui {
|
|||||||
if (this.host.hosted) {
|
if (this.host.hosted) {
|
||||||
this.titleText.maxWidth = Math.max(8, this.renderer.width - 4)
|
this.titleText.maxWidth = Math.max(8, this.renderer.width - 4)
|
||||||
this.titleText.content = this.currentTask ? `› ${this.currentTask}` : ""
|
this.titleText.content = this.currentTask ? `› ${this.currentTask}` : ""
|
||||||
this.title.visible = Boolean(this.currentTask) && this.renderer.height >= 8
|
// In a hosted pane this is the resume anchor, not decorative chrome.
|
||||||
|
// Keep it visible even when Herdr temporarily makes the pane very short.
|
||||||
|
this.title.visible = Boolean(this.currentTask)
|
||||||
this.syncHostMetadata()
|
this.syncHostMetadata()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user