@genesislcap/ai-assistant 15.27.1 → 15.28.1-FUI-0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +2 -2
- package/dist/ai-assistant.d.ts +2 -2
- package/dist/custom-elements.json +17 -2
- package/dist/dts/components/chat-bubble/chat-bubble.template.d.ts.map +1 -1
- package/dist/dts/components/halo-overlay.d.ts +10 -0
- package/dist/dts/components/halo-overlay.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/state/ai-assistant-slice.d.ts +5 -1
- package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-persistence-provider.d.ts +1 -1
- package/dist/dts/state/session-store.d.ts.map +1 -1
- package/dist/dts/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/dts/utils/resolve-preference-baseline.d.ts.map +1 -1
- package/dist/esm/components/chat-bubble/chat-bubble.template.js +5 -3
- package/dist/esm/components/halo-overlay.js +43 -7
- package/dist/esm/components/settings-modal/settings-modal.template.js +21 -1
- package/dist/esm/main/main.js +1 -1
- package/dist/esm/main/main.styles.js +1 -1
- package/dist/esm/main/main.template.js +24 -8
- package/dist/esm/state/ai-assistant-slice.js +2 -1
- package/dist/esm/suggestions/chat-suggestions.js +4 -3
- package/dist/esm/utils/resolve-preference-baseline.js +6 -2
- package/package.json +16 -16
- package/sandbox/README.md +3 -3
- package/sandbox/sandbox.ts +1 -1
|
@@ -15147,7 +15147,7 @@
|
|
|
15147
15147
|
{
|
|
15148
15148
|
"kind": "Property",
|
|
15149
15149
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#timestampDisplay:member",
|
|
15150
|
-
"docComment": "/**\n * When each message shows its timestamp — `'off'`, `'hover'`
|
|
15150
|
+
"docComment": "/**\n * When each message shows its timestamp — `'off'`, `'hover'` or `'always'` (default).\n *\n * Falls back to `DEFAULT_TIMESTAMP_DISPLAY` rather than `'off'` when there is no store yet: this preference defaults ON, so the pre-store render must match the state the baseline is about to resolve to, or timestamps would visibly pop in on connect.\n */\n",
|
|
15151
15151
|
"excerptTokens": [
|
|
15152
15152
|
{
|
|
15153
15153
|
"kind": "Content",
|
|
@@ -19824,7 +19824,7 @@
|
|
|
19824
19824
|
{
|
|
19825
19825
|
"kind": "PropertySignature",
|
|
19826
19826
|
"canonicalReference": "@genesislcap/ai-assistant!SessionPreferences#timestampDisplay:member",
|
|
19827
|
-
"docComment": "/**\n * When message timestamps are shown (`TimestampDisplay` values, as plain strings). Absent keeps the `chatConfig.ui.showTimestamps` default, which is `'
|
|
19827
|
+
"docComment": "/**\n * When message timestamps are shown (`TimestampDisplay` values, as plain strings). Absent keeps the `chatConfig.ui.showTimestamps` default, which is `'always'`.\n */\n",
|
|
19828
19828
|
"excerptTokens": [
|
|
19829
19829
|
{
|
|
19830
19830
|
"kind": "Content",
|
package/dist/ai-assistant.d.ts
CHANGED
|
@@ -3145,7 +3145,7 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
3145
3145
|
get showAgentSwitchIndicator(): boolean;
|
|
3146
3146
|
set showAgentSwitchIndicator(value: boolean);
|
|
3147
3147
|
/**
|
|
3148
|
-
* When each message shows its timestamp — `'off'`, `'hover'`
|
|
3148
|
+
* When each message shows its timestamp — `'off'`, `'hover'` or `'always'` (default).
|
|
3149
3149
|
*
|
|
3150
3150
|
* Falls back to `DEFAULT_TIMESTAMP_DISPLAY` rather than `'off'` when there is no
|
|
3151
3151
|
* store yet: this preference defaults ON, so the pre-store render must match the state
|
|
@@ -5359,7 +5359,7 @@ export declare interface SessionPreferences {
|
|
|
5359
5359
|
showAgentSwitchIndicator?: boolean;
|
|
5360
5360
|
/**
|
|
5361
5361
|
* When message timestamps are shown (`TimestampDisplay` values, as plain strings).
|
|
5362
|
-
* Absent keeps the `chatConfig.ui.showTimestamps` default, which is `'
|
|
5362
|
+
* Absent keeps the `chatConfig.ui.showTimestamps` default, which is `'always'`.
|
|
5363
5363
|
*/
|
|
5364
5364
|
timestampDisplay?: string;
|
|
5365
5365
|
/** Enabled loading-animation ids (`AiAssistantAnimation` values, as plain strings). */
|
|
@@ -1209,6 +1209,21 @@
|
|
|
1209
1209
|
},
|
|
1210
1210
|
"privacy": "private"
|
|
1211
1211
|
},
|
|
1212
|
+
{
|
|
1213
|
+
"kind": "method",
|
|
1214
|
+
"name": "activeChanged",
|
|
1215
|
+
"description": "Start/stop with `active`, so an idle overlay costs nothing.\n\nGuarded on `isConnected` because FAST invokes attribute-changed callbacks during\ninitialisation, before the element is in the document — `connectedCallback` is what decides\nfor an element that mounts already-active."
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"kind": "method",
|
|
1219
|
+
"name": "startAnimation",
|
|
1220
|
+
"privacy": "private"
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"kind": "method",
|
|
1224
|
+
"name": "stopAnimation",
|
|
1225
|
+
"privacy": "private"
|
|
1226
|
+
},
|
|
1212
1227
|
{
|
|
1213
1228
|
"kind": "method",
|
|
1214
1229
|
"name": "tick",
|
|
@@ -2252,7 +2267,7 @@
|
|
|
2252
2267
|
"type": {
|
|
2253
2268
|
"text": "TimestampDisplay"
|
|
2254
2269
|
},
|
|
2255
|
-
"description": "When each message shows its timestamp — `'off'`, `'hover'`
|
|
2270
|
+
"description": "When each message shows its timestamp — `'off'`, `'hover'` or `'always'` (default).\n\nFalls back to `DEFAULT_TIMESTAMP_DISPLAY` rather than `'off'` when there is no\nstore yet: this preference defaults ON, so the pre-store render must match the state\nthe baseline is about to resolve to, or timestamps would visibly pop in on connect."
|
|
2256
2271
|
},
|
|
2257
2272
|
{
|
|
2258
2273
|
"kind": "field",
|
|
@@ -7577,7 +7592,7 @@
|
|
|
7577
7592
|
"type": {
|
|
7578
7593
|
"text": "TimestampDisplay"
|
|
7579
7594
|
},
|
|
7580
|
-
"default": "'
|
|
7595
|
+
"default": "'always'",
|
|
7581
7596
|
"description": "The mode used when neither the host config nor stored prefs name a valid one."
|
|
7582
7597
|
}
|
|
7583
7598
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bubble.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"chat-bubble.template.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-bubble/chat-bubble.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgBlD,eAAO,MAAM,oBAAoB,QAAO,YAAY,CAAC,YAAY,CAmDhE,CAAC"}
|
|
@@ -31,8 +31,18 @@ export declare class AiHaloOverlay extends GenesisElement {
|
|
|
31
31
|
private angle;
|
|
32
32
|
private lastTime?;
|
|
33
33
|
private animFrame?;
|
|
34
|
+
/**
|
|
35
|
+
* Start/stop with `active`, so an idle overlay costs nothing.
|
|
36
|
+
*
|
|
37
|
+
* Guarded on `isConnected` because FAST invokes attribute-changed callbacks during
|
|
38
|
+
* initialisation, before the element is in the document — `connectedCallback` is what decides
|
|
39
|
+
* for an element that mounts already-active.
|
|
40
|
+
*/
|
|
41
|
+
activeChanged(): void;
|
|
34
42
|
connectedCallback(): void;
|
|
35
43
|
disconnectedCallback(): void;
|
|
44
|
+
private startAnimation;
|
|
45
|
+
private stopAnimation;
|
|
36
46
|
private tick;
|
|
37
47
|
}
|
|
38
48
|
//# sourceMappingURL=halo-overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo-overlay.d.ts","sourceRoot":"","sources":["../../../src/components/halo-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAQ,MAAM,uBAAuB,CAAC;AAwBvF;;;;;;;;;;;;GAYG;AACH,qBA0Ea,aAAc,SAAQ,cAAc;IACpB,MAAM,EAAE,OAAO,CAAS;IACnD,+FAA+F;IACpC,KAAK,EAAE,MAAM,CAAsB;IAC9F,qDAAqD;IAC/C,SAAS,EAAE,IAAI,GAAG,KAAK,CAAQ;IACrC,0CAA0C;IAE1C,UAAU,EAAE,MAAM,CAA4B;IAC9C,+CAA+C;IAE/C,WAAW,EAAE,MAAM,CAA6B;IAChD,2GAA2G;IAE3G,UAAU,EAAE,MAAM,CAA4B;IAE9C,iBAAiB;IAIjB,kBAAkB;IAIlB,iBAAiB;
|
|
1
|
+
{"version":3,"file":"halo-overlay.d.ts","sourceRoot":"","sources":["../../../src/components/halo-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAQ,MAAM,uBAAuB,CAAC;AAwBvF;;;;;;;;;;;;GAYG;AACH,qBA0Ea,aAAc,SAAQ,cAAc;IACpB,MAAM,EAAE,OAAO,CAAS;IACnD,+FAA+F;IACpC,KAAK,EAAE,MAAM,CAAsB;IAC9F,qDAAqD;IAC/C,SAAS,EAAE,IAAI,GAAG,KAAK,CAAQ;IACrC,0CAA0C;IAE1C,UAAU,EAAE,MAAM,CAA4B;IAC9C,+CAA+C;IAE/C,WAAW,EAAE,MAAM,CAA6B;IAChD,2GAA2G;IAE3G,UAAU,EAAE,MAAM,CAA4B;IAE9C,iBAAiB;IAIjB,kBAAkB;IAIlB,iBAAiB;IAkBjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAO;IAEhD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAS;IAE3B;;;;;;OAMG;IACH,aAAa;IAMb,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,IAAI;CAiBb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-modal.template.d.ts","sourceRoot":"","sources":["../../../../src/components/settings-modal/settings-modal.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAoF7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,GACtC,qBAAqB,MAAM,EAC3B,kBAAkB,MAAM,KACvB,YAAY,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"settings-modal.template.d.ts","sourceRoot":"","sources":["../../../../src/components/settings-modal/settings-modal.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAoF7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,GACtC,qBAAqB,MAAM,EAC3B,kBAAkB,MAAM,KACvB,YAAY,CAAC,qBAAqB,CAuCpC,CAAC;AAoDF;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,CAAC;AAsJnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,2BAA2B,GACtC,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,YAAY,CAAC,qBAAqB,CAUpC,CAAC;AAobF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAiNpC,CAAC"}
|
package/dist/dts/main/main.d.ts
CHANGED
|
@@ -298,7 +298,7 @@ export declare class FoundationAiAssistant extends GenesisElement {
|
|
|
298
298
|
get showAgentSwitchIndicator(): boolean;
|
|
299
299
|
set showAgentSwitchIndicator(value: boolean);
|
|
300
300
|
/**
|
|
301
|
-
* When each message shows its timestamp — `'off'`, `'hover'`
|
|
301
|
+
* When each message shows its timestamp — `'off'`, `'hover'` or `'always'` (default).
|
|
302
302
|
*
|
|
303
303
|
* Falls back to `DEFAULT_TIMESTAMP_DISPLAY` rather than `'off'` when there is no
|
|
304
304
|
* store yet: this preference defaults ON, so the pre-store render must match the state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQ1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAuC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQ1F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAsIpD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB,kDAWpC,CAAC;AAoJF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAAI,GAAG,qBAAqB,KAAG,MAYlD,CAAC;AAEf;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,qBAAqB,KAAG,MAAM,GAAG,IACpB,CAAC;AAyJrD,eAAO,MAAM,6BAA6B,GACxC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CA8qBpC,CAAC"}
|
|
@@ -47,7 +47,11 @@ export interface AiAssistantSessionState {
|
|
|
47
47
|
showAgentSwitchIndicator: boolean;
|
|
48
48
|
/**
|
|
49
49
|
* When each message shows its timestamp. Unlike the `show*` booleans beside it this
|
|
50
|
-
* defaults ON
|
|
50
|
+
* defaults ON, so an absent stored preference must not read as "off".
|
|
51
|
+
*
|
|
52
|
+
* Shares `DEFAULT_TIMESTAMP_DISPLAY` with the preference resolver rather than
|
|
53
|
+
* repeating the literal: this is what stands before the baseline applies, so if the two
|
|
54
|
+
* drifted the transcript would render one mode and then flick to the other on load.
|
|
51
55
|
*/
|
|
52
56
|
timestampDisplay: TimestampDisplay;
|
|
53
57
|
enabledAnimations: AiAssistantAnimation[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-assistant-slice.d.ts","sourceRoot":"","sources":["../../../src/state/ai-assistant-slice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC7B,cAAc,EACd,4BAA4B,EAC5B,WAAW,EACX,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-assistant-slice.d.ts","sourceRoot":"","sources":["../../../src/state/ai-assistant-slice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC7B,cAAc,EACd,4BAA4B,EA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;;;;;;;;;;;;;;;;;;OAwBG;sFACuB,aAAa,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAWrF;;;;;;;;OAQG;4FAC6B,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;IAG5D;;;;;;;;;OASG;4FAGO,aAAa,CAAC;QACpB,MAAM,EAAE,cAAc,CAAC;QACvB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB;;;;;;WAMG;QACH,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IA2BJ;;;;;;;;;;;;OAYG;2FAGO,aAAa,CAAC;QAAE,MAAM,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAA;KAAE,CAAC;yFAoB3D,aAAa,CAAC,MAAM,CAAC;gGAGd,aAAa,CAAC,WAAW,EAAE,CAAC;+FAG7B,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;4FAG/B,aAAa,CAAC,aAAa,CAAC;+FAGzB,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAGhE;;;;;OAKG;uFACwB,aAAa,CAAC,kBAAkB,CAAC;IAkB5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;;oCAgCL,CAAC"}
|
|
@@ -104,7 +104,7 @@ export interface SessionPreferences {
|
|
|
104
104
|
showAgentSwitchIndicator?: boolean;
|
|
105
105
|
/**
|
|
106
106
|
* When message timestamps are shown (`TimestampDisplay` values, as plain strings).
|
|
107
|
-
* Absent keeps the `chatConfig.ui.showTimestamps` default, which is `'
|
|
107
|
+
* Absent keeps the `chatConfig.ui.showTimestamps` default, which is `'always'`.
|
|
108
108
|
*/
|
|
109
109
|
timestampDisplay?: string;
|
|
110
110
|
/** Enabled loading-animation ids (`AiAssistantAnimation` values, as plain strings). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/state/session-store.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAIvD,iBAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/state/session-store.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAIvD,iBAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;cA6C07e,CAAC;;;;;;cAAggD,CAAC;aAAob,CAAC;;;;;;;;;;;;;;;wCAvCh6iB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAMnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAMf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwJ3D,qBAKa,eAAgB,SAAQ,cAAc;IAEjD,KAAK,EAAE,gBAAgB,CAAsB;IAE7C;;;;OAIG;IACkD,UAAU,UAAS;IAExE,YAAY,IAAI,IAAI;IAKpB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-preference-baseline.d.ts","sourceRoot":"","sources":["../../../src/utils/resolve-preference-baseline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAsB,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAG5F;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAK7E;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,EAAE,
|
|
1
|
+
{"version":3,"file":"resolve-preference-baseline.d.ts","sourceRoot":"","sources":["../../../src/utils/resolve-preference-baseline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAsB,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAG5F;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAK7E;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,EAAE,gBAA2B,CAAC;AA+BpE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,EACpB,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAC5C,0BAA0B,CAwC5B"}
|
|
@@ -17,6 +17,7 @@ export const AiChatBubbleTemplate = () => {
|
|
|
17
17
|
${when((x) => !x.dialogOpen, html `
|
|
18
18
|
<div
|
|
19
19
|
class="bubble ${(x) => (x.hovered ? 'hovered' : '')}"
|
|
20
|
+
part="bubble"
|
|
20
21
|
style="${(x) => `translate: ${x.bubbleLeft}px ${x.bubbleTop}px`}"
|
|
21
22
|
${ref('bubbleEl')}
|
|
22
23
|
@mousedown="${(x, c) => x.onBubbleMouseDown(c.event)}"
|
|
@@ -27,8 +28,8 @@ export const AiChatBubbleTemplate = () => {
|
|
|
27
28
|
<img src="${(x) => x.imageSrc}" alt="AI" draggable="false" />
|
|
28
29
|
`)}
|
|
29
30
|
${when((x) => !x.imageSrc, genesisIconTemplate)}
|
|
30
|
-
<div class="pulse-ring"></div>
|
|
31
|
-
<div class="tooltip" style="${(x) => x.tooltipStyle}" ${ref('tooltipEl')}>
|
|
31
|
+
<div class="pulse-ring" part="pulse-ring"></div>
|
|
32
|
+
<div class="tooltip" part="tooltip" style="${(x) => x.tooltipStyle}" ${ref('tooltipEl')}>
|
|
32
33
|
${(x) => x.title}
|
|
33
34
|
</div>
|
|
34
35
|
</div>
|
|
@@ -41,11 +42,12 @@ export const AiChatBubbleTemplate = () => {
|
|
|
41
42
|
(x) => (x.dialogOpen ? [x] : []), html `
|
|
42
43
|
<div
|
|
43
44
|
class="dialog"
|
|
45
|
+
part="dialog"
|
|
44
46
|
style="${(x) => `translate: ${x.dialogLeft}px ${x.dialogTop}px; width: ${x.dialogWidth}px; height: ${x.dialogHeight}px`}"
|
|
45
47
|
@chat-header-mousedown="${(x, c) => x.onDialogHeaderMouseDown(c.event)}"
|
|
46
48
|
${ref('dialogEl')}
|
|
47
49
|
>
|
|
48
|
-
<div class="dialog-content">
|
|
50
|
+
<div class="dialog-content" part="dialog-content">
|
|
49
51
|
<slot name="dialog-content" ${slotted('dialogContent')}></slot>
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|
|
@@ -55,17 +55,45 @@ let AiHaloOverlay = AiHaloOverlay_1 = class AiHaloOverlay extends GenesisElement
|
|
|
55
55
|
glowSpreadChanged() {
|
|
56
56
|
this.style.setProperty('--halo-glow-spread', `${this.glowSpread}%`);
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Start/stop with `active`, so an idle overlay costs nothing.
|
|
60
|
+
*
|
|
61
|
+
* Guarded on `isConnected` because FAST invokes attribute-changed callbacks during
|
|
62
|
+
* initialisation, before the element is in the document — `connectedCallback` is what decides
|
|
63
|
+
* for an element that mounts already-active.
|
|
64
|
+
*/
|
|
65
|
+
activeChanged() {
|
|
66
|
+
if (!this.isConnected)
|
|
67
|
+
return;
|
|
68
|
+
if (this.active)
|
|
69
|
+
this.startAnimation();
|
|
70
|
+
else
|
|
71
|
+
this.stopAnimation();
|
|
72
|
+
}
|
|
58
73
|
connectedCallback() {
|
|
59
74
|
super.connectedCallback();
|
|
60
|
-
this.
|
|
75
|
+
if (this.active)
|
|
76
|
+
this.startAnimation();
|
|
61
77
|
}
|
|
62
78
|
disconnectedCallback() {
|
|
63
79
|
super.disconnectedCallback();
|
|
80
|
+
this.stopAnimation();
|
|
81
|
+
}
|
|
82
|
+
startAnimation() {
|
|
83
|
+
// Re-entrant: `activeChanged` can fire for a value that is already applied, and a second
|
|
84
|
+
// scheduled frame would double the rotation speed and leak the first handle.
|
|
85
|
+
if (this.animFrame !== undefined)
|
|
86
|
+
return;
|
|
87
|
+
this.tick();
|
|
88
|
+
}
|
|
89
|
+
stopAnimation() {
|
|
64
90
|
if (this.animFrame !== undefined) {
|
|
65
91
|
cancelAnimationFrame(this.animFrame);
|
|
66
92
|
this.animFrame = undefined;
|
|
67
93
|
}
|
|
68
|
-
// Reset the clock so a later
|
|
94
|
+
// Reset the clock so a later restart doesn't apply one huge time delta. `angle` is
|
|
95
|
+
// deliberately NOT reset: the halo fades out on opacity, so resuming from where it stopped
|
|
96
|
+
// avoids a visible jump when it comes back.
|
|
69
97
|
this.lastTime = undefined;
|
|
70
98
|
}
|
|
71
99
|
tick(now) {
|
|
@@ -86,11 +114,19 @@ let AiHaloOverlay = AiHaloOverlay_1 = class AiHaloOverlay extends GenesisElement
|
|
|
86
114
|
this.animFrame = requestAnimationFrame((t) => this.tick(t));
|
|
87
115
|
}
|
|
88
116
|
};
|
|
89
|
-
// TODO: The rAF loop is fine for demos but
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
117
|
+
// TODO: The rAF loop is fine for demos but runs on the main thread, so heavy JS work can cause
|
|
118
|
+
// the animation to stutter. Once @property inside Shadow DOM has solid cross-browser support,
|
|
119
|
+
// consider switching back to a CSS @keyframes approach and removing
|
|
120
|
+
// connectedCallback/disconnectedCallback/tick().
|
|
121
|
+
//
|
|
122
|
+
// The loop is GATED ON `active` (see startAnimation/stopAnimation). It used to tick
|
|
123
|
+
// unconditionally from connectedCallback, which was written off as "negligible but non-zero"
|
|
124
|
+
// idle cost — that undersold it. Every tick writes `--halo-angle` as an INLINE STYLE, so an
|
|
125
|
+
// idle overlay mutates its own style attribute ~60x a second for the lifetime of the page.
|
|
126
|
+
// Hosts mount these permanently and only toggle `active` (activity-halo and the assistant's
|
|
127
|
+
// own chrome both do), so a typical app had several overlays rewriting inline styles forever
|
|
128
|
+
// while showing nothing. The visible cost is in devtools: the Elements panel repaints on every
|
|
129
|
+
// mutation, which makes inspecting or live-editing anywhere in the tree impractical.
|
|
94
130
|
AiHaloOverlay.FULL_ROTATION_DEG = 360;
|
|
95
131
|
__decorate([
|
|
96
132
|
attr({ mode: 'boolean' })
|
|
@@ -69,7 +69,27 @@ export const timestampModePickerTemplate = (segmentedControlTag, segmentedItemTa
|
|
|
69
69
|
aria-label="Show timestamps"
|
|
70
70
|
:value=${(x) => x.timestampDisplay}
|
|
71
71
|
@change=${(x, c) => {
|
|
72
|
-
|
|
72
|
+
// Only the GROUP's own `change` is authoritative. Each item emits its own `change` from
|
|
73
|
+
// `checkedChanged` as the group checks the incoming one and unchecks the outgoing, and
|
|
74
|
+
// those bubble to this listener carrying whichever mode that item represents — a valid
|
|
75
|
+
// string, and during startup a STALE one, so neither validating the value nor testing
|
|
76
|
+
// `checked` can tell them from a real pick. The group, by contrast, emits from
|
|
77
|
+
// `valueChanged`, which runs only after `changeHandler` has set `value` to the selection.
|
|
78
|
+
//
|
|
79
|
+
// Acting on a stale echo is not cosmetic: it writes a mode nobody chose AND marks
|
|
80
|
+
// preferences user-changed, latching the reconciler for the session — so the host's
|
|
81
|
+
// `chatConfig.ui.showTimestamps` never applies and the slice default wins instead.
|
|
82
|
+
// It fires on FIRST RENDER, before any interaction, which is what made a configured
|
|
83
|
+
// `'always'` unreachable in Create (GENC-1257).
|
|
84
|
+
if (c.event.target !== c.event.currentTarget)
|
|
85
|
+
return;
|
|
86
|
+
const next = c.event.target.value;
|
|
87
|
+
// `hasOwnProperty`, not `in`: `in` walks the prototype chain, so it would accept
|
|
88
|
+
// `'toString'`, `'constructor'` and friends as modes.
|
|
89
|
+
if (typeof next === 'string' &&
|
|
90
|
+
Object.prototype.hasOwnProperty.call(TIMESTAMP_MODE_LABELS, next)) {
|
|
91
|
+
x.timestampDisplay = next;
|
|
92
|
+
}
|
|
73
93
|
}}
|
|
74
94
|
>
|
|
75
95
|
${repeat(() => TIMESTAMP_MODE_OPTIONS, html `
|
package/dist/esm/main/main.js
CHANGED
|
@@ -682,7 +682,7 @@ let FoundationAiAssistant = FoundationAiAssistant_1 = class FoundationAiAssistan
|
|
|
682
682
|
this.persistPreferences();
|
|
683
683
|
}
|
|
684
684
|
/**
|
|
685
|
-
* When each message shows its timestamp — `'off'`, `'hover'`
|
|
685
|
+
* When each message shows its timestamp — `'off'`, `'hover'` or `'always'` (default).
|
|
686
686
|
*
|
|
687
687
|
* Falls back to `DEFAULT_TIMESTAMP_DISPLAY` rather than `'off'` when there is no
|
|
688
688
|
* store yet: this preference defaults ON, so the pre-store render must match the state
|
|
@@ -399,7 +399,7 @@ const baseStyles = css `
|
|
|
399
399
|
border: 0;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
/* 'hover'
|
|
402
|
+
/* 'hover'. Space is RESERVED at all times (opacity, not display) so
|
|
403
403
|
revealing the timestamp cannot reflow the bubble under the pointer; only the paint
|
|
404
404
|
changes. The sender line is rarely the widest line in a bubble, so this costs no
|
|
405
405
|
width except on very short messages. */
|
|
@@ -47,10 +47,19 @@ const assistantAvatarTemplate = html `
|
|
|
47
47
|
const parent = c.parent;
|
|
48
48
|
return parent.imageSrc
|
|
49
49
|
? html `
|
|
50
|
-
<img
|
|
50
|
+
<img
|
|
51
|
+
src="${() => parent.imageSrc}"
|
|
52
|
+
alt="Assistant"
|
|
53
|
+
class="avatar-img"
|
|
54
|
+
part="avatar-img"
|
|
55
|
+
/>
|
|
51
56
|
`
|
|
52
57
|
: html `
|
|
53
|
-
<span
|
|
58
|
+
<span
|
|
59
|
+
class="avatar-icon"
|
|
60
|
+
part="avatar-icon"
|
|
61
|
+
:innerHTML="${() => parent.assistantIconSafe}"
|
|
62
|
+
></span>
|
|
54
63
|
`;
|
|
55
64
|
}}
|
|
56
65
|
`;
|
|
@@ -59,10 +68,14 @@ const userAvatarTemplate = html `
|
|
|
59
68
|
const parent = c.parent;
|
|
60
69
|
return parent.userImageSrc
|
|
61
70
|
? html `
|
|
62
|
-
<img src="${() => parent.userImageSrc}" alt="You" class="avatar-img" />
|
|
71
|
+
<img src="${() => parent.userImageSrc}" alt="You" class="avatar-img" part="avatar-img" />
|
|
63
72
|
`
|
|
64
73
|
: html `
|
|
65
|
-
<span
|
|
74
|
+
<span
|
|
75
|
+
class="avatar-icon"
|
|
76
|
+
part="avatar-icon"
|
|
77
|
+
:innerHTML="${() => parent.userIconSafe}"
|
|
78
|
+
></span>
|
|
66
79
|
`;
|
|
67
80
|
}}
|
|
68
81
|
`;
|
|
@@ -513,7 +526,10 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
513
526
|
<div
|
|
514
527
|
class="message-row ${(m) => messageType(m)} ${(m) => m.interaction ? `present-${interactionPresentation(m)}` : ''}"
|
|
515
528
|
>
|
|
516
|
-
<div
|
|
529
|
+
<div
|
|
530
|
+
class="avatar ${(m) => messageType(m)}"
|
|
531
|
+
part="${(m) => `avatar avatar-${messageType(m)}`}"
|
|
532
|
+
>
|
|
517
533
|
${when(
|
|
518
534
|
// Keyed on messageType (not raw role) so a synthetic-user message,
|
|
519
535
|
// which renders as 'user', gets the user avatar rather than the
|
|
@@ -528,8 +544,8 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
528
544
|
// A 'bare' interaction owns its full presentation — suppress the
|
|
529
545
|
// host sender label. Every other message keeps it.
|
|
530
546
|
(m) => !(m.interaction && interactionPresentation(m) === 'bare'), html `
|
|
531
|
-
<div class="sender">
|
|
532
|
-
<span class="sender-label">
|
|
547
|
+
<div class="sender" part="sender">
|
|
548
|
+
<span class="sender-label" part="sender-label">
|
|
533
549
|
${(m, c) => {
|
|
534
550
|
var _a;
|
|
535
551
|
return messageType(m) === 'ai-function' &&
|
|
@@ -547,7 +563,7 @@ ${(tc) => { var _a; return (((_a = tc.foldPath) === null || _a === void 0 ? void
|
|
|
547
563
|
c.parent.timestampDisplay !== 'off', messageTimestampTemplate)}
|
|
548
564
|
</div>
|
|
549
565
|
`)}
|
|
550
|
-
<div class="content">
|
|
566
|
+
<div class="content" part="content">
|
|
551
567
|
${when((m) => m.content, html `
|
|
552
568
|
<ai-chat-markdown :content="${(m) => m.content}"></ai-chat-markdown>
|
|
553
569
|
`)}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createSlice } from '@genesislcap/foundation-redux';
|
|
2
|
+
import { DEFAULT_TIMESTAMP_DISPLAY } from '../utils/resolve-preference-baseline';
|
|
2
3
|
import { emptyUsage, sumUsage } from '../utils/sum-usage';
|
|
3
4
|
/**
|
|
4
5
|
* Build a fresh default session state. A factory (not just a shared const) so
|
|
@@ -13,7 +14,7 @@ export function createDefaultSessionState() {
|
|
|
13
14
|
showThinkingSteps: false,
|
|
14
15
|
showNarration: false,
|
|
15
16
|
showAgentSwitchIndicator: false,
|
|
16
|
-
timestampDisplay:
|
|
17
|
+
timestampDisplay: DEFAULT_TIMESTAMP_DISPLAY,
|
|
17
18
|
enabledAnimations: [],
|
|
18
19
|
suggestionsState: { status: 'idle' },
|
|
19
20
|
contextTokens: undefined,
|
|
@@ -3,17 +3,18 @@ import { attr, customElement, GenesisElement, observable, html, css, repeat, whe
|
|
|
3
3
|
const PILL_ANIMATION_STAGGER_MS = 70;
|
|
4
4
|
const template = html `
|
|
5
5
|
${when((x) => x.state.status === 'loading', html `
|
|
6
|
-
<div class="suggestions-container">
|
|
6
|
+
<div class="suggestions-container" part="suggestions-container">
|
|
7
7
|
${repeat(() => Array.from({ length: 3 }), html `
|
|
8
|
-
<div class="suggestion-placeholder"></div>
|
|
8
|
+
<div class="suggestion-placeholder" part="suggestion-placeholder"></div>
|
|
9
9
|
`)}
|
|
10
10
|
</div>
|
|
11
11
|
`)}
|
|
12
12
|
${when((x) => x.state.status === 'loaded', html `
|
|
13
|
-
<div class="suggestions-container">
|
|
13
|
+
<div class="suggestions-container" part="suggestions-container">
|
|
14
14
|
${repeat((x) => x.state.suggestions, html `
|
|
15
15
|
<button
|
|
16
16
|
class="suggestion-pill"
|
|
17
|
+
part="suggestion-pill"
|
|
17
18
|
style="animation-delay: ${(_, c) => c.index * PILL_ANIMATION_STAGGER_MS}ms"
|
|
18
19
|
@click="${(suggestion, c) => c.parent.handleSuggestionClick(suggestion)}"
|
|
19
20
|
>
|
|
@@ -20,7 +20,7 @@ export function preferenceUnchanged(current, value) {
|
|
|
20
20
|
return current === value;
|
|
21
21
|
}
|
|
22
22
|
/** The mode used when neither the host config nor stored prefs name a valid one. */
|
|
23
|
-
export const DEFAULT_TIMESTAMP_DISPLAY = '
|
|
23
|
+
export const DEFAULT_TIMESTAMP_DISPLAY = 'always';
|
|
24
24
|
/**
|
|
25
25
|
* Every valid {@link TimestampDisplay}, for narrowing untrusted input.
|
|
26
26
|
*
|
|
@@ -39,8 +39,12 @@ const TIMESTAMP_DISPLAY_MODES = {
|
|
|
39
39
|
*
|
|
40
40
|
* Both inputs need this: the config field is typed but comes from plain JS hosts, and the
|
|
41
41
|
* stored field is a bare `string` read back out of a persistence blob.
|
|
42
|
+
*
|
|
43
|
+
* Membership is tested with `hasOwnProperty` rather than `in`, which walks the prototype
|
|
44
|
+
* chain — `in` would admit `'constructor'`, `'toString'` and every other `Object.prototype`
|
|
45
|
+
* key as a valid mode, which is exactly the junk this is here to reject.
|
|
42
46
|
*/
|
|
43
|
-
const asTimestampDisplay = (value) => typeof value === 'string' && value
|
|
47
|
+
const asTimestampDisplay = (value) => typeof value === 'string' && Object.prototype.hasOwnProperty.call(TIMESTAMP_DISPLAY_MODES, value)
|
|
44
48
|
? value
|
|
45
49
|
: undefined;
|
|
46
50
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.28.1-FUI-0.6",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/ai-assistant.d.ts",
|
|
@@ -74,26 +74,26 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@genesislcap/foundation-testing": "15.
|
|
78
|
-
"@genesislcap/genx": "15.
|
|
79
|
-
"@genesislcap/rollup-builder": "15.
|
|
80
|
-
"@genesislcap/ts-builder": "15.
|
|
81
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
82
|
-
"@genesislcap/vite-builder": "15.
|
|
83
|
-
"@genesislcap/webpack-builder": "15.
|
|
77
|
+
"@genesislcap/foundation-testing": "15.28.1-FUI-0.6",
|
|
78
|
+
"@genesislcap/genx": "15.28.1-FUI-0.6",
|
|
79
|
+
"@genesislcap/rollup-builder": "15.28.1-FUI-0.6",
|
|
80
|
+
"@genesislcap/ts-builder": "15.28.1-FUI-0.6",
|
|
81
|
+
"@genesislcap/uvu-playwright-builder": "15.28.1-FUI-0.6",
|
|
82
|
+
"@genesislcap/vite-builder": "15.28.1-FUI-0.6",
|
|
83
|
+
"@genesislcap/webpack-builder": "15.28.1-FUI-0.6",
|
|
84
84
|
"@types/dompurify": "^3.0.5",
|
|
85
85
|
"@types/marked": "^5.0.2",
|
|
86
86
|
"esbuild": "0.25.12"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@genesislcap/foundation-ai": "15.
|
|
90
|
-
"@genesislcap/foundation-logger": "15.
|
|
91
|
-
"@genesislcap/foundation-notifications": "15.
|
|
92
|
-
"@genesislcap/foundation-redux": "15.
|
|
93
|
-
"@genesislcap/foundation-ui": "15.
|
|
94
|
-
"@genesislcap/foundation-utils": "15.
|
|
95
|
-
"@genesislcap/rapid-design-system": "15.
|
|
96
|
-
"@genesislcap/web-core": "15.
|
|
89
|
+
"@genesislcap/foundation-ai": "15.28.1-FUI-0.6",
|
|
90
|
+
"@genesislcap/foundation-logger": "15.28.1-FUI-0.6",
|
|
91
|
+
"@genesislcap/foundation-notifications": "15.28.1-FUI-0.6",
|
|
92
|
+
"@genesislcap/foundation-redux": "15.28.1-FUI-0.6",
|
|
93
|
+
"@genesislcap/foundation-ui": "15.28.1-FUI-0.6",
|
|
94
|
+
"@genesislcap/foundation-utils": "15.28.1-FUI-0.6",
|
|
95
|
+
"@genesislcap/rapid-design-system": "15.28.1-FUI-0.6",
|
|
96
|
+
"@genesislcap/web-core": "15.28.1-FUI-0.6",
|
|
97
97
|
"dompurify": "^3.3.1",
|
|
98
98
|
"marked": "^17.0.3"
|
|
99
99
|
},
|
package/sandbox/README.md
CHANGED
|
@@ -143,9 +143,9 @@ anyone opens the cog. **Animations is deliberately not in that table**: it is a
|
|
|
143
143
|
rather than a display preference (unsetting it removes the cog control altogether), and it has
|
|
144
144
|
no single element property to mirror onto.
|
|
145
145
|
|
|
146
|
-
- **
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
- **Always** (the default) — permanently visible.
|
|
147
|
+
- **On hover** — hidden until the pointer is over that message row. The space is still
|
|
148
|
+
reserved, so a reveal never reflows the bubble under the cursor.
|
|
149
149
|
- **Off** — not rendered, and therefore absent from the accessibility tree too.
|
|
150
150
|
|
|
151
151
|
`opacity: 0` hides from paint but not from the accessibility tree, and assistive tech has no
|
package/sandbox/sandbox.ts
CHANGED
|
@@ -178,7 +178,7 @@ const DEFAULT_STATE: SandboxState = {
|
|
|
178
178
|
showToolCalls: true,
|
|
179
179
|
showThinkingSteps: true,
|
|
180
180
|
showNarration: true,
|
|
181
|
-
showTimestamps: '
|
|
181
|
+
showTimestamps: 'always',
|
|
182
182
|
animations: true,
|
|
183
183
|
// Chosen so the `huge` (~20k) and `loop` (~22k) seeds actually clear the tail
|
|
184
184
|
// budget these produce (~12.8k) and so have something to compact. Verified, not
|