@peasant-labs/fairtrade 0.0.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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/lib/README.md +13 -0
- package/dist/lib/base.css +48 -0
- package/dist/lib/components.css +2 -0
- package/dist/lib/fonts.css +28 -0
- package/dist/lib/tokens.css +184 -0
- package/dist/lib/tokens.json +768 -0
- package/dist/lib/types/Accordion.d.ts +47 -0
- package/dist/lib/types/Accordion.stories.d.ts +91 -0
- package/dist/lib/types/Avatar.d.ts +94 -0
- package/dist/lib/types/Avatar.stories.d.ts +160 -0
- package/dist/lib/types/BrandMark.d.ts +25 -0
- package/dist/lib/types/BrandMark.stories.d.ts +75 -0
- package/dist/lib/types/Breadcrumb.d.ts +66 -0
- package/dist/lib/types/Breadcrumb.stories.d.ts +91 -0
- package/dist/lib/types/Button.d.ts +86 -0
- package/dist/lib/types/Button.stories.d.ts +129 -0
- package/dist/lib/types/Card.d.ts +145 -0
- package/dist/lib/types/Card.stories.d.ts +70 -0
- package/dist/lib/types/Chart.stories.d.ts +55 -0
- package/dist/lib/types/ChartBar.d.ts +51 -0
- package/dist/lib/types/ChartLine.d.ts +54 -0
- package/dist/lib/types/Checkbox.d.ts +132 -0
- package/dist/lib/types/Checkbox.stories.d.ts +75 -0
- package/dist/lib/types/Chip.d.ts +85 -0
- package/dist/lib/types/Chip.stories.d.ts +190 -0
- package/dist/lib/types/CliOnboard.d.ts +68 -0
- package/dist/lib/types/CliOnboard.stories.d.ts +24 -0
- package/dist/lib/types/CommandPalette.d.ts +6 -0
- package/dist/lib/types/CommandPalette.stories.d.ts +94 -0
- package/dist/lib/types/CommitGraph.d.ts +71 -0
- package/dist/lib/types/CommitGraph.stories.d.ts +17 -0
- package/dist/lib/types/ConnectionState.d.ts +82 -0
- package/dist/lib/types/ConnectionState.stories.d.ts +117 -0
- package/dist/lib/types/ConsentDialog.d.ts +97 -0
- package/dist/lib/types/ConsentDialog.stories.d.ts +61 -0
- package/dist/lib/types/DataTable.d.ts +116 -0
- package/dist/lib/types/DataTable.stories.d.ts +240 -0
- package/dist/lib/types/DateRange.d.ts +242 -0
- package/dist/lib/types/DateRange.stories.d.ts +272 -0
- package/dist/lib/types/Dialog.d.ts +9 -0
- package/dist/lib/types/Dialog.stories.d.ts +121 -0
- package/dist/lib/types/DiffView.d.ts +39 -0
- package/dist/lib/types/DiffView.stories.d.ts +118 -0
- package/dist/lib/types/EmptyState.d.ts +28 -0
- package/dist/lib/types/EmptyState.stories.d.ts +130 -0
- package/dist/lib/types/EvidenceCaption.d.ts +39 -0
- package/dist/lib/types/EvidenceCaption.stories.d.ts +43 -0
- package/dist/lib/types/Explainer.d.ts +82 -0
- package/dist/lib/types/Explainer.stories.d.ts +22 -0
- package/dist/lib/types/FacetRail.d.ts +13 -0
- package/dist/lib/types/FacetRail.stories.d.ts +28 -0
- package/dist/lib/types/Feedback.d.ts +222 -0
- package/dist/lib/types/Feedback.stories.d.ts +81 -0
- package/dist/lib/types/GroupedMultiSelect.d.ts +67 -0
- package/dist/lib/types/GroupedMultiSelect.stories.d.ts +59 -0
- package/dist/lib/types/Input.d.ts +158 -0
- package/dist/lib/types/Input.stories.d.ts +181 -0
- package/dist/lib/types/Intensity.d.ts +55 -0
- package/dist/lib/types/Intensity.stories.d.ts +108 -0
- package/dist/lib/types/MapCanvas.d.ts +89 -0
- package/dist/lib/types/MapCanvas.stories.d.ts +174 -0
- package/dist/lib/types/Menu.d.ts +62 -0
- package/dist/lib/types/Menu.stories.d.ts +173 -0
- package/dist/lib/types/ModerationQueue.d.ts +135 -0
- package/dist/lib/types/ModerationQueue.stories.d.ts +34 -0
- package/dist/lib/types/Pager.d.ts +47 -0
- package/dist/lib/types/Pager.stories.d.ts +100 -0
- package/dist/lib/types/Pagination.d.ts +50 -0
- package/dist/lib/types/Pagination.stories.d.ts +193 -0
- package/dist/lib/types/PolicySelect.d.ts +80 -0
- package/dist/lib/types/PolicySelect.stories.d.ts +130 -0
- package/dist/lib/types/ProviderIcon.d.ts +83 -0
- package/dist/lib/types/ProviderIcon.stories.d.ts +44 -0
- package/dist/lib/types/RailShell.d.ts +199 -0
- package/dist/lib/types/RailShell.stories.d.ts +32 -0
- package/dist/lib/types/Redaction.d.ts +53 -0
- package/dist/lib/types/Redaction.stories.d.ts +120 -0
- package/dist/lib/types/RoleRoster.d.ts +97 -0
- package/dist/lib/types/RoleRoster.stories.d.ts +23 -0
- package/dist/lib/types/SignIn.d.ts +78 -0
- package/dist/lib/types/SignIn.stories.d.ts +57 -0
- package/dist/lib/types/Sparkline.d.ts +19 -0
- package/dist/lib/types/StatTiles.d.ts +115 -0
- package/dist/lib/types/StatTiles.stories.d.ts +31 -0
- package/dist/lib/types/StepWizard.d.ts +92 -0
- package/dist/lib/types/StepWizard.stories.d.ts +18 -0
- package/dist/lib/types/StepsWaterfall.d.ts +67 -0
- package/dist/lib/types/StepsWaterfall.stories.d.ts +94 -0
- package/dist/lib/types/Switch.d.ts +63 -0
- package/dist/lib/types/Switch.stories.d.ts +134 -0
- package/dist/lib/types/Tabs.d.ts +48 -0
- package/dist/lib/types/Tabs.stories.d.ts +75 -0
- package/dist/lib/types/TimeStrip.d.ts +12 -0
- package/dist/lib/types/TimeStrip.stories.d.ts +30 -0
- package/dist/lib/types/Timeline.d.ts +192 -0
- package/dist/lib/types/Timeline.stories.d.ts +974 -0
- package/dist/lib/types/ToastHost.d.ts +70 -0
- package/dist/lib/types/ToastHost.stories.d.ts +115 -0
- package/dist/lib/types/ToolRenderers.d.ts +24 -0
- package/dist/lib/types/ToolRenderers.stories.d.ts +138 -0
- package/dist/lib/types/Tooltip.d.ts +80 -0
- package/dist/lib/types/Tooltip.stories.d.ts +116 -0
- package/dist/lib/types/Tour.d.ts +37 -0
- package/dist/lib/types/Tour.stories.d.ts +39 -0
- package/dist/lib/types/TranscriptMarkers.d.ts +50 -0
- package/dist/lib/types/TranscriptMarkers.stories.d.ts +48 -0
- package/dist/lib/types/Treemap.d.ts +77 -0
- package/dist/lib/types/Treemap.stories.d.ts +101 -0
- package/dist/lib/types/VisibilityControl.d.ts +54 -0
- package/dist/lib/types/VisibilityControl.stories.d.ts +126 -0
- package/dist/lib/types/chart-shared.d.ts +63 -0
- package/dist/lib/types/index.d.ts +53 -0
- package/dist/lib/types/story-frame.d.ts +12 -0
- package/dist/lib/ui.js +8707 -0
- package/package.json +67 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} TabItem
|
|
3
|
+
* @property {string} id stable id for the tab/panel pair (used for ids + aria wiring)
|
|
4
|
+
* @property {React.ReactNode} label the tab's visible label; force-lowercased as ui chrome, so pass a section name, never user content / proper nouns
|
|
5
|
+
* @property {number} [count] optional count shown in a .cnt badge after the label
|
|
6
|
+
* @property {React.ReactNode} content the panel's content
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Self-contained ARIA tablist matching the trails-section specimen. Renders a
|
|
10
|
+
* `role="tablist".tabs` of `role="tab".tab` buttons (roving tabindex, `.active`
|
|
11
|
+
* on the selected tab, optional `.cnt` count) controlling `role="tabpanel".tabpanel`
|
|
12
|
+
* regions whose `hidden` attribute is toggled. Keyboard: Arrow/Home/End move
|
|
13
|
+
* selection (also focusing the tab), click selects + focuses. Ports the delegated
|
|
14
|
+
* logic from App.jsx's tablist useEffect.
|
|
15
|
+
*
|
|
16
|
+
* Supports controlled (`value` + `onChange`) and uncontrolled (`defaultTab`) use.
|
|
17
|
+
*
|
|
18
|
+
* @param {Object} props
|
|
19
|
+
* @param {TabItem[]} props.tabs the tabs to render
|
|
20
|
+
* @param {string} [props.defaultTab] initial selected tab id (uncontrolled; defaults to tabs[0].id)
|
|
21
|
+
* @param {string} [props.value] selected tab id (controlled)
|
|
22
|
+
* @param {(id: string) => void} [props.onChange] called with the newly selected tab id
|
|
23
|
+
* @param {string} [props['aria-label']] accessible name for the tablist (default "tabs")
|
|
24
|
+
*/
|
|
25
|
+
export default function Tabs({ tabs, defaultTab, value, onChange, "aria-label": ariaLabel }: {
|
|
26
|
+
tabs: TabItem[];
|
|
27
|
+
defaultTab?: string;
|
|
28
|
+
value?: string;
|
|
29
|
+
onChange?: (id: string) => void;
|
|
30
|
+
}): any;
|
|
31
|
+
export type TabItem = {
|
|
32
|
+
/**
|
|
33
|
+
* stable id for the tab/panel pair (used for ids + aria wiring)
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* the tab's visible label; force-lowercased as ui chrome, so pass a section name, never user content / proper nouns
|
|
38
|
+
*/
|
|
39
|
+
label: React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* optional count shown in a .cnt badge after the label
|
|
42
|
+
*/
|
|
43
|
+
count?: number;
|
|
44
|
+
/**
|
|
45
|
+
* the panel's content
|
|
46
|
+
*/
|
|
47
|
+
content: React.ReactNode;
|
|
48
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export const Playground: {};
|
|
3
|
+
export namespace SecondSelected {
|
|
4
|
+
namespace args {
|
|
5
|
+
let defaultTab: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export namespace NoCounts {
|
|
9
|
+
export namespace args_1 {
|
|
10
|
+
let tabs: {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
content: any;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export { args_1 as args };
|
|
17
|
+
}
|
|
18
|
+
export namespace TwoTabs {
|
|
19
|
+
let args_2: {
|
|
20
|
+
tabs: {
|
|
21
|
+
id: string;
|
|
22
|
+
label: string;
|
|
23
|
+
count: number;
|
|
24
|
+
content: any;
|
|
25
|
+
}[];
|
|
26
|
+
'aria-label': string;
|
|
27
|
+
};
|
|
28
|
+
export { args_2 as args };
|
|
29
|
+
}
|
|
30
|
+
export namespace Controlled {
|
|
31
|
+
function render(args: any): any;
|
|
32
|
+
function play({ canvasElement }: {
|
|
33
|
+
canvasElement: any;
|
|
34
|
+
}): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
export namespace Interaction {
|
|
37
|
+
export namespace args_3 {
|
|
38
|
+
let defaultTab_1: string;
|
|
39
|
+
export { defaultTab_1 as defaultTab };
|
|
40
|
+
}
|
|
41
|
+
export { args_3 as args };
|
|
42
|
+
export function play_1({ canvasElement }: {
|
|
43
|
+
canvasElement: any;
|
|
44
|
+
}): Promise<void>;
|
|
45
|
+
export { play_1 as play };
|
|
46
|
+
}
|
|
47
|
+
declare namespace meta {
|
|
48
|
+
export let title: string;
|
|
49
|
+
export { Tabs as component };
|
|
50
|
+
export let tags: string[];
|
|
51
|
+
export let decorators: Function[];
|
|
52
|
+
export let argTypes: {
|
|
53
|
+
defaultTab: {
|
|
54
|
+
control: string;
|
|
55
|
+
options: string[];
|
|
56
|
+
};
|
|
57
|
+
'aria-label': {
|
|
58
|
+
control: string;
|
|
59
|
+
};
|
|
60
|
+
tabs: {
|
|
61
|
+
control: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
let args_4: {
|
|
65
|
+
tabs: {
|
|
66
|
+
id: string;
|
|
67
|
+
label: string;
|
|
68
|
+
count: number;
|
|
69
|
+
content: any;
|
|
70
|
+
}[];
|
|
71
|
+
'aria-label': string;
|
|
72
|
+
};
|
|
73
|
+
export { args_4 as args };
|
|
74
|
+
}
|
|
75
|
+
import Tabs from './Tabs.jsx';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function TimeStrip({ buckets, value, defaultValue, onScrub, branches, label, maxBranchChips, className, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
buckets?: any[];
|
|
4
|
+
value: any;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
onScrub: any;
|
|
7
|
+
branches?: any[];
|
|
8
|
+
label?: string;
|
|
9
|
+
maxBranchChips?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): any;
|
|
12
|
+
export default TimeStrip;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default meta;
|
|
2
|
+
export namespace Default {
|
|
3
|
+
function render(): any;
|
|
4
|
+
function play({ canvasElement }: {
|
|
5
|
+
canvasElement: any;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export namespace Sparse {
|
|
9
|
+
export function render_1(): any;
|
|
10
|
+
export { render_1 as render };
|
|
11
|
+
export function play_1({ canvasElement }: {
|
|
12
|
+
canvasElement: any;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
export { play_1 as play };
|
|
15
|
+
}
|
|
16
|
+
export namespace Uncontrolled {
|
|
17
|
+
export let name: string;
|
|
18
|
+
export function render_2(): any;
|
|
19
|
+
export { render_2 as render };
|
|
20
|
+
}
|
|
21
|
+
declare namespace meta {
|
|
22
|
+
export let title: string;
|
|
23
|
+
export { TimeStrip as component };
|
|
24
|
+
export let tags: string[];
|
|
25
|
+
export let decorators: Function[];
|
|
26
|
+
export namespace parameters {
|
|
27
|
+
let layout: string;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
import TimeStrip from './TimeStrip.jsx';
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThinkingBlock — a collapsible reasoning panel. Controlled when `open`/`onToggle`
|
|
3
|
+
* are passed, otherwise it self-manages. Header is a real <button aria-expanded>;
|
|
4
|
+
* the body lazy-mounts on open so collapsed reasoning is absent from the a11y tree.
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} props
|
|
7
|
+
* @param {Thinking} props.block the reasoning block (words + text)
|
|
8
|
+
* @param {boolean} [props.open] controlled open state
|
|
9
|
+
* @param {() => void} [props.onToggle] controlled toggle handler
|
|
10
|
+
*/
|
|
11
|
+
export function ThinkingBlock({ block, open: openProp, onToggle }: {
|
|
12
|
+
block: Thinking;
|
|
13
|
+
open?: boolean;
|
|
14
|
+
onToggle?: () => void;
|
|
15
|
+
}): any;
|
|
16
|
+
/**
|
|
17
|
+
* ToolCall — one collapsible tool call. Controlled when `open`/`onToggle` are passed
|
|
18
|
+
* (lets a host own expand-all), otherwise self-managed. Header is a real
|
|
19
|
+
* <button aria-expanded>; the body lazy-mounts on open. `renderTool` overrides the
|
|
20
|
+
* built-in body dispatch.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} props
|
|
23
|
+
* @param {Tool} props.tool
|
|
24
|
+
* @param {number} [props.index] position, passed to renderTool
|
|
25
|
+
* @param {boolean} [props.open] controlled open state
|
|
26
|
+
* @param {() => void} [props.onToggle] controlled toggle handler
|
|
27
|
+
* @param {(tool: Tool, i: number) => React.ReactNode} [props.renderTool] custom body renderer
|
|
28
|
+
*/
|
|
29
|
+
export function ToolCall({ tool, index, open: openProp, onToggle, renderTool }: {
|
|
30
|
+
tool: Tool;
|
|
31
|
+
index?: number;
|
|
32
|
+
open?: boolean;
|
|
33
|
+
onToggle?: () => void;
|
|
34
|
+
renderTool?: (tool: Tool, i: number) => React.ReactNode;
|
|
35
|
+
}): any;
|
|
36
|
+
/**
|
|
37
|
+
* TimelineItem — renders one node on the spine, switching on `kind`. Owns the
|
|
38
|
+
* decorative dot, the role glyph + head meta and the body slot. Exported so a host
|
|
39
|
+
* can map its own array and compose custom containers.
|
|
40
|
+
*
|
|
41
|
+
* @param {Object} props
|
|
42
|
+
* @param {TimelineItem} props.item
|
|
43
|
+
* @param {(tool: Tool, i: number) => React.ReactNode} [props.renderTool]
|
|
44
|
+
* @param {(item: TimelineItem) => React.ReactNode} [props.renderBody]
|
|
45
|
+
*/
|
|
46
|
+
export function TimelineItem({ item, renderTool, renderBody }: {
|
|
47
|
+
item: TimelineItem;
|
|
48
|
+
renderTool?: (tool: Tool, i: number) => React.ReactNode;
|
|
49
|
+
renderBody?: (item: TimelineItem) => React.ReactNode;
|
|
50
|
+
}): any;
|
|
51
|
+
export type TimelineItem = {
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* node type on the spine
|
|
55
|
+
*/
|
|
56
|
+
kind: "turn" | "phase" | "checkpoint";
|
|
57
|
+
/**
|
|
58
|
+
* (kind: turn)
|
|
59
|
+
*/
|
|
60
|
+
role?: "user" | "assistant" | "subagent" | "tool" | "system";
|
|
61
|
+
/**
|
|
62
|
+
* turn label e.g. '2a' (tabular)
|
|
63
|
+
*/
|
|
64
|
+
label?: string;
|
|
65
|
+
/**
|
|
66
|
+
* 0 = main thread; > 0 = subagent inset
|
|
67
|
+
*/
|
|
68
|
+
depth?: number;
|
|
69
|
+
/**
|
|
70
|
+
* subagent name when depth > 0
|
|
71
|
+
*/
|
|
72
|
+
subagent?: string;
|
|
73
|
+
/**
|
|
74
|
+
* relative, e.g. '8m ago'
|
|
75
|
+
*/
|
|
76
|
+
time?: string;
|
|
77
|
+
/**
|
|
78
|
+
* absolute, used for title=
|
|
79
|
+
*/
|
|
80
|
+
longTime?: string;
|
|
81
|
+
/**
|
|
82
|
+
* the turn text (passed to renderBody)
|
|
83
|
+
*/
|
|
84
|
+
body?: string;
|
|
85
|
+
/**
|
|
86
|
+
* collapsible reasoning block
|
|
87
|
+
*/
|
|
88
|
+
thinking?: Thinking;
|
|
89
|
+
/**
|
|
90
|
+
* collapsible tool calls
|
|
91
|
+
*/
|
|
92
|
+
tools?: Tool[];
|
|
93
|
+
tokens?: {
|
|
94
|
+
in: number;
|
|
95
|
+
out: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* turn surfaced a tool error
|
|
99
|
+
*/
|
|
100
|
+
error?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* marks the last assistant turn; caps the spine below it
|
|
103
|
+
*/
|
|
104
|
+
final?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* (kind: phase) e.g. 'debugging'
|
|
107
|
+
*/
|
|
108
|
+
phaseLabel?: string;
|
|
109
|
+
/**
|
|
110
|
+
* lucide phase icon
|
|
111
|
+
*/
|
|
112
|
+
icon?: React.ComponentType<any>;
|
|
113
|
+
/**
|
|
114
|
+
* 'turns 3–4 · 1 error'
|
|
115
|
+
*/
|
|
116
|
+
range?: string;
|
|
117
|
+
/**
|
|
118
|
+
* (kind: checkpoint) commit hash
|
|
119
|
+
*/
|
|
120
|
+
hash?: string;
|
|
121
|
+
/**
|
|
122
|
+
* commit message
|
|
123
|
+
*/
|
|
124
|
+
msg?: string;
|
|
125
|
+
stat?: {
|
|
126
|
+
files: number;
|
|
127
|
+
adds: number;
|
|
128
|
+
dels: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Timeline — a vertical spine for a whole session: phase dividers, role-tinted
|
|
133
|
+
* turn nodes, collapsible thinking + tool calls, subagent insets and commit
|
|
134
|
+
* checkpoints, read top to bottom. The vertical sibling of the horizontal Steps
|
|
135
|
+
* wizard; they share no geometry. Role is carried by glyph + label, never tint
|
|
136
|
+
* alone; the spine stays continuous even through subagent insets.
|
|
137
|
+
*
|
|
138
|
+
* Emits `<ol class="tl" aria-label>` — turns are an ordered list so DOM order
|
|
139
|
+
* equals visual order equals conversation order. Renders an EmptyState-style
|
|
140
|
+
* `.empty` block when `items` is empty.
|
|
141
|
+
*
|
|
142
|
+
* @param {Object} props
|
|
143
|
+
* @param {TimelineItem[]} [props.items=[]] ordered top->bottom event stream
|
|
144
|
+
* @param {(tool: Tool, i: number) => React.ReactNode} [props.renderTool] per-tool body override
|
|
145
|
+
* @param {(item: TimelineItem) => React.ReactNode} [props.renderBody] per-role body override
|
|
146
|
+
* @param {boolean} [props.dense=false] compact rhythm for sidebars
|
|
147
|
+
* @param {string} [props.ariaLabel='conversation timeline'] label for the <ol> landmark
|
|
148
|
+
*/
|
|
149
|
+
export default function Timeline({ items, renderTool, renderBody, dense, ariaLabel }: {
|
|
150
|
+
items?: TimelineItem[];
|
|
151
|
+
renderTool?: (tool: Tool, i: number) => React.ReactNode;
|
|
152
|
+
renderBody?: (item: TimelineItem) => React.ReactNode;
|
|
153
|
+
dense?: boolean;
|
|
154
|
+
ariaLabel?: string;
|
|
155
|
+
}): any;
|
|
156
|
+
export type Thinking = {
|
|
157
|
+
/**
|
|
158
|
+
* word count shown next to the toggle (tabular)
|
|
159
|
+
*/
|
|
160
|
+
words: number;
|
|
161
|
+
/**
|
|
162
|
+
* the reasoning text (kept in original case)
|
|
163
|
+
*/
|
|
164
|
+
text: string;
|
|
165
|
+
};
|
|
166
|
+
export type Tool = {
|
|
167
|
+
id: string;
|
|
168
|
+
/**
|
|
169
|
+
* switch for the built-in renderer
|
|
170
|
+
*/
|
|
171
|
+
kind: "read" | "grep" | "edit" | "write" | "bash" | "task" | "webfetch" | string;
|
|
172
|
+
/**
|
|
173
|
+
* content-case label e.g. 'Read' (NEVER lowercased)
|
|
174
|
+
*/
|
|
175
|
+
name: string;
|
|
176
|
+
/**
|
|
177
|
+
* one-line summary shown while collapsed
|
|
178
|
+
*/
|
|
179
|
+
preview: string;
|
|
180
|
+
/**
|
|
181
|
+
* e.g. '4.1s' (tabular)
|
|
182
|
+
*/
|
|
183
|
+
duration?: string;
|
|
184
|
+
/**
|
|
185
|
+
* bash exit code; !== 0 surfaces an error pill + tints the dot
|
|
186
|
+
* kind-specific payload: read{path,lines,excerpt} · grep{pattern,scope,glob,matches,results}
|
|
187
|
+
* · edit{path,adds,dels,hunk[]} · bash{command,description,stdout,exit,duration}
|
|
188
|
+
* · webfetch{url,prompt,result} · task{agent,status,task,owner,promptBody,result}
|
|
189
|
+
* · default{args,result}
|
|
190
|
+
*/
|
|
191
|
+
exit?: number;
|
|
192
|
+
};
|