fix(web): 聊天列表恢复项目符号,收紧定义列表,压思考条间距(BUG-962/963/964)
This commit is contained in:
@@ -163,6 +163,10 @@
|
||||
--space-12: 48px;
|
||||
--space-16: 64px;
|
||||
--space-24: 96px;
|
||||
/* Gap between the thinking bar and the answer body. Both stacked paths
|
||||
(timeline report and stage-and-answer) must use this token — do not
|
||||
write a second value on either (BUG-964). */
|
||||
--consult-think-answer-gap: var(--space-3);
|
||||
--composer-reserve: 124px;
|
||||
--ease-out: cubic-bezier(.22, 1, .36, 1);
|
||||
/* The personal report's paper surface. Declared here so the dark blocks can
|
||||
@@ -556,7 +560,7 @@ button:disabled { cursor: default; opacity: .45; }
|
||||
.agent-thinking-panel + .message-answer { margin-top: var(--space-2); }
|
||||
.message-stage-and-answer {
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
gap: var(--consult-think-answer-gap);
|
||||
}
|
||||
.message-stage-and-answer .agent-thinking-panel,
|
||||
.message-stage-and-answer .agent-activity-status {
|
||||
@@ -1196,7 +1200,7 @@ button:disabled { cursor: default; opacity: .45; }
|
||||
}
|
||||
.consultation-thinking-report {
|
||||
display: grid;
|
||||
gap: var(--space-6);
|
||||
gap: var(--consult-think-answer-gap);
|
||||
}
|
||||
.consultation-report-analysis {
|
||||
min-width: 0;
|
||||
@@ -1340,6 +1344,15 @@ button:disabled { cursor: default; opacity: .45; }
|
||||
margin: var(--space-3) 0 var(--space-5);
|
||||
padding-inline-start: 1.35em;
|
||||
}
|
||||
.message-markdown ul.markdown-list {
|
||||
list-style-type: disc;
|
||||
}
|
||||
.message-markdown ol.markdown-list {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
.message-markdown .markdown-list ::marker {
|
||||
color: var(--color-ink-secondary);
|
||||
}
|
||||
.message-markdown .markdown-list > li {
|
||||
padding-block: 0;
|
||||
padding-inline-start: 6px;
|
||||
@@ -2343,7 +2356,7 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
|
||||
}
|
||||
|
||||
.conversation:not(.is-empty):not(.is-rectification) .message-markdown .markdown-list {
|
||||
gap: var(--space-4);
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.conversation:not(.is-empty):not(.is-rectification) .markdown-table {
|
||||
@@ -2355,6 +2368,10 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
|
||||
margin: var(--space-8) 0 var(--space-3);
|
||||
}
|
||||
|
||||
.conversation:not(.is-empty):not(.is-rectification) .message-markdown > *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.conversation:not(.is-empty):not(.is-rectification) .message-markdown h2 {
|
||||
font-size: var(--type-title-lg);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
const FENCE = /(```[\s\S]*?```)/;
|
||||
const DEFINITION_LINE = /^(.{2,80}?)[::](.+)$/u;
|
||||
const SENTENCE_END = /[。!?;!?;]/u;
|
||||
const BODY_MAX_CHARS = 40;
|
||||
|
||||
function isSkippableLine(line: string): boolean {
|
||||
return /^(#{1,6}\s|>\s|[-*+]\s|\d+[.)]\s|\|)/.test(line) || line.startsWith("```");
|
||||
}
|
||||
|
||||
function isSingleSentence(text: string): boolean {
|
||||
return !SENTENCE_END.test(text.replace(/[。!?;!?;]$/u, ""));
|
||||
}
|
||||
|
||||
function isDefinitionLine(block: string): boolean {
|
||||
const trimmed = block.trim();
|
||||
if (!trimmed || trimmed.includes("\n") || isSkippableLine(trimmed)) return false;
|
||||
const match = DEFINITION_LINE.exec(trimmed);
|
||||
if (!match) return false;
|
||||
const term = match[1]?.trim() ?? "";
|
||||
const body = match[2]?.trim() ?? "";
|
||||
return body.length >= 4;
|
||||
if (body.length < 4 || body.length > BODY_MAX_CHARS) return false;
|
||||
if (SENTENCE_END.test(term)) return false;
|
||||
return isSingleSentence(body);
|
||||
}
|
||||
|
||||
function toListItem(block: string): string {
|
||||
|
||||
Reference in New Issue
Block a user