diff --git a/api/agent-leads-sync.json b/api/agent-leads-sync.json index b3c06cc07..bdfd85638 100644 --- a/api/agent-leads-sync.json +++ b/api/agent-leads-sync.json @@ -1,6 +1,6 @@ { "agent": "V45_Leads_Sync", - "ts": "2026-04-22T11:00:04+02:00", + "ts": "2026-04-22T11:10:03+02:00", "paperclip_total": 48, "active_customer": 4, "warm_prospect": 5, diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index f415a4e6a..e91127c24 100644 --- a/api/v83-business-kpi-latest.json +++ b/api/v83-business-kpi-latest.json @@ -1,7 +1,7 @@ { "ok": true, "version": "V83-business-kpi", - "ts": "2026-04-22T09:09:57+00:00", + "ts": "2026-04-22T09:11:34+00:00", "summary": { "total_categories": 8, "total_kpis": 64, diff --git a/wevia.html b/wevia.html index c1e046cb0..1c17549cf 100644 --- a/wevia.html +++ b/wevia.html @@ -1475,6 +1475,35 @@ function send() { } } catch(eMermaid) { console.warn('[V5-MERMAID-RENDER]', eMermaid); } // === END AMBRE-V5-MERMAID-RENDER === + // V169 code-artifact-preview ยท detect code blocks + wrap
 + trigger artifact renderer
+                    try {
+                        if (currentChunkEl && fullResponse) {
+                            var _v169_codeRegex = /```(\w+)?\s*\n?([\s\S]+?)```/g;
+                            var _v169_match;
+                            var _v169_hasCode = false;
+                            var _v169_html = fullResponse;
+                            while ((_v169_match = _v169_codeRegex.exec(fullResponse)) !== null) {
+                                var _v169_lang = (_v169_match[1] || "text").toLowerCase();
+                                // Skip mermaid (autre Claude handle)
+                                if (_v169_lang === "mermaid") continue;
+                                _v169_hasCode = true;
+                                var _v169_code = _v169_match[2].trim();
+                                var _v169_escaped = _v169_code.replace(/&/g, "&").replace(//g, ">");
+                                var _v169_replacement = "
" + _v169_escaped + "
"; + _v169_html = _v169_html.replace(_v169_match[0], _v169_replacement); + } + if (_v169_hasCode) { + currentChunkEl.innerHTML = _v169_html; + // Trigger artifact renderer scan + setTimeout(function() { + if (typeof window.scanAndAddButtons === "function") { + window.scanAndAddButtons(); + } + }, 100); + } + } + } catch(_v169_err) { console.warn("V169 code-artifact-preview err:", _v169_err); } + // === END V169 code-artifact-preview === // Format final response with link if present if (currentChunkEl && finalFileUrl) { var _u = finalFileUrl; var linkHtml = fullResponse.split(_u).join(''+finalFileUrl+'');