Files
qwen-code/scripts
qqqys 09b1244150 feat(mods): add ui.render, $.ui.resolve and $.ui.invalidate to the runtime (#15591)
* feat(mods): add ui.render, $.ui.resolve and $.ui.invalidate to the runtime

The first stage of terminal rendering (#13749): the worker raises
ui.render for a site the host offers in its load request, and judges each
hook's tree with Claude Code 2.1.310's rules for Box and Text. Mods get
$.ui.resolve's frozen element table, the h and Fragment globals, and
$.ui.invalidate, which reaches the host after the dispatch that called it.
No host offers a site yet, so ui.render hooks are still skipped and
listed at startup.

The design for the whole stage is in
docs/design/2026-10-26-mod-terminal-render.md.

* fix(mods): keep render text cuts, notes and h children aligned with Claude Code

- Cut text past the cap before a high surrogate, so the adjusted tree never
  holds a lone surrogate the validator refuses, and report the characters
  actually drawn.
- Say each kind of adjustment (border style, text cut) once per load and
  site, so a text cut whose length changes on every render is told once.
- Hand a function component its children flattened, always an array, as
  Claude Code's h does.
- Freeze ENGINE_NODE, and document Claude Code's invalidate backoff for the
  Ink scheduling step.
2026-10-26 12:50:01 +08:00
..
2025-08-27 15:23:21 +08:00