shiva-code 0.7.15 → 0.7.16
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 +39 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12845,7 +12845,7 @@ function detectInstallationType() {
|
|
|
12845
12845
|
}
|
|
12846
12846
|
return "npm";
|
|
12847
12847
|
}
|
|
12848
|
-
var CLI_VERSION = "0.7.
|
|
12848
|
+
var CLI_VERSION = "0.7.16";
|
|
12849
12849
|
function getCurrentVersion() {
|
|
12850
12850
|
try {
|
|
12851
12851
|
const output = execSync3(`npm list -g ${PACKAGE_NAME} --depth=0 --json 2>/dev/null`, {
|
|
@@ -16602,7 +16602,7 @@ sandboxCommand.command("delete <id>").description("Sandbox l\xF6schen").option("
|
|
|
16602
16602
|
|
|
16603
16603
|
// src/index.ts
|
|
16604
16604
|
var program = new Command41();
|
|
16605
|
-
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.
|
|
16605
|
+
program.name("shiva").description("SHIVA Code - Control Station for Claude Code").version("0.7.16").option("--debug", "Debug-Modus aktivieren").hook("preAction", (thisCommand) => {
|
|
16606
16606
|
const opts = thisCommand.opts();
|
|
16607
16607
|
if (opts.debug) {
|
|
16608
16608
|
enableDebug();
|
|
@@ -16741,12 +16741,19 @@ async function interactiveMenu(choices, shortcuts) {
|
|
|
16741
16741
|
process.stdin.on("keypress", handler);
|
|
16742
16742
|
});
|
|
16743
16743
|
}
|
|
16744
|
+
function drawBox(title, width = 50) {
|
|
16745
|
+
const innerWidth = width - 2;
|
|
16746
|
+
const titleLen = title.length;
|
|
16747
|
+
const paddingLeft = Math.floor((innerWidth - titleLen) / 2);
|
|
16748
|
+
const paddingRight = innerWidth - titleLen - paddingLeft;
|
|
16749
|
+
console.log(colors.orange(" \u256D" + "\u2500".repeat(innerWidth) + "\u256E"));
|
|
16750
|
+
console.log(colors.orange(" \u2502") + " ".repeat(paddingLeft) + colors.bold(title) + " ".repeat(paddingRight) + colors.orange("\u2502"));
|
|
16751
|
+
console.log(colors.orange(" \u2570" + "\u2500".repeat(innerWidth) + "\u256F"));
|
|
16752
|
+
}
|
|
16744
16753
|
async function showDashboard() {
|
|
16745
16754
|
console.clear();
|
|
16746
16755
|
log.newline();
|
|
16747
|
-
|
|
16748
|
-
console.log(colors.orange.bold("\u2502 SHIVA Control Station \u2502"));
|
|
16749
|
-
console.log(colors.orange.bold("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"));
|
|
16756
|
+
drawBox("SHIVA Control Station", 44);
|
|
16750
16757
|
log.newline();
|
|
16751
16758
|
if (!isClaudeInstalled()) {
|
|
16752
16759
|
console.log(colors.yellow(" \u26A0 Claude Code nicht installiert"));
|
|
@@ -16757,55 +16764,56 @@ async function showDashboard() {
|
|
|
16757
16764
|
const packages = getAllPackages();
|
|
16758
16765
|
const recentProjects = projects.filter((p) => p.sessions.length > 0).slice(0, 5);
|
|
16759
16766
|
if (recentProjects.length === 0 && packages.length === 0) {
|
|
16760
|
-
log.dim("Keine Sessions
|
|
16767
|
+
console.log(colors.dim(" Keine Sessions gefunden."));
|
|
16761
16768
|
log.newline();
|
|
16762
|
-
log.
|
|
16763
|
-
log.
|
|
16769
|
+
console.log(" " + colors.cyan("\u2192") + " Starte Claude Code in einem Projekt");
|
|
16770
|
+
console.log(" " + colors.cyan("\u2192") + " Oder: " + colors.bold('shiva package create "Name"'));
|
|
16764
16771
|
log.newline();
|
|
16765
16772
|
showHelpMenu();
|
|
16766
16773
|
return;
|
|
16767
16774
|
}
|
|
16768
16775
|
const choices = [];
|
|
16769
16776
|
if (recentProjects.length > 0) {
|
|
16770
|
-
choices.push({
|
|
16771
|
-
name: colors.dim("\u2500\u2500\u2500 Letzte Projekte \u2500\u2500\u2500"),
|
|
16772
|
-
value: { type: "separator" }
|
|
16773
|
-
});
|
|
16774
16777
|
for (const project of recentProjects) {
|
|
16775
16778
|
const latest = project.latestSession;
|
|
16776
|
-
const time = formatRelativeTime(latest.modified)
|
|
16777
|
-
const branch =
|
|
16778
|
-
const msgs = `${latest.messageCount} msgs
|
|
16779
|
+
const time = formatRelativeTime(latest.modified);
|
|
16780
|
+
const branch = latest.gitBranch || "main";
|
|
16781
|
+
const msgs = `${latest.messageCount} msgs`;
|
|
16782
|
+
const name = project.projectName.slice(0, 16).padEnd(16);
|
|
16783
|
+
const timeStr = colors.dim(`(${time})`.padEnd(8));
|
|
16784
|
+
const branchStr = colors.cyan(branch.slice(0, 10).padEnd(10));
|
|
16785
|
+
const msgsStr = colors.dim(msgs.padStart(10));
|
|
16779
16786
|
choices.push({
|
|
16780
|
-
name:
|
|
16787
|
+
name: `${name} ${timeStr} ${branchStr} ${msgsStr}`,
|
|
16781
16788
|
value: { type: "resume", data: project }
|
|
16782
16789
|
});
|
|
16783
16790
|
}
|
|
16784
|
-
}
|
|
16785
|
-
if (packages.length > 0) {
|
|
16786
16791
|
choices.push({
|
|
16787
|
-
name: colors.dim("\u2500\u2500\u2500
|
|
16792
|
+
name: colors.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
16788
16793
|
value: { type: "separator" }
|
|
16789
16794
|
});
|
|
16790
|
-
|
|
16795
|
+
}
|
|
16796
|
+
if (packages.length > 0) {
|
|
16797
|
+
for (const pkg of packages.slice(0, 2)) {
|
|
16791
16798
|
const count = `${pkg.projects.length} Projekte`;
|
|
16792
16799
|
choices.push({
|
|
16793
|
-
name:
|
|
16800
|
+
name: `\u{1F4E6} ${pkg.name.padEnd(14)} ${colors.dim(count)}`,
|
|
16794
16801
|
value: { type: "package", data: pkg.name }
|
|
16795
16802
|
});
|
|
16796
16803
|
}
|
|
16804
|
+
choices.push({
|
|
16805
|
+
name: colors.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
16806
|
+
value: { type: "separator" }
|
|
16807
|
+
});
|
|
16797
16808
|
}
|
|
16798
|
-
choices.push({
|
|
16799
|
-
name: colors.dim("\u2500\u2500\u2500 Aktionen \u2500\u2500\u2500"),
|
|
16800
|
-
value: { type: "separator" }
|
|
16801
|
-
});
|
|
16802
16809
|
choices.push(
|
|
16803
|
-
{ name: colors.
|
|
16804
|
-
{ name: colors.
|
|
16805
|
-
{ name: colors.
|
|
16806
|
-
{ name: colors.
|
|
16807
|
-
{ name: colors.
|
|
16808
|
-
{ name: colors.
|
|
16810
|
+
{ name: colors.orange("[S]") + " Sessions " + colors.dim("Alle anzeigen"), value: { type: "sessions" } },
|
|
16811
|
+
{ name: colors.orange("[P]") + " Packages " + colors.dim("Verwalten"), value: { type: "packages" } },
|
|
16812
|
+
{ name: colors.orange("[G]") + " Issues " + colors.dim("GitHub Issues"), value: { type: "issues" } },
|
|
16813
|
+
{ name: colors.orange("[R]") + " PRs " + colors.dim("Pull Requests"), value: { type: "prs" } },
|
|
16814
|
+
{ name: colors.orange("[C]") + " Config " + colors.dim("Einstellungen"), value: { type: "config" } },
|
|
16815
|
+
{ name: colors.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"), value: { type: "separator" } },
|
|
16816
|
+
{ name: colors.red("[Q]") + " Beenden", value: { type: "quit" } }
|
|
16809
16817
|
);
|
|
16810
16818
|
const shortcuts = {
|
|
16811
16819
|
"s": "sessions",
|