diff --git a/apps/application/flow/common.py b/apps/application/flow/common.py index 1b8d674f0..65aaa399d 100644 --- a/apps/application/flow/common.py +++ b/apps/application/flow/common.py @@ -181,7 +181,7 @@ class Workflow: return [en.node for en in self.next_node_map.get(node_id, [])] @staticmethod - def new_instance(flow_obj: Dict, workflow_mode: WorkflowMode = WorkflowMode.APPLICATION.value): + def new_instance(flow_obj: Dict, workflow_mode: WorkflowMode = WorkflowMode.APPLICATION): nodes = flow_obj.get('nodes') edges = flow_obj.get('edges') nodes = [Node(node.get('id'), node.get('type'), **node) diff --git a/apps/application/flow/i_step_node.py b/apps/application/flow/i_step_node.py index c30491140..cfb656674 100644 --- a/apps/application/flow/i_step_node.py +++ b/apps/application/flow/i_step_node.py @@ -79,7 +79,7 @@ class WorkFlowPostHandler: message_tokens=message_tokens, answer_tokens=answer_tokens, answer_text_list=answer_text_list, - run_time=time.time() - workflow.context['start_time'], + run_time=time.time() - workflow.context.get('start_time') if workflow.context.get('start_time') is not None else 0, index=0) self.chat_info.append_chat_record(chat_record) diff --git a/ui/src/views/application-workflow/component/NodeContent.vue b/ui/src/components/dropdown_menu/application/NodeContent.vue similarity index 100% rename from ui/src/views/application-workflow/component/NodeContent.vue rename to ui/src/components/dropdown_menu/application/NodeContent.vue diff --git a/ui/src/views/application-workflow/component/DropdownMenu.vue b/ui/src/components/dropdown_menu/application/index.vue similarity index 100% rename from ui/src/views/application-workflow/component/DropdownMenu.vue rename to ui/src/components/dropdown_menu/application/index.vue diff --git a/ui/src/components/dropdown_menu/index.vue b/ui/src/components/dropdown_menu/index.vue new file mode 100644 index 000000000..9e39a09f0 --- /dev/null +++ b/ui/src/components/dropdown_menu/index.vue @@ -0,0 +1,26 @@ + + + diff --git a/ui/src/views/knowledge-workflow/component/NodeContent.vue b/ui/src/components/dropdown_menu/knowledge/NodeContent.vue similarity index 100% rename from ui/src/views/knowledge-workflow/component/NodeContent.vue rename to ui/src/components/dropdown_menu/knowledge/NodeContent.vue diff --git a/ui/src/views/knowledge-workflow/component/DropdownMenu.vue b/ui/src/components/dropdown_menu/knowledge/index.vue similarity index 100% rename from ui/src/views/knowledge-workflow/component/DropdownMenu.vue rename to ui/src/components/dropdown_menu/knowledge/index.vue diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue index 4ae39a391..6adc42522 100644 --- a/ui/src/views/application-workflow/index.vue +++ b/ui/src/views/application-workflow/index.vue @@ -145,7 +145,7 @@ import { ref, onMounted, onBeforeUnmount, computed, nextTick, provide } from 'vu import { useRouter, useRoute } from 'vue-router' import type { Action } from 'element-plus' import Workflow from '@/workflow/index.vue' -import DropdownMenu from '@/views/application-workflow/component/DropdownMenu.vue' +import DropdownMenu from '@/components/dropdown_menu/index.vue' import PublishHistory from '@/views/application-workflow/component/PublishHistory.vue' import { isAppIcon, resetUrl } from '@/utils/common' import { MsgSuccess, MsgError, MsgConfirm } from '@/utils/message' diff --git a/ui/src/views/knowledge-workflow/index.vue b/ui/src/views/knowledge-workflow/index.vue index 86172110b..cd802d10b 100644 --- a/ui/src/views/knowledge-workflow/index.vue +++ b/ui/src/views/knowledge-workflow/index.vue @@ -142,7 +142,7 @@ import { ref, onBeforeMount, onBeforeUnmount, computed, nextTick, provide } from import { useRouter, useRoute } from 'vue-router' import type { Action } from 'element-plus' import Workflow from '@/workflow/index.vue' -import DropdownMenu from '@/views/knowledge-workflow/component/DropdownMenu.vue' +import DropdownMenu from '@/components/dropdown_menu/index.vue' import PublishHistory from '@/views/knowledge-workflow/component/PublishHistory.vue' import { isAppIcon, resetUrl } from '@/utils/common' import { MsgSuccess, MsgError, MsgConfirm } from '@/utils/message' @@ -395,7 +395,6 @@ const clickShowDebug = () => { } DebugRef.value?.open(graphData, id) } catch (e: any) { - console.log(e) MsgError(e.toString()) } }) diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue index 726dc22bf..887d558a1 100644 --- a/ui/src/workflow/common/NodeContainer.vue +++ b/ui/src/workflow/common/NodeContainer.vue @@ -172,8 +172,7 @@