@genesislcap/ai-assistant 15.6.2 → 15.7.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 (64) hide show
  1. package/dist/ai-assistant.api.json +391 -5
  2. package/dist/ai-assistant.d.ts +613 -6
  3. package/dist/chat-driver.cjs +285 -26
  4. package/dist/chat-driver.cjs.map +3 -3
  5. package/dist/chat-driver.mjs +285 -26
  6. package/dist/chat-driver.mjs.map +3 -3
  7. package/dist/custom-elements.json +254 -10
  8. package/dist/dts/channel/ai-activity-channel.d.ts +51 -1
  9. package/dist/dts/channel/ai-activity-channel.d.ts.map +1 -1
  10. package/dist/dts/components/chat-driver/chat-driver.d.ts +99 -1
  11. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  12. package/dist/dts/components/chat-driver/chat-driver.test.d.ts.map +1 -1
  13. package/dist/dts/components/orchestrating-driver/orchestrating-driver.budget.test.d.ts +2 -0
  14. package/dist/dts/components/orchestrating-driver/orchestrating-driver.budget.test.d.ts.map +1 -0
  15. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +14 -0
  16. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  17. package/dist/dts/main/blocked-state.test.d.ts +2 -0
  18. package/dist/dts/main/blocked-state.test.d.ts.map +1 -0
  19. package/dist/dts/main/main.d.ts +394 -6
  20. package/dist/dts/main/main.d.ts.map +1 -1
  21. package/dist/dts/main/main.styles.d.ts.map +1 -1
  22. package/dist/dts/main/main.styles.test.d.ts +2 -0
  23. package/dist/dts/main/main.styles.test.d.ts.map +1 -0
  24. package/dist/dts/main/main.template.d.ts +53 -0
  25. package/dist/dts/main/main.template.d.ts.map +1 -1
  26. package/dist/dts/state/ai-assistant-slice.d.ts +162 -6
  27. package/dist/dts/state/ai-assistant-slice.d.ts.map +1 -1
  28. package/dist/dts/state/debug-event-log.d.ts +6 -1
  29. package/dist/dts/state/debug-event-log.d.ts.map +1 -1
  30. package/dist/dts/state/session-store.d.ts +11 -0
  31. package/dist/dts/state/session-store.d.ts.map +1 -1
  32. package/dist/esm/components/chat-driver/chat-driver.js +263 -21
  33. package/dist/esm/components/chat-driver/chat-driver.test.js +464 -1
  34. package/dist/esm/components/orchestrating-driver/orchestrating-driver.budget.test.js +312 -0
  35. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +89 -4
  36. package/dist/esm/main/blocked-state.test.js +969 -0
  37. package/dist/esm/main/main.js +704 -16
  38. package/dist/esm/main/main.styles.js +47 -0
  39. package/dist/esm/main/main.styles.test.js +86 -0
  40. package/dist/esm/main/main.template.js +121 -4
  41. package/dist/esm/state/ai-assistant-slice.js +145 -7
  42. package/dist/esm/state/ai-assistant-slice.test.js +138 -1
  43. package/dist/esm/state/debug-event-log.js +7 -2
  44. package/dist/esm/state/debug-event-log.test.js +49 -1
  45. package/dist/esm/state/persistence/session-snapshot.test.js +18 -0
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/docs/migration-GENC-1464.md +562 -0
  48. package/docs/sub_agent.md +20 -3
  49. package/package.json +17 -17
  50. package/src/channel/ai-activity-channel.ts +56 -2
  51. package/src/components/chat-driver/chat-driver.test.ts +549 -0
  52. package/src/components/chat-driver/chat-driver.ts +324 -14
  53. package/src/components/orchestrating-driver/orchestrating-driver.budget.test.ts +438 -0
  54. package/src/components/orchestrating-driver/orchestrating-driver.ts +101 -6
  55. package/src/main/blocked-state.test.ts +1316 -0
  56. package/src/main/main.styles.test.ts +103 -0
  57. package/src/main/main.styles.ts +47 -0
  58. package/src/main/main.template.ts +131 -4
  59. package/src/main/main.ts +704 -10
  60. package/src/state/ai-assistant-slice.test.ts +215 -0
  61. package/src/state/ai-assistant-slice.ts +218 -8
  62. package/src/state/debug-event-log.test.ts +63 -0
  63. package/src/state/debug-event-log.ts +7 -2
  64. package/src/state/persistence/session-snapshot.test.ts +22 -0
