replicas-engine 0.1.13 → 0.1.14

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/dist/src/index.js +11 -10
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -101,18 +101,19 @@ var CodexManager = class {
101
101
  if (customInstructions) {
102
102
  message = customInstructions + "\n" + message;
103
103
  }
104
+ const { events } = await this.currentThread.runStreamed("Hello");
105
+ for await (const event of events) {
106
+ if (event.type === "thread.started") {
107
+ this.currentThreadId = event.thread_id;
108
+ break;
109
+ }
110
+ }
111
+ if (!this.currentThreadId && this.currentThread.id) {
112
+ this.currentThreadId = this.currentThread.id;
113
+ }
104
114
  }
105
115
  }
106
- const { events } = await this.currentThread.runStreamed(message);
107
- for await (const event of events) {
108
- if (event.type === "thread.started") {
109
- this.currentThreadId = event.thread_id;
110
- break;
111
- }
112
- }
113
- if (!this.currentThreadId && this.currentThread.id) {
114
- this.currentThreadId = this.currentThread.id;
115
- }
116
+ await this.currentThread.run(message);
116
117
  } finally {
117
118
  this.processing = false;
118
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",