Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/src/workflow/nodes/data-source-local-node/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ import { set } from 'lodash'
const NodeFormRef = ref()
const props = defineProps<{ nodeModel: any }>()

const file_type_list_options = ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV']
const file_type_list_options = ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV', 'MD']
const form = {
file_type_list: ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV'],
file_type_list: ['TXT', 'DOCX', 'PDF', 'HTML', 'XLS', 'XLSX', 'ZIP', 'CSV', 'MD'],
file_size_limit: 100,
file_count_limit: 50,
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code seems to have two main areas where changes could be made:

  1. File Type Options: The new option "MD" (Markdown) has been added to file_type_list_options, which is correct.
  2. Form Initializations: In the form object, 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 purposes

This ensures that the file_type_list reflects all available options while still initializing based on the previous logic.

Expand Down
Loading