@@ -1,4 +1,4 @@
1
- import type { AggregateUsage, AIProviderRegistryStatusEntry, ChatInputDuringExecutionMode, ChatMessage } from '@genesislcap/foundation-ai';
1
+ import type { AggregateUsage, AIProviderRegistryStatusEntry, AIProviderType, ChatInputDuringExecutionMode, ChatMessage } from '@genesislcap/foundation-ai';
2
2
  import type { PayloadAction } from '@genesislcap/foundation-redux';
3
3
  import type { AgentConfig } from '../config/config';
4
4
  import type { AiAssistantAnimation, AiAssistantState, SuggestionsState } from '../main/main.types';
@@ -53,6 +53,10 @@ export interface AiAssistantSessionState {
53
53
  * Snapshot of every registered provider's status, in registration order.
54
54
  * Populated on connect (or on settings-open if not yet loaded) and reused
55
55
  * for the lifetime of the session — provider registration is static.
56
+ *
57
+ * Describes the registry rather than the conversation, so it survives
58
+ * {@link resetSession} ("Clear" / "New chat"); see the reasoning there. Only
59
+ * a registry change (via the observable-registry subscription) rewrites it.
56
60
  */
57
61
  providerStatuses: AIProviderRegistryStatusEntry[];
58
62
  activeAgent: Omit<AgentConfig, 'toolHandlers'> | undefined;
@@ -108,6 +112,66 @@ export interface AiAssistantSessionState {
108
112
  * being clobbered** when the restored history loads.
109
113
  */
110
114
  restoring: boolean;
115
+ /**
116
+ * Whether the assistant is **blocked by a backend condition** and cannot send
117
+ * at all — today, an exhausted AI-spend budget (GENC-1464). Unlike `compacting`
118
+ * and `restoring`, which are short-lived in-flight flags that clear
119
+ * themselves, this is a **latched** state: nothing the user or the element
120
+ * does clears it, because nothing they can do fixes it. It stays set until the
121
+ * host writes `blocked = false` (typically after a fresh pre-flight shows
122
+ * budget available again).
123
+ *
124
+ * Also unlike those two, it does **not** replace the transcript — the user
125
+ * keeps their conversation and gets a banner above a disabled composer.
126
+ *
127
+ * In the slice so the banner + input-disable stay in sync across pop-in/out.
128
+ * Preserved across `resetSession` ("Clear" / "New chat"): starting a new chat
129
+ * does not refill the budget.
130
+ *
131
+ * **Vendor-agnostic.** Under per-vendor budgets this means "blocked whatever
132
+ * vendor you use" — a host-set block, or a wall that could not be attributed
133
+ * to a vendor. A wall that WAS attributed lands in
134
+ * {@link AiAssistantSessionState.blockedVendors} instead, and the element
135
+ * derives its public `blocked` from the two together.
136
+ */
137
+ blocked: boolean;
138
+ /**
139
+ * Host- or driver-supplied explanation shown in the blocked banner. `null`
140
+ * falls back to the element's default copy. Meaningless while
141
+ * {@link AiAssistantSessionState.blocked} is false.
142
+ */
143
+ blockedReason: string | null;
144
+ /**
145
+ * Vendors walled by the AI-spend budget (GENC-1464 per-vendor), in the order they
146
+ * were walled.
147
+ *
148
+ * An **array**, not a `Set` and not one `Record<AIProviderType, {...}>`:
149
+ * a `Set` is neither plain JSON for the redux store nor structured-cloneable
150
+ * across the tab channel; the order is what the multi-vendor banner copy
151
+ * ("Anthropic and Gemini") reads; and a combined record would conflate "not
152
+ * walled" with "walled, no reason".
153
+ *
154
+ * Empty for every host that never adopts the per-vendor API — which is what
155
+ * makes the element's derived `blocked` byte-identical to the old stored one.
156
+ */
157
+ blockedVendors: AIProviderType[];
158
+ /**
159
+ * The subset of {@link AiAssistantSessionState.blockedVendors} walled by the
160
+ * `otherVendorAvailable: false` SWEEP rather than by a refusal of their own.
161
+ * Provenance, not a second wall list: for locking, `blockedVendors` remains
162
+ * the whole truth. The distinction exists for the banner's unknown-reachability
163
+ * fallback — a refusal is a fact about a vendor the user just used and is
164
+ * nameable anywhere; a sweep entry is a headroom fact about the PROXY, and
165
+ * naming it before the statuses reveal whether the host even ships that vendor
166
+ * put a vendor in front of the user that may not be theirs.
167
+ */
168
+ sweptVendors: AIProviderType[];
169
+ /**
170
+ * Per-vendor banner copy, keyed by a member of
171
+ * {@link AiAssistantSessionState.blockedVendors}. A missing entry falls back to
172
+ * copy composed from the vendor's display name.
173
+ */
174
+ blockedVendorReasons: Partial<Record<AIProviderType, string>>;
111
175
  /** Draft text in the input box — preserved across pop-in/pop-out cycles. */
112
176
  inputValue: string;
113
177
  /** Live trace from a currently-executing sub-agent. Cleared on sub-agent-stop. */
@@ -169,6 +233,68 @@ export declare const aiAssistantSlice: import("@reduxjs/toolkit").Slice<AiAssist
169
233
  setSessionMenuOpen(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<boolean>): void;
170
234
  setCompacting(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<boolean>): void;
171
235
  setRestoring(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<boolean>): void;
236
+ /**
237
+ * Latch (or release) the backend-blocked state.
238
+ *
239
+ * `reason` is only meaningful while blocking, and it distinguishes three
240
+ * cases rather than two:
241
+ *
242
+ * - **omitted** — a re-latch that leaves the existing explanation intact.
243
+ * Load-bearing: the block has two writers (the host, and the driver's
244
+ * automatic latch), and the driver's write lands AFTER a bus-subscribed
245
+ * host has already set its own detailed copy. Treating "no reason" as
246
+ * "clear the reason" made that sequence replace the host's figures with
247
+ * generic copy every time, deterministically.
248
+ * - **a string** — replaces the explanation.
249
+ * - **`null`** — explicitly clears the explanation while staying blocked;
250
+ * the banner falls back to the element's default copy.
251
+ *
252
+ * Unblocking always clears it, so a stale explanation can never outlive the
253
+ * condition it described.
254
+ *
255
+ * Unblocking **also clears every per-vendor latch**, and that is the single
256
+ * rule that keeps per-vendor budgets non-breaking. A host asserting "the wall
257
+ * is gone" (the documented pre-flight, migration-GENC-1464 Option B) must not be
258
+ * silently overruled by a driver latch it cannot see; without this, the same
259
+ * `setBlocked(false)` that used to unblock would leave the composer locked.
260
+ */
261
+ setBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<{
262
+ blocked: boolean;
263
+ reason?: string | null;
264
+ }>): void;
265
+ /**
266
+ * Write the banner explanation without touching the flag.
267
+ *
268
+ * Separate from {@link setBlocked} rather than expressed as
269
+ * `setBlocked({ blocked: current, reason })`, because the element's public
270
+ * `blocked` is now DERIVED: re-latching with the derived value would pass
271
+ * `false` for a partially-walled session and so clear every per-vendor latch
272
+ * as a side effect of setting a string.
273
+ */
274
+ setBlockedReason(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string | null>): void;
275
+ /**
276
+ * Wall (or release) a single vendor's budget.
277
+ *
278
+ * The `reason` trichotomy mirrors {@link setBlocked}'s exactly, and for the
279
+ * same reason: the same two-writer race (the driver's latch landing after a
280
+ * bus-subscribed host has written its own copy) applies per vendor.
281
+ *
282
+ * Adding an already-walled vendor is idempotent — the array is a set with an
283
+ * order, so the vendor keeps the position it was first walled at.
284
+ */
285
+ setVendorBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<{
286
+ vendor: AIProviderType;
287
+ blocked: boolean;
288
+ reason?: string | null;
289
+ /**
290
+ * Marks the wall as SWEEP-derived (see `sweptVendors`). Only the
291
+ * element's `otherVendorAvailable: false` sweep passes `true`; a host
292
+ * call or a refusal latch leaves it unset, which also UPGRADES a
293
+ * previously swept vendor — a refusal (or an explicit host statement)
294
+ * is nameable evidence, and first-hand evidence beats the verdict.
295
+ */
296
+ swept?: boolean;
297
+ }>): void;
172
298
  setInputValue(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string>): void;
