File tree Expand file tree Collapse file tree 7 files changed +17
-16
lines changed
Expand file tree Collapse file tree 7 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1- import { NextRequest , NextResponse } from 'next/server'
2- import { createLogger } from '@/lib/logs/console-logger'
1+ import { type NextRequest , NextResponse } from 'next/server'
32import { searchDocumentation } from '@/lib/copilot/service'
3+ import { createLogger } from '@/lib/logs/console-logger'
44
55const logger = createLogger ( 'DocsSearchAPI' )
66
@@ -34,4 +34,4 @@ export async function POST(request: NextRequest) {
3434 { status : 500 }
3535 )
3636 }
37- }
37+ }
Original file line number Diff line number Diff line change 1- import { NextRequest , NextResponse } from 'next/server'
1+ import { type NextRequest , NextResponse } from 'next/server'
22import { createLogger } from '@/lib/logs/console-logger'
33import { useWorkflowYamlStore } from '@/stores/workflows/yaml/store'
44
@@ -21,7 +21,7 @@ export async function POST(request: NextRequest) {
2121 )
2222 }
2323
24- let metadata = undefined
24+ let metadata
2525 if ( includeMetadata ) {
2626 // Get additional workflow metadata if requested
2727 const workflowStore = yamlStore as any // Access internal state
@@ -33,9 +33,9 @@ export async function POST(request: NextRequest) {
3333 }
3434 }
3535
36- logger . info ( 'Successfully generated workflow YAML' , {
37- includeMetadata,
38- yamlLength : yamlContent . length
36+ logger . info ( 'Successfully generated workflow YAML' , {
37+ includeMetadata,
38+ yamlLength : yamlContent . length ,
3939 } )
4040
4141 return NextResponse . json ( {
@@ -53,4 +53,4 @@ export async function POST(request: NextRequest) {
5353 { status : 500 }
5454 )
5555 }
56- }
56+ }
Original file line number Diff line number Diff line change @@ -441,7 +441,8 @@ export async function generateChatResponse(
441441 properties : {
442442 includeMetadata : {
443443 type : 'boolean' ,
444- description : 'Whether to include additional metadata about the workflow (default: false)' ,
444+ description :
445+ 'Whether to include additional metadata about the workflow (default: false)' ,
445446 default : false ,
446447 } ,
447448 } ,
Original file line number Diff line number Diff line change @@ -98,17 +98,17 @@ const getUserWorkflowTool: CopilotTool = {
9898 // Import the workflow YAML store dynamically to avoid import issues
9999 const { useWorkflowYamlStore } = await import ( '@/stores/workflows/yaml/store' )
100100 const { useWorkflowRegistry } = await import ( '@/stores/workflows/registry/store' )
101-
101+
102102 // Get the current workflow YAML
103103 const yamlContent = useWorkflowYamlStore . getState ( ) . getYaml ( )
104-
104+
105105 // Get additional metadata if requested
106106 let metadata = { }
107107 if ( includeMetadata ) {
108108 const registry = useWorkflowRegistry . getState ( )
109109 const activeWorkflowId = registry . activeWorkflowId
110110 const activeWorkflow = activeWorkflowId ? registry . workflows [ activeWorkflowId ] : null
111-
111+
112112 if ( activeWorkflow ) {
113113 metadata = {
114114 workflowId : activeWorkflowId ,
Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ export const docsSearchTool: ToolConfig = {
3232 } ) ,
3333 isInternalRoute : true ,
3434 } ,
35- }
35+ }
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { useCustomToolsStore } from '@/stores/custom-tools/store'
44import { useEnvironmentStore } from '@/stores/settings/environment/store'
55import { docsSearchTool } from './docs/search'
66import { tools } from './registry'
7- import { getUserWorkflowTool } from './workflow/get-yaml'
87import type { TableRow , ToolConfig , ToolResponse } from './types'
8+ import { getUserWorkflowTool } from './workflow/get-yaml'
99
1010const logger = createLogger ( 'ToolsUtils' )
1111
Original file line number Diff line number Diff line change @@ -26,4 +26,4 @@ export const getUserWorkflowTool: ToolConfig = {
2626 } ) ,
2727 isInternalRoute : true ,
2828 } ,
29- }
29+ }
You can’t perform that action at this time.
0 commit comments