@pipeline-moe/client-core 0.1.2 → 0.1.3
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/dist/store.js +7 -1
- package/package.json +1 -1
package/dist/store.js
CHANGED
|
@@ -179,7 +179,13 @@ export function createRoomStore(opts) {
|
|
|
179
179
|
throw err;
|
|
180
180
|
}),
|
|
181
181
|
getParticipant: (id) => rApi.participant(id),
|
|
182
|
-
updateParticipant: (id, patchBody) => rApi.updateAgent(id, patchBody).
|
|
182
|
+
updateParticipant: (id, patchBody) => rApi.updateAgent(id, patchBody).then((updated) => {
|
|
183
|
+
// The response is the fresh RosterItem — fold it in immediately so UIs
|
|
184
|
+
// reading the snapshot right after (e.g. a reopened picker) see the
|
|
185
|
+
// change without waiting for the roster broadcast.
|
|
186
|
+
patch({ roster: state.roster.map((p) => (p.id === updated.id ? { ...p, ...updated } : p)) });
|
|
187
|
+
return updated;
|
|
188
|
+
}).catch((err) => {
|
|
183
189
|
fail(err);
|
|
184
190
|
throw err;
|
|
185
191
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipeline-moe/client-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Framework-agnostic client for a pipeline-moe server: typed REST surface, pure SSE reducer, and an effectful room store. Consumed by the web and terminal clients.",
|