@genesislcap/ai-assistant 15.33.1 → 15.34.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.
Files changed (36) hide show
  1. package/dist/ai-assistant.api.json +1021 -6
  2. package/dist/ai-assistant.d.ts +209 -5
  3. package/dist/chat-driver.cjs +90 -0
  4. package/dist/chat-driver.cjs.map +3 -3
  5. package/dist/chat-driver.mjs +86 -0
  6. package/dist/chat-driver.mjs.map +3 -3
  7. package/dist/custom-elements.json +329 -3
  8. package/dist/dts/chat-driver-node.d.ts +2 -2
  9. package/dist/dts/chat-driver-node.d.ts.map +1 -1
  10. package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
  11. package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
  12. package/dist/dts/index.d.ts +2 -0
  13. package/dist/dts/index.d.ts.map +1 -1
  14. package/dist/dts/main/budget-controller.d.ts +38 -6
  15. package/dist/dts/main/budget-controller.d.ts.map +1 -1
  16. package/dist/dts/main/main.d.ts +22 -4
  17. package/dist/dts/main/main.d.ts.map +1 -1
  18. package/dist/dts/main/main.types.d.ts +25 -0
  19. package/dist/dts/main/main.types.d.ts.map +1 -1
  20. package/dist/dts/provider/tiered-provider-switcher.d.ts +123 -0
  21. package/dist/dts/provider/tiered-provider-switcher.d.ts.map +1 -0
  22. package/dist/dts/state/ai-assistant-slice.d.ts +34 -0
  23. package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
  24. package/dist/dts/state/session-store.d.ts.map +1 -1
  25. package/dist/esm/chat-driver-node.js +11 -1
  26. package/dist/esm/components/settings-modal/settings-modal.styles.js +75 -0
  27. package/dist/esm/components/settings-modal/settings-modal.template.js +56 -4
  28. package/dist/esm/index.js +1 -0
  29. package/dist/esm/main/budget-controller.js +178 -6
  30. package/dist/esm/main/main.js +20 -0
  31. package/dist/esm/provider/tiered-provider-switcher.js +142 -0
  32. package/dist/esm/state/ai-assistant-slice.js +17 -3
  33. package/docs/styling.md +24 -0
  34. package/package.json +18 -17
  35. package/sandbox/sandbox.ts +52 -0
  36. package/scripts/smoke-chat-driver-node.mjs +86 -0
@@ -231,6 +231,38 @@
231
231
  "package": "@genesislcap/foundation-ai"
232
232
  }
233
233
  },
234
+ {
235
+ "kind": "js",
236
+ "name": "AI_TIER_IDS",
237
+ "declaration": {
238
+ "name": "AI_TIER_IDS",
239
+ "package": "@genesislcap/foundation-ai"
240
+ }
241
+ },
242
+ {
243
+ "kind": "js",
244
+ "name": "AI_TIER_VENDORS",
245
+ "declaration": {
246
+ "name": "AI_TIER_VENDORS",
247
+ "package": "@genesislcap/foundation-ai"
248
+ }
249
+ },
250
+ {
251
+ "kind": "js",
252
+ "name": "DEFAULT_AI_TIERS",
253
+ "declaration": {
254
+ "name": "DEFAULT_AI_TIERS",
255
+ "package": "@genesislcap/foundation-ai"
256
+ }
257
+ },
258
+ {
259
+ "kind": "js",
260
+ "name": "resolveAITiers",
261
+ "declaration": {
262
+ "name": "resolveAITiers",
263
+ "package": "@genesislcap/foundation-ai"
264
+ }
265
+ },
234
266
  {
235
267
  "kind": "js",
236
268
  "name": "AggregateUsage",
@@ -367,6 +399,54 @@
367
399
  "package": "@genesislcap/foundation-ai"
368
400
  }
369
401
  },
402
+ {
403
+ "kind": "js",
404
+ "name": "AITierId",
405
+ "declaration": {
406
+ "name": "AITierId",
407
+ "package": "@genesislcap/foundation-ai"
408
+ }
409
+ },
410
+ {
411
+ "kind": "js",
412
+ "name": "AITierOverrides",
413
+ "declaration": {
414
+ "name": "AITierOverrides",
415
+ "package": "@genesislcap/foundation-ai"
416
+ }
417
+ },
418
+ {
419
+ "kind": "js",
420
+ "name": "AITiers",
421
+ "declaration": {
422
+ "name": "AITiers",
423
+ "package": "@genesislcap/foundation-ai"
424
+ }
425
+ },
426
+ {
427
+ "kind": "js",
428
+ "name": "AITierVendor",
429
+ "declaration": {
430
+ "name": "AITierVendor",
431
+ "package": "@genesislcap/foundation-ai"
432
+ }
433
+ },
434
+ {
435
+ "kind": "js",
436
+ "name": "AnthropicTierConfig",
437
+ "declaration": {
438
+ "name": "AnthropicTierConfig",
439
+ "package": "@genesislcap/foundation-ai"
440
+ }
441
+ },
442
+ {
443
+ "kind": "js",
444
+ "name": "GeminiTierConfig",
445
+ "declaration": {
446
+ "name": "GeminiTierConfig",
447
+ "package": "@genesislcap/foundation-ai"
448
+ }
449
+ },
370
450
  {
371
451
  "kind": "js",
372
452
  "name": "AnthropicUsageRecord",
@@ -678,6 +758,22 @@
678
758
  "package": "./state/persistence"
679
759
  }
680
760
  },
761
+ {
762
+ "kind": "js",
763
+ "name": "VendorBudgetFigures",
764
+ "declaration": {
765
+ "name": "VendorBudgetFigures",
766
+ "module": "./state/ai-assistant-slice"
767
+ }
768
+ },
769
+ {
770
+ "kind": "js",
771
+ "name": "VendorBudgetSegment",
772
+ "declaration": {
773
+ "name": "VendorBudgetSegment",
774
+ "module": "./state/ai-assistant-slice"
775
+ }
776
+ },
681
777
  {
682
778
  "kind": "js",
683
779
  "name": "*",
@@ -686,6 +782,14 @@
686
782
  "package": "./provider/ai-provider-switcher"
687
783
  }
688
784
  },
785
+ {
786
+ "kind": "js",
787
+ "name": "*",
788
+ "declaration": {
789
+ "name": "*",
790
+ "package": "./provider/tiered-provider-switcher"
791
+ }
792
+ },
689
793
  {
690
794
  "kind": "js",
691
795
  "name": "*",
@@ -2423,11 +2527,11 @@
2423
2527
  {
2424
2528
  "name": "figures",
2425
2529
  "type": {
2426
- "text": "{ budgetUsd: number; spentUsd: number } | null"
2530
+ "text": "VendorBudgetFigures | null"
2427
2531
  }
2428
2532
  }
2429
2533
  ],
