@toddzheng024/dscode-bundle 0.7.11 → 0.7.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 (154) hide show
  1. package/THIRD_PARTY_NOTICES.md +3 -3
  2. package/cordis.patch.yml +1 -1
  3. package/package.json +5 -4
  4. package/plugins/i18n/messages.mjs +6 -6
  5. package/plugins/session-metrics/view.mjs +16 -5
  6. package/plugins/tui-tools/index.mjs +14 -1
  7. package/vendor/tui/lib/app.mjs +6674 -0
  8. package/vendor/tui/lib/approval.mjs +122 -0
  9. package/vendor/tui/lib/attachments.mjs +218 -0
  10. package/vendor/tui/lib/authorization-panel.mjs +242 -0
  11. package/vendor/tui/lib/authorization.mjs +111 -0
  12. package/vendor/tui/lib/commands.mjs +123 -0
  13. package/vendor/tui/lib/dscode/chat.mjs +64 -0
  14. package/vendor/tui/lib/dscode/flags.mjs +32 -0
  15. package/vendor/tui/lib/dscode/model-search.mjs +68 -0
  16. package/vendor/tui/lib/dscode/paste.mjs +87 -0
  17. package/vendor/tui/lib/dscode/telemetry.mjs +82 -0
  18. package/vendor/tui/lib/dscode/welcome.mjs +100 -0
  19. package/vendor/tui/lib/editor-keys.mjs +346 -0
  20. package/vendor/tui/lib/editor.mjs +50 -0
  21. package/vendor/tui/lib/fork.mjs +24 -0
  22. package/vendor/tui/lib/git-workflow.mjs +278 -0
  23. package/vendor/tui/{types/history.d.ts → lib/history.mjs} +69 -26
  24. package/vendor/tui/{types/i18n.d.ts → lib/i18n.mjs} +23 -15
  25. package/vendor/tui/lib/index.mjs +2198 -0
  26. package/vendor/tui/lib/input-split.mjs +170 -0
  27. package/vendor/tui/lib/internals.mjs +90 -0
  28. package/vendor/tui/lib/invariant.mjs +22 -0
  29. package/vendor/tui/lib/kernel-panels.mjs +1265 -0
  30. package/vendor/tui/lib/keyboard.mjs +283 -0
  31. package/vendor/tui/lib/language-panel.mjs +41 -0
  32. package/vendor/tui/lib/locales/en.mjs +495 -0
  33. package/vendor/tui/lib/locales/zh.mjs +495 -0
  34. package/vendor/tui/lib/mentions.mjs +150 -0
  35. package/vendor/tui/lib/model-capabilities.mjs +245 -0
  36. package/vendor/tui/lib/models.mjs +215 -0
  37. package/vendor/tui/{types/panel-accent.d.ts → lib/panel-accent.mjs} +11 -7
  38. package/vendor/tui/lib/permissions.mjs +45 -0
  39. package/vendor/tui/lib/plugin-inventory.mjs +27 -0
  40. package/vendor/tui/lib/presets.mjs +46 -0
  41. package/vendor/tui/lib/provider-settings.mjs +600 -0
  42. package/vendor/tui/lib/questions.mjs +116 -0
  43. package/vendor/tui/lib/rainbow.mjs +181 -0
  44. package/vendor/tui/lib/render/animations.mjs +665 -0
  45. package/vendor/tui/lib/render/editor.mjs +437 -0
  46. package/vendor/tui/lib/render/export.mjs +119 -0
  47. package/vendor/tui/lib/render/fuzzy.mjs +79 -0
  48. package/vendor/tui/lib/render/ime-cursor.mjs +135 -0
  49. package/vendor/tui/lib/render/inspector.mjs +93 -0
  50. package/vendor/tui/lib/render/lines.mjs +538 -0
  51. package/vendor/tui/lib/render/markdown.mjs +592 -0
  52. package/vendor/tui/lib/render/projection.mjs +1862 -0
  53. package/vendor/tui/lib/render/status.mjs +591 -0
  54. package/vendor/tui/lib/render/text.mjs +157 -0
  55. package/vendor/tui/lib/render/tool-detail.mjs +187 -0
  56. package/vendor/tui/lib/render/tool-preview.mjs +79 -0
  57. package/vendor/tui/lib/render/usage.mjs +336 -0
  58. package/vendor/tui/lib/render/width.mjs +191 -0
  59. package/vendor/tui/lib/session-directory.mjs +329 -0
  60. package/vendor/tui/lib/session-query.mjs +184 -0
  61. package/vendor/tui/lib/session-switch.mjs +51 -0
  62. package/vendor/tui/lib/settings-file.mjs +75 -0
  63. package/vendor/tui/lib/skills.mjs +119 -0
  64. package/vendor/tui/lib/startup.mjs +111 -0
  65. package/vendor/tui/lib/store.mjs +129 -0
  66. package/vendor/tui/lib/subagents.mjs +200 -0
  67. package/vendor/tui/lib/terminal-title.mjs +186 -0
  68. package/vendor/tui/lib/theme-panel.mjs +60 -0
  69. package/vendor/tui/lib/theme.mjs +379 -0
  70. package/vendor/tui/lib/update-panel.mjs +239 -0
  71. package/vendor/tui/lib/update.mjs +101 -0
  72. package/vendor/tui/lib/version.mjs +105 -0
  73. package/vendor/tui/lib/whale-glyph.mjs +20 -0
  74. package/vendor/tui/LICENSE +0 -21
  75. package/vendor/tui/devtools-CdTl3MNy.mjs +0 -3643
  76. package/vendor/tui/dscode-email/cli.mjs +0 -32
  77. package/vendor/tui/dscode-email/contacts.mjs +0 -36
  78. package/vendor/tui/dscode-email/gmail-oauth.mjs +0 -69
  79. package/vendor/tui/dscode-email/gmail-store.mjs +0 -2
  80. package/vendor/tui/dscode-email/gmail.mjs +0 -194
  81. package/vendor/tui/dscode-email/imap.mjs +0 -136
  82. package/vendor/tui/dscode-email/inbox.d.mts +0 -25
  83. package/vendor/tui/dscode-email/inbox.mjs +0 -76
  84. package/vendor/tui/dscode-email/smtp.mjs +0 -69
  85. package/vendor/tui/dscode-email/store.mjs +0 -32
  86. package/vendor/tui/dscode-providers/catalog.mjs +0 -136
  87. package/vendor/tui/dscode-providers/effort.mjs +0 -35
  88. package/vendor/tui/dscode-providers/openrouter-account.mjs +0 -171
  89. package/vendor/tui/index.mjs +0 -44483
  90. package/vendor/tui/invariant.mjs +0 -21
  91. package/vendor/tui/rolldown-runtime-CMFfr-1z.mjs +0 -26
  92. package/vendor/tui/session-query.mjs +0 -150
  93. package/vendor/tui/startup.mjs +0 -109
  94. package/vendor/tui/theme-7u5Qo3dF.mjs +0 -1265
  95. package/vendor/tui/types/app.d.ts +0 -348
  96. package/vendor/tui/types/approval.d.ts +0 -59
  97. package/vendor/tui/types/attachments.d.ts +0 -52
  98. package/vendor/tui/types/authorization-panel.d.ts +0 -22
  99. package/vendor/tui/types/authorization.d.ts +0 -36
  100. package/vendor/tui/types/commands.d.ts +0 -52
  101. package/vendor/tui/types/editor-keys.d.ts +0 -105
  102. package/vendor/tui/types/editor.d.ts +0 -6
  103. package/vendor/tui/types/fork.d.ts +0 -8
  104. package/vendor/tui/types/git-workflow.d.ts +0 -121
  105. package/vendor/tui/types/index.d.ts +0 -223
  106. package/vendor/tui/types/input-split.d.ts +0 -54
  107. package/vendor/tui/types/internals.d.ts +0 -26
  108. package/vendor/tui/types/invariant.d.ts +0 -15
  109. package/vendor/tui/types/kernel-panels.d.ts +0 -245
  110. package/vendor/tui/types/keyboard.d.ts +0 -80
  111. package/vendor/tui/types/language-panel.d.ts +0 -12
  112. package/vendor/tui/types/locales/en.d.ts +0 -450
  113. package/vendor/tui/types/locales/zh.d.ts +0 -9
  114. package/vendor/tui/types/mentions.d.ts +0 -85
  115. package/vendor/tui/types/model-capabilities.d.ts +0 -82
  116. package/vendor/tui/types/models.d.ts +0 -133
  117. package/vendor/tui/types/permissions.d.ts +0 -27
  118. package/vendor/tui/types/plugin-inventory.d.ts +0 -11
  119. package/vendor/tui/types/presets.d.ts +0 -22
  120. package/vendor/tui/types/provider-settings.d.ts +0 -239
  121. package/vendor/tui/types/questions.d.ts +0 -54
  122. package/vendor/tui/types/rainbow.d.ts +0 -69
  123. package/vendor/tui/types/render/animations.d.ts +0 -307
  124. package/vendor/tui/types/render/editor.d.ts +0 -163
  125. package/vendor/tui/types/render/export.d.ts +0 -9
  126. package/vendor/tui/types/render/fuzzy.d.ts +0 -21
  127. package/vendor/tui/types/render/ime-cursor.d.ts +0 -60
  128. package/vendor/tui/types/render/inspector.d.ts +0 -62
  129. package/vendor/tui/types/render/lines.d.ts +0 -86
  130. package/vendor/tui/types/render/markdown.d.ts +0 -29
  131. package/vendor/tui/types/render/projection.d.ts +0 -587
  132. package/vendor/tui/types/render/status.d.ts +0 -196
  133. package/vendor/tui/types/render/text.d.ts +0 -64
  134. package/vendor/tui/types/render/tool-detail.d.ts +0 -94
  135. package/vendor/tui/types/render/tool-preview.d.ts +0 -28
  136. package/vendor/tui/types/render/usage.d.ts +0 -113
  137. package/vendor/tui/types/render/width.d.ts +0 -29
  138. package/vendor/tui/types/session-directory.d.ts +0 -190
  139. package/vendor/tui/types/session-query.d.ts +0 -92
  140. package/vendor/tui/types/session-switch.d.ts +0 -17
  141. package/vendor/tui/types/settings-file.d.ts +0 -41
  142. package/vendor/tui/types/skills.d.ts +0 -47
  143. package/vendor/tui/types/startup.d.ts +0 -65
  144. package/vendor/tui/types/store.d.ts +0 -58
  145. package/vendor/tui/types/subagents.d.ts +0 -70
  146. package/vendor/tui/types/terminal-title.d.ts +0 -66
  147. package/vendor/tui/types/theme-panel.d.ts +0 -24
  148. package/vendor/tui/types/theme.d.ts +0 -434
  149. package/vendor/tui/types/update-panel.d.ts +0 -49
  150. package/vendor/tui/types/update.d.ts +0 -75
  151. package/vendor/tui/types/version.d.ts +0 -19
  152. package/vendor/tui/types/whale-glyph.d.ts +0 -6
  153. /package/vendor/tui/{dscode-clipboard-image → lib/dscode/clipboard-image}/clipboard-image.swift +0 -0
  154. /package/vendor/tui/{dscode-clipboard-image → lib/dscode/clipboard-image}/index.mjs +0 -0
