pi-ui-extend 0.1.9 → 0.1.13

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 (121) hide show
  1. package/README.md +23 -2
  2. package/dist/app/app.d.ts +4 -0
  3. package/dist/app/app.js +76 -7
  4. package/dist/app/cli/install.d.ts +16 -0
  5. package/dist/app/cli/install.js +34 -7
  6. package/dist/app/cli/startup-info.js +5 -2
  7. package/dist/app/cli/update.d.ts +7 -0
  8. package/dist/app/cli/update.js +11 -3
  9. package/dist/app/commands/command-controller.js +4 -0
  10. package/dist/app/commands/command-host.d.ts +4 -0
  11. package/dist/app/commands/command-model-actions.d.ts +5 -0
  12. package/dist/app/commands/command-model-actions.js +104 -0
  13. package/dist/app/commands/command-navigation-actions.d.ts +6 -1
  14. package/dist/app/commands/command-navigation-actions.js +37 -14
  15. package/dist/app/commands/command-registry.d.ts +4 -0
  16. package/dist/app/commands/command-registry.js +32 -0
  17. package/dist/app/commands/command-session-actions.d.ts +1 -0
  18. package/dist/app/commands/command-session-actions.js +15 -5
  19. package/dist/app/commands/shell-command.d.ts +7 -0
  20. package/dist/app/commands/shell-command.js +12 -4
  21. package/dist/app/commands/shell-controller.d.ts +1 -0
  22. package/dist/app/commands/shell-controller.js +1 -1
  23. package/dist/app/constants.d.ts +1 -1
  24. package/dist/app/constants.js +1 -1
  25. package/dist/app/icons.d.ts +1 -0
  26. package/dist/app/icons.js +3 -1
  27. package/dist/app/input/autocomplete-controller.d.ts +52 -0
  28. package/dist/app/input/autocomplete-controller.js +352 -0
  29. package/dist/app/input/input-action-controller.d.ts +1 -0
  30. package/dist/app/input/input-action-controller.js +21 -0
  31. package/dist/app/input/input-controller.d.ts +1 -0
  32. package/dist/app/input/input-controller.js +2 -0
  33. package/dist/app/input/input-paste-handler.d.ts +1 -0
  34. package/dist/app/input/input-paste-handler.js +22 -18
  35. package/dist/app/input/prompt-enhancer-controller.d.ts +7 -1
  36. package/dist/app/input/prompt-enhancer-controller.js +12 -3
  37. package/dist/app/input/voice-controller.d.ts +51 -1
  38. package/dist/app/input/voice-controller.js +42 -19
  39. package/dist/app/model/model-usage-status.d.ts +9 -0
  40. package/dist/app/model/model-usage-status.js +124 -34
  41. package/dist/app/popup/popup-action-controller.js +1 -1
  42. package/dist/app/process.d.ts +17 -0
  43. package/dist/app/process.js +68 -0
  44. package/dist/app/rendering/conversation-entry-renderer.js +8 -6
  45. package/dist/app/rendering/conversation-tool-renderer.js +3 -2
  46. package/dist/app/rendering/editor-layout-renderer.d.ts +1 -0
  47. package/dist/app/rendering/editor-layout-renderer.js +11 -1
  48. package/dist/app/rendering/message-content.js +65 -7
  49. package/dist/app/rendering/render-controller.js +6 -1
  50. package/dist/app/rendering/render-text.d.ts +3 -0
  51. package/dist/app/rendering/render-text.js +51 -3
  52. package/dist/app/rendering/status-line-renderer.d.ts +5 -1
  53. package/dist/app/rendering/status-line-renderer.js +61 -25
  54. package/dist/app/rendering/toast-renderer.js +10 -13
  55. package/dist/app/rendering/tool-block-renderer.d.ts +1 -0
  56. package/dist/app/rendering/tool-block-renderer.js +16 -33
  57. package/dist/app/runtime.d.ts +6 -1
  58. package/dist/app/runtime.js +35 -2
  59. package/dist/app/screen/clipboard.d.ts +11 -2
  60. package/dist/app/screen/clipboard.js +29 -21
  61. package/dist/app/screen/file-link-opener.d.ts +8 -0
  62. package/dist/app/screen/file-link-opener.js +11 -3
  63. package/dist/app/screen/file-links.js +3 -3
  64. package/dist/app/screen/image-opener.d.ts +12 -0
  65. package/dist/app/screen/image-opener.js +13 -5
  66. package/dist/app/screen/mouse-controller.d.ts +5 -2
  67. package/dist/app/screen/mouse-controller.js +16 -1
  68. package/dist/app/screen/screen-styler.d.ts +4 -1
  69. package/dist/app/screen/screen-styler.js +3 -2
  70. package/dist/app/screen/status-controller.d.ts +3 -0
  71. package/dist/app/screen/status-controller.js +23 -8
  72. package/dist/app/session/queued-message-controller.d.ts +7 -1
  73. package/dist/app/session/queued-message-controller.js +36 -21
  74. package/dist/app/session/resume-session-loader.d.ts +15 -0
  75. package/dist/app/session/resume-session-loader.js +204 -0
  76. package/dist/app/session/session-event-controller.d.ts +5 -1
  77. package/dist/app/session/session-event-controller.js +72 -5
  78. package/dist/app/session/session-history.js +4 -3
  79. package/dist/app/session/session-lifecycle-controller.d.ts +5 -0
  80. package/dist/app/session/session-lifecycle-controller.js +9 -1
  81. package/dist/app/session/tabs-controller.d.ts +10 -1
  82. package/dist/app/session/tabs-controller.js +101 -5
  83. package/dist/app/terminal/nerd-font-controller.d.ts +16 -0
  84. package/dist/app/terminal/nerd-font-controller.js +30 -23
  85. package/dist/app/terminal/terminal-controller.d.ts +1 -0
  86. package/dist/app/terminal/terminal-controller.js +1 -0
  87. package/dist/app/types.d.ts +14 -0
  88. package/dist/app/workspace/workspace-actions-controller.d.ts +1 -1
  89. package/dist/app/workspace/workspace-actions-controller.js +3 -3
  90. package/dist/app/workspace/workspace-undo.d.ts +1 -1
  91. package/dist/app/workspace/workspace-undo.js +22 -20
  92. package/dist/config.d.ts +27 -0
  93. package/dist/config.js +174 -1
  94. package/dist/default-pix-config.js +39 -353
  95. package/dist/input-editor.d.ts +7 -1
  96. package/dist/input-editor.js +47 -6
  97. package/dist/markdown-format.d.ts +1 -0
  98. package/dist/markdown-format.js +26 -1
  99. package/dist/schemas/index.d.ts +5 -0
  100. package/dist/schemas/index.js +5 -0
  101. package/dist/schemas/pi-tools-suite-schema.d.ts +177 -0
  102. package/dist/schemas/pi-tools-suite-schema.js +218 -0
  103. package/dist/schemas/pix-schema.d.ts +65 -0
  104. package/dist/schemas/pix-schema.js +91 -0
  105. package/dist/terminal-width.js +73 -56
  106. package/external/pi-tools-suite/src/async-subagents/async-subagents.sample.jsonc +3 -0
  107. package/external/pi-tools-suite/src/dcp/compression-blocks.ts +1 -0
  108. package/external/pi-tools-suite/src/dcp/prompts.ts +1 -0
  109. package/external/pi-tools-suite/src/default-pi-tools-suite-config.ts +46 -195
  110. package/external/pi-tools-suite/src/lib/lsp.ts +2 -1
  111. package/external/pi-tools-suite/src/lsp/_shared/output.ts +8 -7
  112. package/external/pi-tools-suite/src/lsp/manager.ts +4 -4
  113. package/external/pi-tools-suite/src/repo-discovery/index.ts +49 -2
  114. package/external/pi-tools-suite/src/todo/index.ts +4 -2
  115. package/external/pi-tools-suite/src/todo/state/selectors.ts +4 -0
  116. package/external/pi-tools-suite/src/todo/todo.ts +2 -6
  117. package/external/pi-tools-suite/src/todo/tool/response-envelope.ts +9 -1
  118. package/external/pi-tools-suite/src/tool-descriptions.ts +1 -1
  119. package/package.json +12 -3
  120. package/schemas/pi-tools-suite.json +881 -0
  121. package/schemas/pix.json +298 -0