2430
- "description": "Feed (or clear) one vendor's AI-spend figures for the settings-modal budget\nmeter — the numeric companion to\nFoundationAiAssistant.setVendorBlocked, and like it a host-driven\nwrite: the element meters nothing itself.\n\nThe meter renders a row for exactly the vendors that currently HAVE\nfigures. An **unlimited** vendor (the budget endpoint reports\n`unlimited: true` / `limitUsd: null`) is expressed by never feeding it —\nthere is deliberately no \"unlimited\" figure shape, because a bar with no\ncap has nothing truthful to fill to. `spentUsd` MAY exceed `budgetUsd`\n(the last allowed call can overshoot the cap): the row's text shows the\nreal figures and only the bar clamps.\n\nReturns `false` — and warns once, not per call — instead of throwing when\n`vendor` is not a budgeted vendor (`BUDGETED_VENDORS`, the proxy's own\nmetered list) or either figure is not a finite number `>= 0`. Invalid input\nchanges no state. Idempotent: re-feeding a vendor's current figures is a\nno-op, so hosts can re-feed unconditionally after every turn.\n\n`false` ALSO means \"not stored, because the element is not ready yet\": a\nfeed that lands before the element has its session store (a host calling\nahead of the first append, or during a pop-out remount) stores nothing and\nsays so, rather than reporting a write that never happened. That case is\ntransient and needs no host handling — the documented per-turn re-feed is\nwhat recovers it — so it is deliberately NOT warned about; the warn-once\nchannel is for garbage input only.\n\n`figures` is nullish-checked at run time, so `undefined` behaves exactly\nlike `null` and CLEARS that vendor's row. Untyped JS hosts feed this\nstraight from `GET /api/budget`, where a per-vendor lookup that misses\nyields `undefined`, not `null` — and \"no figures\" coherently means \"no\nrow\". The `| null` parameter type is unchanged for typed callers; the\nruntime is deliberately the more forgiving of the two.\n\nThe intended feed is the platform budget endpoint:\n\n```ts\n// `vendors` is an OBJECT keyed by vendor id, not an array.\nconst { vendors } = await (await fetch('/api/budget')).json();\nfor (const v of Object.values(vendors)) {\n if (v.unlimited || v.limitUsd == null) {\n assistantEl.setVendorBudget(v.vendor, null); // clear stale figures after a cap is lifted\n continue;\n }\n assistantEl.setVendorBudget(v.vendor, { budgetUsd: v.limitUsd, spentUsd: v.spentUsd });\n}\n```\n\nRe-run it on mount and after each turn. Scope and lifetime follow the rest\nof the session slice (per `stateKey`, survives pop-in/out and \"Clear\" /\n\"New chat\") — except that the figures are NOT persisted to the session\nsnapshot: the server is authoritative and the host re-feeds at boot, so a\npersisted copy could only show stale dollars after a reload."
2534
+ "description": "Feed (or clear) one vendor's AI-spend figures for the settings-modal budget\nmeter — the numeric companion to\nFoundationAiAssistant.setVendorBlocked, and like it a host-driven\nwrite: the element meters nothing itself.\n\nThe meter renders a row for exactly the vendors that currently HAVE\nfigures. An **unlimited** vendor (the budget endpoint reports\n`unlimited: true` / `limitUsd: null`) is expressed by never feeding it —\nthere is deliberately no \"unlimited\" figure shape, because a bar with no\ncap has nothing truthful to fill to. `spentUsd` MAY exceed `budgetUsd`\n(the last allowed call can overshoot the cap): the row's text shows the\nreal figures and only the bar clamps.\n\nReturns `false` — and warns once, not per call — instead of throwing when\n`vendor` is not a budgeted vendor (`BUDGETED_VENDORS`, the proxy's own\nmetered list) or either figure is not a finite number `>= 0`. Invalid input\nchanges no state. Idempotent: re-feeding a vendor's current figures is a\nno-op, so hosts can re-feed unconditionally after every turn.\n\n`false` ALSO means \"not stored, because the element is not ready yet\": a\nfeed that lands before the element has its session store (a host calling\nahead of the first append, or during a pop-out remount) stores nothing and\nsays so, rather than reporting a write that never happened. That case is\ntransient and needs no host handling — the documented per-turn re-feed is\nwhat recovers it — so it is deliberately NOT warned about; the warn-once\nchannel is for garbage input only.\n\n`figures` is nullish-checked at run time, so `undefined` behaves exactly\nlike `null` and CLEARS that vendor's row. Untyped JS hosts feed this\nstraight from `GET /api/budget`, where a per-vendor lookup that misses\nyields `undefined`, not `null` — and \"no figures\" coherently means \"no\nrow\". The `| null` parameter type is unchanged for typed callers; the\nruntime is deliberately the more forgiving of the two.\n\nThe intended feed is the platform budget endpoint:\n\n```ts\n// `vendors` is an OBJECT keyed by vendor id, not an array.\nconst { vendors } = await (await fetch('/api/budget')).json();\nfor (const v of Object.values(vendors)) {\n if (v.unlimited || v.limitUsd == null) {\n assistantEl.setVendorBudget(v.vendor, null); // clear stale figures after a cap is lifted\n continue;\n }\n assistantEl.setVendorBudget(v.vendor, { budgetUsd: v.limitUsd, spentUsd: v.spentUsd });\n}\n```\n\nA host that meters its spend by source can pass an optional `segments` breakdown, and\nthe vendor's bar is drawn stacked with a legend naming each one (NEW-15):\n\n```ts\nassistantEl.setVendorBudget('anthropic', {\n budgetUsd: 50,\n spentUsd: 12.5,\n segments: [\n { id: 'app', label: 'App', spentUsd: 9 },\n { id: 'batch', label: 'Batch jobs', spentUsd: 3.5 },\n ],\n});\n```\n\nThe labels are yours — the assistant has no vocabulary for what a host spends money on.\nSegments may add up to less than `spentUsd` (the remainder draws unlabelled) but never\nto more; a breakdown that does, or that is otherwise malformed, is dropped with a debug\nlog and the single bar renders. Omit `segments` entirely and nothing about the meter\nchanges.\n\nRe-run it on mount and after each turn. Scope and lifetime follow the rest\nof the session slice (per `stateKey`, survives pop-in/out and \"Clear\" /\n\"New chat\") — except that the figures are NOT persisted to the session\nsnapshot: the server is authoritative and the host re-feeds at boot, so a\npersisted copy could only show stale dollars after a reload."
2431
2535
  },
2432
2536
  {
2433
2537
  "kind": "field",
@@ -5256,6 +5360,228 @@
5256
5360
  }
5257
5361
  ]
5258
5362
  },
