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
2 changes: 1 addition & 1 deletion ui/src/components/model-select/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const props = defineProps<{
const emit = defineEmits(['update:modelValue', 'change', 'submitModel'])
const modelValue = computed({
set: (item) => {
emit('change', item)
emit('update:modelValue', item)
},
get: () => {
Expand Down Expand Up @@ -127,7 +128,6 @@ const openCreateModel = (provider?: Provider, model_type?: string) => {
if (provider && provider.provider) {
createModelRef.value?.open(provider, model_type)
} else {
console.log(model_type)
selectProviderRef.value?.open(model_type)
}
}
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 code looks mostly regular, but here are some minor improvements:

  1. Avoid printing to the console unless necessary (console.log is fine for development purposes).
  2. Ensure that modelType being passed to selectProviderRef.open() has a meaningful value before calling it.

Overall, your function structure and logic appear to be correct with these adjustments. If you have more specific concerns or need further optimization for this particular implementation, feel free to ask!

Expand Down