Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/agent-manager-history-switch-queue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Prevent overlapping Agent Manager history activations from leaving stale project-switch state.
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ const AgentManagerContent: Component = () => {
}
const openHistory = (pid?: string) => {
const scoped = pid !== undefined && multiProject()
if (scoped) setHistorySwitches((prev) => (prev.includes(pid) ? prev : [...prev, pid]))
if (scoped && (currentProjectId() !== pid || historySwitches().length > 0))
setHistorySwitches((prev) => (prev.includes(pid) ? prev : [...prev, pid]))
setHistoryProject(scoped ? pid : undefined)
setHistory(true)
if (scoped) {
// Activating the target project first lets the shared session store and
// the pick routing operate in that project only.
// Activate the target so the session store and pick routing use that project.
vscode.postMessage({
type: "agentManager.activateSelection",
target: { projectId: pid, kind: "local" },
Expand Down
Loading