@hasna/coders 0.0.11 → 0.0.13
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.mjs +22 -37
- package/dist/cli.mjs.map +2 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -58438,7 +58438,7 @@ var init_client = __esm({
|
|
|
58438
58438
|
"Content-Type": "application/json",
|
|
58439
58439
|
"anthropic-version": "2023-06-01",
|
|
58440
58440
|
"anthropic-beta": BETA_HEADERS.join(","),
|
|
58441
|
-
"User-Agent": `coders/${"0.0.
|
|
58441
|
+
"User-Agent": `coders/${"0.0.13"}`
|
|
58442
58442
|
};
|
|
58443
58443
|
if (key.isOAuth) {
|
|
58444
58444
|
headers["Authorization"] = `Bearer ${key.apiKey}`;
|
|
@@ -62823,14 +62823,6 @@ var init_write = __esm({
|
|
|
62823
62823
|
if (!input.file_path) {
|
|
62824
62824
|
return { result: false, message: "file_path is required", errorCode: 1 };
|
|
62825
62825
|
}
|
|
62826
|
-
const resolved = resolvePath3(input.file_path);
|
|
62827
|
-
if (existsSync7(resolved) && !hasFileBeenRead(resolved)) {
|
|
62828
|
-
return {
|
|
62829
|
-
result: false,
|
|
62830
|
-
message: "This file already exists. You must Read it first before overwriting. Use the Read tool, then retry.",
|
|
62831
|
-
errorCode: 2
|
|
62832
|
-
};
|
|
62833
|
-
}
|
|
62834
62826
|
return { result: true };
|
|
62835
62827
|
},
|
|
62836
62828
|
async checkPermissions(input) {
|
|
@@ -70070,34 +70062,26 @@ function App2({ model, mode, initialPrompt }) {
|
|
|
70070
70062
|
} else if (key.escape) setInput("");
|
|
70071
70063
|
else if (!key.ctrl && !key.meta && ch) setInput((p) => p + ch);
|
|
70072
70064
|
});
|
|
70073
|
-
const recentTools = activeTools.slice(-
|
|
70074
|
-
const
|
|
70075
|
-
const
|
|
70076
|
-
const truncatedStream = streamLines.length > maxStreamLines ? streamLines.slice(-maxStreamLines).join("\n") : streaming;
|
|
70065
|
+
const recentTools = activeTools.slice(-2);
|
|
70066
|
+
const cols = stdout?.columns ?? 80;
|
|
70067
|
+
const sep = "\u2500".repeat(Math.min(cols, 120));
|
|
70077
70068
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
70078
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Static, { items: msgs, children: (msg) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MessageView, { msg }, msg.id) }),
|
|
70069
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Static, { items: msgs, children: (msg) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MessageView, { msg }) }, msg.id) }),
|
|
70070
|
+
busy && recentTools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { flexDirection: "column", children: recentTools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolItem, { tool: t }, t.id)) }),
|
|
70071
|
+
busy && streaming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70072
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: "\u25CF " }),
|
|
70073
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: streaming.slice(-500) })
|
|
70074
|
+
] }),
|
|
70075
|
+
busy && !streaming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70076
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpinnerDot, {}),
|
|
70077
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { dimColor: true, children: [
|
|
70078
|
+
" ",
|
|
70079
|
+
recentTools.some((t) => t.status === "running") ? "Working" : "Thinking",
|
|
70080
|
+
"..."
|
|
70081
|
+
] })
|
|
70082
|
+
] }),
|
|
70079
70083
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
70080
|
-
|
|
70081
|
-
activeTools.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { dimColor: true, children: [
|
|
70082
|
-
" \u2026 +",
|
|
70083
|
-
activeTools.length - 3,
|
|
70084
|
-
" earlier tools"
|
|
70085
|
-
] }) }),
|
|
70086
|
-
recentTools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolItem, { tool: t }, t.id))
|
|
70087
|
-
] }),
|
|
70088
|
-
busy && truncatedStream && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70089
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: "\u25CF " }),
|
|
70090
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: truncatedStream })
|
|
70091
|
-
] }),
|
|
70092
|
-
busy && !streaming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70093
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpinnerDot, {}),
|
|
70094
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { dimColor: true, children: [
|
|
70095
|
-
" ",
|
|
70096
|
-
recentTools.some((t) => t.status === "running") ? "Working" : "Thinking",
|
|
70097
|
-
"..."
|
|
70098
|
-
] })
|
|
70099
|
-
] }),
|
|
70100
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.min(stdout?.columns ?? 80, 120)) }) }),
|
|
70084
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: sep }),
|
|
70101
70085
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70102
70086
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { color: "cyan", bold: true, children: [
|
|
70103
70087
|
PROMPT,
|
|
@@ -70106,6 +70090,7 @@ function App2({ model, mode, initialPrompt }) {
|
|
|
70106
70090
|
input.startsWith("/") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "magenta", children: input }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: input }),
|
|
70107
70091
|
!busy && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "gray", children: "\u258E" })
|
|
70108
70092
|
] }),
|
|
70093
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: sep }),
|
|
70109
70094
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusBar, { model, mode, cost, tokens })
|
|
70110
70095
|
] })
|
|
70111
70096
|
] });
|
|
@@ -70396,8 +70381,8 @@ async function bootstrap() {
|
|
|
70396
70381
|
var VERSION, BUILD_TIME, PACKAGE_NAME2, ISSUES_URL2, startupTimestamps, originalCwd, RESET_TERMINAL, cleanupHandlers, earlyInput, earlyInputCapturing;
|
|
70397
70382
|
var init_index = __esm({
|
|
70398
70383
|
"src/cli/index.ts"() {
|
|
70399
|
-
VERSION = "0.0.
|
|
70400
|
-
BUILD_TIME = "2026-03-
|
|
70384
|
+
VERSION = "0.0.13";
|
|
70385
|
+
BUILD_TIME = "2026-03-20T10:52:41.905Z";
|
|
70401
70386
|
PACKAGE_NAME2 = "@hasna/coders";
|
|
70402
70387
|
ISSUES_URL2 = "https://github.com/hasnaxyz/open-coders/issues";
|
|
70403
70388
|
startupTimestamps = {};
|