Skip to content

Commit efe35d7

Browse files
authored
fix(variables): fix tag dropdown and cursor alignment in variables block (#3199)
1 parent 37d4b8a commit efe35d7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,10 @@ export async function POST(req: NextRequest) {
457457
content: message,
458458
timestamp: new Date().toISOString(),
459459
...(fileAttachments && fileAttachments.length > 0 && { fileAttachments }),
460-
...(Array.isArray(normalizedContexts) && normalizedContexts.length > 0 && {
461-
contexts: normalizedContexts,
462-
}),
460+
...(Array.isArray(normalizedContexts) &&
461+
normalizedContexts.length > 0 && {
462+
contexts: normalizedContexts,
463+
}),
463464
...(Array.isArray(normalizedContexts) &&
464465
normalizedContexts.length > 0 && {
465466
contentBlocks: [

apps/sim/lib/copilot/orchestrator/tool-executor/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ async function executeManageCustomTool(
264264
workspaceId != null
265265
? await db
266266
.delete(customTools)
267-
.where(and(eq(customTools.id, params.toolId), eq(customTools.workspaceId, workspaceId)))
267+
.where(
268+
and(eq(customTools.id, params.toolId), eq(customTools.workspaceId, workspaceId))
269+
)
268270
.returning({ id: customTools.id })
269271
: []
270272

apps/sim/stores/panel/copilot/store.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ function normalizeSelectedModelKey(selectedModel: string, models: AvailableModel
408408
if (matches.length === 0) return selectedModel
409409

410410
if (provider) {
411-
const sameProvider = matches.find((m) => m.provider === provider || m.id.startsWith(`${provider}/`))
411+
const sameProvider = matches.find(
412+
(m) => m.provider === provider || m.id.startsWith(`${provider}/`)
413+
)
412414
if (sameProvider) return sameProvider.id
413415
}
414416

0 commit comments

Comments
 (0)