Timothy Jaeryang Baek пре 4 месеци
родитељ
комит
59768e34f4
2 измењених фајлова са 3 додато и 6 уклоњено
  1. 1 1
      README.md
  2. 2 5
      src/lib/utils/index.ts

+ 1 - 1
README.md

@@ -83,7 +83,7 @@ Want to learn more about Open WebUI's features? Check out our [Open WebUI docume
       </a>
     </td>
     <td>
-      Warp • The intelligent terminal for developers
+      <a href="https://warp.dev/open-webui">Warp</a> • The intelligent terminal for developers
     </td>
   </tr>
 </table>

+ 2 - 5
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 <details> tags with type="tool_calls" and captures their attributes to convert them to <tool_calls> tags
+	// This regex matches <details> tags with type="tool_calls" and captures their attributes to convert them to a string
 	const detailsRegex = /<details\s+type="tool_calls"([^>]*)>([\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,
-				`<tool_calls name="${attributes.name}" result="${attributes.result}"/>`
-			);
+			content = content.replace(match, `"${attributes.result}"`);
 		}
 	}