fix: P1 体验修复 — 隐藏空对话导出按钮 + 发送后自动滚动
- ConfigPanel: activeMessages 为空时隐藏导出按钮,减少界面噪音 - main.tsx: doSubmit 后 scrollIntoView 确保用户消息可见 Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3b7578ac91
commit
bcb89dc8b9
@@ -42,8 +42,10 @@ export function ConfigPanel({
|
||||
return (
|
||||
<div className="shrink-0 border-t border-border px-4 pt-2 pb-0 max-w-3xl mx-auto w-full">
|
||||
<div ref={configPanelRef} className="relative flex items-center gap-2">
|
||||
{/* Export button */}
|
||||
<ExportButton messages={activeMessages as Array<Record<string, unknown>>} />
|
||||
{/* Export button — hidden when no messages */}
|
||||
{activeMessages.length > 0 && (
|
||||
<ExportButton messages={activeMessages as Array<Record<string, unknown>>} />
|
||||
)}
|
||||
{/* Summary bar */}
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -251,6 +251,9 @@ function App() {
|
||||
},
|
||||
);
|
||||
|
||||
// Scroll to bottom after submitting so user message stays visible
|
||||
setTimeout(() => bottomRef.current?.scrollIntoView({ behavior: "smooth" }), 100);
|
||||
|
||||
if (currentThreadId && text) {
|
||||
const existingTitle = threads.find((t) => t.thread_id === currentThreadId)?.metadata?.title as string | undefined;
|
||||
applyThreadTitle(currentThreadId, text, activeMessages.length, existingTitle);
|
||||
|
||||
Reference in New Issue
Block a user