LlmSessionRegistry class
The sessions of the app: the two built-ins and those the user created, and which session a gesture runs in.
Pure Dart and main-isolate only. A root binds persist to keep the
user-created sessions in the device settings (aiSessions); adopt takes
what was read without writing it back.
Constructors
Properties
- actionSession → String
-
The session ordinary requests run in.
no setter
- agentSession → String
-
The session an agent run runs in.
no setter
-
changes
→ Stream<
void> -
A change to the sessions or to which one a gesture runs in.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
persist
↔ Future<
bool> Function(List<Object?> sessions)? -
Writes the user-created sessions, answering whether the write landed.
Null keeps them for this process only.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sessions
→ List<
LlmSessionInfo> -
Every session: the built-ins first, then the user's in creation order.
no setter
Methods
-
adopt(
List< Object?> ? stored) → void - Takes the sessions read from the device settings, without writing them back. Entries that are not a session are dropped.
-
byId(
String id) → LlmSessionInfo? -
The session
id, or null when there is none. -
create(
String name, {String? questFolder}) → Future< LlmSessionInfo> -
Creates a session named
name: an internal one, or withquestFoldera quest session writing into that folder. Its id is made from the name and is unique. -
dispose(
) → void -
encode(
) → List< Object?> - The user-created sessions as stored.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String id) → Future< void> -
Removes the user's session
id. A built-in session cannot be removed. A gesture that ran in it runs in the built-in session again. -
rename(
String id, String name) → Future< void> -
Gives the user's session
idthe labelname. Its id, and so its files, stay as they are. -
sessionFor(
String purpose) → String -
The session a request of
purposeruns in. -
toString(
) → String -
A string representation of this object.
inherited
-
useForActions(
String id) → void -
Runs ordinary requests in
idfrom now on. -
useForAgent(
String id) → void -
Runs the agent in
idfrom now on.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited