fix: crush whitespace in subagent markdown output using .subagent-compact.gadget-markdown overrides
This commit is contained in:
parent
d118497d83
commit
dd47212471
@ -200,7 +200,7 @@ function SubagentDisplay({ subagent }: { subagent: NonNullable<ChatTurnBlockTool
|
|||||||
<div>
|
<div>
|
||||||
<div className="text-xs text-text-muted font-mono mb-1">Thinking</div>
|
<div className="text-xs text-text-muted font-mono mb-1">Thinking</div>
|
||||||
<div
|
<div
|
||||||
className="p-2 bg-bg-secondary rounded text-xs text-text-muted whitespace-pre-wrap font-mono py-1"
|
className="subagent-compact gadget-markdown bg-bg-secondary rounded p-1.5 text-xs text-text-muted whitespace-pre-wrap font-mono"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: marked.parse(subagent.thinking) as string,
|
__html: marked.parse(subagent.thinking) as string,
|
||||||
}}
|
}}
|
||||||
@ -231,7 +231,7 @@ function SubagentDisplay({ subagent }: { subagent: NonNullable<ChatTurnBlockTool
|
|||||||
<div>
|
<div>
|
||||||
<div className="text-xs text-text-muted font-mono mb-1">Response</div>
|
<div className="text-xs text-text-muted font-mono mb-1">Response</div>
|
||||||
<div
|
<div
|
||||||
className="subagent-markdown gadget-markdown"
|
className="subagent-compact gadget-markdown"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: marked.parse(subagent.response) as string,
|
__html: marked.parse(subagent.response) as string,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -243,43 +243,61 @@ input, textarea {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Subagent Markdown Styles ── */
|
|
||||||
/* Handles cascading markdown nested inside markdown blocks */
|
|
||||||
.subagent-markdown {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100%;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subagent-markdown p {
|
|
||||||
margin-top: 0.25rem !important;
|
|
||||||
margin-bottom: 0.5rem !important;
|
|
||||||
padding-top: 0.25rem;
|
|
||||||
padding-bottom: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subagent-markdown pre {
|
|
||||||
margin-bottom: 0.5rem !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subagent-markdown ul,
|
|
||||||
.subagent-markdown ol {
|
|
||||||
margin-bottom: 0.5rem !important;
|
|
||||||
padding-left: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subagent-markdown code:not(pre code) {
|
|
||||||
background: #1a1a1a;
|
|
||||||
padding: 0.15rem 0.4rem;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subagent-markdown blockquote {
|
|
||||||
border-left-color: #2a2a2a;
|
|
||||||
background: #111111;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.gadget-markdown em {
|
.gadget-markdown em {
|
||||||
color: #c4c4c4;
|
color: #c4c4c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Subagent Compact Markdown ── */
|
||||||
|
/* Higher-specificity overrides (.subagent-compact.gadget-markdown > .gadget-markdown)
|
||||||
|
to crush the generous spacing that looks fine at top-level but explodes when nested. */
|
||||||
|
.subagent-compact.gadget-markdown {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown h1,
|
||||||
|
.subagent-compact.gadget-markdown h2,
|
||||||
|
.subagent-compact.gadget-markdown h3,
|
||||||
|
.subagent-compact.gadget-markdown h4,
|
||||||
|
.subagent-compact.gadget-markdown h5,
|
||||||
|
.subagent-compact.gadget-markdown h6 {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.35rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown pre {
|
||||||
|
margin-top: 0.35rem;
|
||||||
|
margin-bottom: 0.35rem;
|
||||||
|
padding: 0.5rem 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown ul,
|
||||||
|
.subagent-compact.gadget-markdown ol {
|
||||||
|
margin-bottom: 0.35rem;
|
||||||
|
padding-left: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown li {
|
||||||
|
margin-bottom: 0.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown blockquote {
|
||||||
|
margin-top: 0.25rem;
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
padding: 0.25rem 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown hr {
|
||||||
|
margin: 0.4rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subagent-compact.gadget-markdown table {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user