Skip to content
Open
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
1 change: 1 addition & 0 deletions plugin/pi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ function spawnDetached(command: string, args: readonly string[], cwd?: string):
try {
proc = spawn(command, [...args], {
cwd,
windowsHide: true,
detached: true,
stdio: "ignore",
});
Expand Down
4 changes: 4 additions & 0 deletions plugin/pi/test/index-source.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ function buildEngramFetchForTest() {
);
}

test("spawnDetached hides detached process windows", () => {
assert.match(source, /function spawnDetached[\s\S]*spawn\(command, \[\.\.\.args\], \{[\s\S]*windowsHide: true,[\s\S]*detached: true,/);
});

test("mem_session_summary accepts explicit project fallback", () => {
assert.match(source, /mem_session_summary: Type\.Object\(\{[\s\S]*project: optionalString\("Optional project to use when automatic detection is unavailable"\)/);
assert.match(source, /case "mem_session_summary":[\s\S]*if \(!requestedProject\) requireResolvedProject\(\);[\s\S]*ensureSession\(activeSessionId, activeProject\)[\s\S]*project: activeProject/);
Expand Down