symposium 0.14.13 → 0.14.15

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.
Files changed (2) hide show
  1. package/Thread.js +7 -5
  2. package/package.json +1 -1
package/Thread.js CHANGED
@@ -38,7 +38,7 @@ export default class Thread {
38
38
  await this.flush();
39
39
  this.state = {};
40
40
 
41
- const conv = await Symposium.storage.get('thread-' + this.unique);
41
+ const conv = Symposium.storage ? (await Symposium.storage.get('thread-' + this.unique)) : null;
42
42
  if (conv) {
43
43
  this.state = conv.state || {};
44
44
  this.messages = conv.messages.map(m => new Message(m.role, m.content, m.name, m.tags));
@@ -55,10 +55,12 @@ export default class Thread {
55
55
  }
56
56
 
57
57
  async storeState() {
58
- await Symposium.storage.set('thread-' + this.unique, {
59
- state: this.state,
60
- messages: this.messages,
61
- });
58
+ if (Symposium.storage) {
59
+ await Symposium.storage.set('thread-' + this.unique, {
60
+ state: this.state,
61
+ messages: this.messages,
62
+ });
63
+ }
62
64
  }
63
65
 
64
66
  addDirectMessage(message) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.14.13",
4
+ "version": "0.14.15",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",