Skip to content

Commit 6ca8311

Browse files
committed
Lint
1 parent 37c4f83 commit 6ca8311

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

apps/sim/app/api/tools/get-user-workflow/route.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { type NextRequest, NextResponse } from 'next/server'
33
import { createLogger } from '@/lib/logs/console-logger'
44
import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/db-helpers'
55
import { generateWorkflowYaml } from '@/lib/workflows/yaml-generator'
6+
import { getBlock } from '@/blocks'
67
import { db } from '@/db'
78
import { workflow as workflowTable } from '@/db/schema'
8-
import { getBlock } from '@/blocks'
99

1010
const logger = createLogger('GetUserWorkflowAPI')
1111

@@ -95,7 +95,7 @@ export async function POST(request: NextRequest) {
9595
Object.entries(workflowState.blocks).forEach(([blockId, blockState]) => {
9696
const block = blockState as any
9797
const blockConfig = getBlock(block.type)
98-
98+
9999
if (blockConfig) {
100100
blockSchemas[blockId] = {
101101
type: block.type,
@@ -142,17 +142,23 @@ export async function POST(request: NextRequest) {
142142
})
143143

144144
// Generate workflow summary
145-
const blockTypes = Object.values(workflowState.blocks).reduce((acc: Record<string, number>, block: any) => {
146-
acc[block.type] = (acc[block.type] || 0) + 1
147-
return acc
148-
}, {})
149-
150-
const categories = Object.values(blockSchemas).reduce((acc: Record<string, number>, schema: any) => {
151-
if (schema.category) {
152-
acc[schema.category] = (acc[schema.category] || 0) + 1
153-
}
154-
return acc
155-
}, {})
145+
const blockTypes = Object.values(workflowState.blocks).reduce(
146+
(acc: Record<string, number>, block: any) => {
147+
acc[block.type] = (acc[block.type] || 0) + 1
148+
return acc
149+
},
150+
{}
151+
)
152+
153+
const categories = Object.values(blockSchemas).reduce(
154+
(acc: Record<string, number>, schema: any) => {
155+
if (schema.category) {
156+
acc[schema.category] = (acc[schema.category] || 0) + 1
157+
}
158+
return acc
159+
},
160+
{}
161+
)
156162

157163
// Prepare response with clear context markers
158164
const response: any = {

apps/sim/lib/copilot/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export async function generateChatResponse(
432432
},
433433
{
434434
id: 'get_user_workflow',
435-
name: 'Get User\'s Specific Workflow',
435+
name: "Get User's Specific Workflow",
436436
description:
437437
'Get the user\'s current workflow - this shows ONLY the blocks they have actually built and configured in their specific workflow, not general Sim Studio capabilities. Use this when the user asks about "my workflow", "this workflow", wants to know what blocks they currently have, OR when they ask "How do I..." questions about their workflow so you can give specific, actionable advice based on their actual setup.',
438438
params: {},

apps/sim/tools/workflow/get-yaml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const getUserWorkflowTool: ToolConfig = {
44
id: 'get_user_workflow',
55
name: 'Get User Workflow',
66
description:
7-
'Get the current user\'s specific workflow (not general Sim Studio documentation). Returns YAML format showing only the blocks that the user has actually built in their workflow, with their specific configurations, inputs, and connections.',
7+
"Get the current user's specific workflow (not general Sim Studio documentation). Returns YAML format showing only the blocks that the user has actually built in their workflow, with their specific configurations, inputs, and connections.",
88
version: '1.0.0',
99

1010
params: {

0 commit comments

Comments
 (0)