Interface: CharAgentShellElement
<char-agent-shell> custom element.
Opinionated host shell that composes a persistent inner <char-agent> and
owns responsive mode policy plus host layout orchestration.
This shell does not render chat controls, prompts, or composer UI.
Visible assistant UI is always iframe-owned.
Policy:
- closed to
pip - open desktop to
inline - open narrow viewport to
fullscreen
Extends
HTMLElement
Properties
apiBase?
optionalapiBase:string
Accessors
open
Get Signature
get open(): boolean
Returns
boolean
Set Signature
set open(value):void
Parameters
value
boolean
Returns
void
Methods
attributeChangedCallback()
attributeChangedCallback(name,_oldValue,newValue):void
Parameters
name
string
_oldValue
string | null
newValue
string | null
Returns
void
connect()
connect(Connects shell authentication and starts availability health checks.options):boolean
Parameters
options
ConnectOptions
Authentication payload (publishableKey + optional idToken).
Returns
boolean
true when connect is accepted by the inner element.
connectedCallback()
connectedCallback(): void
Returns
void
disconnect()
disconnect(): boolean
Clears authentication and disconnects the inner <char-agent>.
Returns
boolean
true when disconnect dispatch succeeds.
disconnectedCallback()
disconnectedCallback(): void
Returns
void
setAuth()
setAuth(Convenience method for declarative wrappers. Applies auth when provided, otherwise clears auth.options):boolean
Parameters
options
Auth payload to connect, ornull to disconnect.
ConnectOptions | null
Returns
boolean
Result from connect() or disconnect().
setHostContext()
setHostContext(Merges and forwards host context to the innerhostContext):void
<char-agent>.
Shell-owned fields (displayMode, availableDisplayModes) are ignored.
Parameters
hostContext
CharHostContext
Partial host context patch to forward.
Returns
void
setOpen()
setOpen(Sets shell open state.open):void
Parameters
open
boolean
Next desired open state.
Returns
void
toggleOpen()
toggleOpen(): void
Toggles shell open state.
Returns
void
