Remove V avatar from chat panel
This commit is contained in:
@@ -1714,26 +1714,6 @@ export async function POST(request: Request) {
|
||||
temperature: 0.3,
|
||||
signal: clientSignal,
|
||||
});
|
||||
if (summary.text && summary.text.trim()) {
|
||||
assistantText += (assistantText ? "\n\n" : "") + summary.text;
|
||||
assistantTextSegments.push(summary.text);
|
||||
emit({ type: "text", text: summary.text });
|
||||
} else {
|
||||
// Gemini returned empty — fall back to a deterministic but
|
||||
// STRUCTURED build-health status (never a vague "didn't reach a
|
||||
// clean stopping point"). It states what happened, what broke,
|
||||
// and the next action, using the same signals as the telemetry
|
||||
// stop_reason.
|
||||
const fallback = buildHealthStatus({
|
||||
loopBreakReason,
|
||||
hitRoundCap: maxToolRounds > 0 && round >= maxToolRounds,
|
||||
lastError: extractLastToolFailure(messages),
|
||||
toolCount: assistantToolCalls.length,
|
||||
});
|
||||
assistantText += (assistantText ? "\n\n" : "") + fallback;
|
||||
assistantTextSegments.push(fallback);
|
||||
emit({ type: "text", text: fallback });
|
||||
}
|
||||
if (summary.thoughts) {
|
||||
assistantTimeline.push({
|
||||
kind: "thought",
|
||||
@@ -1741,6 +1721,24 @@ export async function POST(request: Request) {
|
||||
});
|
||||
emit({ type: "thinking", text: summary.thoughts });
|
||||
}
|
||||
|
||||
if (summary.text && summary.text.trim()) {
|
||||
assistantTimeline.push({ kind: "text", text: summary.text });
|
||||
assistantText += (assistantText ? "\n\n" : "") + summary.text;
|
||||
assistantTextSegments.push(summary.text);
|
||||
emit({ type: "text", text: summary.text });
|
||||
} else {
|
||||
const fallback = buildHealthStatus({
|
||||
loopBreakReason,
|
||||
hitRoundCap: maxToolRounds > 0 && round >= maxToolRounds,
|
||||
lastError: extractLastToolFailure(messages),
|
||||
toolCount: assistantToolCalls.length,
|
||||
});
|
||||
assistantTimeline.push({ kind: "text", text: fallback });
|
||||
assistantText += (assistantText ? "\n\n" : "") + fallback;
|
||||
assistantTextSegments.push(fallback);
|
||||
emit({ type: "text", text: fallback });
|
||||
}
|
||||
} catch {
|
||||
const fallback = buildHealthStatus({
|
||||
loopBreakReason,
|
||||
@@ -1773,7 +1771,12 @@ export async function POST(request: Request) {
|
||||
temperature: 0.3,
|
||||
signal: clientSignal,
|
||||
});
|
||||
if (finalSummary.thoughts) {
|
||||
assistantTimeline.push({ kind: "thought", text: finalSummary.thoughts });
|
||||
emit({ type: "thinking", text: finalSummary.thoughts });
|
||||
}
|
||||
if (finalSummary.text && finalSummary.text.trim()) {
|
||||
assistantTimeline.push({ kind: "text", text: finalSummary.text });
|
||||
assistantText +=
|
||||
(assistantText ? "\n\n" : "") + finalSummary.text;
|
||||
assistantTextSegments.push(finalSummary.text);
|
||||
|
||||
Reference in New Issue
Block a user