Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): bound provider command output #9291

ClosedLucenx9(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/9291/headopened View on GitHub

Showing 6 changed files with 56 additions and 22 deletions (loading 3).

x
0 of 6 viewed, 6 left
31 additions and 3 deletionsapps/server/src/provider/Layers/CursorProvider.test.tsModified
View file
@@ -93,7 +93,12 @@
return wrapperPath;
});
​
-const makeMockAgentWithAboutWrapper = Effect.fn("makeMockAgentWithAboutWrapper")(function* () {
+const makeMockAgentWithAboutWrapper = Effect.fn("makeMockAgentWithAboutWrapper")(function* (
+ aboutCommand = [
+ "printf 'CLI Version 2026.04.09-f2b0fcd\\n'",
+ "printf 'User Email cursor@example.com\\n'",
+ ].join("\n"),
+) {
const fileSystem = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
const mockAgentPath = yield* resolveMockAgentPath();
@@ -105,8 +110,7 @@
const mockAgentCommand = ["node", mockAgentPath].map((arg) => JSON.stringify(arg)).join(" ");
const script = `#!/bin/sh
if [ "$1" = "about" ]; then
- printf 'CLI Version 2026.04.09-f2b0fcd\\n'
- printf 'User Email cursor@example.com\\n'
+ ${aboutCommand}
exit 0
exec ${mockAgentCommand} "$@"
@@ -570,6 +574,30 @@
]);
await expect(runNode(waitForFileContent(requestLogPath))).resolves.toContain("initialize");
});