Skip to content
Draft
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface CreateAssistantMessageOptions {
content: string;
toolCalls?: Array<{ id: string; name: string; arguments: string }>;
reasoningText?: string;
copilotAnnotations?: unknown;
}

export interface CreateToolMessageOptions {
Expand Down Expand Up @@ -105,7 +106,7 @@ export function createModelCallFailureEvent(options: CreateModelCallFailureOptio
* Records the assistant's response content, including any tool calls it wants to make.
*/
export function createAssistantMessageEvent(options: CreateAssistantMessageOptions): AssistantMessageEvent {
const { turn, callId, content, toolCalls, reasoningText } = options;
const { turn, callId, content, toolCalls, reasoningText, copilotAnnotations } = options;

const formattedToolCalls: ToolCall[] | undefined = toolCalls?.map((tc, index) => ({
id: tc.id,
Expand All @@ -126,6 +127,7 @@ export function createAssistantMessageEvent(options: CreateAssistantMessageOptio
content,
tool_calls: formattedToolCalls,
reasoning_text: reasoningText,
copilot_annotations: copilotAnnotations,
},
};
}
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export interface AssistantMessageEvent {
content: string;
tool_calls?: ToolCall[];
reasoning_text?: string;
copilot_annotations?: unknown;
};
}

Expand Down