From 1534ad05a993aede97f692b6ba981797d4853b1d Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Fri, 15 May 2026 22:24:27 +0300 Subject: [PATCH] feat: make subagent chats read-only Replaces the composer with a read-only banner for subagent sessions Keeps permission and question prompts interactive --- packages/ui/src/components/chat/ChatContainer.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/components/chat/ChatContainer.tsx b/packages/ui/src/components/chat/ChatContainer.tsx index ba96bc75..5a4651a2 100644 --- a/packages/ui/src/components/chat/ChatContainer.tsx +++ b/packages/ui/src/components/chat/ChatContainer.tsx @@ -538,6 +538,7 @@ export const ChatContainer: React.FC = ({ autoOpenDraft = tr {t('chat.container.returnToParent.label')} ) : null; + const promptReadOnly = readOnly || Boolean(parentSession); React.useEffect(() => { if (autoOpenDraft && !currentSessionId && !draftOpen) { @@ -764,7 +765,7 @@ export const ChatContainer: React.FC = ({ autoOpenDraft = tr : 'bg-background' )} > - {readOnly ? : } + {promptReadOnly ? : } ); @@ -824,7 +825,7 @@ export const ChatContainer: React.FC = ({ autoOpenDraft = tr : 'bg-background' )} > - {readOnly ? : } + {promptReadOnly ? : } ); @@ -857,7 +858,7 @@ export const ChatContainer: React.FC = ({ autoOpenDraft = tr : 'bg-background' )} > - {readOnly ? : } + {promptReadOnly ? : } ); @@ -905,7 +906,7 @@ export const ChatContainer: React.FC = ({ autoOpenDraft = tr onClick={navigation.resumeToLatest} /> )} - {readOnly ? : } + {promptReadOnly ? : }