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
19 lines
611 B
TypeScript
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>
|
|
);
|
|
};
|