Protected ReadonlyagentProtected ReadonlychatProtected ReadonlyloggerProtected ReadonlypreferenceProtected ReadonlypreviewNumber of trailing conversation lines included in a summary's preview.
Protected ReadonlypreviewMaximum length of a single preview line; longer lines are truncated.
Protected ReadonlyworkspaceCreates a new session in this frontend and sends the initial prompt, if one is given.
The created session becomes the frontend's active session. The request's workspace is
ignored; routing to a matching frontend is the backend's responsibility.
ProtectedgetReturns the metadata of all persisted sessions, or an empty list if reading the persisted index fails.
ProtectedgetReturns the workspace to attribute persisted sessions to: this frontend's workspace when
sessions are persisted per workspace, and undefined when they are persisted globally,
as the global session store holds sessions saved from any workspace.
Returns the detail of the given session, or undefined if the session is unknown to this
frontend. For persisted sessions that are not restored, the detail carries no messages.
Returns summaries of all sessions known to this frontend: sessions restored in memory
as well as persisted sessions that have not been restored (reported with their
persisted metadata and restored: false).
Returns the summary of the given session, or undefined if the session is unknown to this
frontend. Used to pick the frontend a session action is routed to, so it must stay cheap:
unlike getSession it does not carry the conversation.
Returns the URI of the workspace this frontend has opened, or undefined if none.
ProtectedgetRestores the given session if necessary and shows it in this frontend's chat view.
Returns false if the session is unknown to this frontend.
Restores the given session in this frontend without focusing it. Returns the detail of
the restored session, or undefined if the session is unknown to this frontend.
Sends a prompt to the given session, restoring it first if necessary. Returns undefined
if the session is unknown to this frontend.
ProtectedtoProtectedtoReduces the session's conversation to plain-text messages, similar to the message history sent to the language model for the next request. In-progress responses are included with their content so far.
ProtectedtoReduces the metadata of a persisted session that is not restored to a summary.
ProtectedtoReturns the last few non-empty lines of the conversation, or undefined for an empty
conversation. Walks the conversation from the end so that only as many entries as the
preview needs are rendered, however long the conversation is.
ProtectedtoSplits an entry into its non-empty, truncated preview lines.
Protectedto
Answers the backend's external session queries from this frontend's ChatService.
Reports sessions that are restored (live) in this frontend with their full state, and persisted sessions that have not been restored with their persisted metadata. Live sessions are attributed to the workspace this frontend has opened; persisted sessions only when sessions are persisted per workspace, as the global session store holds sessions saved from any workspace.