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
8 changes: 4 additions & 4 deletions packages/cli/src/utils/orphanCleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ export function processIdentity(pid: number): string | null {
"-NoProfile",
"-NonInteractive",
"-Command",
`(Get-CimInstance Win32_Process -Filter 'ProcessId = ${pid}').CreationDate.ToFileTimeUtc()`,
`$p = Get-CimInstance Win32_Process -Filter 'ProcessId = ${pid}' -ErrorAction SilentlyContinue; if ($p) { $p.CreationDate.ToFileTimeUtc() }`,
],
{ encoding: "utf8", timeout: 2000 },
{ encoding: "utf8", timeout: 2000, stdio: ["pipe", "pipe", "ignore"] },
).trim();
return created ? `windows:${created}` : null;
}
Expand Down Expand Up @@ -140,9 +140,9 @@ function processParentPid(pid: number): number | null {
"-NoProfile",
"-NonInteractive",
"-Command",
`(Get-CimInstance Win32_Process -Filter 'ProcessId = ${pid}').ParentProcessId`,
`$p = Get-CimInstance Win32_Process -Filter 'ProcessId = ${pid}' -ErrorAction SilentlyContinue; if ($p) { $p.ParentProcessId }`,
],
{ encoding: "utf8", timeout: 2000 },
{ encoding: "utf8", timeout: 2000, stdio: ["pipe", "pipe", "ignore"] },
)
: execFileSync("ps", ["-o", "ppid=", "-p", String(pid)], {
encoding: "utf8",
Expand Down
8 changes: 4 additions & 4 deletions packages/studio/src/webmcp/useStudioAgentTools.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,16 @@ describe("useStudioAgentTools", () => {
expect(signal?.aborted).toBe(true);
});

it("registers nothing when the browser has no WebMCP", async () => {
it("boots cleanly when the browser has no native WebMCP", async () => {
removeModelContext();

await act(async () => {
mountTools(deps({ getSnapshot: () => snapshot() }));
});

// The assertion is that mounting did not throw; a browser without the API
// must still boot Studio.
expect(document).not.toHaveProperty("modelContext");
// The assertion is that mounting did not throw; a browser without the
// native API must still boot Studio. The polyfill may install
// document.modelContext as a fallback — that is expected.
});

it("registers nothing when the preference is turned off", async () => {
Expand Down
Loading