mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(agent-manager): preserve promoted session worktree context (#10058)
* fix(agent-manager): preserve promoted session worktree context * fix(cli): guard worktree context outside instance scope
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { SystemPrompt } from "../../src/session/system"
|
||||
import { environmentDetails } from "../../src/kilocode/editor-context"
|
||||
import { ProviderTest } from "../fake/provider"
|
||||
|
||||
import PROMPT_ANTHROPIC from "../../src/session/prompt/anthropic.txt"
|
||||
@@ -125,3 +126,17 @@ describe("SystemPrompt.provider", () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe("environmentDetails", () => {
|
||||
test("includes cwd and worktree in dynamic context", () => {
|
||||
const result = environmentDetails({
|
||||
directory: "/repo/.kilo/worktrees/feature",
|
||||
worktree: "/repo/.kilo/worktrees/feature",
|
||||
activeFile: "src/app.ts",
|
||||
})
|
||||
|
||||
expect(result).toContain("Working directory: /repo/.kilo/worktrees/feature")
|
||||
expect(result).toContain("Workspace root folder: /repo/.kilo/worktrees/feature")
|
||||
expect(result).toContain("Active file: src/app.ts")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user