@hncode/hncode 0.7.7 → 0.8.0
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 +1 -1
- package/src/agent.js +1405 -1400
- package/src/animate.js +371 -0
- package/src/colors.js +593 -556
- package/src/composer.js +182 -0
- package/src/diff.js +186 -0
- package/src/format.js +275 -0
- package/src/highlight.js +670 -4
- package/src/markdown.js +567 -0
- package/src/panels.js +256 -0
- package/src/rows-plan-bg.js +83 -0
- package/src/rows-status.js +104 -0
- package/src/rows-tool-result.js +208 -0
- package/src/text.js +149 -0
- package/src/tool-line.js +193 -0
- package/src/tools/bash.js +11 -10
- package/src/tools/ptc.js +2 -2
- package/src/tools/read.js +3 -0
- package/src/tui.js +381 -2766
- package/src/web-public/app.css +7 -5
- package/src/web-public/app.js +7 -4
- package/src/web.js +2 -0
package/src/web-public/app.css
CHANGED
|
@@ -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
|
|
940
|
-
and each carries its OWN accent, matching src/tui.js:
|
|
941
|
-
Plan
|
|
942
|
-
They used to collapse into one `--teal` badge, which made
|
|
943
|
-
|
|
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); }
|
package/src/web-public/app.js
CHANGED
|
@@ -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
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
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
|