@agent-native/core 0.49.6 → 0.49.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/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +6 -2
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +6 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/app-skill.d.ts.map +1 -1
- package/dist/cli/app-skill.js +21 -5
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +46 -2
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +6 -11
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +14 -24
- package/dist/cli/recap.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +30 -11
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +20 -4
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +33 -9
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/annotation-rail.d.ts +41 -3
- package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
- package/dist/client/blocks/library/annotation-rail.js +157 -29
- package/dist/client/blocks/library/annotation-rail.js.map +1 -1
- package/dist/client/blocks/types.d.ts +19 -0
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +13 -12
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +6 -8
- package/dist/vite/client.js.map +1 -1
- package/docs/content/pr-visual-recap.md +11 -12
- 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;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;
|
|
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;AAs/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,CA8pClB"}
|
|
@@ -766,7 +766,7 @@ function isMissingCredentialMessage(message) {
|
|
|
766
766
|
msg.includes("no llm provider") ||
|
|
767
767
|
msg.includes("llm provider is connected"));
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function missingCredentialFailure(message) {
|
|
770
770
|
try {
|
|
771
771
|
const parsed = JSON.parse(message);
|
|
772
772
|
const raw = typeof parsed.error === "string"
|
|
@@ -774,10 +774,25 @@ function missingCredentialErrorText(message) {
|
|
|
774
774
|
: typeof parsed.message === "string"
|
|
775
775
|
? parsed.message
|
|
776
776
|
: message;
|
|
777
|
-
|
|
777
|
+
const errorCode = typeof parsed.errorCode === "string"
|
|
778
|
+
? parsed.errorCode
|
|
779
|
+
: "missing_credentials";
|
|
780
|
+
return {
|
|
781
|
+
text: formatChatErrorText(raw, typeof parsed.upgradeUrl === "string" ? parsed.upgradeUrl : undefined, errorCode),
|
|
782
|
+
runError: {
|
|
783
|
+
message: normalizeChatError(raw).message,
|
|
784
|
+
errorCode,
|
|
785
|
+
},
|
|
786
|
+
};
|
|
778
787
|
}
|
|
779
788
|
catch {
|
|
780
|
-
return
|
|
789
|
+
return {
|
|
790
|
+
text: formatChatErrorText(message, undefined, "missing_credentials"),
|
|
791
|
+
runError: {
|
|
792
|
+
message: normalizeChatError(message).message,
|
|
793
|
+
errorCode: "missing_credentials",
|
|
794
|
+
},
|
|
795
|
+
};
|
|
781
796
|
}
|
|
782
797
|
}
|
|
783
798
|
export function createAgentChatAdapter(options) {
|
|
@@ -1500,19 +1515,21 @@ export function createAgentChatAdapter(options) {
|
|
|
1500
1515
|
return;
|
|
1501
1516
|
}
|
|
1502
1517
|
if (isMissingCredentialMessage(body)) {
|
|
1518
|
+
const failure = missingCredentialFailure(body);
|
|
1503
1519
|
if (typeof window !== "undefined") {
|
|
1504
1520
|
window.dispatchEvent(new Event("agent-chat:missing-api-key"));
|
|
1521
|
+
window.dispatchEvent(new CustomEvent("agent-chat:run-error", {
|
|
1522
|
+
detail: { ...failure.runError, tabId },
|
|
1523
|
+
}));
|
|
1505
1524
|
}
|
|
1506
|
-
content.push({
|
|
1507
|
-
type: "text",
|
|
1508
|
-
text: missingCredentialErrorText(body),
|
|
1509
|
-
});
|
|
1525
|
+
content.push({ type: "text", text: failure.text });
|
|
1510
1526
|
yield {
|
|
1511
1527
|
content: [...content],
|
|
1512
1528
|
status: {
|
|
1513
1529
|
type: "incomplete",
|
|
1514
1530
|
reason: "error",
|
|
1515
1531
|
},
|
|
1532
|
+
metadata: { custom: { runError: failure.runError } },
|
|
1516
1533
|
};
|
|
1517
1534
|
return;
|
|
1518
1535
|
}
|
|
@@ -1646,19 +1663,21 @@ export function createAgentChatAdapter(options) {
|
|
|
1646
1663
|
return;
|
|
1647
1664
|
}
|
|
1648
1665
|
if (isMissingCredentialMessage(errMsg)) {
|
|
1666
|
+
const failure = missingCredentialFailure(errMsg);
|
|
1649
1667
|
if (typeof window !== "undefined") {
|
|
1650
1668
|
window.dispatchEvent(new Event("agent-chat:missing-api-key"));
|
|
1669
|
+
window.dispatchEvent(new CustomEvent("agent-chat:run-error", {
|
|
1670
|
+
detail: { ...failure.runError, tabId },
|
|
1671
|
+
}));
|
|
1651
1672
|
}
|
|
1652
|
-
content.push({
|
|
1653
|
-
type: "text",
|
|
1654
|
-
text: missingCredentialErrorText(errMsg),
|
|
1655
|
-
});
|
|
1673
|
+
content.push({ type: "text", text: failure.text });
|
|
1656
1674
|
yield {
|
|
1657
1675
|
content: [...content],
|
|
1658
1676
|
status: {
|
|
1659
1677
|
type: "incomplete",
|
|
1660
1678
|
reason: "error",
|
|
1661
1679
|
},
|
|
1680
|
+
metadata: { custom: { runError: failure.runError } },
|
|
1662
1681
|
};
|
|
1663
1682
|
clearActiveRun();
|
|
1664
1683
|
return;
|