@oh-my-pi/pi-tui 18.8.9 → 18.9.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 (76) hide show
  1. package/CHANGELOG.md +38 -199
  2. package/dist/types/charts/chart-plan.d.ts +586 -10
  3. package/dist/types/charts/chart-svg.d.ts +31 -6
  4. package/dist/types/charts/table-data.d.ts +66 -3
  5. package/dist/types/chat/table-chart.d.ts +3 -2
  6. package/dist/types/chat/user-message.d.ts +12 -1
  7. package/dist/types/chrome/shared.d.ts +9 -0
  8. package/dist/types/chrome/transcript-container.d.ts +1 -0
  9. package/dist/types/components/editor.d.ts +6 -0
  10. package/dist/types/components/form.d.ts +1 -0
  11. package/dist/types/components/image.d.ts +2 -44
  12. package/dist/types/components/markdown.d.ts +7 -0
  13. package/dist/types/components/tree-view.d.ts +7 -0
  14. package/dist/types/loop-watchdog.d.ts +8 -7
  15. package/dist/types/overlays/agent-hub-projection.d.ts +4 -3
  16. package/dist/types/overlays/agent-hub-types.d.ts +9 -0
  17. package/dist/types/overlays/annotation-overlay.d.ts +2 -0
  18. package/dist/types/overlays/model-browser.d.ts +9 -1
  19. package/dist/types/overlays/settings-defs.d.ts +1 -0
  20. package/dist/types/overlays/usage-display.d.ts +3 -1
  21. package/dist/types/setup/scenes/types.d.ts +1 -0
  22. package/dist/types/status-line/component.d.ts +2 -0
  23. package/dist/types/status-line/host.d.ts +4 -1
  24. package/dist/types/status-line/types.d.ts +9 -0
  25. package/dist/types/terminal-capabilities.d.ts +3 -3
  26. package/dist/types/terminal.d.ts +7 -0
  27. package/dist/types/theme/schema.d.ts +11 -2
  28. package/dist/types/theme/theme-class.d.ts +7 -0
  29. package/dist/types/tools/eval.d.ts +21 -2
  30. package/dist/types/tools/output-meta.d.ts +11 -1
  31. package/dist/types/tools/streaming-output.d.ts +9 -0
  32. package/package.json +9 -9
  33. package/src/charts/chart-plan.ts +4669 -95
  34. package/src/charts/chart-svg.ts +3971 -360
  35. package/src/charts/table-data.ts +1051 -44
  36. package/src/chat/assistant-message.ts +27 -9
  37. package/src/chat/chat-transcript-builder.ts +1 -3
  38. package/src/chat/table-chart.ts +7 -11
  39. package/src/chat/user-message.ts +40 -2
  40. package/src/chrome/shared.ts +53 -0
  41. package/src/chrome/transcript-container.ts +32 -9
  42. package/src/components/editor.ts +38 -5
  43. package/src/components/form.ts +8 -0
  44. package/src/components/image.ts +13 -145
  45. package/src/components/markdown.ts +45 -2
  46. package/src/components/settings-list.ts +2 -0
  47. package/src/components/tree-view.ts +38 -8
  48. package/src/loop-watchdog.ts +18 -13
  49. package/src/overlays/agent-hub-projection.ts +51 -14
  50. package/src/overlays/agent-hub-types.ts +6 -0
  51. package/src/overlays/annotation-overlay.ts +2 -1
  52. package/src/overlays/model-browser.ts +43 -7
  53. package/src/overlays/model-hub.ts +12 -19
  54. package/src/overlays/settings-defs.ts +4 -3
  55. package/src/overlays/settings-selector.ts +10 -1
  56. package/src/overlays/tree-selector.ts +21 -16
  57. package/src/overlays/usage-display.ts +10 -4
  58. package/src/render/composite.ts +2 -0
  59. package/src/setup/scenes/model.ts +2 -1
  60. package/src/setup/scenes/types.ts +1 -0
  61. package/src/status-line/component.ts +53 -3
  62. package/src/status-line/host.ts +4 -1
  63. package/src/status-line/segments.ts +14 -5
  64. package/src/status-line/types.ts +10 -0
  65. package/src/terminal-capabilities.ts +10 -8
  66. package/src/terminal.ts +39 -4
  67. package/src/theme/schema-validation.ts +1 -0
  68. package/src/theme/schema.ts +14 -1
  69. package/src/theme/theme-class.ts +26 -1
  70. package/src/theme/theme-schema.json +5 -1
  71. package/src/tools/eval.ts +56 -16
  72. package/src/tools/output-meta.ts +23 -3
  73. package/src/tools/streaming-output.ts +29 -2
  74. package/src/tools/todo.ts +4 -1
  75. package/src/tui.ts +81 -44
  76. package/src/windows-input-mode.ts +8 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,43 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.9.1] - 2026-10-11
