Skip to content

Commit e6db3db

Browse files
author
Theodore Li
committed
Fix lint
1 parent 7f91608 commit e6db3db

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

apps/sim/lib/workflows/custom-tools/operations.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,7 @@ export async function getCustomToolByIdOrTitle(params: {
165165
}) {
166166
const { identifier, userId, workspaceId } = params
167167

168-
const conditions = [
169-
or(eq(customTools.id, identifier), eq(customTools.title, identifier)),
170-
]
168+
const conditions = [or(eq(customTools.id, identifier), eq(customTools.title, identifier))]
171169

172170
if (workspaceId) {
173171
const workspaceTool = await db
@@ -181,9 +179,7 @@ export async function getCustomToolByIdOrTitle(params: {
181179
const legacyTool = await db
182180
.select()
183181
.from(customTools)
184-
.where(
185-
and(isNull(customTools.workspaceId), eq(customTools.userId, userId), ...conditions)
186-
)
182+
.where(and(isNull(customTools.workspaceId), eq(customTools.userId, userId), ...conditions))
187183
.limit(1)
188184
return legacyTool[0] || null
189185
}

apps/sim/tools/utils.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
} from '@/lib/core/security/input-validation.server'
66
import { getCustomToolByIdOrTitle } from '@/lib/workflows/custom-tools/operations'
77
import { isCustomTool } from '@/executor/constants'
8+
import type { CustomToolDefinition } from '@/hooks/queries/custom-tools'
89
import { extractErrorMessage } from '@/tools/error-extractors'
910
import { tools } from '@/tools/registry'
1011
import type { ToolConfig, ToolResponse } from '@/tools/types'
@@ -125,7 +126,7 @@ async function fetchCustomToolFromDB(
125126
return undefined
126127
}
127128

128-
const toolConfig = createToolConfig(customTool, customToolId)
129+
const toolConfig = createToolConfig(customTool as unknown as CustomToolDefinition, customToolId)
129130

130131
return {
131132
...toolConfig,

apps/sim/tools/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export function getTool(toolId: string, _workspaceId?: string): ToolConfig | und
295295

296296
// Helper function to create a tool config from a custom tool
297297
export function createToolConfig(
298-
customTool: { title: string; schema: any; code?: string },
298+
customTool: CustomToolDefinition,
299299
customToolId: string
300300
): ToolConfig {
301301
// Create a parameter schema from the custom tool schema

0 commit comments

Comments
 (0)