173
299
  setLiveSubAgentTrace(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<ChatMessage[]>): void;
174
300
  setLiveSubAgentName(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<string | null>): void;
@@ -185,11 +311,41 @@ export declare const aiAssistantSlice: import("@reduxjs/toolkit").Slice<AiAssist
185
311
  loadSession(state: import("immer").WritableDraft<AiAssistantSessionState>, action: PayloadAction<LoadSessionPayload>): void;
186
312
  /**
187
313
  * Wipe the session back to a fresh default — the "Clear" / "New chat" action.
188
- * The user's **display preferences** (tool-call / thinking / narration / agent-switch
189
- * visibility + animations) are deliberately preserved across Clear: they are settings,
190
- * not conversation state, and are persisted independently of the snapshot (GENC-1351).
191
- * Without this they'd flip to their all-off defaults in the live store on Clear, since
192
- * `clearSession` re-applies no baseline and the idempotent setters suppress a re-apply.
314
+ *
315
+ * Three categories survive, for three different reasons keep them distinct:
316
+ *
317
+ * 1. The user's **display preferences** (tool-call / thinking / narration /
318
+ * agent-switch visibility + animations). They are settings, not
319
+ * conversation state, and are persisted independently of the snapshot
320
+ * (GENC-1351). Without this they'd flip to their all-off defaults in the
321
+ * live store on Clear, since `clearSession` re-applies no baseline and the
322
+ * idempotent setters suppress a re-apply.
323
+ * 2. The **backend block** (`blocked` / `blockedReason`, and the per-vendor
324
+ * latches beside them). Not a preference at
325
+ * all — a standing backend condition that Clear cannot change. It is here
326
+ * because starting a new chat does not refill the AI budget, so clearing
327
+ * it would hand the user a working-looking composer that fails on the very
328
+ * next send.
329
+ * 3. The **provider statuses**. They describe the REGISTRY, not the
330
+ * conversation — provider registration is static for the store's lifetime
331
+ * and this snapshot is refreshed from the registry, never from a turn. They
332
+ * are session state only because that is where the element's store lives.
333
+ *
334
+ * Dropping them on Clear is not cosmetic: the element derives `blocked`
335
+ * from "every REACHABLE vendor is walled", and an empty reachable set fails
336
+ * safe to "blocked". So wiping the statuses while keeping the per-vendor
337
+ * latches (category 2) escalated one walled vendor out of two into a fully
338
+ * locked composer, and nothing reloads them — `loadProviderStatuses()` runs
339
+ * only on connect/session-switch and from the observable-registry
340
+ * subscription, so a host with a static registry stayed locked until a
341
+ * remount. Preserving is the fix rather than re-loading after reset,
342
+ * because the reload is async: it would still flash a fully locked composer
343
+ * for a turn of the event loop, and would break a host whose registry is
344
+ * immutable (nothing to re-listen to) or whose `listStatuses()` rejects.
345
+ *
346
+ * Stated separately so a future contributor deciding what belongs in this
347
+ * list does not "tidy" the block out on the grounds that it is not a display
348
+ * preference.
193
349
  */
