summaryrefslogtreecommitdiff
path: root/frontend/src/components/Stage1.jsx
diff options
context:
space:
mode:
authorhaoyuren <13851610112@163.com>2026-02-12 12:45:24 -0600
committerhaoyuren <13851610112@163.com>2026-02-12 12:45:24 -0600
commitc8fae0256c91a0ebe495270aa15baa2f27211268 (patch)
treeefc908a9fb259a18809ab5151a15fc0f1e10fdf1 /frontend/src/components/Stage1.jsx
parent92e1fccb1bdcf1bab7221aa9ed90f9dc72529131 (diff)
Multi-turn conversation, stop generation, SSE fix, and UI improvements
- Multi-turn context: all council stages now receive conversation history (user messages + Stage 3 chairman responses) for coherent follow-ups - Stop generation: abort streaming mid-request, recover query to input box - SSE parsing: buffer-based chunking to prevent JSON split across packets - Atomic storage: user + assistant messages saved together after completion, preventing dangling messages on abort - GFM markdown: tables, strikethrough via remark-gfm plugin + table styles - Performance: memo user messages and completed assistant messages, only re-render the active streaming message - Model config: gpt-5.2, claude-opus-4.6 as chairman - Always show input box for multi-turn conversations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'frontend/src/components/Stage1.jsx')
-rw-r--r--frontend/src/components/Stage1.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/src/components/Stage1.jsx b/frontend/src/components/Stage1.jsx
index 071937c..7478876 100644
--- a/frontend/src/components/Stage1.jsx
+++ b/frontend/src/components/Stage1.jsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import ReactMarkdown from 'react-markdown';
+import remarkGfm from 'remark-gfm';
import './Stage1.css';
export default function Stage1({ responses }) {
@@ -28,7 +29,7 @@ export default function Stage1({ responses }) {
<div className="tab-content">
<div className="model-name">{responses[activeTab].model}</div>
<div className="response-text markdown-content">
- <ReactMarkdown>{responses[activeTab].response}</ReactMarkdown>
+ <ReactMarkdown remarkPlugins={[remarkGfm]}>{responses[activeTab].response}</ReactMarkdown>
</div>
</div>
</div>