@pikaa-ai/pikaa 0.3.12 → 0.3.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.js +28 -18
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6043,7 +6043,7 @@ function parsePatch(oldSrc, newSrc, contextLines = 3) {
|
|
|
6043
6043
|
// package.json
|
|
6044
6044
|
var package_default = {
|
|
6045
6045
|
name: "@pikaa-ai/pikaa",
|
|
6046
|
-
version: "0.3.
|
|
6046
|
+
version: "0.3.13",
|
|
6047
6047
|
description: "PIKAA CLI - AI coding agent that runs locally in your terminal.",
|
|
6048
6048
|
main: "./dist/index.js",
|
|
6049
6049
|
module: "./dist/index.js",
|
|
@@ -8294,8 +8294,15 @@ async function handleSlashCommand(input, ctx) {
|
|
|
8294
8294
|
`);
|
|
8295
8295
|
return true;
|
|
8296
8296
|
case "/init":
|
|
8297
|
-
|
|
8298
|
-
|
|
8297
|
+
console.log(`
|
|
8298
|
+
\x1B[38;2;217;119;87m\u2733 Initializing project instructions via AI agent...\x1B[0m
|
|
8299
|
+
`);
|
|
8300
|
+
if (ctx.repl) {
|
|
8301
|
+
await ctx.repl.submitTurn("Analyze this codebase and create or update the AGENTS.md project instruction file in the workspace root following Claude Code best practices. Inspect key config files (package.json, tsconfig, etc.), test/build scripts, and main source directories to discover exact development commands, architectural conventions, and workflow requirements. Write the finalized AGENTS.md using the write_file tool.");
|
|
8302
|
+
} else {
|
|
8303
|
+
const initResult = runProjectInit({ cwd: ctx.session.cwd });
|
|
8304
|
+
printInitSummary(initResult);
|
|
8305
|
+
}
|
|
8299
8306
|
return true;
|
|
8300
8307
|
case "/agents":
|
|
8301
8308
|
printAgents(ctx);
|
|
@@ -9946,24 +9953,27 @@ class CliRepl {
|
|
|
9946
9953
|
continue;
|
|
9947
9954
|
}
|
|
9948
9955
|
}
|
|
9949
|
-
|
|
9950
|
-
const turnPromise = new Promise((resolve21) => {
|
|
9951
|
-
this.turnDoneResolver = resolve21;
|
|
9952
|
-
});
|
|
9953
|
-
await this.session.submit({
|
|
9954
|
-
type: "TurnInput",
|
|
9955
|
-
request: {
|
|
9956
|
-
text: line
|
|
9957
|
-
}
|
|
9958
|
-
});
|
|
9959
|
-
await turnPromise;
|
|
9960
|
-
} catch (err) {
|
|
9961
|
-
console.error(style.red(`Failed to submit turn: ${err instanceof Error ? err.message : String(err)}
|
|
9962
|
-
`));
|
|
9963
|
-
}
|
|
9956
|
+
await this.submitTurn(line);
|
|
9964
9957
|
}
|
|
9965
9958
|
await this.close();
|
|
9966
9959
|
}
|
|
9960
|
+
async submitTurn(text) {
|
|
9961
|
+
try {
|
|
9962
|
+
const turnPromise = new Promise((resolve21) => {
|
|
9963
|
+
this.turnDoneResolver = resolve21;
|
|
9964
|
+
});
|
|
9965
|
+
await this.session.submit({
|
|
9966
|
+
type: "TurnInput",
|
|
9967
|
+
request: {
|
|
9968
|
+
text
|
|
9969
|
+
}
|
|
9970
|
+
});
|
|
9971
|
+
await turnPromise;
|
|
9972
|
+
} catch (err) {
|
|
9973
|
+
console.error(style.red(`Failed to submit turn: ${err instanceof Error ? err.message : String(err)}
|
|
9974
|
+
`));
|
|
9975
|
+
}
|
|
9976
|
+
}
|
|
9967
9977
|
async close() {
|
|
9968
9978
|
if (this.isClosed)
|
|
9969
9979
|
return;
|