-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Details of workflow application #3785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,15 +172,15 @@ | |
| import { cloneDeep, set, groupBy } from 'lodash' | ||
| import NodeContainer from '@/workflow/common/NodeContainer.vue' | ||
| import type { FormInstance } from 'element-plus' | ||
| import { ref, computed, onMounted } from 'vue' | ||
| import { ref, computed, onMounted, inject } from 'vue' | ||
| import { isLastNode } from '@/workflow/common/data' | ||
| import AIModeParamSettingDialog from '@/views/application/component/AIModeParamSettingDialog.vue' | ||
| import { t } from '@/locales' | ||
| import ReasoningParamSettingDialog from '@/views/application/component/ReasoningParamSettingDialog.vue' | ||
| import McpServersDialog from '@/views/application/component/McpServersDialog.vue' | ||
| import { loadSharedApi } from '@/utils/dynamics-api/shared-api' | ||
| import { useRoute } from 'vue-router' | ||
|
|
||
| const getApplicationDetail = inject('getApplicationDetail') as any | ||
| const route = useRoute() | ||
|
|
||
| const { | ||
|
|
@@ -333,6 +333,8 @@ function submitMcpServersDialog(config: any) { | |
| } | ||
|
|
||
| onMounted(() => { | ||
| const application = getApplicationDetail() | ||
| console.log(application.value) | ||
| getSelectModel() | ||
| if (typeof props.nodeModel.properties.node_data?.is_result === 'undefined') { | ||
| if (isLastNode(props.nodeModel)) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippet has several areas that need checking and optimizing: 1. Injection of
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provided code has several improvements that could be made:
Type Annotation for
detail: It's better to explicitly annotate the type ofdetailvariable since it is being passed as a parameter toprovide.Consistent Use of Imports: Ensure all imports at the top of the file are consistent and properly imported.
Provide Function Proper Usage: Using
providecorrectly with an anonymous function should also be considered best practice.Code Readability Enhancements: Adding comments can improve readability, especially for larger functions or modules.
Here's an improved version of the code:
Key Improvements:
detail.loadSharedApi) that does not seem necessary here.providedfunction by passing an inline function instead of directly providingdetail.