From 59768e34f4edd875e67a24c1e7e822c96fcdcfb1 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 30 May 2025 00:04:13 +0400 Subject: [PATCH] refac --- README.md | 2 +- src/lib/utils/index.ts | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 73a7dc4ae..2ad208c3f 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Want to learn more about Open WebUI's features? Check out our [Open WebUI docume - Warp • The intelligent terminal for developers + Warp • The intelligent terminal for developers diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 2e9785514..fce45bcd5 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -842,7 +842,7 @@ export const removeAllDetails = (content) => { export const processDetails = (content) => { content = removeDetails(content, ['reasoning', 'code_interpreter']); - // This regex matches
tags with type="tool_calls" and captures their attributes to convert them to tags + // This regex matches
tags with type="tool_calls" and captures their attributes to convert them to a string const detailsRegex = /]*)>([\s\S]*?)<\/details>/gis; const matches = content.match(detailsRegex); if (matches) { @@ -854,10 +854,7 @@ export const processDetails = (content) => { attributes[attributeMatch[1]] = attributeMatch[2]; } - content = content.replace( - match, - `` - ); + content = content.replace(match, `"${attributes.result}"`); } }