@atlasharness/atlascode 0.1.22 → 0.1.23
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/cli.js +57 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -26852,7 +26852,13 @@ function isRetryableError(err) {
|
|
|
26852
26852
|
if (status) {
|
|
26853
26853
|
return status === 400 || status === 408 || status === 429 || status >= 500 && status < 600;
|
|
26854
26854
|
}
|
|
26855
|
-
const
|
|
26855
|
+
const name = typeof err?.name === "string" && err.name || err?.constructor?.name || "";
|
|
26856
|
+
if (name === "APIConnectionError")
|
|
26857
|
+
return true;
|
|
26858
|
+
const cause = err?.cause;
|
|
26859
|
+
const causeCode = cause && typeof cause === "object" && "code" in cause ? String(cause.code ?? "") : "";
|
|
26860
|
+
const causeMsg = cause && typeof cause === "object" && "message" in cause ? String(cause.message ?? "") : "";
|
|
26861
|
+
const msg = `${String(err?.message || err?.code || "")} ${causeCode} ${causeMsg}`;
|
|
26856
26862
|
return /timeout|ECONN|EPIPE|fetch failed|socket|aborted/i.test(msg);
|
|
26857
26863
|
}
|
|
26858
26864
|
function isClientRequestTimeout(err) {
|
|
@@ -26985,7 +26991,7 @@ class OpenAIProvider {
|
|
|
26985
26991
|
content.push({ type: "text", text });
|
|
26986
26992
|
content.push(...toolUseBlocks);
|
|
26987
26993
|
if (content.length === 0)
|
|
26988
|
-
content.push({ type: "text", text:
|
|
26994
|
+
content.push({ type: "text", text: PROVIDER_EMPTY_CONTENT_PLACEHOLDER });
|
|
26989
26995
|
const stopReason = toolUseBlocks.length > 0 ? "tool_use" : choice?.finish_reason === "length" ? "max_tokens" : "end_turn";
|
|
26990
26996
|
return {
|
|
26991
26997
|
type: "assistant",
|
|
@@ -27173,7 +27179,7 @@ class OpenAIProvider {
|
|
|
27173
27179
|
});
|
|
27174
27180
|
contentBlocks.push(...toolUseBlocks);
|
|
27175
27181
|
if (contentBlocks.length === 0) {
|
|
27176
|
-
contentBlocks.push({ type: "text", text:
|
|
27182
|
+
contentBlocks.push({ type: "text", text: PROVIDER_EMPTY_CONTENT_PLACEHOLDER });
|
|
27177
27183
|
}
|
|
27178
27184
|
const stopReason = toolUseBlocks.length > 0 ? "tool_use" : finishReason === "length" ? "max_tokens" : "end_turn";
|
|
27179
27185
|
const emptyUsage = mapOpenAIUsage(null);
|
|
@@ -27309,6 +27315,7 @@ class OpenAIProvider {
|
|
|
27309
27315
|
}
|
|
27310
27316
|
}
|
|
27311
27317
|
}
|
|
27318
|
+
var PROVIDER_EMPTY_CONTENT_PLACEHOLDER = "(provider: empty response)";
|
|
27312
27319
|
var init_modelprovider = __esm(() => {
|
|
27313
27320
|
init_openai();
|
|
27314
27321
|
init_clients();
|
|
@@ -80799,7 +80806,10 @@ async function queryOneRound(deps, tools, messages) {
|
|
|
80799
80806
|
return false;
|
|
80800
80807
|
if (b.type === "tool_use")
|
|
80801
80808
|
return true;
|
|
80802
|
-
|
|
80809
|
+
if (b.type !== "text")
|
|
80810
|
+
return false;
|
|
80811
|
+
const t = String(b.text ?? "").trim();
|
|
80812
|
+
return t !== "" && t !== PROVIDER_EMPTY_CONTENT_PLACEHOLDER;
|
|
80803
80813
|
});
|
|
80804
80814
|
};
|
|
80805
80815
|
if (isEmptyContent(assistantContent) && !deps.signal?.aborted) {
|
|
@@ -80937,6 +80947,7 @@ async function queryAgentLoop(deps, args) {
|
|
|
80937
80947
|
var DEFAULT_AGENT_LOOP_MAX_TURNS = 20;
|
|
80938
80948
|
var init_loop = __esm(() => {
|
|
80939
80949
|
init_shared();
|
|
80950
|
+
init_modelprovider2();
|
|
80940
80951
|
init_turnRecovery();
|
|
80941
80952
|
init_pipeline();
|
|
80942
80953
|
init_context();
|
|
@@ -473707,8 +473718,11 @@ var init_BudgetPage = __esm(() => {
|
|
|
473707
473718
|
// src/tui/components/SidePanel/SidePanel.tsx
|
|
473708
473719
|
function SidePanelDrawer({ messages }) {
|
|
473709
473720
|
const panel = useSidePanel();
|
|
473721
|
+
const isModalActive = useIsModalOverlayActive();
|
|
473710
473722
|
if (!panel.open)
|
|
473711
473723
|
return null;
|
|
473724
|
+
if (isModalActive)
|
|
473725
|
+
return null;
|
|
473712
473726
|
const page = panel.page;
|
|
473713
473727
|
return /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(ThemedBox_default, {
|
|
473714
473728
|
flexDirection: "column",
|
|
@@ -473759,6 +473773,7 @@ function SidePanelDrawer({ messages }) {
|
|
|
473759
473773
|
var jsx_dev_runtime434;
|
|
473760
473774
|
var init_SidePanel = __esm(() => {
|
|
473761
473775
|
init_ink2();
|
|
473776
|
+
init_overlayContext();
|
|
473762
473777
|
init_store();
|
|
473763
473778
|
init_types16();
|
|
473764
473779
|
init_DiffPage();
|
|
@@ -473770,29 +473785,58 @@ var init_SidePanel = __esm(() => {
|
|
|
473770
473785
|
});
|
|
473771
473786
|
|
|
473772
473787
|
// src/tui/components/SidePanel/sidePanelHandlers.ts
|
|
473773
|
-
function createSidePanelHandlers() {
|
|
473788
|
+
function createSidePanelHandlers(deps) {
|
|
473789
|
+
const cede = () => deps?.isModalActive === true;
|
|
473774
473790
|
return {
|
|
473775
|
-
"sidePanel:openDiff": () =>
|
|
473776
|
-
|
|
473777
|
-
|
|
473778
|
-
|
|
473779
|
-
|
|
473791
|
+
"sidePanel:openDiff": () => {
|
|
473792
|
+
if (cede())
|
|
473793
|
+
return false;
|
|
473794
|
+
return openSidePanel("diff");
|
|
473795
|
+
},
|
|
473796
|
+
"sidePanel:openPlan": () => {
|
|
473797
|
+
if (cede())
|
|
473798
|
+
return false;
|
|
473799
|
+
return openSidePanel("plan");
|
|
473800
|
+
},
|
|
473801
|
+
"sidePanel:openActivity": () => {
|
|
473802
|
+
if (cede())
|
|
473803
|
+
return false;
|
|
473804
|
+
return openSidePanel("activity");
|
|
473805
|
+
},
|
|
473806
|
+
"sidePanel:openDecisions": () => {
|
|
473807
|
+
if (cede())
|
|
473808
|
+
return false;
|
|
473809
|
+
return openSidePanel("decisions");
|
|
473810
|
+
},
|
|
473811
|
+
"sidePanel:openBudget": () => {
|
|
473812
|
+
if (cede())
|
|
473813
|
+
return false;
|
|
473814
|
+
return openSidePanel("budget");
|
|
473815
|
+
},
|
|
473780
473816
|
"sidePanel:nextPage": () => {
|
|
473817
|
+
if (cede())
|
|
473818
|
+
return false;
|
|
473781
473819
|
if (!isSidePanelOpen())
|
|
473782
473820
|
return false;
|
|
473783
473821
|
cycleSidePanelPage(1);
|
|
473784
473822
|
},
|
|
473785
473823
|
"sidePanel:prevPage": () => {
|
|
473824
|
+
if (cede())
|
|
473825
|
+
return false;
|
|
473786
473826
|
if (!isSidePanelOpen())
|
|
473787
473827
|
return false;
|
|
473788
473828
|
cycleSidePanelPage(-1);
|
|
473789
473829
|
},
|
|
473790
473830
|
"sidePanel:close": () => {
|
|
473831
|
+
if (cede())
|
|
473832
|
+
return false;
|
|
473791
473833
|
if (!isSidePanelOpen())
|
|
473792
473834
|
return false;
|
|
473793
473835
|
closeSidePanel();
|
|
473794
473836
|
},
|
|
473795
473837
|
"sidePanel:toggleDiffLayout": () => {
|
|
473838
|
+
if (cede())
|
|
473839
|
+
return false;
|
|
473796
473840
|
const s = getSidePanel();
|
|
473797
473841
|
if (!s.open || s.page !== "diff")
|
|
473798
473842
|
return false;
|
|
@@ -473808,7 +473852,8 @@ var init_sidePanelHandlers = __esm(() => {
|
|
|
473808
473852
|
function SidePanelKeybindings() {
|
|
473809
473853
|
const panel = useSidePanel();
|
|
473810
473854
|
useRegisterKeybindingContext("SidePanel", panel.open);
|
|
473811
|
-
const
|
|
473855
|
+
const isModalActive = useIsModalOverlayActive();
|
|
473856
|
+
const handlers = import_react276.useMemo(() => createSidePanelHandlers({ isModalActive }), [isModalActive]);
|
|
473812
473857
|
useKeybindings(handlers, { context: "SidePanel" });
|
|
473813
473858
|
return null;
|
|
473814
473859
|
}
|
|
@@ -473816,6 +473861,7 @@ var import_react276;
|
|
|
473816
473861
|
var init_SidePanelKeybindings = __esm(() => {
|
|
473817
473862
|
init_useKeybinding();
|
|
473818
473863
|
init_KeybindingContext();
|
|
473864
|
+
init_overlayContext();
|
|
473819
473865
|
init_store();
|
|
473820
473866
|
init_sidePanelHandlers();
|
|
473821
473867
|
import_react276 = __toESM(require_react(), 1);
|
package/package.json
CHANGED