Skip to content

Commit 6c68bd1

Browse files
author
Nathan Young
committed
test: thread toolCallMetadata through mock adapters
Added the new TToolCallMetadata generic to BaseTextAdapter requires mock adapters in tests/test-utils.ts and tests/type-check.test.ts to include toolCallMetadata in their `~types` block.
1 parent 1ce6e29 commit 6c68bd1

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/typescript/ai/tests/test-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export function createMockAdapter(options: {
108108
document: undefined as unknown,
109109
},
110110
toolCapabilities: [] as ReadonlyArray<string>,
111+
toolCallMetadata: undefined as unknown,
111112
},
112113
chatStream: (opts: any) => {
113114
calls.push(opts)

packages/typescript/ai/tests/type-check.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const mockAdapter = {
3636
document: undefined as unknown,
3737
},
3838
toolCapabilities: [] as ReadonlyArray<string>,
39+
toolCallMetadata: undefined as unknown,
3940
},
4041
chatStream: async function* () {},
4142
structuredOutput: async () => ({ data: {}, rawText: '{}' }),

0 commit comments

Comments
 (0)