@ryukin-dev/pi-featherless-kali 1.1.1 → 1.1.2
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/CHANGELOG.md +5 -0
- package/bin/kaliai.js +20 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
- `kaliai` installiert den Pi Coding Agent automatisch, wenn er fehlt.
|
|
6
|
+
- Kein manueller `npm install -g @earendil-works/pi-coding-agent` mehr nötig.
|
|
7
|
+
|
|
3
8
|
## 1.1.1
|
|
4
9
|
|
|
5
10
|
- Unerwünschte Abhängigkeiten (`puppeteer`, `openai`, `JSONStream`) entfernt.
|
package/bin/kaliai.js
CHANGED
|
@@ -32,6 +32,25 @@ function getPiCliPath() {
|
|
|
32
32
|
return join(root, PI_PACKAGE, "dist", "cli.js");
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
function ensurePiAgentInstalled() {
|
|
36
|
+
const piCli = getPiCliPath();
|
|
37
|
+
if (piCli && existsSync(piCli)) return piCli;
|
|
38
|
+
print("==> Pi Coding Agent wird installiert...");
|
|
39
|
+
const result = spawnSync("npm", ["install", "-g", PI_PACKAGE], {
|
|
40
|
+
stdio: "inherit",
|
|
41
|
+
});
|
|
42
|
+
if (result.status !== 0) {
|
|
43
|
+
print("Fehler: Pi Coding Agent konnte nicht installiert werden.");
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
const fresh = getPiCliPath();
|
|
47
|
+
if (!fresh || !existsSync(fresh)) {
|
|
48
|
+
print("Fehler: Pi Coding Agent nicht auffindbar nach der Installation.");
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
return fresh;
|
|
52
|
+
}
|
|
53
|
+
|
|
35
54
|
function readPackageVersion(dir) {
|
|
36
55
|
try {
|
|
37
56
|
const pkg = JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
|
|
@@ -98,13 +117,7 @@ function installExtension() {
|
|
|
98
117
|
|
|
99
118
|
async function startChat() {
|
|
100
119
|
installExtension();
|
|
101
|
-
const piCli =
|
|
102
|
-
if (!piCli || !existsSync(piCli)) {
|
|
103
|
-
print("Fehler: Pi Coding Agent nicht gefunden.");
|
|
104
|
-
print(`Installiere ihn mit:`);
|
|
105
|
-
print(` npm install -g ${PI_PACKAGE}`);
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}
|
|
120
|
+
const piCli = ensurePiAgentInstalled();
|
|
108
121
|
print("==> Starte KaliAI Chat UI...");
|
|
109
122
|
spawnSync(process.execPath, [piCli], { stdio: "inherit" });
|
|
110
123
|
}
|