Prometheus Entity Management API
    Preparing search index...

    entity-copilot.tsx — EntityCopilot: a compact "sidebar copilot" variant.

    Unlike EntityChat (which renders a full chat surface), EntityCopilot is designed to be embedded inline — a floating panel, a slide-over, or an editor drawer. It reuses useChatSession for the same entity-graph projection while providing a narrower component API and a more compact default UI.

    Layering: Component → useChatSession hook → applyAgUiSnapshot/Delta (store).

    interface EntityCopilotProps {
        className?: string;
        mappings?: AgUiStateMapping[];
        onClose?: () => void;
        onError?: (error: Error) => void;
        onMessage?: (message: ChatMessage) => void;
        open?: boolean;
        placeholder?: string;
        renderSuggestion?: (message: ChatMessage, index: number) => ReactNode;
        sessionId?: string;
        streamFactory: (
            messages: ChatMessage[],
        ) => AsyncIterable<StreamEvent, any, any> | ReadableStream<StreamEvent>;
        suggestions?: string[];
        title?: string;
        toolProvider?: EntityToolProvider;
    }

    Hierarchy

    Index
    className?: string

    Additional root CSS class.

    mappings?: AgUiStateMapping[]

    AG-UI state mappings: project agent state onto entity-graph entities.

    onClose?: () => void

    Called when the user requests closing (e.g. presses Escape or an X button).

    onError?: (error: Error) => void

    Called on stream error.

    onMessage?: (message: ChatMessage) => void

    Called when a full assistant message has been received.

    open?: boolean

    Whether the copilot panel is open. Controls visibility via CSS (display).

    placeholder?: string

    Placeholder text for the input.

    renderSuggestion?: (message: ChatMessage, index: number) => ReactNode

    Render override for a single suggestion bubble.

    sessionId?: string

    Unique session id; defaults to a generated id.

    streamFactory: (
        messages: ChatMessage[],
    ) => AsyncIterable<StreamEvent, any, any> | ReadableStream<StreamEvent>
    suggestions?: string[]

    Quick-reply prompts shown when the message list is empty.

    title?: string

    Title shown at the top of the copilot panel.

    toolProvider?: EntityToolProvider

    Optional tool provider for function-calling / MCP.