fix: Parameter setting page optimization#3115
Merged
wangdan-fit2cloud merged 1 commit intomainfrom May 20, 2025
Merged
Conversation
| // } | ||
| noReferencesform.value = { | ||
| ai_questioning: defaultValue['ai_questioning'], | ||
| designated_answer: defaultValue['designated_answer'] |
Contributor
There was a problem hiding this comment.
The code is mostly correct, but there are a few minor issues and improvements that can be made:
- The comments added to hide default values when
dialogVisibleis false are unnecessary and could cause confusion. - Consider removing or commenting out the commented-out lines with default values, unless they serve some specific purpose (e.g., debugging).
- Ensure all necessary dependencies like
v-loading,refs, and$tare properly imported and defined. - The rest of the logic appears to be correctly implemented.
Here's a slightly optimized version of the relevant part:
watch(dialogVisible, (bool) => {
if (!bool) {
form.value.dataset_setting = {
search_mode: 'embedding',
top_n: 3,
similarity: 0.6,
max_paragraph_char_number: 5000,
no_references_setting: {
status: 'ai_questioning',
value: '{question}'
}
};
noReferencesform.value.ai_questioning = defaultValue['ai_questioning'];
noReferencesform.value.designated_answer = defaultValue['designated_answer'];
// Optionally, you might want to reset any loading state here
loading.value = false;
} else {
// Initialize form with new defaults or load existing data
}
});If you have more complex initialization logic for noReferencesform, it would need to be included within the else block. Make sure to adjust based on your full application structure and requirements.
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it?
Summary of your change
Please indicate you've done the following: