codemaxxing 0.4.2 → 0.4.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/dist/index.js +21 -6
- package/package.json +1 -1
- package/src/index.tsx +20 -6
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { listServers, addServer, removeServer, getConnectedServers } from "./uti
|
|
|
16
16
|
import { detectHardware, formatBytes } from "./utils/hardware.js";
|
|
17
17
|
import { getRecommendationsWithLlmfit, getFitIcon, isLlmfitAvailable } from "./utils/models.js";
|
|
18
18
|
import { isOllamaInstalled, isOllamaRunning, getOllamaInstallCommand, startOllama, stopOllama, pullModel, listInstalledModelsDetailed, deleteModel, getGPUMemoryUsage } from "./utils/ollama.js";
|
|
19
|
-
const VERSION = "
|
|
19
|
+
const VERSION = require("../package.json").version;
|
|
20
20
|
// ── Helpers ──
|
|
21
21
|
function formatTimeAgo(date) {
|
|
22
22
|
const secs = Math.floor((Date.now() - date.getTime()) / 1000);
|
|
@@ -1463,15 +1463,30 @@ function App() {
|
|
|
1463
1463
|
if (key.return) {
|
|
1464
1464
|
// Auto-install Ollama if not present
|
|
1465
1465
|
if (!isOllamaInstalled()) {
|
|
1466
|
-
addMsg("info", "📦 Installing Ollama...");
|
|
1466
|
+
addMsg("info", "📦 Installing Ollama... (this may take a minute)");
|
|
1467
1467
|
const installCmd = getOllamaInstallCommand(wizardHardware?.os ?? "linux");
|
|
1468
1468
|
try {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1469
|
+
// Use pipe instead of inherit — Ink TUI conflicts with inherit stdio
|
|
1470
|
+
const parts = installCmd.split(" ");
|
|
1471
|
+
const result = require("child_process").spawnSync(parts[0], parts.slice(1), {
|
|
1472
|
+
stdio: "pipe",
|
|
1473
|
+
timeout: 180000,
|
|
1474
|
+
shell: true,
|
|
1475
|
+
encoding: "utf-8",
|
|
1476
|
+
});
|
|
1477
|
+
if (result.status === 0) {
|
|
1478
|
+
addMsg("info", "✅ Ollama installed!");
|
|
1479
|
+
}
|
|
1480
|
+
else {
|
|
1481
|
+
const errMsg = (result.stderr || result.stdout || "").trim().split("\n").pop() || "Unknown error";
|
|
1482
|
+
addMsg("error", `Install failed: ${errMsg}`);
|
|
1483
|
+
addMsg("info", `Try manually in a separate terminal: ${installCmd}`);
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1472
1486
|
}
|
|
1473
1487
|
catch (e) {
|
|
1474
|
-
addMsg("error", `
|
|
1488
|
+
addMsg("error", `Install failed: ${e.message}`);
|
|
1489
|
+
addMsg("info", `Try manually in a separate terminal: ${installCmd}`);
|
|
1475
1490
|
return;
|
|
1476
1491
|
}
|
|
1477
1492
|
}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { detectHardware, formatBytes, type HardwareInfo } from "./utils/hardware
|
|
|
17
17
|
import { getRecommendations, getRecommendationsWithLlmfit, getFitIcon, isLlmfitAvailable, type ScoredModel } from "./utils/models.js";
|
|
18
18
|
import { isOllamaInstalled, isOllamaRunning, getOllamaInstallCommand, startOllama, stopOllama, pullModel, listInstalledModelsDetailed, deleteModel, getGPUMemoryUsage, type PullProgress } from "./utils/ollama.js";
|
|
19
19
|
|
|
20
|
-
const VERSION = "
|
|
20
|
+
const VERSION = require("../package.json").version;
|
|
21
21
|
|
|
22
22
|
// ── Helpers ──
|
|
23
23
|
function formatTimeAgo(date: Date): string {
|
|
@@ -1487,14 +1487,28 @@ function App() {
|
|
|
1487
1487
|
if (key.return) {
|
|
1488
1488
|
// Auto-install Ollama if not present
|
|
1489
1489
|
if (!isOllamaInstalled()) {
|
|
1490
|
-
addMsg("info", "📦 Installing Ollama...");
|
|
1490
|
+
addMsg("info", "📦 Installing Ollama... (this may take a minute)");
|
|
1491
1491
|
const installCmd = getOllamaInstallCommand(wizardHardware?.os ?? "linux");
|
|
1492
1492
|
try {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1493
|
+
// Use pipe instead of inherit — Ink TUI conflicts with inherit stdio
|
|
1494
|
+
const parts = installCmd.split(" ");
|
|
1495
|
+
const result = require("child_process").spawnSync(parts[0], parts.slice(1), {
|
|
1496
|
+
stdio: "pipe",
|
|
1497
|
+
timeout: 180000,
|
|
1498
|
+
shell: true,
|
|
1499
|
+
encoding: "utf-8",
|
|
1500
|
+
});
|
|
1501
|
+
if (result.status === 0) {
|
|
1502
|
+
addMsg("info", "✅ Ollama installed!");
|
|
1503
|
+
} else {
|
|
1504
|
+
const errMsg = (result.stderr || result.stdout || "").trim().split("\n").pop() || "Unknown error";
|
|
1505
|
+
addMsg("error", `Install failed: ${errMsg}`);
|
|
1506
|
+
addMsg("info", `Try manually in a separate terminal: ${installCmd}`);
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1496
1509
|
} catch (e: any) {
|
|
1497
|
-
addMsg("error", `
|
|
1510
|
+
addMsg("error", `Install failed: ${e.message}`);
|
|
1511
|
+
addMsg("info", `Try manually in a separate terminal: ${installCmd}`);
|
|
1498
1512
|
return;
|
|
1499
1513
|
}
|
|
1500
1514
|
}
|