5363
+ {
5364
+ "kind": "javascript-module",
5365
+ "path": "src/provider/tiered-provider-switcher.ts",
5366
+ "declarations": [
5367
+ {
5368
+ "kind": "class",
5369
+ "description": "Which cloud vendor backs the tier-shaped provider registry, plus the means to move it at\nruntime (GENC-1610).",
5370
+ "name": "TieredAIProviderSwitcher",
5371
+ "members": [
5372
+ {
5373
+ "kind": "field",
5374
+ "name": "vendors",
5375
+ "type": {
5376
+ "text": "readonly AITierVendor[]"
5377
+ },
5378
+ "readonly": true
5379
+ },
5380
+ {
5381
+ "kind": "field",
5382
+ "name": "options",
5383
+ "type": {
5384
+ "text": "TieredAIProviderSwitcherOptions"
5385
+ },
5386
+ "privacy": "private",
5387
+ "readonly": true,
5388
+ "default": "options"
5389
+ },
5390
+ {
5391
+ "kind": "field",
5392
+ "name": "defaultTier",
5393
+ "type": {
5394
+ "text": "AITierId"
5395
+ },
5396
+ "privacy": "private",
5397
+ "readonly": true
5398
+ },
5399
+ {
5400
+ "kind": "field",
5401
+ "name": "registry",
5402
+ "type": {
5403
+ "text": "MutableAIProviderRegistry"
5404
+ },
5405
+ "privacy": "private",
5406
+ "readonly": true
5407
+ },
5408
+ {
5409
+ "kind": "field",
5410
+ "name": "listeners",
5411
+ "privacy": "private",
5412
+ "readonly": true,
5413
+ "default": "new Set<(vendor: AITierVendor) => void>()"
5414
+ },
5415
+ {
5416
+ "kind": "field",
5417
+ "name": "_vendor",
5418
+ "type": {
5419
+ "text": "AITierVendor"
5420
+ },
5421
+ "privacy": "private"
5422
+ },
5423
+ {
5424
+ "kind": "field",
5425
+ "name": "vendor",
5426
+ "type": {
5427
+ "text": "AITierVendor"
5428
+ },
5429
+ "readonly": true
5430
+ },
5431
+ {
5432
+ "kind": "method",
5433
+ "name": "switchTo",
5434
+ "return": {
5435
+ "type": {
5436
+ "text": "void"
5437
+ }
5438
+ },
5439
+ "parameters": [
5440
+ {
5441
+ "name": "vendor",
5442
+ "type": {
5443
+ "text": "string"
5444
+ }
5445
+ }
5446
+ ],
5447
+ "description": "A user-driven switch: move the registry, then tell the app so it can persist the choice.\nAn unknown vendor is ignored."
5448
+ },
5449
+ {
5450
+ "kind": "method",
5451
+ "name": "adoptPersistedVendor",
5452
+ "return": {
5453
+ "type": {
5454
+ "text": "void"
5455
+ }
5456
+ },
5457
+ "parameters": [
5458
+ {
5459
+ "name": "vendor",
5460
+ "type": {
5461
+ "text": "string"
5462
+ }
5463
+ }
5464
+ ],
5465
+ "description": "Adopt a vendor the app read back from its own store — the same registry move as\nTieredAIProviderSwitcher.switchTo, without the `onSwitch` callback, because this\nvalue came FROM the store and writing it back would be a pointless round-trip on load.\n\nExists because registration has to stay synchronous: an element that connects before the\ntoken is registered caches the platform's no-op fallback, so an app cannot await its\nstored preference before constructing this. It boots on `initialVendor` and adopts the\nstored one a moment later, through a registry that is mutable and held by reference."
5466
+ },
5467
+ {
5468
+ "kind": "method",
5469
+ "name": "subscribe",
5470
+ "return": {
5471
+ "type": {
5472
+ "text": "() => void"
5473
+ }
5474
+ },
5475
+ "parameters": [
5476
+ {
5477
+ "name": "listener",
5478
+ "type": {
5479
+ "text": "(vendor: string) => void"
5480
+ }
5481
+ }
5482
+ ]
5483
+ },
5484
+ {
5485
+ "kind": "method",
5486
+ "name": "apply",
5487
+ "privacy": "private",
5488
+ "return": {
5489
+ "type": {
5490
+ "text": "void"
5491
+ }
5492
+ },
5493
+ "parameters": [
5494
+ {
5495
+ "name": "vendor",
5496
+ "type": {
5497
+ "text": "AITierVendor"
5498
+ }
5499
+ }
5500
+ ],
5501
+ "description": "The registry move both entry points share, and nothing else."
5502
+ },
5503
+ {
5504
+ "kind": "method",
5505
+ "name": "build",
5506
+ "privacy": "private",
5507
+ "return": {
5508
+ "type": {
5509
+ "text": "Record<string, AIProvider>"
5510
+ }
5511
+ },
5512
+ "parameters": [
5513
+ {
5514
+ "name": "vendor",
5515
+ "type": {
5516
+ "text": "AITierVendor"
5517
+ }
5518
+ }
5519
+ ]
5520
+ },
5521
+ {
5522
+ "kind": "method",
5523
+ "name": "isKnownVendor",
5524
+ "privacy": "private",
5525
+ "return": {
5526
+ "type": {
5527
+ "text": "vendor is AITierVendor"
5528
+ }
5529
+ },
5530
+ "parameters": [
5531
+ {
5532
+ "name": "vendor",
5533
+ "type": {
5534
+ "text": "string"
5535
+ }
5536
+ }
5537
+ ]
5538
+ }
5539
+ ]
5540
+ },
5541
+ {
5542
+ "kind": "function",
5543
+ "name": "registerTieredAIProviders",
5544
+ "return": {
5545
+ "type": {
5546
+ "text": "TieredAIProviderSwitcher"
5547
+ }
5548
+ },
5549
+ "parameters": [
5550
+ {
5551
+ "name": "container",
5552
+ "type": {
5553
+ "text": "Container"
5554
+ }
5555
+ },
5556
+ {
5557
+ "name": "options",
5558
+ "type": {
5559
+ "text": "Omit<TieredAIProviderSwitcherOptions, 'container'>"
5560
+ }
5561
+ }
5562
+ ],
5563
+ "description": "Build a TieredAIProviderSwitcher — which registers the tier-shaped provider\nregistry — and put it on the (AIProviderSwitcher:variable) token. Call once at app\nbootstrap."
5564
+ }
5565
+ ],
5566
+ "exports": [
5567
+ {
5568
+ "kind": "js",
5569
+ "name": "TieredAIProviderSwitcher",
5570
+ "declaration": {
5571
+ "name": "TieredAIProviderSwitcher",
5572
+ "module": "src/provider/tiered-provider-switcher.ts"
5573
+ }
5574
+ },
5575
+ {
5576
+ "kind": "js",
5577
+ "name": "registerTieredAIProviders",
5578
+ "declaration": {
5579
+ "name": "registerTieredAIProviders",
5580
+ "module": "src/provider/tiered-provider-switcher.ts"
5581
+ }
5582
+ }
5583
+ ]
5584
+ },
5259
5585
  {
5260
5586
  "kind": "javascript-module",
5261
5587
  "path": "src/state/ai-assistant-slice.ts",
@@ -13492,7 +13818,7 @@
13492
13818
  {
13493
13819
  "kind": "variable",
13494
13820
  "name": "settingsModalStyles",
13495
- "default": "css`\n /*\n * Section headings come from the shared fragment the package also exports, so a host titling\n * its own slotted section applies the same rule rather than a copy of it.\n */\n ${assistantSettingsSectionTitleStyles}\n\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n .settings-modal {\n --ai-tier-badge-bg-mix: 14%;\n --ai-tier-badge-text-lighten: 18%;\n }\n\n .settings-modal::part(dialog) {\n max-width: 620px;\n width: calc(100vw - 48px);\n max-height: calc(100vh - 48px);\n padding: 0;\n }\n\n .settings-modal::part(content) {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n width: 100%;\n }\n\n .settings-modal::part(top) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal::part(bottom) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-top: 1px solid var(--neutral-stroke-rest);\n border-bottom-left-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n border-bottom-right-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n background-color: var(--neutral-layer-2);\n }\n\n .settings-modal-header {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .settings-modal-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-content {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n }\n\n .settings-modal-tabs::part(tablist) {\n border-bottom: 0;\n padding: 0 calc(var(--design-unit) * 5px);\n column-gap: calc(var(--design-unit) * 5px);\n }\n\n .settings-modal-tabs::part(activeIndicator) {\n height: 2px;\n }\n\n .settings-modal-tab {\n padding: 0;\n font-weight: 600;\n gap: 6px;\n }\n\n .settings-modal-tab[aria-selected='true'] {\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-tabs::part(tabpanel) {\n border-top: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-tab-panel {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n padding: 0;\n border-radius: 0;\n }\n\n .settings-modal-tab-panel[hidden] {\n display: none !important;\n }\n\n .settings-modal-body {\n overflow-y: auto;\n padding: 0 calc(var(--design-unit) * 5px) calc(var(--design-unit) * 2px);\n max-height: min(60vh, 520px);\n }\n\n .settings-modal-section {\n padding: calc(var(--design-unit) * 5px) 0;\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-section:last-child {\n border-bottom: none;\n }\n\n /*\n * Only the spacing. Everything else about this heading comes from the exported fragment\n * above, which the assistant and its hosts share; margin is deliberately not in there,\n * since the gap below a heading depends on the layout around it.\n */\n .ai-settings-section-title {\n margin: 0 0 calc(var(--design-unit) * 3px);\n }\n\n .settings-modal-section-note {\n margin: calc(var(--design-unit) * -2px) 0 calc(var(--design-unit) * 3px);\n font-size: 12px;\n line-height: 1.5;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-modal-section-body {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-toggle-row {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 3px);\n padding: 0 0 calc(var(--design-unit) * 4px) 0;\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-toggle-row:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-row.is-stacked {\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * For rows whose control is a button rather than a switch. The base row top-aligns, which suits\n * a switch (it lands level with the title), but a button is tall enough that top-aligning leaves\n * it above the title-plus-description block it acts on.\n */\n .settings-toggle-row.is-centered {\n align-items: center;\n }\n\n .settings-animation-list {\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.2px);\n padding: calc(var(--design-unit) * 2px);\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-list .settings-toggle-row {\n border: 0;\n }\n\n .settings-animation-category {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-animation-category-label {\n font-weight: 600;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-toggle-row + .settings-animation-category-label {\n border-top: 1px solid var(--neutral-stroke-rest);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-option {\n padding: 0;\n margin: 0;\n }\n\n .settings-animation-option:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-toggle-text {\n flex: 1;\n min-width: 0;\n }\n\n .settings-toggle-title {\n font-size: 14px;\n font-weight: 500;\n color: var(--neutral-foreground-rest);\n }\n\n .settings-toggle-desc {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.5;\n max-width: 92%;\n }\n\n .settings-toggle-control {\n flex: 0 0 auto;\n min-width: 0;\n }\n\n .settings-toggle-control-wide {\n width: 100%;\n max-width: 280px;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-desc {\n max-width: none;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-control-wide {\n width: 100%;\n max-width: none;\n }\n\n /*\n * Sub-heading over the provider toggle group. Unlike the section headings it sits INSIDE\n * .settings-modal-section-body, so the parent's 4-unit flex gap already separates it from the\n * first toggle — and flex does not collapse margins, so the shared rule's 3-unit margin-bottom\n * would add to that gap rather than replace it, leaving the label adrift from the rows it\n * names. Zero the margin and pull back 2 of the 4 gap units, expressed in the same token so it\n * tracks if that gap changes.\n */\n .settings-app-toggles-title {\n margin: 0 0 calc(var(--design-unit) * -2px);\n }\n\n .settings-app-toggle-block {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.4;\n padding-left: calc(var(--design-unit) * 1px);\n font-style: italic;\n }\n\n /*\n * The budget meter (GENC-1464) is the context indicator's money sibling and\n * shares its row anatomy 1:1, so the budget classes JOIN these rules rather\n * than restating them — one place to restyle the header/label/figures shape,\n * and the two indicators cannot drift apart. Design-system tokens only, and\n * unfallbacked: every token here ships a DS default, so a var(--x, y)\n * fallback would be dead code that hides a broken token name (#2411/#2436\n * review rule, pinned by settings-modal.styles.test.ts).\n */\n .settings-context-header,\n .settings-budget-header {\n display: flex;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 2px);\n font-size: 12px;\n }\n\n .settings-context-label,\n .settings-budget-label {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n }\n\n .settings-context-tokens,\n .settings-budget-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /* Freshness footer (GENC-1464): refresh button + label under the vendor\n rows, left-aligned — a footnote to the figures above it. The button's\n inline padding is pinned and cancelled by the container margin so the\n ICON GLYPH (not the button box) sits flush with the budget labels'\n left edge, whatever the density tokens say. */\n .settings-budget-toolbar {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n margin-inline-start: -4px;\n }\n\n .settings-budget-refresh::part(control) {\n padding-inline: 4px;\n }\n\n .settings-budget-updated {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n }\n\n /*\n * ONE rhythm for every meter row. The outer wrapper holds the context\n * indicator and the budget meter; the inner one holds the budget meter's\n * vendor rows — and both gap by the same 2 units (half the section body's 4)\n * so that visually identical meter rows are evenly spaced whatever mix of\n * them is on screen. Without the wrapper the context row inherits the body's\n * 4-unit gap while the vendor rows keep 2, and three identical-looking rows\n * read as an uneven 4/2/2. The wrapper renders only when at least one meter\n * does — see settingsUsageMetersTemplate for why an always-on one would cost\n * a stray gap.\n */\n .settings-usage-meters,\n .settings-budget-usage {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-current-build,\n .settings-lifetime-usage {\n background: var(--neutral-layer-2);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n margin: calc(var(--design-unit) * 3px) 0;\n }\n\n /*\n * Deliberately quieter than the live block: no pulsing badge and no accent, so the eye lands\n * on what is being built now — which is why that block leads the tab and this one follows,\n * under the history heading whose rows it totals.\n */\n .settings-lifetime-usage-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-lifetime-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-current-build-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n /*\n * Optically centring these 10px caps against the 14px project name beside them. Flex offers\n * only two alignments and neither lands it, because a box centre and a text baseline are\n * different lines:\n * - align-items: center sits the badge baseline about 1.2px high\n * - align-items: baseline matches baselines, but the caps then read as bottom-aligned\n * against the name's ascenders, so the badge looks low\n * The eye wants the midpoint, so: centre the boxes, then translate down by the ~1px of\n * overshoot. This is a nudge, but it corrects a fixed relationship between two font sizes\n * rather than some neighbouring element's layout, so unlike a margin tuned to a sibling it\n * cannot rot when that sibling changes. In em, so it tracks the badge text.\n *\n * display: block, not inline-flex: a flex container has no text baseline of its own and\n * synthesizes one from its first child, which here is the dot, an empty span. As a block box\n * the badge takes the baseline of its first line, i.e. the text.\n */\n .settings-live-badge {\n display: block;\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--accent-fill-rest);\n white-space: nowrap;\n transform: translateY(0.1em);\n }\n\n .settings-live-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n\n /* Replaces the flex gap the badge no longer has. */\n margin-right: calc(var(--design-unit) * 1px);\n\n /* Centres the dot on the text beside it without disturbing that text's baseline. */\n vertical-align: middle;\n border-radius: 50%;\n background: var(--accent-fill-rest);\n animation: settings-live-pulse 1.6s ease-out infinite;\n }\n\n @keyframes settings-live-pulse {\n 0% {\n box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-fill-rest) 55%, transparent);\n }\n\n 70% {\n box-shadow: 0 0 0 7px transparent;\n }\n\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n .settings-current-build-name {\n font-size: 14px;\n line-height: 1;\n font-weight: 600;\n }\n\n /*\n * Cost and the token buckets side by side: one number in its own box, the four buckets\n * sharing the box next to it. Stretch, so the two are the same height however tall the 22px\n * cost value makes the left one.\n */\n .settings-usage-row {\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n gap: calc(var(--design-unit) * 3px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-usage-row-tokens {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .settings-build-stat {\n min-width: 0;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n padding: calc(var(--design-unit) * 3px);\n }\n\n .settings-build-stat-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-build-stat-value {\n font-size: 22px;\n font-weight: 700;\n margin-top: calc(var(--design-unit) * 1px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-build-stat-value .prefix,\n .settings-build-stat-value .suffix {\n color: var(--accent-fill-rest);\n }\n\n /*\n * Per-bucket token split, beneath the headline cost. Small paired label/value cells\n * rather than four more stat cards: they are the detail behind the cost above, so they\n * have to read as subordinate to it rather than compete with it. The four buckets ARE\n * the token figure now — there is no merged total anywhere for them to break down.\n */\n .settings-token-breakdown {\n display: flex;\n flex-direction: column;\n\n /*\n * Tight against the buckets below. One design unit rather than two, because each bucket\n * separates its own label from its value by only 2px — at two units the title sat four\n * times further from the bucket labels than they sit from their own numbers, which read\n * as a gap between unrelated blocks instead of a heading over its content.\n */\n gap: calc(var(--design-unit) * 1px);\n margin-bottom: calc(var(--design-unit) * 3px);\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 3px);\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n /*\n * Titles the box, because nothing else in it named the unit. Same styling and position as\n * the cost box's label, so two boxes sitting side by side are titled the same way; the\n * hierarchy against the bucket labels comes from position, not a second type size.\n */\n .settings-token-breakdown-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-token-buckets {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-token-bucket {\n display: flex;\n\n /*\n * min-content (not 0) so a bucket cannot be shrunk narrower than its own unbreakable label.\n * With the label set to nowrap, a zero minimum would overflow it into the next column instead\n * of wrapping — so the container's flex-wrap takes over and moves a bucket to a second row,\n * which is the degradation we want when the modal is dragged narrow.\n */\n min-width: min-content;\n flex-direction: column;\n gap: 2px;\n }\n\n .settings-token-bucket-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n\n /*\n * One line, always. The rate marker is a separate inline box after collapsible whitespace, so\n * a wrappable label gives it a break opportunity of its own — in a narrow column it orphaned\n * onto line 2, which also pushed that bucket's value a line below the other three and broke\n * the row of figures. nowrap removes every break opportunity in the label, the space before\n * the marker included, so no glue character is needed.\n */\n white-space: nowrap;\n }\n\n .settings-token-bucket-value {\n font-size: 13px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * The price-direction marker on a cache bucket's label — down for reads (a fraction of the\n * uncached input rate), up for writes (a premium over it). Three tiers, so a bucket with no\n * marker is the reference rate rather than an unlabelled fourth case.\n *\n * Carried by the label rather than the value, which is what this used to do: cache reads are\n * usually the largest bucket by a wide margin in an agentic session, so the value was muted to\n * stop the biggest number reading as the dominant cost driver. That priced the treatment to the\n * wrong thing — a dimmed 0 (every Gemini cache write) looked disabled next to a normal 0, and a\n * rate is a property of the bucket, not of this turn's figure.\n *\n * Sized down and nudged up rather than tinted: the label is already the hint colour, so a\n * dimmer marker would vanish and a brighter one would out-shout the word it qualifies.\n */\n .settings-token-bucket-rate {\n font-size: 8px;\n line-height: 1;\n vertical-align: 0.15em;\n letter-spacing: 0;\n }\n\n /*\n * Usage-row overrides. Placed after the base rules they refine rather than up beside\n * .settings-usage-row itself, because stylelint's no-descending-specificity rejects a\n * compound selector appearing before the plain one it overrides.\n */\n\n /* Sized by its content; the buckets take the rest, since four cells need the width. */\n .settings-usage-row > .settings-build-stat {\n flex: 0 1 auto;\n }\n\n .settings-usage-row .settings-token-breakdown {\n flex: 1 1 auto;\n\n /* The row owns the spacing now; this centres the column against the taller cost box. */\n justify-content: center;\n margin-bottom: 0;\n }\n\n /*\n * Basis auto, not 0: a zero basis splits the row into four equal columns, so CACHE WRITE is\n * squeezed exactly as hard as INPUT despite being twice the label. Sizing from content gives the\n * long labels the room their text needs and lets the short ones concede it, which is what makes\n * white-space: nowrap above safe — every column starts at least as wide as its own content,\n * then shares the slack. Still grows and shrinks, so the four stay flush edge to edge.\n */\n .settings-usage-row .settings-token-bucket {\n flex: 1 1 auto;\n }\n\n .settings-model-tags {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-model-tag {\n font-size: 11px;\n font-weight: 600;\n padding: 3px 9px;\n border-radius: 20px;\n font-family: ui-monospace, monospace;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-model-tag,\n .settings-cost-history-icon {\n --model-tag-color: var(--neutral-foreground-rest);\n\n background: color-mix(\n in srgb,\n var(--model-tag-color) var(--ai-tier-badge-bg-mix),\n var(--neutral-layer-1)\n );\n border-color: color-mix(in srgb, var(--model-tag-color) 20%, var(--neutral-layer-1));\n color: color-mix(in srgb, var(--model-tag-color), white var(--ai-tier-badge-text-lighten));\n }\n\n .settings-cost-history-title {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--neutral-foreground-hint);\n font-weight: 600;\n margin: calc(var(--design-unit) * 4px) 0 calc(var(--design-unit) * 2px);\n }\n\n /*\n * The heading labels the lifetime card as well as the rows, so the card gives up its own top\n * margin and the gap becomes the heading's alone. Adjacent siblings collapse to the LARGER of\n * the two margins, so leaving both would space the caps 3 units off the block they label while\n * the rows below sit at 2 — reading as though the heading belonged to neither.\n */\n .settings-cost-history-title + .settings-lifetime-usage {\n margin-top: 0;\n }\n\n .settings-cost-history {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-icon {\n flex: 0 0 auto;\n width: 36px;\n height: 36px;\n border-radius: calc(var(--control-corner-radius) * 1px);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 700;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-cost-history-row {\n display: flex;\n flex-direction: column;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n }\n\n .settings-cost-history-row-content {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * All of these carry a ?hidden binding, and all declare display: flex — which silently beat the\n * UA [hidden] { display: none } rule, because author-origin declarations outrank user-agent\n * origin whatever the specificity. Without this, showTokens: false still rendered the full\n * breakdown in the lifetime block, the live block and every history row, and an empty row list\n * still occupied its padding under the lifetime total. Sibling elements that hide correctly do\n * so only by declaring no display at all. Same treatment as .settings-modal-tab-panel[hidden]\n * near the top of this file.\n */\n .settings-usage-row-tokens[hidden],\n .settings-cost-history[hidden],\n .settings-cost-history-row-content[hidden] {\n display: none !important;\n }\n\n /*\n * The buckets inside a history row drop the panel treatment they carry in the summary\n * blocks — the row is already a bordered card, and a second box inside it reads as a\n * nested panel. The adjacent-sibling rule above supplies the separator instead.\n */\n .settings-cost-history-row-breakdown .settings-token-breakdown {\n flex: 1 1 auto;\n margin-bottom: 0;\n padding: 0;\n background: none;\n border: none;\n }\n\n .settings-cost-history-row-content + .settings-cost-history-row-content {\n border-top: 1px solid var(--neutral-stroke-rest);\n margin-top: calc(var(--design-unit) * 2px);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-row-body {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n gap: calc(var(--design-unit) * 2px);\n justify-content: space-between;\n }\n\n /*\n * Holds the cost and the delete button as one centred pair. The button used to be a sibling\n * of the whole row body, kept in place by a -2px nudge tuned for when the metrics column had\n * two lines (cost plus a merged token total). Dropping that second line left the nudge\n * compensating for nothing. Centring the two against each other needs no magic number and\n * cannot drift again if the metrics content changes.\n *\n * NB this rule previously set align-items with no display:flex, so it had no effect at all.\n */\n .settings-cost-history-row-right {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 1px);\n flex: 0 0 auto;\n }\n\n .settings-cost-history-row-cost,\n .settings-cost-history-row-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n min-width: 0;\n }\n\n .settings-cost-history-row-metrics {\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n font-size: 13px;\n font-family: ui-monospace, monospace;\n color: var(--neutral-foreground-rest);\n white-space: nowrap;\n }\n\n .settings-cost-history-row-date {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete {\n flex: 0 0 auto;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete:hover {\n color: var(--error-color);\n }\n\n .settings-cost-history ::slotted(*) {\n display: block;\n }\n\n .settings-modal-footer {\n width: 100%;\n }\n\n .settings-done-button {\n margin-left: auto;\n }\n\n .settings-modal-footer-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n width: 100%;\n }\n\n .settings-disclaimer {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n max-width: 60%;\n line-height: 1.4;\n }\n\n /* The agent-log row's two actions (Download / Send) side by side. */\n .agent-log-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * Row + compose box. The row is normally the section's last child (no divider); inside\n * the wrapper it is only the last child while the box is closed, so drop the divider\n * explicitly and let the box supply its own spacing beneath the row.\n */\n .agent-log-block {\n display: flex;\n flex-direction: column;\n }\n\n .agent-log-block .settings-toggle-row {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .agent-log-compose {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .agent-log-note {\n width: 100%;\n }\n\n .agent-log-note::part(control) {\n width: 100%;\n box-sizing: border-box;\n font-size: 13px;\n line-height: 1.5;\n }\n\n .agent-log-compose-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 3px);\n }\n\n /* Counter / validation / failure line. Hint-coloured until it carries an error. */\n .agent-log-compose-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n min-width: 0;\n }\n\n /*\n * Failure state without leaning on --error-color: rapid's fixed brand red is 3.02:1 on a\n * light surface, under AA for 12px text, and the failure line is the one that most needs\n * reading. The contrast-adaptive foreground plus weight carries it; the text itself also\n * changes, so colour was never the only channel.\n */\n .agent-log-compose-hint.is-error {\n color: var(--neutral-foreground-rest);\n font-weight: 600;\n }\n\n /* Screen-reader-only live region for submission outcomes (same recipe as main.styles). */\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n\n /*\n * Inline spinner shown in the agent-log buttons (Download / Send) while the log\n * builds (GENC-1351 §5.8) — the lifetime-stitch path is an async provider\n * round-trip. Sized to the button label and tinted with currentColor so it tracks\n * the button's text colour in every appearance / theme.\n */\n [part='download-button'] .download-spinner,\n [part='submit-log-button'] .download-spinner,\n [part='agent-log-send-button'] .download-spinner {\n display: inline-block;\n width: 12px;\n height: 12px;\n margin-right: calc(var(--design-unit) * 1px);\n vertical-align: -1px;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: download-spin 0.6s linear infinite;\n }\n\n @keyframes download-spin {\n to {\n transform: rotate(360deg);\n }\n }\n`",
13821
+ "default": "css`\n /*\n * Section headings come from the shared fragment the package also exports, so a host titling\n * its own slotted section applies the same rule rather than a copy of it.\n */\n ${assistantSettingsSectionTitleStyles}\n\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n .settings-modal {\n --ai-tier-badge-bg-mix: 14%;\n --ai-tier-badge-text-lighten: 18%;\n }\n\n .settings-modal::part(dialog) {\n max-width: 620px;\n width: calc(100vw - 48px);\n max-height: calc(100vh - 48px);\n padding: 0;\n }\n\n .settings-modal::part(content) {\n display: flex;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n width: 100%;\n }\n\n .settings-modal::part(top) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal::part(bottom) {\n padding: calc(var(--design-unit) * 4px) calc(var(--design-unit) * 5px);\n border-top: 1px solid var(--neutral-stroke-rest);\n border-bottom-left-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n border-bottom-right-radius: var(--card-border-radius, calc(var(--control-corner-radius) * 1px));\n background-color: var(--neutral-layer-2);\n }\n\n .settings-modal-header {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .settings-modal-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-content {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n }\n\n .settings-modal-tabs::part(tablist) {\n border-bottom: 0;\n padding: 0 calc(var(--design-unit) * 5px);\n column-gap: calc(var(--design-unit) * 5px);\n }\n\n .settings-modal-tabs::part(activeIndicator) {\n height: 2px;\n }\n\n .settings-modal-tab {\n padding: 0;\n font-weight: 600;\n gap: 6px;\n }\n\n .settings-modal-tab[aria-selected='true'] {\n color: var(--neutral-foreground-rest);\n }\n\n .settings-modal-tabs::part(tabpanel) {\n border-top: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-tab-panel {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 auto;\n padding: 0;\n border-radius: 0;\n }\n\n .settings-modal-tab-panel[hidden] {\n display: none !important;\n }\n\n .settings-modal-body {\n overflow-y: auto;\n padding: 0 calc(var(--design-unit) * 5px) calc(var(--design-unit) * 2px);\n max-height: min(60vh, 520px);\n }\n\n .settings-modal-section {\n padding: calc(var(--design-unit) * 5px) 0;\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-modal-section:last-child {\n border-bottom: none;\n }\n\n /*\n * Only the spacing. Everything else about this heading comes from the exported fragment\n * above, which the assistant and its hosts share; margin is deliberately not in there,\n * since the gap below a heading depends on the layout around it.\n */\n .ai-settings-section-title {\n margin: 0 0 calc(var(--design-unit) * 3px);\n }\n\n .settings-modal-section-note {\n margin: calc(var(--design-unit) * -2px) 0 calc(var(--design-unit) * 3px);\n font-size: 12px;\n line-height: 1.5;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-modal-section-body {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-toggle-row {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 3px);\n padding: 0 0 calc(var(--design-unit) * 4px) 0;\n border-bottom: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-toggle-row:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-row.is-stacked {\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * For rows whose control is a button rather than a switch. The base row top-aligns, which suits\n * a switch (it lands level with the title), but a button is tall enough that top-aligning leaves\n * it above the title-plus-description block it acts on.\n */\n .settings-toggle-row.is-centered {\n align-items: center;\n }\n\n .settings-animation-list {\n display: flex;\n flex-direction: column;\n width: 100%;\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.2px);\n padding: calc(var(--design-unit) * 2px);\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-list .settings-toggle-row {\n border: 0;\n }\n\n .settings-animation-category {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-animation-category-label {\n font-weight: 600;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-toggle-row + .settings-animation-category-label {\n border-top: 1px solid var(--neutral-stroke-rest);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-animation-option {\n padding: 0;\n margin: 0;\n }\n\n .settings-animation-option:last-child {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-toggle-text {\n flex: 1;\n min-width: 0;\n }\n\n .settings-toggle-title {\n font-size: 14px;\n font-weight: 500;\n color: var(--neutral-foreground-rest);\n }\n\n .settings-toggle-desc {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.5;\n max-width: 92%;\n }\n\n .settings-toggle-control {\n flex: 0 0 auto;\n min-width: 0;\n }\n\n .settings-toggle-control-wide {\n width: 100%;\n max-width: 280px;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-desc {\n max-width: none;\n }\n\n .settings-toggle-row.is-stacked .settings-toggle-control-wide {\n width: 100%;\n max-width: none;\n }\n\n /*\n * Sub-heading over the provider toggle group. Unlike the section headings it sits INSIDE\n * .settings-modal-section-body, so the parent's 4-unit flex gap already separates it from the\n * first toggle — and flex does not collapse margins, so the shared rule's 3-unit margin-bottom\n * would add to that gap rather than replace it, leaving the label adrift from the rows it\n * names. Zero the margin and pull back 2 of the 4 gap units, expressed in the same token so it\n * tracks if that gap changes.\n */\n .settings-app-toggles-title {\n margin: 0 0 calc(var(--design-unit) * -2px);\n }\n\n .settings-app-toggle-block {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 1px);\n }\n\n .settings-toggle-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n line-height: 1.4;\n padding-left: calc(var(--design-unit) * 1px);\n font-style: italic;\n }\n\n /*\n * The budget meter (GENC-1464) is the context indicator's money sibling and\n * shares its row anatomy 1:1, so the budget classes JOIN these rules rather\n * than restating them — one place to restyle the header/label/figures shape,\n * and the two indicators cannot drift apart. Design-system tokens only, and\n * unfallbacked: every token here ships a DS default, so a var(--x, y)\n * fallback would be dead code that hides a broken token name (#2411/#2436\n * review rule, pinned by settings-modal.styles.test.ts).\n */\n .settings-context-header,\n .settings-budget-header {\n display: flex;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 2px);\n font-size: 12px;\n }\n\n .settings-context-label,\n .settings-budget-label {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n }\n\n .settings-context-tokens,\n .settings-budget-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * Stacked budget bar (NEW-15): only drawn when the host broke a vendor's spend down.\n * Sized off the design system's progress element rather than a figure of its own, so the\n * segmented row and the plain one line up in the same meter — a vendor with a breakdown\n * and one without sit next to each other.\n *\n * The pieces are tones of ONE accent, not a palette: the assistant is themed by whatever\n * design system hosts it, so inventing chart colours here would collide with every one of\n * them. Tone is positional and carries no meaning on its own, which is why the legend\n * below is part of the drawing rather than an optional extra.\n */\n .settings-budget-stack {\n display: flex;\n overflow: hidden;\n width: 100%;\n\n /* The design system's own progress metrics, so a segmented row and a plain one are the\n same bar at the same height with the same rhythm around them. */\n height: calc(var(--design-unit) * 2px);\n margin: calc(var(--design-unit) * 1px) 0;\n border-radius: calc(var(--design-unit) * 1px);\n background: var(--neutral-fill-rest);\n }\n\n .settings-budget-segment {\n height: 100%;\n\n /* The fill colour the progress element's determinate bar uses, not the button accent. */\n background: var(--accent-foreground-rest);\n\n /*\n * Set per piece by the template. Unfallbacked like every token here: an unset custom\n * property makes the declaration invalid at computed-value time, which lands on opacity's\n * initial value of 1 — the same thing a fallback would say, without a second copy of it.\n */\n opacity: var(--segment-tone);\n }\n\n /*\n * A hairline in the track colour between adjacent pieces, so every boundary is visible even\n * where two pieces share a tone (from the fourth named segment on, the tones bottom out at a\n * floor and repeat). Drawn as a border, not a flex gap: with border-box sizing the hairline comes out of\n * the piece's own width, so the pieces still add up to what the arithmetic gave them.\n */\n .settings-budget-segment + .settings-budget-segment {\n border-left: 1px solid var(--neutral-fill-rest);\n }\n\n .settings-budget-legend {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 1.5px);\n font-size: 11px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-budget-legend-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n\n .settings-budget-swatch {\n width: 8px;\n height: 8px;\n border-radius: 2px;\n background: var(--accent-foreground-rest);\n opacity: var(--segment-tone);\n }\n\n .settings-budget-legend-figures {\n color: var(--neutral-foreground-rest);\n }\n\n /* Freshness footer (GENC-1464): refresh button + label under the vendor\n rows, left-aligned — a footnote to the figures above it. The button's\n inline padding is pinned and cancelled by the container margin so the\n ICON GLYPH (not the button box) sits flush with the budget labels'\n left edge, whatever the density tokens say. */\n .settings-budget-toolbar {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n gap: 4px;\n margin-inline-start: -4px;\n }\n\n .settings-budget-refresh::part(control) {\n padding-inline: 4px;\n }\n\n .settings-budget-updated {\n color: var(--neutral-foreground-hint);\n font-size: 11px;\n }\n\n /*\n * ONE rhythm for every meter row. The outer wrapper holds the context\n * indicator and the budget meter; the inner one holds the budget meter's\n * vendor rows — and both gap by the same 2 units (half the section body's 4)\n * so that visually identical meter rows are evenly spaced whatever mix of\n * them is on screen. Without the wrapper the context row inherits the body's\n * 4-unit gap while the vendor rows keep 2, and three identical-looking rows\n * read as an uneven 4/2/2. The wrapper renders only when at least one meter\n * does — see settingsUsageMetersTemplate for why an always-on one would cost\n * a stray gap.\n */\n .settings-usage-meters,\n .settings-budget-usage {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-current-build,\n .settings-lifetime-usage {\n background: var(--neutral-layer-2);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n margin: calc(var(--design-unit) * 3px) 0;\n }\n\n /*\n * Deliberately quieter than the live block: no pulsing badge and no accent, so the eye lands\n * on what is being built now — which is why that block leads the tab and this one follows,\n * under the history heading whose rows it totals.\n */\n .settings-lifetime-usage-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-lifetime-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-current-build-top {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n /*\n * Optically centring these 10px caps against the 14px project name beside them. Flex offers\n * only two alignments and neither lands it, because a box centre and a text baseline are\n * different lines:\n * - align-items: center sits the badge baseline about 1.2px high\n * - align-items: baseline matches baselines, but the caps then read as bottom-aligned\n * against the name's ascenders, so the badge looks low\n * The eye wants the midpoint, so: centre the boxes, then translate down by the ~1px of\n * overshoot. This is a nudge, but it corrects a fixed relationship between two font sizes\n * rather than some neighbouring element's layout, so unlike a margin tuned to a sibling it\n * cannot rot when that sibling changes. In em, so it tracks the badge text.\n *\n * display: block, not inline-flex: a flex container has no text baseline of its own and\n * synthesizes one from its first child, which here is the dot, an empty span. As a block box\n * the badge takes the baseline of its first line, i.e. the text.\n */\n .settings-live-badge {\n display: block;\n font-size: 10px;\n line-height: 1;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--accent-fill-rest);\n white-space: nowrap;\n transform: translateY(0.1em);\n }\n\n .settings-live-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n\n /* Replaces the flex gap the badge no longer has. */\n margin-right: calc(var(--design-unit) * 1px);\n\n /* Centres the dot on the text beside it without disturbing that text's baseline. */\n vertical-align: middle;\n border-radius: 50%;\n background: var(--accent-fill-rest);\n animation: settings-live-pulse 1.6s ease-out infinite;\n }\n\n @keyframes settings-live-pulse {\n 0% {\n box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-fill-rest) 55%, transparent);\n }\n\n 70% {\n box-shadow: 0 0 0 7px transparent;\n }\n\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n .settings-current-build-name {\n font-size: 14px;\n line-height: 1;\n font-weight: 600;\n }\n\n /*\n * Cost and the token buckets side by side: one number in its own box, the four buckets\n * sharing the box next to it. Stretch, so the two are the same height however tall the 22px\n * cost value makes the left one.\n */\n .settings-usage-row {\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n gap: calc(var(--design-unit) * 3px);\n margin-bottom: calc(var(--design-unit) * 3px);\n }\n\n .settings-usage-row-tokens {\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .settings-build-stat {\n min-width: 0;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n padding: calc(var(--design-unit) * 3px);\n }\n\n .settings-build-stat-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-build-stat-value {\n font-size: 22px;\n font-weight: 700;\n margin-top: calc(var(--design-unit) * 1px);\n color: var(--neutral-foreground-rest);\n }\n\n .settings-build-stat-value .prefix,\n .settings-build-stat-value .suffix {\n color: var(--accent-fill-rest);\n }\n\n /*\n * Per-bucket token split, beneath the headline cost. Small paired label/value cells\n * rather than four more stat cards: they are the detail behind the cost above, so they\n * have to read as subordinate to it rather than compete with it. The four buckets ARE\n * the token figure now — there is no merged total anywhere for them to break down.\n */\n .settings-token-breakdown {\n display: flex;\n flex-direction: column;\n\n /*\n * Tight against the buckets below. One design unit rather than two, because each bucket\n * separates its own label from its value by only 2px — at two units the title sat four\n * times further from the bucket labels than they sit from their own numbers, which read\n * as a gap between unrelated blocks instead of a heading over its content.\n */\n gap: calc(var(--design-unit) * 1px);\n margin-bottom: calc(var(--design-unit) * 3px);\n padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 3px);\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1px);\n }\n\n /*\n * Titles the box, because nothing else in it named the unit. Same styling and position as\n * the cost box's label, so two boxes sitting side by side are titled the same way; the\n * hierarchy against the bucket labels comes from position, not a second type size.\n */\n .settings-token-breakdown-label {\n font-size: 10px;\n line-height: 1;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-token-buckets {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 4px);\n }\n\n .settings-token-bucket {\n display: flex;\n\n /*\n * min-content (not 0) so a bucket cannot be shrunk narrower than its own unbreakable label.\n * With the label set to nowrap, a zero minimum would overflow it into the next column instead\n * of wrapping — so the container's flex-wrap takes over and moves a bucket to a second row,\n * which is the degradation we want when the modal is dragged narrow.\n */\n min-width: min-content;\n flex-direction: column;\n gap: 2px;\n }\n\n .settings-token-bucket-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--neutral-foreground-hint);\n\n /*\n * One line, always. The rate marker is a separate inline box after collapsible whitespace, so\n * a wrappable label gives it a break opportunity of its own — in a narrow column it orphaned\n * onto line 2, which also pushed that bucket's value a line below the other three and broke\n * the row of figures. nowrap removes every break opportunity in the label, the space before\n * the marker included, so no glue character is needed.\n */\n white-space: nowrap;\n }\n\n .settings-token-bucket-value {\n font-size: 13px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n }\n\n /*\n * The price-direction marker on a cache bucket's label — down for reads (a fraction of the\n * uncached input rate), up for writes (a premium over it). Three tiers, so a bucket with no\n * marker is the reference rate rather than an unlabelled fourth case.\n *\n * Carried by the label rather than the value, which is what this used to do: cache reads are\n * usually the largest bucket by a wide margin in an agentic session, so the value was muted to\n * stop the biggest number reading as the dominant cost driver. That priced the treatment to the\n * wrong thing — a dimmed 0 (every Gemini cache write) looked disabled next to a normal 0, and a\n * rate is a property of the bucket, not of this turn's figure.\n *\n * Sized down and nudged up rather than tinted: the label is already the hint colour, so a\n * dimmer marker would vanish and a brighter one would out-shout the word it qualifies.\n */\n .settings-token-bucket-rate {\n font-size: 8px;\n line-height: 1;\n vertical-align: 0.15em;\n letter-spacing: 0;\n }\n\n /*\n * Usage-row overrides. Placed after the base rules they refine rather than up beside\n * .settings-usage-row itself, because stylelint's no-descending-specificity rejects a\n * compound selector appearing before the plain one it overrides.\n */\n\n /* Sized by its content; the buckets take the rest, since four cells need the width. */\n .settings-usage-row > .settings-build-stat {\n flex: 0 1 auto;\n }\n\n .settings-usage-row .settings-token-breakdown {\n flex: 1 1 auto;\n\n /* The row owns the spacing now; this centres the column against the taller cost box. */\n justify-content: center;\n margin-bottom: 0;\n }\n\n /*\n * Basis auto, not 0: a zero basis splits the row into four equal columns, so CACHE WRITE is\n * squeezed exactly as hard as INPUT despite being twice the label. Sizing from content gives the\n * long labels the room their text needs and lets the short ones concede it, which is what makes\n * white-space: nowrap above safe — every column starts at least as wide as its own content,\n * then shares the slack. Still grows and shrinks, so the four stay flush edge to edge.\n */\n .settings-usage-row .settings-token-bucket {\n flex: 1 1 auto;\n }\n\n .settings-model-tags {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--design-unit) * 2px);\n }\n\n .settings-model-tag {\n font-size: 11px;\n font-weight: 600;\n padding: 3px 9px;\n border-radius: 20px;\n font-family: ui-monospace, monospace;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-model-tag,\n .settings-cost-history-icon {\n --model-tag-color: var(--neutral-foreground-rest);\n\n background: color-mix(\n in srgb,\n var(--model-tag-color) var(--ai-tier-badge-bg-mix),\n var(--neutral-layer-1)\n );\n border-color: color-mix(in srgb, var(--model-tag-color) 20%, var(--neutral-layer-1));\n color: color-mix(in srgb, var(--model-tag-color), white var(--ai-tier-badge-text-lighten));\n }\n\n .settings-cost-history-title {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--neutral-foreground-hint);\n font-weight: 600;\n margin: calc(var(--design-unit) * 4px) 0 calc(var(--design-unit) * 2px);\n }\n\n /*\n * The heading labels the lifetime card as well as the rows, so the card gives up its own top\n * margin and the gap becomes the heading's alone. Adjacent siblings collapse to the LARGER of\n * the two margins, so leaving both would space the caps 3 units off the block they label while\n * the rows below sit at 2 — reading as though the heading belonged to neither.\n */\n .settings-cost-history-title + .settings-lifetime-usage {\n margin-top: 0;\n }\n\n .settings-cost-history {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n padding-bottom: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-icon {\n flex: 0 0 auto;\n width: 36px;\n height: 36px;\n border-radius: calc(var(--control-corner-radius) * 1px);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 700;\n border: 1px solid var(--neutral-stroke-rest);\n }\n\n .settings-cost-history-row {\n display: flex;\n flex-direction: column;\n background: var(--neutral-layer-1);\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: calc(var(--control-corner-radius) * 1.5px);\n padding: calc(var(--design-unit) * 4px);\n }\n\n .settings-cost-history-row-content {\n display: flex;\n align-items: flex-start;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * All of these carry a ?hidden binding, and all declare display: flex — which silently beat the\n * UA [hidden] { display: none } rule, because author-origin declarations outrank user-agent\n * origin whatever the specificity. Without this, showTokens: false still rendered the full\n * breakdown in the lifetime block, the live block and every history row, and an empty row list\n * still occupied its padding under the lifetime total. Sibling elements that hide correctly do\n * so only by declaring no display at all. Same treatment as .settings-modal-tab-panel[hidden]\n * near the top of this file.\n */\n .settings-usage-row-tokens[hidden],\n .settings-cost-history[hidden],\n .settings-cost-history-row-content[hidden] {\n display: none !important;\n }\n\n /*\n * The buckets inside a history row drop the panel treatment they carry in the summary\n * blocks — the row is already a bordered card, and a second box inside it reads as a\n * nested panel. The adjacent-sibling rule above supplies the separator instead.\n */\n .settings-cost-history-row-breakdown .settings-token-breakdown {\n flex: 1 1 auto;\n margin-bottom: 0;\n padding: 0;\n background: none;\n border: none;\n }\n\n .settings-cost-history-row-content + .settings-cost-history-row-content {\n border-top: 1px solid var(--neutral-stroke-rest);\n margin-top: calc(var(--design-unit) * 2px);\n padding-top: calc(var(--design-unit) * 2px);\n }\n\n .settings-cost-history-row-body {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n gap: calc(var(--design-unit) * 2px);\n justify-content: space-between;\n }\n\n /*\n * Holds the cost and the delete button as one centred pair. The button used to be a sibling\n * of the whole row body, kept in place by a -2px nudge tuned for when the metrics column had\n * two lines (cost plus a merged token total). Dropping that second line left the nudge\n * compensating for nothing. Centring the two against each other needs no magic number and\n * cannot drift again if the metrics content changes.\n *\n * NB this rule previously set align-items with no display:flex, so it had no effect at all.\n */\n .settings-cost-history-row-right {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 1px);\n flex: 0 0 auto;\n }\n\n .settings-cost-history-row-cost,\n .settings-cost-history-row-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--neutral-foreground-rest);\n min-width: 0;\n }\n\n .settings-cost-history-row-metrics {\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n font-size: 13px;\n font-family: ui-monospace, monospace;\n color: var(--neutral-foreground-rest);\n white-space: nowrap;\n }\n\n .settings-cost-history-row-date {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete {\n flex: 0 0 auto;\n color: var(--neutral-foreground-hint);\n }\n\n .settings-cost-history-delete:hover {\n color: var(--error-color);\n }\n\n .settings-cost-history ::slotted(*) {\n display: block;\n }\n\n .settings-modal-footer {\n width: 100%;\n }\n\n .settings-done-button {\n margin-left: auto;\n }\n\n .settings-modal-footer-actions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 2px);\n width: 100%;\n }\n\n .settings-disclaimer {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n max-width: 60%;\n line-height: 1.4;\n }\n\n /* The agent-log row's two actions (Download / Send) side by side. */\n .agent-log-actions {\n display: flex;\n align-items: center;\n gap: calc(var(--design-unit) * 2px);\n }\n\n /*\n * Row + compose box. The row is normally the section's last child (no divider); inside\n * the wrapper it is only the last child while the box is closed, so drop the divider\n * explicitly and let the box supply its own spacing beneath the row.\n */\n .agent-log-block {\n display: flex;\n flex-direction: column;\n }\n\n .agent-log-block .settings-toggle-row {\n border-bottom: none;\n padding-bottom: calc(var(--design-unit) * 1px);\n }\n\n .agent-log-compose {\n display: flex;\n flex-direction: column;\n gap: calc(var(--design-unit) * 2px);\n margin-top: calc(var(--design-unit) * 2px);\n }\n\n .agent-log-note {\n width: 100%;\n }\n\n .agent-log-note::part(control) {\n width: 100%;\n box-sizing: border-box;\n font-size: 13px;\n line-height: 1.5;\n }\n\n .agent-log-compose-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: calc(var(--design-unit) * 3px);\n }\n\n /* Counter / validation / failure line. Hint-coloured until it carries an error. */\n .agent-log-compose-hint {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n min-width: 0;\n }\n\n /*\n * Failure state without leaning on --error-color: rapid's fixed brand red is 3.02:1 on a\n * light surface, under AA for 12px text, and the failure line is the one that most needs\n * reading. The contrast-adaptive foreground plus weight carries it; the text itself also\n * changes, so colour was never the only channel.\n */\n .agent-log-compose-hint.is-error {\n color: var(--neutral-foreground-rest);\n font-weight: 600;\n }\n\n /* Screen-reader-only live region for submission outcomes (same recipe as main.styles). */\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n\n /*\n * Inline spinner shown in the agent-log buttons (Download / Send) while the log\n * builds (GENC-1351 §5.8) — the lifetime-stitch path is an async provider\n * round-trip. Sized to the button label and tinted with currentColor so it tracks\n * the button's text colour in every appearance / theme.\n */\n [part='download-button'] .download-spinner,\n [part='submit-log-button'] .download-spinner,\n [part='agent-log-send-button'] .download-spinner {\n display: inline-block;\n width: 12px;\n height: 12px;\n margin-right: calc(var(--design-unit) * 1px);\n vertical-align: -1px;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: download-spin 0.6s linear infinite;\n }\n\n @keyframes download-spin {\n to {\n transform: rotate(360deg);\n }\n }\n`",
13496
13822
  "description": "Styles for the assistant settings modal (tabs, sections, toggles, cost summary)."
13497
13823
  }
13498
13824
  ],