@@ -1,182 +1,45 @@
1
1
  export const DEFAULT_PIX_CONFIG_JSONC = String.raw `{
2
+ "$schema": "https://unpkg.com/pi-ui-extend/schemas/pix.json",
2
3
  // pix renderer configuration
3
- // See https://github.com/your-org/pi-ui-extend for docs
4
- "toolRenderer": {
5
- // Default rules applied to all tools without specific overrides
6
- "default": {
7
- "previewLines": 0,
8
- "direction": "head",
9
- "color": "toolTitle"
10
- },
4
+ "defaultModel": { "modelRef": "openai-codex/gpt-5.5", "thinking": "medium" },
11
5
 
12
- // Per-tool overrides (supports wildcard patterns like repo_*, ast_*)
6
+ "toolRenderer": {
7
+ "default": { "previewLines": 0, "direction": "head", "color": "toolTitle" },
13
8
  "tools": {
14
- // Shell / command execution
15
- "bash": {
16
- "previewLines": 6,
17
- "direction": "tail",
18
- "color": "warning"
19
- },
20
- "Bash": {
21
- "previewLines": 6,
22
- "direction": "tail",
23
- "color": "warning"
24
- },
25
- "shell": {
26
- "previewLines": 6,
27
- "direction": "tail",
28
- "color": "warning"
29
- },
30
- "shell_command": {
31
- "previewLines": 6,
32
- "direction": "tail",
33
- "color": "warning"
34
- },
35
-
36
- // Repository / code intelligence tools
37
- "repo_*": {
38
- "previewLines": 6,
39
- "direction": "head",
40
- "color": "warning"
41
- },
42
-
43
- // Patch / write tools
44
- "apply_patch": {
45
- "defaultExpanded": true,
46
- "previewLines": 9999,
47
- "direction": "head",
48
- "color": "toolMutation"
49
- },
50
- "edit": {
51
- "defaultExpanded": true,
52
- "previewLines": 9999,
53
- "direction": "head",
54
- "color": "toolMutation"
55
- },
56
- "Edit": {
57
- "defaultExpanded": true,
58
- "previewLines": 9999,
59
- "direction": "head",
60
- "color": "toolMutation"
61
- },
62
- "write": {
63
- "defaultExpanded": true,
64
- "previewLines": 9999,
65
- "direction": "head",
66
- "color": "toolMutation"
67
- },
68
- "Write": {
69
- "defaultExpanded": true,
70
- "previewLines": 9999,
71
- "direction": "head",
72
- "color": "toolMutation"
73
- },
74
-
75
- "ast_apply": {
76
- "defaultExpanded": true,
77
- "previewLines": 9999,
78
- "direction": "head",
79
- "color": "toolMutation"
80
- },
81
-
82
- // Read-only tools
83
- "Read": {
84
- "previewLines": 0,
85
- "direction": "head",
86
- "color": "success"
87
- },
88
- "read": {
89
- "previewLines": 0,
90
- "direction": "head",
91
- "color": "success"
92
- },
93
-
94
- // AST / search tools
95
- "ast_grep": {
96
- "previewLines": 6,
97
- "direction": "head",
98
- "color": "toolSearch"
99
- },
100
- "ast_*": {
101
- "color": "toolSearch"
102
- },
103
-
104
- // Compress (context compaction)
105
- "compress": {
106
- "previewLines": 0,
107
- "direction": "head",
108
- "color": "info"
109
- },
110
-
111
- // Web tools
112
- "web_search": {
113
- "previewLines": 6,
114
- "direction": "tail",
115
- "color": "toolSearch"
116
- },
117
- "web_fetch": {
118
- "previewLines": 12,
119
- "direction": "tail",
120
- "color": "toolSearch"
121
- },
122
-
123
- // Interactive
124
- "question": {
125
- "previewLines": 6,
126
- "direction": "tail",
127
- "color": "accent"
128
- },
129
-
130
- // Sub-agents
131
- "subagents": {
132
- "previewLines": 0,
133
- "direction": "tail",
134
- "color": "muted"
135
- },
136
-
137
- // Todo
138
- "todo": {
139
- "hidden": true,
140
- "color": "accent"
141
- },
142
-
143
- // File listing / search
144
- "ls": {
145
- "color": "success"
146
- },
147
- "LS": {
148
- "color": "success"
149
- },
150
- "grep": {
151
- "color": "toolSearch"
152
- },
153
- "Grep": {
154
- "color": "toolSearch"
155
- },
156
- "find": {
157
- "color": "toolSearch"
158
- },
159
- "Glob": {
160
- "color": "toolSearch"
161
- },
162
-
163
- // Skills
164
- "skill": {
165
- "color": "toolSearch",
166
- "previewLines": 0
167
- }
9
+ "bash": { "previewLines": 6, "direction": "tail", "color": "warning" },
10
+ "Bash": { "previewLines": 6, "direction": "tail", "color": "warning" },
11
+ "shell": { "previewLines": 6, "direction": "tail", "color": "warning" },
12
+ "shell_command": { "previewLines": 6, "direction": "tail", "color": "warning" },
13
+ "repo_*": { "previewLines": 6, "direction": "head", "color": "warning" },
14
+ "apply_patch": { "defaultExpanded": true, "previewLines": 9999, "direction": "head", "color": "toolMutation" },
15
+ "edit": { "defaultExpanded": true, "previewLines": 9999, "direction": "head", "color": "toolMutation" },
16
+ "Edit": { "defaultExpanded": true, "previewLines": 9999, "direction": "head", "color": "toolMutation" },
17
+ "write": { "defaultExpanded": true, "previewLines": 9999, "direction": "head", "color": "toolMutation" },
18
+ "Write": { "defaultExpanded": true, "previewLines": 9999, "direction": "head", "color": "toolMutation" },
19
+ "ast_apply": { "defaultExpanded": true, "previewLines": 9999, "direction": "head", "color": "toolMutation" },
20
+ "Read": { "previewLines": 0, "direction": "head", "color": "success" },
21
+ "read": { "previewLines": 0, "direction": "head", "color": "success" },
22
+ "ast_grep": { "previewLines": 6, "direction": "head", "color": "toolSearch" },
23
+ "ast_*": { "color": "toolSearch" },
24
+ "compress": { "previewLines": 0, "direction": "head", "color": "info" },
25
+ "web_search": { "previewLines": 6, "direction": "tail", "color": "toolSearch" },
26
+ "web_fetch": { "previewLines": 12, "direction": "tail", "color": "toolSearch" },
27
+ "question": { "previewLines": 6, "direction": "tail", "color": "accent" },
28
+ "subagents": { "previewLines": 0, "direction": "tail", "color": "muted" },
29
+ "todo": { "hidden": true, "color": "accent" },
30
+ "ls": { "previewLines": 6, "direction": "head", "color": "success" },
31
+ "LS": { "previewLines": 6, "direction": "head", "color": "success" },
32
+ "grep": { "previewLines": 6, "direction": "head", "color": "toolSearch" },
33
+ "Grep": { "previewLines": 6, "direction": "head", "color": "toolSearch" },
34
+ "find": { "previewLines": 6, "direction": "head", "color": "toolSearch" },
35
+ "Glob": { "previewLines": 6, "direction": "head", "color": "toolSearch" },
36
+ "skill": { "previewLines": 0, "color": "toolSearch" }
168
37
  }
169
38
  },
170
39
 
171
- // Output filters applied to assistant text in the renderer.
172
- // Supports glob-style * wildcards, or regex literals like "/token=\\w+/".
173
- // "outputFilters": {
174
- // "patterns": [
175
- // "secret-*"
176
- // ]
177
- // },
40
+ // Assistant output filters; supports glob-style wildcards or regex literals.
41
+ // "outputFilters": { "patterns": ["secret-*", "/token=\\w+/"] },
178
42
 
179
- // Status bar model colors. Patterns match provider/model and longest match wins.
180
43
  "modelColors": {
181
44
  "zai/*": "success",
182
45
  "openai-codex/*": "modelOpenAI",
@@ -184,191 +47,14 @@ export const DEFAULT_PIX_CONFIG_JSONC = String.raw `{
184
47
  "antigravity/antigravity-claude-*": "error"
185
48
  },
