anywhere-ai 0.0.27 → 0.0.28
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 +2 -2
- package/dist/server.js +2 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12,11 +12,11 @@ import qrcode from "qrcode";
|
|
|
12
12
|
var args = process.argv.slice(2);
|
|
13
13
|
var command = args.find((a) => !a.startsWith("-"));
|
|
14
14
|
if (args.includes("--version") || args.includes("-v")) {
|
|
15
|
-
console.log(`anywhere-ai v${"0.0.
|
|
15
|
+
console.log(`anywhere-ai v${"0.0.28"}`);
|
|
16
16
|
process.exit(0);
|
|
17
17
|
}
|
|
18
18
|
if (args.includes("--help") || args.includes("-h") || command === "help") {
|
|
19
|
-
console.log(`anywhere-ai v${"0.0.
|
|
19
|
+
console.log(`anywhere-ai v${"0.0.28"} \u2014 Mobile coding agent
|
|
20
20
|
|
|
21
21
|
Usage: anywhere-ai [command] [options]
|
|
22
22
|
|
package/dist/server.js
CHANGED
|
@@ -501,9 +501,7 @@ chats.post("/:id/message", async (c) => {
|
|
|
501
501
|
const blocks = msg.message?.content;
|
|
502
502
|
if (Array.isArray(blocks)) {
|
|
503
503
|
for (const b of blocks) {
|
|
504
|
-
if (b.type === "
|
|
505
|
-
console.log(`[stream] tool_use: ${b.name}`);
|
|
506
|
-
} else if (b.type === "tool_result" && b.is_error) {
|
|
504
|
+
if (b.type === "tool_result" && b.is_error) {
|
|
507
505
|
const resultText = Array.isArray(b.content) ? b.content.filter((r) => r.type === "text").map((r) => r.text).join("").slice(0, 1e3) : String(b.content ?? "").slice(0, 1e3);
|
|
508
506
|
console.log(`[stream] tool_result ERROR: ${resultText.slice(0, 500)}`);
|
|
509
507
|
}
|
|
@@ -899,19 +897,15 @@ gh.get("/repos", async (c) => {
|
|
|
899
897
|
gh.get("/pr", async (c) => {
|
|
900
898
|
try {
|
|
901
899
|
const cwd = c.req.query("cwd");
|
|
902
|
-
console.log("[gh/pr GET] cwd:", cwd);
|
|
903
900
|
const root = await getRepoRoot(cwd);
|
|
904
|
-
console.log("[gh/pr GET] resolved root:", root);
|
|
905
901
|
if (!root) return c.json({ exists: false });
|
|
906
902
|
const { stdout } = await execAsync2(
|
|
907
903
|
"gh pr view --json number,title,url",
|
|
908
904
|
{ cwd: root }
|
|
909
905
|
);
|
|
910
906
|
const pr = JSON.parse(stdout);
|
|
911
|
-
console.log("[gh/pr GET] found PR:", pr);
|
|
912
907
|
return c.json({ exists: true, pr });
|
|
913
|
-
} catch
|
|
914
|
-
console.log("[gh/pr GET] no PR found:", err?.stderr?.trim() || err?.message);
|
|
908
|
+
} catch {
|
|
915
909
|
return c.json({ exists: false });
|
|
916
910
|
}
|
|
917
911
|
});
|