@genesislcap/ai-assistant 15.4.1 → 15.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-assistant.api.json +544 -82
- package/dist/ai-assistant.d.ts +324 -36
- package/dist/chat-driver.cjs +94 -22
- package/dist/chat-driver.cjs.map +3 -3
- package/dist/chat-driver.mjs +94 -22
- package/dist/chat-driver.mjs.map +3 -3
- package/dist/custom-elements.json +303 -36
- package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts +9 -2
- package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/cost-session-banking.test.d.ts +2 -0
- package/dist/dts/main/cost-session-banking.test.d.ts.map +1 -0
- package/dist/dts/main/main.d.ts +184 -24
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/provider/assistant-app-settings.d.ts +30 -5
- package/dist/dts/provider/assistant-app-settings.d.ts.map +1 -1
- package/dist/dts/state/ai-assistant-slice.d.ts +11 -8
- package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-persistence-provider.d.ts +23 -0
- package/dist/dts/state/persistence/session-persistence-provider.d.ts.map +1 -1
- package/dist/dts/state/persistence/session-snapshot.d.ts.map +1 -1
- package/dist/dts/state/session-store.d.ts +1 -2
- package/dist/dts/state/session-store.d.ts.map +1 -1
- package/dist/dts/styles/settings-section.d.ts +29 -0
- package/dist/dts/styles/settings-section.d.ts.map +1 -0
- package/dist/dts/utils/cost-session-history.d.ts +103 -12
- package/dist/dts/utils/cost-session-history.d.ts.map +1 -1
- package/dist/dts/utils/resolve-cost-history-config.d.ts +9 -3
- package/dist/dts/utils/resolve-cost-history-config.d.ts.map +1 -1
- package/dist/dts/utils/sum-costs.d.ts.map +1 -1
- package/dist/dts/utils/sum-tokens.d.ts +8 -8
- package/dist/dts/utils/sum-tokens.d.ts.map +1 -1
- package/dist/dts/utils/sum-usage.d.ts +59 -0
- package/dist/dts/utils/sum-usage.d.ts.map +1 -0
- package/dist/dts/utils/sum-usage.test.d.ts +2 -0
- package/dist/dts/utils/sum-usage.test.d.ts.map +1 -0
- package/dist/esm/components/chat-driver/chat-driver.js +6 -0
- package/dist/esm/components/settings-modal/settings-modal.styles.js +237 -18
- package/dist/esm/components/settings-modal/settings-modal.template.js +229 -73
- package/dist/esm/index.js +1 -0
- package/dist/esm/main/cost-session-banking.test.js +308 -0
- package/dist/esm/main/main.js +424 -71
- package/dist/esm/state/ai-assistant-slice.js +11 -8
- package/dist/esm/state/ai-assistant-slice.test.js +12 -5
- package/dist/esm/state/debug-event-log.js +2 -2
- package/dist/esm/state/persistence/session-persistence.integration.test.js +5 -1
- package/dist/esm/state/persistence/session-persister.js +2 -2
- package/dist/esm/state/persistence/session-persister.test.js +10 -1
- package/dist/esm/state/persistence/session-snapshot.js +6 -2
- package/dist/esm/state/persistence/session-snapshot.test.js +4 -1
- package/dist/esm/state/persistence/stateful-restore.e2e.test.js +10 -1
- package/dist/esm/styles/settings-section.js +39 -0
- package/dist/esm/utils/cost-session-history.js +92 -15
- package/dist/esm/utils/cost-session-history.test.js +155 -13
- package/dist/esm/utils/resolve-cost-history-config.js +2 -1
- package/dist/esm/utils/sum-costs.js +2 -13
- package/dist/esm/utils/sum-tokens.js +10 -27
- package/dist/esm/utils/sum-tokens.test.js +1 -5
- package/dist/esm/utils/sum-usage.js +123 -0
- package/dist/esm/utils/sum-usage.test.js +120 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
- package/src/components/chat-driver/chat-driver.ts +6 -0
- package/src/components/settings-modal/settings-modal.styles.ts +237 -18
- package/src/components/settings-modal/settings-modal.template.ts +270 -81
- package/src/index.ts +1 -0
- package/src/main/cost-session-banking.test.ts +407 -0
- package/src/main/main.ts +433 -68
- package/src/provider/assistant-app-settings.ts +31 -5
- package/src/state/ai-assistant-slice.test.ts +12 -5
- package/src/state/ai-assistant-slice.ts +21 -13
- package/src/state/debug-event-log.ts +2 -2
- package/src/state/persistence/session-persistence-provider.ts +24 -0
- package/src/state/persistence/session-persistence.integration.test.ts +8 -1
- package/src/state/persistence/session-persister.test.ts +10 -1
- package/src/state/persistence/session-persister.ts +2 -2
- package/src/state/persistence/session-snapshot.test.ts +4 -1
- package/src/state/persistence/session-snapshot.ts +5 -1
- package/src/state/persistence/stateful-restore.e2e.test.ts +9 -1
- package/src/styles/settings-section.ts +40 -0
- package/src/utils/cost-session-history.test.ts +187 -16
- package/src/utils/cost-session-history.ts +142 -23
- package/src/utils/resolve-cost-history-config.ts +10 -3
- package/src/utils/sum-costs.ts +2 -9
- package/src/utils/sum-tokens.test.ts +1 -11
- package/src/utils/sum-tokens.ts +10 -26
- package/src/utils/sum-usage.test.ts +140 -0
- package/src/utils/sum-usage.ts +130 -0
|
@@ -3629,10 +3629,82 @@
|
|
|
3629
3629
|
],
|
|
3630
3630
|
"name": "assembleDebugLog"
|
|
3631
3631
|
},
|
|
3632
|
+
{
|
|
3633
|
+
"kind": "Interface",
|
|
3634
|
+
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsHeading:interface",
|
|
3635
|
+
"docComment": "/**\n * Optional heading above a provider's toggle group.\n *\n * Entirely host-supplied — the assistant has no default title and no default icon, because the section belongs to the host. Omit it and the toggles render bare, which is right when the host's slotted content already titles them.\n *\n * @beta\n */\n",
|
|
3636
|
+
"excerptTokens": [
|
|
3637
|
+
{
|
|
3638
|
+
"kind": "Content",
|
|
3639
|
+
"text": "export interface AssistantAppSettingsHeading "
|
|
3640
|
+
}
|
|
3641
|
+
],
|
|
3642
|
+
"fileUrlPath": "src/provider/assistant-app-settings.ts",
|
|
3643
|
+
"releaseTag": "Beta",
|
|
3644
|
+
"name": "AssistantAppSettingsHeading",
|
|
3645
|
+
"preserveMemberOrder": false,
|
|
3646
|
+
"members": [
|
|
3647
|
+
{
|
|
3648
|
+
"kind": "PropertySignature",
|
|
3649
|
+
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsHeading#icon:member",
|
|
3650
|
+
"docComment": "/**\n * Icon name for the design system's icon element (a Font Awesome free name, e.g. `'object-group'`). Omitted renders text only; an unknown name renders nothing at all, so check it against the installed Font Awesome set.\n */\n",
|
|
3651
|
+
"excerptTokens": [
|
|
3652
|
+
{
|
|
3653
|
+
"kind": "Content",
|
|
3654
|
+
"text": "readonly icon?: "
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"kind": "Content",
|
|
3658
|
+
"text": "string"
|
|
3659
|
+
},
|
|
3660
|
+
{
|
|
3661
|
+
"kind": "Content",
|
|
3662
|
+
"text": ";"
|
|
3663
|
+
}
|
|
3664
|
+
],
|
|
3665
|
+
"isReadonly": true,
|
|
3666
|
+
"isOptional": true,
|
|
3667
|
+
"releaseTag": "Beta",
|
|
3668
|
+
"name": "icon",
|
|
3669
|
+
"propertyTypeTokenRange": {
|
|
3670
|
+
"startIndex": 1,
|
|
3671
|
+
"endIndex": 2
|
|
3672
|
+
}
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"kind": "PropertySignature",
|
|
3676
|
+
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsHeading#title:member",
|
|
3677
|
+
"docComment": "",
|
|
3678
|
+
"excerptTokens": [
|
|
3679
|
+
{
|
|
3680
|
+
"kind": "Content",
|
|
3681
|
+
"text": "readonly title: "
|
|
3682
|
+
},
|
|
3683
|
+
{
|
|
3684
|
+
"kind": "Content",
|
|
3685
|
+
"text": "string"
|
|
3686
|
+
},
|
|
3687
|
+
{
|
|
3688
|
+
"kind": "Content",
|
|
3689
|
+
"text": ";"
|
|
3690
|
+
}
|
|
3691
|
+
],
|
|
3692
|
+
"isReadonly": true,
|
|
3693
|
+
"isOptional": false,
|
|
3694
|
+
"releaseTag": "Beta",
|
|
3695
|
+
"name": "title",
|
|
3696
|
+
"propertyTypeTokenRange": {
|
|
3697
|
+
"startIndex": 1,
|
|
3698
|
+
"endIndex": 2
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
],
|
|
3702
|
+
"extendsTokenRanges": []
|
|
3703
|
+
},
|
|
3632
3704
|
{
|
|
3633
3705
|
"kind": "Interface",
|
|
3634
3706
|
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsProvider:interface",
|
|
3635
|
-
"docComment": "/**\n * App-supplied settings for the
|
|
3707
|
+
"docComment": "/**\n * App-supplied settings for the host's own section of the settings modal. Register a concrete implementation on the DI token at app bootstrap; the assistant renders the toggles with the same row layout as AI Chat Bot settings.\n *\n * The section itself is untitled by the assistant — no heading text and no icon — because only the host knows what it is. Title it from the `settings-app` slot, which renders above these toggles, and apply `assistantSettingsSectionTitleStyles` to match the built-in headings.\n *\n * @beta\n */\n",
|
|
3636
3708
|
"excerptTokens": [
|
|
3637
3709
|
{
|
|
3638
3710
|
"kind": "Content",
|
|
@@ -3689,33 +3761,6 @@
|
|
|
3689
3761
|
],
|
|
3690
3762
|
"name": "getValue"
|
|
3691
3763
|
},
|
|
3692
|
-
{
|
|
3693
|
-
"kind": "PropertySignature",
|
|
3694
|
-
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsProvider#sectionTitle:member",
|
|
3695
|
-
"docComment": "/**\n * Section heading. Default: `\"UI Builder Settings\"`.\n */\n",
|
|
3696
|
-
"excerptTokens": [
|
|
3697
|
-
{
|
|
3698
|
-
"kind": "Content",
|
|
3699
|
-
"text": "readonly sectionTitle?: "
|
|
3700
|
-
},
|
|
3701
|
-
{
|
|
3702
|
-
"kind": "Content",
|
|
3703
|
-
"text": "string"
|
|
3704
|
-
},
|
|
3705
|
-
{
|
|
3706
|
-
"kind": "Content",
|
|
3707
|
-
"text": ";"
|
|
3708
|
-
}
|
|
3709
|
-
],
|
|
3710
|
-
"isReadonly": true,
|
|
3711
|
-
"isOptional": true,
|
|
3712
|
-
"releaseTag": "Beta",
|
|
3713
|
-
"name": "sectionTitle",
|
|
3714
|
-
"propertyTypeTokenRange": {
|
|
3715
|
-
"startIndex": 1,
|
|
3716
|
-
"endIndex": 2
|
|
3717
|
-
}
|
|
3718
|
-
},
|
|
3719
3764
|
{
|
|
3720
3765
|
"kind": "MethodSignature",
|
|
3721
3766
|
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsProvider#setValue:member(1)",
|
|
@@ -3857,6 +3902,34 @@
|
|
|
3857
3902
|
"startIndex": 1,
|
|
3858
3903
|
"endIndex": 4
|
|
3859
3904
|
}
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"kind": "PropertySignature",
|
|
3908
|
+
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsProvider#togglesHeading:member",
|
|
3909
|
+
"docComment": "/**\n * Heading for the toggle group, for hosts that put other controls in the `settings-app` slot and need these distinguished from them. No default: absent means no heading.\n */\n",
|
|
3910
|
+
"excerptTokens": [
|
|
3911
|
+
{
|
|
3912
|
+
"kind": "Content",
|
|
3913
|
+
"text": "readonly togglesHeading?: "
|
|
3914
|
+
},
|
|
3915
|
+
{
|
|
3916
|
+
"kind": "Reference",
|
|
3917
|
+
"text": "AssistantAppSettingsHeading",
|
|
3918
|
+
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsHeading:interface"
|
|
3919
|
+
},
|
|
3920
|
+
{
|
|
3921
|
+
"kind": "Content",
|
|
3922
|
+
"text": ";"
|
|
3923
|
+
}
|
|
3924
|
+
],
|
|
3925
|
+
"isReadonly": true,
|
|
3926
|
+
"isOptional": true,
|
|
3927
|
+
"releaseTag": "Beta",
|
|
3928
|
+
"name": "togglesHeading",
|
|
3929
|
+
"propertyTypeTokenRange": {
|
|
3930
|
+
"startIndex": 1,
|
|
3931
|
+
"endIndex": 2
|
|
3932
|
+
}
|
|
3860
3933
|
}
|
|
3861
3934
|
],
|
|
3862
3935
|
"extendsTokenRanges": []
|
|
@@ -4109,6 +4182,30 @@
|
|
|
4109
4182
|
],
|
|
4110
4183
|
"extendsTokenRanges": []
|
|
4111
4184
|
},
|
|
4185
|
+
{
|
|
4186
|
+
"kind": "Variable",
|
|
4187
|
+
"canonicalReference": "@genesislcap/ai-assistant!assistantSettingsSectionTitleStyles:var",
|
|
4188
|
+
"docComment": "/**\n * Heading style for a settings-modal section, published so a host can title its own section.\n *\n * The assistant renders no heading for the `settings-app` slot — no text and no icon — because only the host knows what that section is. The consequence is that a host supplying one has to reproduce the styling of the built-in headings beside it, and a copied rule drifts the moment either side changes. So the declarations live here, are applied by the assistant's own headings, and are exported for the host to apply to its.\n *\n * Compose it into a component's styles and put `ai-settings-section-title` on the heading:\n * ```ts\n * import { assistantSettingsSectionTitleStyles } from '@genesislcap/ai-assistant';\n *\n * const styles = css`\n * ${assistantSettingsSectionTitleStyles}\n * :host { display: block; }\n * `;\n * ```\n *\n * Carries no margin on purpose: spacing belongs to the surrounding layout, which differs between the assistant's own sections and a slotted one, and is the single declaration hosts had to diverge on when they copied this rule.\n *\n * @beta\n */\n",
|
|
4189
|
+
"excerptTokens": [
|
|
4190
|
+
{
|
|
4191
|
+
"kind": "Content",
|
|
4192
|
+
"text": "assistantSettingsSectionTitleStyles: "
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
"kind": "Reference",
|
|
4196
|
+
"text": "ElementStyles",
|
|
4197
|
+
"canonicalReference": "@microsoft/fast-element!ElementStyles:class"
|
|
4198
|
+
}
|
|
4199
|
+
],
|
|
4200
|
+
"fileUrlPath": "src/styles/settings-section.ts",
|
|
4201
|
+
"isReadonly": true,
|
|
4202
|
+
"releaseTag": "Beta",
|
|
4203
|
+
"name": "assistantSettingsSectionTitleStyles",
|
|
4204
|
+
"variableTypeTokenRange": {
|
|
4205
|
+
"startIndex": 1,
|
|
4206
|
+
"endIndex": 2
|
|
4207
|
+
}
|
|
4208
|
+
},
|
|
4112
4209
|
{
|
|
4113
4210
|
"kind": "TypeAlias",
|
|
4114
4211
|
"canonicalReference": "@genesislcap/ai-assistant!CachePolicyInput:type",
|
|
@@ -5916,7 +6013,7 @@
|
|
|
5916
6013
|
{
|
|
5917
6014
|
"kind": "Interface",
|
|
5918
6015
|
"canonicalReference": "@genesislcap/ai-assistant!CostSessionModelEntry:interface",
|
|
5919
|
-
"docComment": "/**\n * A model used during a
|
|
6016
|
+
"docComment": "/**\n * A model used during a recorded cost session.\n */\n",
|
|
5920
6017
|
"excerptTokens": [
|
|
5921
6018
|
{
|
|
5922
6019
|
"kind": "Content",
|
|
@@ -5989,7 +6086,7 @@
|
|
|
5989
6086
|
{
|
|
5990
6087
|
"kind": "Interface",
|
|
5991
6088
|
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord:interface",
|
|
5992
|
-
"docComment": "/**\n * Persisted
|
|
6089
|
+
"docComment": "/**\n * Persisted usage record for one project's assistant work.\n */\n",
|
|
5993
6090
|
"excerptTokens": [
|
|
5994
6091
|
{
|
|
5995
6092
|
"kind": "Content",
|
|
@@ -6003,16 +6100,17 @@
|
|
|
6003
6100
|
"members": [
|
|
6004
6101
|
{
|
|
6005
6102
|
"kind": "PropertySignature",
|
|
6006
|
-
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#
|
|
6007
|
-
"docComment": "",
|
|
6103
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#banked:member",
|
|
6104
|
+
"docComment": "/**\n * Spend that predates the current transcript, and so cannot be re-derived from it.\n *\n * Without this a row could only ever report what the open transcript proves. That is fine when the transcript is restored on load (it *is* the project's history), but where it starts empty every refresh the row would be rewritten downwards on the next turn and the project's earlier spend lost. Banking it keeps `usage` a lifetime figure in both cases.\n *\n * Deliberately part of the row rather than element state: two assistant instances (a docked bubble and a popped-out panel) share one session, and both write this row. A value derived from the row keeps every write idempotent, whereas an element-held accumulator would be applied once per instance.\n *\n * Optional: rows written before this existed have none, which reads as \"nothing banked\".\n */\n",
|
|
6008
6105
|
"excerptTokens": [
|
|
6009
6106
|
{
|
|
6010
6107
|
"kind": "Content",
|
|
6011
|
-
"text": "
|
|
6108
|
+
"text": "banked?: "
|
|
6012
6109
|
},
|
|
6013
6110
|
{
|
|
6014
|
-
"kind": "
|
|
6015
|
-
"text": "
|
|
6111
|
+
"kind": "Reference",
|
|
6112
|
+
"text": "AggregateUsage",
|
|
6113
|
+
"canonicalReference": "@genesislcap/foundation-ai!AggregateUsage:interface"
|
|
6016
6114
|
},
|
|
6017
6115
|
{
|
|
6018
6116
|
"kind": "Content",
|
|
@@ -6020,9 +6118,9 @@
|
|
|
6020
6118
|
}
|
|
6021
6119
|
],
|
|
6022
6120
|
"isReadonly": false,
|
|
6023
|
-
"isOptional":
|
|
6121
|
+
"isOptional": true,
|
|
6024
6122
|
"releaseTag": "Public",
|
|
6025
|
-
"name": "
|
|
6123
|
+
"name": "banked",
|
|
6026
6124
|
"propertyTypeTokenRange": {
|
|
6027
6125
|
"startIndex": 1,
|
|
6028
6126
|
"endIndex": 2
|
|
@@ -6030,12 +6128,12 @@
|
|
|
6030
6128
|
},
|
|
6031
6129
|
{
|
|
6032
6130
|
"kind": "PropertySignature",
|
|
6033
|
-
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#
|
|
6034
|
-
"docComment": "
|
|
6131
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#id:member",
|
|
6132
|
+
"docComment": "",
|
|
6035
6133
|
"excerptTokens": [
|
|
6036
6134
|
{
|
|
6037
6135
|
"kind": "Content",
|
|
6038
|
-
"text": "
|
|
6136
|
+
"text": "id: "
|
|
6039
6137
|
},
|
|
6040
6138
|
{
|
|
6041
6139
|
"kind": "Content",
|
|
@@ -6049,7 +6147,7 @@
|
|
|
6049
6147
|
"isReadonly": false,
|
|
6050
6148
|
"isOptional": false,
|
|
6051
6149
|
"releaseTag": "Public",
|
|
6052
|
-
"name": "
|
|
6150
|
+
"name": "id",
|
|
6053
6151
|
"propertyTypeTokenRange": {
|
|
6054
6152
|
"startIndex": 1,
|
|
6055
6153
|
"endIndex": 2
|
|
@@ -6057,16 +6155,21 @@
|
|
|
6057
6155
|
},
|
|
6058
6156
|
{
|
|
6059
6157
|
"kind": "PropertySignature",
|
|
6060
|
-
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#
|
|
6158
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#models:member",
|
|
6061
6159
|
"docComment": "",
|
|
6062
6160
|
"excerptTokens": [
|
|
6063
6161
|
{
|
|
6064
6162
|
"kind": "Content",
|
|
6065
|
-
"text": "
|
|
6163
|
+
"text": "models: "
|
|
6164
|
+
},
|
|
6165
|
+
{
|
|
6166
|
+
"kind": "Reference",
|
|
6167
|
+
"text": "CostSessionModelEntry",
|
|
6168
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionModelEntry:interface"
|
|
6066
6169
|
},
|
|
6067
6170
|
{
|
|
6068
6171
|
"kind": "Content",
|
|
6069
|
-
"text": "
|
|
6172
|
+
"text": "[]"
|
|
6070
6173
|
},
|
|
6071
6174
|
{
|
|
6072
6175
|
"kind": "Content",
|
|
@@ -6076,29 +6179,24 @@
|
|
|
6076
6179
|
"isReadonly": false,
|
|
6077
6180
|
"isOptional": false,
|
|
6078
6181
|
"releaseTag": "Public",
|
|
6079
|
-
"name": "
|
|
6182
|
+
"name": "models",
|
|
6080
6183
|
"propertyTypeTokenRange": {
|
|
6081
6184
|
"startIndex": 1,
|
|
6082
|
-
"endIndex":
|
|
6185
|
+
"endIndex": 3
|
|
6083
6186
|
}
|
|
6084
6187
|
},
|
|
6085
6188
|
{
|
|
6086
6189
|
"kind": "PropertySignature",
|
|
6087
|
-
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#
|
|
6088
|
-
"docComment": "",
|
|
6190
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#projectKey:member",
|
|
6191
|
+
"docComment": "/**\n * Stable identity of the work this row stands for — the assistant's session key (a project id, for hosts that key sessions per project). The upsert key: a row is one project's lifetime usage, so re-reporting the same key REPLACES the row rather than adding another.\n */\n",
|
|
6089
6192
|
"excerptTokens": [
|
|
6090
6193
|
{
|
|
6091
6194
|
"kind": "Content",
|
|
6092
|
-
"text": "
|
|
6093
|
-
},
|
|
6094
|
-
{
|
|
6095
|
-
"kind": "Reference",
|
|
6096
|
-
"text": "CostSessionModelEntry",
|
|
6097
|
-
"canonicalReference": "@genesislcap/ai-assistant!CostSessionModelEntry:interface"
|
|
6195
|
+
"text": "projectKey: "
|
|
6098
6196
|
},
|
|
6099
6197
|
{
|
|
6100
6198
|
"kind": "Content",
|
|
6101
|
-
"text": "
|
|
6199
|
+
"text": "string"
|
|
6102
6200
|
},
|
|
6103
6201
|
{
|
|
6104
6202
|
"kind": "Content",
|
|
@@ -6108,10 +6206,10 @@
|
|
|
6108
6206
|
"isReadonly": false,
|
|
6109
6207
|
"isOptional": false,
|
|
6110
6208
|
"releaseTag": "Public",
|
|
6111
|
-
"name": "
|
|
6209
|
+
"name": "projectKey",
|
|
6112
6210
|
"propertyTypeTokenRange": {
|
|
6113
6211
|
"startIndex": 1,
|
|
6114
|
-
"endIndex":
|
|
6212
|
+
"endIndex": 2
|
|
6115
6213
|
}
|
|
6116
6214
|
},
|
|
6117
6215
|
{
|
|
@@ -6143,16 +6241,44 @@
|
|
|
6143
6241
|
},
|
|
6144
6242
|
{
|
|
6145
6243
|
"kind": "PropertySignature",
|
|
6146
|
-
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#
|
|
6147
|
-
"docComment": "",
|
|
6244
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#updatedAt:member",
|
|
6245
|
+
"docComment": "/**\n * ISO-8601 timestamp of the most recent usage recorded for this row.\n *\n * Named for what it is: the row is upserted as spend accrues, so this moves. It is NOT an end time — a row has no terminal state, because a project can always be worked on again.\n */\n",
|
|
6148
6246
|
"excerptTokens": [
|
|
6149
6247
|
{
|
|
6150
6248
|
"kind": "Content",
|
|
6151
|
-
"text": "
|
|
6249
|
+
"text": "updatedAt: "
|
|
6152
6250
|
},
|
|
6153
6251
|
{
|
|
6154
6252
|
"kind": "Content",
|
|
6155
|
-
"text": "
|
|
6253
|
+
"text": "string"
|
|
6254
|
+
},
|
|
6255
|
+
{
|
|
6256
|
+
"kind": "Content",
|
|
6257
|
+
"text": ";"
|
|
6258
|
+
}
|
|
6259
|
+
],
|
|
6260
|
+
"isReadonly": false,
|
|
6261
|
+
"isOptional": false,
|
|
6262
|
+
"releaseTag": "Public",
|
|
6263
|
+
"name": "updatedAt",
|
|
6264
|
+
"propertyTypeTokenRange": {
|
|
6265
|
+
"startIndex": 1,
|
|
6266
|
+
"endIndex": 2
|
|
6267
|
+
}
|
|
6268
|
+
},
|
|
6269
|
+
{
|
|
6270
|
+
"kind": "PropertySignature",
|
|
6271
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord#usage:member",
|
|
6272
|
+
"docComment": "/**\n * Cost plus the four token buckets — the same shape the live session tile renders, so a history row can show the identical breakdown instead of a lone merged total that cannot explain a large token count at a small cost.\n *\n * This is the project's **lifetime** usage: `banked` plus whatever the live transcript currently proves.\n */\n",
|
|
6273
|
+
"excerptTokens": [
|
|
6274
|
+
{
|
|
6275
|
+
"kind": "Content",
|
|
6276
|
+
"text": "usage: "
|
|
6277
|
+
},
|
|
6278
|
+
{
|
|
6279
|
+
"kind": "Reference",
|
|
6280
|
+
"text": "AggregateUsage",
|
|
6281
|
+
"canonicalReference": "@genesislcap/foundation-ai!AggregateUsage:interface"
|
|
6156
6282
|
},
|
|
6157
6283
|
{
|
|
6158
6284
|
"kind": "Content",
|
|
@@ -6162,7 +6288,7 @@
|
|
|
6162
6288
|
"isReadonly": false,
|
|
6163
6289
|
"isOptional": false,
|
|
6164
6290
|
"releaseTag": "Public",
|
|
6165
|
-
"name": "
|
|
6291
|
+
"name": "usage",
|
|
6166
6292
|
"propertyTypeTokenRange": {
|
|
6167
6293
|
"startIndex": 1,
|
|
6168
6294
|
"endIndex": 2
|
|
@@ -6801,7 +6927,7 @@
|
|
|
6801
6927
|
{
|
|
6802
6928
|
"kind": "Class",
|
|
6803
6929
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant:class",
|
|
6804
|
-
"docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * **Cost build history:** opt-in via `chatConfig.costHistory.enabled`. When enabled,
|
|
6930
|
+
"docComment": "/**\n * Foundation AI Assistant component.\n *\n * @remarks\n *\n * Register one or more AI providers via `registerAIProviders` from `@genesislcap/foundation-ai`; this element resolves the `AIProviderRegistry` through the DI container. Pass agent configuration via the `agents` property — each agent can override which registered provider it uses via `provider:`. The component creates a `ChatDriver` (single agent) or `OrchestratingDriver` (multiple agents) to manage the conversation loop.\n *\n * Popout/collapse coordination uses `agenticActivityBus` topics `chat-popout` and `chat-popin` — not DOM `CustomEvent`s on this element.\n *\n * **Cost build history:** opt-in via `chatConfig.costHistory.enabled`. When enabled, each session's usage is kept as exactly ONE row per session key in `localStorage` (scoped by `costHistory.scope`, the element `id`, or `'default'`), upserted as spend accrues. So a row is a project's lifetime usage rather than a visit to it, and the Usage tab's total is the sum of the rows alone — the live session is never added on top, because the active project's own row already reflects it. Hosts may call {@link FoundationAiAssistant.finalizeCostSession} to flush early; it is idempotent.\n *\n * @fires\n *\n * chat-header-mousedown - Fired when the user presses the chat header in `popout-mode=\"expand\"` (for drag-to-popout hosts). Bubbles and composed. detail: `ChatHeaderMouseDownDetail`\n *\n * @fires\n *\n * session-cleared - Fired after the session is wiped (the lifecycle menu's Clear). The payload is captured before teardown so the host can clean up any external state the active agent was working on. Bubbles and composed. detail: `SessionClearedDetail`\n *\n * @beta\n */\n",
|
|
6805
6931
|
"excerptTokens": [
|
|
6806
6932
|
{
|
|
6807
6933
|
"kind": "Content",
|
|
@@ -7221,16 +7347,21 @@
|
|
|
7221
7347
|
},
|
|
7222
7348
|
{
|
|
7223
7349
|
"kind": "Property",
|
|
7224
|
-
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#
|
|
7225
|
-
"docComment": "/**\n *
|
|
7350
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#appSettingsTogglesHeading:member",
|
|
7351
|
+
"docComment": "/**\n * Host-supplied heading for the toggle group, or `undefined` for none — the assistant has no default. Suppressed when no toggle is currently visible, so a `visible()` predicate hiding the last one takes its heading with it rather than leaving a label over nothing.\n */\n",
|
|
7226
7352
|
"excerptTokens": [
|
|
7227
7353
|
{
|
|
7228
7354
|
"kind": "Content",
|
|
7229
|
-
"text": "get
|
|
7355
|
+
"text": "get appSettingsTogglesHeading(): "
|
|
7356
|
+
},
|
|
7357
|
+
{
|
|
7358
|
+
"kind": "Reference",
|
|
7359
|
+
"text": "AssistantAppSettingsHeading",
|
|
7360
|
+
"canonicalReference": "@genesislcap/ai-assistant!AssistantAppSettingsHeading:interface"
|
|
7230
7361
|
},
|
|
7231
7362
|
{
|
|
7232
7363
|
"kind": "Content",
|
|
7233
|
-
"text": "
|
|
7364
|
+
"text": " | undefined"
|
|
7234
7365
|
},
|
|
7235
7366
|
{
|
|
7236
7367
|
"kind": "Content",
|
|
@@ -7240,10 +7371,10 @@
|
|
|
7240
7371
|
"isReadonly": true,
|
|
7241
7372
|
"isOptional": false,
|
|
7242
7373
|
"releaseTag": "Beta",
|
|
7243
|
-
"name": "
|
|
7374
|
+
"name": "appSettingsTogglesHeading",
|
|
7244
7375
|
"propertyTypeTokenRange": {
|
|
7245
7376
|
"startIndex": 1,
|
|
7246
|
-
"endIndex":
|
|
7377
|
+
"endIndex": 3
|
|
7247
7378
|
},
|
|
7248
7379
|
"isStatic": false,
|
|
7249
7380
|
"isProtected": false,
|
|
@@ -7936,7 +8067,7 @@
|
|
|
7936
8067
|
{
|
|
7937
8068
|
"kind": "Property",
|
|
7938
8069
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#costSessionHistory:member",
|
|
7939
|
-
"docComment": "/**\n * Persisted finalized cost sessions shown on the
|
|
8070
|
+
"docComment": "/**\n * Persisted finalized cost sessions shown on the Usage tab build history list.\n */\n",
|
|
7940
8071
|
"excerptTokens": [
|
|
7941
8072
|
{
|
|
7942
8073
|
"kind": "Content",
|
|
@@ -7971,7 +8102,7 @@
|
|
|
7971
8102
|
{
|
|
7972
8103
|
"kind": "Property",
|
|
7973
8104
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#cumulativeCostUsd:member",
|
|
7974
|
-
"docComment": "/**\n *
|
|
8105
|
+
"docComment": "/**\n * Lifetime USD across every project in the history scope.\n */\n",
|
|
7975
8106
|
"excerptTokens": [
|
|
7976
8107
|
{
|
|
7977
8108
|
"kind": "Content",
|
|
@@ -7998,6 +8129,37 @@
|
|
|
7998
8129
|
"isProtected": false,
|
|
7999
8130
|
"isAbstract": false
|
|
8000
8131
|
},
|
|
8132
|
+
{
|
|
8133
|
+
"kind": "Property",
|
|
8134
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#cumulativeUsage:member",
|
|
8135
|
+
"docComment": "/**\n * Lifetime usage across every project in the history scope — cost and all four token buckets. What the Usage tab's lifetime section renders.\n *\n * Rows ONLY — deliberately not rows + live session. Each row holds a project's lifetime usage and the active project's row is kept current on every transcript change, so adding the live total would count this project's spend twice. That double-count is what made the figure grow on every refresh: a page-hide banked a row while the restored session still carried the same spend.\n */\n",
|
|
8136
|
+
"excerptTokens": [
|
|
8137
|
+
{
|
|
8138
|
+
"kind": "Content",
|
|
8139
|
+
"text": "get cumulativeUsage(): "
|
|
8140
|
+
},
|
|
8141
|
+
{
|
|
8142
|
+
"kind": "Reference",
|
|
8143
|
+
"text": "AggregateUsage",
|
|
8144
|
+
"canonicalReference": "@genesislcap/foundation-ai!AggregateUsage:interface"
|
|
8145
|
+
},
|
|
8146
|
+
{
|
|
8147
|
+
"kind": "Content",
|
|
8148
|
+
"text": ";"
|
|
8149
|
+
}
|
|
8150
|
+
],
|
|
8151
|
+
"isReadonly": true,
|
|
8152
|
+
"isOptional": false,
|
|
8153
|
+
"releaseTag": "Beta",
|
|
8154
|
+
"name": "cumulativeUsage",
|
|
8155
|
+
"propertyTypeTokenRange": {
|
|
8156
|
+
"startIndex": 1,
|
|
8157
|
+
"endIndex": 2
|
|
8158
|
+
},
|
|
8159
|
+
"isStatic": false,
|
|
8160
|
+
"isProtected": false,
|
|
8161
|
+
"isAbstract": false
|
|
8162
|
+
},
|
|
8001
8163
|
{
|
|
8002
8164
|
"kind": "Property",
|
|
8003
8165
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#debugRedux:member",
|
|
@@ -8293,7 +8455,7 @@
|
|
|
8293
8455
|
{
|
|
8294
8456
|
"kind": "Method",
|
|
8295
8457
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#finalizeCostSession:member(1)",
|
|
8296
|
-
"docComment": "/**\n *
|
|
8458
|
+
"docComment": "/**\n * Write this session's usage into persisted build history (`localStorage`) as a single row keyed by the session key, replacing any existing row for that key.\n *\n * **Idempotent** — safe to call per turn, on tab close, and on a title change alike. The name is historical: it does NOT end the session or reset the running totals. Resetting them is what used to double-count spend, since the row was banked while the persisted transcript still carried the same usage, so a reload restored it and the Usage tab counted both.\n *\n * No-op unless `chatConfig.costHistory.enabled` is `true`, when the live session has no usage yet, or when the session has no key to upsert against. Gating on the *live* figures (not the banked total) means a reload that restores nothing rewrites nothing.\n */\n",
|
|
8297
8459
|
"excerptTokens": [
|
|
8298
8460
|
{
|
|
8299
8461
|
"kind": "Content",
|
|
@@ -8909,7 +9071,7 @@
|
|
|
8909
9071
|
{
|
|
8910
9072
|
"kind": "Property",
|
|
8911
9073
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#liveCostSessionTitle:member",
|
|
8912
|
-
"docComment": "/**\n * Label shown on the
|
|
9074
|
+
"docComment": "/**\n * Label shown on the Usage tab for the in-flight session (app title or first user phrase).\n */\n",
|
|
8913
9075
|
"excerptTokens": [
|
|
8914
9076
|
{
|
|
8915
9077
|
"kind": "Content",
|
|
@@ -9010,6 +9172,36 @@
|
|
|
9010
9172
|
"isProtected": false,
|
|
9011
9173
|
"isAbstract": false
|
|
9012
9174
|
},
|
|
9175
|
+
{
|
|
9176
|
+
"kind": "Property",
|
|
9177
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#liveUsageIsProjectLifetime:member",
|
|
9178
|
+
"docComment": "/**\n * Whether the live session figures amount to this project's whole history, which is true exactly when the transcript is restored on load. Drives the Usage tab's live labels (\"Project cost\" vs \"Session cost\") so they state the scope rather than imply one.\n *\n * Note this is NOT what makes the *rows* lifetime — those bank their pre-transcript spend (see `CostSessionRecord.banked`) and are lifetime either way.\n */\n",
|
|
9179
|
+
"excerptTokens": [
|
|
9180
|
+
{
|
|
9181
|
+
"kind": "Content",
|
|
9182
|
+
"text": "get liveUsageIsProjectLifetime(): "
|
|
9183
|
+
},
|
|
9184
|
+
{
|
|
9185
|
+
"kind": "Content",
|
|
9186
|
+
"text": "boolean"
|
|
9187
|
+
},
|
|
9188
|
+
{
|
|
9189
|
+
"kind": "Content",
|
|
9190
|
+
"text": ";"
|
|
9191
|
+
}
|
|
9192
|
+
],
|
|
9193
|
+
"isReadonly": true,
|
|
9194
|
+
"isOptional": false,
|
|
9195
|
+
"releaseTag": "Beta",
|
|
9196
|
+
"name": "liveUsageIsProjectLifetime",
|
|
9197
|
+
"propertyTypeTokenRange": {
|
|
9198
|
+
"startIndex": 1,
|
|
9199
|
+
"endIndex": 2
|
|
9200
|
+
},
|
|
9201
|
+
"isStatic": false,
|
|
9202
|
+
"isProtected": false,
|
|
9203
|
+
"isAbstract": false
|
|
9204
|
+
},
|
|
9013
9205
|
{
|
|
9014
9206
|
"kind": "Property",
|
|
9015
9207
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#messages:member",
|
|
@@ -10022,7 +10214,7 @@
|
|
|
10022
10214
|
{
|
|
10023
10215
|
"kind": "Property",
|
|
10024
10216
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#sessionCostUsd:member",
|
|
10025
|
-
"docComment": "/**\n * Aggregated USD cost across every chat turn in this session.\n */\n",
|
|
10217
|
+
"docComment": "/**\n * Aggregated USD cost across every chat turn in this session.\n *\n * Read-only (unlike previously): it is a projection of `sessionUsage`, and a host assigning it would have set a figure the next transcript change overwrites.\n */\n",
|
|
10026
10218
|
"excerptTokens": [
|
|
10027
10219
|
{
|
|
10028
10220
|
"kind": "Content",
|
|
@@ -10034,10 +10226,10 @@
|
|
|
10034
10226
|
},
|
|
10035
10227
|
{
|
|
10036
10228
|
"kind": "Content",
|
|
10037
|
-
"text": "
|
|
10229
|
+
"text": ";"
|
|
10038
10230
|
}
|
|
10039
10231
|
],
|
|
10040
|
-
"isReadonly":
|
|
10232
|
+
"isReadonly": true,
|
|
10041
10233
|
"isOptional": false,
|
|
10042
10234
|
"releaseTag": "Beta",
|
|
10043
10235
|
"name": "sessionCostUsd",
|
|
@@ -10206,7 +10398,7 @@
|
|
|
10206
10398
|
{
|
|
10207
10399
|
"kind": "Property",
|
|
10208
10400
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#sessionTokensConsumed:member",
|
|
10209
|
-
"docComment": "/**\n *
|
|
10401
|
+
"docComment": "/**\n * Total tokens across every chat turn in this session — all four buckets added up. Read-only; the per-bucket split is on `sessionUsage`.\n */\n",
|
|
10210
10402
|
"excerptTokens": [
|
|
10211
10403
|
{
|
|
10212
10404
|
"kind": "Content",
|
|
@@ -10218,10 +10410,10 @@
|
|
|
10218
10410
|
},
|
|
10219
10411
|
{
|
|
10220
10412
|
"kind": "Content",
|
|
10221
|
-
"text": "
|
|
10413
|
+
"text": ";"
|
|
10222
10414
|
}
|
|
10223
10415
|
],
|
|
10224
|
-
"isReadonly":
|
|
10416
|
+
"isReadonly": true,
|
|
10225
10417
|
"isOptional": false,
|
|
10226
10418
|
"releaseTag": "Beta",
|
|
10227
10419
|
"name": "sessionTokensConsumed",
|
|
@@ -10233,6 +10425,46 @@
|
|
|
10233
10425
|
"isProtected": false,
|
|
10234
10426
|
"isAbstract": false
|
|
10235
10427
|
},
|
|
10428
|
+
{
|
|
10429
|
+
"kind": "Property",
|
|
10430
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#sessionUsage:member",
|
|
10431
|
+
"docComment": "/**\n * Cost plus the four token buckets for this session — derived from the transcript on every change, so it includes sub-agent turns and spend banked by a compaction.\n */\n",
|
|
10432
|
+
"excerptTokens": [
|
|
10433
|
+
{
|
|
10434
|
+
"kind": "Content",
|
|
10435
|
+
"text": "get sessionUsage(): "
|
|
10436
|
+
},
|
|
10437
|
+
{
|
|
10438
|
+
"kind": "Reference",
|
|
10439
|
+
"text": "AggregateUsage",
|
|
10440
|
+
"canonicalReference": "@genesislcap/foundation-ai!AggregateUsage:interface"
|
|
10441
|
+
},
|
|
10442
|
+
{
|
|
10443
|
+
"kind": "Content",
|
|
10444
|
+
"text": ";\n\nset sessionUsage(value: "
|
|
10445
|
+
},
|
|
10446
|
+
{
|
|
10447
|
+
"kind": "Reference",
|
|
10448
|
+
"text": "AggregateUsage",
|
|
10449
|
+
"canonicalReference": "@genesislcap/foundation-ai!AggregateUsage:interface"
|
|
10450
|
+
},
|
|
10451
|
+
{
|
|
10452
|
+
"kind": "Content",
|
|
10453
|
+
"text": ");"
|
|
10454
|
+
}
|
|
10455
|
+
],
|
|
10456
|
+
"isReadonly": false,
|
|
10457
|
+
"isOptional": false,
|
|
10458
|
+
"releaseTag": "Beta",
|
|
10459
|
+
"name": "sessionUsage",
|
|
10460
|
+
"propertyTypeTokenRange": {
|
|
10461
|
+
"startIndex": 1,
|
|
10462
|
+
"endIndex": 2
|
|
10463
|
+
},
|
|
10464
|
+
"isStatic": false,
|
|
10465
|
+
"isProtected": false,
|
|
10466
|
+
"isAbstract": false
|
|
10467
|
+
},
|
|
10236
10468
|
{
|
|
10237
10469
|
"kind": "Method",
|
|
10238
10470
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#setAgent:member(1)",
|
|
@@ -10766,10 +10998,40 @@
|
|
|
10766
10998
|
"isProtected": false,
|
|
10767
10999
|
"isAbstract": false
|
|
10768
11000
|
},
|
|
11001
|
+
{
|
|
11002
|
+
"kind": "Property",
|
|
11003
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#settingsCostLifetimeVisible:member",
|
|
11004
|
+
"docComment": "/**\n * Whether the lifetime-usage section has anything to say.\n *\n * Requires build history: with it off there are no rows, so `cumulativeUsage` falls back to the live session and the section would restate the block directly below it under a \"lifetime\" heading it hasn't earned.\n */\n",
|
|
11005
|
+
"excerptTokens": [
|
|
11006
|
+
{
|
|
11007
|
+
"kind": "Content",
|
|
11008
|
+
"text": "get settingsCostLifetimeVisible(): "
|
|
11009
|
+
},
|
|
11010
|
+
{
|
|
11011
|
+
"kind": "Content",
|
|
11012
|
+
"text": "boolean"
|
|
11013
|
+
},
|
|
11014
|
+
{
|
|
11015
|
+
"kind": "Content",
|
|
11016
|
+
"text": ";"
|
|
11017
|
+
}
|
|
11018
|
+
],
|
|
11019
|
+
"isReadonly": true,
|
|
11020
|
+
"isOptional": false,
|
|
11021
|
+
"releaseTag": "Beta",
|
|
11022
|
+
"name": "settingsCostLifetimeVisible",
|
|
11023
|
+
"propertyTypeTokenRange": {
|
|
11024
|
+
"startIndex": 1,
|
|
11025
|
+
"endIndex": 2
|
|
11026
|
+
},
|
|
11027
|
+
"isStatic": false,
|
|
11028
|
+
"isProtected": false,
|
|
11029
|
+
"isAbstract": false
|
|
11030
|
+
},
|
|
10769
11031
|
{
|
|
10770
11032
|
"kind": "Property",
|
|
10771
11033
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#settingsCostSummaryVisible:member",
|
|
10772
|
-
"docComment": "/**\n * Whether the built-in
|
|
11034
|
+
"docComment": "/**\n * Whether the built-in Usage tab summary block has anything to show.\n */\n",
|
|
10773
11035
|
"excerptTokens": [
|
|
10774
11036
|
{
|
|
10775
11037
|
"kind": "Content",
|
|
@@ -10799,7 +11061,7 @@
|
|
|
10799
11061
|
{
|
|
10800
11062
|
"kind": "Property",
|
|
10801
11063
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#settingsCostTabVisible:member",
|
|
10802
|
-
"docComment": "/**\n * Whether the
|
|
11064
|
+
"docComment": "/**\n * Whether the Usage tab should appear in the settings modal.\n */\n",
|
|
10803
11065
|
"excerptTokens": [
|
|
10804
11066
|
{
|
|
10805
11067
|
"kind": "Content",
|
|
@@ -10986,7 +11248,7 @@
|
|
|
10986
11248
|
{
|
|
10987
11249
|
"kind": "Property",
|
|
10988
11250
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#settingsSessionTokensVisible:member",
|
|
10989
|
-
"docComment": "/**\n * Whether session token usage should render on the
|
|
11251
|
+
"docComment": "/**\n * Whether session token usage should render on the Usage tab.\n */\n",
|
|
10990
11252
|
"excerptTokens": [
|
|
10991
11253
|
{
|
|
10992
11254
|
"kind": "Content",
|
|
@@ -11444,6 +11706,41 @@
|
|
|
11444
11706
|
"isProtected": false,
|
|
11445
11707
|
"isAbstract": false
|
|
11446
11708
|
},
|
|
11709
|
+
{
|
|
11710
|
+
"kind": "Property",
|
|
11711
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#sortedCostSessionHistory:member",
|
|
11712
|
+
"docComment": "/**\n * Build history for display: most recently worked on first.\n *\n * The stored order is insertion order (see `upsertRecord`), which leaves a project returned to sitting wherever it was first seen — so ordering is applied here, on read, where it also covers rows a host provider supplied.\n */\n",
|
|
11713
|
+
"excerptTokens": [
|
|
11714
|
+
{
|
|
11715
|
+
"kind": "Content",
|
|
11716
|
+
"text": "get sortedCostSessionHistory(): "
|
|
11717
|
+
},
|
|
11718
|
+
{
|
|
11719
|
+
"kind": "Reference",
|
|
11720
|
+
"text": "CostSessionRecord",
|
|
11721
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord:interface"
|
|
11722
|
+
},
|
|
11723
|
+
{
|
|
11724
|
+
"kind": "Content",
|
|
11725
|
+
"text": "[]"
|
|
11726
|
+
},
|
|
11727
|
+
{
|
|
11728
|
+
"kind": "Content",
|
|
11729
|
+
"text": ";"
|
|
11730
|
+
}
|
|
11731
|
+
],
|
|
11732
|
+
"isReadonly": true,
|
|
11733
|
+
"isOptional": false,
|
|
11734
|
+
"releaseTag": "Beta",
|
|
11735
|
+
"name": "sortedCostSessionHistory",
|
|
11736
|
+
"propertyTypeTokenRange": {
|
|
11737
|
+
"startIndex": 1,
|
|
11738
|
+
"endIndex": 3
|
|
11739
|
+
},
|
|
11740
|
+
"isStatic": false,
|
|
11741
|
+
"isProtected": false,
|
|
11742
|
+
"isAbstract": false
|
|
11743
|
+
},
|
|
11447
11744
|
{
|
|
11448
11745
|
"kind": "Property",
|
|
11449
11746
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#state:member",
|
|
@@ -11907,6 +12204,41 @@
|
|
|
11907
12204
|
"isAbstract": false,
|
|
11908
12205
|
"name": "triggerFileInput"
|
|
11909
12206
|
},
|
|
12207
|
+
{
|
|
12208
|
+
"kind": "Property",
|
|
12209
|
+
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#uniqueProviderModels:member",
|
|
12210
|
+
"docComment": "/**\n * Distinct models the registry currently resolves to — the live session's model chips.\n *\n * `providerStatuses` carries one entry per registry SLOT, so a vendor configured across several tiers that happen to resolve to the same model reports it once per tier, and the chips rendered it once per tier too. Which tier a model came from is not what these chips are for.\n *\n * Deduped on the label actually displayed, not on `status.model`: a slot whose provider reports no model falls back to the slot's own name, and those are distinct per slot, so keying on the label keeps them from collapsing into one another.\n */\n",
|
|
12211
|
+
"excerptTokens": [
|
|
12212
|
+
{
|
|
12213
|
+
"kind": "Content",
|
|
12214
|
+
"text": "get uniqueProviderModels(): "
|
|
12215
|
+
},
|
|
12216
|
+
{
|
|
12217
|
+
"kind": "Reference",
|
|
12218
|
+
"text": "CostSessionModelEntry",
|
|
12219
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionModelEntry:interface"
|
|
12220
|
+
},
|
|
12221
|
+
{
|
|
12222
|
+
"kind": "Content",
|
|
12223
|
+
"text": "[]"
|
|
12224
|
+
},
|
|
12225
|
+
{
|
|
12226
|
+
"kind": "Content",
|
|
12227
|
+
"text": ";"
|
|
12228
|
+
}
|
|
12229
|
+
],
|
|
12230
|
+
"isReadonly": true,
|
|
12231
|
+
"isOptional": false,
|
|
12232
|
+
"releaseTag": "Beta",
|
|
12233
|
+
"name": "uniqueProviderModels",
|
|
12234
|
+
"propertyTypeTokenRange": {
|
|
12235
|
+
"startIndex": 1,
|
|
12236
|
+
"endIndex": 3
|
|
12237
|
+
},
|
|
12238
|
+
"isStatic": false,
|
|
12239
|
+
"isProtected": false,
|
|
12240
|
+
"isAbstract": false
|
|
12241
|
+
},
|
|
11910
12242
|
{
|
|
11911
12243
|
"kind": "Property",
|
|
11912
12244
|
"canonicalReference": "@genesislcap/ai-assistant!FoundationAiAssistant#userIcon:member",
|
|
@@ -15177,6 +15509,65 @@
|
|
|
15177
15509
|
],
|
|
15178
15510
|
"name": "load"
|
|
15179
15511
|
},
|
|
15512
|
+
{
|
|
15513
|
+
"kind": "MethodSignature",
|
|
15514
|
+
"canonicalReference": "@genesislcap/ai-assistant!SessionPersistenceProvider#loadCostHistory:member(1)",
|
|
15515
|
+
"docComment": "/**\n * Scoped cost/build history — the per-project usage rows behind the Usage tab.\n *\n * ‼️ **Keyed by SCOPE, not `sessionKey`**, unlike every other method on this interface. A row holds one project's lifetime usage and the list spans projects, so keying it per session would defeat the model. The scope comes from `chatConfig.costHistory.scope`, falling back to the element `id`, then `'default'`.\n *\n * Optional: when a provider omits these, the assistant falls back to `localStorage`, so hosts that don't implement them are unaffected. Implementing them moves the ledger to the host's own backend, which is what stops it being stranded in one browser.\n *\n * Read/written **independently of the `enabled` toggle** (as with preferences and diagnostics): usage accounting is not conversation content, so a user turning off chat retention should not lose their cost ledger. Best-effort — a failed write must never affect the chat.\n *\n * `undefined` from `loadCostHistory` means \"nothing stored\", the same as `[]`.\n */\n",
|
|
15516
|
+
"excerptTokens": [
|
|
15517
|
+
{
|
|
15518
|
+
"kind": "Content",
|
|
15519
|
+
"text": "loadCostHistory?(scope: "
|
|
15520
|
+
},
|
|
15521
|
+
{
|
|
15522
|
+
"kind": "Content",
|
|
15523
|
+
"text": "string"
|
|
15524
|
+
},
|
|
15525
|
+
{
|
|
15526
|
+
"kind": "Content",
|
|
15527
|
+
"text": "): "
|
|
15528
|
+
},
|
|
15529
|
+
{
|
|
15530
|
+
"kind": "Reference",
|
|
15531
|
+
"text": "Promise",
|
|
15532
|
+
"canonicalReference": "!Promise:interface"
|
|
15533
|
+
},
|
|
15534
|
+
{
|
|
15535
|
+
"kind": "Content",
|
|
15536
|
+
"text": "<"
|
|
15537
|
+
},
|
|
15538
|
+
{
|
|
15539
|
+
"kind": "Reference",
|
|
15540
|
+
"text": "CostSessionRecord",
|
|
15541
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord:interface"
|
|
15542
|
+
},
|
|
15543
|
+
{
|
|
15544
|
+
"kind": "Content",
|
|
15545
|
+
"text": "[] | undefined>"
|
|
15546
|
+
},
|
|
15547
|
+
{
|
|
15548
|
+
"kind": "Content",
|
|
15549
|
+
"text": ";"
|
|
15550
|
+
}
|
|
15551
|
+
],
|
|
15552
|
+
"isOptional": true,
|
|
15553
|
+
"returnTypeTokenRange": {
|
|
15554
|
+
"startIndex": 3,
|
|
15555
|
+
"endIndex": 7
|
|
15556
|
+
},
|
|
15557
|
+
"releaseTag": "Public",
|
|
15558
|
+
"overloadIndex": 1,
|
|
15559
|
+
"parameters": [
|
|
15560
|
+
{
|
|
15561
|
+
"parameterName": "scope",
|
|
15562
|
+
"parameterTypeTokenRange": {
|
|
15563
|
+
"startIndex": 1,
|
|
15564
|
+
"endIndex": 2
|
|
15565
|
+
},
|
|
15566
|
+
"isOptional": false
|
|
15567
|
+
}
|
|
15568
|
+
],
|
|
15569
|
+
"name": "loadCostHistory"
|
|
15570
|
+
},
|
|
15180
15571
|
{
|
|
15181
15572
|
"kind": "MethodSignature",
|
|
15182
15573
|
"canonicalReference": "@genesislcap/ai-assistant!SessionPersistenceProvider#loadDiagnostics:member(1)",
|
|
@@ -15362,6 +15753,77 @@
|
|
|
15362
15753
|
],
|
|
15363
15754
|
"name": "save"
|
|
15364
15755
|
},
|
|
15756
|
+
{
|
|
15757
|
+
"kind": "MethodSignature",
|
|
15758
|
+
"canonicalReference": "@genesislcap/ai-assistant!SessionPersistenceProvider#saveCostHistory:member(1)",
|
|
15759
|
+
"docComment": "/**\n * Replace the stored row list for `scope`. See {@link SessionPersistenceProvider.loadCostHistory}.\n */\n",
|
|
15760
|
+
"excerptTokens": [
|
|
15761
|
+
{
|
|
15762
|
+
"kind": "Content",
|
|
15763
|
+
"text": "saveCostHistory?(scope: "
|
|
15764
|
+
},
|
|
15765
|
+
{
|
|
15766
|
+
"kind": "Content",
|
|
15767
|
+
"text": "string"
|
|
15768
|
+
},
|
|
15769
|
+
{
|
|
15770
|
+
"kind": "Content",
|
|
15771
|
+
"text": ", records: "
|
|
15772
|
+
},
|
|
15773
|
+
{
|
|
15774
|
+
"kind": "Reference",
|
|
15775
|
+
"text": "CostSessionRecord",
|
|
15776
|
+
"canonicalReference": "@genesislcap/ai-assistant!CostSessionRecord:interface"
|
|
15777
|
+
},
|
|
15778
|
+
{
|
|
15779
|
+
"kind": "Content",
|
|
15780
|
+
"text": "[]"
|
|
15781
|
+
},
|
|
15782
|
+
{
|
|
15783
|
+
"kind": "Content",
|
|
15784
|
+
"text": "): "
|
|
15785
|
+
},
|
|
15786
|
+
{
|
|
15787
|
+
"kind": "Reference",
|
|
15788
|
+
"text": "Promise",
|
|
15789
|
+
"canonicalReference": "!Promise:interface"
|
|
15790
|
+
},
|
|
15791
|
+
{
|
|
15792
|
+
"kind": "Content",
|
|
15793
|
+
"text": "<void>"
|
|
15794
|
+
},
|
|
15795
|
+
{
|
|
15796
|
+
"kind": "Content",
|
|
15797
|
+
"text": ";"
|
|
15798
|
+
}
|
|
15799
|
+
],
|
|
15800
|
+
"isOptional": true,
|
|
15801
|
+
"returnTypeTokenRange": {
|
|
15802
|
+
"startIndex": 6,
|
|
15803
|
+
"endIndex": 8
|
|
15804
|
+
},
|
|
15805
|
+
"releaseTag": "Public",
|
|
15806
|
+
"overloadIndex": 1,
|
|
15807
|
+
"parameters": [
|
|
15808
|
+
{
|
|
15809
|
+
"parameterName": "scope",
|
|
15810
|
+
"parameterTypeTokenRange": {
|
|
15811
|
+
"startIndex": 1,
|
|
15812
|
+
"endIndex": 2
|
|
15813
|
+
},
|
|
15814
|
+
"isOptional": false
|
|
15815
|
+
},
|
|
15816
|
+
{
|
|
15817
|
+
"parameterName": "records",
|
|
15818
|
+
"parameterTypeTokenRange": {
|
|
15819
|
+
"startIndex": 3,
|
|
15820
|
+
"endIndex": 5
|
|
15821
|
+
},
|
|
15822
|
+
"isOptional": false
|
|
15823
|
+
}
|
|
15824
|
+
],
|
|
15825
|
+
"name": "saveCostHistory"
|
|
15826
|
+
},
|
|
15365
15827
|
{
|
|
15366
15828
|
"kind": "PropertySignature",
|
|
15367
15829
|
"canonicalReference": "@genesislcap/ai-assistant!SessionPersistenceProvider#saveDebounceMs:member",
|