From 9abb5fd217c72a7ee7630539b14b104e864a5e16 Mon Sep 17 00:00:00 2001 From: Meleki Date: Sat, 7 Mar 2026 22:42:20 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20esc()=20Quote-Escaping=20f=C3=BCr=20Attr?= =?UTF-8?q?ibut-Kontexte=20+=20cache=5Fcontrol=20f=C3=BCr=20Sub-Agents/Tel?= =?UTF-8?q?egram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - esc() um "→" Escaping erweitert (Bug: Anführungszeichen in value="..."-Attributen brachen HTML) - cache_control: ephemeral zu RunAgentChat() hinzugefügt (Preparer/Review/Finalizer hatten kein Prompt Caching) - cache_control: ephemeral zu ChatNonStreaming() hinzugefügt (Telegram hatte kein Prompt Caching) - Trailing-Leerzeile in commands-ui.js bereinigt --- Services/AnthropicService.cs | 2 ++ wwwroot/js/commands-ui.js | 1 - wwwroot/js/ui-helpers.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Services/AnthropicService.cs b/Services/AnthropicService.cs index f63b1a5..cd097fd 100644 --- a/Services/AnthropicService.cs +++ b/Services/AnthropicService.cs @@ -621,6 +621,7 @@ public class AnthropicService { ["model"] = modelId, ["max_tokens"] = 8192, + ["cache_control"] = new { type = "ephemeral" }, ["messages"] = messages, ["stream"] = false }; @@ -850,6 +851,7 @@ public class AnthropicService { ["model"] = ctx.ModelId, ["max_tokens"] = 16384, + ["cache_control"] = new { type = "ephemeral" }, ["messages"] = messages, ["stream"] = false }; diff --git a/wwwroot/js/commands-ui.js b/wwwroot/js/commands-ui.js index eb85f8c..8914a95 100644 --- a/wwwroot/js/commands-ui.js +++ b/wwwroot/js/commands-ui.js @@ -53,4 +53,3 @@ function loadCommandsIntoUI(container, customCommands) { } catch (e) { /* ignore parse errors */ } } - diff --git a/wwwroot/js/ui-helpers.js b/wwwroot/js/ui-helpers.js index f8c3638..53b1d86 100644 --- a/wwwroot/js/ui-helpers.js +++ b/wwwroot/js/ui-helpers.js @@ -7,7 +7,7 @@ const metaEl = () => $('#meta'); function esc(s) { const d = document.createElement('div'); d.textContent = s; - return d.innerHTML; + return d.innerHTML.replace(/"/g, '"'); } function truncate(s, max) {