vipcode 0.2.2 → 0.2.4
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/README.en.md +5 -3
- package/README.md +38 -32
- package/dist/agent.js +6 -6
- package/dist/agents.js +17 -8
- package/dist/app.js +41 -18
- package/dist/catalog.js +7 -0
- package/dist/commands.js +10 -19
- package/dist/images.js +30 -15
- package/dist/index.js +11 -4
- package/dist/limits.js +160 -0
- package/dist/login.js +4 -2
- package/dist/lsp.js +14 -7
- package/dist/paths.js +8 -0
- package/dist/permissions.js +14 -4
- package/dist/prompt.js +17 -1
- package/dist/router.js +139 -2
- package/dist/shell.js +107 -0
- package/dist/tools.js +38 -27
- package/dist/trust.js +5 -2
- package/dist/tui/app.js +29 -10
- package/dist/tui/dialogs.js +4 -2
- package/dist/ui.js +3 -3
- package/dist/update.js +4 -6
- package/package.json +3 -2
package/dist/ui.js
CHANGED
|
@@ -27,10 +27,10 @@ export const ui = {
|
|
|
27
27
|
console.log(pc.bold(pc.magenta("vipcode")) + pc.dim(` · agente ${agent} · ${slots} modelos · /help para ayuda`));
|
|
28
28
|
},
|
|
29
29
|
prompt(agent) {
|
|
30
|
-
if (agent === "
|
|
31
|
-
return pc.blue("
|
|
30
|
+
if (agent === "planear") {
|
|
31
|
+
return pc.blue("planear ❯ ");
|
|
32
32
|
}
|
|
33
|
-
if (agent !== "
|
|
33
|
+
if (agent !== "programar") {
|
|
34
34
|
return pc.yellow(`${agent} ❯ `);
|
|
35
35
|
}
|
|
36
36
|
return pc.magenta("❯ ");
|
package/dist/update.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { PACKAGE_NAME, REPO_URL, VERSION } from "./meta.js";
|
|
6
|
-
import { INSTALL_DIR, UPDATE_PATH, ensureHomeDir } from "./paths.js";
|
|
6
|
+
import { INSTALL_DIR, UPDATE_PATH, ensureHomeDir, isInside } from "./paths.js";
|
|
7
7
|
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
8
8
|
// Carpeta donde está instalado vipcode (la que contiene dist/). VIPCODE_INSTALL_ROOT permite fingir otra en las pruebas
|
|
9
9
|
export function packageRoot() {
|
|
@@ -144,11 +144,9 @@ const NPM = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
|
144
144
|
function lastLines(text, count = 6) {
|
|
145
145
|
return text.trim().split("\n").slice(-count).join("\n");
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function isInstalledIn(dir, parent) {
|
|
148
148
|
try {
|
|
149
|
-
|
|
150
|
-
const base = fs.realpathSync(parent);
|
|
151
|
-
return real === base || real.startsWith(base + path.sep);
|
|
149
|
+
return isInside(fs.realpathSync.native(dir), fs.realpathSync.native(parent));
|
|
152
150
|
}
|
|
153
151
|
catch {
|
|
154
152
|
return false;
|
|
@@ -211,7 +209,7 @@ async function updateFromRelease(root, log) {
|
|
|
211
209
|
}
|
|
212
210
|
const prefix = (await run(NPM, ["prefix", "-g"], os.tmpdir())).output.trim();
|
|
213
211
|
const globalDir = process.platform === "win32" ? path.join(prefix, "node_modules") : path.join(prefix, "lib", "node_modules");
|
|
214
|
-
if (!prefix || !
|
|
212
|
+
if (!prefix || !isInstalledIn(root, globalDir)) {
|
|
215
213
|
return {
|
|
216
214
|
status: "manual",
|
|
217
215
|
message: `Hay una versión nueva (${release.version}, tienes la ${VERSION}), pero este vipcode no está instalado con «npm install -g». Instálala con:\n npm install -g ${release.spec}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vipcode",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Agente de programación para la terminal que usa IAs gratuitas y salta a otro proveedor cuando uno se agota",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"llm",
|
|
12
12
|
"free",
|
|
13
13
|
"terminal",
|
|
14
|
-
"opencode",
|
|
15
14
|
"spanish"
|
|
16
15
|
],
|
|
17
16
|
"homepage": "https://github.com/PabloVip/vipcode#readme",
|
|
@@ -47,6 +46,7 @@
|
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
49
48
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
49
|
+
"cross-spawn": "^7.0.6",
|
|
50
50
|
"fast-glob": "^3.3.3",
|
|
51
51
|
"highlight.js": "^11.12.0",
|
|
52
52
|
"ink": "^8.0.0",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"zod": "^4.6.7"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
+
"@types/cross-spawn": "^6.0.6",
|
|
62
63
|
"@types/node": "^26.6.6",
|
|
63
64
|
"@types/react": "^19.3.0",
|
|
64
65
|
"tsx": "^4.23.15"
|