mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 00:03:01 +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",
|
||||
})
|
||||
|
||||
setup.resize(42, 6)
|
||||
await setup.renderOnce()
|
||||
expect(setup.captureCharFrame()).toContain("› Ship the Herdr integration")
|
||||
|
||||
app.accept({
|
||||
event: "user_message",
|
||||
chat_id: "chat",
|
||||
|
||||
+3
-1
@@ -1534,7 +1534,9 @@ export class NanobotTui {
|
||||
if (this.host.hosted) {
|
||||
this.titleText.maxWidth = Math.max(8, this.renderer.width - 4)
|
||||
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()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user