@theoremjs/web 0.3.4-next.421.g4bac1c7 → 0.3.4-next.425.gd676bc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/client/chat.d.ts +2 -0
- package/client/chat.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ await chat.submit();
|
|
|
177
177
|
|
|
178
178
|
- `getState()` returns a `ChatState`. It is a new object after each change, and the same object between changes. So you can compare it by reference, as React's `useSyncExternalStore` does.
|
|
179
179
|
- `subscribe(listener)` calls the listener once for each group of changes, after the code that made them has run. It returns the function that unsubscribes. Until the first subscribe or send, the chat asks nothing of the host. Then it reads a resumed conversation that came without its `conversationView`, and answers a restored page gate as unanswered.
|
|
180
|
-
- `update(options)` gives the controller your latest options, such as a new `context`, `slots`, or `pageTools`. Each turn reads the options as they are when it is sent. `conversation`, `conversationView`, `initialText`, `initialFiles`, and `initialPending` are read only when the controller is created.
|
|
180
|
+
- `update(options)` gives the controller your latest options, such as a new `context`, `slots`, or `pageTools`. Each turn reads the options as they are when it is sent. `conversation`, `conversationView`, `initialText`, `initialFiles`, `initialVoice`, and `initialPending` are read only when the controller is created.
|
|
181
181
|
- Each method is bound to the controller. Pass it as a callback as it is.
|
|
182
182
|
|
|
183
183
|
`state.phase` is `'idle'`, `'streaming'`, or `'gated'`. The methods for the composer depend on it:
|
package/client/chat.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type ChatOptions = {
|
|
|
23
23
|
initialText?: string;
|
|
24
24
|
/** The files the composer starts with, staged to send. Read once, when the chat is created. */
|
|
25
25
|
initialFiles?: readonly File[];
|
|
26
|
+
/** The voice notes the composer starts with, staged to send. Read once, when the chat is created. */
|
|
27
|
+
initialVoice?: readonly File[];
|
|
26
28
|
/**
|
|
27
29
|
* The messages the composer starts with set aside: queued, stashed or steering. Read once, when
|
|
28
30
|
* the chat is created.
|
package/client/chat.js
CHANGED
|
@@ -121,7 +121,7 @@ class Chat {
|
|
|
121
121
|
chatStarted: false,
|
|
122
122
|
draftText: options.initialText ?? '',
|
|
123
123
|
pendingFiles: [...(options.initialFiles ?? [])],
|
|
124
|
-
pendingVoice: [],
|
|
124
|
+
pendingVoice: [...(options.initialVoice ?? [])],
|
|
125
125
|
pendingMessages: orderComposerPendingMessages([...(options.initialPending ?? [])]),
|
|
126
126
|
issues: [],
|
|
127
127
|
failure: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theoremjs/web",
|
|
3
|
-
"version": "0.3.4-next.
|
|
3
|
+
"version": "0.3.4-next.425.gd676bc4",
|
|
4
4
|
"description": "Theorem on the web platform, with no UI framework: Web-standard server handlers that serve a profile, and the browser client that talks to them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"zod": "^4.6.5",
|
|
28
|
-
"@theoremjs/agents": "^0.3.4-next.
|
|
28
|
+
"@theoremjs/agents": "^0.3.4-next.425.gd676bc4"
|
|
29
29
|
}
|
|
30
30
|
}
|