194
350
  resetSession(state: import("immer").WritableDraft<AiAssistantSessionState>): void;
195
351
  }, "aiAssistant", "aiAssistant", {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ai-assistant-slice.d.ts","sourceRoot":"","sources":["../../../src/state/ai-assistant-slice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC7B,4BAA4B,EAC5B,WAAW,EACZ,MAAM,4BAA4B,CA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AE,CAAC;IAGhE;;;;;OAKG;uFACwB,aAAa,CAAC,kBAAkB,CAAC;IAkB5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;;oCAwBL,CAAC"}
@@ -112,7 +112,12 @@ export declare function clearSession(key: string): void;
112
112
  * Human/agent-facing guide emitted as the first key of the exported debug log,
113
113
  * so whoever opens the JSON (often an AI agent) knows how to read it without
114
114
  * reverse-engineering the shape. Kept here next to the event catalogue it
115
- * describes so the two stay in sync.
115
+ * describes but proximity alone demonstrably did NOT keep the two in sync
116
+ * (`refusal` was missing from both reason lists for a whole release), so
117
+ * `debug-event-log.test.ts` now asserts that every `TurnFailureReason` and every
118
+ * `SubAgentFailureReason` is named here, and fails the build when one is added
119
+ * without a matching sentence. Enumerations below read as exhaustive and WILL be
120
+ * trusted by an agent reading the JSON — keep them so.
116
121
  */
117
122
  export declare const DEBUG_LOG_README: readonly string[];
118
123
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"debug-event-log.d.ts","sourceRoot":"","sources":["../../../src/state/debug-event-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,iBAAiB,GAEjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAEhB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GAEjB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,uBAAuB,GACvB,sBAAsB,GAEtB,6BAA6B,GAE7B,iBAAiB,GACjB,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GAEnB,eAAe,GACf,kBAAkB,GAClB,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AAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAEnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,CA0BrF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAc7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
1
+ {"version":3,"file":"debug-event-log.d.ts","sourceRoot":"","sources":["../../../src/state/debug-event-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,GAClB,iBAAiB,GAEjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAEhB,eAAe,GACf,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GAEjB,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GAEnB,uBAAuB,GACvB,sBAAsB,GAEtB,6BAA6B,GAE7B,iBAAiB,GACjB,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GAEnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GAEpB,iBAAiB,GACjB,kBAAkB,GAClB,yBAAyB,GACzB,qBAAqB,GACrB,mBAAmB,GACnB,wBAAwB,GACxB,2BAA2B,GAC3B,sBAAsB,GACtB,4BAA4B,CAAC;AAEjC;;;;GAIG;AACH,MAAM,MAAM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AED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAc7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
@@ -23,6 +23,17 @@ declare function makeStore(devTools: boolean | undefined): import("@genesislcap/
23
23
  setSessionMenuOpen(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<boolean>): void;
24
24
  setCompacting(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<boolean>): void;
25
25
  setRestoring(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<boolean>): void;
26
+ setBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<{
27
+ blocked: boolean;
28
+ reason?: string | null;
29
+ }>): void;
30
+ setBlockedReason(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string | null>): void;
31
+ setVendorBlocked(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<{
32
+ vendor: import("@genesislcap/foundation-ai").AIProviderType;
33
+ blocked: boolean;
34
+ reason?: string | null;
35
+ swept?: boolean;
36
+ }>): void;
26
37
  setInputValue(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string>): void;
27
38
  setLiveSubAgentTrace(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<import("@genesislcap/foundation-ai").ChatMessage[]>): void;
28
39
  setLiveSubAgentName(state: import("immer").WritableDraft<AiAssistantSessionState>, action: import("@reduxjs/toolkit").PayloadAction<string | null>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/state/session-store.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAIvD,iBAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAM/C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAMnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../../src/state/session-store.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAIvD,iBAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;cA6C+wa,CAAC;;;;;;cAAggD,CAAC;aAAob,CAAC;;;;;;;;;;;wCAvCrve;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAMnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG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