-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(agent-manager): target new worktrees by project #12931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
marius-kilocode
merged 7 commits into
main
from
configure-agent-manager-project-selection
Aug 6, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fa99749
feat(agent-manager): target new worktrees by project
marius-kilocode d422267
fix(agent-manager): activate cross-project imports
marius-kilocode 38bff34
style(agent-manager): format visual story
marius-kilocode 6964024
fix(agent-manager): preserve cross-project activation
marius-kilocode 113df1a
fix(agent-manager): clear failed project activation
marius-kilocode 585c4e4
chore: update kilo-vscode visual regression baselines
kilo-maintainer[bot] 1a82635
Merge branch 'main' into configure-agent-manager-project-selection
marius-kilocode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "kilo-code": minor | ||
| --- | ||
|
|
||
| Let Agent Manager users choose the repository when creating or importing a worktree in multi-project mode. |
834 changes: 834 additions & 0 deletions
834
.kilo/plans/agent-manager-new-worktree-project-selector.md
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...visual-regression/agentmanager/new-worktree-project-dropdown-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/kilo-vscode/tests/unit/agent-manager-new-worktree-project.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { describe, expect, it } from "bun:test" | ||
| import { readdirSync, readFileSync } from "node:fs" | ||
| import { join } from "node:path" | ||
|
|
||
| const root = join(__dirname, "..", "..") | ||
| const dialog = readFileSync(join(root, "webview-ui", "agent-manager", "NewWorktreeDialog.tsx"), "utf8") | ||
| const app = readFileSync(join(root, "webview-ui", "agent-manager", "AgentManagerApp.tsx"), "utf8") | ||
| const importer = readFileSync(join(root, "src", "agent-manager", "worktree-importer.ts"), "utf8") | ||
| const css = readFileSync(join(root, "webview-ui", "agent-manager", "agent-manager.css"), "utf8") | ||
|
|
||
| describe("Agent Manager New Worktree project targeting", () => { | ||
| it("routes dialog operations through the selected project and rejects stale responses", () => { | ||
| expect(dialog).toContain("const [project, setProject]") | ||
| expect(dialog).toContain("if (ev.projectId !== project()) return") | ||
| expect(dialog).toContain('type: "agentManager.requestBranches", projectId: id') | ||
| expect(dialog).toContain('type: "agentManager.createMultiVersion"') | ||
| expect(dialog).toContain("projectId: target") | ||
| expect(dialog).toContain('type: "agentManager.importFromPR"') | ||
| expect(dialog).toContain('type: "agentManager.importFromBranch"') | ||
| }) | ||
|
|
||
| it("does not replace a pending cross-project activation", () => { | ||
| expect(app).toContain("if (pendingCreate()) return") | ||
| expect(app).toContain('msg.type === "agentManager.importResult"') | ||
| expect(app).toContain("!msg.success && pendingCreate()?.projectId === msg.projectId") | ||
| }) | ||
|
|
||
| it("tags branch and import responses with their owning project", () => { | ||
| expect(importer).toContain("async branches(projectId?: string)") | ||
| expect(importer).toContain('type: "agentManager.branches", projectId') | ||
| expect(importer).toContain('type: "agentManager.importResult", projectId') | ||
| expect(importer).toContain('type: "agentManager.worktreeSetup", projectId') | ||
| }) | ||
|
|
||
| it("keeps the project picker aligned with the dialog selector system", () => { | ||
| expect(css).toContain(".am-nv-project-inline") | ||
| expect(css).toContain(".am-project-option") | ||
| expect(css).toContain('[data-component="dialog"]:has(.am-nv-project-inline [data-component="popover-content"])') | ||
| }) | ||
|
|
||
| it("defines project labels in every Agent Manager locale", () => { | ||
| const keys = [ | ||
| "agentManager.dialog.project.select", | ||
| "agentManager.dialog.project.untrusted", | ||
| "agentManager.dialog.project.missing", | ||
| ] | ||
| const locales = readdirSync(join(root, "webview-ui", "agent-manager", "i18n")).filter((file) => | ||
| file.endsWith(".ts"), | ||
| ) | ||
|
|
||
| for (const file of locales) { | ||
| const source = readFileSync(join(root, "webview-ui", "agent-manager", "i18n", file), "utf8") | ||
| for (const key of keys) expect(source, `${file} is missing ${key}`).toContain(`"${key}"`) | ||
| } | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.