@lardexx/arenacode 2.11.3 → 2.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lardexx/arenacode",
3
- "version": "2.11.3",
3
+ "version": "2.11.5",
4
4
  "description": "Terminal client for ArenaCode: talks to an arena-bridge, streams the Agent Mode timeline, and runs local commands, file operations and computer automation on your PC (windows-use.dll on Windows, Xlib/XTest on Linux, osascript on macOS). Node port of the ArenaCode desktop client.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
package/src/cli.js CHANGED
@@ -114,7 +114,8 @@ function requireUrl(ctx) {
114
114
  if (ctx.url) return true;
115
115
  write('');
116
116
  write(c.red(' no bridge URL configured.'));
117
- write(` ${c.gray('run:')} ${SELF} init ${c.gray('or')} ${SELF} config set url https://your-bridge.tunnl.gg`);
117
+ write(` ${c.gray('run')} ${SELF} ${c.gray('on a terminal: the first run asks for the URL and the API key.')}`);
118
+ write(` ${c.gray('the URL and the key are also in the bridge runtime/connection.txt;')} ${c.gray('later:')} /settings`);
118
119
  if (SELF !== 'arenacode') write(` ${c.gray('to get the bare command:')} ${INSTALL_HINT}`);
119
120
  return false;
120
121
  }
@@ -378,11 +379,12 @@ async function main(argv) {
378
379
  const { flags, positional } = parseArgs(argv);
379
380
  const command = positional[0];
380
381
 
381
- if (flags.version || command === 'version') {
382
+ // Only the flags: `arenacode help` and `arenacode version` are not subcommands either.
383
+ if (flags.version) {
382
384
  write(VERSION);
383
385
  return 0;
384
386
  }
385
- if (flags.help || command === 'help') return help();
387
+ if (flags.help) return help();
386
388
 
387
389
  if (command !== undefined && !command.startsWith('-')) {
388
390
  // The subcommands are gone: one entry point, the interface. Saying it out loud is
package/src/tui/app.js CHANGED
@@ -485,10 +485,13 @@ class App {
485
485
  if (h) this.push({ kind: 'system', text: `bridge v${h.version} · ${h.executor_mode} · claimable ${h.tasks.claimable}` });
486
486
  else this.toast('bridge unreachable', 'error');
487
487
  } },
488
- { title: 'Settings (bridge URL and API key)', hint: '/settings', run: () => this.openSettings() },
488
+ { title: 'Settings', slash: '/settings', hint: '', run: () => this.openSettings() },
489
489
  { title: 'Help', hint: 'f1', run: () => this.openHelp() },
490
490
  { title: 'Quit', hint: 'ctrl+x q', run: () => this.quit() },
491
- ].map((cmd) => ({ ...cmd, slash: '/' + cmd.title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/-+$/, ''), group: 'Commands' }));
491
+ // No slash invented from the title any more: it produced /switch-mode-build-plan-computer
492
+ // and a second /theme next to the one in slashCommands(). An entry gets a slash only if
493
+ // it declares one.
494
+ ].map((cmd) => ({ ...cmd, slash: cmd.slash || '', group: cmd.group || 'Commands' }));
492
495
  }
493
496
 
494
497
  /** `/help`, `/new`, `/tasks` … — opencode-style slash commands */
@@ -506,7 +509,6 @@ class App {
506
509
  { slash: '/theme', title: 'Cycle the colour theme', hint: 'ctrl+x t', group: 'Session', run: by('Theme') },
507
510
  { slash: '/shell', title: 'Show or change the shell commands run in', hint: '', group: 'Session', run: () => this.pickShell() },
508
511
  { slash: '/status', title: 'Ping the bridge', hint: '', group: 'Session', run: by('Bridge status') },
509
- { slash: '/settings', title: 'Bridge URL and API key', hint: '', group: 'Session', run: () => this.openSettings() },
510
512
  { slash: '/help', title: 'Every keybinding', hint: 'f1', group: 'Session', run: () => this.openHelp() },
511
513
  { slash: '/quit', title: 'Leave arenacode', hint: 'ctrl+x q', group: 'Session', run: () => this.quit() },
512
514
  ];
@@ -1443,7 +1445,15 @@ class App {
1443
1445
 
1444
1446
  slashList() {
1445
1447
  const q = this.state.input.slice(1).toLowerCase().split(' ')[0];
1446
- const all = [...this.slashCommands(), ...this.commands()];
1448
+ // slashCommands() first: it carries the opencode wording. The palette entries whose
1449
+ // slash is already taken are dropped, so typing `/` never shows the same command twice
1450
+ // (/settings, /theme, /help and /quit used to appear twice each).
1451
+ const seen = new Set();
1452
+ const all = [...this.slashCommands(), ...this.commands()].filter((c) => {
1453
+ if (!c.slash || seen.has(c.slash)) return false;
1454
+ seen.add(c.slash);
1455
+ return true;
1456
+ });
1447
1457
  return all.filter((c) => !q || c.slash.replace('/', '').startsWith(q)).slice(0, 7);
1448
1458
  }
1449
1459