mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
fix(agent-manager): defer prompt focus until session exists
This commit is contained in:
@@ -33,7 +33,7 @@ describe("Agent Manager session restoration", () => {
|
||||
sessions: [{ id: "pending:one" }, { id: "session:two" }],
|
||||
isPending: (id) => id.startsWith("pending:"),
|
||||
select: (id, pending) => selected.push([id, pending]),
|
||||
create: () => undefined,
|
||||
create: () => "pending",
|
||||
}),
|
||||
).toBe("ready")
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ export function createFocusBridge(deps: {
|
||||
report()
|
||||
},
|
||||
focus: () => {
|
||||
deps.post("prompt")
|
||||
if (deps.restore() === "pending") return
|
||||
deps.post("prompt")
|
||||
deps.prompt.focus()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user