@austinthesing/magic-shell 0.2.3 → 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/dist/cli.js CHANGED
@@ -22384,7 +22384,7 @@ function getStatusBarContent() {
22384
22384
  function getHelpBarContent() {
22385
22385
  const theme = getTheme();
22386
22386
  if (awaitingConfirmation) {
22387
- return t`${fg(theme.colors.warning)("[Enter] Run")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.error)("[Esc] Cancel")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.primary)("[e] Edit")}`;
22387
+ 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
22388
  }
22389
22389
  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
22390
  }
@@ -22506,14 +22506,16 @@ function createAssistantMessageRenderable(msg, theme) {
22506
22506
  if (isSelected && !msg.executed) {
22507
22507
  const actionsText = new TextRenderable(renderer, {
22508
22508
  id: `msg-${msg.id}-actions`,
22509
- content: t`${fg(theme.colors.warning)("[Enter]")} ${fg(theme.colors.textMuted)("Run")} ${fg(theme.colors.primary)("[c]")} ${fg(theme.colors.textMuted)("Copy")} ${fg(theme.colors.primary)("[e]")} ${fg(theme.colors.textMuted)("Edit")}`
22509
+ 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
22510
  });
22511
22511
  card.add(actionsText);
22512
22512
  }
22513
22513
  if (msg.executed) {
22514
+ const wasAutoRun = !msg.safety?.isDangerous;
22515
+ const execLabel = wasAutoRun ? "Auto-executed (safe)" : "Executed";
22514
22516
  const execText = new TextRenderable(renderer, {
22515
22517
  id: `msg-${msg.id}-exec`,
22516
- content: t`${fg(theme.colors.success)("Executed")}`
22518
+ content: t`${fg(theme.colors.success)("")} ${fg(theme.colors.success)(execLabel)}`
22517
22519
  });
22518
22520
  card.add(execText);
22519
22521
  }
package/dist/tui.js CHANGED
@@ -22384,7 +22384,7 @@ function getStatusBarContent() {
22384
22384
  function getHelpBarContent() {
22385
22385
  const theme = getTheme();
22386
22386
  if (awaitingConfirmation) {
22387
- return t`${fg(theme.colors.warning)("[Enter] Run")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.error)("[Esc] Cancel")} ${fg(theme.colors.textMuted)("|")} ${fg(theme.colors.primary)("[e] Edit")}`;
22387
+ 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
22388
  }
22389
22389
  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
22390
  }
@@ -22506,14 +22506,16 @@ function createAssistantMessageRenderable(msg, theme) {
22506
22506
  if (isSelected && !msg.executed) {
22507
22507
  const actionsText = new TextRenderable(renderer, {
22508
22508
  id: `msg-${msg.id}-actions`,
22509
- content: t`${fg(theme.colors.warning)("[Enter]")} ${fg(theme.colors.textMuted)("Run")} ${fg(theme.colors.primary)("[c]")} ${fg(theme.colors.textMuted)("Copy")} ${fg(theme.colors.primary)("[e]")} ${fg(theme.colors.textMuted)("Edit")}`
22509
+ 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
22510
  });
22511
22511
  card.add(actionsText);
22512
22512
  }
22513
22513
  if (msg.executed) {
22514
+ const wasAutoRun = !msg.safety?.isDangerous;
22515
+ const execLabel = wasAutoRun ? "Auto-executed (safe)" : "Executed";
22514
22516
  const execText = new TextRenderable(renderer, {
22515
22517
  id: `msg-${msg.id}-exec`,
22516
- content: t`${fg(theme.colors.success)("Executed")}`
22518
+ content: t`${fg(theme.colors.success)("")} ${fg(theme.colors.success)(execLabel)}`
22517
22519
  });
22518
22520
  card.add(execText);
22519
22521
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@austinthesing/magic-shell",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
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",