@hncode/hncode 0.8.2 → 0.8.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/bin/hncode +54 -8
- package/package.json +1 -1
- package/src/agent-task.js +14 -12
- package/src/agent.js +1465 -1421
- package/src/animate.js +21 -0
- package/src/colors.js +615 -593
- package/src/config.js +36 -11
- package/src/context-bar.js +280 -277
- package/src/doctor.js +4 -3
- package/src/i18n.js +1438 -1214
- package/src/index.js +822 -730
- package/src/keybindings.js +2 -1
- package/src/markdown.js +37 -10
- package/src/mcp-server.js +409 -0
- package/src/mcp.js +279 -29
- package/src/memory-profile.js +19 -16
- package/src/plan.js +7 -5
- package/src/plugin.js +37 -21
- package/src/registry-browser.js +17 -15
- package/src/rows-tool-result.js +251 -235
- package/src/settings-schema.js +9 -0
- package/src/swarm-progress.js +1 -1
- package/src/tasks-browser.js +28 -28
- package/src/term.js +57 -21
- package/src/text.js +62 -0
- package/src/tools/agent.js +7 -2
- package/src/tools/bash.js +446 -440
- package/src/tools/edit.js +14 -1
- package/src/tui.js +542 -330
package/src/animate.js
CHANGED
|
@@ -327,6 +327,27 @@ export function lightAt(phaseMs, index, count, edge = 'cosine', stepMs = STEP_MS
|
|
|
327
327
|
* @param {string} edge shoulder shape: 'cosine' (default) or 'linear'
|
|
328
328
|
* @returns {string} ANSI, ready to splice into a row
|
|
329
329
|
*/
|
|
330
|
+
/**
|
|
331
|
+
* The glint for a base colour: the same hue, lifted part-way to white.
|
|
332
|
+
*
|
|
333
|
+
* The light that travels across a word must be a SHADE of the word, not another colour.
|
|
334
|
+
* `[255, 240, 120]` against orange reads as "this text is yellow now" — a status change —
|
|
335
|
+
* while a few percent of lift reads as a sheen passing over.
|
|
336
|
+
*
|
|
337
|
+
* Derived rather than fixed because the base is not fixed: the Working row turns blue while
|
|
338
|
+
* a compaction runs. A single hard-coded warm glint stayed yellow over that blue base, which
|
|
339
|
+
* is two colours fighting rather than one highlight.
|
|
340
|
+
*/
|
|
341
|
+
export const GLINT_LIFT = 0.45;
|
|
342
|
+
export function glintFor(base) {
|
|
343
|
+
const b = Array.isArray(base) ? base : [255, 140, 0];
|
|
344
|
+
return [
|
|
345
|
+
Math.round(b[0] + (255 - b[0]) * GLINT_LIFT),
|
|
346
|
+
Math.round(b[1] + (255 - b[1]) * GLINT_LIFT),
|
|
347
|
+
Math.round(b[2] + (255 - b[2]) * GLINT_LIFT),
|
|
348
|
+
];
|
|
349
|
+
}
|
|
350
|
+
|
|
330
351
|
export function shimmerText(text, phaseMs, base, glint, edge = 'cosine', stepMs = STEP_MS) {
|
|
331
352
|
const s = String(text == null ? '' : text);
|
|
332
353
|
const n = s.length;
|