@wrongstack/tui 0.285.0 → 0.287.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/README.md +48 -8
- package/dist/app-initial-state.d.ts +3 -1
- package/dist/app-initial-state.d.ts.map +1 -1
- package/dist/app-reducer.d.ts.map +1 -1
- package/dist/app-state.d.ts +91 -13
- package/dist/app-state.d.ts.map +1 -1
- package/dist/app.d.ts +36 -13
- package/dist/app.d.ts.map +1 -1
- package/dist/components/agents-monitor.d.ts +66 -14
- package/dist/components/agents-monitor.d.ts.map +1 -1
- package/dist/components/auth-panel.d.ts.map +1 -1
- 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 +7 -1
- package/dist/components/brain-panel.d.ts.map +1 -1
- package/dist/components/composer-status-chip.d.ts +55 -0
- package/dist/components/composer-status-chip.d.ts.map +1 -0
- package/dist/components/context-panel.d.ts +25 -0
- package/dist/components/context-panel.d.ts.map +1 -0
- package/dist/components/coordinator-panel.d.ts.map +1 -1
- package/dist/components/cron-jobs.d.ts +24 -0
- package/dist/components/cron-jobs.d.ts.map +1 -0
- package/dist/components/enhance-panel.d.ts +35 -18
- package/dist/components/enhance-panel.d.ts.map +1 -1
- package/dist/components/f-key-picker.d.ts.map +1 -1
- package/dist/components/fleet-monitor.d.ts.map +1 -1
- package/dist/components/fleet-panel.d.ts +11 -7
- package/dist/components/fleet-panel.d.ts.map +1 -1
- package/dist/components/goal-kanban-panel.d.ts +14 -0
- package/dist/components/goal-kanban-panel.d.ts.map +1 -0
- package/dist/components/goal-panel.d.ts.map +1 -1
- package/dist/components/history/banner.d.ts +3 -6
- package/dist/components/history/banner.d.ts.map +1 -1
- package/dist/components/history/entry.d.ts.map +1 -1
- package/dist/components/history/tool-card.d.ts +20 -0
- package/dist/components/history/tool-card.d.ts.map +1 -0
- package/dist/components/history/utils.d.ts.map +1 -1
- package/dist/components/input.d.ts +24 -1
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/kanban-panel.d.ts +4 -1
- package/dist/components/kanban-panel.d.ts.map +1 -1
- package/dist/components/model-picker.d.ts +6 -1
- package/dist/components/model-picker.d.ts.map +1 -1
- package/dist/components/monitor-shell.d.ts +48 -0
- package/dist/components/monitor-shell.d.ts.map +1 -0
- package/dist/components/plan-panel.d.ts +1 -1
- package/dist/components/plan-panel.d.ts.map +1 -1
- package/dist/components/powerline-rail.d.ts +16 -0
- package/dist/components/powerline-rail.d.ts.map +1 -0
- package/dist/components/process-list.d.ts.map +1 -1
- package/dist/components/project-picker.d.ts +2 -1
- package/dist/components/project-picker.d.ts.map +1 -1
- package/dist/components/queue-panel.d.ts.map +1 -1
- package/dist/components/refine-failure-panel.d.ts +47 -0
- package/dist/components/refine-failure-panel.d.ts.map +1 -0
- package/dist/components/scrollable-history.d.ts.map +1 -1
- package/dist/components/sessions-panel.d.ts.map +1 -1
- package/dist/components/settings-picker.d.ts +24 -8
- package/dist/components/settings-picker.d.ts.map +1 -1
- package/dist/components/status-bar-chips.d.ts +33 -0
- package/dist/components/status-bar-chips.d.ts.map +1 -0
- package/dist/components/status-bar.d.ts +43 -9
- package/dist/components/status-bar.d.ts.map +1 -1
- package/dist/components/statusline-detail-panel.d.ts +10 -0
- package/dist/components/statusline-detail-panel.d.ts.map +1 -0
- package/dist/components/statusline-picker.d.ts +4 -4
- package/dist/components/statusline-picker.d.ts.map +1 -1
- package/dist/components/todos-monitor.d.ts.map +1 -1
- package/dist/components/worktree-monitor.d.ts.map +1 -1
- package/dist/context-slash.d.ts +75 -0
- package/dist/context-slash.d.ts.map +1 -0
- package/dist/cron-slash.d.ts +33 -0
- package/dist/cron-slash.d.ts.map +1 -0
- package/dist/f-key-panels.d.ts +1 -1
- package/dist/f-key-panels.d.ts.map +1 -1
- package/dist/height-cache.d.ts +124 -0
- package/dist/height-cache.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-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 +17 -3
- package/dist/hooks/use-director-fleet-bridge.d.ts.map +1 -1
- 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-picker-keys.d.ts +14 -0
- package/dist/hooks/use-picker-keys.d.ts.map +1 -1
- package/dist/hooks/use-subagent-events.d.ts +10 -2
- package/dist/hooks/use-subagent-events.d.ts.map +1 -1
- package/dist/hooks/use-tui-activity.d.ts +29 -0
- package/dist/hooks/use-tui-activity.d.ts.map +1 -0
- package/dist/hooks/use-tui-controllers.d.ts +8 -2
- package/dist/hooks/use-tui-controllers.d.ts.map +1 -1
- package/dist/hooks/use-tui-event-bridge.d.ts.map +1 -1
- package/dist/hooks/use-working-dir-chip.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9929 -4168
- package/dist/index.js.map +4 -4
- package/dist/memory-slash.d.ts +15 -0
- package/dist/memory-slash.d.ts.map +1 -0
- package/dist/on-panel-open.d.ts +1 -1
- package/dist/on-panel-open.d.ts.map +1 -1
- package/dist/reducers/fleet.d.ts +1 -1
- package/dist/reducers/helpers.d.ts +1 -1
- package/dist/reducers/helpers.d.ts.map +1 -1
- package/dist/run-tui.d.ts +24 -1
- package/dist/run-tui.d.ts.map +1 -1
- package/dist/running-tools.d.ts +9 -0
- package/dist/running-tools.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/terminal-width.d.ts +36 -0
- package/dist/terminal-width.d.ts.map +1 -0
- package/dist/theme.d.ts +50 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/tool-glyph.d.ts +1 -4
- package/dist/tool-glyph.d.ts.map +1 -1
- package/dist/ui-glyphs.d.ts +45 -0
- package/dist/ui-glyphs.d.ts.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry height cache for the scrollable history viewport.
|
|
3
|
+
*
|
|
4
|
+
* Associates each history entry's stable `id` with its measured row height
|
|
5
|
+
* and maintains a prefix-sum array so `accumulatedHeight(index)` is O(1) —
|
|
6
|
+
* essential for the binary-search-based window computation in the virtual
|
|
7
|
+
* scroll viewport.
|
|
8
|
+
*
|
|
9
|
+
* This module is pure TypeScript — no React, no Ink, no DOM dependencies.
|
|
10
|
+
* It can be unit-tested without mounting components.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Default height (in terminal rows) assumed for an entry before its first
|
|
14
|
+
* measurement. 3 rows is a reasonable floor for a single-line entry
|
|
15
|
+
* (border + content + margin) and prevents a flash of zero-height spacers
|
|
16
|
+
* during the first render pass.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DEFAULT_ENTRY_HEIGHT = 3;
|
|
19
|
+
/**
|
|
20
|
+
* Prefix-sum-based height cache for history entries.
|
|
21
|
+
*
|
|
22
|
+
* Stores measured heights keyed by entry `id` and keeps a parallel prefix-sum
|
|
23
|
+
* array for O(1) range-height queries and O(log n) scroll-offset-to-entry-index
|
|
24
|
+
* resolution.
|
|
25
|
+
*
|
|
26
|
+
* Threading note: this class is designed for single-threaded use within one
|
|
27
|
+
* React render cycle. It is NOT thread-safe.
|
|
28
|
+
*/
|
|
29
|
+
export declare class EntryHeightCache {
|
|
30
|
+
/** id → measured height in terminal rows */
|
|
31
|
+
private readonly heights;
|
|
32
|
+
/**
|
|
33
|
+
* Prefix-sum of heights in insertion order. `prefix[i]` = sum of heights
|
|
34
|
+
* for entries with index < i. Rebuilt on every `record()` call.
|
|
35
|
+
* `prefix[0]` is always 0. Invariant: `prefix.length === this.ids.length + 1`.
|
|
36
|
+
*/
|
|
37
|
+
private prefix;
|
|
38
|
+
/** Ordered entry ids matching the prefix-sum positions. */
|
|
39
|
+
private ids;
|
|
40
|
+
/**
|
|
41
|
+
* Record or update the measured height for an entry.
|
|
42
|
+
* Rebuilds the prefix-sum — O(n) where n = distinct entries ever measured.
|
|
43
|
+
* In practice n is the number of entries in the session (hundreds to low
|
|
44
|
+
* thousands), and rebuild happens once per entry per render cycle.
|
|
45
|
+
*
|
|
46
|
+
* Returns `true` when the height changed (new or different from last record).
|
|
47
|
+
*/
|
|
48
|
+
record(id: number, height: number): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Total height in rows of all measured entries.
|
|
51
|
+
* O(1) — returns the last prefix-sum entry.
|
|
52
|
+
*/
|
|
53
|
+
totalHeight(): number;
|
|
54
|
+
/**
|
|
55
|
+
* Accumulated row height of entries with index < `entryIndex`.
|
|
56
|
+
* `accumulatedHeight(0)` = 0. Throws when `entryIndex > ids.length`.
|
|
57
|
+
* O(1) via prefix-sum lookup.
|
|
58
|
+
*/
|
|
59
|
+
accumulatedHeight(entryIndex: number): number;
|
|
60
|
+
/**
|
|
61
|
+
* Look up the measured height for a single entry id.
|
|
62
|
+
* Returns `undefined` when the entry has never been measured.
|
|
63
|
+
*/
|
|
64
|
+
getHeight(id: number): number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Number of entries currently tracked.
|
|
67
|
+
*/
|
|
68
|
+
get size(): number;
|
|
69
|
+
/**
|
|
70
|
+
* Find the entry index whose accumulated range contains the given
|
|
71
|
+
* vertical `rowOffset` from the top of all content.
|
|
72
|
+
*
|
|
73
|
+
* Binary search on the prefix-sum array. O(log n).
|
|
74
|
+
* Returns `0` for offsets at or before the first entry.
|
|
75
|
+
* Returns `ids.length` for offsets past the last entry.
|
|
76
|
+
*/
|
|
77
|
+
entryIndexAtOffset(rowOffset: number): number;
|
|
78
|
+
/**
|
|
79
|
+
* Remove all cached heights and reset to empty state.
|
|
80
|
+
*/
|
|
81
|
+
clear(): void;
|
|
82
|
+
/** Rebuild the prefix-sum array from current heights in insertion order. */
|
|
83
|
+
private rebuild;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Compute the visible window slice for a virtual-scrolled entry list.
|
|
87
|
+
*
|
|
88
|
+
* Given the total measured content, viewport size, scroll offset, and entry
|
|
89
|
+
* array, determines which entries to render and how tall the top/bottom spacer
|
|
90
|
+
* elements should be.
|
|
91
|
+
*
|
|
92
|
+
* All measurements are in terminal rows.
|
|
93
|
+
*
|
|
94
|
+
* Returns a result with `startIdx`, `endIdx`, `spacerAbove`, and `spacerBelow`
|
|
95
|
+
* that the caller uses to render only the visible window.
|
|
96
|
+
*/
|
|
97
|
+
export interface ComputeWindowResult {
|
|
98
|
+
/** Index of the first entry to render (inclusive). */
|
|
99
|
+
startIdx: number;
|
|
100
|
+
/** Index of the last entry to render (exclusive, like Array.slice end). */
|
|
101
|
+
endIdx: number;
|
|
102
|
+
/** Row height of the spacer above the visible window. 0 when at top. */
|
|
103
|
+
spacerAbove: number;
|
|
104
|
+
/** Row height of the spacer below the visible window. 0 when at bottom. */
|
|
105
|
+
spacerBelow: number;
|
|
106
|
+
/** Total content height measured. */
|
|
107
|
+
totalHeight: number;
|
|
108
|
+
/** Whether the computed window differs from a flat render of all entries. */
|
|
109
|
+
windowed: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Compute which entries should be rendered in a virtual-scrolled viewport.
|
|
113
|
+
*
|
|
114
|
+
* Pure function — no side effects, no state mutations. Exported for testing.
|
|
115
|
+
*
|
|
116
|
+
* @param totalHeight - Total measured height of all entries in rows.
|
|
117
|
+
* @param viewportRows - Number of visible rows in the viewport.
|
|
118
|
+
* @param scrollOffset - Rows scrolled up from the bottom (0 = pinned to newest).
|
|
119
|
+
* @param entryCount - Total number of entries.
|
|
120
|
+
* @param cache - EntryHeightCache with measured heights.
|
|
121
|
+
* @returns A {@link ComputeWindowResult} describing the visible slice.
|
|
122
|
+
*/
|
|
123
|
+
export declare function computeWindow(totalHeight: number, viewportRows: number, scrollOffset: number, entryCount: number, cache: EntryHeightCache): ComputeWindowResult;
|
|
124
|
+
//# sourceMappingURL=height-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"height-cache.d.ts","sourceRoot":"","sources":["../src/height-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;;;GASG;AACH,qBAAa,gBAAgB;IAC3B,4CAA4C;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IAErD;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAiB;IAE/B,2DAA2D;IAC3D,OAAO,CAAC,GAAG,CAAgB;IAE3B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAY1C;IAED;;;OAGG;IACH,WAAW,IAAI,MAAM,CAEpB;IAED;;;;OAIG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAM5C;IAED;;;OAGG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExC;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;;;OAOG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAkB5C;IAED;;OAEG;IACH,KAAK,IAAI,IAAI,CAIZ;IAID,4EAA4E;IAC5E,OAAO,CAAC,OAAO;CAQhB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,QAAQ,EAAE,OAAO,CAAC;CACnB;AAUD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,gBAAgB,GACtB,mBAAmB,CA4DrB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure per-agent tool-call aggregation for compact fleet-chat mode.
|
|
3
|
+
*
|
|
4
|
+
* In `compact` mode the director bridge does not emit one chat line per
|
|
5
|
+
* subagent tool call; instead each call is folded into a per-agent
|
|
6
|
+
* `ToolAgg` and committed as ONE summary line at the same turn
|
|
7
|
+
* boundaries that flush the buffered assistant text (session end, task
|
|
8
|
+
* completion, effect teardown). Kept hook-free so it is unit-testable
|
|
9
|
+
* without React or a Director.
|
|
10
|
+
*/
|
|
11
|
+
export interface ToolAgg {
|
|
12
|
+
/** Total tool calls in this turn. */
|
|
13
|
+
total: number;
|
|
14
|
+
/** Calls that reported ok === false. */
|
|
15
|
+
fails: number;
|
|
16
|
+
/** Sum of reported durations (calls without a duration contribute 0). */
|
|
17
|
+
totalMs: number;
|
|
18
|
+
/** Call count per tool name, insertion-ordered. */
|
|
19
|
+
byTool: Map<string, number>;
|
|
20
|
+
}
|
|
21
|
+
export declare function newToolAgg(): ToolAgg;
|
|
22
|
+
export declare function addTool(agg: ToolAgg, name: string, ok?: boolean | undefined, durationMs?: number | undefined): void;
|
|
23
|
+
/**
|
|
24
|
+
* Render an aggregate as a single chat line:
|
|
25
|
+
* `14 tools · grep×9 read×5 · 3.2s · 1 ✗`
|
|
26
|
+
*
|
|
27
|
+
* The top `maxTools` tools by count are listed; any remainder collapses
|
|
28
|
+
* into `+N more`. Segments with nothing to say (no duration, no
|
|
29
|
+
* failures) are omitted. Returns '' for an empty aggregate.
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatToolSummary(agg: ToolAgg, maxTools?: number): string;
|
|
32
|
+
//# sourceMappingURL=fleet-chat-coalescer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-chat-coalescer.d.ts","sourceRoot":"","sources":["../../src/hooks/fleet-chat-coalescer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,OAAO;IACtB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,wBAAgB,OAAO,CACrB,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,EACZ,EAAE,CAAC,EAAE,OAAO,GAAG,SAAS,EACxB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,GAC9B,IAAI,CAON;AAQD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,SAAI,GAAG,MAAM,CAWpE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brain panel controller — opens the panel and translates settings-view
|
|
3
|
+
* key actions into BrainPanelHost mutations (live apply + persist on the
|
|
4
|
+
* CLI side), refreshing the snapshot and surfacing errors as panel hints.
|
|
5
|
+
* Extracted from app.tsx (hotspot guardrail).
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { Action } from '../app-state.js';
|
|
9
|
+
import type { BrainRiskLevel } from '../components/brain-panel.js';
|
|
10
|
+
import { type BrainPanelHost, type BrainPanelRow } from '../components/brain-panel-model.js';
|
|
11
|
+
/** Selection returned by the shared model-pick overlay (null = cancelled). */
|
|
12
|
+
export type ModelPickSelection = {
|
|
13
|
+
providerId: string;
|
|
14
|
+
model: string;
|
|
15
|
+
} | null;
|
|
16
|
+
export interface UseBrainPanelOptions {
|
|
17
|
+
dispatch: React.Dispatch<Action>;
|
|
18
|
+
getBrainData?: (() => {
|
|
19
|
+
riskLevel: BrainRiskLevel;
|
|
20
|
+
log: Array<{
|
|
21
|
+
kind: string;
|
|
22
|
+
question: string;
|
|
23
|
+
outcome: string;
|
|
24
|
+
age: string;
|
|
25
|
+
}>;
|
|
26
|
+
}) | undefined;
|
|
27
|
+
brainPanelHost?: BrainPanelHost | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The SHARED two-step model picker (same overlay as /model), invoked in
|
|
30
|
+
* 'pick' mode: resolves with the selection instead of switching the
|
|
31
|
+
* session model. Provided by App's requestModelPick.
|
|
32
|
+
*/
|
|
33
|
+
requestModelPick?: ((title: string) => Promise<ModelPickSelection>) | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface BrainPanelController {
|
|
36
|
+
openBrainPanel: () => void;
|
|
37
|
+
handleBrainAdjust: (row: BrainPanelRow, delta: number) => void;
|
|
38
|
+
handleBrainEnter: (row: BrainPanelRow) => void;
|
|
39
|
+
handleBrainDelete: (row: BrainPanelRow) => void;
|
|
40
|
+
handleBrainVoterMod: (index: number, mod: 'persona' | 'veto') => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function useBrainPanel(opts: UseBrainPanelOptions): BrainPanelController;
|
|
43
|
+
//# sourceMappingURL=use-brain-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-brain-panel.d.ts","sourceRoot":"","sources":["../../src/hooks/use-brain-panel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,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{ Director } from '@wrongstack/core';
|
|
1
|
+
import type { Director, FleetChatVerbosity } from '@wrongstack/core';
|
|
2
2
|
import type { Action, State } from '../app-reducer.js';
|
|
3
3
|
export interface UseDirectorFleetBridgeOptions {
|
|
4
4
|
director: Director | null;
|
|
5
5
|
dispatch: React.Dispatch<Action>;
|
|
6
6
|
stateRef: React.MutableRefObject<State>;
|
|
7
|
-
|
|
7
|
+
chatMode: FleetChatVerbosity;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Director FleetBus -> TUI state bridge.
|
|
@@ -12,6 +12,20 @@ export interface UseDirectorFleetBridgeOptions {
|
|
|
12
12
|
* High-frequency text deltas are batched so subagent streams do not cause a
|
|
13
13
|
* render per token. The hook keeps live refs for settings/state that should not
|
|
14
14
|
* force FleetBus re-subscription.
|
|
15
|
+
*
|
|
16
|
+
* Chat-history gating (`chatMode`):
|
|
17
|
+
* - 'full' — every tool call gets its own 🔧 line, interim 💬 text commits
|
|
18
|
+
* at each tool boundary (legacy behavior).
|
|
19
|
+
* - 'compact' — tool calls fold into a per-agent {@link ToolAgg} and the
|
|
20
|
+
* whole turn commits as ONE entry (💬 text with the tool
|
|
21
|
+
* summary as `detail`, or a lone 🔧 summary) at session end /
|
|
22
|
+
* task completion / teardown.
|
|
23
|
+
* - 'off' — no subagent chat entries at all; provider errors/retries
|
|
24
|
+
* still surface as warn/error entries.
|
|
25
|
+
* The fleet table (F2/F3) is fed in EVERY mode. The mode is read at commit
|
|
26
|
+
* time via a live ref; a mid-burst flip applies from the next boundary on.
|
|
27
|
+
* `/clear` mid-run is safe: buffers live inside the effect, and subagent
|
|
28
|
+
* entries are never rehydrated on resume.
|
|
15
29
|
*/
|
|
16
|
-
export declare function useDirectorFleetBridge({ director, dispatch, stateRef,
|
|
30
|
+
export declare function useDirectorFleetBridge({ director, dispatch, stateRef, chatMode, }: UseDirectorFleetBridgeOptions): void;
|
|
17
31
|
//# sourceMappingURL=use-director-fleet-bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-director-fleet-bridge.d.ts","sourceRoot":"","sources":["../../src/hooks/use-director-fleet-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-director-fleet-bridge.d.ts","sourceRoot":"","sources":["../../src/hooks/use-director-fleet-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAc,MAAM,kBAAkB,CAAC;AAEjF,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAuBvD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxC,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,6BAA6B,GAAG,IAAI,CA+ZtC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic model-pick request — the reusable side of the /model overlay.
|
|
3
|
+
*
|
|
4
|
+
* `requestModelPick(title)` opens the SAME two-step provider→model picker
|
|
5
|
+
* as the /model command, but in purpose 'pick': Enter RESOLVES the returned
|
|
6
|
+
* promise with the selection instead of switching the session model, and
|
|
7
|
+
* every close path (Esc at step 1, global overlay close, a competing open)
|
|
8
|
+
* resolves null. Callers: the Brain panel (pool/voters/judge) — and any
|
|
9
|
+
* future surface that needs a model choice.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { Action } from '../app-state.js';
|
|
13
|
+
export type ModelPickSelection = {
|
|
14
|
+
providerId: string;
|
|
15
|
+
model: string;
|
|
16
|
+
} | null;
|
|
17
|
+
export interface UseModelPickRequestOptions {
|
|
18
|
+
dispatch: React.Dispatch<Action>;
|
|
19
|
+
getPickableProviders?: (() => Promise<Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
family: string;
|
|
22
|
+
models: string[];
|
|
23
|
+
}>>) | undefined;
|
|
24
|
+
/** Live `state.modelPicker.open` — closes without a pick resolve null. */
|
|
25
|
+
pickerOpen: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ModelPickRequestController {
|
|
28
|
+
/** Open the shared picker; resolves with the choice or null on cancel. */
|
|
29
|
+
requestModelPick: (title: string) => Promise<ModelPickSelection>;
|
|
30
|
+
/** Wired into the key hook as `onModelPicked` (purpose 'pick' Enter). */
|
|
31
|
+
handleModelPicked: (providerId: string, modelId: string) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function useModelPickRequest(opts: UseModelPickRequestOptions): ModelPickRequestController;
|
|
34
|
+
//# sourceMappingURL=use-model-pick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-model-pick.d.ts","sourceRoot":"","sources":["../../src/hooks/use-model-pick.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAE9E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,CAAC,EACjB,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC,CAAC,GACxE,SAAS,CAAC;IACd,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjE,yEAAyE;IACzE,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,0BAA0B,CAmChG"}
|
|
@@ -48,6 +48,20 @@ export interface PickerKeysHost {
|
|
|
48
48
|
onToolsPickerToggle: (() => Promise<void> | void) | undefined;
|
|
49
49
|
onHelpPanelEnter: (() => void) | undefined;
|
|
50
50
|
onBrainRiskChange: ((delta: number) => void) | undefined;
|
|
51
|
+
/** Settings-view value edit: ←/→ on the focused row. */
|
|
52
|
+
onBrainAdjust: ((row: import('../components/brain-panel-model.js').BrainPanelRow, delta: number) => void) | undefined;
|
|
53
|
+
/** Settings-view Enter: toggle a boolean row or open the model picker. */
|
|
54
|
+
onBrainEnter: ((row: import('../components/brain-panel-model.js').BrainPanelRow) => void) | undefined;
|
|
55
|
+
/** Settings-view d/Delete on a removable row. */
|
|
56
|
+
onBrainDelete: ((row: import('../components/brain-panel-model.js').BrainPanelRow) => void) | undefined;
|
|
57
|
+
/** Voter row modifiers: p = cycle persona, v = toggle veto. */
|
|
58
|
+
onBrainVoterMod: ((index: number, mod: 'persona' | 'veto') => void) | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Generic model-pick resolution: Enter on the model step when the picker
|
|
61
|
+
* was opened with purpose 'pick' (requestModelPick) — the selection is
|
|
62
|
+
* RETURNED to the caller instead of switching the session model.
|
|
63
|
+
*/
|
|
64
|
+
onModelPicked: ((providerId: string, modelId: string) => void) | undefined;
|
|
51
65
|
onShadowStart: (() => Promise<void> | void) | undefined;
|
|
52
66
|
onShadowStop: (() => Promise<void> | void) | undefined;
|
|
53
67
|
onFKeyPickerEnter: (() => void) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-picker-keys.d.ts","sourceRoot":"","sources":["../../src/hooks/use-picker-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-picker-keys.d.ts","sourceRoot":"","sources":["../../src/hooks/use-picker-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,cAAc,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,YAAY,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAEnC,sBAAsB,EAClB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GACjF,SAAS,CAAC;IAKd,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACnD,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAChD,mBAAmB,E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AE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3E,aAAa,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACxD,YAAY,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD,iBAAiB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5C,aAAa,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IAEjD,gBAAgB,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C;AAYD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,cAAc,GACnB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CA45B7D"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type { EventBus } from '@wrongstack/core';
|
|
1
|
+
import type { EventBus, FleetChatVerbosity } from '@wrongstack/core';
|
|
2
2
|
import type { Action } from '../app-reducer.js';
|
|
3
3
|
/**
|
|
4
4
|
* Subagent lifecycle events → TUI dispatch bridge.
|
|
5
5
|
* Wired to EventBus so both director and non-director /spawn runs surface in chat.
|
|
6
|
+
*
|
|
7
|
+
* Chat entries are gated by `getChatMode` (fleet-chat verbosity):
|
|
8
|
+
* - 'full' — every lifecycle line (legacy behavior).
|
|
9
|
+
* - 'compact' — spawn ▶, completion ✓, and the FIRST budget ⚡ warning per
|
|
10
|
+
* (agent, limit-kind); task-started / iteration / extension
|
|
11
|
+
* lines are dropped (F2/F3 monitors show them live).
|
|
12
|
+
* - 'off' — only non-success completions (✗/⏱/⊘); failures never go
|
|
13
|
+
* silent. All fleet-table dispatches run in every mode.
|
|
6
14
|
*/
|
|
7
|
-
export declare function useSubagentEvents(events: EventBus, dispatch: React.Dispatch<Action>, setActiveMaxContext: (v: number | undefined) => void, getSessionId?: (() => string | undefined) | undefined): void;
|
|
15
|
+
export declare function useSubagentEvents(events: EventBus, dispatch: React.Dispatch<Action>, setActiveMaxContext: (v: number | undefined) => void, getSessionId?: (() => string | undefined) | undefined, getChatMode?: (() => FleetChatVerbosity) | undefined): void;
|
|
8
16
|
//# sourceMappingURL=use-subagent-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-subagent-events.d.ts","sourceRoot":"","sources":["../../src/hooks/use-subagent-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-subagent-events.d.ts","sourceRoot":"","sources":["../../src/hooks/use-subagent-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAoBhD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAChC,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,EACpD,YAAY,CAAC,EAAE,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,EACrD,WAAW,CAAC,EAAE,CAAC,MAAM,kBAAkB,CAAC,GAAG,SAAS,GACnD,IAAI,CAiKN"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Agent } from '@wrongstack/core';
|
|
2
|
+
import type { Action, State } from '../app-reducer.js';
|
|
3
|
+
export interface UseTuiActivityOptions {
|
|
4
|
+
status: State['status'];
|
|
5
|
+
fleet: State['fleet'];
|
|
6
|
+
enhanceBusy: boolean;
|
|
7
|
+
thinkingWord: string;
|
|
8
|
+
projectRoot: string;
|
|
9
|
+
stateRef: React.RefObject<State>;
|
|
10
|
+
agentContext: Agent['ctx'];
|
|
11
|
+
dispatch: React.Dispatch<Action>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Own the clocks and lightweight activity animation state used by the TUI
|
|
15
|
+
* shell. Keeping these related timers together prevents the app component
|
|
16
|
+
* from accumulating another cluster of lifecycle bookkeeping.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useTuiActivity({ status, fleet, enhanceBusy, thinkingWord, projectRoot, stateRef, agentContext, dispatch, }: UseTuiActivityOptions): {
|
|
19
|
+
displayThinkingWord: string;
|
|
20
|
+
displayThinkingWordRef: import("react").RefObject<string>;
|
|
21
|
+
startedAt: number;
|
|
22
|
+
nowTick: number;
|
|
23
|
+
setNowTick: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
24
|
+
workingTimeMs: number;
|
|
25
|
+
fleetWorkingTimeMs: number;
|
|
26
|
+
enhanceDots: number;
|
|
27
|
+
refreshGoalSummary: () => void;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=use-tui-activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tui-activity.d.ts","sourceRoot":"","sources":["../../src/hooks/use-tui-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAgC,MAAM,kBAAkB,CAAC;AAE5E,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAIvD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjC,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,QAAQ,GACT,EAAE,qBAAqB;;;;;;;;;;EA+KvB"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import type { FleetChatVerbosity } from '@wrongstack/core';
|
|
1
2
|
import type { Action } from '../app-reducer.js';
|
|
2
3
|
export interface FleetStreamController {
|
|
4
|
+
/** @deprecated Mirror of `mode !== 'off'` — kept for boolean-only callers. */
|
|
3
5
|
enabled: boolean;
|
|
6
|
+
/** @deprecated Maps to `setMode(enabled ? 'full' : 'off')`. */
|
|
4
7
|
setEnabled: (enabled: boolean) => void;
|
|
8
|
+
/** Fleet-chat verbosity: off | compact | full. */
|
|
9
|
+
mode: FleetChatVerbosity;
|
|
10
|
+
setMode: (mode: FleetChatVerbosity) => void;
|
|
5
11
|
}
|
|
6
12
|
export interface EnhanceController {
|
|
7
13
|
enabled: boolean;
|
|
@@ -13,7 +19,7 @@ export interface AgentsMonitorController {
|
|
|
13
19
|
}
|
|
14
20
|
export interface UseTuiControllersOptions {
|
|
15
21
|
dispatch: React.Dispatch<Action>;
|
|
16
|
-
|
|
22
|
+
fleetChat: FleetChatVerbosity;
|
|
17
23
|
enhanceEnabled: boolean;
|
|
18
24
|
agentsMonitorOpen: boolean;
|
|
19
25
|
fleetStreamController?: FleetStreamController | undefined;
|
|
@@ -27,5 +33,5 @@ export interface UseTuiControllersOptions {
|
|
|
27
33
|
* TUI is mounted they should dispatch into React state instead of mutating
|
|
28
34
|
* inert mirrors. On unmount we restore mirror-only setters for late callbacks.
|
|
29
35
|
*/
|
|
30
|
-
export declare function useTuiControllers({ dispatch,
|
|
36
|
+
export declare function useTuiControllers({ dispatch, fleetChat, enhanceEnabled, agentsMonitorOpen, fleetStreamController, enhanceController, agentsMonitorController, }: UseTuiControllersOptions): void;
|
|
31
37
|
//# sourceMappingURL=use-tui-controllers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tui-controllers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-tui-controllers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use-tui-controllers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-tui-controllers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,8EAA8E;IAC9E,OAAO,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,kDAAkD;IAClD,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC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G,SAAS,CAAC;IACtD,kBAAkB,CAAC,EACf,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC,GACpE,SAAS,CAAC;IACd,cAAc,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACzE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,cAAc,GACf,EAAE,wBAAwB,GAAG,IAAI,CASjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-working-dir-chip.d.ts","sourceRoot":"","sources":["../../src/hooks/use-working-dir-chip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"use-working-dir-chip.d.ts","sourceRoot":"","sources":["../../src/hooks/use-working-dir-chip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CASpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAavF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { buildGoalPreamble } from './app.js';
|
|
|
4
4
|
export type { Settings } from './app.js';
|
|
5
5
|
export type { PluginPickerItem } from './components/plugin-picker.js';
|
|
6
6
|
export type { AuthCatalogRow, AuthFlowIo, AuthFlowResult, AuthKeyRow, AuthLocalPresetRow, AuthOAuthKind, AuthPanelHost, AuthProviderRow, } from './components/auth-panel-model.js';
|
|
7
|
+
export type { BrainPanelHost, BrainPanelSettings, BrainPanelVoter, } from './components/brain-panel-model.js';
|
|
7
8
|
export { parseInline } from './markdown.js';
|
|
8
9
|
export { replaySessionEvents } from './components/history/replay.js';
|
|
9
10
|
export { parseNextSteps } from './components/suggestions.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,YAAY,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,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