@hncode/hncode 0.4.2 → 0.5.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.
Files changed (65) hide show
  1. package/README.md +1 -15
  2. package/README_CN.md +1 -15
  3. package/bin/hncode +22 -9
  4. package/package.json +3 -2
  5. package/src/agent.js +149 -35
  6. package/src/bootstrap.js +56 -0
  7. package/src/btw-panel.js +224 -0
  8. package/src/cache.js +3 -2
  9. package/src/cell-buffer.js +173 -0
  10. package/src/ci.js +4 -1
  11. package/src/clipboard.js +202 -43
  12. package/src/colors.js +478 -242
  13. package/src/config.js +409 -40
  14. package/src/context-bar.js +237 -0
  15. package/src/doctor.js +518 -0
  16. package/src/experiments.js +122 -0
  17. package/src/file-history.js +112 -0
  18. package/src/file-tree.js +255 -0
  19. package/src/flush-tick.js +56 -0
  20. package/src/fork.js +44 -0
  21. package/src/fx.js +148 -0
  22. package/src/index.js +123 -11
  23. package/src/keybindings.js +229 -0
  24. package/src/llm.js +355 -34
  25. package/src/lsp.js +401 -0
  26. package/src/memory-profile.js +247 -0
  27. package/src/notebook.js +232 -0
  28. package/src/output-styles.js +183 -0
  29. package/src/patch.js +248 -0
  30. package/src/permissions.js +130 -1
  31. package/src/plan.js +3 -2
  32. package/src/plugin.js +611 -58
  33. package/src/prompt-presets.js +1 -1
  34. package/src/registry-browser.js +31 -13
  35. package/src/remote.js +20 -2
  36. package/src/rollout.js +151 -0
  37. package/src/row-cache.js +148 -0
  38. package/src/schedule.js +294 -0
  39. package/src/session-approvals.js +86 -0
  40. package/src/session-hub.js +1 -0
  41. package/src/session.js +178 -8
  42. package/src/settings-schema.js +301 -0
  43. package/src/shell-safety.js +473 -0
  44. package/src/side-thread.js +240 -0
  45. package/src/skills.js +27 -0
  46. package/src/stream-buffer.js +350 -0
  47. package/src/subagent-control.js +160 -0
  48. package/src/teleport.js +260 -0
  49. package/src/term-caps.js +411 -0
  50. package/src/term.js +283 -8
  51. package/src/tool-result.js +264 -236
  52. package/src/tools/agent-control.js +98 -0
  53. package/src/tools/agent-swarm.js +11 -2
  54. package/src/tools/agent.js +35 -1
  55. package/src/tools/diagnostics.js +175 -0
  56. package/src/tools/edit.js +25 -10
  57. package/src/tools/grep.js +62 -20
  58. package/src/tools/ignore.js +38 -14
  59. package/src/tools/index.js +10 -0
  60. package/src/tools/notebook.js +113 -0
  61. package/src/tools/read-media-file.js +10 -3
  62. package/src/tools/shell.js +34 -6
  63. package/src/tui.js +5637 -746
  64. package/src/web-public/app.js +7 -0
  65. package/src/web.js +3 -1
@@ -1215,6 +1215,12 @@ function paintBgTaskRow(body, r) {
1215
1215
  */
1216
1216
  function paintThinkingRow(body, r, text) {
1217
1217
  const lines = text ? text.replace(/\r\n/g, '\n').split('\n') : [];
1218
+ // An EMPTY reasoning block renders NOTHING, matching `messageLines` in the
1219
+ // terminal. A model may emit a `think` event with no text, and a block finalised by
1220
+ // a tool call can be left empty; drawing a bare `●` (or a lone spinner) for those
1221
+ // reads as a rendering bug. The row stays in the model, so a block that later
1222
+ // receives text appears in full — only the paint is skipped.
1223
+ if (!lines.some((l) => l.trim() !== '')) return;
1218
1224
  const cap = expandedRows.has(r.id) ? Infinity : THINK_PREVIEW;
1219
1225
 
1220
1226
  if (r.pending) {
@@ -1242,6 +1248,7 @@ function paintThinkingRow(body, r, text) {
1242
1248
  }
1243
1249
 
1244
1250
 
1251
+
1245
1252
  const FENCE_RE = /^[ \t]*```+\s*(\S*)/;
1246
1253
  const INLINE_RE = /(`[^`]+`|\*\*[^*]+\*\*|\*[^*\s][^*]*?\*|~~[^~]+~~|\[[^\]]+\]\([^)\s]+\)|(^|\s)https?:\/\/[^\s]+)/g;
1247
1254
 
package/src/web.js CHANGED
@@ -33,8 +33,10 @@ const LOGIN_DELAY_MS = 400; // slows online guessing; costs a human nothi
33
33
  // own to expose it, and neither transport can drift from the other.
34
34
  const ALLOWED_ACTIONS = [
35
35
  // conversation
36
- 'submit', 'dispatch', 'interrupt', 'approve', 'answerQuestion', 'stopTask',
36
+ 'submit', 'dispatch', 'interrupt', 'approve', 'answerPlan', 'answerQuestion', 'stopTask',
37
37
  'setMode', 'shell', 'steer', 'editQueued', 'dropQueued',
38
+ // files
39
+ 'readFile', 'writeFile',
38
40
  // session settings
39
41
  'setTitle', 'getConfig', 'setConfig',
40
42
  // providers and models