diff --git a/app/components/ChatInput.vue b/app/components/ChatInput.vue index d7a4744..bdee850 100644 --- a/app/components/ChatInput.vue +++ b/app/components/ChatInput.vue @@ -46,8 +46,6 @@ const props = defineProps<{ const searchConfig = ref({ enabled: props.agent?.config?.search?.enabled ?? false, - maxResults: props.agent?.config?.search?.maxResults ?? 10, - rerank: props.agent?.config?.search?.rerank ?? false, }); const toolsConfig = ref({ @@ -57,8 +55,6 @@ const toolsConfig = ref({ watch(() => props.agent?.config?.search, (val) => { searchConfig.value = { enabled: val?.enabled ?? false, - maxResults: val?.maxResults ?? 10, - rerank: val?.rerank ?? false, }; }, { deep: true }); @@ -79,8 +75,6 @@ const saveAgentConfig = async (partial: { ...(partial.search !== undefined ? { search: { enabled: partial.search.enabled, - maxResults: partial.search.maxResults, - rerank: partial.search.rerank, }, } : {}), ...(partial.tools !== undefined ? { @@ -414,10 +408,7 @@ onUnmounted(() => { + @update:enabled="(v: boolean) => { searchConfig.enabled = v; saveSearchConfig() }" /> diff --git a/app/components/Message/Agent/Tool/Search.vue b/app/components/Message/Agent/Tool/Search.vue index e727d00..07b9313 100644 --- a/app/components/Message/Agent/Tool/Search.vue +++ b/app/components/Message/Agent/Tool/Search.vue @@ -8,6 +8,7 @@ import { getFaviconUrl, parseToolValue, readSearchSources, + readSearchWarnings, } from "~/utils/tool-rendering"; const props = defineProps<{ @@ -19,7 +20,10 @@ const emit = defineEmits<{ retry: []; }>(); -const sources = computed(() => readSearchSources(parseToolValue(props.toolCall.output))); +const output = computed(() => parseToolValue(props.toolCall.output)); +const sources = computed(() => readSearchSources(output.value)); +const warnings = computed(() => readSearchWarnings(output.value)); +const warningSummary = computed(() => warnings.value.map(warning => `${warning.engine}: ${warning.reason}`).join("; ")); const query = computed(() => { const input = parseToolValue(props.toolCall.input); @@ -103,6 +107,17 @@ const customTab = computed(() => { @retry="emit('retry')" > diff --git a/app/components/SearchSelector.vue b/app/components/SearchSelector.vue index 630d819..2bf4d3e 100644 --- a/app/components/SearchSelector.vue +++ b/app/components/SearchSelector.vue @@ -1,39 +1,9 @@ -