fix(ux): improve interaction feedback and fix pre-tool text rendering
- Show pre-tool plainTextContent above ToolCallStatus (was silently dropped when hasThinking=false but plainText exists with tool_calls) - Pre-tool thinking bubble gets proper bg-muted bubble styling and isStreaming=false (thinking is complete once tool calls start) - handleRegenerate now sets concurrentStatus="generating" for consistent status bar feedback on regenerate - Remove dead setConcurrentStatus prop from ChatInput interface/usage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
60d131c5d0
commit
b27424e3a0
@@ -15,7 +15,6 @@ interface ChatInputProps {
|
||||
sourceLabel: string | null;
|
||||
setSourceLabel: (v: string | null) => void;
|
||||
concurrentStatus: "idle" | "generating" | "stopping" | "cancelling";
|
||||
setConcurrentStatus: (s: "idle" | "generating" | "stopping" | "cancelling") => void;
|
||||
onSubmit: (e: React.FormEvent) => void;
|
||||
onStop: () => void;
|
||||
onPaste: (e: React.ClipboardEvent) => void;
|
||||
|
||||
@@ -305,9 +305,9 @@ export function ChatMessages({
|
||||
|
||||
return (
|
||||
<div key={message.id ?? idx} className="flex flex-col gap-3">
|
||||
{hasThinking && hasToolCalls && (
|
||||
<div className="max-w-[85%]">
|
||||
<MessageBubble content={bubbleContent} role="ai" isStreaming={thread.isLoading && isLastAi} />
|
||||
{hasToolCalls && (plainTextContent || hasThinking) && (
|
||||
<div className="max-w-[85%] rounded-2xl rounded-bl-sm bg-muted text-foreground px-4 py-2.5 text-sm">
|
||||
<MessageBubble content={bubbleContent} role="ai" isStreaming={false} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -275,6 +275,7 @@ function App() {
|
||||
const lastHuman = humanMsgs[humanMsgs.length - 1];
|
||||
if (!lastHuman || thread.isLoading) return;
|
||||
|
||||
setConcurrentStatus("generating");
|
||||
const enabledTools =
|
||||
activeTools.size > 0
|
||||
? TOOL_GROUPS.filter((g) => activeTools.has(g.key)).flatMap((g) => [...g.tools])
|
||||
@@ -450,7 +451,6 @@ function App() {
|
||||
sourceLabel={sourceLabel}
|
||||
setSourceLabel={setSourceLabel}
|
||||
concurrentStatus={concurrentStatus}
|
||||
setConcurrentStatus={setConcurrentStatus}
|
||||
onSubmit={handleSubmit}
|
||||
onStop={handleStop}
|
||||
onPaste={handlePaste}
|
||||
|
||||
Reference in New Issue
Block a user