mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-04 02:01:48 +03:00
feat(runtime): add user-controlled turn recovery
This commit is contained in:
@@ -103,6 +103,24 @@ describe("ChatList", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("marks a conversation that needs recovery attention with a warning indicator", () => {
|
||||
render(
|
||||
<ChatList
|
||||
sessions={[session({ chatId: "recovery", title: "Interrupted task" })]}
|
||||
recoveryChatIds={["recovery"]}
|
||||
activeKey="websocket:other"
|
||||
onSelect={vi.fn()}
|
||||
onRequestDelete={vi.fn()}
|
||||
onTogglePin={vi.fn()}
|
||||
onRequestRename={vi.fn()}
|
||||
onToggleArchive={vi.fn()}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByRole("img", { name: "This conversation needs your attention" }))
|
||||
.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps handle columns intact inside grouped panes", () => {
|
||||
render(
|
||||
<ChatList
|
||||
@@ -151,6 +169,26 @@ describe("ChatList", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("shows the running indicator while a recovery continuation is active", () => {
|
||||
render(
|
||||
<ChatList
|
||||
sessions={[session({ chatId: "recovery", title: "Interrupted task" })]}
|
||||
runningChatIds={["recovery"]}
|
||||
recoveryChatIds={["recovery"]}
|
||||
activeKey="websocket:other"
|
||||
onSelect={vi.fn()}
|
||||
onRequestDelete={vi.fn()}
|
||||
onTogglePin={vi.fn()}
|
||||
onRequestRename={vi.fn()}
|
||||
onToggleArchive={vi.fn()}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByRole("img", { name: "Agent running" })).toBeInTheDocument();
|
||||
expect(screen.queryByRole("img", { name: "This conversation needs your attention" }))
|
||||
.not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps tab grouping out of drag protocols while exposing inactive panes as mention sources", () => {
|
||||
render(
|
||||
<ChatList
|
||||
|
||||
Reference in New Issue
Block a user