disable copilot response validation

This commit is contained in:
ramnique 2025-01-28 07:50:39 +05:30
parent b53e485404
commit ece9ed730d

View file

@ -523,7 +523,8 @@ export async function getCopilotResponse(
content: json.response.replace(/^```json\n/, '').replace(/\n```$/, ''), content: json.response.replace(/^```json\n/, '').replace(/\n```$/, ''),
}); });
// assert that msg.content is a CopilotAssistantMessage /*
// validate response schema
assert(msg.role === 'assistant'); assert(msg.role === 'assistant');
if (msg.role === 'assistant') { if (msg.role === 'assistant') {
for (const part of msg.content.response) { for (const part of msg.content.response) {
@ -583,6 +584,7 @@ export async function getCopilotResponse(
} }
} }
} }
*/
return { return {
message: msg as z.infer<typeof CopilotAssistantMessage>, message: msg as z.infer<typeof CopilotAssistantMessage>,