Skip to content
Merged
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
7 changes: 4 additions & 3 deletions apps/sim/app/api/copilot/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,10 @@ export async function POST(req: NextRequest) {
content: message,
timestamp: new Date().toISOString(),
...(fileAttachments && fileAttachments.length > 0 && { fileAttachments }),
...(Array.isArray(normalizedContexts) && normalizedContexts.length > 0 && {
contexts: normalizedContexts,
}),
...(Array.isArray(normalizedContexts) &&
normalizedContexts.length > 0 && {
contexts: normalizedContexts,
}),
...(Array.isArray(normalizedContexts) &&
normalizedContexts.length > 0 && {
contentBlocks: [
Expand Down
4 changes: 3 additions & 1 deletion apps/sim/lib/copilot/orchestrator/tool-executor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ async function executeManageCustomTool(
workspaceId != null
? await db
.delete(customTools)
.where(and(eq(customTools.id, params.toolId), eq(customTools.workspaceId, workspaceId)))
.where(
and(eq(customTools.id, params.toolId), eq(customTools.workspaceId, workspaceId))
)
.returning({ id: customTools.id })
: []

Expand Down
4 changes: 3 additions & 1 deletion apps/sim/stores/panel/copilot/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ function normalizeSelectedModelKey(selectedModel: string, models: AvailableModel
if (matches.length === 0) return selectedModel

if (provider) {
const sameProvider = matches.find((m) => m.provider === provider || m.id.startsWith(`${provider}/`))
const sameProvider = matches.find(
(m) => m.provider === provider || m.id.startsWith(`${provider}/`)
)
if (sameProvider) return sameProvider.id
}

Expand Down