Skip to content

Commit b65f2b8

Browse files
fix(agents): classify expired thinking signatures
1 parent 4c3e241 commit b65f2b8

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

extensions/copilot/src/hooks-bridge.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createHooksBridge, type CopilotHooksConfig } from "./hooks-bridge.js";
44
describe("createHooksBridge", () => {
55
const hookBase = {
66
sessionId: "runtime-session",
7-
timestamp: 0,
7+
timestamp: new Date(0),
88
cwd: "/",
99
workingDirectory: "/",
1010
};

extensions/copilot/src/runtime.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function makeFake(options: FakeFactoryOptions = {}) {
8484

8585
const client: FakeClient = {
8686
id,
87-
copilotHome: clientOptions.copilotHome ?? "",
87+
copilotHome: clientOptions.baseDirectory ?? "",
8888
start: vi.fn(async () => undefined),
8989
stop: vi.fn(async () => {
9090
stops.push(id);
@@ -277,11 +277,11 @@ describe("createCopilotClientPool", () => {
277277
const sdkFactory = async (clientOptions: CopilotClientOptions) => {
278278
attempt += 1;
279279
if (attempt === 1) {
280-
throw new Error(`constructor failed for ${String(clientOptions.copilotHome)}`);
280+
throw new Error(`constructor failed for ${String(clientOptions.baseDirectory)}`);
281281
}
282282
return {
283283
id: attempt,
284-
copilotHome: clientOptions.copilotHome,
284+
copilotHome: clientOptions.baseDirectory,
285285
start: vi.fn(async () => undefined),
286286
stop: vi.fn(async () => []),
287287
createSession: vi.fn(async () => ({})),
@@ -454,7 +454,7 @@ describe("createCopilotClientPool", () => {
454454
expect(first.client).toBe(second.client);
455455
expect(first.key.copilotHome).toBe(normalizedHome);
456456
expect(second.key.copilotHome).toBe(normalizedHome);
457-
expect(String(sdk.ctorCalls[0]?.copilotHome)).toBe(normalizedHome);
457+
expect(String(sdk.ctorCalls[0]?.baseDirectory)).toBe(normalizedHome);
458458
} finally {
459459
Object.defineProperty(process, "platform", { configurable: true, value: originalPlatform });
460460
}
@@ -482,6 +482,6 @@ describe("createCopilotClientPool", () => {
482482
expect(first.key.copilotHome).toBe(normalizedHome);
483483
expect(second.key.copilotHome).toBe(normalizedHome);
484484
expect(sdk.ctorCalls.length).toBe(1);
485-
expect(String(sdk.ctorCalls[0]?.copilotHome)).toBe(normalizedHome);
485+
expect(String(sdk.ctorCalls[0]?.baseDirectory)).toBe(normalizedHome);
486486
});
487487
});

extensions/copilot/src/runtime.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface PoolKey {
2020

2121
export interface ClientCreateOptions extends Omit<
2222
CopilotClientOptions,
23-
"copilotHome" | "useLoggedInUser" | "gitHubToken"
23+
"baseDirectory" | "workingDirectory" | "useLoggedInUser" | "gitHubToken"
2424
> {
2525
readonly copilotHome: string;
2626
readonly useLoggedInUser?: boolean;
@@ -364,7 +364,7 @@ function normalizeClientCreateOptions(
364364
const { copilotHome: _copilotHome, ...clientOptions } = options;
365365
return {
366366
...clientOptions,
367-
copilotHome: normalizedCopilotHome,
367+
baseDirectory: normalizedCopilotHome,
368368
};
369369
}
370370

0 commit comments

Comments
 (0)