@@ -23,8 +23,8 @@ export * from './channel/ai-activity-bus';
23
23
  export * from './config/config';
24
24
  export * from './config/define-stateful-agent';
25
25
  export * from './config/fallback-agents';
26
- export { AnthropicProvider, AnthropicTransport, GeminiProvider, GeminiTransport, MutableAIProviderRegistry, SUPPORTED_ANTHROPIC_MODEL_IDS, SUPPORTED_GEMINI_MODEL_IDS, DEFAULT_PROVIDER_REFUSED_MESSAGE, PROVIDER_REFUSED_CODE, ProviderRefusedError, isObservableAIProviderRegistry, ANTHROPIC_CACHE_READ_MULTIPLIER, ANTHROPIC_CACHE_WRITE_1H_MULTIPLIER, ANTHROPIC_CACHE_WRITE_5M_MULTIPLIER, anthropicRatesFor, anthropicTokenCost, GEMINI_CACHED_INPUT_MULTIPLIER, GEMINI_LONG_CONTEXT_THRESHOLD, geminiRatesFor, geminiTokenCost, vendorOfModel, } from '@genesislcap/foundation-ai';
27
- export type { AggregateUsage, AIProvider, AIProviderRegistry, AnthropicModelId, CachePolicy, ChatAttachment, ChatFallback, ChatImageAttachment, ChatMessage, ChatRequestOptions, ChatTextAttachment, ChatThinkingPolicy, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, ChatToolResult, GeminiModelId, AnthropicUsageRecord, GeminiUsageRecord, TokenCost, TokenCostBreakdown, TokenRates, } from '@genesislcap/foundation-ai';
26
+ export { AnthropicProvider, AnthropicTransport, GeminiProvider, GeminiTransport, MutableAIProviderRegistry, SUPPORTED_ANTHROPIC_MODEL_IDS, SUPPORTED_GEMINI_MODEL_IDS, DEFAULT_PROVIDER_REFUSED_MESSAGE, PROVIDER_REFUSED_CODE, ProviderRefusedError, isObservableAIProviderRegistry, ANTHROPIC_CACHE_READ_MULTIPLIER, ANTHROPIC_CACHE_WRITE_1H_MULTIPLIER, ANTHROPIC_CACHE_WRITE_5M_MULTIPLIER, anthropicRatesFor, anthropicTokenCost, GEMINI_CACHED_INPUT_MULTIPLIER, GEMINI_LONG_CONTEXT_THRESHOLD, geminiRatesFor, geminiTokenCost, vendorOfModel, AI_TIER_IDS, AI_TIER_VENDORS, DEFAULT_AI_TIERS, resolveAITiers, } from '@genesislcap/foundation-ai';
27
+ export type { AggregateUsage, AIProvider, AIProviderRegistry, AnthropicModelId, CachePolicy, ChatAttachment, ChatFallback, ChatImageAttachment, ChatMessage, ChatRequestOptions, ChatTextAttachment, ChatThinkingPolicy, ChatToolChoice, ChatToolDefinition, ChatToolHandlers, ChatToolResult, GeminiModelId, AITierId, AITierOverrides, AITiers, AITierVendor, AnthropicTierConfig, GeminiTierConfig, AnthropicUsageRecord, GeminiUsageRecord, TokenCost, TokenCostBreakdown, TokenRates, } from '@genesislcap/foundation-ai';
28
28
  export { addUsage, emptyUsage, messageUsage, sumUsage, totalTokens } from './utils/sum-usage';
