drexler 0.2.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2
4
+
5
+ - Added argument suggestions in the slash command palette for `/theme`, `/startup`, `/retry`, `/export`, and `/model`.
6
+ - Kept argument suggestion rows concise by avoiding duplicated hint copy.
7
+
8
+ ## 0.2.1
9
+
10
+ - Fixed slash command help and palette coverage so every implemented command is discoverable.
11
+ - Kept overlapping slash-command previews visible, such as `/save` with `/save-last` and `/re` with `/regenerate`, `/redo`, and `/retry`.
12
+
3
13
  ## 0.2.0
4
14
 
5
15
  - Added premium Ink chat chrome with responsive header, transcript viewport, command palette, input, live spinner, and streaming response states.
package/README.md CHANGED
@@ -104,6 +104,7 @@ rm -rf ~/.config/drexler # optional: wipe stored key + settings
104
104
  | `/startup fast\|no-intro\|normal` | persist startup behavior for future launches |
105
105
  | `/history` | message count + approx tokens |
106
106
  | `/regenerate` | re-roll last response |
107
+ | `/redo` | alias for `/regenerate` |
107
108
  | `/retry terse\|brutal` | re-roll last response with a style mandate |
108
109
  | `/expand` | print Drexler's latest response |
109
110
  | `/quote` | quote Drexler's latest response |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drexler",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "CLI chat with Drexler, a corporate-executive AI persona built on OpenRouter Gemma 4 31B.",
5
5
  "license": "MIT",
6
6
  "author": "showOS",
package/src/commands.ts CHANGED
@@ -38,6 +38,7 @@ const HELP_TEXT = `New memo to staff! Drexler permit following directives:
38
38
  /startup - persist startup mode (fast, no-intro, normal)
39
39
  /history - count messages and approximate tokens
40
40
  /regenerate - re-roll Drexler's last response
41
+ /redo - alias for /regenerate
41
42
  /retry [style] - re-roll last response, optionally terse or brutal
42
43
  /expand - print Drexler's latest response
43
44
  /quote - quote Drexler's latest response
@@ -64,6 +65,7 @@ export const COMMAND_PALETTE: ReadonlyArray<SlashCommand> = [
64
65
  { name: "/startup", description: "Persist startup mode" },
65
66
  { name: "/history", description: "Message + token count" },
66
67
  { name: "/regenerate", description: "Re-roll last response" },
68
+ { name: "/redo", description: "Alias for regenerate" },
67
69
  { name: "/retry", description: "Retry terse or brutal" },
68
70
  { name: "/expand", description: "Print last response" },
69
71
  { name: "/quote", description: "Quote last response" },
@@ -74,13 +76,75 @@ export const COMMAND_PALETTE: ReadonlyArray<SlashCommand> = [
74
76
  { name: "/copy-last", description: "Copy last response" },
75
77
  ];
76
78
 
79
+ const ARGUMENT_PALETTE: ReadonlyArray<{
80
+ readonly command: string;
81
+ readonly values: ReadonlyArray<SlashCommand>;
82
+ }> = [
83
+ {
84
+ command: "/theme",
85
+ values: [
86
+ ...THEME_NAMES.map((name) => ({
87
+ name: `/theme ${name}`,
88
+ description: `Switch to ${name} theme`,
89
+ })),
90
+ { name: "/theme save", description: "Save current theme as default" },
91
+ ],
92
+ },
93
+ {
94
+ command: "/startup",
95
+ values: [
96
+ { name: "/startup fast", description: "Persist fast startup" },
97
+ { name: "/startup no-intro", description: "Skip intro on launch" },
98
+ { name: "/startup normal", description: "Restore full intro" },
99
+ ],
100
+ },
101
+ {
102
+ command: "/retry",
103
+ values: [
104
+ { name: "/retry terse", description: "Retry in two sentences" },
105
+ { name: "/retry brutal", description: "Retry more forcefully" },
106
+ ],
107
+ },
108
+ {
109
+ command: "/export",
110
+ values: [
111
+ { name: "/export md", description: "Export markdown transcript" },
112
+ { name: "/export txt", description: "Export plain text transcript" },
113
+ { name: "/export json", description: "Export structured JSON" },
114
+ { name: "/export html", description: "Export printable HTML" },
115
+ ],
116
+ },
117
+ {
118
+ command: "/model",
119
+ values: [
120
+ { name: "/model 31b", description: "Use primary 31b model" },
121
+ { name: "/model 26b", description: "Use fallback 26b model" },
122
+ ],
123
+ },
124
+ ];
125
+
126
+ function filterArgumentPalette(input: string): ReadonlyArray<SlashCommand> {
127
+ const lower = input.toLowerCase();
128
+ for (const group of ARGUMENT_PALETTE) {
129
+ const prefix = `${group.command} `;
130
+ if (!lower.startsWith(prefix)) continue;
131
+ const argPrefix = lower.slice(prefix.length);
132
+ return group.values.filter((item) =>
133
+ item.name.toLowerCase().startsWith(lower),
134
+ ).filter((item) => {
135
+ if (argPrefix.trim() === "") return true;
136
+ return item.name.toLowerCase().slice(prefix.length).startsWith(argPrefix);
137
+ });
138
+ }
139
+ return [];
140
+ }
141
+
77
142
  export function filterPaletteByPrefix(
78
143
  input: string,
79
144
  ): ReadonlyArray<SlashCommand> {
80
- if (!input.startsWith("/") || input.includes(" ")) return [];
145
+ if (!input.startsWith("/")) return [];
146
+ if (input.includes(" ")) return filterArgumentPalette(input);
81
147
  const prefix = input.toLowerCase();
82
- const exact = COMMAND_PALETTE.find((c) => c.name.toLowerCase() === prefix);
83
- if (exact) return [exact];
84
148
  return COMMAND_PALETTE.filter((c) =>
85
149
  c.name.toLowerCase().startsWith(prefix),
86
150
  );
package/src/index.ts CHANGED
@@ -58,6 +58,7 @@ Slash commands inside REPL:
58
58
  /startup [mode] persist startup mode: fast, no-intro, normal
59
59
  /history message + token count
60
60
  /regenerate re-roll last response
61
+ /redo alias for /regenerate
61
62
  /retry [style] re-roll last response as terse or brutal
62
63
  /expand print latest response
63
64
  /quote quote latest response
@@ -20,6 +20,7 @@ const COMMAND_HINTS: Record<string, string> = {
20
20
  "/startup": "/startup fast",
21
21
  "/history": "show ledger stats",
22
22
  "/regenerate": "retry last answer",
23
+ "/redo": "same as /regenerate",
23
24
  "/retry": "/retry terse",
24
25
  "/expand": "print latest response",
25
26
  "/quote": "quote latest response",
@@ -89,7 +90,10 @@ function CommandPaletteInner({ items, selectedIdx, width = 80 }: Props) {
89
90
  </Box>
90
91
  {items.map((item, idx) => {
91
92
  const sel = idx === selectedIdx;
92
- const hint = COMMAND_HINTS[item.name] ?? item.description;
93
+ const isArgumentSuggestion = item.name.includes(" ");
94
+ const hint = isArgumentSuggestion
95
+ ? ""
96
+ : COMMAND_HINTS[item.name] ?? item.description;
93
97
  const name = item.name.padEnd(maxNameW + 1);
94
98
  const desc = fitDisplayText(item.description, descBudget);
95
99
  const clippedHint =