Files
openchamber/packages/ui/src/components/views/ChatView.tsx
T
Bohdan Triapitsyn 9828ddb4b1 feat: open subagent sessions read-only in context panel
Adds read-only embedded chat mode without hiding permission prompts
Opens subagent sessions in the context panel instead of replacing the main chat
Fixes context panel message loading for embedded sessions
2026-05-15 22:16:04 +03:00

19 lines
611 B
TypeScript

import React from 'react';
import { ChatContainer } from '@/components/chat/ChatContainer';
import { ChatErrorBoundary } from '@/components/chat/ChatErrorBoundary';
import { useSessionUIStore } from '@/sync/session-ui-store';
type ChatViewProps = {
readOnly?: boolean;
};
export const ChatView: React.FC<ChatViewProps> = ({ readOnly = false }) => {
const currentSessionId = useSessionUIStore((state) => state.currentSessionId);
return (
<ChatErrorBoundary sessionId={currentSessionId || undefined}>
<ChatContainer readOnly={readOnly} />
</ChatErrorBoundary>
);
};