Skip to content
Merged
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: 3 additions & 2 deletions src/examples/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ async function main() {
const __dirname = dirname(__filename);
const agentPath = join(__dirname, "agent.ts");

// Spawn the agent as a subprocess using tsx
const agentProcess = spawn("npx", ["tsx", agentPath], {
// Spawn the agent as a subprocess via npx (npx.cmd on Windows) using tsx
const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
const agentProcess = spawn(npxCmd, ["tsx", agentPath], {
stdio: ["pipe", "pipe", "inherit"],
});

Expand Down