6
+
7
+ ### Fixed
8
+
9
+ - Fixed inline charts and images leaving overlapping copies over text when moved, resized, replaced, or hidden, while preserving images in scrollback.
10
+
11
+ ## [18.9.0] - 2026-10-11
12
+
13
+ ### Added
14
+
15
+ - Added opt-in JSON editing for free-form array settings while keeping credential values masked; settings editors now surface submission and validation errors.
16
+ - Added ghost-text predictions to the editor via the new `Editor.prediction` callback. Press Tab or Right at the end of a line to accept the suggested text without submitting.
17
+ - Expanded table-chart support with stacked, waterfall, timeline, dots, range, slope, butterfly, bullet, ladder, histogram, and stat charts, including error whiskers, share bars, status matrices, and richer before/after visualizations.
18
+ - Added richer table-chart planning and presentation controls, including titles, ordering, grouping, shading, normalization, reference lines, polarity, rivals, focus rows, and model-driven selection for smart mode. Charts now identify key findings, highlight best values and changes, and adapt scales and labels for clearer comparisons.
19
+ - Added the optional `assistantMessageText` theme token for coloring assistant reply prose while preserving the terminal default when unset or empty.
20
+ - Added optional status-line support for showing saved usage resets that expire soon and warning once per conversation when a reset expires within 24 hours.
21
+
22
+ ### Changed
23
+
24
+ - Improved table-chart planning to prefer waterfall charts over share bars for complex data sets and enforce segment limits for share-chart legibility
25
+ - Reduced the time required to rebuild long sessions on resume, particularly sessions with repeated wait polls or todo updates.
26
+ - Output summaries now identify the first and last lines omitted by column limits, and truncation notices point to the `:raw` selector for retrieving complete lines.
27
+
28
+ ### Fixed
29
+
30
+ - Fixed session model selection and setup displaying role chips for roles that resolve to a non-chat runner rather than the model used by the session.
31
+ - Improved table-chart parsing and rendering across repeated labels, grouped and paired values, percentages, units, currency, durations, model sizes, links, identifiers, and sparse or side-by-side tables. Charts now avoid duplicate or misleading plots and preserve meaningful comparisons.
32
+ - Fixed table-chart scaling for outliers, stacked groups, zeros, logarithmic shading, and values spanning multiple orders of magnitude.
33
+ - Fixed `/tree` stalling or using excessive memory when opened on long sessions with many branch points.
34
+ - Fixed extension status messages losing SGR colors and text styles in the status line.
35
+ - Fixed the eval status list omitting status events discarded from long-running cells.
36
+ - Fixed loop-blocked diagnostics to attribute stalls to the correct work phase or terminal writes instead of reporting misleading unknown causes.
37
+ - Fixed Agent Hub and status-line spending totals losing cumulative subagent costs after compaction, parking, or follow-up turns.
38
+ - Fixed dead-key input on older Windows Terminal versions so quotes are entered correctly with Space, Enter, and Tab.
39
+ - Fixed SIXEL graphics detection on terminals, including native Windows Terminal, so SVG figures and inline images work without forcing a graphics protocol.
40
+ - Fixed overflow transcript rendering so user messages no longer appear as blank padding bars or leave stray prompt markers across terminal rows.
41
+
5
42
  ## [18.8.9] - 2026-10-10
