@@ -300,6 +300,7 @@ import ThreadTerminalDrawer from "./ThreadTerminalDrawer";
300300import {
301301 AlarmClockIcon ,
302302 CheckCircle2Icon ,
303+ MessageCircleIcon ,
303304 PaperclipIcon ,
304305 ChevronDownIcon ,
305306 DownloadIcon ,
@@ -427,6 +428,7 @@ import {
427428 useThreadStatus ,
428429 useThreadHistory ,
429430 useThreadShell ,
431+ useChildThreadInputs ,
430432 useThreadRefs ,
431433 useThreadVisibleTurnItems ,
432434 waitForThreadShell ,
@@ -7414,6 +7416,42 @@ export default function ChatView(props: ChatViewProps) {
74147416 } ,
74157417 [ environmentId , navigate ] ,
74167418 ) ;
7419+ const childThreadInputs = useChildThreadInputs ( activeThreadRef ) ;
7420+ const childInputBannerItem = useMemo < ComposerBannerStackItem | null > ( ( ) => {
7421+ const first = childThreadInputs [ 0 ] ;
7422+ const parentAwaitingUser =
7423+ activePendingApproval || activePendingUserInput || activeThreadShell ?. hasPendingUserInput ;
7424+ if ( ! first || parentAwaitingUser ) return null ;
7425+ return {
7426+ id : `child-input:${ first . id } ` ,
7427+ variant : "info" ,
7428+ priority : "activity" ,
7429+ icon : < MessageCircleIcon /> ,
7430+ title :
7431+ childThreadInputs . length === 1
7432+ ? "Subagent needs input"
7433+ : `${ childThreadInputs . length } subagents need input` ,
7434+ description : childThreadInputs . map ( ( child , index ) => (
7435+ < Fragment key = { child . id } >
7436+ { index > 0 ? ", " : null }
7437+ < InlineButton tone = "muted" onClick = { ( ) => onOpenRelatedThread ( child . id ) } >
7438+ { child . title }
7439+ </ InlineButton >
7440+ </ Fragment >
7441+ ) ) ,
7442+ actions : (
7443+ < Button size = "xs" variant = "ghost" onClick = { ( ) => onOpenRelatedThread ( first . id ) } >
7444+ Open question
7445+ </ Button >
7446+ ) ,
7447+ } ;
7448+ } , [
7449+ childThreadInputs ,
7450+ activePendingApproval ,
7451+ activePendingUserInput ,
7452+ activeThreadShell ?. hasPendingUserInput ,
7453+ onOpenRelatedThread ,
7454+ ] ) ;
74177455
74187456 // Commands such as /compact and /goal clear run as their own turn. The draft
74197457 // and its attachments stay local.
@@ -7774,9 +7812,11 @@ export default function ChatView(props: ChatViewProps) {
77747812 : null ;
77757813 const composerBannerItems = useMemo < ComposerBannerStackItem [ ] > ( ( ) => {
77767814 const limitRecoveryItems = limitRecoveryBanner === null ? [ ] : [ limitRecoveryBanner ] ;
7777- const backgroundWorkItems = [ goalBannerItem , backgroundWorkBannerItem ] . filter (
7778- ( item ) => item !== null ,
7779- ) ;
7815+ const backgroundWorkItems = [
7816+ childInputBannerItem ,
7817+ goalBannerItem ,
7818+ backgroundWorkBannerItem ,
7819+ ] . filter ( ( item ) => item !== null ) ;
77807820 // The user asked for this one, so it leads the notice tier instead of trailing it.
77817821 const usageLimitsItems = usageLimitsBanner === null ? [ ] : [ usageLimitsBanner ] ;
77827822 const projectCloneItems = projectCloneBannerItem === null ? [ ] : [ projectCloneBannerItem ] ;
@@ -7847,6 +7887,7 @@ export default function ChatView(props: ChatViewProps) {
78477887 handleRestoreThreadBranch ,
78487888 isRestoringThreadBranch ,
78497889 backgroundWorkBannerItem ,
7890+ childInputBannerItem ,
78507891 goalBannerItem ,
78517892 localCheckoutBranchMismatch ,
78527893 projectCloneBannerItem ,
0 commit comments