From f26a375f3c41430a9ba8003895e456b3d2f0d65e Mon Sep 17 00:00:00 2001 From: waleed Date: Mon, 9 Mar 2026 20:59:46 -0700 Subject: [PATCH] chore: lint fixes --- apps/sim/lib/copilot/tools/server/table/user-table.ts | 3 +-- apps/sim/lib/copilot/tools/shared/schemas.ts | 4 +--- apps/sim/lib/core/config/feature-flags.ts | 6 +++--- apps/sim/lib/table/service.ts | 4 +--- apps/sim/tools/perplexity/chat.ts | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/apps/sim/lib/copilot/tools/server/table/user-table.ts b/apps/sim/lib/copilot/tools/server/table/user-table.ts index aed64e88ed..b598acc85c 100644 --- a/apps/sim/lib/copilot/tools/server/table/user-table.ts +++ b/apps/sim/lib/copilot/tools/server/table/user-table.ts @@ -548,8 +548,7 @@ export const userTableServerTool: BaseServerTool } else { return { success: false, - message: - 'Provide either "updates" array or "columnName" + "values" map', + message: 'Provide either "updates" array or "columnName" + "values" map', } } diff --git a/apps/sim/lib/copilot/tools/shared/schemas.ts b/apps/sim/lib/copilot/tools/shared/schemas.ts index f7bdc6171a..9cc672184d 100644 --- a/apps/sim/lib/copilot/tools/shared/schemas.ts +++ b/apps/sim/lib/copilot/tools/shared/schemas.ts @@ -137,9 +137,7 @@ export const UserTableArgsSchema = z.object({ rowId: z.string().optional(), data: z.record(z.any()).optional(), rows: z.array(z.record(z.any())).optional(), - updates: z - .array(z.object({ rowId: z.string(), data: z.record(z.any()) })) - .optional(), + updates: z.array(z.object({ rowId: z.string(), data: z.record(z.any()) })).optional(), rowIds: z.array(z.string()).optional(), values: z.record(z.any()).optional(), filter: z.any().optional(), diff --git a/apps/sim/lib/core/config/feature-flags.ts b/apps/sim/lib/core/config/feature-flags.ts index 6c7b0369f7..93d2db02ae 100644 --- a/apps/sim/lib/core/config/feature-flags.ts +++ b/apps/sim/lib/core/config/feature-flags.ts @@ -1,7 +1,7 @@ /** * Environment utility functions for consistent environment detection across the application */ -import { env, getEnv, isFalsy, isTruthy } from './env' +import { env, isFalsy, isTruthy } from './env' /** * Is the application running in production mode @@ -22,8 +22,8 @@ export const isTest = env.NODE_ENV === 'test' * Is this the hosted version of the application */ export const isHosted = true - // getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.sim.ai' || - // getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.staging.sim.ai' +// getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.sim.ai' || +// getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.staging.sim.ai' /** * Is billing enforcement enabled diff --git a/apps/sim/lib/table/service.ts b/apps/sim/lib/table/service.ts index 87fb57308a..88371637f7 100644 --- a/apps/sim/lib/table/service.ts +++ b/apps/sim/lib/table/service.ts @@ -1173,9 +1173,7 @@ export async function batchUpdateRows( } }) - logger.info( - `[${requestId}] Batch updated ${mergedUpdates.length} rows in table ${data.tableId}` - ) + logger.info(`[${requestId}] Batch updated ${mergedUpdates.length} rows in table ${data.tableId}`) return { affectedCount: mergedUpdates.length, diff --git a/apps/sim/tools/perplexity/chat.ts b/apps/sim/tools/perplexity/chat.ts index 28940e1b10..6455c39d06 100644 --- a/apps/sim/tools/perplexity/chat.ts +++ b/apps/sim/tools/perplexity/chat.ts @@ -109,7 +109,7 @@ export const chatTool: ToolConfig const inputTokens = usage.prompt_tokens const outputTokens = usage.completion_tokens - let tokenCost = + const tokenCost = (inputTokens * pricing.inputPerM) / 1_000_000 + (outputTokens * pricing.outputPerM) / 1_000_000 const requestFee = pricing.requestPer1K / 1000