Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References

ToolPhaseCompleteInfo

Interface: ToolPhaseCompleteInfo

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:194

Aggregate information passed to onToolPhaseComplete after all tool calls in an iteration have been processed.

Properties

needsApproval

ts
needsApproval: object[];
needsApproval: object[];

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:205

Tools that need user approval

approvalId

ts
approvalId: string;
approvalId: string;

input

ts
input: unknown;
input: unknown;

toolCallId

ts
toolCallId: string;
toolCallId: string;

toolName

ts
toolName: string;
toolName: string;

needsClientExecution

ts
needsClientExecution: object[];
needsClientExecution: object[];

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:212

Tools that need client-side execution

input

ts
input: unknown;
input: unknown;

toolCallId

ts
toolCallId: string;
toolCallId: string;

toolName

ts
toolName: string;
toolName: string;

results

ts
results: object[];
results: object[];

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:198

Completed tool results

duration?

ts
optional duration: number;
optional duration: number;

result

ts
result: unknown;
result: unknown;

toolCallId

ts
toolCallId: string;
toolCallId: string;

toolName

ts
toolName: string;
toolName: string;

toolCalls

ts
toolCalls: ToolCall[];
toolCalls: ToolCall[];

Defined in: packages/typescript/ai/src/activities/chat/middleware/types.ts:196

Tool calls that were assigned to the assistant message