mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Always surface a stopped default agent; acknowledge Run now
Activation card: a stopped default agent now always shows the card —
"is it running or just silent?" must never be ambiguous, especially
since automation prompts tag the default agent and go nowhere while
it's stopped. The delayed path still covers running-but-unresponsive.
Run now: the automation prompt is invisible in the timeline, so firing
one now toasts "Asked {agent} to fix the CI failures" / "…address the
review comments". (The prompts already mention the default agent — the
send path tags it on every message — so multi-agent chats route the
work to the default agent by construction.)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ed160c6869
commit
ab483ea93c
@@ -539,8 +539,14 @@ export function ChatDetail({
|
||||
hasObserver,
|
||||
latestOwnMessageNeedsAgent,
|
||||
]);
|
||||
// A stopped default agent always shows the card — "is it running, is it
|
||||
// silent?" must never be ambiguous. The delayed path still covers a
|
||||
// running-but-unresponsive agent.
|
||||
const defaultAgentInactive =
|
||||
defaultAgent != null && !isManagedAgentActive(defaultAgent);
|
||||
const shouldShowAgentActivationCard =
|
||||
latestOwnMessageNeedsAgent && (!hasObserver || showDelayedActivationCard);
|
||||
(defaultAgentInactive && latestVisibleMessage != null) ||
|
||||
(latestOwnMessageNeedsAgent && (!hasObserver || showDelayedActivationCard));
|
||||
const forceScrollSignature = latestVisibleMessageIsOwn
|
||||
? latestVisibleMessage.id
|
||||
: null;
|
||||
@@ -728,6 +734,7 @@ export function ChatDetail({
|
||||
</div>
|
||||
</div>
|
||||
<ChatWorkPanel
|
||||
agentName={defaultAgent?.name ?? "Fizz"}
|
||||
branch={workBranch}
|
||||
chatId={chat.id}
|
||||
isTurnActive={isChatTurnActive}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { toast } from "sonner";
|
||||
import {
|
||||
ChevronDown,
|
||||
CircleCheck,
|
||||
@@ -51,6 +52,7 @@ const RENUDGE_COOLDOWN_MS = 15 * 60_000;
|
||||
* chat's agent automatically (deduped per head sha / open-thread watermark).
|
||||
*/
|
||||
export function ChatWorkPanel({
|
||||
agentName = "Fizz",
|
||||
branch = null,
|
||||
chatId,
|
||||
isTurnActive = false,
|
||||
@@ -59,6 +61,8 @@ export function ChatWorkPanel({
|
||||
prHref,
|
||||
projectPath = null,
|
||||
}: {
|
||||
/** Default agent's display name — named in the automation feedback. */
|
||||
agentName?: string;
|
||||
/** Live branch from the agent's worktree/checkout activity, if any. */
|
||||
branch?: string | null;
|
||||
chatId: string;
|
||||
@@ -143,7 +147,9 @@ export function ChatWorkPanel({
|
||||
onAutomationPrompt(
|
||||
`CI is failing on ${effectiveHref} (${checks.failed} of ${checks.total} checks). Investigate the failures and push fixes until the checks pass.`,
|
||||
);
|
||||
}, [chatId, checks, effectiveHref, onAutomationPrompt, pr]);
|
||||
// The prompt itself is invisible in the timeline — acknowledge it.
|
||||
toast.success(`Asked ${agentName} to fix the CI failures`);
|
||||
}, [agentName, chatId, checks, effectiveHref, onAutomationPrompt, pr]);
|
||||
const sendCommentNudge = React.useCallback(() => {
|
||||
if (!onAutomationPrompt || !effectiveHref) {
|
||||
return;
|
||||
@@ -155,7 +161,8 @@ export function ChatWorkPanel({
|
||||
onAutomationPrompt(
|
||||
`There are unanswered review comments on ${effectiveHref}. Address each comment and its replies, push any needed changes, reply to the threads, and resolve every conversation that has been addressed.`,
|
||||
);
|
||||
}, [chatId, effectiveHref, onAutomationPrompt, openThreads]);
|
||||
toast.success(`Asked ${agentName} to address the review comments`);
|
||||
}, [agentName, chatId, effectiveHref, onAutomationPrompt, openThreads]);
|
||||
|
||||
// Automation: prompt the agent on CI failure / newly-open review threads.
|
||||
// Watermarks keep this to one nudge per failing sha and per rise in open
|
||||
|
||||
Reference in New Issue
Block a user