@constructor-io/constructorio-ui-asa 1.5.0 → 1.6.1

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.
@@ -134,6 +134,12 @@ export interface UseChatReturn {
134
134
  messages: ChatMessage[];
135
135
  sendMessage: (text: string, source?: AssistantSubmitSource) => void;
136
136
  isStreaming: boolean;
137
+ /**
138
+ * Cancel the in-flight request, keeping the conversation. The partial reply is settled
139
+ * as `done` and the thread id is kept, so the next message continues the same
140
+ * conversation. No-op when nothing is streaming. Use `clearHistory` to reset instead.
141
+ */
142
+ abort: () => void;
137
143
  clearHistory: () => void;
138
144
  }
139
145
  export interface UseAsaResultsOptions {
@@ -205,6 +211,7 @@ export type Translations = {
205
211
  'CioAsa.input.placeholder'?: string;
206
212
  'CioAsa.input.ariaLabel'?: string;
207
213
  'CioAsa.input.sendAriaLabel'?: string;
214
+ 'CioAsa.input.stopAriaLabel'?: string;
208
215
  'CioAsa.welcome.title'?: string;
209
216
  'CioAsa.welcome.placeholder'?: string;
210
217
  'CioAsa.welcome.sendButton'?: string;
@@ -232,6 +239,14 @@ export interface ChatInputRenderProps {
232
239
  onSubmit: () => void;
233
240
  placeholder: string;
234
241
  isDisabled: boolean;
242
+ /**
243
+ * Whether a reply is currently streaming. Pair it with `onAbort` to offer a cancel
244
+ * control while it is true — the built-in stop button is off by default, so an override
245
+ * is often the only way a user can cancel.
246
+ */
247
+ isStreaming: boolean;
248
+ /** Cancel the in-flight reply. Keeps the conversation and the thread. */
249
+ onAbort: () => void;
235
250
  }
236
251
  export interface WelcomeScreenTitleRenderProps {
237
252
  text: string;
@@ -1,2 +1,2 @@
1
- declare const _default: "1.5.0";
1
+ declare const _default: "1.6.1";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-ui-asa",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "Constructor.io AI Shopping Agent UI library for web applications",
5
5
  "author": "constructor.io",
6
6
  "license": "MIT",