feat(agents): add separate chat and code font settings (#6395)

Settings > Agents > Chat gets Font and Code Font groups like Terminal's: chat text and code each take a family, a fallback and a size. Defaults follow the interface font and the built-in code font, so nothing changes until a choice is made. Chat zoom steps on top of the chosen size, and a chosen code size also applies to fenced code blocks while inline code stays with the chat text.

Co-authored-by: happut <[email protected]>
Цей коміт міститься в:
wangfeiтаhapput authored and GitHub committed 2026-11-27 16:07:51 +08:00
1 джерело 924bf6d3b9
коміт a6d135d66f
13 files changed
+441 -31

No files matched your search

+14 -11
Переглянути файл
@@ -11,7 +11,8 @@
grid-template-columns: minmax(0, 1fr);
background: var(--bg-app);
color: var(--fg);
font-size: var(--fs-ui);
font-family: var(--agent-font-ui, var(--font-ui));
font-size: var(--agent-fs-ui);
}
.conversation {
@@ -523,7 +524,7 @@
transform: translateX(0);
}
.markdown :global(code) {
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
border-radius: var(--radius-small);
background: var(--md-code-bg);
@@ -543,6 +544,8 @@
display: block;
background: none;
box-shadow: none;
/* A chosen code size wins over the chat-derived one; inline code stays with the chat. */
font-size: var(--agent-fs-code-chosen, var(--agent-fs-small, var(--fs-small)));
}
.codeBlock {
position: relative;
@@ -635,7 +638,7 @@
border-radius: var(--radius-small);
background: var(--bg-elev);
color: var(--danger);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
text-align: left;
white-space: pre-wrap;
@@ -939,7 +942,7 @@
border-radius: var(--radius-small);
border: 1px solid var(--border);
background: var(--bg-elev);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
white-space: pre-wrap;
overflow-wrap: anywhere;
@@ -1006,7 +1009,7 @@
border-radius: var(--radius-small);
background: var(--bg-editor);
color: var(--fg);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-code, var(--fs-code));
line-height: calc(var(--lh-code) + var(--agent-font-zoom, 0px) * 1.6);
white-space: pre-wrap;
@@ -1045,7 +1048,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
}
.permissionDone {
@@ -1385,7 +1388,7 @@
.changeCommitHash {
flex: none;
color: var(--fg-subtle);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
}
.changeCommitSummary {
flex: 1 1 0;
@@ -1469,7 +1472,7 @@
.subagentActivity {
padding-left: 22px;
color: var(--fg-muted);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
white-space: nowrap;
overflow: hidden;
@@ -1769,7 +1772,7 @@
border: 1px solid var(--border);
border-radius: var(--radius-small);
background: var(--bg-editor);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-code, var(--fs-code));
}
.questionPreviewEmpty {
@@ -1949,7 +1952,7 @@
.exitCode {
flex: none;
color: var(--danger);
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
}
.terminalBlock {
@@ -1963,7 +1966,7 @@
.terminalOutput {
margin: 0;
padding: 6px 10px;
font-family: var(--font-mono);
font-family: var(--agent-font-code, var(--font-mono));
font-size: var(--agent-fs-small, var(--fs-small));
white-space: pre-wrap;
word-break: break-word;