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
18 changes: 13 additions & 5 deletions dashboard/src/components/shared/ConfigItemRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@
></v-checkbox>
</div>

<v-select
<v-autocomplete
Comment thread
10knamesmore marked this conversation as resolved.
v-else-if="itemMeta?.type === 'list' && itemMeta?.options"
:model-value="modelValue"
@update:model-value="emitUpdate"
:items="getSelectItems(itemMeta)"
@update:model-value="val => { emitUpdate(val); listSearchText = '' }"
v-model:search="listSearchText"
Comment thread
10knamesmore marked this conversation as resolved.
:items="listSelectItems"
item-title="title"
item-value="value"
:disabled="itemMeta?.readonly"
Expand All @@ -101,7 +102,7 @@
hide-details
chips
multiple
></v-select>
></v-autocomplete>

<v-select
v-else-if="itemMeta?.options"
Expand Down Expand Up @@ -238,10 +239,11 @@ import PersonaSelector from './PersonaSelector.vue'
import KnowledgeBaseSelector from './KnowledgeBaseSelector.vue'
import PluginSetSelector from './PluginSetSelector.vue'
import T2ITemplateEditor from './T2ITemplateEditor.vue'
import { ref } from 'vue'
import { computed, ref } from 'vue'
import { useI18n, useModuleI18n } from '@/i18n/composables'

const numericTemp = ref(null)
const listSearchText = ref('')

const props = defineProps({
modelValue: {
Expand Down Expand Up @@ -278,6 +280,12 @@ function emitUpdate(val) {
emit('update:modelValue', val)
}

const listSelectItems = computed(() =>
props.itemMeta?.type === 'list' && props.itemMeta?.options
? getSelectItems(props.itemMeta)
: []
)

function toNumber(val) {
const n = parseFloat(val)
return isNaN(n) ? 0 : n
Expand Down
Loading