29
29
  export { usageRows } from './utils/usage-rows';
30
30
  export type { UsageRow } from './utils/usage-rows';
@@ -1 +1 @@
1
- {"version":3,"file":"chat-driver-node.d.ts","sourceRoot":"","sources":["../../src/chat-driver-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AASzC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,yBAAyB,EAKzB,6BAA6B,EAC7B,0BAA0B,EAQ1B,gCAAgC,EAChC,qBAAqB,EACrB,oBAAoB,EACpB,8BAA8B,EAW9B,+BAA+B,EAC/B,mCAAmC,EACnC,mCAAmC,EACnC,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,6BAA6B,EAC7B,cAAc,EACd,eAAe,EAGf,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAGV,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EAIX,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,aAAa,EAIb,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,GACX,MAAM,4BAA4B,CAAC;AAoBpC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAS9F,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AASnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,YAAY,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAKnF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"chat-driver-node.d.ts","sourceRoot":"","sources":["../../src/chat-driver-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AASzC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,yBAAyB,EAKzB,6BAA6B,EAC7B,0BAA0B,EAQ1B,gCAAgC,EAChC,qBAAqB,EACrB,oBAAoB,EACpB,8BAA8B,EAW9B,+BAA+B,EAC/B,mCAAmC,EACnC,mCAAmC,EACnC,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,6BAA6B,EAC7B,cAAc,EACd,eAAe,EAGf,aAAa,EAUb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAGV,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EAIX,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,aAAa,EAGb,QAAQ,EACR,eAAe,EACf,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAIhB,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,GACX,MAAM,4BAA4B,CAAC;AAoBpC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAS9F,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AASnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,YAAY,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAKnF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings-modal.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/settings-modal/settings-modal.styles.ts"],"names":[],"mappings":"AAGA,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,iDAg6B/B,CAAC"}
1
+ {"version":3,"file":"settings-modal.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/settings-modal/settings-modal.styles.ts"],"names":[],"mappings":"AAGA,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,iDA2+B/B,CAAC"}
@@ -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,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,eAAO,MAAM,uBAAuB,GAClC,WAAW,MAAM,EACjB,aAAa,MAAM,KAClB,YAAY,CAAC,qBAAqB,CAiKpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAgLpC,CAAC"}
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;AAqF7D;;;;;;;;;;;;;;;;;;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;AAyNnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,2BAA2B,GACtC,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,SAAS,MAAM,KACd,YAAY,CAAC,qBAAqB,CAUpC,CAAC;AAobF,eAAO,MAAM,uBAAuB,GAClC,WAAW,MAAM,EACjB,aAAa,MAAM,KAClB,YAAY,CAAC,qBAAqB,CAiKpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,oBAAoB,MAAM,KACzB,YAAY,CAAC,qBAAqB,CAgLpC,CAAC"}
@@ -14,7 +14,9 @@ export * from './config/config';
14
14
  export * from './config/define-stateful-agent';
15
15
  export * from './config/fallback-agents';
16
16
  export * from './state/persistence';
17
+ export type { VendorBudgetFigures, VendorBudgetSegment } from './state/ai-assistant-slice';
17
18
  export * from './provider/ai-provider-switcher';
19
+ export * from './provider/tiered-provider-switcher';
18
20
  export * from './provider/assistant-app-settings';
19
21
  export * from './utils/tool-fold';
20
22
  export { assistantSettingsSectionTitleStyles } from './styles/settings-section';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,gEAAgE,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,YAAY,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,gEAAgE,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AAGpC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,2BAA2B,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,YAAY,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC"}