@agent-native/core 0.49.1 → 0.49.2
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/agent/run-manager.d.ts +1 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +3 -0
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +1 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +3 -2
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +11 -0
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +11 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +8 -1
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +1 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +14 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +1 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat-adapter.d.ts","sourceRoot":"","sources":["../../src/client/agent-chat-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-chat-adapter.d.ts","sourceRoot":"","sources":["../../src/client/agent-chat-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,qBAAqB,CAAC;AAiBhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAKrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,oBAAoB;AAC9B;;;;GAIG;AACD,KAAK;AACP,0EAA0E;GACxE,WAAW,CAAC;AAm+BhB;;;;GAIG;AACH;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC3C,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAC5C,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;KAAE,CAAC;IACrD,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAA;KAAE,CAAC;IAC3D,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B,GACtC,gBAAgB,CAspClB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setActiveRun, updateActiveRunSeq, clearActiveRun, } from "./active-run-state.js";
|
|
2
|
-
import { AgentAutoContinueSignal, readSSEStream, } from "./sse-event-processor.js";
|
|
2
|
+
import { AgentAutoContinueSignal, readSSEStream, settleInterruptedToolCalls, } from "./sse-event-processor.js";
|
|
3
3
|
import { agentNativePath } from "./api-path.js";
|
|
4
4
|
import { formatChatErrorText, normalizeChatError } from "./error-format.js";
|
|
5
5
|
import { captureError } from "./analytics.js";
|
|
@@ -1133,6 +1133,11 @@ export function createAgentChatAdapter(options) {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
const active = await activeRes.json();
|
|
1135
1135
|
if (active?.active && active.runId) {
|
|
1136
|
+
const activeStatus = typeof active.status === "string" ? active.status : "";
|
|
1137
|
+
const activeTurnId = typeof active.turnId === "string" ? active.turnId : "";
|
|
1138
|
+
if (activeStatus !== "running" && activeTurnId !== turnId) {
|
|
1139
|
+
return false;
|
|
1140
|
+
}
|
|
1136
1141
|
const activeRunId = String(active.runId);
|
|
1137
1142
|
runId = activeRunId;
|
|
1138
1143
|
if (!attemptedRunIds.includes(activeRunId)) {
|
|
@@ -1582,6 +1587,7 @@ export function createAgentChatAdapter(options) {
|
|
|
1582
1587
|
detail: { ...runError, tabId },
|
|
1583
1588
|
}));
|
|
1584
1589
|
}
|
|
1590
|
+
settleInterruptedToolCalls(content);
|
|
1585
1591
|
content.push({
|
|
1586
1592
|
type: "text",
|
|
1587
1593
|
text: `Something went wrong: ${message}`,
|
|
@@ -1715,6 +1721,7 @@ export function createAgentChatAdapter(options) {
|
|
|
1715
1721
|
detail: { ...runError, tabId },
|
|
1716
1722
|
}));
|
|
1717
1723
|
}
|
|
1724
|
+
settleInterruptedToolCalls(content);
|
|
1718
1725
|
content.push({
|
|
1719
1726
|
type: "text",
|
|
1720
1727
|
text: `Something went wrong: ${message}`,
|