Lint + tests

This commit is contained in:
Siddharth Ganesan
2025-09-04 11:35:03 -07:00
parent c68cadfb84
commit fc558a8eef
3 changed files with 6 additions and 2 deletions

View File

@@ -226,6 +226,7 @@ describe('Copilot Chat API Route', () => {
mode: 'agent',
messageId: 'mock-uuid-1234-5678',
depth: 0,
chatId: 'chat-123',
}),
})
)
@@ -289,6 +290,7 @@ describe('Copilot Chat API Route', () => {
mode: 'agent',
messageId: 'mock-uuid-1234-5678',
depth: 0,
chatId: 'chat-123',
}),
})
)
@@ -341,6 +343,7 @@ describe('Copilot Chat API Route', () => {
mode: 'agent',
messageId: 'mock-uuid-1234-5678',
depth: 0,
chatId: 'chat-123',
}),
})
)
@@ -430,6 +433,7 @@ describe('Copilot Chat API Route', () => {
mode: 'ask',
messageId: 'mock-uuid-1234-5678',
depth: 0,
chatId: 'chat-123',
}),
})
)

View File

@@ -372,13 +372,13 @@ export async function POST(req: NextRequest) {
streamToolCalls: true,
mode: mode,
messageId: userMessageIdToUse,
chatId: actualChatId,
...(providerConfig ? { provider: providerConfig } : {}),
...(effectiveConversationId ? { conversationId: effectiveConversationId } : {}),
...(typeof effectiveDepth === 'number' ? { depth: effectiveDepth } : {}),
...(typeof effectivePrefetch === 'boolean' ? { prefetch: effectivePrefetch } : {}),
...(session?.user?.name && { userName: session.user.name }),
...(agentContexts.length > 0 && { context: agentContexts }),
...(actualChatId ? { chatId: actualChatId } : {}),
}
try {