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(() => { { searchConfig.enabled = v; saveSearchConfig() }" - @update:max-results="(v: number) => { searchConfig.maxResults = v; saveSearchConfig() }" - @update:rerank="(v: boolean) => { searchConfig.rerank = v; saveSearchConfig() }" /> + @update:enabled="(v: boolean) => { searchConfig.enabled = v; saveSearchConfig() }" /> { toolsConfig.python = v; saveToolsConfig() }" /> 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')" > + + + { - + + + + Some search engines failed: {{ warningSummary }} + { {{ source.snippet }} + + {{ toolCall.status === "pending" ? "Waiting for results…" : "No usable sources returned." }} + - - {{ toolCall.status === "pending" ? "Waiting for results…" : "No usable sources returned." }} - 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 @@ @@ -46,10 +16,8 @@ const openSettings = () => { - - - - + + - - - - Max results - - - - - - - {{ maxResults }} - - - - - - - - - - - Rerank - - - { openSettings(); close() }" - class="flex items-center gap-2 text-xs text-[var(--text-dim)] hover:text-[var(--text-primary)] transition-colors duration-150"> - - Setup reranking - - - - - - Rerank results - - - diff --git a/app/components/Settings/SystemAssistants.vue b/app/components/Settings/SystemAssistants.vue index 99b3e7a..e7f3bec 100644 --- a/app/components/Settings/SystemAssistants.vue +++ b/app/components/Settings/SystemAssistants.vue @@ -1,18 +1,14 @@ diff --git a/app/components/TooltipProvider.vue b/app/components/TooltipProvider.vue index 6615155..73340eb 100644 --- a/app/components/TooltipProvider.vue +++ b/app/components/TooltipProvider.vue @@ -1,7 +1,7 @@
+ + Some search engines failed: {{ warningSummary }} +
+ {{ toolCall.status === "pending" ? "Waiting for results…" : "No usable sources returned." }} +
- {{ toolCall.status === "pending" ? "Waiting for results…" : "No usable sources returned." }} -