-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: Create application orchestration, select the knowledge base Q&A assistant template, and when publishing, the knowledge base retrieval node prompts to set parameters #3983
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 |
|---|---|---|
|
|
@@ -217,6 +217,9 @@ const validate = () => { | |
| onMounted(() => { | ||
| // console.log(props.nodeModel.properties.node_data) | ||
| knowledgeList.value = props.nodeModel.properties.node_data.knowledge_list | ||
| form_data.value.show_knowledge = form_data.value.show_knowledge | ||
| ? form_data.value.show_knowledge | ||
| : false | ||
| set(props.nodeModel, 'validate', validate) | ||
| }) | ||
| </script> | ||
|
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 looks mostly clean and performs its intended functions effectively. However, I have a few points for consideration:
These changes will make the code more robust and maintainable. |
||
|
|
||
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.
There are no irregularities or immediate issues with the provided code beyond minor syntax improvements and readability concerns. Here are some suggestions:
Optional Chaining for Default Value: Consider using optional chaining (
?.) to safely access nested properties before setting default values, though it's not necessary here sinceform_data.valueshould already be defined.Simplification of Conditional Logic: The conditional line can be simplified by removing unnecessary parentheses around the ternary operator condition.
Here’s an optimized version:
Key Points:
set(props.nodeModel, 'validate', validate)is called only once after initializing other related state.These changes make the code more readable and slightly cleaner while maintaining its functionality.