add optional web search functionality with UI updates and backend integration

This commit is contained in:
2026-09-20 20:41:01 +02:00
parent abd5238252
commit 781f15b503
16 changed files with 603 additions and 41 deletions
+8
View File
@@ -1,3 +1,10 @@
import {normalizeSources} from "./webSearchService.js";
export function parseSources(value) {
try { return normalizeSources(typeof value === "string" ? JSON.parse(value) : value); }
catch { return []; }
}
export const retryStylePrompts = Object.freeze({
shorter: "Rewrite the assistant reply to be shorter and tighter while preserving its meaning.",
direct: "Rewrite the assistant reply to be more direct and less padded.",
@@ -34,6 +41,7 @@ export function formatChatMessage(row) {
id: row.id,
role: row.role,
content: row.content,
...(row.sources ? {sources: parseSources(row.sources)} : {}),
modelName: row.model_name || null,
retryVariants,
retryActiveIndex,