@hncode/hncode 0.7.8 → 0.8.1

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.
@@ -936,12 +936,14 @@ button { font: inherit; color: inherit; }
936
936
  border: 0;
937
937
  padding: 0;
938
938
  }
939
- /* Plan / Focus / Swarm are MUTUALLY EXCLUSIVE modes, so at most one badge is shown —
940
- and each carries its OWN accent, matching src/tui.js:
941
- Plan -> cyan | Focus -> blue | Swarm -> spring (green-tinted cyan)
942
- They used to collapse into one `--teal` badge, which made three different modes
943
- look like the same state. */
939
+ /* Plan / Focus / Swarm / PTC are MUTUALLY EXCLUSIVE modes, so at most one badge is
940
+ shown — and each carries its OWN accent, matching src/tui.js:
941
+ PTC -> orange | Plan -> cyan | Focus -> blue | Swarm -> spring
942
+ They used to collapse into one `--teal` badge, which made different modes look
943
+ like the same state. PTC takes orange because it is the one mode that removes
944
+ tools rather than narrowing them, and it must not read as a flavour of Plan. */
944
945
  .sl-badge { color: var(--teal); font-weight: 600; flex: none; }
946
+ .sl-badge-ptc { color: var(--orange); }
945
947
  .sl-badge-plan { color: var(--cyan); }
946
948
  .sl-badge-focus { color: var(--blue); }
947
949
  .sl-badge-swarm { color: var(--spring); }
@@ -1539,10 +1539,13 @@ function renderStatusLine(s) {
1539
1539
  // One badge, one accent — Plan/Focus/Swarm are mutually exclusive, so exactly one
1540
1540
  // of these is shown. The class carries the colour (see .sl-badge-* in app.css); the
1541
1541
  // three must NOT share it, or the statusline cannot say which mode is on.
1542
- const badge = s.plan ? { text: 'Plan', cls: 'sl-badge-plan' }
1543
- : s.focus ? { text: 'Focus', cls: 'sl-badge-focus' }
1544
- : s.swarm ? { text: 'Swarm', cls: 'sl-badge-swarm' }
1545
- : null;
1542
+ // PTC FIRST: it narrows the toolset harder than any of the others — only the sandbox tool is offered — so a
1543
+ // session in that mode must say so from the status line alone.
1544
+ const badge = s.ptcMode ? { text: 'PTC', cls: 'sl-badge-ptc' }
1545
+ : s.plan ? { text: 'Plan', cls: 'sl-badge-plan' }
1546
+ : s.focus ? { text: 'Focus', cls: 'sl-badge-focus' }
1547
+ : s.swarm ? { text: 'Swarm', cls: 'sl-badge-swarm' }
1548
+ : null;
1546
1549
  if (badge) line.appendChild(el('sl-badge ' + badge.cls, badge.text));
1547
1550
 
1548
1551
  if (s.model) {
package/src/web.js CHANGED
@@ -35,6 +35,8 @@ const ALLOWED_ACTIONS = [
35
35
  // conversation
36
36
  'submit', 'dispatch', 'interrupt', 'approve', 'answerPlan', 'answerQuestion', 'stopTask',
37
37
  'setMode', 'shell', 'steer', 'editQueued', 'dropQueued',
38
+ // Answering a prompt and moving a command to the background: the browser's Ctrl+G and Ctrl+B.
39
+ 'stdinLine', 'detach',
38
40
  // files
39
41
  'readFile', 'writeFile',
40
42
  // session settings