diff --git a/apps/sim/app/api/docs/search/route.ts b/apps/sim/app/api/docs/search/route.ts index c24b8e7924..d0b7fa60ba 100644 --- a/apps/sim/app/api/docs/search/route.ts +++ b/apps/sim/app/api/docs/search/route.ts @@ -1,6 +1,6 @@ -import { NextRequest, NextResponse } from 'next/server' -import { createLogger } from '@/lib/logs/console-logger' +import { type NextRequest, NextResponse } from 'next/server' import { searchDocumentation } from '@/lib/copilot/service' +import { createLogger } from '@/lib/logs/console-logger' const logger = createLogger('DocsSearchAPI') @@ -34,4 +34,4 @@ export async function POST(request: NextRequest) { { status: 500 } ) } -} \ No newline at end of file +} diff --git a/apps/sim/app/api/workflows/current/yaml/route.ts b/apps/sim/app/api/workflows/current/yaml/route.ts index 197f035112..f1996267aa 100644 --- a/apps/sim/app/api/workflows/current/yaml/route.ts +++ b/apps/sim/app/api/workflows/current/yaml/route.ts @@ -1,4 +1,4 @@ -import { NextRequest, NextResponse } from 'next/server' +import { type NextRequest, NextResponse } from 'next/server' import { createLogger } from '@/lib/logs/console-logger' import { useWorkflowYamlStore } from '@/stores/workflows/yaml/store' @@ -21,7 +21,7 @@ export async function POST(request: NextRequest) { ) } - let metadata = undefined + let metadata if (includeMetadata) { // Get additional workflow metadata if requested const workflowStore = yamlStore as any // Access internal state @@ -33,9 +33,9 @@ export async function POST(request: NextRequest) { } } - logger.info('Successfully generated workflow YAML', { - includeMetadata, - yamlLength: yamlContent.length + logger.info('Successfully generated workflow YAML', { + includeMetadata, + yamlLength: yamlContent.length, }) return NextResponse.json({ @@ -53,4 +53,4 @@ export async function POST(request: NextRequest) { { status: 500 } ) } -} \ No newline at end of file +} diff --git a/apps/sim/lib/copilot/service.ts b/apps/sim/lib/copilot/service.ts index f801439499..55576f32ba 100644 --- a/apps/sim/lib/copilot/service.ts +++ b/apps/sim/lib/copilot/service.ts @@ -441,7 +441,8 @@ export async function generateChatResponse( properties: { includeMetadata: { type: 'boolean', - description: 'Whether to include additional metadata about the workflow (default: false)', + description: + 'Whether to include additional metadata about the workflow (default: false)', default: false, }, }, diff --git a/apps/sim/lib/copilot/tools.ts b/apps/sim/lib/copilot/tools.ts index 2455a855b1..f7a87db4cb 100644 --- a/apps/sim/lib/copilot/tools.ts +++ b/apps/sim/lib/copilot/tools.ts @@ -98,17 +98,17 @@ const getUserWorkflowTool: CopilotTool = { // Import the workflow YAML store dynamically to avoid import issues const { useWorkflowYamlStore } = await import('@/stores/workflows/yaml/store') const { useWorkflowRegistry } = await import('@/stores/workflows/registry/store') - + // Get the current workflow YAML const yamlContent = useWorkflowYamlStore.getState().getYaml() - + // Get additional metadata if requested let metadata = {} if (includeMetadata) { const registry = useWorkflowRegistry.getState() const activeWorkflowId = registry.activeWorkflowId const activeWorkflow = activeWorkflowId ? registry.workflows[activeWorkflowId] : null - + if (activeWorkflow) { metadata = { workflowId: activeWorkflowId, diff --git a/apps/sim/tools/docs/search.ts b/apps/sim/tools/docs/search.ts index 99c746a6fb..aa62704f5f 100644 --- a/apps/sim/tools/docs/search.ts +++ b/apps/sim/tools/docs/search.ts @@ -32,4 +32,4 @@ export const docsSearchTool: ToolConfig = { }), isInternalRoute: true, }, -} \ No newline at end of file +} diff --git a/apps/sim/tools/utils.ts b/apps/sim/tools/utils.ts index d2df55b594..79c0374b23 100644 --- a/apps/sim/tools/utils.ts +++ b/apps/sim/tools/utils.ts @@ -4,8 +4,8 @@ import { useCustomToolsStore } from '@/stores/custom-tools/store' import { useEnvironmentStore } from '@/stores/settings/environment/store' import { docsSearchTool } from './docs/search' import { tools } from './registry' -import { getUserWorkflowTool } from './workflow/get-yaml' import type { TableRow, ToolConfig, ToolResponse } from './types' +import { getUserWorkflowTool } from './workflow/get-yaml' const logger = createLogger('ToolsUtils') diff --git a/apps/sim/tools/workflow/get-yaml.ts b/apps/sim/tools/workflow/get-yaml.ts index bc5c0b21c3..2b48b686f7 100644 --- a/apps/sim/tools/workflow/get-yaml.ts +++ b/apps/sim/tools/workflow/get-yaml.ts @@ -26,4 +26,4 @@ export const getUserWorkflowTool: ToolConfig = { }), isInternalRoute: true, }, -} \ No newline at end of file +}