186
49
 
187
- // Prompt improver sidecar model. Uses a hidden in-memory Pi session.
188
- "promptEnhancer": {
189
- "modelRef": "zai/glm-5-turbo"
190
- },
191
-
192
- // Session title sidecar model. Generates a short name from the first user message.
193
- "sessionTitle": {
194
- "modelRef": "zai/glm-5-turbo"
195
- },
196
-
197
- // Dictation languages. Only uncommented entries are enabled in the UI.
198
- // When a single language is enabled, the language switcher is hidden.
50
+ "promptEnhancer": { "modelRef": "zai/glm-5-turbo" },
51
+ "autocomplete": { "modelRef": "zai/glm-5-turbo", "debounceMs": 350, "timeoutMs": 3000, "maxTokens": 48, "maxPromptTokens": 1200, "includeRecentMessages": 0 },
52
+ "sessionTitle": { "modelRef": "zai/glm-5-turbo" },
199
53
  "dictation": {
200
54
  "language": "en",
201
55
  "languages": {
202
- "en": {
203
- "dirName": "vosk-model-small-en-us-0.15",
204
- "url": "https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip",
205
- "label": "English"
206
- }
207
- // ,"en-in": {
208
- // "dirName": "vosk-model-small-en-in-0.4",
209
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-en-in-0.4.zip",
210
- // "label": "Indian English"
211
- // }
212
- // ,"cn": {
213
- // "dirName": "vosk-model-small-cn-0.22",
214
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-cn-0.22.zip",
215
- // "label": "Chinese"
216
- // }
217
- ,"ru": {
218
- "dirName": "vosk-model-small-ru-0.22",
219
- "url": "https://alphacephei.com/vosk/models/vosk-model-small-ru-0.22.zip",
220
- "label": "Russian"
221
- }
222
- // ,"fr": {
223
- // "dirName": "vosk-model-small-fr-0.22",
224
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-fr-0.22.zip",
225
- // "label": "French"
226
- // }
227
- // ,"de": {
228
- // "dirName": "vosk-model-small-de-0.15",
229
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-de-0.15.zip",
230
- // "label": "German"
231
- // }
232
- // ,"es": {
233
- // "dirName": "vosk-model-small-es-0.42",
234
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-es-0.42.zip",
235
- // "label": "Spanish"
236
- // }
237
- // ,"pt": {
238
- // "dirName": "vosk-model-small-pt-0.3",
239
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-pt-0.3.zip",
240
- // "label": "Portuguese"
241
- // }
242
- // ,"el": {
243
- // "dirName": "vosk-model-el-gr-0.7",
244
- // "url": "https://alphacephei.com/vosk/models/vosk-model-el-gr-0.7.zip",
245
- // "label": "Greek"
246
- // }
247
- // ,"tr": {
248
- // "dirName": "vosk-model-small-tr-0.3",
249
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-tr-0.3.zip",
250
- // "label": "Turkish"
251
- // }
252
- // ,"vn": {
253
- // "dirName": "vosk-model-small-vn-0.4",
254
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-vn-0.4.zip",
255
- // "label": "Vietnamese"
256
- // }
257
- // ,"it": {
258
- // "dirName": "vosk-model-small-it-0.22",
259
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-it-0.22.zip",
260
- // "label": "Italian"
261
- // }
262
- // ,"nl": {
263
- // "dirName": "vosk-model-small-nl-0.22",
264
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-nl-0.22.zip",
265
- // "label": "Dutch"
266
- // }
267
- // ,"ca": {
268
- // "dirName": "vosk-model-small-ca-0.4",
269
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-ca-0.4.zip",
270
- // "label": "Catalan"
271
- // }
272
- // ,"ar": {
273
- // "dirName": "vosk-model-ar-mgb2-0.4",
274
- // "url": "https://alphacephei.com/vosk/models/vosk-model-ar-mgb2-0.4.zip",
275
- // "label": "Arabic"
276
- // }
277
- // ,"ar-tn": {
278
- // "dirName": "vosk-model-small-ar-tn-0.1-linto",
279
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-ar-tn-0.1-linto.zip",
280
- // "label": "Arabic Tunisian"
281
- // }
282
- // ,"fa": {
283
- // "dirName": "vosk-model-small-fa-0.42",
284
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-fa-0.42.zip",
285
- // "label": "Persian"
286
- // }
287
- // ,"tl": {
288
- // "dirName": "vosk-model-tl-ph-generic-0.6",
289
- // "url": "https://alphacephei.com/vosk/models/vosk-model-tl-ph-generic-0.6.zip",
290
- // "label": "Filipino"
291
- // }
292
- // ,"uk": {
293
- // "dirName": "vosk-model-small-uk-v3-nano",
294
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-uk-v3-nano.zip",
295
- // "label": "Ukrainian"
296
- // }
297
- // ,"kz": {
298
- // "dirName": "vosk-model-small-kz-0.42",
299
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-kz-0.42.zip",
300
- // "label": "Kazakh"
301
- // }
302
- // ,"sv": {
303
- // "dirName": "vosk-model-small-sv-rhasspy-0.15",
304
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-sv-rhasspy-0.15.zip",
305
- // "label": "Swedish"
306
- // }
307
- // ,"ja": {
308
- // "dirName": "vosk-model-small-ja-0.22",
309
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-ja-0.22.zip",
310
- // "label": "Japanese"
311
- // }
312
- // ,"eo": {
313
- // "dirName": "vosk-model-small-eo-0.42",
314
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-eo-0.42.zip",
315
- // "label": "Esperanto"
316
- // }
317
- // ,"hi": {
318
- // "dirName": "vosk-model-small-hi-0.22",
319
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-hi-0.22.zip",
320
- // "label": "Hindi"
321
- // }
322
- // ,"cs": {
323
- // "dirName": "vosk-model-small-cs-0.4-rhasspy",
324
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-cs-0.4-rhasspy.zip",
325
- // "label": "Czech"
326
- // }
327
- // ,"pl": {
328
- // "dirName": "vosk-model-small-pl-0.22",
329
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-pl-0.22.zip",
330
- // "label": "Polish"
331
- // }
332
- // ,"uz": {
333
- // "dirName": "vosk-model-small-uz-0.22",
334
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-uz-0.22.zip",
335
- // "label": "Uzbek"
336
- // }
337
- // ,"ko": {
338
- // "dirName": "vosk-model-small-ko-0.22",
339
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-ko-0.22.zip",
340
- // "label": "Korean"
341
- // }
342
- // ,"br": {
343
- // "dirName": "vosk-model-br-0.8",
344
- // "url": "https://alphacephei.com/vosk/models/vosk-model-br-0.8.zip",
345
- // "label": "Breton"
346
- // }
347
- // ,"gu": {
348
- // "dirName": "vosk-model-small-gu-0.42",
349
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-gu-0.42.zip",
350
- // "label": "Gujarati"
351
- // }
352
- // ,"tg": {
353
- // "dirName": "vosk-model-small-tg-0.22",
354
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-tg-0.22.zip",
355
- // "label": "Tajik"
356
- // }
357
- // ,"te": {
358
- // "dirName": "vosk-model-small-te-0.42",
359
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-te-0.42.zip",
360
- // "label": "Telugu"
361
- // }
362
- // ,"ky": {
363
- // "dirName": "vosk-model-small-ky-0.42",
364
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-ky-0.42.zip",
365
- // "label": "Kyrgyz"
366
- // }
367
- // ,"ka": {
368
- // "dirName": "vosk-model-small-ka-0.42",
369
- // "url": "https://alphacephei.com/vosk/models/vosk-model-small-ka-0.42.zip",
370
- // "label": "Georgian"
371
- // }
56
+ "en": { "dirName": "vosk-model-small-en-us-0.15", "url": "https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip", "label": "English" },
57
+ "ru": { "dirName": "vosk-model-small-ru-0.22", "url": "https://alphacephei.com/vosk/models/vosk-model-small-ru-0.22.zip", "label": "Russian" }
372
58
  }
373
59
  }