6
43
 
7
44
  ### Breaking Changes
@@ -2808,202 +2845,4 @@
2808
2845
  - Fixed numbered list items showing "1." for all items when code blocks break list continuity
2809
2846
  - Fixed width overflow protection in overlay compositing to prevent TUI crashes
2810
2847
 
2811
- ## [4.7.0] - 2026-01-12
2812
-
2813
- ### Fixed
2814
-
2815
- - Remove trailing space padding from Text, Markdown, and TruncatedText components when no background color is set (fixes copied text including unwanted whitespace)
2816
-
2817
- ## [4.6.0] - 2026-01-12
2818
-
2819
- ### Added
2820
-
2821
- - Add fuzzy matching module (`fuzzyMatch`, `fuzzyFilter`) for command autocomplete
2822
- - Add `getExpandedText()` to editor for expanding paste markers
2823
- - Add backslash+enter newline fallback for terminals without Kitty protocol
2824
-
2825
- ### Fixed
2826
-
2827
- - Remove Kitty protocol query timeout that caused shift+enter delays
2828
- - Add bracketed paste check to prevent false key release/repeat detection
2829
- - Rendering optimizations: only re-render changed lines
2830
- - Refactor input component to use keybindings manager
2831
-
2832
- ## [4.4.4] - 2026-01-11
2833
-
2834
- ### Fixed
2835
-
2836
- - Fixed Ctrl+Enter sequences to insert new lines in the editor
2837
-
2838
- ## [4.2.1] - 2026-01-11
2839
-
2840
- ### Changed
2841
-
2842
- - Improved file autocomplete to show directory listing when typing `@` with no query, and fall back to prefix matching when fuzzy search returns no results
2843
-
2844
- ### Fixed
2845
-
2846
- - Fixed editor redraw glitch when canceling autocomplete suggestions
2847
- - Fixed `fd` tool detection to automatically find `fd` or `fdfind` in PATH when not explicitly configured
2848
-
2849
- ## [4.1.0] - 2026-01-10
2850
-
2851
- ### Added
2852
-
2853
- - Added persistent prompt history storage support via `setHistoryStorage()` method, allowing history to be saved and restored across sessions
2854
-
2855
- ## [4.0.0] - 2026-01-10
2856
-
2857
- ### Added
2858
-
2859
- - `EditorComponent` interface for custom editor implementations
2860
- - `StdinBuffer` class to split batched stdin into individual sequences
2861
- - Overlay compositing via `TUI.showOverlay()` and `TUI.hideOverlay()` for `ctx.ui.custom()` with `{ overlay: true }`
2862
- - Kitty keyboard protocol flag 2 support for key release events (`isKeyRelease()`, `isKeyRepeat()`, `KeyEventType`)
2863
- - `setKittyProtocolActive()`, `isKittyProtocolActive()` for Kitty protocol state management
2864
- - `kittyProtocolActive` property on Terminal interface to query Kitty protocol state
2865
- - `Component.wantsKeyRelease` property to opt-in to key release events (default false)
2866
- - Input component `onEscape` callback for handling escape key presses
2867
-
2868
- ### Changed
2869
-
2870
- - Terminal startup now queries Kitty protocol support before enabling event reporting
2871
- - Default editor `newLine` binding now uses `shift+enter` only
2872
-
2873
- ### Fixed
2874
-
2875
- - Key presses no longer dropped when batched with other events over SSH
2876
- - TUI now filters out key release events by default, preventing double-processing of keys
2877
- - `matchesKey()` now correctly matches Kitty protocol sequences for unmodified letter keys
2878
- - Crash when pasting text with trailing whitespace exceeding terminal width through Markdown rendering
2879
-
2880
- ## [3.32.0] - 2026-01-08
2881
-
2882
- ### Fixed
2883
-
2884
- - Fixed text wrapping allowing long whitespace tokens to exceed line width
2885
-
2886
- ## [3.20.0] - 2026-01-06
2887
-
2888
- ### Added
2889
-
2890
- - Added `isCapsLock` helper function for detecting Caps Lock key press via Kitty protocol
2891
- - Added `isCtrlY` helper function for detecting Ctrl+Y keyboard input
2892
- - Added configurable editor keybindings with typed key identifiers and action matching
2893
- - Added word-wrapped editor rendering for long lines
2894
-
2895
- ### Changed
2896
-
2897
- - Settings list descriptions now wrap to the available width instead of truncating
2898
-
2899
- ### Fixed
2900
-
2901
- - Fixed Shift+Enter detection in legacy terminals that send ESC+CR sequence
2902
-
2903
- ## [3.15.1] - 2026-01-05
2904
-
2905
- ### Fixed
2906
-
2907
- - Fixed editor cursor blinking by allowing terminal cursor positioning when enabled.
2908
-
2909
- ## [3.15.0] - 2026-01-05
2910
-
2911
- ### Added
2912
-
2913
- - Added `inputCursor` symbol for customizing the text input cursor character
2914
- - Added `symbols` property to `EditorTheme`, `MarkdownTheme`, and `SelectListTheme` interfaces for component-level symbol customization
2915
- - Added `SymbolTheme` interface for customizing UI symbols including cursors, borders, spinners, and box-drawing characters
2916
- - Added support for custom spinner frames in the Loader component
2917
-
2918
- ## [3.9.1337] - 2026-01-04
2919
-
2920
- ### Added
2921
-
2922
- - Added `setTopBorder()` method to Editor component for displaying custom status content in the top border
2923
- - Added `getWidth()` method to TUI class for retrieving terminal width
2924
- - Added rounded corner box-drawing characters to Editor component borders
2925
-
2926
- ### Changed
2927
-
2928
- - Changed Editor component to use proper box borders with vertical side borders instead of horizontal-only borders
2929
- - Changed cursor style from block to thin blinking bar (▏) at end of line
2930
-
2931
- ## [1.500.0] - 2026-01-03
2932
-
2933
- ### Added
2934
-
2935
- - Added `getText()` method to Text component for retrieving current text content
2936
-
2937
- ## [1.337.1] - 2026-01-02
2938
-
2939
- ### Added
2940
-
2941
- - TabBar component for horizontal tab navigation
2942
- - Emergency terminal restore to prevent corrupted state on crashes
2943
- - Overhauled UI with welcome screen and powerline footer
2944
- - Theme-configurable HTML export colors
2945
- - `ctx.ui.theme` getter for styling status text with theme colors
2946
-
2947
- ### Changed
2948
-
2949
- - Forked to @oh-my-pi scope with unified versioning across all packages
2950
-
2951
- ### Fixed
2952
-
2953
- - Strip OSC 8 hyperlink sequences in `visibleWidth()`
2954
- - Crash on Unicode format characters in `visibleWidth()`
2955
- - Markdown code block syntax highlighting
2956
-
2957
- ## [1.337.0] - 2026-01-02
2958
-
2959
- Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono).
2960
-
2961
- ## [1.5.0] - 2026-01-03
2962
-
2963
- ### Added
2964
-
2965
- - Added `getText()` method to Text component for retrieving current text content
2966
-
2967
- ## [0.50.0] - 2026-01-26
2968
-
2969
- ### Added
2970
-
2971
- - Added `fullRedraws` readonly property to TUI class for tracking full screen redraws
2972
- - Added `PI_TUI_WRITE_LOG` environment variable to capture raw ANSI output for debugging
2973
-
2974
- ### Fixed
2975
-
2976
- - Fixed appended lines not being committed to scrollback, causing earlier content to be overwritten when viewport fills ([#954](https://github.com/badlogic/pi-mono/issues/954))
2977
- - Slash command menu now only triggers when the editor input is otherwise empty ([#904](https://github.com/badlogic/pi-mono/issues/904))
2978
- - Center-anchored overlays now stay vertically centered when resizing the terminal taller after a shrink ([#950](https://github.com/badlogic/pi-mono/pull/950) by [@nicobailon](https://github.com/nicobailon))
2979
- - Fixed editor multi-line insertion handling and lastAction tracking ([#945](https://github.com/badlogic/pi-mono/pull/945) by [@Perlence](https://github.com/Perlence))
2980
- - Fixed editor word wrapping to reserve a cursor column ([#934](https://github.com/badlogic/pi-mono/pull/934) by [@Perlence](https://github.com/Perlence))
2981
- - Fixed editor word wrapping to use single-pass backtracking for whitespace handling ([#924](https://github.com/badlogic/pi-mono/pull/924) by [@Perlence](https://github.com/Perlence))
2982
- - Fixed Kitty image ID allocation and cleanup to prevent image ID collisions between modules
2983
-
2984
- ## [0.49.3] - 2026-01-22
2985
-
2986
- ### Added
2987
-
2988
- - `codeBlockIndent` property on `MarkdownTheme` to customize code block content indentation (default: 2 spaces) ([#855](https://github.com/badlogic/pi-mono/pull/855) by [@terrorobe](https://github.com/terrorobe))
2989
- - Added Alt+Delete as hotkey for delete word forwards ([#878](https://github.com/badlogic/pi-mono/pull/878) by [@Perlence](https://github.com/Perlence))
2990
-
2991
- ### Changed
2992
-
2993
- - Fuzzy matching now scores consecutive matches higher and penalizes gaps more heavily for better relevance ([#860](https://github.com/badlogic/pi-mono/pull/860) by [@mitsuhiko](https://github.com/mitsuhiko))
2994
-
2995
- ### Fixed
2996
-
2997
- - Autolinked emails no longer display redundant `(mailto:...)` suffix in markdown output ([#888](https://github.com/badlogic/pi-mono/pull/888) by [@terrorobe](https://github.com/terrorobe))
2998
- - Fixed viewport tracking and cursor positioning for overlays and content shrink scenarios
2999
- - Autocomplete now allows searches with `/` characters (e.g., `folder1/folder2`) ([#882](https://github.com/badlogic/pi-mono/pull/882) by [@richardgill](https://github.com/richardgill))
3000
- - Directory completions for `@` file attachments no longer add trailing space, allowing continued autocomplete into subdirectories
3001
-
3002
- ## [0.49.1] - 2026-01-18
3003
-
3004
- ### Added
3005
-
3006
- - Added undo support to Editor with Ctrl+- hotkey. Undo coalesces consecutive word characters into one unit (fish-style). ([#831](https://github.com/badlogic/pi-mono/pull/831) by [@Perlence](https://github.com/Perlence))
3007
- - Added legacy terminal support for Ctrl+symbol keys (Ctrl+\, Ctrl+], Ctrl+-) and their Ctrl+Alt variants. ([#831](https://github.com/badlogic/pi-mono/pull/831) by [@Perlence](https://github.com/Perlence))
3008
-
3009
- Older entries are archived in [packages/tui/CHANGELOG.md@110bcbdfe908](https://github.com/can1357/oh-my-pi/blob/110bcbdfe908cbe2978e7607d4f2fe64a0c13de0/packages/tui/CHANGELOG.md).
2848
+ Older entries are archived in [packages/tui/CHANGELOG.md@60347ef0f214](https://github.com/can1357/oh-my-pi/blob/60347ef0f214fa63df596d143477268da3f0c904/packages/tui/CHANGELOG.md).