mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-04 10:11:46 +03:00
fix(tui): clarify interrupted task actions
This commit is contained in:
@@ -1050,6 +1050,8 @@ describe("NanobotTui layout", () => {
|
||||
await waitUntil(() => (app as unknown as { ready: boolean }).ready)
|
||||
await setup.renderOnce()
|
||||
expect(setup.captureCharFrame()).toContain("Task interrupted")
|
||||
expect(setup.captureCharFrame()).toContain("Tools will not replay automatically")
|
||||
expect(ui.status.plainText).toContain("continue or dismiss")
|
||||
expect(ui.activeTurn).toBe(false)
|
||||
expect(ui.composer.focused).toBe(true)
|
||||
|
||||
@@ -1085,6 +1087,19 @@ describe("NanobotTui layout", () => {
|
||||
expect(ui.activeTurn).toBe(false)
|
||||
expect(ui.composer.focused).toBe(true)
|
||||
|
||||
app.accept({
|
||||
event: "recovery_state",
|
||||
chat_id: "chat",
|
||||
status: "awaiting_user",
|
||||
recovery_id: "recovery-unavailable",
|
||||
can_continue: false,
|
||||
})
|
||||
await setup.renderOnce()
|
||||
const unavailableFrame = setup.captureCharFrame()
|
||||
expect(unavailableFrame).toContain("can’t be resumed safely")
|
||||
expect(unavailableFrame).not.toContain("Continue")
|
||||
expect(ui.status.plainText).toContain("dismiss to start a new message")
|
||||
|
||||
app.accept({
|
||||
event: "recovery_state",
|
||||
chat_id: "chat",
|
||||
|
||||
Reference in New Issue
Block a user