@asgard-js/core 0.1.9-canary.3 → 0.1.9
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 +16 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -37
- package/dist/index.mjs.map +1 -1
- package/dist/lib/channel.d.ts.map +1 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/conversation.d.ts.map +1 -1
- package/dist/lib/create-sse-observable.d.ts.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/event-emitter.d.ts.map +1 -1
- package/dist/types/sse-response.d.ts +1 -1
- package/dist/types/sse-response.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1483,44 +1483,26 @@ class sr {
|
|
|
1483
1483
|
handleEvent(e) {
|
|
1484
1484
|
switch (e.eventType) {
|
|
1485
1485
|
case y.INIT:
|
|
1486
|
-
this.sseEmitter.emit(
|
|
1487
|
-
y.INIT,
|
|
1488
|
-
e
|
|
1489
|
-
);
|
|
1486
|
+
this.sseEmitter.emit(y.INIT, e);
|
|
1490
1487
|
break;
|
|
1491
1488
|
case y.PROCESS_START:
|
|
1492
1489
|
case y.PROCESS_COMPLETE:
|
|
1493
|
-
this.sseEmitter.emit(
|
|
1494
|
-
y.PROCESS,
|
|
1495
|
-
e
|
|
1496
|
-
);
|
|
1490
|
+
this.sseEmitter.emit(y.PROCESS, e);
|
|
1497
1491
|
break;
|
|
1498
1492
|
case y.MESSAGE_START:
|
|
1499
1493
|
case y.MESSAGE_DELTA:
|
|
1500
1494
|
case y.MESSAGE_COMPLETE:
|
|
1501
|
-
this.sseEmitter.emit(
|
|
1502
|
-
y.MESSAGE,
|
|
1503
|
-
e
|
|
1504
|
-
);
|
|
1495
|
+
this.sseEmitter.emit(y.MESSAGE, e);
|
|
1505
1496
|
break;
|
|
1506
1497
|
case y.TOOL_CALL_START:
|
|
1507
1498
|
case y.TOOL_CALL_COMPLETE:
|
|
1508
|
-
this.sseEmitter.emit(
|
|
1509
|
-
y.TOOL_CALL,
|
|
1510
|
-
e
|
|
1511
|
-
);
|
|
1499
|
+
this.sseEmitter.emit(y.TOOL_CALL, e);
|
|
1512
1500
|
break;
|
|
1513
1501
|
case y.DONE:
|
|
1514
|
-
this.sseEmitter.emit(
|
|
1515
|
-
y.DONE,
|
|
1516
|
-
e
|
|
1517
|
-
);
|
|
1502
|
+
this.sseEmitter.emit(y.DONE, e);
|
|
1518
1503
|
break;
|
|
1519
1504
|
case y.ERROR:
|
|
1520
|
-
this.sseEmitter.emit(
|
|
1521
|
-
y.ERROR,
|
|
1522
|
-
e
|
|
1523
|
-
);
|
|
1505
|
+
this.sseEmitter.emit(y.ERROR, e);
|
|
1524
1506
|
break;
|
|
1525
1507
|
}
|
|
1526
1508
|
}
|
|
@@ -1638,17 +1620,11 @@ class T {
|
|
|
1638
1620
|
onMessage(e) {
|
|
1639
1621
|
switch (e.eventType) {
|
|
1640
1622
|
case y.MESSAGE_START:
|
|
1641
|
-
return this.onMessageStart(
|
|
1642
|
-
e
|
|
1643
|
-
);
|
|
1623
|
+
return this.onMessageStart(e);
|
|
1644
1624
|
case y.MESSAGE_DELTA:
|
|
1645
|
-
return this.onMessageDelta(
|
|
1646
|
-
e
|
|
1647
|
-
);
|
|
1625
|
+
return this.onMessageDelta(e);
|
|
1648
1626
|
case y.MESSAGE_COMPLETE:
|
|
1649
|
-
return this.onMessageComplete(
|
|
1650
|
-
e
|
|
1651
|
-
);
|
|
1627
|
+
return this.onMessageComplete(e);
|
|
1652
1628
|
case y.ERROR:
|
|
1653
1629
|
return this.onMessageError(e);
|
|
1654
1630
|
default:
|
|
@@ -1733,10 +1709,7 @@ class je {
|
|
|
1733
1709
|
}
|
|
1734
1710
|
}
|
|
1735
1711
|
subscribe() {
|
|
1736
|
-
this.statesSubscription = Ut([
|
|
1737
|
-
this.isConnecting$,
|
|
1738
|
-
this.conversation$
|
|
1739
|
-
]).pipe(
|
|
1712
|
+
this.statesSubscription = Ut([this.isConnecting$, this.conversation$]).pipe(
|
|
1740
1713
|
V(([e, t]) => ({
|
|
1741
1714
|
isConnecting: e,
|
|
1742
1715
|
conversation: t
|