@wrongstack/tui 0.284.1 → 0.286.0
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.
- package/dist/app-initial-state.d.ts +28 -0
- package/dist/app-initial-state.d.ts.map +1 -0
- package/dist/app-reducer.d.ts +5 -0
- package/dist/app-reducer.d.ts.map +1 -0
- package/dist/app-state.d.ts +1841 -0
- package/dist/app-state.d.ts.map +1 -0
- package/dist/app.d.ts +593 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/clipboard.d.ts +2 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/components/agents-monitor.d.ts +114 -0
- package/dist/components/agents-monitor.d.ts.map +1 -0
- package/dist/components/animation-style.d.ts +51 -0
- package/dist/components/animation-style.d.ts.map +1 -0
- package/dist/components/audit-panel.d.ts +9 -0
- package/dist/components/audit-panel.d.ts.map +1 -0
- package/dist/components/auth-panel-model.d.ts +150 -0
- package/dist/components/auth-panel-model.d.ts.map +1 -0
- package/dist/components/auth-panel.d.ts +8 -0
- package/dist/components/auth-panel.d.ts.map +1 -0
- package/dist/components/autonomy-picker.d.ts +15 -0
- package/dist/components/autonomy-picker.d.ts.map +1 -0
- package/dist/components/brain-decision-prompt.d.ts +28 -0
- package/dist/components/brain-decision-prompt.d.ts.map +1 -0
- package/dist/components/brain-panel-model.d.ts +107 -0
- package/dist/components/brain-panel-model.d.ts.map +1 -0
- package/dist/components/brain-panel.d.ts +22 -0
- package/dist/components/brain-panel.d.ts.map +1 -0
- package/dist/components/checkpoint-timeline.d.ts +19 -0
- package/dist/components/checkpoint-timeline.d.ts.map +1 -0
- package/dist/components/confirm-prompt.d.ts +26 -0
- package/dist/components/confirm-prompt.d.ts.map +1 -0
- package/dist/components/continue-confirm-panel.d.ts +47 -0
- package/dist/components/continue-confirm-panel.d.ts.map +1 -0
- package/dist/components/coordinator-panel.d.ts +11 -0
- package/dist/components/coordinator-panel.d.ts.map +1 -0
- package/dist/components/design-picker.d.ts +14 -0
- package/dist/components/design-picker.d.ts.map +1 -0
- package/dist/components/enhance-panel.d.ts +36 -0
- package/dist/components/enhance-panel.d.ts.map +1 -0
- package/dist/components/esc-confirm-prompt.d.ts +17 -0
- package/dist/components/esc-confirm-prompt.d.ts.map +1 -0
- package/dist/components/f-key-picker.d.ts +13 -0
- package/dist/components/f-key-picker.d.ts.map +1 -0
- package/dist/components/file-picker.d.ts +8 -0
- package/dist/components/file-picker.d.ts.map +1 -0
- package/dist/components/fleet-monitor.d.ts +60 -0
- package/dist/components/fleet-monitor.d.ts.map +1 -0
- package/dist/components/fleet-panel.d.ts +69 -0
- package/dist/components/fleet-panel.d.ts.map +1 -0
- package/dist/components/goal-panel.d.ts +17 -0
- package/dist/components/goal-panel.d.ts.map +1 -0
- package/dist/components/help-overlay.d.ts +27 -0
- package/dist/components/help-overlay.d.ts.map +1 -0
- package/dist/components/help-panel.d.ts +16 -0
- package/dist/components/help-panel.d.ts.map +1 -0
- package/dist/components/history/assistant.d.ts +61 -0
- package/dist/components/history/assistant.d.ts.map +1 -0
- package/dist/components/history/banner.d.ts +13 -0
- package/dist/components/history/banner.d.ts.map +1 -0
- package/dist/components/history/code-block.d.ts +217 -0
- package/dist/components/history/code-block.d.ts.map +1 -0
- package/dist/components/history/entry.d.ts +19 -0
- package/dist/components/history/entry.d.ts.map +1 -0
- package/dist/components/history/index.d.ts +21 -0
- package/dist/components/history/index.d.ts.map +1 -0
- package/dist/components/history/replay.d.ts +44 -0
- package/dist/components/history/replay.d.ts.map +1 -0
- package/dist/components/history/types.d.ts +146 -0
- package/dist/components/history/types.d.ts.map +1 -0
- package/dist/components/history/utils.d.ts +65 -0
- package/dist/components/history/utils.d.ts.map +1 -0
- package/dist/components/history.d.ts +2 -0
- package/dist/components/history.d.ts.map +1 -0
- package/dist/components/input.d.ts +57 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/kanban-panel.d.ts +7 -0
- package/dist/components/kanban-panel.d.ts.map +1 -0
- package/dist/components/key-hint-bar.d.ts +31 -0
- package/dist/components/key-hint-bar.d.ts.map +1 -0
- package/dist/components/live-activity-strip.d.ts +39 -0
- package/dist/components/live-activity-strip.d.ts.map +1 -0
- package/dist/components/mailbox-panel.d.ts +40 -0
- package/dist/components/mailbox-panel.d.ts.map +1 -0
- package/dist/components/mcp-picker.d.ts +18 -0
- package/dist/components/mcp-picker.d.ts.map +1 -0
- package/dist/components/mode-picker.d.ts +17 -0
- package/dist/components/mode-picker.d.ts.map +1 -0
- package/dist/components/model-picker.d.ts +37 -0
- package/dist/components/model-picker.d.ts.map +1 -0
- package/dist/components/phase-monitor.d.ts +33 -0
- package/dist/components/phase-monitor.d.ts.map +1 -0
- package/dist/components/phase-panel.d.ts +22 -0
- package/dist/components/phase-panel.d.ts.map +1 -0
- package/dist/components/plan-panel.d.ts +17 -0
- package/dist/components/plan-panel.d.ts.map +1 -0
- package/dist/components/plugin-picker.d.ts +22 -0
- package/dist/components/plugin-picker.d.ts.map +1 -0
- package/dist/components/process-list.d.ts +14 -0
- package/dist/components/process-list.d.ts.map +1 -0
- package/dist/components/project-picker.d.ts +21 -0
- package/dist/components/project-picker.d.ts.map +1 -0
- package/dist/components/prompt-picker.d.ts +31 -0
- package/dist/components/prompt-picker.d.ts.map +1 -0
- package/dist/components/provider-colors.d.ts +40 -0
- package/dist/components/provider-colors.d.ts.map +1 -0
- package/dist/components/queue-panel.d.ts +16 -0
- package/dist/components/queue-panel.d.ts.map +1 -0
- package/dist/components/resume-picker.d.ts +16 -0
- package/dist/components/resume-picker.d.ts.map +1 -0
- package/dist/components/scrollable-history.d.ts +60 -0
- package/dist/components/scrollable-history.d.ts.map +1 -0
- package/dist/components/sdd-board-overlay.d.ts +15 -0
- package/dist/components/sdd-board-overlay.d.ts.map +1 -0
- package/dist/components/send-mode-picker.d.ts +64 -0
- package/dist/components/send-mode-picker.d.ts.map +1 -0
- package/dist/components/sessions-panel.d.ts +46 -0
- package/dist/components/sessions-panel.d.ts.map +1 -0
- package/dist/components/settings-picker.d.ts +387 -0
- package/dist/components/settings-picker.d.ts.map +1 -0
- package/dist/components/shadow-panel.d.ts +13 -0
- package/dist/components/shadow-panel.d.ts.map +1 -0
- package/dist/components/shell-command-warning.d.ts +9 -0
- package/dist/components/shell-command-warning.d.ts.map +1 -0
- package/dist/components/slash-menu.d.ts +9 -0
- package/dist/components/slash-menu.d.ts.map +1 -0
- package/dist/components/status-bar.d.ts +378 -0
- package/dist/components/status-bar.d.ts.map +1 -0
- package/dist/components/statusline-picker.d.ts +55 -0
- package/dist/components/statusline-picker.d.ts.map +1 -0
- package/dist/components/suggestions.d.ts +9 -0
- package/dist/components/suggestions.d.ts.map +1 -0
- package/dist/components/todos-monitor.d.ts +13 -0
- package/dist/components/todos-monitor.d.ts.map +1 -0
- package/dist/components/tools-picker.d.ts +20 -0
- package/dist/components/tools-picker.d.ts.map +1 -0
- package/dist/components/worktree-monitor.d.ts +23 -0
- package/dist/components/worktree-monitor.d.ts.map +1 -0
- package/dist/components/worktree-panel.d.ts +21 -0
- package/dist/components/worktree-panel.d.ts.map +1 -0
- package/dist/f-key-panels.d.ts +46 -0
- package/dist/f-key-panels.d.ts.map +1 -0
- package/dist/file-search.d.ts +3 -0
- package/dist/file-search.d.ts.map +1 -0
- package/dist/fn-keys.d.ts +20 -0
- package/dist/fn-keys.d.ts.map +1 -0
- package/dist/git-info.d.ts +20 -0
- package/dist/git-info.d.ts.map +1 -0
- package/dist/heap-watchdog.d.ts +41 -0
- package/dist/heap-watchdog.d.ts.map +1 -0
- package/dist/highlight.d.ts +30 -0
- package/dist/highlight.d.ts.map +1 -0
- package/dist/hit-test.d.ts +75 -0
- package/dist/hit-test.d.ts.map +1 -0
- package/dist/hooks/fleet-chat-coalescer.d.ts +32 -0
- package/dist/hooks/fleet-chat-coalescer.d.ts.map +1 -0
- package/dist/hooks/use-auth-panel.d.ts +38 -0
- package/dist/hooks/use-auth-panel.d.ts.map +1 -0
- package/dist/hooks/use-autonomous-coordinator.d.ts +21 -0
- package/dist/hooks/use-autonomous-coordinator.d.ts.map +1 -0
- package/dist/hooks/use-brain-events.d.ts +7 -0
- package/dist/hooks/use-brain-events.d.ts.map +1 -0
- package/dist/hooks/use-brain-panel.d.ts +43 -0
- package/dist/hooks/use-brain-panel.d.ts.map +1 -0
- package/dist/hooks/use-director-fleet-bridge.d.ts +31 -0
- package/dist/hooks/use-director-fleet-bridge.d.ts.map +1 -0
- package/dist/hooks/use-file-search.d.ts +42 -0
- package/dist/hooks/use-file-search.d.ts.map +1 -0
- package/dist/hooks/use-input-history-persistence.d.ts +14 -0
- package/dist/hooks/use-input-history-persistence.d.ts.map +1 -0
- package/dist/hooks/use-mode-picker.d.ts +15 -0
- package/dist/hooks/use-mode-picker.d.ts.map +1 -0
- package/dist/hooks/use-model-pick.d.ts +34 -0
- package/dist/hooks/use-model-pick.d.ts.map +1 -0
- package/dist/hooks/use-paste-handling.d.ts +30 -0
- package/dist/hooks/use-paste-handling.d.ts.map +1 -0
- package/dist/hooks/use-picker-keys.d.ts +72 -0
- package/dist/hooks/use-picker-keys.d.ts.map +1 -0
- package/dist/hooks/use-prompt-picker.d.ts +28 -0
- package/dist/hooks/use-prompt-picker.d.ts.map +1 -0
- package/dist/hooks/use-queue-manager.d.ts +26 -0
- package/dist/hooks/use-queue-manager.d.ts.map +1 -0
- package/dist/hooks/use-statusline-hidden-sync.d.ts +14 -0
- package/dist/hooks/use-statusline-hidden-sync.d.ts.map +1 -0
- package/dist/hooks/use-statusline-state.d.ts +44 -0
- package/dist/hooks/use-statusline-state.d.ts.map +1 -0
- package/dist/hooks/use-stream-chip-expiration.d.ts +25 -0
- package/dist/hooks/use-stream-chip-expiration.d.ts.map +1 -0
- package/dist/hooks/use-subagent-events.d.ts +16 -0
- package/dist/hooks/use-subagent-events.d.ts.map +1 -0
- package/dist/hooks/use-token-counter-refresh.d.ts +30 -0
- package/dist/hooks/use-token-counter-refresh.d.ts.map +1 -0
- package/dist/hooks/use-tui-controllers.d.ts +37 -0
- package/dist/hooks/use-tui-controllers.d.ts.map +1 -0
- package/dist/hooks/use-tui-event-bridge.d.ts +29 -0
- package/dist/hooks/use-tui-event-bridge.d.ts.map +1 -0
- package/dist/hooks/use-working-dir-chip.d.ts +8 -0
- package/dist/hooks/use-working-dir-chip.d.ts.map +1 -0
- package/dist/index.d.ts +12 -910
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4348 -2974
- package/dist/index.js.map +7 -1
- package/dist/ink.d.ts +20 -0
- package/dist/ink.d.ts.map +1 -0
- package/dist/input-editing.d.ts +76 -0
- package/dist/input-editing.d.ts.map +1 -0
- package/dist/input-tokens.d.ts +65 -0
- package/dist/input-tokens.d.ts.map +1 -0
- package/dist/kill-slash.d.ts +3 -0
- package/dist/kill-slash.d.ts.map +1 -0
- package/dist/markdown-table.d.ts +45 -0
- package/dist/markdown-table.d.ts.map +1 -0
- package/dist/markdown.d.ts +47 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/mouse.d.ts +73 -0
- package/dist/mouse.d.ts.map +1 -0
- package/dist/on-panel-open.d.ts +62 -0
- package/dist/on-panel-open.d.ts.map +1 -0
- package/dist/paste-accumulator.d.ts +19 -0
- package/dist/paste-accumulator.d.ts.map +1 -0
- package/dist/ps-slash.d.ts +7 -0
- package/dist/ps-slash.d.ts.map +1 -0
- package/dist/queue-slash.d.ts +24 -0
- package/dist/queue-slash.d.ts.map +1 -0
- package/dist/reducers/fleet.d.ts +16 -0
- package/dist/reducers/fleet.d.ts.map +1 -0
- package/dist/reducers/helpers.d.ts +38 -0
- package/dist/reducers/helpers.d.ts.map +1 -0
- package/dist/rehydrate-history.d.ts +40 -0
- package/dist/rehydrate-history.d.ts.map +1 -0
- package/dist/run-tui.d.ts +522 -0
- package/dist/run-tui.d.ts.map +1 -0
- package/dist/sdd-lifecycle-entry.d.ts +18 -0
- package/dist/sdd-lifecycle-entry.d.ts.map +1 -0
- package/dist/slash-command-search.d.ts +10 -0
- package/dist/slash-command-search.d.ts.map +1 -0
- package/dist/steering-preamble.d.ts +25 -0
- package/dist/steering-preamble.d.ts.map +1 -0
- package/dist/submit-history.d.ts +17 -0
- package/dist/submit-history.d.ts.map +1 -0
- package/dist/terminal-title.d.ts +12 -0
- package/dist/terminal-title.d.ts.map +1 -0
- package/dist/theme.d.ts +91 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/thinking-word.d.ts +26 -0
- package/dist/thinking-word.d.ts.map +1 -0
- package/dist/tool-glyph.d.ts +18 -0
- package/dist/tool-glyph.d.ts.map +1 -0
- package/package.json +8 -9
package/dist/ink.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Box as InkBox, type DOMElement, Text as InkText } from 'ink';
|
|
2
|
+
import { type ComponentProps, type ForwardRefExoticComponent, type ReactElement, type RefAttributes } from 'react';
|
|
3
|
+
type TextOwnProps = Omit<ComponentProps<typeof InkText>, 'color' | 'backgroundColor'> & {
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
backgroundColor?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
type BoxOwnProps = Omit<ComponentProps<typeof InkBox>, 'ref' | 'borderColor' | 'backgroundColor'> & {
|
|
8
|
+
borderColor?: string | undefined;
|
|
9
|
+
backgroundColor?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
export { Static, measureElement, useApp, useInput, useStdin, useStdout } from 'ink';
|
|
12
|
+
export type { BoxProps, DOMElement, TextProps, Key } from 'ink';
|
|
13
|
+
/** Ink `Text` with `color`/`backgroundColor` remapped to the pastel palette. */
|
|
14
|
+
export declare function Text({ color, backgroundColor, ...rest }: TextOwnProps): ReactElement;
|
|
15
|
+
/**
|
|
16
|
+
* Ink `Box` with `borderColor`/`backgroundColor` remapped to pastels. Forwards
|
|
17
|
+
* `ref` so `measureElement` (used by the scrollable history) keeps working.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Box: ForwardRefExoticComponent<BoxOwnProps & RefAttributes<DOMElement>>;
|
|
20
|
+
//# sourceMappingURL=ink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../src/ink.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,GAAG,IAAI,MAAM,EAAE,KAAK,UAAU,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACtE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAE9B,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAWf,KAAK,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG;IACtF,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC;AACF,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,KAAK,GAAG,aAAa,GAAG,iBAAiB,CAAC,GAAG;IAClG,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACpF,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAUhE,gFAAgF;AAChF,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,GAAG,YAAY,CAEpF;AAED;;;GAGG;AACH,eAAO,MAAM,GAAG,EAAE,yBAAyB,CAAC,WAAW,GAAG,aAAa,CAAC,UAAU,CAAC,CAiBjF,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure input-editing helpers for the TUI prompt.
|
|
3
|
+
*
|
|
4
|
+
* Word-boundary semantics, word-jump targets, and word-deletion helpers
|
|
5
|
+
* used by Ctrl+Left/Right/Backspace/Delete/W. These are buffer-pure — they
|
|
6
|
+
* take a string and a cursor index and return a number or a new buffer;
|
|
7
|
+
* no React, no refs, no side effects. This makes them trivial to test
|
|
8
|
+
* (see tests/input-editing-baseline.test.ts).
|
|
9
|
+
*
|
|
10
|
+
* Chip-awareness (attachment tokens like `[pasted #N]`, `[file:path]`,
|
|
11
|
+
* `[image #N]`) is preserved: a chip is treated as a single atomic word
|
|
12
|
+
* so Ctrl+Backspace on one deletes the whole chip, not a single character.
|
|
13
|
+
*
|
|
14
|
+
* Word-boundary policy (Adım 4 of the TUI input refactor):
|
|
15
|
+
* Separators are whitespace and most ASCII punctuation, EXCEPT the
|
|
16
|
+
* underscore, which counts as a word character. Rationale:
|
|
17
|
+
* - Paths (`src/foo/bar.ts`) break at `/` and `.` so Ctrl+Backspace
|
|
18
|
+
* deletes one segment, not the whole path.
|
|
19
|
+
* - Kebab-case (`--foo-bar`) breaks at `-`, matching CLI flag habits.
|
|
20
|
+
* - Snake_case (`my_var_name`) stays ONE word so a single Ctrl+
|
|
21
|
+
* Backspace deletes the whole identifier, matching how identifiers
|
|
22
|
+
* read in code.
|
|
23
|
+
* Underscore is the lone punctuation char kept as a word character; if
|
|
24
|
+
* your editing flow prefers it as a separator, narrow `WORD_SEPARATORS`.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Is `ch` a word separator? `undefined` (cursor at a boundary / out of
|
|
28
|
+
* range) is treated as a separator so the walk loops terminate cleanly.
|
|
29
|
+
* Whitespace matches `\s`; everything else must be in WORD_SEPARATORS.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isInputWordSeparator(ch: string | undefined): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Index of the start of the word immediately before `cursor` — the jump
|
|
34
|
+
* target for Ctrl+Left and the delete-start for Ctrl+Backspace / Ctrl+W.
|
|
35
|
+
*
|
|
36
|
+
* If the cursor sits inside or just after an attachment chip, returns the
|
|
37
|
+
* chip's start index (whole-chip jump). Otherwise walks left over trailing
|
|
38
|
+
* separators, then over the preceding word run.
|
|
39
|
+
*/
|
|
40
|
+
export declare function previousInputWordStart(buffer: string, cursor: number): number;
|
|
41
|
+
/**
|
|
42
|
+
* Index of the start of the word immediately after `cursor` — the jump
|
|
43
|
+
* target for Ctrl+Right. If the cursor is inside a chip, jumps past it.
|
|
44
|
+
* Skips any trailing separators so the cursor lands ON the next word,
|
|
45
|
+
* not in the gap.
|
|
46
|
+
*/
|
|
47
|
+
export declare function nextInputWordStart(buffer: string, cursor: number): number;
|
|
48
|
+
/**
|
|
49
|
+
* Result of a word-delete operation: the new buffer and where the cursor
|
|
50
|
+
* should land in it. `null` means there is nothing to delete (cursor at
|
|
51
|
+
* the relevant boundary).
|
|
52
|
+
*/
|
|
53
|
+
export interface WordDeleteResult {
|
|
54
|
+
buffer: string;
|
|
55
|
+
cursor: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Delete the word immediately before the cursor. Used by Ctrl+Backspace
|
|
59
|
+
* and Ctrl+W (identical behaviour — Ctrl+W is the Unix shell convention,
|
|
60
|
+
* Ctrl+Backspace is the GUI convention; both delete one word back).
|
|
61
|
+
*
|
|
62
|
+
* Chip-aware: if the cursor sits inside an attachment chip, the whole chip
|
|
63
|
+
* is removed. If the chip ends exactly at the cursor, the whole chip is
|
|
64
|
+
* removed. Otherwise the previous word run (per `isInputWordSeparator`)
|
|
65
|
+
* is removed along with any trailing separators.
|
|
66
|
+
*/
|
|
67
|
+
export declare function deleteWordBackward(buffer: string, cursor: number): WordDeleteResult | null;
|
|
68
|
+
/**
|
|
69
|
+
* Delete the word immediately after the cursor. Used by Ctrl+Delete.
|
|
70
|
+
*
|
|
71
|
+
* Chip-aware: if the cursor sits inside a chip, the whole chip is removed.
|
|
72
|
+
* If a chip starts at the cursor, that chip is removed. Otherwise the
|
|
73
|
+
* following word run is removed.
|
|
74
|
+
*/
|
|
75
|
+
export declare function deleteWordForward(buffer: string, cursor: number): WordDeleteResult | null;
|
|
76
|
+
//# sourceMappingURL=input-editing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-editing.d.ts","sourceRoot":"","sources":["../src/input-editing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAgCH;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIpE;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgB7E;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAezE;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAa1F;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAWzF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline attachment chip token grammar, shared by the editable input for chip
|
|
3
|
+
* rendering and whole-token cursor deletion. Kept in sync with the
|
|
4
|
+
* AttachmentStore placeholder regex in @wrongstack/core. Two shapes:
|
|
5
|
+
* - seq-keyed `[pasted|image|file #N …]` (a cosmetic suffix after the seq,
|
|
6
|
+
* e.g. `, 123 lines`, is tolerated; legacy `[file #N]` is included)
|
|
7
|
+
* - path-keyed `[file:<path>]`
|
|
8
|
+
*/
|
|
9
|
+
export declare const INLINE_TOKEN_SRC = "\\[(?:pasted|image|file) #\\d+[^\\]]*\\]|\\[file:[^\\]]+\\]";
|
|
10
|
+
/**
|
|
11
|
+
* If a whole chip ends immediately before `cursor`, return the buffer and
|
|
12
|
+
* cursor with that chip removed (so one backspace deletes the entire token,
|
|
13
|
+
* anywhere in the line). Returns null when there's no chip there — the caller
|
|
14
|
+
* falls back to a single-character delete.
|
|
15
|
+
*/
|
|
16
|
+
export declare function deleteTokenBackward(buffer: string, cursor: number): {
|
|
17
|
+
buffer: string;
|
|
18
|
+
cursor: number;
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Length of a chip that starts exactly at `cursor`, or 0 if none — lets a
|
|
22
|
+
* forward delete drop the whole token in one keystroke.
|
|
23
|
+
*/
|
|
24
|
+
export declare function tokenLengthForward(buffer: string, cursor: number): number;
|
|
25
|
+
export declare function tokenSpanAt(buffer: string, cursor: number): {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
} | null;
|
|
29
|
+
export interface ChipSpan {
|
|
30
|
+
text: string;
|
|
31
|
+
/** True for an attachment chip token, false for a plain run. */
|
|
32
|
+
chip: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Split a string into chip / plain spans for styled rendering. */
|
|
35
|
+
export declare function splitChips(text: string): ChipSpan[];
|
|
36
|
+
/** One rendered cell of the input row. Exactly one of chip/prompt/cursor may be true. */
|
|
37
|
+
export interface InputCell {
|
|
38
|
+
ch: string;
|
|
39
|
+
/** Inside an attachment chip token. */
|
|
40
|
+
chip: boolean;
|
|
41
|
+
/** Part of the leading prompt (e.g. "› "). */
|
|
42
|
+
prompt: boolean;
|
|
43
|
+
/** The single cursor cell (rendered inverse). */
|
|
44
|
+
cursor: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Lay out `prompt + value` into wrapped rows of at most `width` columns, so the
|
|
48
|
+
* input area can grow to exactly the number of visual lines its content needs.
|
|
49
|
+
* Char-wrap (not word-wrap) keeps every cell index aligned with the buffer, so
|
|
50
|
+
* the cursor lands on the right row/column. A cursor at end-of-buffer gets a
|
|
51
|
+
* virtual trailing space cell (which may spill onto a fresh row, exactly like a
|
|
52
|
+
* terminal). Newlines in `value` start a new row.
|
|
53
|
+
*/
|
|
54
|
+
export declare function layoutInputRows(prompt: string, value: string, cursor: number, width: number): InputCell[][];
|
|
55
|
+
/**
|
|
56
|
+
* Inverse of {@link layoutInputRows}: given a pointer at visual
|
|
57
|
+
* `(row, col)` (both 0-based; col is the column WITHIN the input area, i.e. the
|
|
58
|
+
* prompt occupies the first columns of row 0), return the buffer cursor index
|
|
59
|
+
* to place the caret. Mirrors layoutInputRows' wrapping exactly so the mapping
|
|
60
|
+
* matches what's on screen. Clicking the prompt → start of buffer; clicking
|
|
61
|
+
* past a row's last character → just after it; clicking below all rows → end of
|
|
62
|
+
* buffer. Exported for the TUI input-click handler and unit tests.
|
|
63
|
+
*/
|
|
64
|
+
export declare function inputIndexAtRowCol(prompt: string, value: string, width: number, row: number, col: number): number;
|
|
65
|
+
//# sourceMappingURL=input-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-tokens.d.ts","sourceRoot":"","sources":["../src/input-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,gEAAgE,CAAC;AAM9F;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAK3C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQjG;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,IAAI,EAAE,OAAO,CAAC;CACf;AAED,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE,CAYnD;AAED,yFAAyF;AACzF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,iDAAiD;IACjD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,SAAS,EAAE,EAAE,CAuCf;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,CAmDR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kill-slash.d.ts","sourceRoot":"","sources":["../src/kill-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAYrD,wBAAgB,sBAAsB,IAAI,YAAY,CA8CrD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scan a body of prose for GitHub-flavoured markdown tables and replace
|
|
3
|
+
* each one with a Unicode box-drawing rendering that fits the terminal
|
|
4
|
+
* width. Cells that overflow their column wrap over multiple lines.
|
|
5
|
+
*
|
|
6
|
+
* Non-table prose passes through unchanged.
|
|
7
|
+
*
|
|
8
|
+
* Input shape (rest of the doc may surround it):
|
|
9
|
+
* | Header A | Header B |
|
|
10
|
+
* |----------|---------:|
|
|
11
|
+
* | a 1 | 42 |
|
|
12
|
+
* | a 2 | 7 |
|
|
13
|
+
*
|
|
14
|
+
* Output shape:
|
|
15
|
+
* ┌──────────┬──────────┐
|
|
16
|
+
* │ Header A │ Header B │
|
|
17
|
+
* ├──────────┼──────────┤
|
|
18
|
+
* │ a 1 │ 42 │
|
|
19
|
+
* │ a 2 │ 7 │
|
|
20
|
+
* └──────────┴──────────┘
|
|
21
|
+
*/
|
|
22
|
+
export declare function renderMarkdownTables(text: string, maxWidth: number): string;
|
|
23
|
+
export declare function detectTable(lines: string[], start: number): number;
|
|
24
|
+
export declare function renderTable(tableLines: string[], maxWidth: number): string;
|
|
25
|
+
/**
|
|
26
|
+
* Insert zero-width spaces between known ligature-prone character pairs
|
|
27
|
+
* so that the font renders each character individually. Only applied inside
|
|
28
|
+
* table cells; code blocks and prose pass through unchanged.
|
|
29
|
+
*/
|
|
30
|
+
export declare function breakLigatures(text: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Return the number of terminal columns a string occupies.
|
|
33
|
+
*
|
|
34
|
+
* Handles Unicode properly:
|
|
35
|
+
* - ANSI escape sequences (SGR codes like \x1b[1m, \x1b[0m) are zero-width.
|
|
36
|
+
* - ZWJ emoji sequences (👨👩👧, 🧑🏫) count as 2 columns total.
|
|
37
|
+
* - Variation selectors (U+FE0F, U+FE0E) contribute zero width.
|
|
38
|
+
* - Zero-width characters (ZWJ U+200D, ZWSP U+200B, etc.) contribute zero width.
|
|
39
|
+
* - Emoji blocks count as 2 columns.
|
|
40
|
+
* - East Asian Wide/Fullwidth characters count as 2 columns.
|
|
41
|
+
* - ASCII printable characters count as 1.
|
|
42
|
+
* - Control characters count as 0.
|
|
43
|
+
*/
|
|
44
|
+
export declare function strWidth(s: string): number;
|
|
45
|
+
//# sourceMappingURL=markdown-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-table.d.ts","sourceRoot":"","sources":["../src/markdown-table.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgB3E;AAOD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUlE;AAkDD,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA4B1E;AAyFD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBnD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAwG1C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface InlineToken {
|
|
3
|
+
text: string;
|
|
4
|
+
bold?: boolean | undefined;
|
|
5
|
+
italic?: boolean | undefined;
|
|
6
|
+
code?: boolean | undefined;
|
|
7
|
+
strike?: boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Parse one line of prose into inline-emphasis tokens. Markers are stripped
|
|
11
|
+
* (this is display text, not length-preserving). `_..._` is intentionally NOT
|
|
12
|
+
* treated as italic so snake_case / file_names aren't mangled. An unterminated
|
|
13
|
+
* marker is emitted literally so no text is ever lost.
|
|
14
|
+
*
|
|
15
|
+
* Results are memoized: repeated calls with the same text return the identical
|
|
16
|
+
* cached array, eliminating redundant parsing on every TUI re-render.
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseInline(text: string): InlineToken[];
|
|
19
|
+
/**
|
|
20
|
+
* Render assistant prose with markdown emphasis + block formatting. Tables are
|
|
21
|
+
* routed through the existing box-drawing renderer; everything else is parsed
|
|
22
|
+
* line-by-line.
|
|
23
|
+
*
|
|
24
|
+
* `contentWidth` is the real inner width of the panel that wraps this view
|
|
25
|
+
* (the assistant entry's left-border + paddingLeft). When provided, tables
|
|
26
|
+
* are sized against it so they don't overflow the panel; otherwise we fall
|
|
27
|
+
* back to `termWidth`, which is correct for callers without a bordered
|
|
28
|
+
* container. Non-table prose is unaffected — Ink handles its soft wrap.
|
|
29
|
+
*
|
|
30
|
+
* `tableWidth` is the width available for tables. When provided, tables are
|
|
31
|
+
* sized to this value; otherwise falls back to `contentWidth ?? termWidth`.
|
|
32
|
+
* This allows precise control over table sizing independent of prose width.
|
|
33
|
+
*
|
|
34
|
+
* `panelBackground` is the background color of the surrounding panel. When
|
|
35
|
+
* provided, table rows are padded with trailing spaces colored with this
|
|
36
|
+
* background so any empty space on the right of a narrow table is filled
|
|
37
|
+
* with the panel background rather than showing the terminal background.
|
|
38
|
+
*/
|
|
39
|
+
export declare function MarkdownView({ text, termWidth, contentWidth, tableWidth, }: {
|
|
40
|
+
text: string;
|
|
41
|
+
termWidth: number;
|
|
42
|
+
/** Real inner width of the surrounding panel. Defaults to `termWidth`. */
|
|
43
|
+
contentWidth?: number | undefined;
|
|
44
|
+
/** Width available for tables. Defaults to `contentWidth ?? termWidth`. */
|
|
45
|
+
tableWidth?: number | undefined;
|
|
46
|
+
}): React.ReactElement;
|
|
47
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAYD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAyEvD;AA2BD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,UAAU,GACX,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,GAAG,KAAK,CAAC,YAAY,CAwGrB"}
|
package/dist/mouse.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SGR mouse protocol (xterm DEC private modes). These are INDEPENDENT of the
|
|
3
|
+
* alternate screen buffer (?1049h): we enable tracking while staying in the
|
|
4
|
+
* normal buffer so the terminal's native scrollback survives.
|
|
5
|
+
*
|
|
6
|
+
* ?1000h — button press/release tracking (clicks + wheel)
|
|
7
|
+
* ?1002h — button-event tracking: adds drag (motion while a button is held)
|
|
8
|
+
* ?1003h — any-event tracking: adds hover (motion with no button) — EXPENSIVE,
|
|
9
|
+
* one event per cell the cursor crosses; gate behind a setting.
|
|
10
|
+
* ?1006h — SGR extended coordinates: `ESC [ < b ; x ; y (M|m)`, no 223-col cap.
|
|
11
|
+
*
|
|
12
|
+
* Trade-off: with ANY of these on, the terminal reports the wheel to us as
|
|
13
|
+
* buttons 64/65 instead of scrolling its own scrollback. Shift+wheel (and
|
|
14
|
+
* Shift+PgUp) still reach native scrollback in every mainstream terminal, so
|
|
15
|
+
* users keep a way to scroll history — but plain wheel-scroll of history is
|
|
16
|
+
* gone while tracking is active. Keep tracking opt-in / overlay-scoped.
|
|
17
|
+
*/
|
|
18
|
+
/** Click + wheel only (mode 1000). Cheapest; no motion events. */
|
|
19
|
+
export declare const MOUSE_CLICK_ON: string;
|
|
20
|
+
/** Click + wheel + drag (motion while a button is held; mode 1002). */
|
|
21
|
+
export declare const MOUSE_DRAG_ON: string;
|
|
22
|
+
/** Click + wheel + free hover (motion with no button; mode 1003). Expensive. */
|
|
23
|
+
export declare const MOUSE_HOVER_ON: string;
|
|
24
|
+
/**
|
|
25
|
+
* Disable every tracking mode. Disabling a mode that was never set is a no-op,
|
|
26
|
+
* so this is safe to send unconditionally on cleanup regardless of which
|
|
27
|
+
* *_ON sequence (if any) was emitted.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MOUSE_OFF: string;
|
|
30
|
+
/**
|
|
31
|
+
* Enter the alternate screen buffer (DECSET 1049). The normal screen is
|
|
32
|
+
* saved and restored on exit.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ALT_SCREEN_ON: string;
|
|
35
|
+
/**
|
|
36
|
+
* Exit the alternate screen buffer (DECRST 1049), restoring the normal screen.
|
|
37
|
+
*/
|
|
38
|
+
export declare const ALT_SCREEN_OFF: string;
|
|
39
|
+
export type MouseEventKind = 'press' | 'release' | 'move' | 'wheel';
|
|
40
|
+
export type MouseButton = 'left' | 'middle' | 'right' | 'none';
|
|
41
|
+
export interface MouseEventInfo {
|
|
42
|
+
kind: MouseEventKind;
|
|
43
|
+
button: MouseButton;
|
|
44
|
+
/** 1-based terminal column (matches the SGR report; column 1 = leftmost). */
|
|
45
|
+
x: number;
|
|
46
|
+
/** 1-based terminal row (column 1 = topmost visible row). */
|
|
47
|
+
y: number;
|
|
48
|
+
/** Wheel direction: +1 = up (away from user), -1 = down, 0 = not a wheel event. */
|
|
49
|
+
wheel: number;
|
|
50
|
+
shift: boolean;
|
|
51
|
+
/** Alt/Meta modifier. */
|
|
52
|
+
meta: boolean;
|
|
53
|
+
ctrl: boolean;
|
|
54
|
+
/** True for motion events (button-held drag, or free hover). */
|
|
55
|
+
motion: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Parse a single, whole SGR mouse report into a structured event. Returns null
|
|
59
|
+
* when `data` is not exactly one report.
|
|
60
|
+
*/
|
|
61
|
+
export declare function parseMouseEvent(data: string): MouseEventInfo | null;
|
|
62
|
+
/**
|
|
63
|
+
* Scan raw stdin data for ALL SGR mouse reports, in order. A fast wheel scroll
|
|
64
|
+
* coalesces several reports into one chunk; returns an empty array when the
|
|
65
|
+
* data contains no report.
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseMouseEvents(data: string): MouseEventInfo[];
|
|
68
|
+
/**
|
|
69
|
+
* True when `input` (Ink's already-ESC-stripped text) is a leaked mouse report.
|
|
70
|
+
* The input layer drops these so they never land in the buffer as typed text.
|
|
71
|
+
*/
|
|
72
|
+
export declare function isLeakedMouseInput(input: string): boolean;
|
|
73
|
+
//# sourceMappingURL=mouse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mouse.d.ts","sourceRoot":"","sources":["../src/mouse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,kEAAkE;AAClE,eAAO,MAAM,cAAc,QAA+B,CAAC;AAC3D,uEAAuE;AACvE,eAAO,MAAM,aAAa,QAA4C,CAAC;AACvE,gFAAgF;AAChF,eAAO,MAAM,cAAc,QAA4C,CAAC;AACxE;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAyD,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAkB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,cAAc,QAAkB,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,6EAA6E;IAC7E,CAAC,EAAE,MAAM,CAAC;IACV,6DAA6D;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,yBAAyB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;CACjB;AA8CD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CASnE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAa/D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEzD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Action } from './app-reducer.js';
|
|
2
|
+
import type { PluginPickerItem } from './components/plugin-picker.js';
|
|
3
|
+
/**
|
|
4
|
+
* Action strings that the bridge recognises. Mirrored from the reducer's
|
|
5
|
+
* `Action` type union but kept as a string allow-list here so an unrecognised
|
|
6
|
+
* action can return `false` (text fallback) without crashing.
|
|
7
|
+
*/
|
|
8
|
+
export type PanelAction = 'pluginPickerOpen' | 'mcpPickerOpen' | 'toolsPickerOpen' | 'brainOpen' | 'helpOpen' | 'shadowOpen' | 'projectPickerOpen' | 'statuslineOpen' | 'authOpen' | 'authOauthOpen' | 'modePickerOpen' | 'toggleMonitor' | 'toggleAuditPanel' | 'toggleAgentsMonitor' | 'toggleWorktreeMonitor' | 'togglePlanPanel' | 'toggleKanbanPanel' | 'toggleTodosMonitor' | 'toggleQueuePanel' | 'toggleProcessList' | 'toggleGoalPanel' | 'toggleSessionsPanel' | 'toggleCoordinatorMonitor' | (string & {});
|
|
9
|
+
export interface PanelOpenDeps {
|
|
10
|
+
/**
|
|
11
|
+
* Reducer dispatcher. For an action that has typed reducer cases the
|
|
12
|
+
* caller passes a narrowed `Dispatch<Action>`; for the action-typed-aliasing
|
|
13
|
+
* cases below we widen via `dispatch as (a: Action) => void` internally.
|
|
14
|
+
*/
|
|
15
|
+
dispatch: (action: Action) => void;
|
|
16
|
+
/** Async opener for the project picker panel (F1). Fetches items first. */
|
|
17
|
+
openProjectPicker: () => void | Promise<unknown>;
|
|
18
|
+
/** Opener for the statusline picker; computes the hiddenItems snapshot. */
|
|
19
|
+
openStatuslinePicker: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Opener for the interactive auth panel (`/auth`). Returns false when the
|
|
22
|
+
* CLI didn't provide an auth host — the slash command then falls back to
|
|
23
|
+
* its plain-text output. Optional so older hosts keep working.
|
|
24
|
+
*/
|
|
25
|
+
openAuthPanel?: ((view?: 'list' | 'oauth') => boolean) | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Async opener for the mode picker (`/mode`). Fetches all modes + active
|
|
28
|
+
* mode from the host and dispatches modePickerOpen with the populated list.
|
|
29
|
+
*/
|
|
30
|
+
openModePicker?: (() => void | Promise<unknown>) | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Async opener for the Brain panel (`/brain`). Fetches current risk level
|
|
33
|
+
* and decision log from the host, then dispatches brainOpen.
|
|
34
|
+
*/
|
|
35
|
+
openBrainPanel?: (() => void | Promise<unknown>) | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Async opener for the Shadow Agent panel (`/shadow`). Fetches shadow state
|
|
38
|
+
* from the host, then dispatches shadowOpen.
|
|
39
|
+
*/
|
|
40
|
+
openShadowPanel?: (() => void | Promise<unknown>) | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Opener for the Help panel (`/help`). Builds entries from the slash
|
|
43
|
+
* command registry and dispatches helpOpen with the populated list.
|
|
44
|
+
*/
|
|
45
|
+
openHelpPanel?: (() => void | Promise<unknown>) | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Build the dispatcher that lives at `onPanelOpen.current(action)`.
|
|
49
|
+
*
|
|
50
|
+
* Returns `true` when the action was handled (so the slash command suppresses
|
|
51
|
+
* its text fallback), or `false` when the action is not in the catalogue
|
|
52
|
+
* (so the slash command can print its plain-text response — the headless /
|
|
53
|
+
* REPL fallback path).
|
|
54
|
+
*/
|
|
55
|
+
export declare function createPanelOpenDispatcher(deps: PanelOpenDeps): (action: string) => boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Re-export PluginPickerItem so consumers of the dispatcher can construct
|
|
58
|
+
* typed items without an extra import. Kept as a re-export rather than a
|
|
59
|
+
* duplicate so the type lives in one place.
|
|
60
|
+
*/
|
|
61
|
+
export type { PluginPickerItem };
|
|
62
|
+
//# sourceMappingURL=on-panel-open.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"on-panel-open.d.ts","sourceRoot":"","sources":["../src/on-panel-open.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,qBAAqB,GACrB,uBAAuB,GACvB,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,qBAAqB,GACrB,0BAA0B,GAC1B,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,2EAA2E;IAC3E,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IACnE;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC7D;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC7D;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC9D;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CAC7D;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAoF1F;AAED;;;;GAIG;AACH,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface PasteFeedResult {
|
|
2
|
+
/** New accumulator state: a string while mid-paste, `null` when idle. */
|
|
3
|
+
accum: string | null;
|
|
4
|
+
/**
|
|
5
|
+
* The fully-assembled paste payload when an end marker closed it, else
|
|
6
|
+
* `null` (still buffering).
|
|
7
|
+
*/
|
|
8
|
+
complete: string | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Feed one keypress fragment into the paste accumulator.
|
|
12
|
+
*
|
|
13
|
+
* @param accum current accumulator (`null` when not inside a paste)
|
|
14
|
+
* @param input the raw keypress string for this event
|
|
15
|
+
* @returns `null` when `input` is not part of a paste (the caller should
|
|
16
|
+
* handle it as normal input); otherwise the updated accumulation state.
|
|
17
|
+
*/
|
|
18
|
+
export declare function feedPaste(accum: string | null, input: string): PasteFeedResult | null;
|
|
19
|
+
//# sourceMappingURL=paste-accumulator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paste-accumulator.d.ts","sourceRoot":"","sources":["../src/paste-accumulator.ts"],"names":[],"mappings":"AAqCA,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAyBrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ps-slash.d.ts","sourceRoot":"","sources":["../src/ps-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,YAAY,CAQnD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SlashCommand } from '@wrongstack/core';
|
|
2
|
+
import type { QueueItem } from './app.js';
|
|
3
|
+
/**
|
|
4
|
+
* Dependencies the `/queue` command needs from the App. The TUI registers
|
|
5
|
+
* the command at mount time with closures over `getQueue` (reads the latest
|
|
6
|
+
* queue snapshot via a ref) and the three mutators. The command returns
|
|
7
|
+
* its output as `{ message }` which the App pipes into history as `info`.
|
|
8
|
+
*/
|
|
9
|
+
export interface QueueSlashDeps {
|
|
10
|
+
getQueue: () => QueueItem[];
|
|
11
|
+
clear: () => void;
|
|
12
|
+
deleteAt: (positions: number[]) => void;
|
|
13
|
+
/** Whether the mid-run send-mode picker is enabled. */
|
|
14
|
+
getPickerEnabled?: (() => boolean) | undefined;
|
|
15
|
+
/** Enable/disable the mid-run send-mode picker (persists). */
|
|
16
|
+
setPickerEnabled?: ((enabled: boolean) => void) | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare function createQueueSlashCommand(deps: QueueSlashDeps): SlashCommand;
|
|
19
|
+
/**
|
|
20
|
+
* Pure logic for the /queue command. Exported separately so tests can
|
|
21
|
+
* drive it without spinning up Ink.
|
|
22
|
+
*/
|
|
23
|
+
export declare function handleQueueCommand(args: string, deps: QueueSlashDeps): string;
|
|
24
|
+
//# sourceMappingURL=queue-slash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-slash.d.ts","sourceRoot":"","sources":["../src/queue-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,SAAS,EAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;IAC/C,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7D;AAWD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,cAAc,GAAG,YAAY,CAS1E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAuE7E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fleet & leader sub-reducer for the TUI.
|
|
3
|
+
*
|
|
4
|
+
* Handles all fleetSpawn / fleetToolStart / fleetToolEnd / fleetStart /
|
|
5
|
+
* fleetDelta / fleetMessage / fleetTool / fleetUsage / fleetDone /
|
|
6
|
+
* fleetBudgetWarning / fleetBudgetExtended / fleetCtxPct / fleetCost /
|
|
7
|
+
* fleetConcurrency / fleetSeed / fleetBatch / leaderIterStart /
|
|
8
|
+
* leaderIterEnd / leaderToolStart / leaderToolEnd / leaderCtxPct /
|
|
9
|
+
* setFleetChat actions.
|
|
10
|
+
*
|
|
11
|
+
* Returns the new state when the action is fleet/leader-related, or
|
|
12
|
+
* null when the action should fall through to the main reducer.
|
|
13
|
+
*/
|
|
14
|
+
import type { Action, State } from '../app-state.js';
|
|
15
|
+
export declare function reduceFleetState(state: State, action: Action): State | null;
|
|
16
|
+
//# sourceMappingURL=fleet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/reducers/fleet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAc,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAajE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CA+W3E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { State } from '../app-state.js';
|
|
2
|
+
import type { ProjectPickerItem } from '../components/project-picker.js';
|
|
3
|
+
type PanelResetState = Pick<State, 'monitorOpen' | 'agentsMonitorOpen' | 'helpOpen' | 'todosMonitorOpen' | 'queuePanelOpen' | 'processListOpen' | 'auditPanelOpen' | 'planPanelOpen' | 'kanbanPanelOpen' | 'goalPanelOpen' | 'sessionsPanelOpen' | 'settingsPicker' | 'statuslinePicker' | 'pluginPicker' | 'mcpPicker' | 'toolsPicker' | 'brainPanel' | 'helpPanel' | 'shadowPanel' | 'authPanel' | 'projectPicker' | 'fKeyPicker' | 'autoPhase' | 'sddBoard' | 'worktreeMonitorOpen' | 'coordinator'>;
|
|
4
|
+
export declare function closePanels(state: State): PanelResetState;
|
|
5
|
+
export declare function clampContextLoad(load: number): number;
|
|
6
|
+
/** Upper bound on the live tool-stream text retained in state. */
|
|
7
|
+
export declare const MAX_TOOL_STREAM_RETAINED_CHARS = 100000;
|
|
8
|
+
/** Upper bound on the assistant/thinking live tail retained in React state. */
|
|
9
|
+
export declare const MAX_ASSISTANT_STREAM_RETAINED_CHARS = 16384;
|
|
10
|
+
/** Caps applied to tool `input` payloads before retention in history entries. */
|
|
11
|
+
export declare const MAX_RETAINED_INPUT_CHARS = 2048;
|
|
12
|
+
export declare const MAX_RETAINED_INPUT_DEPTH = 4;
|
|
13
|
+
export declare const MAX_RETAINED_INPUT_ITEMS = 64;
|
|
14
|
+
/**
|
|
15
|
+
* Deep-truncate a tool input for long-term retention in history entries.
|
|
16
|
+
* Strings are capped per-string, arrays/objects are capped in breadth and
|
|
17
|
+
* depth. Returns the value unchanged when nothing exceeds a cap.
|
|
18
|
+
*
|
|
19
|
+
* @public — exported for unit tests
|
|
20
|
+
*/
|
|
21
|
+
export declare function pruneToolInput(value: unknown, depth?: number): unknown;
|
|
22
|
+
/**
|
|
23
|
+
* Find the first non-divider index in the list. Returns 0 when the list is
|
|
24
|
+
* empty or contains only dividers.
|
|
25
|
+
*
|
|
26
|
+
* @public — exported for unit tests
|
|
27
|
+
*/
|
|
28
|
+
export declare function firstSelectable(items: ProjectPickerItem[]): number;
|
|
29
|
+
/**
|
|
30
|
+
* Skip divider items at the given index, moving forward (+1) or backward (-1).
|
|
31
|
+
* Clamps to [0, items.length - 1]. If every item is a divider the index stays
|
|
32
|
+
* put — the caller should already know the list has at least one selectable.
|
|
33
|
+
*
|
|
34
|
+
* @public — exported for unit tests
|
|
35
|
+
*/
|
|
36
|
+
export declare function skipDivider(items: ProjectPickerItem[], idx: number, dir: 1 | -1): number;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/reducers/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE,KAAK,eAAe,GAAG,IAAI,CACzB,KAAK,EACH,aAAa,GACb,mBAAmB,GACnB,UAAU,GACV,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,WAAW,GACX,aAAa,GACb,YAAY,GACZ,WAAW,GACX,aAAa,GACb,WAAW,GACX,eAAe,GACf,YAAY,GACZ,WAAW,GACX,UAAU,GACV,qBAAqB,GACrB,aAAa,CAChB,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CA6BzD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGrD;AAID,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,SAAU,CAAC;AAEtD,+EAA+E;AAC/E,eAAO,MAAM,mCAAmC,QAAS,CAAC;AAE1D,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAC9C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,OAAO,CAyBjE;AAID;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAGlE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAaxF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Message } from '@wrongstack/core';
|
|
2
|
+
import type { HistoryEntry } from './components/history/types.js';
|
|
3
|
+
export declare function contentBlocksText(content: unknown): string;
|
|
4
|
+
/**
|
|
5
|
+
* Convert restored session messages into TUI history entries so a resumed
|
|
6
|
+
* session renders its prior conversation visually, not just in the LLM context.
|
|
7
|
+
*
|
|
8
|
+
* Order MUST match what the user saw before the crash — assistant text and
|
|
9
|
+
* tool executions are interleaved chronologically. The data path makes this
|
|
10
|
+
* straightforward:
|
|
11
|
+
*
|
|
12
|
+
* - `messages` carries user_input / llm_response / tool_result events in
|
|
13
|
+
* JSONL order (see DefaultSessionStore.load).
|
|
14
|
+
* - For assistant messages whose `content` is an array, tool_use blocks
|
|
15
|
+
* appear in JSONL order. Each has a stable `id`.
|
|
16
|
+
* - `toolCalls` is the JSONL-ordered list of `tool_call_end` events, each
|
|
17
|
+
* carrying the same `id` as the tool_use block it resolves.
|
|
18
|
+
*
|
|
19
|
+
* Algorithm:
|
|
20
|
+
* - System messages are skipped (not displayed).
|
|
21
|
+
* - User messages → `kind: 'user'`.
|
|
22
|
+
* - Assistant messages → `kind: 'assistant'` (text only; tool_use blocks
|
|
23
|
+
* are dropped from the body since the tool entry renders the execution).
|
|
24
|
+
* - After each assistant message, emit a `kind: 'tool'` entry for each
|
|
25
|
+
* tool_use id that appears in that assistant's content, looking up the
|
|
26
|
+
* matching tool_call_end by id. If the assistant has multiple tool_use
|
|
27
|
+
* blocks, the tool entries appear in the same order as those blocks.
|
|
28
|
+
* - Unmatched tool_call_ends (legacy / id drift) are appended at the end
|
|
29
|
+
* in their original JSONL order so they aren't silently dropped.
|
|
30
|
+
*/
|
|
31
|
+
export declare function rehydrateHistory(messages: Message[], startId: number, toolCalls?: Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
id: string;
|
|
34
|
+
durationMs: number;
|
|
35
|
+
ok: boolean;
|
|
36
|
+
outputBytes?: number | undefined;
|
|
37
|
+
outputTokens?: number | undefined;
|
|
38
|
+
outputLines?: number | undefined;
|
|
39
|
+
}> | undefined): HistoryEntry[];
|
|
40
|
+
//# sourceMappingURL=rehydrate-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rehydrate-history.d.ts","sourceRoot":"","sources":["../src/rehydrate-history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAa1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EACN,KAAK,CAAC;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC,GACF,SAAS,GACZ,YAAY,EAAE,CAiFhB"}
|