| @@ -70,21 +70,21 @@ const RagPipelineMain = ({ | |||
| ...configsMap, | |||
| }) | |||
| const { | |||
| hasNodeInspectVars, | |||
| hasSetInspectVar, | |||
| fetchInspectVarValue, | |||
| editInspectVarValue, | |||
| renameInspectVarName, | |||
| appendNodeInspectVars, | |||
| deleteInspectVar, | |||
| deleteNodeInspectorVars, | |||
| deleteAllInspectorVars, | |||
| isInspectVarEdited, | |||
| resetToLastRunVar, | |||
| invalidateSysVarValues, | |||
| resetConversationVar, | |||
| invalidateConversationVarValues, | |||
| } = useInspectVarsCrud() | |||
| hasNodeInspectVars, | |||
| hasSetInspectVar, | |||
| fetchInspectVarValue, | |||
| editInspectVarValue, | |||
| renameInspectVarName, | |||
| appendNodeInspectVars, | |||
| deleteInspectVar, | |||
| deleteNodeInspectorVars, | |||
| deleteAllInspectorVars, | |||
| isInspectVarEdited, | |||
| resetToLastRunVar, | |||
| invalidateSysVarValues, | |||
| resetConversationVar, | |||
| invalidateConversationVarValues, | |||
| } = useInspectVarsCrud() | |||
| const hooksStore = useMemo(() => { | |||
| return { | |||
| @@ -22,7 +22,7 @@ export const useDSL = () => { | |||
| const appDetail = useAppStore(s => s.appDetail) | |||
| const handleExportDSL = useCallback(async (include = false) => { | |||
| const handleExportDSL = useCallback(async (include = false, workflowId?: string) => { | |||
| if (!appDetail) | |||
| return | |||
| @@ -35,6 +35,7 @@ export const useDSL = () => { | |||
| const { data } = await exportAppConfig({ | |||
| appID: appDetail.id, | |||
| include, | |||
| workflowID: workflowId, | |||
| }) | |||
| const a = document.createElement('a') | |||
| const file = new Blob([data], { type: 'application/yaml' }) | |||
| @@ -48,7 +48,7 @@ export type CommonHooksFnMap = { | |||
| availableNodesMetaData?: AvailableNodesMetaData | |||
| getWorkflowRunAndTraceUrl: (runId?: string) => { runUrl: string; traceUrl: string } | |||
| exportCheck?: () => Promise<void> | |||
| handleExportDSL?: (include?: boolean) => Promise<void> | |||
| handleExportDSL?: (include?: boolean, flowId?: string) => Promise<void> | |||
| fetchInspectVars: (params: { passInVars?: boolean, vars?: VarInInspect[], passedInAllPluginInfoList?: Record<string, ToolWithProvider[]>, passedInSchemaTypeDefinitions?: SchemaTypeDefinition[] }) => Promise<void> | |||
| hasNodeInspectVars: (nodeId: string) => boolean | |||
| hasSetInspectVar: (nodeId: string, name: string, sysVars: VarInInspect[], conversationVars: VarInInspect[]) => boolean | |||
| @@ -120,7 +120,7 @@ export const VersionHistoryPanel = ({ | |||
| }) | |||
| break | |||
| case VersionHistoryContextMenuOptions.exportDSL: | |||
| handleExportDSL(false, item.id) | |||
| handleExportDSL?.(false, item.id) | |||
| break | |||
| } | |||
| }, [t, handleExportDSL]) | |||