@stack-spot/ai-chat-widget 2.13.1 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.14.0](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v2.13.2...ai-chat-widget@v2.14.0) (2026-02-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * include fremium sensitive info message ([#493](https://github.com/stack-spot/portal-ai-chat-widget/issues/493)) ([cf6d624](https://github.com/stack-spot/portal-ai-chat-widget/commit/cf6d624356fdae06e4c60603ae70992cc8a09ad1))
9
+ * include fremium sensitive info message ([#493](https://github.com/stack-spot/portal-ai-chat-widget/issues/493)) ([cf6d624](https://github.com/stack-spot/portal-ai-chat-widget/commit/cf6d624356fdae06e4c60603ae70992cc8a09ad1))
10
+
11
+ ## [2.13.2](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v2.13.1...ai-chat-widget@v2.13.2) (2026-02-19)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * refactor try ([#498](https://github.com/stack-spot/portal-ai-chat-widget/issues/498)) ([b03cd72](https://github.com/stack-spot/portal-ai-chat-widget/commit/b03cd725a116aff7a673876cb8e6866006af176f))
17
+
3
18
  ## [2.13.1](https://github.com/stack-spot/portal-ai-chat-widget/compare/ai-chat-widget@v2.13.0...ai-chat-widget@v2.13.1) (2026-02-10)
4
19
 
5
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"StackspotAIWidget.d.ts","sourceRoot":"","sources":["../src/StackspotAIWidget.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,0BAA0B,CAAA;AACjC,OAAO,cAAc,CAAA;AAGrB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE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EAAE,YAAY,EAAE,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,uMAiBzB,aAAa,4CAkDjB,CAAA"}
@@ -23,6 +23,7 @@ import { Stacks } from './views/Stacks.js';
23
23
  import { Steps } from './views/Steps/index.js';
24
24
  import { Tools } from './views/Tools.js';
25
25
  import { Workspaces } from './views/Workspaces/index.js';
26
+ import { FreemiumSensitiveDataInfo } from './components/FreemiumSensitiveDataInfo.js';
26
27
  /**
27
28
  * Renders a Chat Widget according to the closest model found in the React tree (AIWidgetProvider). If no model is found, a global version
28
29
  * of the Chat Widget will be instantiated and used.
@@ -39,6 +40,6 @@ export const StackspotAIWidget = ({ username, initialAgents, minimizedActions =
39
40
  ? _jsx(MinimizedHeader, { ...minimizedActions })
40
41
  : _jsx(ChatTabSelection, { buttons: tabButtons }) }), _jsxs("div", { className: "chat-container", ref: chatWindowRef, children: [_jsxs("div", { className: "chat-content", children: [prefix, isCurrentChatEmpty
41
42
  ? (children ?? _jsx(Home, { username: username, initialAgents: initialAgents, urlCreateAgent: urlCreateAgent }))
42
- : _jsx(Chat, { username: username, beforeMessage: beforeMessage, afterMessage: afterMessage, customRenderer: customRenderer })] }), features.messageInput && _jsx(MessageInput, { chatWindowRef: chatWindowRef, customInputMessage: customInputMessage }), suffix] })] }), _jsx(Stacks, {}), !isTrial && _jsx(Workspaces, {}), _jsx(KnowledgeSources, {}), _jsx(KSDocument, {}), _jsx(Agents, {}), _jsx(Editor, {}), _jsx(ChatHistory, {}), _jsx(Steps, {}), _jsx(Tools, {}), _jsx(Resources, {}), _jsx("div", { className: "chat-right-panel", ref: rightPanelRef, children: _jsx(RightPanel, {}) })] }) }) })), [isCurrentChatEmpty, username, isMinimized, children, initialAgents, suffix, className, tabButtons]);
43
+ : _jsx(Chat, { username: username, beforeMessage: beforeMessage, afterMessage: afterMessage, customRenderer: customRenderer })] }), features.messageInput && _jsx(MessageInput, { chatWindowRef: chatWindowRef, customInputMessage: customInputMessage }), suffix, _jsx(FreemiumSensitiveDataInfo, {})] })] }), _jsx(Stacks, {}), !isTrial && _jsx(Workspaces, {}), _jsx(KnowledgeSources, {}), _jsx(KSDocument, {}), _jsx(Agents, {}), _jsx(Editor, {}), _jsx(ChatHistory, {}), _jsx(Steps, {}), _jsx(Tools, {}), _jsx(Resources, {}), _jsx("div", { className: "chat-right-panel", ref: rightPanelRef, children: _jsx(RightPanel, {}) })] }) }) })), [isCurrentChatEmpty, username, isMinimized, children, initialAgents, suffix, className, tabButtons]);
43
44
  };
44
45
  //# sourceMappingURL=StackspotAIWidget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackspotAIWidget.js","sourceRoot":"","sources":["../src/StackspotAIWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAa,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7F,OAAO,0BAA0B,CAAA;AACjC,OAAO,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,0B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,KAAC,UAAU,KAAG,EACd,KAAC,MAAM,KAAG,EACV,KAAC,MAAM,KAAG,EACV,KAAC,WAAW,KAAG,EACf,KAAC,KAAK,KAAG,EACT,KAAC,KAAK,KAAG,EACT,KAAC,SAAS,KAAG,EACb,cAAK,SAAS,EAAC,kBAAkB,EAAC,GAAG,EAAE,aAAa,YAAE,KAAC,UAAU,KAAG,GAAM,IACtE,GACa,GACJ,CACpB,EAAE,CAAC,kBAAkB,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAA;AACzG,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "2.13.1",
4
- "date": "Tue Feb 10 2026 19:47:29 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "2.14.0",
4
+ "date": "Tue Feb 24 2026 17:50:08 GMT+0000 (Coordinated Universal Time)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -125,7 +125,7 @@
125
125
  },
126
126
  {
127
127
  "name": "@stack-spot/portal-network",
128
- "version": "0.219.0(@stack-spot/auth@6.1.0)(@stack-spot/opa@2.5.0(@stack-spot/auth@6.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@stack-spot/portal-translate@2.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@tanstack/react-query@5.59.16(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
128
+ "version": "0.221.0(@stack-spot/auth@6.1.0)(@stack-spot/opa@2.5.0(@stack-spot/auth@6.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@stack-spot/portal-translate@2.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@tanstack/react-query@5.59.16(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
129
129
  },
130
130
  {
131
131
  "name": "@stack-spot/portal-theme",
@@ -1 +1 @@
1
- {"version":3,"file":"quick-commands.d.ts","sourceRoot":"","sources":["../../src/chat-interceptors/quick-commands.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAK3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKlD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS;;;;;;;;;;;;;;EAgB7E;AAwBD;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,MAAM,GAAG,SAAS,WAiZ7D,SAAS,QAAQ,SAAS,UAAU,WAAW,gCA0C9F"}
1
+ {"version":3,"file":"quick-commands.d.ts","sourceRoot":"","sources":["../../src/chat-interceptors/quick-commands.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAK3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIlD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS;;;;;;;;;;;;;;EAgB7E;AAwBD;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,MAAM,GAAG,SAAS,WAgJ7D,SAAS,QAAQ,SAAS,UAAU,WAAW,gCAuC9F"}
@@ -1,13 +1,11 @@
1
1
  import { aiClient, CancelledError, StackspotAPIError } from '@stack-spot/portal-network';
2
2
  import { interpolate, translate } from '@stack-spot/portal-translate';
3
- import { isNil } from 'lodash';
4
3
  import { ulid } from 'ulid';
5
4
  import { AbortedError } from '../AbortedError.js';
6
5
  import appData from '../app-metadata.json';
7
6
  import { quickCommandRegex } from '../regex.js';
8
7
  import { ChatEntry } from '../state/ChatEntry.js';
9
8
  import { defaultLanguage } from '../utils/programming-languages.js';
10
- import { getSizeOfString } from '../utils/string.js';
11
9
  import { CustomInputs } from './CustomInputs.js';
12
10
  export function buildQuickCommandContext(state, message) {
13
11
  return {
@@ -68,112 +66,6 @@ export function createQuickCommandInterceptor(widget, getEditor) {
68
66
  ctx.context.upload_ids = chat.getMessages()
69
67
  .flatMap(message => (message.getValue().upload || []).map(upload => upload.id));
70
68
  }
71
- /**
72
- * Runs an Router step of a quick command.
73
- */
74
- async function runRouterStep(ctx, stepIndex, iteration, progress) {
75
- const { qc: { slug, steps }, code, resultMap, customInputs } = ctx;
76
- const step = steps[stepIndex];
77
- const inputData = Object.keys(customInputs).length > 0 && code ? { ...customInputs, [code]: code } : code ?? customInputs;
78
- try {
79
- if (step.slug in iteration) {
80
- iteration[step.slug] = iteration[step.slug] + 1;
81
- }
82
- else {
83
- iteration[step.slug] = 1;
84
- }
85
- const { next_step_slug } = await aiClient.calculateNextStep.mutate({
86
- stepSlug: step.slug,
87
- slug: slug,
88
- quickCommandEvaluateStepRouterRequest: {
89
- executions_count: iteration[step.slug],
90
- input_data: inputData,
91
- slugs_executions: resultMap,
92
- },
93
- });
94
- if (next_step_slug === step.slug) {
95
- return runStepsRecursively(stepIndex, progress, ctx, iteration);
96
- }
97
- const nextStepIndex = steps?.findIndex((step) => step.slug === next_step_slug);
98
- if (isNil(nextStepIndex) || nextStepIndex === -1)
99
- return;
100
- return runStepsRecursively(nextStepIndex, progress, ctx, iteration);
101
- }
102
- catch (error) {
103
- // eslint-disable-next-line no-console
104
- console.error('Error executing QC step', error);
105
- }
106
- }
107
- /**
108
- * Runs a fetch step of a quick command and puts the result in the `resultMap` of the context passed as parameter.
109
- */
110
- async function runFetchStep(ctx, stepIndex) {
111
- const { qc: { slug, steps }, code, context, resultMap, customInputs, executionId, signal } = ctx;
112
- const step = steps[stepIndex];
113
- if (step.is_remote) {
114
- ctx.isRemote = true;
115
- const { data } = await aiClient.fetchStepOfQuickCommandRemotely.mutate({
116
- slug, stepSlug: step.slug,
117
- quickCommandsExecutionRequest: {
118
- code_selection: code, context, qc_execution_id: executionId,
119
- slugs_executions: { ...resultMap, ...customInputs },
120
- },
121
- });
122
- //data is the return of the request in the QC so we do not have full control over the response
123
- //We handle the usual format with body, status_code and headers, but we might also handle other formats
124
- const responseData = data;
125
- resultMap[step.slug] = {
126
- status: responseData.status_code || 200,
127
- data: JSON.stringify(responseData.body) ?? JSON.stringify(responseData),
128
- headers: responseData.headers ?? {},
129
- };
130
- return;
131
- }
132
- const { headers, data, method, url } = await aiClient.fetchStepOfQuickCommand.mutate({
133
- slug,
134
- stepSlug: step.slug,
135
- quickCommandsExecutionRequest: {
136
- input_data: code, context, qc_execution_id: executionId,
137
- slugs_executions: { ...resultMap, ...customInputs },
138
- },
139
- }, signal);
140
- const body = ['get', 'head'].includes(method.toLowerCase()) ? undefined : data;
141
- const response = await fetch(url, { headers: headers || undefined, body, method, signal });
142
- if (!response.ok)
143
- throw new Error(`Failed to execute step "${step.slug}" of quick command "${slug}". Status ${response.status}.`);
144
- resultMap[step.slug] = {
145
- status: response.status,
146
- data: await response.text(),
147
- headers: Object.fromEntries(response.headers.entries()),
148
- };
149
- }
150
- /**
151
- * Runs an LLM step of a quick command and puts the result in the `resultMap` of the context passed as parameter.
152
- */
153
- async function runLLMStep({ qc: { slug, steps }, code, customInputs, context, executionId, resultMap, signal }, stepIndex) {
154
- const step = steps[stepIndex];
155
- let stepContext = context;
156
- if (!step.use_uploaded_files) {
157
- const { upload_ids: _upload_ids, ...contextDataProps } = context;
158
- stepContext = { ...contextDataProps };
159
- }
160
- const stream = aiClient.streamLlmStepOfQuickCommand(slug, step.slug, {
161
- input_data: code,
162
- context: stepContext,
163
- qc_execution_id: executionId,
164
- slugs_executions: { ...resultMap, ...customInputs },
165
- });
166
- signal.addEventListener('abort', () => stream.cancel());
167
- let finalValue;
168
- try {
169
- finalValue = await stream.getValue();
170
- resultMap[step.slug] = finalValue;
171
- }
172
- catch (error) {
173
- // eslint-disable-next-line no-console
174
- console.error('Error executing QC step', error);
175
- }
176
- }
177
69
  function updateProgressMessageForStep(message, qc, stepIndex) {
178
70
  const t = translate(dictionary);
179
71
  message.setValue({
@@ -203,94 +95,13 @@ export function createQuickCommandInterceptor(widget, getEditor) {
203
95
  }, showImmediately ? 0 : progressMessageDelayMS);
204
96
  return controller;
205
97
  }
206
- async function getScriptStepStatus(scriptExecutionId, interval = 5000, maxAttempts = 500, currentAttempt = 0) {
207
- if (currentAttempt >= maxAttempts) {
208
- throw new Error('Max attempts reached in verify script status');
209
- }
210
- await aiClient.getStatusScriptStep.invalidate({ scriptExecutionId });
211
- const response = await aiClient.getStatusScriptStep.query({ scriptExecutionId });
212
- if (response.status === 'success') {
213
- return response;
214
- }
215
- if (response.status === 'failure') {
216
- throw response;
217
- }
218
- await new Promise(resolve => { setTimeout(resolve, interval); });
219
- return getScriptStepStatus(scriptExecutionId, interval, maxAttempts, currentAttempt + 1);
220
- }
221
- async function runScriptStep({ qc: { slug, steps }, code, context, resultMap, customInputs, signal }, stepIndex) {
222
- const step = steps[stepIndex];
223
- let stepContext = context;
224
- if (!step.use_uploaded_files) {
225
- const { upload_ids: _upload_ids, ...contextDataProps } = context;
226
- stepContext = { ...contextDataProps };
227
- }
228
- try {
229
- const { script_execution_id } = await aiClient.startScriptStep.mutate({
230
- stepSlug: step.slug,
231
- slug: slug,
232
- quickCommandStartScriptRequest: {
233
- input_data: code,
234
- custom_inputs: customInputs,
235
- context: stepContext,
236
- slugs_executions: resultMap,
237
- },
238
- }, signal);
239
- const scriptResult = await getScriptStepStatus(script_execution_id);
240
- resultMap[step.slug] = scriptResult;
241
- }
242
- catch (error) {
243
- throw new Error(`Failed to execute step "${step.slug}" of quick command "${slug}". Error ${error}.`);
244
- }
245
- }
246
- async function runStepsRecursively(currentIndex, progress, ctx, iteration) {
247
- const { qc } = ctx;
248
- if (!qc.steps || currentIndex >= qc.steps?.length)
249
- return;
250
- progress.update(currentIndex);
251
- if (qc.steps[currentIndex].type === 'ROUTER') {
252
- await runRouterStep(ctx, currentIndex, iteration, progress);
253
- return;
254
- }
255
- if (qc.steps[currentIndex].type === 'SCRIPT') {
256
- await runScriptStep(ctx, currentIndex);
257
- }
258
- else {
259
- await (qc.steps[currentIndex].type === 'FETCH' ? runFetchStep(ctx, currentIndex) : runLLMStep(ctx, currentIndex));
260
- }
261
- const currentStep = qc.steps?.[currentIndex];
262
- let nextIndex = currentIndex + 1;
263
- let nextStepSlug = currentStep.next_step_slug;
264
- const stepResult = ctx.resultMap[currentStep.slug];
265
- if (stepResult && typeof stepResult !== 'string' && 'answer_status' in stepResult && !!stepResult.answer_status?.next_step_slug) {
266
- nextStepSlug = stepResult.answer_status.next_step_slug;
267
- }
268
- if (nextStepSlug) {
269
- nextIndex = nextStepSlug === 'end' ?
270
- qc.steps.length : qc.steps?.findIndex((step) => step.slug === nextStepSlug);
271
- }
272
- await runStepsRecursively(nextIndex, progress, ctx, iteration);
273
- }
274
- async function runSteps(ctx) {
98
+ async function runQC(ctx) {
275
99
  const progress = showProgressMessage(ctx);
276
- try {
277
- await runStepsRecursively(0, progress, ctx, {});
278
- }
279
- finally {
280
- progress.remove();
281
- }
282
- }
283
- async function formatResult({ qc, code, executionId, context, resultMap, customInputs, signal }) {
284
- const formatted = await aiClient.formatResultOfQuickCommand.mutate({
285
- slug: qc.slug,
286
- quickCommandsExecutionRequest: {
287
- input_data: code,
288
- context,
289
- qc_execution_id: executionId,
290
- slugs_executions: { ...resultMap, ...customInputs },
291
- },
292
- }, signal);
293
- return formatted.result;
100
+ const { qc, ...props } = ctx;
101
+ const context = { ...props, slug: qc.slug };
102
+ const finalResult = await aiClient.runQuickCommand(context, progress);
103
+ progress.remove();
104
+ return finalResult;
294
105
  }
295
106
  // opens a new chat tab if the quick command doesn't preserve the conversation and the current conversation isn't clean.
296
107
  function manageConversationContext(ctx) {
@@ -332,40 +143,8 @@ export function createQuickCommandInterceptor(widget, getEditor) {
332
143
  }
333
144
  manageConversationContext(ctx);
334
145
  await computeCustomInputs(ctx);
335
- await runSteps(ctx);
336
- return formatResult(ctx);
337
- }
338
- /**
339
- * This registers a quick command event in the backend (analytics).
340
- */
341
- async function registerAnalyticsEvent({ qc, isRemote, executionId, code = '', context }, status, start) {
342
- const now = new Date().getTime();
343
- try {
344
- await aiClient.createEvent.mutate({
345
- body: [{
346
- type: 'custom_quick_command_execution',
347
- quick_command_event: {
348
- type: qc.type || '',
349
- duration_execution: now - start,
350
- status_execution: status,
351
- slug: qc.slug,
352
- qc_execution_id: executionId,
353
- id: qc.id,
354
- //@ts-ignore
355
- is_remote: isRemote,
356
- },
357
- code,
358
- context,
359
- knowledge_sources: [],
360
- size: getSizeOfString(code),
361
- generated_at: now,
362
- }],
363
- });
364
- }
365
- catch (error) {
366
- // eslint-disable-next-line no-console
367
- console.warn('Failed to register event: quick command.');
368
- }
146
+ const result = await runQC(ctx);
147
+ return result;
369
148
  }
370
149
  /**
371
150
  * Writes the result in the chat or in the editor.
@@ -415,12 +194,10 @@ export function createQuickCommandInterceptor(widget, getEditor) {
415
194
  signal,
416
195
  };
417
196
  chat.set('isLoading', true);
418
- const start = new Date().getTime();
419
197
  try {
420
198
  const result = await runQuickCommand(ctx);
421
199
  if (result) {
422
200
  outputResult(ctx, result);
423
- registerAnalyticsEvent(ctx, '200', start);
424
201
  }
425
202
  }
426
203
  catch (error) {
@@ -436,7 +213,6 @@ export function createQuickCommandInterceptor(widget, getEditor) {
436
213
  agent: chat.get('agent'),
437
214
  type: 'text',
438
215
  }));
439
- registerAnalyticsEvent(ctx, message, start);
440
216
  }
441
217
  ctx.chat.set('isLoading', false);
442
218
  // prevents the next intercept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AAK,CAAC,CAAA;QAChC,8CAA8C;QAC9C,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,uBAAuB,CAAA;AAChC,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,iBAAiB,EAAE,sFAAsF;QACzG,gBAAgB,EAAE,gJAAgJ;QAClK,QAAQ,EAAE,4CAA4C;QACtD,OAAO,EAAE,kDAAkD;QAC3D,QAAQ,EAAE,0HAA0H;KACrI;IACD,EAAE,EAAE;QACF,iBAAiB,EAAE,2FAA2F;QAC9G,gBAAgB,EAAE,wJAAwJ;QAC1K,QAAQ,EAAE,6CAA6C;QACvD,OAAO,EAAE,wDAAwD;QACjE,QAAQ,EAAE,6HAA6H;KACxI;CACmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const FreemiumSensitiveDataInfo: () => import("react/jsx-runtime").JSX.Element | undefined;
2
+ //# sourceMappingURL=FreemiumSensitiveDataInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FreemiumSensitiveDataInfo.d.ts","sourceRoot":"","sources":["../../src/components/FreemiumSensitiveDataInfo.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB,2DAkBrC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Column, Icon, Link, Row, Text } from '@stack-spot/citric-react';
3
+ import { useTranslate } from '@stack-spot/portal-translate';
4
+ import { checkIsTrial } from '../utils/check-is-trial.js';
5
+ export const FreemiumSensitiveDataInfo = () => {
6
+ const isTrial = checkIsTrial();
7
+ const t = useTranslate(dictionary);
8
+ if (!isTrial)
9
+ return;
10
+ return (_jsxs(Row, { gap: 8, pb: 3, pt: 3, w: "100%", justifyContent: "center", alignItems: "center", children: [_jsx(Column, { children: _jsx(Icon, { icon: "InfoCircle", color: "light.700" }) }), _jsxs("div", { children: [_jsx(Text, { style: { lineHeight: '14px', marginRight: '2px' }, color: "light.700", appearance: "microtext1", children: t.information }), _jsx(Link, { target: "_blank", color: "light.700", style: { lineHeight: '14px' }, appearance: "microtext1", href: t.policiesLink, children: t.seePolices })] })] }));
11
+ };
12
+ const dictionary = {
13
+ en: {
14
+ information: 'For personal use only. Avoid entering corporate or sensitive data.',
15
+ seePolices: 'View Terms and Conditions',
16
+ policiesLink: 'https://stackspot.com/en/stackspot-terms-and-conditions-ai',
17
+ },
18
+ pt: {
19
+ information: 'Conta para uso pessoal. Evite inserir dados corporativos ou sensíveis.',
20
+ seePolices: 'Ver Termos e Condições',
21
+ policiesLink: 'https://stackspot.com/pt/termos-e-condicoes-da-plataforma-stackspot-ai',
22
+ },
23
+ };
24
+ //# sourceMappingURL=FreemiumSensitiveDataInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FreemiumSensitiveDataInfo.js","sourceRoot":"","sources":["../../src/components/FreemiumSensitiveDataInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,MAAM,OAAO,GAAG,YAAY,EAAE,CAAA;IAC9B,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;IAClC,IAAI,CAAC,OAAO;QAAE,OAAM;IAEpB,OAAO,CACL,MAAC,GAAG,IAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,aAC7E,KAAC,MAAM,cACL,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,WAAW,GAAG,GACrC,EACT,0BACE,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,KAAK,EAAC,WAAW,EAAC,UAAU,EAAC,YAAY,YAAE,CAAC,CAAC,WAAW,GAAQ,EACzH,KAAC,IAAI,IAAC,MAAM,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,UAAU,EAAC,YAAY,EAAC,IAAI,EAAE,CAAC,CAAC,YAAY,YAChH,CAAC,CAAC,UAAU,GACR,IACH,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,WAAW,EAAE,oEAAoE;QACjF,UAAU,EAAE,2BAA2B;QACvC,YAAY,EAAE,4DAA4D;KAC3E;IACD,EAAE,EAAE;QACF,WAAW,EAAE,wEAAwE;QACrF,UAAU,EAAE,wBAAwB;QACpC,YAAY,EAAE,wEAAwE;KACvF;CACO,CAAA"}
@@ -38,6 +38,6 @@ export declare const dictionary: {
38
38
  userPrompt: string;
39
39
  };
40
40
  };
41
- export declare function useStepsDictionary(): Record<"pending" | "input" | "step" | "steps" | "answer" | "running" | "tools" | "planning" | "unknown" | "stepsPanelDescription" | "response" | "executionTime" | "nextAttempt" | "previousAttempt" | "finalAnswer" | "userPrompt", string>;
41
+ export declare function useStepsDictionary(): Record<"pending" | "input" | "step" | "steps" | "tools" | "planning" | "running" | "answer" | "unknown" | "stepsPanelDescription" | "response" | "executionTime" | "nextAttempt" | "previousAttempt" | "finalAnswer" | "userPrompt", string>;
42
42
  export type ToolsDictionary = typeof dictionary['en'];
43
43
  //# sourceMappingURL=dictionary.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "2.13.1",
3
+ "version": "2.14.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "@citric/core": "^6.4.0",
17
17
  "@stack-spot/portal-components": "^2.27.3",
18
18
  "@citric/icons": "^5.13.0",
19
- "@stack-spot/portal-network": "0.219.0",
19
+ "@stack-spot/portal-network": "0.221.0",
20
20
  "@citric/ui": "^6.10.2",
21
21
  "@stack-spot/portal-translate": "^2.1.0",
22
22
  "lodash": "^4.17.0",
@@ -25,6 +25,7 @@ import { Stacks } from './views/Stacks'
25
25
  import { Steps } from './views/Steps'
26
26
  import { Tools } from './views/Tools'
27
27
  import { Workspaces } from './views/Workspaces'
28
+ import { FreemiumSensitiveDataInfo } from './components/FreemiumSensitiveDataInfo'
28
29
 
29
30
  export interface AIWidgetProps extends WithStyle, CustomMessage {
30
31
  /**
@@ -100,13 +101,13 @@ export const StackspotAIWidget = (
100
101
  const isCurrentChatEmpty = currentChat.length === 0
101
102
  const isTrial = checkIsTrial()
102
103
  const features = useCurrentChatState('features')
103
-
104
+
104
105
  return useMemo(() => (
105
106
  <FallbackBoundary>
106
107
  <RightPanelProvider chatWindow={chatWindowRef} panel={rightPanelRef}>
107
108
  <div className={listToClass(['ai-chat-widget', isMinimized && 'minimized', className])} translate="no" style={style}>
108
109
  <div className="chat-window" ref={chatWindowRef}>
109
- {hasHeader &&<>
110
+ {hasHeader && <>
110
111
  {isMinimized
111
112
  ? <MinimizedHeader {...minimizedActions} />
112
113
  : <ChatTabSelection buttons={tabButtons} />
@@ -123,6 +124,7 @@ export const StackspotAIWidget = (
123
124
  </div>
124
125
  {features.messageInput && <MessageInput chatWindowRef={chatWindowRef} customInputMessage={customInputMessage} />}
125
126
  {suffix}
127
+ <FreemiumSensitiveDataInfo />
126
128
  </div>
127
129
  </div>
128
130
  <Stacks />
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stack-spot/ai-chat-widget",
3
- "version": "2.13.1",
4
- "date": "Tue Feb 10 2026 19:47:29 GMT+0000 (Coordinated Universal Time)",
3
+ "version": "2.14.0",
4
+ "date": "Tue Feb 24 2026 17:50:08 GMT+0000 (Coordinated Universal Time)",
5
5
  "dependencies": [
6
6
  {
7
7
  "name": "@stack-spot/app-metadata",
@@ -125,7 +125,7 @@
125
125
  },
126
126
  {
127
127
  "name": "@stack-spot/portal-network",
128
- "version": "0.219.0(@stack-spot/auth@6.1.0)(@stack-spot/opa@2.5.0(@stack-spot/auth@6.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@stack-spot/portal-translate@2.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@tanstack/react-query@5.59.16(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
128
+ "version": "0.221.0(@stack-spot/auth@6.1.0)(@stack-spot/opa@2.5.0(@stack-spot/auth@6.1.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@stack-spot/portal-translate@2.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@tanstack/react-query@5.59.16(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)"
129
129
  },
130
130
  {
131
131
  "name": "@stack-spot/portal-theme",
@@ -1,7 +1,6 @@
1
- import { aiClient, CancelledError, StackspotAPIError } from '@stack-spot/portal-network'
2
- import { QuickCommandPromptResponse2, QuickCommandResponse, QuickCommandScriptExecutionResponse, QuickCommandStepFetchResponse, QuickCommandStepLlmResponse, QuickCommandStepResult } from '@stack-spot/portal-network/api/ai'
1
+ import { aiClient, CancelledError, QCContext as QCContextLib, StackspotAPIError } from '@stack-spot/portal-network'
2
+ import { QuickCommandResponse, QuickCommandStepResult } from '@stack-spot/portal-network/api/ai'
3
3
  import { Dictionary, interpolate, translate } from '@stack-spot/portal-translate'
4
- import { isNil } from 'lodash'
5
4
  import type { editor } from 'monaco-editor'
6
5
  import { ulid } from 'ulid'
7
6
  import { AbortedError } from '../AbortedError'
@@ -12,7 +11,6 @@ import { ChatState } from '../state/ChatState'
12
11
  import { LabeledWithImage } from '../state/types'
13
12
  import { WidgetState } from '../state/WidgetState'
14
13
  import { defaultLanguage } from '../utils/programming-languages'
15
- import { getSizeOfString } from '../utils/string'
16
14
  import { CustomInputs } from './CustomInputs'
17
15
 
18
16
  export function buildQuickCommandContext(state: ChatState, message?: ChatEntry) {
@@ -94,132 +92,6 @@ export function createQuickCommandInterceptor(widget: WidgetState, getEditor: ()
94
92
  )
95
93
  }
96
94
 
97
- /**
98
- * Runs an Router step of a quick command.
99
- */
100
- async function runRouterStep(
101
- ctx: QCContext,
102
- stepIndex: number, iteration: Record<string, number>,
103
- progress: { update: (index: number) => void, remove: () => void },
104
- ) {
105
- const { qc: { slug, steps }, code, resultMap, customInputs } = ctx
106
- const step = steps![stepIndex]
107
- const inputData = Object.keys(customInputs).length > 0 && code ? { ...customInputs, [code]: code } : code ?? customInputs
108
- try {
109
- if (step.slug in iteration) {
110
- iteration[step.slug] = iteration[step.slug] + 1
111
- } else {
112
- iteration[step.slug] = 1
113
- }
114
-
115
- const { next_step_slug } = await aiClient.calculateNextStep.mutate({
116
- stepSlug: step.slug,
117
- slug: slug,
118
- quickCommandEvaluateStepRouterRequest: {
119
- executions_count: iteration[step.slug],
120
- input_data: inputData,
121
- slugs_executions: resultMap,
122
- },
123
- })
124
-
125
- if (next_step_slug === step.slug) {
126
- return runStepsRecursively(stepIndex, progress, ctx, iteration)
127
- }
128
- const nextStepIndex = steps?.findIndex((step) => step.slug === next_step_slug)
129
-
130
- if (isNil(nextStepIndex) || nextStepIndex === -1) return
131
-
132
- return runStepsRecursively(nextStepIndex, progress, ctx, iteration)
133
- }
134
- catch (error: any) {
135
- // eslint-disable-next-line no-console
136
- console.error('Error executing QC step', error)
137
- }
138
- }
139
-
140
- /**
141
- * Runs a fetch step of a quick command and puts the result in the `resultMap` of the context passed as parameter.
142
- */
143
- async function runFetchStep(ctx: QCContext, stepIndex: number) {
144
- const { qc: { slug, steps }, code, context, resultMap, customInputs, executionId, signal } = ctx
145
- const step = steps![stepIndex] as QuickCommandStepFetchResponse
146
- if (step.is_remote) {
147
- ctx.isRemote = true
148
-
149
- const { data } = await aiClient.fetchStepOfQuickCommandRemotely.mutate({
150
- slug, stepSlug: step.slug,
151
- quickCommandsExecutionRequest: {
152
- code_selection: code, context, qc_execution_id: executionId,
153
- slugs_executions: { ...resultMap, ...customInputs },
154
- },
155
- })
156
-
157
- //data is the return of the request in the QC so we do not have full control over the response
158
- //We handle the usual format with body, status_code and headers, but we might also handle other formats
159
- const responseData = data as any
160
- resultMap[step.slug] = {
161
- status: responseData.status_code || 200,
162
- data: JSON.stringify(responseData.body) ?? JSON.stringify(responseData),
163
- headers: responseData.headers ?? {},
164
- }
165
- return
166
- }
167
-
168
- const { headers, data, method, url } = await aiClient.fetchStepOfQuickCommand.mutate({
169
- slug,
170
- stepSlug: step.slug,
171
- quickCommandsExecutionRequest: {
172
- input_data: code, context, qc_execution_id: executionId,
173
- slugs_executions: { ...resultMap, ...customInputs },
174
- },
175
- }, signal)
176
- const body = ['get', 'head'].includes(method.toLowerCase()) ? undefined : data
177
- const response = await fetch(url, { headers: headers || undefined, body, method, signal })
178
- if (!response.ok) throw new Error(`Failed to execute step "${step.slug}" of quick command "${slug}". Status ${response.status}.`)
179
- resultMap[step.slug] = {
180
- status: response.status,
181
- data: await response.text(),
182
- headers: Object.fromEntries(response.headers.entries()),
183
- }
184
- }
185
-
186
- /**
187
- * Runs an LLM step of a quick command and puts the result in the `resultMap` of the context passed as parameter.
188
- */
189
- async function runLLMStep(
190
- { qc: { slug, steps }, code, customInputs, context, executionId, resultMap, signal }: QCContext,
191
- stepIndex: number,
192
- ) {
193
- const step = steps![stepIndex] as QuickCommandStepLlmResponse
194
- let stepContext = context
195
- if (!step.use_uploaded_files) {
196
- const { upload_ids: _upload_ids, ...contextDataProps } = context
197
- stepContext = { ...contextDataProps } as QuickCommandContext
198
- }
199
-
200
- const stream = aiClient.streamLlmStepOfQuickCommand(
201
- slug,
202
- step.slug,
203
- {
204
- input_data: code,
205
- context: stepContext,
206
- qc_execution_id: executionId,
207
- slugs_executions: { ...resultMap, ...customInputs },
208
- },
209
- )
210
-
211
- signal.addEventListener('abort', () => stream.cancel())
212
-
213
- let finalValue: QuickCommandPromptResponse2
214
- try {
215
- finalValue = await stream.getValue()
216
- resultMap[step.slug] = finalValue
217
- } catch (error: any) {
218
- // eslint-disable-next-line no-console
219
- console.error('Error executing QC step', error)
220
- }
221
- }
222
-
223
95
  function updateProgressMessageForStep(message: ChatEntry, qc: QuickCommandResponse, stepIndex: number) {
224
96
  const t = translate(dictionary)
225
97
  message.setValue({
@@ -251,115 +123,16 @@ export function createQuickCommandInterceptor(widget: WidgetState, getEditor: ()
251
123
  }, showImmediately ? 0 : progressMessageDelayMS)
252
124
  return controller
253
125
  }
254
- async function getScriptStepStatus(
255
- scriptExecutionId: string,
256
- interval = 5000,
257
- maxAttempts = 500,
258
- currentAttempt = 0,
259
- ): Promise<QuickCommandScriptExecutionResponse> {
260
- if (currentAttempt >= maxAttempts) {
261
- throw new Error('Max attempts reached in verify script status')
262
- }
263
- await aiClient.getStatusScriptStep.invalidate({ scriptExecutionId })
264
- const response = await aiClient.getStatusScriptStep.query({ scriptExecutionId })
265
-
266
- if (response.status === 'success') {
267
- return response
268
- }
269
126
 
270
- if (response.status === 'failure') {
271
- throw response
272
- }
273
-
274
- await new Promise(resolve => {setTimeout(resolve, interval)})
275
-
276
- return getScriptStepStatus(scriptExecutionId, interval, maxAttempts, currentAttempt + 1)
277
- }
278
-
279
- async function runScriptStep(
280
- { qc: { slug, steps }, code, context, resultMap, customInputs, signal }: QCContext,
281
- stepIndex: number,
282
- ) {
283
- const step = steps![stepIndex] as QuickCommandStepLlmResponse
284
- let stepContext = context
285
- if (!step.use_uploaded_files) {
286
- const { upload_ids: _upload_ids, ...contextDataProps } = context
287
- stepContext = { ...contextDataProps } as QuickCommandContext
288
- }
289
-
290
- try {
291
- const { script_execution_id } = await aiClient.startScriptStep.mutate({
292
- stepSlug: step.slug,
293
- slug: slug,
294
- quickCommandStartScriptRequest: {
295
- input_data: code,
296
- custom_inputs: customInputs,
297
- context: stepContext,
298
- slugs_executions: resultMap,
299
- },
300
- }, signal)
301
- const scriptResult = await getScriptStepStatus(script_execution_id)
302
- resultMap[step.slug] = scriptResult
303
- }
304
- catch (error: any) {
305
- throw new Error(`Failed to execute step "${step.slug}" of quick command "${slug}". Error ${error}.`)
306
- }
307
- }
308
-
309
- async function runStepsRecursively(currentIndex: number, progress: { update: (index: number) => void, remove: () => void },
310
- ctx: QCContext, iteration: Record<string, number>) {
311
- const { qc } = ctx
312
-
313
- if (!qc.steps || currentIndex >= qc.steps?.length) return
314
- progress.update(currentIndex)
315
-
316
- if (qc.steps[currentIndex].type === 'ROUTER') {
317
- await runRouterStep(ctx, currentIndex, iteration, progress)
318
- return
319
- }
320
-
321
- if (qc.steps[currentIndex].type === 'SCRIPT') {
322
- await runScriptStep(ctx, currentIndex)
323
- } else {
324
- await (qc.steps[currentIndex].type === 'FETCH' ? runFetchStep(ctx, currentIndex) : runLLMStep(ctx, currentIndex))
325
- }
326
-
327
- const currentStep = qc.steps?.[currentIndex] as QuickCommandStepFetchResponse | QuickCommandStepLlmResponse
328
- let nextIndex = currentIndex + 1
329
-
330
- let nextStepSlug = currentStep.next_step_slug
331
- const stepResult = ctx.resultMap[currentStep.slug]
332
- if (stepResult && typeof stepResult !== 'string' && 'answer_status' in stepResult && !!stepResult.answer_status?.next_step_slug) {
333
- nextStepSlug = stepResult.answer_status.next_step_slug
334
- }
335
-
336
- if (nextStepSlug) {
337
- nextIndex = nextStepSlug === 'end' ?
338
- qc.steps.length : qc.steps?.findIndex((step) => step.slug === nextStepSlug)
339
- }
340
- await runStepsRecursively(nextIndex, progress, ctx, iteration)
341
- }
342
-
343
- async function runSteps(ctx: QCContext) {
127
+ async function runQC(ctx: QCContext) {
344
128
  const progress = showProgressMessage(ctx)
345
- try {
346
- await runStepsRecursively(0, progress, ctx, {})
347
- } finally {
348
- progress.remove()
349
- }
350
- }
129
+
130
+ const { qc, ...props } = ctx
131
+ const context: QCContextLib = { ...props, slug: qc.slug }
132
+ const finalResult = await aiClient.runQuickCommand(context, progress)
351
133
 
352
- async function formatResult({ qc, code, executionId, context, resultMap, customInputs, signal }: QCContext) {
353
- const formatted = await aiClient.formatResultOfQuickCommand.mutate({
354
- slug: qc.slug,
355
- quickCommandsExecutionRequest: {
356
- input_data: code,
357
- context,
358
- qc_execution_id: executionId,
359
- slugs_executions: { ...resultMap, ...customInputs },
360
- },
361
- }, signal)
362
- return formatted.result
134
+ progress.remove()
135
+ return finalResult
363
136
  }
364
137
 
365
138
  // opens a new chat tab if the quick command doesn't preserve the conversation and the current conversation isn't clean.
@@ -389,7 +162,7 @@ export function createQuickCommandInterceptor(widget: WidgetState, getEditor: ()
389
162
  } catch (error) {
390
163
  throw error instanceof StackspotAPIError && error.status === 404 ? new Error(t.notFound) : error
391
164
  }
392
-
165
+
393
166
  if (ctx.qc.use_selected_code && (!code && ctx.context.upload_ids?.length === 0)) {
394
167
  widget.set('panel', 'editor')
395
168
  ctx.chat.pushMessage(new ChatEntry({
@@ -398,44 +171,12 @@ export function createQuickCommandInterceptor(widget: WidgetState, getEditor: ()
398
171
  agent: ctx.chat.get('agent'),
399
172
  content: t.requiresSelection,
400
173
  }))
401
- return
174
+ return
402
175
  }
403
176
  manageConversationContext(ctx)
404
177
  await computeCustomInputs(ctx)
405
- await runSteps(ctx)
406
- return formatResult(ctx)
407
- }
408
-
409
- /**
410
- * This registers a quick command event in the backend (analytics).
411
- */
412
- async function registerAnalyticsEvent({ qc, isRemote, executionId, code = '', context }: QCContext, status: string, start: number) {
413
- const now = new Date().getTime()
414
- try {
415
- await aiClient.createEvent.mutate({
416
- body: [{
417
- type: 'custom_quick_command_execution',
418
- quick_command_event: {
419
- type: qc.type || '',
420
- duration_execution: now - start,
421
- status_execution: status,
422
- slug: qc.slug,
423
- qc_execution_id: executionId,
424
- id: qc.id,
425
- //@ts-ignore
426
- is_remote: isRemote,
427
- },
428
- code,
429
- context,
430
- knowledge_sources: [],
431
- size: getSizeOfString(code),
432
- generated_at: now,
433
- }],
434
- })
435
- } catch (error) {
436
- // eslint-disable-next-line no-console
437
- console.warn('Failed to register event: quick command.')
438
- }
178
+ const result = await runQC(ctx)
179
+ return result
439
180
  }
440
181
 
441
182
  /**
@@ -483,12 +224,10 @@ export function createQuickCommandInterceptor(widget: WidgetState, getEditor: ()
483
224
  signal,
484
225
  }
485
226
  chat.set('isLoading', true)
486
- const start = new Date().getTime()
487
227
  try {
488
228
  const result = await runQuickCommand(ctx)
489
229
  if (result) {
490
230
  outputResult(ctx, result)
491
- registerAnalyticsEvent(ctx, '200', start)
492
231
  }
493
232
  } catch (error: any) {
494
233
  let message = error.message || `${error}`
@@ -501,7 +240,6 @@ export function createQuickCommandInterceptor(widget: WidgetState, getEditor: ()
501
240
  agent: chat.get('agent'),
502
241
  type: 'text',
503
242
  }))
504
- registerAnalyticsEvent(ctx, message, start)
505
243
  }
506
244
  ctx.chat.set('isLoading', false)
507
245
  // prevents the next interceptors from running
@@ -0,0 +1,36 @@
1
+ import { Column, Icon, Link, Row, Text } from '@stack-spot/citric-react'
2
+ import { useTranslate } from '@stack-spot/portal-translate'
3
+ import { checkIsTrial } from '../utils/check-is-trial'
4
+
5
+ export const FreemiumSensitiveDataInfo = () => {
6
+ const isTrial = checkIsTrial()
7
+ const t = useTranslate(dictionary)
8
+ if (!isTrial) return
9
+
10
+ return (
11
+ <Row gap={8} pb={3} pt={3} w="100%" justifyContent="center" alignItems="center">
12
+ <Column>
13
+ <Icon icon="InfoCircle" color="light.700" />
14
+ </Column>
15
+ <div>
16
+ <Text style={{ lineHeight: '14px', marginRight: '2px' }} color="light.700" appearance="microtext1">{t.information}</Text>
17
+ <Link target="_blank" color="light.700" style={{ lineHeight: '14px' }} appearance="microtext1" href={t.policiesLink}>
18
+ {t.seePolices}
19
+ </Link>
20
+ </div>
21
+ </Row>
22
+ )
23
+ }
24
+
25
+ const dictionary = {
26
+ en: {
27
+ information: 'For personal use only. Avoid entering corporate or sensitive data.',
28
+ seePolices: 'View Terms and Conditions',
29
+ policiesLink: 'https://stackspot.com/en/stackspot-terms-and-conditions-ai',
30
+ },
31
+ pt: {
32
+ information: 'Conta para uso pessoal. Evite inserir dados corporativos ou sensíveis.',
33
+ seePolices: 'Ver Termos e Condições',
34
+ policiesLink: 'https://stackspot.com/pt/termos-e-condicoes-da-plataforma-stackspot-ai',
35
+ },
36
+ } as const