374
60
  }
@@ -43,6 +43,11 @@ export interface VisualLine {
43
43
  start: number;
44
44
  end: number;
45
45
  }>;
46
+ /** Inline autocomplete suggestion spans within this visual line. */
47
+ suggestionSpans?: Array<{
48
+ start: number;
49
+ end: number;
50
+ }>;
46
51
  }
47
52
  /** Full render-ready snapshot of the editor state. */
48
53
  export interface RenderedEditor {
@@ -142,7 +147,7 @@ export declare class InputEditor {
142
147
  beginBracketedPaste(): void;
143
148
  endBracketedPaste(): void;
144
149
  get isInBracketedPaste(): boolean;
145
- render(width: number, maxRows: number, firstPrefix: string, continuationPrefix: string): RenderedEditor;
150
+ render(width: number, maxRows: number, firstPrefix: string, continuationPrefix: string, suggestionSuffix?: string): RenderedEditor;
146
151
  scrollByVisualLines(delta: number, width: number, maxRows: number, firstPrefix: string, continuationPrefix: string): boolean;
147
152
  setVisualScrollOffset(offset: number, width: number, maxRows: number, firstPrefix: string, continuationPrefix: string): boolean;
148
153
  /** Convert a rendered visual row and 1-based terminal column into a text cursor offset. */
@@ -183,4 +188,5 @@ export declare class InputEditor {
183
188
  private pushVisualLines;
184
189
  private computeCursorVisualRow;
185
190
  private computeCursorScreenCol;
191
+ private cursorAtExactWrapBoundary;
186
192
  }
@@ -434,19 +434,36 @@ export class InputEditor {
434
434
  endBracketedPaste() { this._bracketedPasteDepth = Math.max(0, this._bracketedPasteDepth - 1); }
435
435
  get isInBracketedPaste() { return this._bracketedPasteDepth > 0; }
436
436
  // ── rendering ───────────────────────────────────────────────────
437
- render(width, maxRows, firstPrefix, continuationPrefix) {
437
+ render(width, maxRows, firstPrefix, continuationPrefix, suggestionSuffix = "") {
438
438
  const allVisual = [];
439
- const logicalLines = this.logicalLines();
439
+ const canRenderSuggestion = suggestionSuffix.length > 0 && !this.hasSelection && this._cursor === this._text.length;
440
+ const renderedText = canRenderSuggestion ? `${this._text}${suggestionSuffix}` : this._text;
441
+ const logicalLines = renderedText.split("\n");
440
442
  const tagPatterns = this.getTagPatterns();
443
+ const suggestionStart = canRenderSuggestion ? this._text.length : undefined;
444
+ let lineOffset = 0;
441
445
  for (let i = 0; i < logicalLines.length; i++) {
442
446
  const line = logicalLines[i];
443
447
  const prefix = i === 0 && allVisual.length === 0 ? firstPrefix : continuationPrefix;
444
- this.pushVisualLines(allVisual, line, prefix, continuationPrefix, width, i === 0 && allVisual.length === 0, tagPatterns);
448
+ this.pushVisualLines(allVisual, line, prefix, continuationPrefix, width, i === 0 && allVisual.length === 0, tagPatterns, lineOffset, suggestionStart, renderedText.length);
449
+ lineOffset += line.length + (i < logicalLines.length - 1 ? 1 : 0);
445
450
  }
446
451
  if (allVisual.length === 0) {
447
452
  allVisual.push({ text: firstPrefix, wrapped: false, tagSpans: [] });
448
453
  }
449
454
  const cursorVisualRow = this.computeCursorVisualRow(allVisual, width, firstPrefix, continuationPrefix);
455
+ // When the cursor is at the exact end of a logical line that fills the width,
456
+ // render an empty wrapped line for the cursor. If another logical line follows,
457
+ // insert the cursor line before it instead of letting the cursor cover its first cell.
458
+ if (!canRenderSuggestion && this.cursorAtExactWrapBoundary(width, firstPrefix, continuationPrefix)) {
459
+ const cursorLine = { text: continuationPrefix, wrapped: true, tagSpans: [] };
460
+ if (cursorVisualRow >= allVisual.length) {
461
+ allVisual.push(cursorLine);
462
+ }
463
+ else {
464
+ allVisual.splice(cursorVisualRow, 0, cursorLine);
465
+ }
466
+ }
450
467
  const safeMaxRows = Math.max(1, maxRows);
451
468
  let autoScrollOffset = 0;
452
469
  if (allVisual.length > safeMaxRows) {
@@ -766,9 +783,10 @@ export class InputEditor {
766
783
  }
767
784
  return spans;
768
785
  }
769
- pushVisualLines(output, logicalLine, firstPrefix, continuationPrefix, width, isFirst, tagPatterns) {
786
+ pushVisualLines(output, logicalLine, firstPrefix, continuationPrefix, width, isFirst, tagPatterns, lineOffset, suggestionStart, suggestionEnd) {
770
787
  let currentPrefix = firstPrefix;
771
788
  let remaining = logicalLine;
789
+ let chunkGlobalStart = lineOffset;
772
790
  if (remaining.length === 0) {
773
791
  output.push({ text: currentPrefix, wrapped: !isFirst || output.length > 0, tagSpans: [] });
774
792
  return;
@@ -778,13 +796,16 @@ export class InputEditor {
778
796
  const available = Math.max(1, width - currentPrefix.length);
779
797
  const chunk = remaining.slice(0, available);
780
798
  const fullText = `${currentPrefix}${chunk}`;
799
+ const chunkGlobalEnd = chunkGlobalStart + chunk.length;
781
800
  // Compute tag spans adjusted for prefix offset
782
801
  const spans = this.findTagSpans(chunk, tagPatterns).map((s) => ({
783
802
  start: s.start + currentPrefix.length,
784
803
  end: s.end + currentPrefix.length,
785
804
  }));
786
- output.push({ text: fullText, wrapped: !first, tagSpans: spans });
805
+ const suggestionSpans = suggestionStart === undefined ? undefined : suggestionSpansForChunk(chunkGlobalStart, chunkGlobalEnd, suggestionStart, suggestionEnd, currentPrefix.length);
806
+ output.push({ text: fullText, wrapped: !first, tagSpans: spans, ...(suggestionSpans && suggestionSpans.length > 0 ? { suggestionSpans } : {}) });
787
807
  remaining = remaining.slice(chunk.length);
808
+ chunkGlobalStart = chunkGlobalEnd;
788
809
  currentPrefix = continuationPrefix;
789
810
  first = false;
790
811
  }
@@ -805,13 +826,18 @@ export class InputEditor {
805
826
  continue;
806
827
  }
807
828
  const wrappedCount = Math.ceil(line.length / available);
829
+ const atExactBoundary = pos.col === line.length && line.length > 0 && line.length % available === 0;
808
830
  for (let w = 0; w < wrappedCount; w++) {
809
831
  const chunkStart = w * available;
810
- if (logRow === pos.row && pos.col >= chunkStart && (w === wrappedCount - 1 || pos.col < chunkStart + available)) {
832
+ if (logRow === pos.row && pos.col >= chunkStart && !atExactBoundary && (w === wrappedCount - 1 || pos.col < chunkStart + available)) {
811
833
  return visualRow;
812
834
  }
813
835
  visualRow += 1;
814
836
  }
837
+ // When the cursor is at the exact end of a line that fills the width,
838
+ // it belongs on a new empty visual line past the last chunk.
839
+ if (logRow === pos.row && atExactBoundary)
840
+ return visualRow;
815
841
  }
816
842
  return Math.max(0, allVisual.length - 1);
817
843
  }
@@ -822,6 +848,14 @@ export class InputEditor {
822
848
  const colInChunk = available > 0 ? pos.col % available : pos.col;
823
849
  return prefixLen + colInChunk + 1;
824
850
  }
851
+ cursorAtExactWrapBoundary(width, firstPrefix, continuationPrefix) {
852
+ const pos = this.offsetToRowCol(this._cursor);
853
+ const logicalLines = this.logicalLines();
854
+ const line = logicalLines[pos.row] ?? "";
855
+ const prefixLen = pos.row === 0 ? firstPrefix.length : continuationPrefix.length;
856
+ const available = Math.max(1, width - prefixLen);
857
+ return pos.col === line.length && line.length > 0 && line.length % available === 0;
858
+ }
825
859
  }
826
860
  // ── Utility ─────────────────────────────────────────────────────────
827
861
  function escapeRegex(str) {
@@ -833,3 +867,10 @@ function removeVirtualAttachmentTag(text, tag) {
833
867
  return text.replace(withTrailingSpace, "");
834
868
  return text.replace(tag, "");
835
869
  }
870
+ function suggestionSpansForChunk(chunkStart, chunkEnd, suggestionStart, suggestionEnd, prefixLength) {
871
+ const start = Math.max(chunkStart, suggestionStart);
872
+ const end = Math.min(chunkEnd, suggestionEnd);
873
+ if (end <= start)
874
+ return undefined;
875
+ return [{ start: prefixLength + start - chunkStart, end: prefixLength + end - chunkStart }];
876
+ }
@@ -20,3 +20,4 @@ export declare function formatMarkdownTables(text: string, maxWidth?: number): s
20
20
  export declare function renderMarkdownLine(text: string, start?: number): RenderedMarkdownLine;
21
21
  export declare function renderMarkdownTextLines(text: string, width: number, start?: number): RenderedMarkdownTextLine[];
22
22
  export declare function markdownSyntaxHighlightsForText(text: string, startColumn?: number): ToolBodySyntaxHighlights;
23
+ export declare function isOnlyHiddenMetadata(text: string): boolean;
@@ -17,7 +17,7 @@ export function formatMarkdownTables(text, maxWidth) {
17
17
  index += 1;
18
18
  continue;
19
19
  }
20
- if (!fence && isMarkdownReferenceDefinition(line)) {
20
+ if (!fence && isHiddenMarkdownMetadataLine(line)) {
21
21
  skipBlankAfterHiddenReference = formatted.length === 0 || (formatted.at(-1) ?? "").trim().length === 0;
22
22
  index += 1;
23
23
  continue;
@@ -547,9 +547,34 @@ function markdownLineSyntaxHighlight(fence, fenceDelimiterLine, start) {
547
547
  function sanitizeMarkdownText(text) {
548
548
  return expandTabs(text.replace(/\x1b/g, "␛").replace(/\r/g, ""));
549
549
  }
550
+ function isHiddenMarkdownMetadataLine(line) {
551
+ return isMarkdownReferenceDefinition(line) || isStreamingDcpMetadataPrefix(line);
552
+ }
553
+ export function isOnlyHiddenMetadata(text) {
554
+ if (!text)
555
+ return false;
556
+ for (const line of text.split("\n")) {
557
+ if (line.length === 0)
558
+ continue;
559
+ if (!isHiddenMarkdownMetadataLine(line))
560
+ return false;
561
+ }
562
+ return true;
563
+ }
550
564
  function isMarkdownReferenceDefinition(line) {
551
565
  return /^ {0,3}\[[^\]\n]+\]:[ \t]*\S.*$/u.test(line);
552
566
  }
567
+ function isStreamingDcpMetadataPrefix(line) {
568
+ const content = line.replace(/^ {0,3}/u, "");
569
+ if (content.length === 0)
570
+ return false;
571
+ return isDcpReferencePrefix(content, DCP_MESSAGE_REFERENCE_PREFIX) || isDcpReferencePrefix(content, DCP_BLOCK_REFERENCE_PREFIX);
572
+ }
573
+ function isDcpReferencePrefix(content, markerPrefix) {
574
+ return markerPrefix.startsWith(content) || (content.startsWith(markerPrefix) && /^\d*$/u.test(content.slice(markerPrefix.length)));
575
+ }
576
+ const DCP_MESSAGE_REFERENCE_PREFIX = "[dcp-id]: # (m";
577
+ const DCP_BLOCK_REFERENCE_PREFIX = "[dcp-block-id]: # (b";
553
578
  function markdownFence(line) {
554
579
  const match = /^\s{0,3}(`{3,}|~{3,})(.*)$/.exec(line);
555
580
  const marker = match?.[1];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Schema registry — re-exports all TypeBox schemas.
3
+ */
4
+ export { PixConfigSchema } from "./pix-schema.js";
5
+ export { PiToolsSuiteConfigSchema } from "./pi-tools-suite-schema.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Schema registry — re-exports all TypeBox schemas.
3
+ */
4
+ export { PixConfigSchema } from "./pix-schema.js";
5
+ export { PiToolsSuiteConfigSchema } from "./pi-tools-suite-schema.js";