Skip to content

Commit fc558a8

Browse files
committed
Lint + tests
1 parent c68cadf commit fc558a8

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

apps/sim/app/api/copilot/chat/route.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ describe('Copilot Chat API Route', () => {
226226
mode: 'agent',
227227
messageId: 'mock-uuid-1234-5678',
228228
depth: 0,
229+
chatId: 'chat-123',
229230
}),
230231
})
231232
)
@@ -289,6 +290,7 @@ describe('Copilot Chat API Route', () => {
289290
mode: 'agent',
290291
messageId: 'mock-uuid-1234-5678',
291292
depth: 0,
293+
chatId: 'chat-123',
292294
}),
293295
})
294296
)
@@ -341,6 +343,7 @@ describe('Copilot Chat API Route', () => {
341343
mode: 'agent',
342344
messageId: 'mock-uuid-1234-5678',
343345
depth: 0,
346+
chatId: 'chat-123',
344347
}),
345348
})
346349
)
@@ -430,6 +433,7 @@ describe('Copilot Chat API Route', () => {
430433
mode: 'ask',
431434
messageId: 'mock-uuid-1234-5678',
432435
depth: 0,
436+
chatId: 'chat-123',
433437
}),
434438
})
435439
)

apps/sim/app/api/copilot/chat/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,13 @@ export async function POST(req: NextRequest) {
372372
streamToolCalls: true,
373373
mode: mode,
374374
messageId: userMessageIdToUse,
375-
chatId: actualChatId,
376375
...(providerConfig ? { provider: providerConfig } : {}),
377376
...(effectiveConversationId ? { conversationId: effectiveConversationId } : {}),
378377
...(typeof effectiveDepth === 'number' ? { depth: effectiveDepth } : {}),
379378
...(typeof effectivePrefetch === 'boolean' ? { prefetch: effectivePrefetch } : {}),
380379
...(session?.user?.name && { userName: session.user.name }),
381380
...(agentContexts.length > 0 && { context: agentContexts }),
381+
...(actualChatId ? { chatId: actualChatId } : {}),
382382
}
383383

384384
try {

apps/sim/providers/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getCostMultiplier, isHosted } from '@/lib/environment'
1+
import { isHosted } from '@/lib/environment'
22
import { createLogger } from '@/lib/logs/console/logger'
33
import { anthropicProvider } from '@/providers/anthropic'
44
import { azureOpenAIProvider } from '@/providers/azure-openai'

0 commit comments

Comments
 (0)