fix: Krea-Tags in Code-Blöcken nicht parsen, Git-Verhalten unabhängig von ToolChoice

- renderMarkdown: Code-Blöcke (<pre>, <code>) vor Krea-Regex schützen
  via Platzhalter-Swap, danach wiederherstellen
- SystemPromptBuilder: Git-Commit-Regeln nur an Workspace gebunden,
  nicht mehr an ToolChoice:any – eigener PromptBlock mit Label
- CSS: modal-width Variable, Krea-Modal width:max-content, minor tweaks
- TODO.md aktualisiert
This commit is contained in:
Meleki committed 2026-03-02 07:59:29 +01:00
1 parent 4bf500ad47
commit 754b2aa3e3
6 files changed
+53 -21

No files matched your search

+5 -4
View File
@@ -534,7 +534,7 @@
border-radius: var(--border-radius);
overflow: hidden;
width: 90vw;
max-width: 700px;
max-width: var(--modal-width);
max-height: 80vh;
display: flex;
flex-direction: column;
@@ -592,7 +592,7 @@
/* Command Output Modal */
.cmd-output-modal {
max-width: 800px;
max-width: var(--modal-width);
}
.cmd-output-meta {
@@ -671,15 +671,16 @@
/* Krea Image Modal */
.krea-modal {
width: max-content;
max-width: 90vw;
max-height: 90vh;
max-height: unset;
}
.krea-modal-body {
display: flex;
align-items: center;
justify-content: center;
padding: var(--box-spacing);
padding: var(--badge-spacing);
}
.krea-modal-image {
+1 -1
View File
@@ -16,7 +16,6 @@
border-radius: var(--border-radius);
overflow: hidden;
width: 90vw;
max-width: 1100px;
height: 80vh;
display: flex;
flex-direction: column;
@@ -60,6 +59,7 @@
overflow-y: auto;
background: var(--f1-bg);
flex-shrink: 0;
padding-block: var(--box-spacing);
}
.fe-sidebar-full {
+2 -1
View File
@@ -24,11 +24,12 @@
--box-padding: .75em 1em;
--box-spacing: 1.5em;
--input-padding: .45em .7em;
--button-padding: .45em .8em;
--button-padding: .5em .9em;
--badge-padding: .2em .6em;
--badge-spacing: .5em;
--menu-item-padding: .5em .75em;
--page-width: 900px;
--hover-filter: contrast(.9);
--transition-duration: .15s;
--modal-width: 700px;
}
+10
View File
@@ -11,6 +11,12 @@ marked.setOptions({ breaks: true, gfm: true });
function renderMarkdown(text) {
if (!text) return '';
var html = marked.parse(text.trim());
// Code-Blöcke (<pre>...<code>...</code>...</pre> und inline <code>...</code>) schützen
var codeBlocks = [];
html = html.replace(/<pre[\s>][\s\S]*?<\/pre>|<code[\s>][\s\S]*?<\/code>/gi, function(m) {
codeBlocks.push(m);
return '%%CODE' + (codeBlocks.length - 1) + '%%';
});
// [Krea: dateiname.png] → Inline-Thumbnail mit Klick für Vollbild
html = html.replace(/\[Krea:\s*([^\]]+)\]/g, function(match, filename) {
var fn = filename.trim();
@@ -21,6 +27,10 @@ function renderMarkdown(text) {
+ '<img class="krea-thumb" src="' + thumbUrl + '" alt="' + safeFn + '" loading="lazy">'
+ '</span>';
});
// Code-Blöcke wiederherstellen
html = html.replace(/%%CODE(\d+)%%/g, function(m, idx) {
return codeBlocks[parseInt(idx)];
});
return html;
}