@@ -1,245 +0,0 @@
1
- /** Bounded, composer-safe panels for preset, session, and plugin kernel views. */
2
- import { type ReactElement } from 'react';
3
- import type { ModelDirectory, ModelRow } from './models.ts';
4
- import type { SubagentRow } from './subagents.ts';
5
- import type { ScheduleRow } from './render/projection.ts';
6
- import type { PermissionRow } from './permissions.ts';
7
- import type { PresetRow } from './presets.ts';
8
- import type { PluginRow } from './plugin-inventory.ts';
9
- import type { SessionDirectoryOptions, SessionRow } from './session-directory.ts';
10
- import type { ReviewBranch, ReviewCommit, ReviewSelection } from './git-workflow.ts';
11
- import { type UsageView } from './render/usage.ts';
12
- import { type StatusItemId } from './render/status.ts';
13
- /**
14
- * Apply one keystroke to a panel search query. IME commits arrive as one
15
- * multi-character chunk, so the whole printable run is appended; paste
16
- * markers are stripped and control-laden chunks are ignored.
17
- */
18
- export declare function editQuery(query: string, input: string, key: {
19
- backspace?: boolean;
20
- delete?: boolean;
21
- }): string | undefined;
22
- export declare function ModePanel({ current, load, select, close }: {
23
- current: string;
24
- load: () => Promise<readonly PresetRow[]>;
25
- select: (id: string) => void;
26
- close: () => void;
27
- }): ReactElement;
28
- export declare function PermissionPanel({ current, load, select, close }: {
29
- current: string;
30
- load: () => Promise<readonly PermissionRow[]>;
31
- select: (id: string) => void;
32
- close: () => void;
33
- }): ReactElement;
34
- export declare function PluginPanel({ load, close, initialQuery }: {
35
- load: () => readonly PluginRow[];
36
- close: () => void;
37
- initialQuery?: string;
38
- }): ReactElement;
39
- /** One background job snapshot for the /jobs panel (the registry's read-only view). */
40
- export interface JobRow {
41
- /** The registry-issued id (`<kind>-N`). */
42
- readonly id: string;
43
- /** Producer kind (bash, subagent, …). */
44
- readonly kind: string;
45
- /** One-line model-facing label (the command; the delegation description). */
46
- readonly label: string;
47
- /** Lifecycle state. */
48
- readonly status: 'running' | 'stopping' | 'completed' | 'killed' | 'failed';
49
- /** Kind-specific status detail once the producer supplied one. */
50
- readonly detail?: string;
51
- /** Epoch ms when the job was registered. */
52
- readonly startedAt: number;
53
- /** Epoch ms when the job settled; absent while running/stopping. */
54
- readonly finishedAt?: number;
55
- }
56
- /** Web TurnStatus elapsed format: `45s` under a minute, `2m03s` beyond. */
57
- export declare function runClock(ms: number): string;
58
- /**
59
- * The read-only background-job panel: caller-owned and unowned jobs from the
60
- * host `jobs` registry in registration order, with a local second-hand while
61
- * the panel is open (elapsed clocks advance and the snapshot re-reads; the
62
- * interval dies with the panel). Cancel stays upstream-only; an absent
63
- * registry renders as the plain empty state (a harmless missing service).
64
- */
65
- export declare function JobsPanel({ load, close }: {
66
- load: () => readonly JobRow[];
67
- close: () => void;
68
- }): ReactElement;
69
- export declare function ResumePanel({ currentCwd, load, readTranscript, select, requestDelete, deleteConfirmId, reloadToken, deleteMode, close }: {
70
- currentCwd: string;
71
- load: (options: SessionDirectoryOptions, signal?: AbortSignal) => Promise<readonly SessionRow[]>;
72
- readTranscript: (id: string, signal?: AbortSignal) => Promise<string>;
73
- select: (row: SessionRow) => void;
74
- /** Arm the composer-based delete confirm for one row (App owns the keys). */
75
- requestDelete?: (row: SessionRow) => void;
76
- /** The row id awaiting y/n in the composer, when any (App-owned). */
77
- deleteConfirmId?: string;
78
- /** Bump to reload the listing (e.g. after a deletion). */
79
- reloadToken?: number;
80
- /** Opened via /delete: hint-first delete mode. */
81
- deleteMode?: boolean;
82
- close: () => void;
83
- }): ReactElement;
84
- /**
85
- * The /history recall panel (Codex composer-history search, bounded): one
86
- * query line over the newest-first recall space, filtered by substring, with
87
- * arrow selection and enter to fill the composer. Editing the query restarts
88
- * from the newest match; Esc closes without touching the draft.
89
- */
90
- export declare function HistoryPanel({ entries, fill, close }: {
91
- /** Newest-first recall entries (persistent + in-session, deduped). */
92
- entries: readonly string[];
93
- /** Accept one entry: its text plus its recall-space index (browsing resumes there). */
94
- fill: (text: string, index: number) => void;
95
- close: () => void;
96
- }): ReactElement;
97
- /**
98
- * The /review candidate picker (Codex's preset popup): bare /review opens a
99
- * four-way preset — review uncommitted changes, pick a base branch, pick a
100
- * recent commit, or type a custom focus. Branch and commit phases are
101
- * type-to-filter lists; every selection resolves to the same /review
102
- * argument string the direct command accepts.
103
- */
104
- export declare function ReviewPickerPanel({ loadBranches, loadCommits, choose, close }: {
105
- loadBranches: (signal?: AbortSignal) => Promise<readonly ReviewBranch[]>;
106
- loadCommits: (signal?: AbortSignal) => Promise<readonly ReviewCommit[]>;
107
- /** Run the review for one picker selection. */
108
- choose: (selection: ReviewSelection) => void;
109
- close: () => void;
110
- }): ReactElement;
111
- /** One cross-session full-text search hit mapped from the session-query engine. */
112
- export interface SearchRow {
113
- /** Session id (Enter resumes it through the switch machinery). */
114
- readonly id: string;
115
- /** Display label: session title or the short id form. */
116
- readonly label: string;
117
- /** Secondary facts line (workspace · preset markers). */
118
- readonly detail: string;
119
- /** Bounded plain-text excerpt around the strongest match. */
120
- readonly snippet: string;
121
- /** Match timestamp (relative labels derive from it). */
122
- readonly updatedAt: number;
123
- /** Whether the hit is a delegated subagent conversation (not resumable). */
124
- readonly subagent: boolean;
125
- /** Whether Enter may switch into it. */
126
- readonly resumable: boolean;
127
- }
128
- /**
129
- * The /search panel: full-text search over every persisted session through
130
- * the in-process session-query engine (the same corpus the model's
131
- * session_search tool reads). Type a query, Enter searches, Enter again
132
- * resumes the hit; the query line edits like every kernel panel.
133
- */
134
- export declare function SearchPanel({ load, select, initialQuery, close }: {
135
- load: (query: string, signal?: AbortSignal) => Promise<readonly SearchRow[]>;
136
- select: (row: SearchRow) => void;
137
- initialQuery?: string;
138
- close: () => void;
139
- }): ReactElement;
140
- /**
141
- * The /statusline picker (the Codex setup-view contract): one bounded list
142
- * of every status item with its enabled mark, arrow reordering, and a
143
- * live preview — the real status line under the composer updates as you
144
- * edit, so the panel itself carries no duplicate preview row.
145
- */
146
- export declare function StatuslinePanel({ enabled, change, close }: {
147
- enabled: readonly StatusItemId[];
148
- change: (items: readonly StatusItemId[]) => void;
149
- close: () => void;
150
- }): ReactElement;
151
- /**
152
- * The `/model` reasoning-effort stage (the Codex model → reasoning popup
153
- * contract): one bounded list over the selected model's adapter-advertised
154
- * effort levels — in the adapter's own display order, ids verbatim (the
155
- * kernel treats them as opaque and rejects anything else) — with the
156
- * effective effort and the model default marked. A model WITHOUT an
157
- * adapter-declared default leads with a "Default" (provider-default) row —
158
- * the web effort pane's first entry — so the user can clear a picked level
159
- * back to provider behavior. A model advertising no levels opens the same
160
- * stage with an explicit empty state (the web pane's "no levels" copy)
161
- * instead of a bare failure notice. Enter applies one level; Esc returns to
162
- * the model list without applying.
163
- */
164
- export declare function EffortPanel({ row, current, select, back, onExit }: {
165
- /** The model row whose advertised levels this stage lists. */
166
- row: ModelRow;
167
- /** Effective effort currently in force ('' when none), for the ● mark. */
168
- current: string | undefined;
169
- /** Accept one advertised effort id, or '' for the provider default. */
170
- select: (effortId: string) => void;
171
- /** Return to the model list without applying. */
172
- back: () => void;
173
- /** Leave the whole /model flow (Ctrl+C). */
174
- onExit: () => void;
175
- }): ReactElement;
176
- /**
177
- * The /agents panel (the Codex agent-picker contract, read-only): this
178
- * conversation's subagent conversations — live rows from the activity feed
179
- * first, persisted children the feed has not seen this process after — with
180
- * Enter/t opening the child's full transcript in the shared read-only
181
- * document view (the same projection the exporter uses).
182
- */
183
- export declare function AgentsPanel({ live, load, readTranscript, close }: {
184
- /** Live feed rows (child sessions observed this process). */
185
- live: readonly SubagentRow[];
186
- /** Load this session's persisted child sessions by lineage. */
187
- load: () => Promise<readonly SessionRow[]>;
188
- /** Read one child session's full transcript as markdown. */
189
- readTranscript: (id: string, signal?: AbortSignal) => Promise<string>;
190
- close: () => void;
191
- }): ReactElement;
192
- /**
193
- * The /subagent model panel: which model configuration delegated subagents
194
- * run on. The kernel seeds child agents from the parent's CREATE-TIME
195
- * AgentOptions, so a mid-session /model switch would otherwise leave them on
196
- * the launch-time route; the TUI mirrors the selection onto subagent-origin
197
- * requests (or an explicit override picked here) via an agent/request
198
- * listener. The leading "inherit" row restores follow-the-current-model
199
- * behavior; picking a model with several advertised efforts opens the same
200
- * effort stage /model uses. Effort overrides are not offered separately —
201
- * the kernel's AgentOptions has no effort channel for children, so the level
202
- * rides the selected model exactly as /model applies it.
203
- */
204
- export declare function SubagentPanel({ current, load, pick, inherit, close }: {
205
- /** Display label of the override in force, '' when following the current model. */
206
- current: string;
207
- load: () => Promise<ModelDirectory>;
208
- /** Apply one model (with an advertised effort, when picked) as the override. */
209
- pick: (row: ModelRow, effortId?: string) => void;
210
- /** Drop the override: subagents follow the current model again. */
211
- inherit: () => void;
212
- close: () => void;
213
- }): ReactElement;
214
- /**
215
- * The /schedule panel: the read-only catalog of active reminders folded from
216
- * durable schedule/change events (the web ui-schedule contract: overdue
217
- * first, then ascending target; the model creates and cancels through its
218
- * schedule_* tools, the panel only shows state). A local second-hand keeps
219
- * the relative labels live while the panel is open.
220
- */
221
- export interface ScheduleDisplayRow {
222
- readonly key: string;
223
- readonly text: string;
224
- readonly tone?: 'error';
225
- }
226
- /** Human frequency label: one-shot kinds read as Once, every rows carry the interval. */
227
- export declare function scheduleFrequency(row: ScheduleRow): string;
228
- /** Relative label for the next target: in N unit, or N unit overdue. */
229
- export declare function scheduleRelative(targetAt: number, now: number): string;
230
- /** Ordered display rows: overdue first (error tone), then ascending target. */
231
- export declare function scheduleDisplayRows(rows: readonly ScheduleRow[], now: number): readonly ScheduleDisplayRow[];
232
- export declare function SchedulePanel({ rows, close }: {
233
- rows: () => readonly ScheduleRow[];
234
- close: () => void;
235
- }): ReactElement;
236
- /**
237
- * The /usage panel: the session's provider-reported token totals, its context
238
- * pressure and estimated composition, and the exact per-turn accounting, in
239
- * one bounded scrollable surface. Read-only — Esc or q closes it.
240
- */
241
- export declare function UsagePanel({ load, close }: {
242
- /** Read the current session's usage blocks from the mounted projections. */
243
- load: () => Promise<UsageView>;
244
- close: () => void;
245
- }): ReactElement;
@@ -1,80 +0,0 @@
1
- /**
2
- * Keyboard enhancement protocol (Codex `keyboard_modes` parity) and the
3
- * kitty CSI-u normalization layer.
4
- *
5
- * The TUI pushes the kitty keyboard protocol with DISAMBIGUATE_ESCAPE_CODES
6
- * and REPORT_ALTERNATE_KEYS (flags 1|4 = `\x1b[>5u`). Event types are
7
- * deliberately NOT requested: Ink 5's parser cannot decode the
8
- * `:event-type` suffix, and repeat/release reporting buys this surface
9
- * nothing.
10
- *
11
- * Ink 5 also cannot parse most CSI-u forms at all — they fall through its
12
- * regex as unnamed sequences and get INSERTED AS DRAFT TEXT. The composer's
13
- * stdin read patch therefore rewrites every CSI-u form it can decode back
14
- * to the legacy byte or canonical sequence the existing key handling
15
- * already understands, before Ink ever parses the chunk.
16
- * @module @deepseek-ai/dsh-code/keyboard
17
- */
18
- /** Push keyboard enhancement (modifyOtherKeys off, kitty flags 1|4). */
19
- export declare const KEYBOARD_ENHANCE_ENABLE = "\u001B[>4;0m\u001B[>5u";
20
- /** Pop the enhancement stack and reset modifyOtherKeys (exit path). */
21
- export declare const KEYBOARD_ENHANCE_DISABLE = "\u001B[<u\u001B[>4;0m";
22
- /** Explicit environment overrides for terminal keyboard enhancement. */
23
- export declare const DSH_DISABLE_KEYBOARD_ENHANCEMENT = "DSH_DISABLE_KEYBOARD_ENHANCEMENT";
24
- export declare const DSH_ENABLE_KEYBOARD_ENHANCEMENT = "DSH_ENABLE_KEYBOARD_ENHANCEMENT";
25
- /** True when the process is running inside the VS Code integrated terminal. */
26
- export declare function isVsCodeTerminalEnv(env?: NodeJS.ProcessEnv): boolean;
27
- /** Whether to push Kitty keyboard enhancement for the current terminal. */
28
- export declare function shouldEnableKeyboardEnhancement(env?: NodeJS.ProcessEnv): boolean;
29
- /** Enable bracketed paste reporting. */
30
- export declare const BRACKETED_PASTE_ENABLE = "\u001B[?2004h";
31
- /** Disable bracketed paste reporting. */
32
- export declare const BRACKETED_PASTE_DISABLE = "\u001B[?2004l";
33
- /** Enable terminal focus-in/focus-out reporting (xterm focus protocol). */
34
- export declare const TERMINAL_FOCUS_REPORT_ENABLE = "\u001B[?1004h";
35
- /** Disable terminal focus-in/focus-out reporting. */
36
- export declare const TERMINAL_FOCUS_REPORT_DISABLE = "\u001B[?1004l";
37
- /**
38
- * Remove xterm focus reports from one input chunk and update the caller's
39
- * focus state. Focus reports are terminal protocol, not composer text.
40
- */
41
- export declare function stripTerminalFocusEvents(chunk: string, onFocus: (focused: boolean) => void): string;
42
- /** Bracketed paste markers as Ink delivers them (it strips the leading ESC). */
43
- export declare const PASTE_START_MARKER = "[200~";
44
- export declare const PASTE_END_MARKER = "[201~";
45
- /**
46
- * How long an unterminated bracketed-paste block may hold buffered bytes
47
- * before the input splitter strips its start marker and releases them: a
48
- * terminal that loses the end marker must never take the whole keyboard
49
- * hostage (Esc/Ctrl+C included). Shared by the splitter and the composer's
50
- * lost-paste safety net so both use one window.
51
- */
52
- export declare const PASTE_BRACKET_TIMEOUT_MS = 1000;
53
- /**
54
- * Remove bracketed paste markers from one input chunk. Panel drafts accept raw
55
- * `input` text, where an unhandled paste would otherwise persist the literal
56
- * "[200~"/"[201~" markers Ink leaves after stripping the ESC byte.
57
- */
58
- export declare function stripPasteMarkers(text: string): string;
59
- /**
60
- * Rewrite every decodable kitty CSI-u sequence in one stdin chunk to the
61
- * legacy form the input layer already handles. Undecodable or non-key
62
- * sequences pass through untouched, so terminals without the protocol are
63
- * unaffected.
64
- */
65
- export declare function normalizeKeyboardChunk(chunk: string): string;
66
- /** Editor actions Ink cannot distinguish reliably when terminal bytes batch. */
67
- export type RawEditorToken = {
68
- readonly kind: 'text';
69
- readonly text: string;
70
- } | {
71
- readonly kind: 'home' | 'end' | 'delete-backward' | 'delete-word-backward' | 'delete-forward' | 'delete-word-forward';
72
- };
73
- /**
74
- * Tokenize a stdin chunk containing at least one editor-only key. Ink calls
75
- * `useInput` once for a pasted/batched chunk, so preserving each action here
76
- * prevents repeated Backspace/Home/End/Delete presses from collapsing into
77
- * one blurred key event. Unknown escape sequences return undefined and stay
78
- * under Ink's ownership.
79
- */
80
- export declare function tokenizeRawEditorChunk(chunk: string): readonly RawEditorToken[] | undefined;
@@ -1,12 +0,0 @@
1
- /**
2
- * The /language picker: one row per interface language, the active one
3
- * marked, arrow selection, Enter applies (persisting through the runner and
4
- * repainting the whole screen so Static-region text switches too).
5
- */
6
- import { type ReactElement } from 'react';
7
- import { type LanguageName } from './i18n.ts';
8
- export declare function LanguagePanel({ current, select, close }: {
9
- current: LanguageName;
10
- select: (name: LanguageName) => void;
11
- close: () => void;
12
- }): ReactElement;