@austinthesing/magic-shell 0.2.3 → 0.2.5
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.md +1 -1
- package/dist/cli.js +9 -8
- package/dist/index.js +3 -4
- package/dist/tui.js +9 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ OpenCode Zen provides curated models optimized for coding tasks, including **fre
|
|
|
176
176
|
**Free Models:**
|
|
177
177
|
- `big-pickle` - Stealth model (default)
|
|
178
178
|
- `grok-code` - xAI's Grok Code Fast 1
|
|
179
|
-
- `glm-4.7
|
|
179
|
+
- `glm-4.7` - GLM 4.7
|
|
180
180
|
- `minimax-m2.1-free` - MiniMax M2.1
|
|
181
181
|
|
|
182
182
|
**Premium Models:**
|
package/dist/cli.js
CHANGED
|
@@ -20569,13 +20569,12 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
20569
20569
|
free: true
|
|
20570
20570
|
},
|
|
20571
20571
|
{
|
|
20572
|
-
id: "glm-4.7
|
|
20572
|
+
id: "glm-4.7",
|
|
20573
20573
|
name: "GLM 4.7",
|
|
20574
|
-
description: "
|
|
20574
|
+
description: "GLM model",
|
|
20575
20575
|
category: "fast",
|
|
20576
20576
|
provider: "opencode-zen",
|
|
20577
|
-
contextLength: 128000
|
|
20578
|
-
free: true
|
|
20577
|
+
contextLength: 128000
|
|
20579
20578
|
},
|
|
20580
20579
|
{
|
|
20581
20580
|
id: "minimax-m2.1-free",
|
|
@@ -22384,14 +22383,14 @@ function getStatusBarContent() {
|
|
|
22384
22383
|
function getHelpBarContent() {
|
|
22385
22384
|
const theme = getTheme();
|
|
22386
22385
|
if (awaitingConfirmation) {
|
|
22387
|
-
return t`${fg(theme.colors.warning)("
|
|
22386
|
+
return t`${fg(theme.colors.warning)(">>> Press Enter to execute command <<<")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.error)("Esc")}${fg(theme.colors.textMuted)(" Cancel")} ${fg(theme.colors.primary)("e")}${fg(theme.colors.textMuted)(" Edit")} ${fg(theme.colors.primary)("c")}${fg(theme.colors.textMuted)(" Copy")}`;
|
|
22388
22387
|
}
|
|
22389
22388
|
return t`${fg(theme.colors.textMuted)("Ctrl+X")} ${fg(theme.colors.primary)("P")}${fg(theme.colors.textMuted)(" Palette")} ${fg(theme.colors.primary)("M")}${fg(theme.colors.textMuted)(" Model")} ${fg(theme.colors.primary)("T")}${fg(theme.colors.textMuted)(" Theme")} ${fg(theme.colors.primary)("D")}${fg(theme.colors.textMuted)(" Dry-run")} ${fg(theme.colors.primary)("?")}${fg(theme.colors.textMuted)(" Help")}`;
|
|
22390
22389
|
}
|
|
22391
22390
|
function getWelcomeMessage() {
|
|
22392
22391
|
const providerName = config.provider === "opencode-zen" ? "OpenCode Zen" : "OpenRouter";
|
|
22393
22392
|
const freeNote = config.provider === "opencode-zen" ? `
|
|
22394
|
-
Free models: big-pickle
|
|
22393
|
+
Free models: big-pickle` : "";
|
|
22395
22394
|
return `Ready. Using ${providerName}.${freeNote}
|
|
22396
22395
|
Type what you want to do, or press Ctrl+X P for command palette.`;
|
|
22397
22396
|
}
|
|
@@ -22506,14 +22505,16 @@ function createAssistantMessageRenderable(msg, theme) {
|
|
|
22506
22505
|
if (isSelected && !msg.executed) {
|
|
22507
22506
|
const actionsText = new TextRenderable(renderer, {
|
|
22508
22507
|
id: `msg-${msg.id}-actions`,
|
|
22509
|
-
content: t`${fg(theme.colors.warning)("
|
|
22508
|
+
content: t`${fg(theme.colors.warning)("Press Enter to run")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.primary)("[c]")} ${fg(theme.colors.textMuted)("Copy")} ${fg(theme.colors.primary)("[e]")} ${fg(theme.colors.textMuted)("Edit")} ${fg(theme.colors.error)("[Esc]")} ${fg(theme.colors.textMuted)("Cancel")}`
|
|
22510
22509
|
});
|
|
22511
22510
|
card.add(actionsText);
|
|
22512
22511
|
}
|
|
22513
22512
|
if (msg.executed) {
|
|
22513
|
+
const wasAutoRun = !msg.safety?.isDangerous;
|
|
22514
|
+
const execLabel = wasAutoRun ? "Auto-executed (safe)" : "Executed";
|
|
22514
22515
|
const execText = new TextRenderable(renderer, {
|
|
22515
22516
|
id: `msg-${msg.id}-exec`,
|
|
22516
|
-
content: t`${fg(theme.colors.success)("
|
|
22517
|
+
content: t`${fg(theme.colors.success)("✓")} ${fg(theme.colors.success)(execLabel)}`
|
|
22517
22518
|
});
|
|
22518
22519
|
card.add(execText);
|
|
22519
22520
|
}
|
package/dist/index.js
CHANGED
|
@@ -112,13 +112,12 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
112
112
|
free: true
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
id: "glm-4.7
|
|
115
|
+
id: "glm-4.7",
|
|
116
116
|
name: "GLM 4.7",
|
|
117
|
-
description: "
|
|
117
|
+
description: "GLM model",
|
|
118
118
|
category: "fast",
|
|
119
119
|
provider: "opencode-zen",
|
|
120
|
-
contextLength: 128000
|
|
121
|
-
free: true
|
|
120
|
+
contextLength: 128000
|
|
122
121
|
},
|
|
123
122
|
{
|
|
124
123
|
id: "minimax-m2.1-free",
|
package/dist/tui.js
CHANGED
|
@@ -20569,13 +20569,12 @@ var OPENCODE_ZEN_MODELS = [
|
|
|
20569
20569
|
free: true
|
|
20570
20570
|
},
|
|
20571
20571
|
{
|
|
20572
|
-
id: "glm-4.7
|
|
20572
|
+
id: "glm-4.7",
|
|
20573
20573
|
name: "GLM 4.7",
|
|
20574
|
-
description: "
|
|
20574
|
+
description: "GLM model",
|
|
20575
20575
|
category: "fast",
|
|
20576
20576
|
provider: "opencode-zen",
|
|
20577
|
-
contextLength: 128000
|
|
20578
|
-
free: true
|
|
20577
|
+
contextLength: 128000
|
|
20579
20578
|
},
|
|
20580
20579
|
{
|
|
20581
20580
|
id: "minimax-m2.1-free",
|
|
@@ -22384,14 +22383,14 @@ function getStatusBarContent() {
|
|
|
22384
22383
|
function getHelpBarContent() {
|
|
22385
22384
|
const theme = getTheme();
|
|
22386
22385
|
if (awaitingConfirmation) {
|
|
22387
|
-
return t`${fg(theme.colors.warning)("
|
|
22386
|
+
return t`${fg(theme.colors.warning)(">>> Press Enter to execute command <<<")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.error)("Esc")}${fg(theme.colors.textMuted)(" Cancel")} ${fg(theme.colors.primary)("e")}${fg(theme.colors.textMuted)(" Edit")} ${fg(theme.colors.primary)("c")}${fg(theme.colors.textMuted)(" Copy")}`;
|
|
22388
22387
|
}
|
|
22389
22388
|
return t`${fg(theme.colors.textMuted)("Ctrl+X")} ${fg(theme.colors.primary)("P")}${fg(theme.colors.textMuted)(" Palette")} ${fg(theme.colors.primary)("M")}${fg(theme.colors.textMuted)(" Model")} ${fg(theme.colors.primary)("T")}${fg(theme.colors.textMuted)(" Theme")} ${fg(theme.colors.primary)("D")}${fg(theme.colors.textMuted)(" Dry-run")} ${fg(theme.colors.primary)("?")}${fg(theme.colors.textMuted)(" Help")}`;
|
|
22390
22389
|
}
|
|
22391
22390
|
function getWelcomeMessage() {
|
|
22392
22391
|
const providerName = config.provider === "opencode-zen" ? "OpenCode Zen" : "OpenRouter";
|
|
22393
22392
|
const freeNote = config.provider === "opencode-zen" ? `
|
|
22394
|
-
Free models: big-pickle
|
|
22393
|
+
Free models: big-pickle` : "";
|
|
22395
22394
|
return `Ready. Using ${providerName}.${freeNote}
|
|
22396
22395
|
Type what you want to do, or press Ctrl+X P for command palette.`;
|
|
22397
22396
|
}
|
|
@@ -22506,14 +22505,16 @@ function createAssistantMessageRenderable(msg, theme) {
|
|
|
22506
22505
|
if (isSelected && !msg.executed) {
|
|
22507
22506
|
const actionsText = new TextRenderable(renderer, {
|
|
22508
22507
|
id: `msg-${msg.id}-actions`,
|
|
22509
|
-
content: t`${fg(theme.colors.warning)("
|
|
22508
|
+
content: t`${fg(theme.colors.warning)("Press Enter to run")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.primary)("[c]")} ${fg(theme.colors.textMuted)("Copy")} ${fg(theme.colors.primary)("[e]")} ${fg(theme.colors.textMuted)("Edit")} ${fg(theme.colors.error)("[Esc]")} ${fg(theme.colors.textMuted)("Cancel")}`
|
|
22510
22509
|
});
|
|
22511
22510
|
card.add(actionsText);
|
|
22512
22511
|
}
|
|
22513
22512
|
if (msg.executed) {
|
|
22513
|
+
const wasAutoRun = !msg.safety?.isDangerous;
|
|
22514
|
+
const execLabel = wasAutoRun ? "Auto-executed (safe)" : "Executed";
|
|
22514
22515
|
const execText = new TextRenderable(renderer, {
|
|
22515
22516
|
id: `msg-${msg.id}-exec`,
|
|
22516
|
-
content: t`${fg(theme.colors.success)("
|
|
22517
|
+
content: t`${fg(theme.colors.success)("✓")} ${fg(theme.colors.success)(execLabel)}`
|
|
22517
22518
|
});
|
|
22518
22519
|
card.add(execText);
|
|
22519
22520
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@austinthesing/magic-shell",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Natural language to terminal commands with safety features. Supports OpenCode Zen (with free models) and OpenRouter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|