fix: The local file node of the knowledge base workflow supports MD f…#4487
Conversation
|
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-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| file_type_list: ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV', 'MD'], | ||
| file_size_limit: 100, | ||
| file_count_limit: 50, | ||
| } |
There was a problem hiding this comment.
The provided code seems to have two main areas where changes could be made:
- File Type Options: The new option "MD" (Markdown) has been added to
file_type_list_options, which is correct. - Form Initializations: In the
formobject, the initial values have not changed after adding the new file type, so they should remain consistent.
There are no apparent syntax errors or major issues with the current code. However, consider updating the documentation of what these options mean if it helps clarify their use in a larger system.
Here's a slight update to ensure consistency and maintain readability:
import { ref } from 'vue';
import { defineProps } from 'vue';
const NodeFormRef = ref();
const props = defineProps<{
nodeModel: any;
}>();
// Add MD file type to existing list
const file_type_list_options = ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV', 'MD'];
// Keeping existing default settings
const form = {
file_type_list: file_type_list_options.slice(0), // Ensure default types match the updated options list
file_size_limit: 100,
file_count_limit: 50,
};
console.log(form); // For checking purposesThis ensures that the file_type_list reflects all available options while still initializing based on the previous logic.
…ormat
What this PR does / why we need it?
Summary of your change
Please indicate you've done the following: