Skip to content
Merged
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
2 changes: 2 additions & 0 deletions extensions/positron-assistant/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ export function toLanguageModelChatMessage(turns: vscode.ChatContext['history'])
return acc + `\n\nSuggested text edits: ${JSON.stringify(content.edits)}\n\n`;
} else if (content instanceof vscode.ChatResponseAnchorPart) {
return acc + `\n\nAnchor: ${content.title ? `${content.title} ` : ''}${JSON.stringify(content.value2)}\n\n`;
} else if (content instanceof vscode.ChatResponseCommandButtonPart) {
return acc;
} else {
Comment on lines +338 to 340
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's worth supporting the other part types we don't currently list here?

/**
* Represents the different chat response types.
*/
export type ChatResponsePart = ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart
| ChatResponseProgressPart | ChatResponseReferencePart | ChatResponseCommandButtonPart;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll open an issue for it. I'm not sure what those parts should look like so I didn't want to add any handling for it.

// TODO: Lower more history entry types to text.
throw new Error(`Unsupported response kind when lowering chat agent response: ${content.constructor.name}`);
Expand Down
Loading