symposium 0.10.9 → 0.10.11
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/Agent.js +8 -6
- package/Interface.js +2 -0
- package/package.json +1 -1
package/Agent.js
CHANGED
|
@@ -76,9 +76,9 @@ export default class Agent {
|
|
|
76
76
|
return thread;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
async message(thread, content) {
|
|
79
|
+
async message(thread, i, content) {
|
|
80
80
|
if (typeof thread !== 'object')
|
|
81
|
-
thread = await this.getThread(thread);
|
|
81
|
+
thread = await this.getThread(thread, i);
|
|
82
82
|
|
|
83
83
|
await this.log('user_message', content);
|
|
84
84
|
thread.addMessage('user', content);
|
|
@@ -148,13 +148,15 @@ export default class Agent {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
async error(thread, error) {
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
const i = this.options.interfaces.find(i => i.name === thread.interface);
|
|
152
|
+
if (i)
|
|
153
|
+
return i.error(thread, error);
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
async output(thread, msg) {
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
const i = this.options.interfaces.find(i => i.name === thread.interface);
|
|
158
|
+
if (i)
|
|
159
|
+
return i.output(thread, msg);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
parseFunctions(message) {
|
package/Interface.js
CHANGED