@visuno/angular 0.0.0-stage → 0.1.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 +24 -0
- package/README.md +56 -2
- package/account-table/account-table.component.d.ts +72 -0
- package/action-log/action-log.component.d.ts +41 -0
- package/activity-heatmap/activity-heatmap.component.d.ts +67 -0
- package/agent-inbox/agent-inbox.component.d.ts +75 -0
- package/agent-lanes/agent-lanes.component.d.ts +152 -0
- package/agent-phases/agent-phases.component.d.ts +62 -0
- package/agent-run-timeline/agent-run-timeline.component.d.ts +113 -0
- package/agent-tree/agent-tree.component.d.ts +80 -0
- package/answer-action-bar/answer-action-bar.component.d.ts +110 -0
- package/artifact-card/artifact-card.component.d.ts +145 -0
- package/attachment-tray/attachment-tray.component.d.ts +84 -0
- package/badge/badge.component.d.ts +25 -0
- package/bar-chart/bar-chart.component.d.ts +87 -0
- package/browser-session/browser-session.component.d.ts +70 -0
- package/buttons/buttons.component.d.ts +63 -0
- package/card/card.component.d.ts +21 -0
- package/change-review/change-review.component.d.ts +97 -0
- package/citation-hover-card/citation-hover-card.component.d.ts +95 -0
- package/code-viewer/code-viewer.component.d.ts +86 -0
- package/composer/composer.component.d.ts +114 -0
- package/context-meter/context-meter.component.d.ts +60 -0
- package/core/icon.component.d.ts +10 -0
- package/core/reduced-motion.service.d.ts +15 -0
- package/decision-prompt/decision-prompt.component.d.ts +56 -0
- package/design-review/design-review.component.d.ts +108 -0
- package/design-tuner/design-tuner.component.d.ts +75 -0
- package/details-panel/details-panel.component.d.ts +150 -0
- package/donut-chart/donut-chart.component.d.ts +63 -0
- package/draft-review/draft-review.component.d.ts +128 -0
- package/error-recovery/error-recovery.component.d.ts +59 -0
- package/esm2022/account-table/account-table.component.mjs +399 -0
- package/esm2022/action-log/action-log.component.mjs +177 -0
- package/esm2022/activity-heatmap/activity-heatmap.component.mjs +285 -0
- package/esm2022/agent-inbox/agent-inbox.component.mjs +284 -0
- package/esm2022/agent-lanes/agent-lanes.component.mjs +600 -0
- package/esm2022/agent-phases/agent-phases.component.mjs +300 -0
- package/esm2022/agent-run-timeline/agent-run-timeline.component.mjs +412 -0
- package/esm2022/agent-tree/agent-tree.component.mjs +393 -0
- package/esm2022/answer-action-bar/answer-action-bar.component.mjs +636 -0
- package/esm2022/artifact-card/artifact-card.component.mjs +916 -0
- package/esm2022/attachment-tray/attachment-tray.component.mjs +402 -0
- package/esm2022/badge/badge.component.mjs +97 -0
- package/esm2022/bar-chart/bar-chart.component.mjs +300 -0
- package/esm2022/browser-session/browser-session.component.mjs +352 -0
- package/esm2022/buttons/buttons.component.mjs +215 -0
- package/esm2022/card/card.component.mjs +107 -0
- package/esm2022/change-review/change-review.component.mjs +398 -0
- package/esm2022/citation-hover-card/citation-hover-card.component.mjs +360 -0
- package/esm2022/code-viewer/code-viewer.component.mjs +291 -0
- package/esm2022/composer/composer.component.mjs +743 -0
- package/esm2022/context-meter/context-meter.component.mjs +275 -0
- package/esm2022/core/icon.component.mjs +111 -0
- package/esm2022/core/reduced-motion.service.mjs +34 -0
- package/esm2022/decision-prompt/decision-prompt.component.mjs +259 -0
- package/esm2022/design-review/design-review.component.mjs +428 -0
- package/esm2022/design-tuner/design-tuner.component.mjs +341 -0
- package/esm2022/details-panel/details-panel.component.mjs +537 -0
- package/esm2022/donut-chart/donut-chart.component.mjs +240 -0
- package/esm2022/draft-review/draft-review.component.mjs +549 -0
- package/esm2022/error-recovery/error-recovery.component.mjs +231 -0
- package/esm2022/eval-results/eval-results.component.mjs +368 -0
- package/esm2022/feedback-sheet/feedback-sheet.component.mjs +411 -0
- package/esm2022/field-extraction/field-extraction.component.mjs +368 -0
- package/esm2022/funnel-chart/funnel-chart.component.mjs +258 -0
- package/esm2022/grid/grid.component.mjs +66 -0
- package/esm2022/health-score/health-score.component.mjs +420 -0
- package/esm2022/human-handoff/human-handoff.component.mjs +676 -0
- package/esm2022/image-generation/image-generation.component.mjs +1028 -0
- package/esm2022/inline-text-diff/inline-text-diff.component.mjs +390 -0
- package/esm2022/launch-checklist/launch-checklist.component.mjs +229 -0
- package/esm2022/line-chart/line-chart.component.mjs +417 -0
- package/esm2022/live-answer/live-answer.component.mjs +411 -0
- package/esm2022/metric-insight/metric-insight.component.mjs +511 -0
- package/esm2022/modal/modal.component.mjs +202 -0
- package/esm2022/model-picker/model-picker.component.mjs +491 -0
- package/esm2022/permission-gate/permission-gate.component.mjs +498 -0
- package/esm2022/plan-review/plan-review.component.mjs +432 -0
- package/esm2022/progress/progress.component.mjs +503 -0
- package/esm2022/prompt-library/prompt-library.component.mjs +453 -0
- package/esm2022/prompt-starters/prompt-starters.component.mjs +272 -0
- package/esm2022/proposal-card/proposal-card.component.mjs +402 -0
- package/esm2022/public-api.mjs +88 -0
- package/esm2022/radar-chart/radar-chart.component.mjs +500 -0
- package/esm2022/radial-goals/radial-goals.component.mjs +418 -0
- package/esm2022/reasoning-trail/reasoning-trail.component.mjs +284 -0
- package/esm2022/response-versions/response-versions.component.mjs +288 -0
- package/esm2022/rewrite-toolbar/rewrite-toolbar.component.mjs +397 -0
- package/esm2022/rich-text-editor/rich-text-editor.component.mjs +1755 -0
- package/esm2022/run-cost/run-cost.component.mjs +215 -0
- package/esm2022/run-queue/run-queue.component.mjs +481 -0
- package/esm2022/run-summary/run-summary.component.mjs +331 -0
- package/esm2022/scatter-chart/scatter-chart.component.mjs +705 -0
- package/esm2022/score-breakdown/score-breakdown.component.mjs +460 -0
- package/esm2022/segmented-control/segmented-control.component.mjs +180 -0
- package/esm2022/source-stack/source-stack.component.mjs +245 -0
- package/esm2022/stat-cards/stat-cards.component.mjs +258 -0
- package/esm2022/status-pill/status-pill.component.mjs +305 -0
- package/esm2022/steering/steering.component.mjs +343 -0
- package/esm2022/step-loader/step-loader.component.mjs +209 -0
- package/esm2022/task-table/task-table.component.mjs +534 -0
- package/esm2022/terminal-stream/terminal-stream.component.mjs +583 -0
- package/esm2022/thinking/thinking.component.mjs +276 -0
- package/esm2022/thinking-states/thinking-states.component.mjs +333 -0
- package/esm2022/thread-panel/thread-panel.component.mjs +271 -0
- package/esm2022/toast/toast.component.mjs +195 -0
- package/esm2022/toast-stack/toast-stack.component.mjs +301 -0
- package/esm2022/tool-call/tool-call.component.mjs +273 -0
- package/esm2022/tooltip/tooltip.component.mjs +417 -0
- package/esm2022/top-pages/top-pages.component.mjs +240 -0
- package/esm2022/trace-view/trace-view.component.mjs +440 -0
- package/esm2022/visuno-angular.mjs +5 -0
- package/esm2022/voice-capture/voice-capture.component.mjs +650 -0
- package/esm2022/voice-orb/voice-orb.component.mjs +538 -0
- package/esm2022/web-search/web-search.component.mjs +374 -0
- package/eval-results/eval-results.component.d.ts +67 -0
- package/feedback-sheet/feedback-sheet.component.d.ts +74 -0
- package/fesm2022/visuno-angular.mjs +31992 -0
- package/fesm2022/visuno-angular.mjs.map +1 -0
- package/field-extraction/field-extraction.component.d.ts +82 -0
- package/funnel-chart/funnel-chart.component.d.ts +70 -0
- package/grid/grid.component.d.ts +22 -0
- package/health-score/health-score.component.d.ts +87 -0
- package/human-handoff/human-handoff.component.d.ts +125 -0
- package/image-generation/image-generation.component.d.ts +253 -0
- package/index.d.ts +5 -0
- package/inline-text-diff/inline-text-diff.component.d.ts +76 -0
- package/launch-checklist/launch-checklist.component.d.ts +46 -0
- package/line-chart/line-chart.component.d.ts +89 -0
- package/live-answer/live-answer.component.d.ts +110 -0
- package/metric-insight/metric-insight.component.d.ts +110 -0
- package/modal/modal.component.d.ts +37 -0
- package/model-picker/model-picker.component.d.ts +97 -0
- package/package.json +51 -4
- package/permission-gate/permission-gate.component.d.ts +100 -0
- package/plan-review/plan-review.component.d.ts +86 -0
- package/progress/progress.component.d.ts +91 -0
- package/prompt-library/prompt-library.component.d.ts +121 -0
- package/prompt-starters/prompt-starters.component.d.ts +65 -0
- package/proposal-card/proposal-card.component.d.ts +101 -0
- package/public-api.d.ts +82 -0
- package/radar-chart/radar-chart.component.d.ts +110 -0
- package/radial-goals/radial-goals.component.d.ts +90 -0
- package/reasoning-trail/reasoning-trail.component.d.ts +73 -0
- package/response-versions/response-versions.component.d.ts +54 -0
- package/rewrite-toolbar/rewrite-toolbar.component.d.ts +92 -0
- package/rich-text-editor/rich-text-editor.component.d.ts +180 -0
- package/run-cost/run-cost.component.d.ts +43 -0
- package/run-queue/run-queue.component.d.ts +93 -0
- package/run-summary/run-summary.component.d.ts +81 -0
- package/scatter-chart/scatter-chart.component.d.ts +139 -0
- package/score-breakdown/score-breakdown.component.d.ts +107 -0
- package/segmented-control/segmented-control.component.d.ts +44 -0
- package/source-stack/source-stack.component.d.ts +60 -0
- package/stat-cards/stat-cards.component.d.ts +86 -0
- package/status-pill/status-pill.component.d.ts +64 -0
- package/steering/steering.component.d.ts +75 -0
- package/step-loader/step-loader.component.d.ts +40 -0
- package/styles.css +424 -0
- package/task-table/task-table.component.d.ts +114 -0
- package/terminal-stream/terminal-stream.component.d.ts +110 -0
- package/thinking/thinking.component.d.ts +63 -0
- package/thinking-states/thinking-states.component.d.ts +51 -0
- package/thread-panel/thread-panel.component.d.ts +75 -0
- package/toast/toast.component.d.ts +56 -0
- package/toast-stack/toast-stack.component.d.ts +72 -0
- package/tokens.css +424 -0
- package/tool-call/tool-call.component.d.ts +61 -0
- package/tooltip/tooltip.component.d.ts +89 -0
- package/top-pages/top-pages.component.d.ts +75 -0
- package/trace-view/trace-view.component.d.ts +95 -0
- package/voice-capture/voice-capture.component.d.ts +103 -0
- package/voice-orb/voice-orb.component.d.ts +78 -0
- package/web-search/web-search.component.d.ts +77 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** One axis of the radar: a score for this run against its baseline. */
|
|
4
|
+
export interface RadarAxis {
|
|
5
|
+
/** Like "Instruction following". */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Shown instead of the label on a narrow card, like "Instructions". */
|
|
8
|
+
short?: string;
|
|
9
|
+
/** This run's score, 0 to 100. */
|
|
10
|
+
value: number;
|
|
11
|
+
/** The baseline's score, 0 to 100. */
|
|
12
|
+
baseline: number;
|
|
13
|
+
}
|
|
14
|
+
/** Per-axis render state (position, side, geometry). */
|
|
15
|
+
interface AxisView {
|
|
16
|
+
axis: RadarAxis;
|
|
17
|
+
index: number;
|
|
18
|
+
/** Text to show now (full label or short on a narrow card). */
|
|
19
|
+
text: string;
|
|
20
|
+
/** Score change against the baseline. */
|
|
21
|
+
delta: number;
|
|
22
|
+
weak: boolean;
|
|
23
|
+
side: 'l' | 'm' | 'r';
|
|
24
|
+
left: number;
|
|
25
|
+
top: number;
|
|
26
|
+
tabIndex: number;
|
|
27
|
+
hot: boolean;
|
|
28
|
+
pulse: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare class RadarChartComponent implements AfterViewInit, OnDestroy {
|
|
31
|
+
/** Five to seven axes, clockwise from the top. */
|
|
32
|
+
axes: RadarAxis[];
|
|
33
|
+
title: string;
|
|
34
|
+
subtitle?: string;
|
|
35
|
+
/** The legend's names for the two series. */
|
|
36
|
+
seriesLabels: [string, string];
|
|
37
|
+
/** A score under this is flagged "Weak". */
|
|
38
|
+
weakBelow: number;
|
|
39
|
+
/** The note under the chart, shown while no axis is pointed at. */
|
|
40
|
+
note?: string;
|
|
41
|
+
/** An axis to call out: its label pulses (by index). */
|
|
42
|
+
pulse?: number;
|
|
43
|
+
className?: string;
|
|
44
|
+
private chRef?;
|
|
45
|
+
private readonly motion;
|
|
46
|
+
private readonly cdr;
|
|
47
|
+
readonly rings: {
|
|
48
|
+
v: number;
|
|
49
|
+
}[];
|
|
50
|
+
W: number;
|
|
51
|
+
H: number;
|
|
52
|
+
private side;
|
|
53
|
+
drawn: number;
|
|
54
|
+
grow: number;
|
|
55
|
+
avg: number;
|
|
56
|
+
on: {
|
|
57
|
+
cur: boolean;
|
|
58
|
+
base: boolean;
|
|
59
|
+
};
|
|
60
|
+
hot: number;
|
|
61
|
+
private focusAt;
|
|
62
|
+
private ro?;
|
|
63
|
+
private timers;
|
|
64
|
+
private rafs;
|
|
65
|
+
private live;
|
|
66
|
+
get N(): number;
|
|
67
|
+
get cx(): number;
|
|
68
|
+
get cy(): number;
|
|
69
|
+
get R(): number;
|
|
70
|
+
private get narrow();
|
|
71
|
+
abs(n: number): number;
|
|
72
|
+
private mean;
|
|
73
|
+
defaultNote(): string;
|
|
74
|
+
private ang;
|
|
75
|
+
pt(i: number, v: number): {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
};
|
|
79
|
+
spoke(i: number): {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
};
|
|
83
|
+
ringPoints(v: number): string;
|
|
84
|
+
private poly;
|
|
85
|
+
basePoints(): string;
|
|
86
|
+
curPoints(): string;
|
|
87
|
+
/** The per-axis label views, positioned outside the rings. */
|
|
88
|
+
get axesView(): AxisView[];
|
|
89
|
+
/** The per-axis views the template iterates. */
|
|
90
|
+
get viewAxes(): AxisView[];
|
|
91
|
+
private labelEls;
|
|
92
|
+
axClass(a: AxisView): string;
|
|
93
|
+
axLabel(a: AxisView): string;
|
|
94
|
+
hotAxis(): RadarAxis | null;
|
|
95
|
+
toggle(s: 'cur' | 'base'): void;
|
|
96
|
+
show(i: number): void;
|
|
97
|
+
enter(e: PointerEvent, i: number): void;
|
|
98
|
+
focus(i: number): void;
|
|
99
|
+
leave(): void;
|
|
100
|
+
focusOut(e: FocusEvent): void;
|
|
101
|
+
keys(e: KeyboardEvent): void;
|
|
102
|
+
ngAfterViewInit(): void;
|
|
103
|
+
private collectLabels;
|
|
104
|
+
private tween;
|
|
105
|
+
private schedule;
|
|
106
|
+
ngOnDestroy(): void;
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadarChartComponent, never>;
|
|
108
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadarChartComponent, "vo-radar-chart", never, { "axes": { "alias": "axes"; "required": true; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "seriesLabels": { "alias": "seriesLabels"; "required": false; }; "weakBelow": { "alias": "weakBelow"; "required": false; }; "note": { "alias": "note"; "required": false; }; "pulse": { "alias": "pulse"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, never, true, never>;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ReducedMotionService } from '../core/reduced-motion.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** One agent's goal: what it did against its own target. */
|
|
5
|
+
export interface RadialGoal {
|
|
6
|
+
key: string;
|
|
7
|
+
/** Like "Support agent". */
|
|
8
|
+
label: string;
|
|
9
|
+
/** What it counts, like "tickets". */
|
|
10
|
+
unit: string;
|
|
11
|
+
value: number;
|
|
12
|
+
target: number;
|
|
13
|
+
/** Defaults to the chart palette in order. */
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
/** One entry in the period switch, like Week and Month. */
|
|
17
|
+
export interface RadialGoalRange {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
21
|
+
/** Per-ring render state (geometry and dash values). */
|
|
22
|
+
interface RingView {
|
|
23
|
+
goal: RadialGoal;
|
|
24
|
+
index: number;
|
|
25
|
+
color: string;
|
|
26
|
+
radius: number;
|
|
27
|
+
share: number;
|
|
28
|
+
lap: boolean;
|
|
29
|
+
flDash: string;
|
|
30
|
+
ovDash: string;
|
|
31
|
+
ovbDash: string;
|
|
32
|
+
ovbOffset: number;
|
|
33
|
+
markerR: number;
|
|
34
|
+
markerCx: number;
|
|
35
|
+
markerCy: number;
|
|
36
|
+
rowPercent: string;
|
|
37
|
+
onTarget: boolean;
|
|
38
|
+
rowValue: string;
|
|
39
|
+
rowLabel: string;
|
|
40
|
+
}
|
|
41
|
+
export declare class RadialGoalsComponent implements AfterViewInit, OnDestroy {
|
|
42
|
+
private readonly reduced;
|
|
43
|
+
private readonly cdr;
|
|
44
|
+
private readonly host;
|
|
45
|
+
/** Two to five goals, outermost first. Three read best: the fewer the rings, the thicker they are. */
|
|
46
|
+
goals: RadialGoal[];
|
|
47
|
+
title: string;
|
|
48
|
+
/** The line under the title. Defaults to "N of M on target". */
|
|
49
|
+
subtitle?: string;
|
|
50
|
+
/** A switch for the period, like Week and Month. Leave out for no switch. */
|
|
51
|
+
ranges?: RadialGoalRange[];
|
|
52
|
+
/** Controlled selected range value. Leave out for uncontrolled (first range). */
|
|
53
|
+
set range(value: string | undefined);
|
|
54
|
+
/** Emitted when the selected range changes. */
|
|
55
|
+
rangeChange: EventEmitter<string>;
|
|
56
|
+
rings: RingView[];
|
|
57
|
+
width: number;
|
|
58
|
+
focus: number;
|
|
59
|
+
current: string;
|
|
60
|
+
midText: string;
|
|
61
|
+
midLabel: string;
|
|
62
|
+
midLabelOut: boolean;
|
|
63
|
+
subText: string;
|
|
64
|
+
subOut: boolean;
|
|
65
|
+
knobLeft: number;
|
|
66
|
+
knobWidth: number;
|
|
67
|
+
private controlled;
|
|
68
|
+
private ready;
|
|
69
|
+
private shown;
|
|
70
|
+
private frames;
|
|
71
|
+
private timers;
|
|
72
|
+
constructor(reduced: ReducedMotionService, cdr: ChangeDetectorRef, host: ElementRef<HTMLElement>);
|
|
73
|
+
ngAfterViewInit(): void;
|
|
74
|
+
selectRange(value: string): void;
|
|
75
|
+
onPointerEnter(index: number, e: PointerEvent): void;
|
|
76
|
+
onPointerLeave(): void;
|
|
77
|
+
onRowPointerLeave(): void;
|
|
78
|
+
setFocus(index: number): void;
|
|
79
|
+
private share;
|
|
80
|
+
private overall;
|
|
81
|
+
private build;
|
|
82
|
+
private centre;
|
|
83
|
+
private swap;
|
|
84
|
+
private placeKnob;
|
|
85
|
+
private later;
|
|
86
|
+
ngOnDestroy(): void;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadialGoalsComponent, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadialGoalsComponent, "vo-radial-goals", never, { "goals": { "alias": "goals"; "required": true; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "ranges": { "alias": "ranges"; "required": false; }; "range": { "alias": "range"; "required": false; }; }, { "rangeChange": "rangeChange"; }, never, never, true, never>;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ReducedMotionService } from '../core/reduced-motion.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** A step in the agent's plan. */
|
|
5
|
+
export interface PlanStep {
|
|
6
|
+
label: string;
|
|
7
|
+
/** Shown under a finished step, like "4 frames". */
|
|
8
|
+
detail?: string;
|
|
9
|
+
state: 'done' | 'now' | 'next';
|
|
10
|
+
}
|
|
11
|
+
/** A changed file, with the removed and added lines. */
|
|
12
|
+
export interface Edit {
|
|
13
|
+
file: string;
|
|
14
|
+
/** Like "2 lines". */
|
|
15
|
+
detail?: string;
|
|
16
|
+
removed?: string[];
|
|
17
|
+
added?: string[];
|
|
18
|
+
}
|
|
19
|
+
/** The kind of a source chip: picks the mark in front of the label. */
|
|
20
|
+
export type SourceKind = 'figma' | 'web' | 'ts' | 'tsx' | 'css' | 'csv' | 'pdf';
|
|
21
|
+
/** A file or link the agent read. */
|
|
22
|
+
export interface Source {
|
|
23
|
+
label: string;
|
|
24
|
+
kind?: SourceKind;
|
|
25
|
+
tip?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Which part of the trail it shows. */
|
|
28
|
+
export type ReasoningTrailView = 'plan' | 'notes' | 'sources' | 'edits';
|
|
29
|
+
export declare class ReasoningTrailComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
30
|
+
private readonly reduced;
|
|
31
|
+
/** Shimmers and counts seconds while true. */
|
|
32
|
+
running: boolean;
|
|
33
|
+
/** Seconds to show. Leave it out to let the trail count while it runs. */
|
|
34
|
+
seconds?: number;
|
|
35
|
+
/** Header text. Defaults to "Reasoning" while running and "Reasoned for Ns" after. */
|
|
36
|
+
title?: string;
|
|
37
|
+
plan?: PlanStep[];
|
|
38
|
+
notes?: string[];
|
|
39
|
+
sources?: Source[];
|
|
40
|
+
edits?: Edit[];
|
|
41
|
+
/** Which part of the trail it shows. Leave it out to start on the first one there is. */
|
|
42
|
+
view?: ReasoningTrailView;
|
|
43
|
+
/** Whether the trail is open. Defaults to open. */
|
|
44
|
+
open?: boolean;
|
|
45
|
+
/** Sits flat in a chat thread (the default). Set false to give it a card. */
|
|
46
|
+
bare: boolean;
|
|
47
|
+
viewChange: EventEmitter<ReasoningTrailView>;
|
|
48
|
+
openChange: EventEmitter<boolean>;
|
|
49
|
+
/** Internal open state when `open` is not controlled. */
|
|
50
|
+
private innerOpen;
|
|
51
|
+
/** Internal view when `view` is not controlled. */
|
|
52
|
+
private innerView?;
|
|
53
|
+
/** Counted seconds while running (used when `seconds` is undefined). */
|
|
54
|
+
private counted;
|
|
55
|
+
private tick?;
|
|
56
|
+
constructor(reduced: ReducedMotionService);
|
|
57
|
+
get isOpen(): boolean;
|
|
58
|
+
private get has();
|
|
59
|
+
get tab(): ReasoningTrailView;
|
|
60
|
+
get secs(): number;
|
|
61
|
+
get head(): string;
|
|
62
|
+
ftClass(kind: SourceKind): string;
|
|
63
|
+
/** Select a view. Updates the internal state when `view` is not controlled. */
|
|
64
|
+
select(v: ReasoningTrailView): void;
|
|
65
|
+
toggle(): void;
|
|
66
|
+
onHeadKey(e: KeyboardEvent): void;
|
|
67
|
+
ngAfterViewInit(): void;
|
|
68
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
69
|
+
private startCounter;
|
|
70
|
+
ngOnDestroy(): void;
|
|
71
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReasoningTrailComponent, never>;
|
|
72
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReasoningTrailComponent, "vo-reasoning-trail", never, { "running": { "alias": "running"; "required": false; }; "seconds": { "alias": "seconds"; "required": false; }; "title": { "alias": "title"; "required": false; }; "plan": { "alias": "plan"; "required": false; }; "notes": { "alias": "notes"; "required": false; }; "sources": { "alias": "sources"; "required": false; }; "edits": { "alias": "edits"; "required": false; }; "view": { "alias": "view"; "required": false; }; "open": { "alias": "open"; "required": false; }; "bare": { "alias": "bare"; "required": false; }; }, { "viewChange": "viewChange"; "openChange": "openChange"; }, never, never, true, never>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ReducedMotionService } from '../core/reduced-motion.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ResponseVersionsComponent implements OnChanges, OnDestroy {
|
|
5
|
+
private readonly reduced;
|
|
6
|
+
/** The person's message the answer replies to, shown as a bubble above it. */
|
|
7
|
+
prompt?: string;
|
|
8
|
+
/** Every version of the answer so far, oldest first. */
|
|
9
|
+
versions: string[];
|
|
10
|
+
/** Which version is showing. Leave it out to let the arrows page through them. */
|
|
11
|
+
version?: number;
|
|
12
|
+
defaultVersion: number;
|
|
13
|
+
/** The version showing is still being written. New words fade in as they arrive and paging waits. */
|
|
14
|
+
streaming: boolean;
|
|
15
|
+
/** Quiet text beside the buttons, like "Writing a new version". It shimmers while streaming. */
|
|
16
|
+
status: string;
|
|
17
|
+
/** Sits flat in a chat thread (the default). Set false to give it a card of its own. */
|
|
18
|
+
bare: boolean;
|
|
19
|
+
className: string;
|
|
20
|
+
/** Whether a regenerate button is shown (set when a listener is attached). */
|
|
21
|
+
regenerateEnabled: boolean;
|
|
22
|
+
versionChange: EventEmitter<number>;
|
|
23
|
+
/** Called by the regenerate button. Add a version and show it to answer it. */
|
|
24
|
+
regenerateClick: EventEmitter<void>;
|
|
25
|
+
/** Called with the text after it is copied to the clipboard. */
|
|
26
|
+
copyText: EventEmitter<string>;
|
|
27
|
+
private cur;
|
|
28
|
+
/** The version whose words are rendered now (lags `at` while the old text fades). */
|
|
29
|
+
shown: number;
|
|
30
|
+
out: boolean;
|
|
31
|
+
jump: boolean;
|
|
32
|
+
spin: boolean;
|
|
33
|
+
copied: boolean;
|
|
34
|
+
private controlled;
|
|
35
|
+
private outTimer?;
|
|
36
|
+
private spinTimer?;
|
|
37
|
+
private copyTimer?;
|
|
38
|
+
constructor(reduced: ReducedMotionService);
|
|
39
|
+
get regenerateOn(): boolean;
|
|
40
|
+
get last(): number;
|
|
41
|
+
get count(): number;
|
|
42
|
+
/** The clamped index actually on show. */
|
|
43
|
+
get at(): number;
|
|
44
|
+
get words(): string[];
|
|
45
|
+
cls(): string;
|
|
46
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
47
|
+
private transition;
|
|
48
|
+
go(i: number): void;
|
|
49
|
+
regenerate(): void;
|
|
50
|
+
copy(): void;
|
|
51
|
+
ngOnDestroy(): void;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResponseVersionsComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResponseVersionsComponent, "vo-response-versions", never, { "prompt": { "alias": "prompt"; "required": false; }; "versions": { "alias": "versions"; "required": false; }; "version": { "alias": "version"; "required": false; }; "defaultVersion": { "alias": "defaultVersion"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "status": { "alias": "status"; "required": false; }; "bare": { "alias": "bare"; "required": false; }; "className": { "alias": "className"; "required": false; }; "regenerateEnabled": { "alias": "regenerateEnabled"; "required": false; }; }, { "versionChange": "versionChange"; "regenerateClick": "regenerateClick"; "copyText": "copyText"; }, never, never, true, never>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { type VoIconName } from '../core/icon.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** A button in the toolbar, like Clearer or Shorter. */
|
|
5
|
+
export interface RewriteAction {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: VoIconName;
|
|
9
|
+
}
|
|
10
|
+
/** The phase the toolbar shows: the menu of rewrites, the working label, or the review controls. */
|
|
11
|
+
type View = 'menu' | 'working' | 'review';
|
|
12
|
+
export declare class RewriteToolbarComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
13
|
+
/** The document's name. */
|
|
14
|
+
title: string;
|
|
15
|
+
/** The file type tag in front of the name. Defaults to DOC. */
|
|
16
|
+
kind: string;
|
|
17
|
+
/** The text, one sentence each, so a click picks a sentence. */
|
|
18
|
+
sentences: string[];
|
|
19
|
+
/** Index of the sentence with the toolbar on it, or null. */
|
|
20
|
+
selected: number | null;
|
|
21
|
+
/** Defaults to Clearer, Shorter and Friendlier. */
|
|
22
|
+
actions: RewriteAction[];
|
|
23
|
+
/**
|
|
24
|
+
* Writes the new sentence. While it works the toolbar says Rewriting; the answer is then
|
|
25
|
+
* written in word by word. Return a Promise or a string; if it rejects, the sentence is left
|
|
26
|
+
* as it was. Leave it out to echo the old sentence.
|
|
27
|
+
*/
|
|
28
|
+
onRewrite?: (sentence: string, action: string, index: number) => Promise<string> | string;
|
|
29
|
+
/** The tip on the wand. */
|
|
30
|
+
askLabel: string;
|
|
31
|
+
/** The shortcut shown in that tip. */
|
|
32
|
+
askShortcut: string;
|
|
33
|
+
/** Emitted with every sentence once a rewrite is accepted. */
|
|
34
|
+
sentencesChange: EventEmitter<string[]>;
|
|
35
|
+
/** Emitted when the selected sentence changes (a click, a dismiss or after a finish). */
|
|
36
|
+
selectedChange: EventEmitter<number | null>;
|
|
37
|
+
/** Emitted by the wand when no onRewrite-free ask is wanted; falls back to the first action. */
|
|
38
|
+
ask$: EventEmitter<{
|
|
39
|
+
sentence: string;
|
|
40
|
+
index: number;
|
|
41
|
+
}>;
|
|
42
|
+
root: ElementRef<HTMLDivElement>;
|
|
43
|
+
head: ElementRef<HTMLDivElement>;
|
|
44
|
+
bar: ElementRef<HTMLDivElement>;
|
|
45
|
+
private readonly motion;
|
|
46
|
+
/** The working copy of the sentences. */
|
|
47
|
+
text: string[];
|
|
48
|
+
/** The selected sentence's index, or null. */
|
|
49
|
+
sel: number | null;
|
|
50
|
+
/** The rewrite in flight: its index, the old text, the streamed words and how many are shown. */
|
|
51
|
+
job: {
|
|
52
|
+
index: number;
|
|
53
|
+
old: string;
|
|
54
|
+
words: string[];
|
|
55
|
+
shown: number;
|
|
56
|
+
} | null;
|
|
57
|
+
status: string;
|
|
58
|
+
shownStatus: string;
|
|
59
|
+
statusOut: boolean;
|
|
60
|
+
at: {
|
|
61
|
+
left: number;
|
|
62
|
+
top: number;
|
|
63
|
+
};
|
|
64
|
+
private ready;
|
|
65
|
+
private timers;
|
|
66
|
+
private readonly onDown;
|
|
67
|
+
get busy(): boolean;
|
|
68
|
+
get view(): View;
|
|
69
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
70
|
+
ngAfterViewInit(): void;
|
|
71
|
+
/** Picks a sentence as a click on it does. */
|
|
72
|
+
pick(i: number, e?: Event): void;
|
|
73
|
+
private select;
|
|
74
|
+
/** Rewrites the selected sentence with one of the actions, as a click on that action does. */
|
|
75
|
+
rewrite(action: string): Promise<void>;
|
|
76
|
+
/** The wand: asks the agent, or rewrites with the first action when nobody listens. */
|
|
77
|
+
ask(): void;
|
|
78
|
+
/** Keeps (accept) or drops (undo) the rewrite that is waiting for review. */
|
|
79
|
+
finish(keep: boolean): void;
|
|
80
|
+
/** Keeps the rewrite that is waiting for review (ref-handle equivalent). */
|
|
81
|
+
accept(): void;
|
|
82
|
+
/** Puts the sentence back as it was (ref-handle equivalent). */
|
|
83
|
+
undo(): void;
|
|
84
|
+
private stream;
|
|
85
|
+
private setStatus;
|
|
86
|
+
private schedulePlace;
|
|
87
|
+
private place;
|
|
88
|
+
ngOnDestroy(): void;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RewriteToolbarComponent, never>;
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RewriteToolbarComponent, "vo-rewrite-toolbar", never, { "title": { "alias": "title"; "required": false; }; "kind": { "alias": "kind"; "required": false; }; "sentences": { "alias": "sentences"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "onRewrite": { "alias": "onRewrite"; "required": false; }; "askLabel": { "alias": "askLabel"; "required": false; }; "askShortcut": { "alias": "askShortcut"; "required": false; }; }, { "sentencesChange": "sentencesChange"; "selectedChange": "selectedChange"; "ask$": "ask$"; }, never, never, true, never>;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { type VoIconName } from '../core/icon.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** A formatting command, as the toolbar and the shortcuts apply it. `p` turns lines back into plain paragraphs */
|
|
5
|
+
export type RichTextFormat = 'h2' | 'b' | 'i' | 'code' | 'ul' | 'ol' | 'quote' | 'p';
|
|
6
|
+
/** An item in the AI menu */
|
|
7
|
+
export interface RichTextAiAction {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon?: VoIconName;
|
|
11
|
+
/** `swap` (the default) replaces the selection or the caret's paragraph; `add` writes on after it */
|
|
12
|
+
kind?: 'swap' | 'add';
|
|
13
|
+
}
|
|
14
|
+
/** What the AI is asked to do. `text` is what it acts on (empty for an `add`), `before`/`after` the text around it */
|
|
15
|
+
export interface RichTextAiRequest {
|
|
16
|
+
action: string;
|
|
17
|
+
text: string;
|
|
18
|
+
before: string;
|
|
19
|
+
after: string;
|
|
20
|
+
document: string;
|
|
21
|
+
signal: AbortSignal;
|
|
22
|
+
}
|
|
23
|
+
/** Writes a suggestion: a string, a promise of one, or an async iterable of chunks to stream it in */
|
|
24
|
+
export type RichTextAi = (request: RichTextAiRequest) => AsyncIterable<string> | Promise<string> | string;
|
|
25
|
+
/** The result reported when a suggestion is accepted or discarded */
|
|
26
|
+
export interface RichTextSuggestionResult {
|
|
27
|
+
action: string;
|
|
28
|
+
text: string;
|
|
29
|
+
accepted: boolean;
|
|
30
|
+
}
|
|
31
|
+
type Range2 = {
|
|
32
|
+
s: number;
|
|
33
|
+
e: number;
|
|
34
|
+
};
|
|
35
|
+
/** The demo's stand-in for a model: canned rewrites for the preview's draft about a pricing launch, and simple rules for anything else */
|
|
36
|
+
export declare function demoWrite(action: string, text: string, doc: string): string;
|
|
37
|
+
/** The default `ai`: demoWrite's answer, streamed a word at a time after a short pause, as a model would */
|
|
38
|
+
export declare const demoAi: RichTextAi;
|
|
39
|
+
type Job = {
|
|
40
|
+
o: Range2;
|
|
41
|
+
t: Range2;
|
|
42
|
+
slash: number | null;
|
|
43
|
+
sel: boolean;
|
|
44
|
+
btn?: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** A minimal editor for a draft an agent helps with. Select text and press Ask AI (or Mod+J, or type / on a new line), and a
|
|
47
|
+
suggestion streams in beside the text, the old words struck through, to accept with Tab/Enter or discard with Escape. */
|
|
48
|
+
export declare class RichTextEditorComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
49
|
+
/** The text as HTML: paragraphs, one heading level (`h2`), lists, quotes and inside them bold/italic/code/links. */
|
|
50
|
+
value?: string;
|
|
51
|
+
defaultValue: string;
|
|
52
|
+
placeholder: string;
|
|
53
|
+
label: string;
|
|
54
|
+
hint: string | null;
|
|
55
|
+
/** Writes the AI's suggestions. Defaults to the demo writer; pass your model call, or false to hide the AI */
|
|
56
|
+
ai: RichTextAi | false;
|
|
57
|
+
/** The AI menu. Defaults to Improve writing, Make shorter, Fix grammar and Continue writing */
|
|
58
|
+
aiActions: RichTextAiAction[];
|
|
59
|
+
/** Called with the HTML after each change the person makes */
|
|
60
|
+
valueChange: EventEmitter<string>;
|
|
61
|
+
/** Called when a suggestion is accepted or discarded */
|
|
62
|
+
suggestion: EventEmitter<RichTextSuggestionResult>;
|
|
63
|
+
private rootRef;
|
|
64
|
+
private tbRef;
|
|
65
|
+
private bodyRef;
|
|
66
|
+
private askRef?;
|
|
67
|
+
private menuRef?;
|
|
68
|
+
private lnkRef;
|
|
69
|
+
private urlRef;
|
|
70
|
+
private readonly motion;
|
|
71
|
+
private eng;
|
|
72
|
+
private emitted;
|
|
73
|
+
private quiet;
|
|
74
|
+
private picked;
|
|
75
|
+
private runToken;
|
|
76
|
+
private down?;
|
|
77
|
+
private resize?;
|
|
78
|
+
readonly uid: string;
|
|
79
|
+
mac: boolean;
|
|
80
|
+
tools: {
|
|
81
|
+
on: boolean;
|
|
82
|
+
kbd: string;
|
|
83
|
+
f: RichTextFormat | "a";
|
|
84
|
+
label: string;
|
|
85
|
+
icon: VoIconName;
|
|
86
|
+
k: string;
|
|
87
|
+
}[];
|
|
88
|
+
items: {
|
|
89
|
+
off: boolean;
|
|
90
|
+
key: string;
|
|
91
|
+
label: string;
|
|
92
|
+
icon?: VoIconName;
|
|
93
|
+
/** `swap` (the default) replaces the selection or the caret's paragraph; `add` writes on after it */
|
|
94
|
+
kind?: "swap" | "add";
|
|
95
|
+
}[];
|
|
96
|
+
focusTb: number;
|
|
97
|
+
words: number;
|
|
98
|
+
empty: boolean;
|
|
99
|
+
canUndo: boolean;
|
|
100
|
+
canRedo: boolean;
|
|
101
|
+
hasHref: boolean;
|
|
102
|
+
job: Job | null;
|
|
103
|
+
lk: {
|
|
104
|
+
o: Range2;
|
|
105
|
+
btn?: boolean;
|
|
106
|
+
} | null;
|
|
107
|
+
url: string;
|
|
108
|
+
bad: boolean;
|
|
109
|
+
bubble: boolean;
|
|
110
|
+
review: {
|
|
111
|
+
action: string;
|
|
112
|
+
ready: boolean;
|
|
113
|
+
} | null;
|
|
114
|
+
say: string;
|
|
115
|
+
aiKbd: string;
|
|
116
|
+
undoKbd: string;
|
|
117
|
+
redoKbd: string;
|
|
118
|
+
private get bodyEl();
|
|
119
|
+
get menuHeading(): string;
|
|
120
|
+
get reviewLabel(): string;
|
|
121
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
122
|
+
ngAfterViewInit(): void;
|
|
123
|
+
ngOnDestroy(): void;
|
|
124
|
+
private reduce;
|
|
125
|
+
private announce;
|
|
126
|
+
private paint;
|
|
127
|
+
private load;
|
|
128
|
+
private rectsOf;
|
|
129
|
+
private place;
|
|
130
|
+
private pick;
|
|
131
|
+
private showBubble;
|
|
132
|
+
keepFocus(e: MouseEvent): void;
|
|
133
|
+
private tbButtons;
|
|
134
|
+
tbKey(e: KeyboardEvent): void;
|
|
135
|
+
private tbButtonIndex;
|
|
136
|
+
apply(f: RichTextFormat | 'a', e: MouseEvent): void;
|
|
137
|
+
doUndo(e: MouseEvent): void;
|
|
138
|
+
doRedo(e: MouseEvent): void;
|
|
139
|
+
onAiButton(e: MouseEvent): void;
|
|
140
|
+
onAskButton(e: MouseEvent): void;
|
|
141
|
+
private menuItemEls;
|
|
142
|
+
private focusItem;
|
|
143
|
+
openMenu(how: 'key' | 'button' | 'click' | 'slash' | 'script'): void;
|
|
144
|
+
closeMenu(back: boolean): void;
|
|
145
|
+
menuKey(e: KeyboardEvent): void;
|
|
146
|
+
onMenuItem(a: {
|
|
147
|
+
key: string;
|
|
148
|
+
off: boolean;
|
|
149
|
+
}, e: MouseEvent): void;
|
|
150
|
+
private here;
|
|
151
|
+
ask(key: string, mine: boolean): void;
|
|
152
|
+
finish(keep: boolean, mine: boolean): void;
|
|
153
|
+
openLink(mine: boolean, btn?: boolean): void;
|
|
154
|
+
closeLink(back: boolean): void;
|
|
155
|
+
private toUrl;
|
|
156
|
+
applyLink(href: string | null): void;
|
|
157
|
+
onUrlInput(e: Event): void;
|
|
158
|
+
lnkKey(e: KeyboardEvent): void;
|
|
159
|
+
lnkBlur(e: FocusEvent): void;
|
|
160
|
+
private engineKey;
|
|
161
|
+
onRootKey(e: KeyboardEvent): void;
|
|
162
|
+
onRootPointerDown(e: PointerEvent): void;
|
|
163
|
+
focus(): void;
|
|
164
|
+
getHTML(): string;
|
|
165
|
+
getText(): string;
|
|
166
|
+
setHTML(html: string): void;
|
|
167
|
+
select(s: string): boolean;
|
|
168
|
+
typeText(s: string): void;
|
|
169
|
+
newLine(): void;
|
|
170
|
+
format(f: RichTextFormat): void;
|
|
171
|
+
openAi(): void;
|
|
172
|
+
askAi(a: string): void;
|
|
173
|
+
accept(): void;
|
|
174
|
+
discard(): void;
|
|
175
|
+
undo(): void;
|
|
176
|
+
redo(): void;
|
|
177
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RichTextEditorComponent, never>;
|
|
178
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RichTextEditorComponent, "vo-rich-text-editor", never, { "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "ai": { "alias": "ai"; "required": false; }; "aiActions": { "alias": "aiActions"; "required": false; }; }, { "valueChange": "valueChange"; "suggestion": "suggestion"; }, never, never, true, never>;
|
|
179
|
+
}
|
|
180
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type RunCostStatus = 'idle' | 'running' | 'stopped' | 'paused' | 'spent';
|
|
4
|
+
/** One line in the breakdown under the bar, like "Input tokens". */
|
|
5
|
+
export interface RunCostRow {
|
|
6
|
+
label: string;
|
|
7
|
+
value: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class RunCostComponent {
|
|
10
|
+
/** Credits used so far. */
|
|
11
|
+
used: number;
|
|
12
|
+
/** The whole budget, like 2000. */
|
|
13
|
+
budget: number;
|
|
14
|
+
/** Where the agent pauses, as a percentage of the budget. Defaults to 90. */
|
|
15
|
+
capAt: number;
|
|
16
|
+
/** Whether the agent pauses at the cap. Defaults to on. */
|
|
17
|
+
capOn?: boolean;
|
|
18
|
+
/** running is blue, paused (at the cap) amber, spent (the whole budget) red. */
|
|
19
|
+
status: RunCostStatus;
|
|
20
|
+
/** Words in the status tag. Defaults to Idle, Running, Stopped, "Paused at N%" or "Budget used". */
|
|
21
|
+
statusLabel?: string;
|
|
22
|
+
/** The breakdown under the bar. */
|
|
23
|
+
rows?: RunCostRow[];
|
|
24
|
+
/** Words on the button. Defaults by status. */
|
|
25
|
+
actionLabel?: string;
|
|
26
|
+
title: string;
|
|
27
|
+
/** Sits flat in a chat thread (the default). Set false to give it a card. */
|
|
28
|
+
bare: boolean;
|
|
29
|
+
action: EventEmitter<void>;
|
|
30
|
+
capChange: EventEmitter<boolean>;
|
|
31
|
+
private innerCap;
|
|
32
|
+
get cap(): boolean;
|
|
33
|
+
fmt(n: number): string;
|
|
34
|
+
get roundedUsed(): number;
|
|
35
|
+
get fillPct(): number;
|
|
36
|
+
get fillColor(): string;
|
|
37
|
+
get toneClass(): string;
|
|
38
|
+
get label(): string;
|
|
39
|
+
get actionWords(): string;
|
|
40
|
+
onCapToggle(e: Event): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RunCostComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RunCostComponent, "vo-run-cost", never, { "used": { "alias": "used"; "required": false; }; "budget": { "alias": "budget"; "required": false; }; "capAt": { "alias": "capAt"; "required": false; }; "capOn": { "alias": "capOn"; "required": false; }; "status": { "alias": "status"; "required": false; }; "statusLabel": { "alias": "statusLabel"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "actionLabel": { "alias": "actionLabel"; "required": false; }; "title": { "alias": "title"; "required": false; }; "bare": { "alias": "bare"; "required": false; }; }, { "action": "action"; "capChange": "capChange"; }, never, never, true, never>;
|
|
43
|
+
}
|