@hasna/coders 0.0.13 → 0.0.14
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 -5
- 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.14"}`
|
|
58442
58442
|
};
|
|
58443
58443
|
if (key.isOAuth) {
|
|
58444
58444
|
headers["Authorization"] = `Bearer ${key.apiKey}`;
|
|
@@ -61511,7 +61511,6 @@ function getDb() {
|
|
|
61511
61511
|
const BetterSqlite3 = __require("better-sqlite3");
|
|
61512
61512
|
_db = new BetterSqlite3(dbPath);
|
|
61513
61513
|
} catch {
|
|
61514
|
-
console.warn("[db] No SQLite available \u2014 using in-memory fallback");
|
|
61515
61514
|
_db = createInMemoryDb();
|
|
61516
61515
|
initSchema(_db);
|
|
61517
61516
|
return _db;
|
|
@@ -62483,6 +62482,9 @@ var init_read = __esm({
|
|
|
62483
62482
|
return { behavior: "allow", updatedInput: input };
|
|
62484
62483
|
},
|
|
62485
62484
|
async call(input, context) {
|
|
62485
|
+
if (!input.file_path || typeof input.file_path !== "string") {
|
|
62486
|
+
return { data: { content: "Error: file_path is required", filePath: "", totalLines: 0, linesRead: 0, startLine: 0 } };
|
|
62487
|
+
}
|
|
62486
62488
|
const resolved = resolvePath(input.file_path);
|
|
62487
62489
|
const ext = extname(resolved).toLowerCase();
|
|
62488
62490
|
markFileAsRead(resolved);
|
|
@@ -62692,6 +62694,12 @@ var init_edit = __esm({
|
|
|
62692
62694
|
return { behavior: "passthrough" };
|
|
62693
62695
|
},
|
|
62694
62696
|
async call(input, context) {
|
|
62697
|
+
if (!input.file_path || typeof input.file_path !== "string") {
|
|
62698
|
+
return { data: { filePath: "", oldString: "", newString: "", replacements: 0, originalFile: "" } };
|
|
62699
|
+
}
|
|
62700
|
+
if (!input.old_string || typeof input.old_string !== "string") {
|
|
62701
|
+
return { data: { filePath: input.file_path, oldString: "", newString: "", replacements: 0, originalFile: "" } };
|
|
62702
|
+
}
|
|
62695
62703
|
const resolved = resolvePath2(input.file_path);
|
|
62696
62704
|
const originalContent = readFileSync4(resolved, "utf-8");
|
|
62697
62705
|
let newContent;
|
|
@@ -62829,6 +62837,9 @@ var init_write = __esm({
|
|
|
62829
62837
|
return { behavior: "passthrough" };
|
|
62830
62838
|
},
|
|
62831
62839
|
async call(input, context) {
|
|
62840
|
+
if (!input.file_path || typeof input.file_path !== "string") {
|
|
62841
|
+
return { data: { filePath: "", bytesWritten: 0, created: false } };
|
|
62842
|
+
}
|
|
62832
62843
|
const resolved = resolvePath3(input.file_path);
|
|
62833
62844
|
const created = !existsSync7(resolved);
|
|
62834
62845
|
const dir = dirname2(resolved);
|
|
@@ -70070,7 +70081,7 @@ function App2({ model, mode, initialPrompt }) {
|
|
|
70070
70081
|
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
70082
|
busy && streaming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70072
70083
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "green", children: "\u25CF " }),
|
|
70073
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: streaming.slice(-
|
|
70084
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: streaming.split("\n").filter((l) => l.trim()).slice(-3).join("\n").slice(-200) })
|
|
70074
70085
|
] }),
|
|
70075
70086
|
busy && !streaming && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { children: [
|
|
70076
70087
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SpinnerDot, {}),
|
|
@@ -70106,6 +70117,12 @@ function launchInkApp(opts = {}) {
|
|
|
70106
70117
|
`);
|
|
70107
70118
|
process.exit(1);
|
|
70108
70119
|
}
|
|
70120
|
+
const origWarn = console.warn;
|
|
70121
|
+
const origError = console.error;
|
|
70122
|
+
console.warn = () => {
|
|
70123
|
+
};
|
|
70124
|
+
console.error = () => {
|
|
70125
|
+
};
|
|
70109
70126
|
const { waitUntilExit } = render_default(
|
|
70110
70127
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(App2, { model, mode, initialPrompt: opts.initialPrompt }),
|
|
70111
70128
|
{ exitOnCtrlC: false }
|
|
@@ -70381,8 +70398,8 @@ async function bootstrap() {
|
|
|
70381
70398
|
var VERSION, BUILD_TIME, PACKAGE_NAME2, ISSUES_URL2, startupTimestamps, originalCwd, RESET_TERMINAL, cleanupHandlers, earlyInput, earlyInputCapturing;
|
|
70382
70399
|
var init_index = __esm({
|
|
70383
70400
|
"src/cli/index.ts"() {
|
|
70384
|
-
VERSION = "0.0.
|
|
70385
|
-
BUILD_TIME = "2026-03-
|
|
70401
|
+
VERSION = "0.0.14";
|
|
70402
|
+
BUILD_TIME = "2026-03-20T11:07:02.137Z";
|
|
70386
70403
|
PACKAGE_NAME2 = "@hasna/coders";
|
|
70387
70404
|
ISSUES_URL2 = "https://github.com/hasnaxyz/open-coders/issues";
|
|
70388
70405
|
startupTimestamps = {};
|