fix: bootstrap embedded chat prompting state and review read-only handling

Pass initial subagent prompting settings into embedded chat URLs and views
Prevent inactive embedded chats from stealing focus on load
Treat review sessions as independent conversations when resolving prompt read-only state
This commit is contained in:
Bohdan Triapitsyn
2026-08-13 22:01:11 +03:00
parent e99f6560be
commit a9edc71e06
9 changed files with 80 additions and 17 deletions
@@ -6,14 +6,19 @@ import { useSessionUIStore } from '@/sync/session-ui-store';
type ChatViewProps = {
active?: boolean;
readOnly?: boolean;
initialAllowPromptingSubagentSessions?: boolean;
};
export const ChatView: React.FC<ChatViewProps> = ({ active = true, readOnly = false }) => {
export const ChatView: React.FC<ChatViewProps> = ({ active = true, readOnly = false, initialAllowPromptingSubagentSessions }) => {
const currentSessionId = useSessionUIStore((state) => state.currentSessionId);
return (
<ChatErrorBoundary sessionId={currentSessionId || undefined}>
<ChatContainer active={active} readOnly={readOnly} />
<ChatContainer
active={active}
readOnly={readOnly}
initialAllowPromptingSubagentSessions={initialAllowPromptingSubagentSessions}
/>
</ChatErrorBoundary>
);
};