Remove floating Action Status Bar from chat UI
This commit is contained in:
@@ -1290,6 +1290,7 @@ export function ChatPanel({
|
|||||||
|
|
||||||
let assistantContent = "";
|
let assistantContent = "";
|
||||||
let lastKind = "";
|
let lastKind = "";
|
||||||
|
let currentThoughtText = "";
|
||||||
const assistantMsg: Message = { role: "assistant", content: "" };
|
const assistantMsg: Message = { role: "assistant", content: "" };
|
||||||
let msgIndex = -1;
|
let msgIndex = -1;
|
||||||
|
|
||||||
@@ -1434,6 +1435,16 @@ export function ChatPanel({
|
|||||||
});
|
});
|
||||||
} else if (ev.type === "thinking_delta" && ev.text) {
|
} else if (ev.type === "thinking_delta" && ev.text) {
|
||||||
lastKind = "thought";
|
lastKind = "thought";
|
||||||
|
currentThoughtText += ev.text;
|
||||||
|
|
||||||
|
// Extract the latest bold heading to display in the spinner label
|
||||||
|
const matches = [...currentThoughtText.matchAll(/\*\*([^*]+)\*\*/g)];
|
||||||
|
if (matches.length > 0) {
|
||||||
|
setCurrentPhaseLabel(matches[matches.length - 1][1].trim() + "...");
|
||||||
|
} else {
|
||||||
|
setCurrentPhaseLabel("Thinking...");
|
||||||
|
}
|
||||||
|
|
||||||
setMessages((prev) => {
|
setMessages((prev) => {
|
||||||
const next = [...prev];
|
const next = [...prev];
|
||||||
if (msgIndex >= 0 && next[msgIndex]) {
|
if (msgIndex >= 0 && next[msgIndex]) {
|
||||||
@@ -2090,32 +2101,7 @@ export function ChatPanel({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Action Status Bar anchored above composer */}
|
|
||||||
{sending && currentPhaseLabel && (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
gap: 8,
|
|
||||||
padding: "4px 8px 10px",
|
|
||||||
marginLeft: 4,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Loader2
|
|
||||||
className="animate-spin"
|
|
||||||
style={{ width: 14, height: 14, color: "#8b5cf6" }}
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
fontSize: "0.75rem",
|
|
||||||
fontWeight: 500,
|
|
||||||
color: "#71717a",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{currentPhaseLabel}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<ProjectPreviewChatInputWrap unifiedShell={unifiedProjectShell}>
|
<ProjectPreviewChatInputWrap unifiedShell={unifiedProjectShell}>
|
||||||
{(selectToggle) => (
|
{(selectToggle) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user