@visma-swno/gaia-chat-ui 5.1.0 → 5.2.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 (47) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/app/app.d.ts +32 -1
  3. package/dist/components/canvas/canvas-workspace/canvas-workspace.d.ts +1 -1
  4. package/dist/components/composer/message-composer.d.ts +41 -6
  5. package/dist/components/conversation/activity-indicator/activity-indicator.d.ts +1 -1
  6. package/dist/components/feedback/consent-dialog.d.ts +1 -1
  7. package/dist/components/layout/connection-status-overlay/connection-status-overlay.d.ts +1 -1
  8. package/dist/components/message/assistant-message.d.ts +1 -1
  9. package/dist/components/message/message-actions.d.ts +1 -1
  10. package/dist/components/message/message-attachments.d.ts +17 -1
  11. package/dist/components/message/message.d.ts +1 -1
  12. package/dist/components/message/renderers/citation-link/citation-link.d.ts +1 -1
  13. package/dist/components/message/renderers/reasoning-block.d.ts +1 -1
  14. package/dist/components/message/renderers/tool-approval-block.d.ts +1 -1
  15. package/dist/components/message/renderers/tool-status-block.d.ts +1 -1
  16. package/dist/components/primitives/icon/icon.d.ts +1 -1
  17. package/dist/components/primitives/modal/modal.d.ts +1 -1
  18. package/dist/components/primitives/notification/notification.d.ts +1 -1
  19. package/dist/components/shared/suggested-question-pills.d.ts +1 -1
  20. package/dist/core/adapters/tool-utils.d.ts +28 -0
  21. package/dist/core/store/chat-store.d.ts +7 -0
  22. package/dist/core/store/run-coordinator.d.ts +1 -0
  23. package/dist/core/types.d.ts +12 -4
  24. package/dist/custom-elements.json +1 -1
  25. package/dist/{da-DTtUa6Q_.js → da-DDxL51tD.js} +34 -37
  26. package/dist/{esm-BF86VROU.js → esm-lz7YfYzg.js} +672 -672
  27. package/dist/{fi-BOvtWDCe.js → fi-twx072Zu.js} +34 -37
  28. package/dist/generated/locales/da.d.ts +33 -36
  29. package/dist/generated/locales/fi.d.ts +33 -36
  30. package/dist/generated/locales/nb.d.ts +33 -36
  31. package/dist/generated/locales/nl.d.ts +33 -36
  32. package/dist/generated/locales/sv.d.ts +33 -36
  33. package/dist/index.es.js +4455 -4184
  34. package/dist/{markdown-BTbuI0wi.js → markdown-BsU07hR0.js} +419 -412
  35. package/dist/{nb-DZXqrqeY.js → nb-CeFzi8EU.js} +34 -37
  36. package/dist/{nl-DGhlP4kd.js → nl-D1Z5TDkR.js} +34 -37
  37. package/dist/services/api-schemas.d.ts +29 -34
  38. package/dist/{signalr-Daj845_b.js → signalr-K7e2DzwD.js} +1 -1
  39. package/dist/{sv-DPPbk9Xd.js → sv-BnYyj9E_.js} +34 -37
  40. package/dist/types/message-attachment.d.ts +2 -0
  41. package/dist/utils/i18n-check-helpers.d.ts +15 -0
  42. package/dist/utils/polling-task.d.ts +11 -1
  43. package/dist/vscode.html-custom-data.json +7 -4
  44. package/package.json +10 -6
  45. /package/dist/{learning-universe-DoX8vYTL.js → learning-universe-B_ZGsjBI.js} +0 -0
  46. /package/dist/{rolldown-runtime-CUF-kog3.js → rolldown-runtime--_vEcKDh.js} +0 -0
  47. /package/dist/{vsn-DP5dReH5.js → vsn-CBq00924.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.2.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v5.1.0...web-component@v5.2.0) (2026-06-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** allow profiles to hide welcome message sections ([#3054](https://github.com/visma-swno/vsn-assistant/issues/3054)) ([5a0ccc3](https://github.com/visma-swno/vsn-assistant/commit/5a0ccc3418f74d6f1dc08cb9ab97edc70ef7ccf5))
9
+ * **cross-cutting:** standalone Gaia conversational context flow ([#3025](https://github.com/visma-swno/vsn-assistant/issues/3025)) ([971185a](https://github.com/visma-swno/vsn-assistant/commit/971185a20adb1c1d269bcf51c497632bca85bd4d))
10
+ * **web-component:** attach files via drag-and-drop and paste ([#3076](https://github.com/visma-swno/vsn-assistant/issues/3076)) ([516465f](https://github.com/visma-swno/vsn-assistant/commit/516465fd1d926ee53735f9019e05e0db766b4839)), closes [#3067](https://github.com/visma-swno/vsn-assistant/issues/3067)
11
+ * **web-component:** support multiple attachments with redesigned attachment cards ([#3085](https://github.com/visma-swno/vsn-assistant/issues/3085)) ([f151532](https://github.com/visma-swno/vsn-assistant/commit/f1515321e63e3c17729e2c842c6dd666d4f463e6)), closes [#3069](https://github.com/visma-swno/vsn-assistant/issues/3069)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **web-component:** add more missing translations and regenerate locale bundles ([#3060](https://github.com/visma-swno/vsn-assistant/issues/3060)) ([cdc5d4d](https://github.com/visma-swno/vsn-assistant/commit/cdc5d4df24811678a712a14cd54d57f9d9794afc))
17
+ * **web-component:** align attachment icon across host apps ([#3074](https://github.com/visma-swno/vsn-assistant/issues/3074)) ([7eecd02](https://github.com/visma-swno/vsn-assistant/commit/7eecd0216ce7b8f4c15cea30d751b8a087a1141b)), closes [#3068](https://github.com/visma-swno/vsn-assistant/issues/3068)
18
+ * **web-component:** defer health heartbeat first poll until base-url is applied ([#3088](https://github.com/visma-swno/vsn-assistant/issues/3088)) ([7c7b635](https://github.com/visma-swno/vsn-assistant/commit/7c7b635759c9e4874c4674049342778f96f42cd5)), closes [#3086](https://github.com/visma-swno/vsn-assistant/issues/3086)
19
+ * **web-component:** make bootstrap resilient to config version skew ([#3075](https://github.com/visma-swno/vsn-assistant/issues/3075)) ([#3078](https://github.com/visma-swno/vsn-assistant/issues/3078)) ([19fef3e](https://github.com/visma-swno/vsn-assistant/commit/19fef3ee9244a433e398a648809c70753f7e4adc))
20
+ * **web-component:** sanitize attachment URLs and harden canvas CSP placement ([#3032](https://github.com/visma-swno/vsn-assistant/issues/3032)) ([c127f20](https://github.com/visma-swno/vsn-assistant/commit/c127f202ff8e8ac2736a0e29da6e7e80ce40b9da))
21
+
3
22
  ## [5.1.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v5.0.1...web-component@v5.1.0) (2026-06-09)
4
23
 
5
24
 
package/dist/app/app.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { PropertyValues } from 'lit';
2
2
  import { StrategyType } from '../core/store';
3
3
  import { TokenFetcher } from '../services/auth-service';
4
- import { FrontendTool, HostContextProvider } from '../types';
4
+ import { FrontendTool, HostContext, HostContextProvider } from '../types';
5
5
  import { BaseElement } from '../components/shared/base-element';
6
6
  /**
7
7
  * Root chat widget component.
@@ -87,6 +87,10 @@ export declare class ChatApp extends BaseElement {
87
87
  private supportSessionEnded;
88
88
  private historyOpen;
89
89
  private settingsOpen;
90
+ private attachmentsEnabled;
91
+ private supportConnected;
92
+ private isDraggingOver;
93
+ private dragDepth;
90
94
  private disposables;
91
95
  private ctx;
92
96
  private handleInlineQuestionClick;
@@ -103,10 +107,36 @@ export declare class ChatApp extends BaseElement {
103
107
  willUpdate(changedProperties: PropertyValues): void;
104
108
  private toggleHostAttribute;
105
109
  private handleKeyDown;
110
+ /**
111
+ * Retroactively update the host-context snapshot for the most recent user
112
+ * message. Call this after a mid-run context confirmation (e.g. a frontend
113
+ * tool) so the "Context changed" divider renders immediately.
114
+ */
115
+ patchCurrentMessageHostContext(props: Record<string, unknown>): void;
116
+ /**
117
+ * Returns the host-context snapshot persisted for the active conversation,
118
+ * shaped as a {@link HostContext}, or `null` when none is available.
119
+ *
120
+ * The localStorage-backed restore path (`loadHistory`) hydrates this snapshot
121
+ * but does not emit {@link ConversationRestoredEvent}, so a host app that
122
+ * supplies context via `hostContextProvider` can read it here to keep
123
+ * follow-up messages scoped to the restored tenant/company after a refresh.
124
+ */
125
+ getActiveHostContext(): HostContext | null;
126
+ /** Whether a file dragged over the widget can currently be attached. */
127
+ private get canAcceptDrop();
128
+ private get composer();
129
+ private dragContainsFiles;
130
+ private handleDragEnter;
131
+ private handleDragOver;
132
+ private handleDragLeave;
133
+ private handleDrop;
106
134
  /** Clears the current conversation and resets the chat. */
107
135
  clearConversation(): void;
108
136
  /** Stops any active support session. */
109
137
  stopSupport(): void;
138
+ /** Sends a message programmatically after the chat has initialized. */
139
+ sendMessage(message: string): Promise<void>;
110
140
  /**
111
141
  * Inject messages for readonly display. Accepts AG-UI format messages
112
142
  * (as returned by the inspect API) and runs them through the full message
@@ -117,6 +147,7 @@ export declare class ChatApp extends BaseElement {
117
147
  * @param thumbs - Optional map of messageId → "up" | "down" for feedback indicators.
118
148
  */
119
149
  setReadonlyMessages(messages: ReadonlyArray<Record<string, unknown>>, thumbs?: Readonly<Record<string, string>>): void;
150
+ private waitForInitialization;
120
151
  render(): import('lit-html').TemplateResult<1>;
121
152
  }
122
153
  declare global {
@@ -14,7 +14,7 @@ export declare class CanvasWorkspace extends BaseElement {
14
14
  private ctrl;
15
15
  private renderPreview;
16
16
  private handleRenderResult;
17
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
17
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
18
18
  }
19
19
  declare global {
20
20
  interface HTMLElementTagNameMap {
@@ -24,10 +24,9 @@ export declare class GaiaMessageComposer extends BaseElement {
24
24
  attachmentInput?: HTMLInputElement;
25
25
  private value;
26
26
  private invalid;
27
- private pendingAttachment;
28
- private pendingAttachmentPreviewUrl;
27
+ private pendingAttachments;
29
28
  private attachmentError;
30
- private uploadingAttachment;
29
+ private uploadingCount;
31
30
  private isRecording;
32
31
  private speechSupported;
33
32
  private recognition;
@@ -37,6 +36,8 @@ export declare class GaiaMessageComposer extends BaseElement {
37
36
  maxRows: number;
38
37
  connectedCallback(): void;
39
38
  disconnectedCallback(): void;
39
+ /** Whether an attachment upload is currently in flight. */
40
+ private get uploadingAttachment();
40
41
  private get notAllowedToSendMessage();
41
42
  private get canUseVoiceDictation();
42
43
  private isMessageNotAllowed;
@@ -53,13 +54,45 @@ export declare class GaiaMessageComposer extends BaseElement {
53
54
  private dispatchToSupport;
54
55
  private dispatchToAssistant;
55
56
  private handleAttachmentButtonClick;
56
- private clearPendingAttachment;
57
+ private clearPendingAttachments;
58
+ /** Dismisses the attachment error banner without discarding staged attachments. */
59
+ private dismissAttachmentError;
60
+ private removePendingAttachment;
57
61
  private handleAttachmentSelected;
62
+ private processAttachmentFiles;
63
+ private uploadAttachmentFile;
64
+ /**
65
+ * Whether a file can currently be accepted as a pending attachment.
66
+ *
67
+ * False when attachments are disabled for the profile, the support channel
68
+ * is active, or the composer is disabled/loading. Callers should check this
69
+ * before suppressing native browser behaviour (e.g. paste) so they don't
70
+ * swallow the event without effect. Multiple attachments may be queued, so
71
+ * an in-flight upload does not block accepting further files.
72
+ */
73
+ get canAcceptAttachment(): boolean;
74
+ /**
75
+ * Uploads files dropped anywhere on the chat surface as pending attachments.
76
+ *
77
+ * Called by the root chat component, which owns the drag-and-drop overlay so
78
+ * files can be dropped over the entire widget rather than only the composer.
79
+ * Guards against uploads while attachments are unavailable for the active
80
+ * channel/profile.
81
+ */
82
+ acceptDroppedFiles(files: File[]): Promise<void>;
83
+ /**
84
+ * Uploads a single dropped file as a pending attachment.
85
+ *
86
+ * Thin wrapper around {@link acceptDroppedFiles} retained for callers that
87
+ * only have a single file to hand.
88
+ */
89
+ acceptDroppedFile(file: File): Promise<void>;
58
90
  private handleSuggestedQuestionClick;
59
91
  private handleKeyDown;
92
+ private handlePaste;
60
93
  private maybeEmitTyping;
61
94
  private createPreviewUrl;
62
- private revokePendingAttachmentPreviewUrl;
95
+ private revokeAllPreviewUrls;
63
96
  protected updated(changed: PropertyValues): Promise<void>;
64
97
  /** Sets focus on the textarea. */
65
98
  focus(options?: FocusOptions): void;
@@ -68,7 +101,9 @@ export declare class GaiaMessageComposer extends BaseElement {
68
101
  /** Selects all the text in the textarea. */
69
102
  select(): void;
70
103
  render(): import('lit-html').TemplateResult<1>;
71
- private getPendingAttachmentPreview;
104
+ private getPendingAttachmentPreviews;
105
+ private renderPendingAttachmentPreviews;
106
+ private renderAttachmentError;
72
107
  }
73
108
  declare global {
74
109
  interface HTMLElementTagNameMap {
@@ -15,7 +15,7 @@ export declare class GaiaActivityIndicator extends BaseElement {
15
15
  * The activity type to display.
16
16
  */
17
17
  activityType?: SupportSessionActivityType;
18
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
18
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
19
19
  private getActivityContent;
20
20
  }
21
21
  declare global {
@@ -25,7 +25,7 @@ export declare class GaiaConsentDialog extends BaseElement {
25
25
  */
26
26
  close(): void;
27
27
  private handleConsentConfirmed;
28
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
28
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
29
29
  }
30
30
  declare global {
31
31
  interface HTMLElementTagNameMap {
@@ -12,7 +12,7 @@ import { BaseElement } from '../../shared/base-element';
12
12
  export declare class GaiaConnectionStatusOverlay extends BaseElement {
13
13
  static styles: import('lit').CSSResult[];
14
14
  private ctrl;
15
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
15
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
16
16
  }
17
17
  declare global {
18
18
  interface HTMLElementTagNameMap {
@@ -7,7 +7,7 @@ export declare class GaiaAssistantMessage extends BaseElement {
7
7
  isStreaming: boolean;
8
8
  private bodyEl;
9
9
  private expandedToolCallIds;
10
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
10
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
11
11
  private renderPart;
12
12
  private renderToolCall;
13
13
  private toggleToolCall;
@@ -38,7 +38,7 @@ export declare class GaiaMessageActions extends BaseElement {
38
38
  private copyTimeoutId?;
39
39
  private get hasVisibleActions();
40
40
  disconnectedCallback(): void;
41
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
41
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
42
42
  private renderCopyButton;
43
43
  private renderFeedbackButtons;
44
44
  private renderFeedbackIndicator;
@@ -6,12 +6,28 @@ export declare class GaiaMessageAttachments extends BaseElement {
6
6
  attachments: MessageAttachment[];
7
7
  onRemoveAttachment?: (attachment: MessageAttachment) => void;
8
8
  fullWidth: boolean;
9
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
9
+ compact: boolean;
10
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
11
+ private renderCompactAttachment;
10
12
  private renderAttachment;
11
13
  private renderRemoveButton;
12
14
  private handleRemoveClick;
13
15
  private isImageAttachment;
14
16
  private isPdfAttachment;
17
+ /**
18
+ * Splits a file name so the tail (extension and a few trailing characters)
19
+ * stays pinned while the start truncates with an ellipsis, yielding a
20
+ * middle-truncated name such as `Screens…nal.pdf`.
21
+ */
22
+ private splitFileName;
23
+ /** Formats a byte count into a compact, locale-aware size (e.g. `1.2 MB`). */
24
+ private formatFileSize;
25
+ /**
26
+ * Formats a magnitude and byte unit using the active locale, falling back to
27
+ * a plain `value unit` string if the runtime lacks `Intl.NumberFormat` unit
28
+ * support.
29
+ */
30
+ private formatSizeNumber;
15
31
  }
16
32
  declare global {
17
33
  interface HTMLElementTagNameMap {
@@ -25,7 +25,7 @@ export declare class GaiaMessage extends BaseElement {
25
25
  showAvatar: boolean;
26
26
  isStreaming: boolean;
27
27
  protected willUpdate(changed: PropertyValues): void;
28
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
28
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
29
29
  private get messageAriaLabel();
30
30
  private renderAvatar;
31
31
  private renderContent;
@@ -48,7 +48,7 @@ export declare class GaiaCitationLink extends BaseElement {
48
48
  */
49
49
  private getPositioningBoundary;
50
50
  protected updated(changed: PropertyValues): void;
51
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
51
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
52
52
  private renderPopover;
53
53
  private renderPopoverNav;
54
54
  private renderMarkdownSnippet;
@@ -27,7 +27,7 @@ export declare class GaiaReasoningBlock extends BaseElement {
27
27
  private renderDuration;
28
28
  private renderStep;
29
29
  private renderTimeline;
30
- render(): typeof nothing | TemplateResult<1>;
30
+ render(): TemplateResult<1> | typeof nothing;
31
31
  }
32
32
  declare global {
33
33
  interface HTMLElementTagNameMap {
@@ -25,7 +25,7 @@ export declare class GaiaToolApprovalBlock extends BaseElement {
25
25
  private handleConsentChange;
26
26
  private handleApprove;
27
27
  private handleReject;
28
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
28
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
29
29
  }
30
30
  declare global {
31
31
  interface HTMLElementTagNameMap {
@@ -32,7 +32,7 @@ export declare class GaiaToolStatusBlock extends BaseElement {
32
32
  private get statusLabel();
33
33
  private get status();
34
34
  private toggleExpand;
35
- render(): typeof nothing | TemplateResult<1>;
35
+ render(): TemplateResult<1> | typeof nothing;
36
36
  private renderCanvasStatus;
37
37
  private renderExpandedContent;
38
38
  }
@@ -17,7 +17,7 @@ export declare class GaiaIcon extends BaseElement {
17
17
  label: string;
18
18
  size: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
19
19
  protected willUpdate(changed: PropertyValues): void;
20
- render(): import('lit-html').SVGTemplateResult | typeof nothing;
20
+ render(): typeof nothing | import('lit-html').SVGTemplateResult;
21
21
  }
22
22
  declare global {
23
23
  interface HTMLElementTagNameMap {
@@ -40,7 +40,7 @@ export declare class GaiaModal extends BaseElement {
40
40
  private handleClose;
41
41
  private handleBackdropClick;
42
42
  private handleKeyDown;
43
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
43
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
44
44
  }
45
45
  declare global {
46
46
  interface HTMLElementTagNameMap {
@@ -54,7 +54,7 @@ export declare class GaiaNotification extends BaseElement {
54
54
  dismiss(): void;
55
55
  private _handleKeyDown;
56
56
  private _handleActionsSlotChange;
57
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
57
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
58
58
  }
59
59
  declare global {
60
60
  interface HTMLElementTagNameMap {
@@ -14,7 +14,7 @@ import { BaseElement } from './base-element';
14
14
  export declare class GaiaSuggestedQuestions extends BaseElement {
15
15
  static styles: import('lit').CSSResult[][];
16
16
  questions: ReadonlyArray<string>;
17
- render(): typeof nothing | import('lit-html').TemplateResult<1>;
17
+ render(): import('lit-html').TemplateResult<1> | typeof nothing;
18
18
  private handleClick;
19
19
  }
20
20
  declare global {
@@ -28,6 +28,34 @@ export interface UnwrappedApproval {
28
28
  * lands in `<a href>` outside the DOMPurify pipeline.
29
29
  */
30
30
  export declare function sanitizeUrl(url: unknown): string;
31
+ /**
32
+ * Sanitize URLs used for rendered attachments (`<a href>` / `<img src>`).
33
+ *
34
+ * Unlike {@link sanitizeUrl} (link hrefs — http(s) only), attachments are
35
+ * legitimately delivered as `data:`/`blob:` URLs: the composer previews local
36
+ * images via `URL.createObjectURL` (blob:), and restored `source.type:'data'`
37
+ * attachments arrive as `data:<mime>;base64,…`. Those schemes are therefore
38
+ * allowed in addition to http(s), while dangerous protocols (`javascript:`,
39
+ * `vbscript:`, …) still collapse to `'#'`.
40
+ *
41
+ * `data:` is a content container, not a single protocol, so the scheme alone
42
+ * is not a sufficient check: the same sanitized value lands in clickable
43
+ * `<a href>`s, and a forged attachment claiming `mimeType: 'image/png'` could
44
+ * smuggle `data:text/html,…` past a scheme-only allowlist. The data URL's
45
+ * media type must therefore be consistent with the attachment's declared
46
+ * `mimeType` (`image/*` → `data:image/*`, excluding SVG — the one image type
47
+ * that can carry script; `application/pdf` → `data:application/pdf`).
48
+ *
49
+ * Attachment URLs ultimately come from AG-UI message content (including
50
+ * restored conversation history), which is outside the DOMPurify pipeline, so
51
+ * the protocol must be checked before binding it into `href`/`src`.
52
+ *
53
+ * Detection is purely lexical (scheme prefix) rather than via `new URL()`:
54
+ * opaque `blob:`/`data:` values and a missing document base both make
55
+ * `new URL()` throw on otherwise-safe inputs, which would wrongly drop valid
56
+ * attachments.
57
+ */
58
+ export declare function sanitizeAttachmentUrl(url: unknown, mimeType: string): string;
31
59
  /**
32
60
  * Safely parse a value that may be a JSON string or already-parsed object.
33
61
  * Returns null for falsy input or unparseable strings.
@@ -174,6 +174,13 @@ export declare class ChatStore implements ReactiveController {
174
174
  setComposerDraft(draft: string): void;
175
175
  clearComposerDraft(): void;
176
176
  setFrontendTools(tools: FrontendTool[]): void;
177
+ /**
178
+ * Retroactively update the host-context snapshot for the most recent user
179
+ * message. Call this when context is confirmed mid-run (e.g. via a frontend
180
+ * tool) so the "Context changed" divider appears immediately rather than
181
+ * waiting for the next message send.
182
+ */
183
+ patchCurrentMessageHostContext(props: Record<string, unknown>): void;
177
184
  startSupport(baseUrl: string, conversationId: string): Promise<void>;
178
185
  stopSupport(): void;
179
186
  sendSupportMessage(message: string): Promise<void>;
@@ -80,6 +80,7 @@ export declare class RunCoordinator {
80
80
  respondToToolCall(messageId: string, approved: boolean, options?: {
81
81
  consentToShareConversation?: boolean;
82
82
  }): Promise<void>;
83
+ mergeHostPropsForContinuation(props: Record<string, unknown>): void;
83
84
  /**
84
85
  * Execute an agent run with standard tools and error handling.
85
86
  *
@@ -1,21 +1,29 @@
1
1
  import { InternalMessage } from './messages';
2
+ /**
3
+ * Welcome screen content for a single locale.
4
+ *
5
+ * Each section is optional: the backend omits (or sends `null`/empty for) a section that the
6
+ * active profile has chosen to hide, in which case the UI renders nothing for it. A non-empty
7
+ * value is rendered as-is. See `WelcomeMessageDto` on the backend for the profile-override semantics.
8
+ */
2
9
  export type WelcomeMessage = {
3
- title: string;
4
- body?: string;
10
+ title?: string | null;
11
+ body?: string | null;
5
12
  blocks?: ReadonlyArray<{
6
13
  iconName: string;
7
14
  headline: string;
8
15
  text: string;
9
16
  linkText?: string;
10
17
  linkUrl?: string;
11
- }>;
12
- callToAction: string;
18
+ }> | null;
19
+ callToAction?: string | null;
13
20
  };
14
21
  export type BootstrapConfigResponse = {
15
22
  welcomeMessages: Readonly<Record<string, WelcomeMessage>>;
16
23
  suggestedQuestions: Readonly<Record<string, ReadonlyArray<string>>>;
17
24
  maxInputLength: number;
18
25
  features: Readonly<Record<string, boolean>>;
26
+ schemaVersion?: number;
19
27
  };
20
28
  export type PluginToolSafety = 'safe' | 'unsafe';
21
29
  export type AgentPluginTool = {