@uipath/apollo-wind 2.95.3 → 2.96.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.
@@ -2,4 +2,4 @@ export type { ByoModelDialogProps } from './byo-model-dialog';
2
2
  export { ByoModelDialog } from './byo-model-dialog';
3
3
  export type { ByoModelDialogLabels } from './labels';
4
4
  export { DEFAULT_BYO_MODEL_DIALOG_LABELS, resolveByoModelDialogLabels } from './labels';
5
- export type { ByoApiType, ByoAuthType, ByoConnection, ByoConnectionForm, ByoConnectionValues, ByoConnectRequest, ByoDialogContext, ByoEditTarget, ByoFailure, ByoFieldOption, ByoFolder, ByoFormField, ByoModelDialogApi, ByoModelToEdit, ByoProvider, ByoProviderModel, ByoProviderModels, ByoReplaceableModel, ByoResult, ByoSavedModel, ByoSaveRequest, } from './types';
5
+ export type { ByoApiType, ByoAuthType, ByoConnection, ByoConnectionChange, ByoConnectionForm, ByoConnectionValues, ByoConnectRequest, ByoDialogContext, ByoEditTarget, ByoFailure, ByoFieldOption, ByoFolder, ByoFormField, ByoModelDialogApi, ByoModelToEdit, ByoProvider, ByoProviderModel, ByoProviderModels, ByoReplaceableModel, ByoResult, ByoSavedModel, ByoSaveRequest, } from './types';
@@ -51,7 +51,7 @@ const DEFAULT_BYO_MODEL_DIALOG_LABELS = {
51
51
  inUiPathCaption: (provider)=>`Your connection to ${provider} will be saved in this folder.`,
52
52
  connectionName: 'Connection name',
53
53
  folder: 'Folder',
54
- folderHint: 'Personal workspace keeps it to you; a shared folder lets teammates reuse it.',
54
+ folderHint: 'Teammates with access to this folder can reuse the connection.',
55
55
  connectionNameTaken: 'You already have a connection with this name.',
56
56
  connect: 'Connect',
57
57
  connecting: 'Connecting…',
@@ -62,34 +62,46 @@ const DEFAULT_BYO_MODEL_DIALOG_LABELS = {
62
62
  savingConnection: 'Saving…',
63
63
  cancelConnectionEdit: 'Cancel',
64
64
  connectionUpdated: 'Connection updated.',
65
- modelStep: 'Model',
65
+ checkingConnection: 'Checking the connection…',
66
+ applyChange: 'Switch connection',
67
+ applyingChange: 'Switching…',
68
+ separateConnection: 'Create a separate connection instead',
69
+ modelStep: 'Your model',
66
70
  modelNeedsConnection: (provider)=>`Connect to list your ${provider} models`,
67
71
  modelsLoading: (provider)=>`Loading your ${provider} models…`,
68
72
  modelsFailed: (provider)=>`Could not list your ${provider} models`,
69
- modelSelect: (compatible)=>`Select a model · ${compatible} can be used`,
73
+ modelSelect: (count)=>`Select one of ${count} models`,
70
74
  modelSearch: (total)=>`Search ${total} models…`,
71
75
  modelNoMatch: (query)=>`No models match "${query}".`,
72
76
  compatibleGroup: (count)=>`Can be used · ${count}`,
73
77
  incompatibleGroup: (count)=>`Not supported · ${count}`,
74
78
  modelIdPlaceholder: 'Model or deployment name',
75
79
  modelIdLabel: 'Model id',
76
- nameStep: 'Name in your model list',
77
- nameHint: 'Shown in the model picker. Defaults to the model id.',
80
+ nameStep: 'Model alias',
81
+ nameHint: 'Shown in the model picker.',
78
82
  nameTaken: (name)=>`"${name}" is already in your model list. Pick another name.`,
79
83
  nameReserved: (name)=>`"${name}" is the name of a UiPath model. Pick another name.`,
80
- useOwnName: 'A name of your own',
84
+ useOwnName: 'Custom',
85
+ aliasSearch: 'Search UiPath models…',
86
+ aliasNoMatch: (query)=>`No UiPath model matches "${query}".`,
87
+ addCustomAlias: 'Add custom alias',
88
+ editCustomAlias: 'Edit custom alias',
89
+ customAliasPlaceholder: 'Enter a custom alias',
90
+ addAlias: 'Add',
91
+ saveAlias: 'Save',
81
92
  useReplacement: 'Replace a UiPath model',
82
93
  replacementPlaceholder: 'Select a UiPath model',
83
94
  replacementHint: 'Calls to this UiPath model go to your model instead.',
84
95
  deprecated: 'Deprecated',
85
96
  retiresOn: (date)=>`To be retired on ${date}`,
86
- apiTypeStep: 'API type',
87
- apiTypePlaceholder: 'Select an API type',
88
- apiTypeHint: 'The API endpoint supported by the LLM.',
89
- apiTypeNone: (provider)=>`${provider} offers no API type that can serve this model.`,
90
97
  showResponse: 'Show LLM response',
91
98
  hideResponse: 'Hide LLM response',
92
99
  close: 'Close',
100
+ dismiss: 'Dismiss',
101
+ tryAgain: 'Try again',
102
+ retryConnect: (button)=>`Check the details above, then ${button} again.`,
103
+ retryTest: (button)=>`Pick another model or fix its connection, then ${button} again.`,
104
+ retrySwitch: 'Switch connection again, or create a separate connection instead.',
93
105
  cancel: 'Cancel',
94
106
  testAndAdd: 'Test and add',
95
107
  testAndSave: 'Test and save',
@@ -39,11 +39,15 @@ export interface ByoModelDialogLabels {
39
39
  savingConnection: string;
40
40
  cancelConnectionEdit: string;
41
41
  connectionUpdated: string;
42
+ checkingConnection: string;
43
+ applyChange: string;
44
+ applyingChange: string;
45
+ separateConnection: string;
42
46
  modelStep: string;
43
47
  modelNeedsConnection: (provider: string) => string;
44
48
  modelsLoading: (provider: string) => string;
45
49
  modelsFailed: (provider: string) => string;
46
- modelSelect: (compatible: number) => string;
50
+ modelSelect: (count: number) => string;
47
51
  modelSearch: (total: number) => string;
48
52
  modelNoMatch: (query: string) => string;
49
53
  compatibleGroup: (count: number) => string;
@@ -55,18 +59,28 @@ export interface ByoModelDialogLabels {
55
59
  nameTaken: (name: string) => string;
56
60
  nameReserved: (name: string) => string;
57
61
  useOwnName: string;
62
+ aliasSearch: string;
63
+ aliasNoMatch: (query: string) => string;
64
+ addCustomAlias: string;
65
+ editCustomAlias: string;
66
+ customAliasPlaceholder: string;
67
+ addAlias: string;
68
+ saveAlias: string;
58
69
  useReplacement: string;
59
70
  replacementPlaceholder: string;
60
71
  replacementHint: string;
61
72
  deprecated: string;
62
73
  retiresOn: (date: string) => string;
63
- apiTypeStep: string;
64
- apiTypePlaceholder: string;
65
- apiTypeHint: string;
66
- apiTypeNone: (provider: string) => string;
67
74
  showResponse: string;
68
75
  hideResponse: string;
69
76
  close: string;
77
+ dismiss: string;
78
+ tryAgain: string;
79
+ /** What to do after Connect or Save connection failed; `button` is the one that failed. */
80
+ retryConnect: (button: string) => string;
81
+ /** What to do after Test and add or Test and save failed; `button` is the one that failed. */
82
+ retryTest: (button: string) => string;
83
+ retrySwitch: string;
70
84
  cancel: string;
71
85
  testAndAdd: string;
72
86
  testAndSave: string;
@@ -22,7 +22,7 @@ const DEFAULT_BYO_MODEL_DIALOG_LABELS = {
22
22
  inUiPathCaption: (provider)=>`Your connection to ${provider} will be saved in this folder.`,
23
23
  connectionName: 'Connection name',
24
24
  folder: 'Folder',
25
- folderHint: 'Personal workspace keeps it to you; a shared folder lets teammates reuse it.',
25
+ folderHint: 'Teammates with access to this folder can reuse the connection.',
26
26
  connectionNameTaken: 'You already have a connection with this name.',
27
27
  connect: 'Connect',
28
28
  connecting: 'Connecting…',
@@ -33,34 +33,46 @@ const DEFAULT_BYO_MODEL_DIALOG_LABELS = {
33
33
  savingConnection: 'Saving…',
34
34
  cancelConnectionEdit: 'Cancel',
35
35
  connectionUpdated: 'Connection updated.',
36
- modelStep: 'Model',
36
+ checkingConnection: 'Checking the connection…',
37
+ applyChange: 'Switch connection',
38
+ applyingChange: 'Switching…',
39
+ separateConnection: 'Create a separate connection instead',
40
+ modelStep: 'Your model',
37
41
  modelNeedsConnection: (provider)=>`Connect to list your ${provider} models`,
38
42
  modelsLoading: (provider)=>`Loading your ${provider} models…`,
39
43
  modelsFailed: (provider)=>`Could not list your ${provider} models`,
40
- modelSelect: (compatible)=>`Select a model · ${compatible} can be used`,
44
+ modelSelect: (count)=>`Select one of ${count} models`,
41
45
  modelSearch: (total)=>`Search ${total} models…`,
42
46
  modelNoMatch: (query)=>`No models match "${query}".`,
43
47
  compatibleGroup: (count)=>`Can be used · ${count}`,
44
48
  incompatibleGroup: (count)=>`Not supported · ${count}`,
45
49
  modelIdPlaceholder: 'Model or deployment name',
46
50
  modelIdLabel: 'Model id',
47
- nameStep: 'Name in your model list',
48
- nameHint: 'Shown in the model picker. Defaults to the model id.',
51
+ nameStep: 'Model alias',
52
+ nameHint: 'Shown in the model picker.',
49
53
  nameTaken: (name)=>`"${name}" is already in your model list. Pick another name.`,
50
54
  nameReserved: (name)=>`"${name}" is the name of a UiPath model. Pick another name.`,
51
- useOwnName: 'A name of your own',
55
+ useOwnName: 'Custom',
56
+ aliasSearch: 'Search UiPath models…',
57
+ aliasNoMatch: (query)=>`No UiPath model matches "${query}".`,
58
+ addCustomAlias: 'Add custom alias',
59
+ editCustomAlias: 'Edit custom alias',
60
+ customAliasPlaceholder: 'Enter a custom alias',
61
+ addAlias: 'Add',
62
+ saveAlias: 'Save',
52
63
  useReplacement: 'Replace a UiPath model',
53
64
  replacementPlaceholder: 'Select a UiPath model',
54
65
  replacementHint: 'Calls to this UiPath model go to your model instead.',
55
66
  deprecated: 'Deprecated',
56
67
  retiresOn: (date)=>`To be retired on ${date}`,
57
- apiTypeStep: 'API type',
58
- apiTypePlaceholder: 'Select an API type',
59
- apiTypeHint: 'The API endpoint supported by the LLM.',
60
- apiTypeNone: (provider)=>`${provider} offers no API type that can serve this model.`,
61
68
  showResponse: 'Show LLM response',
62
69
  hideResponse: 'Hide LLM response',
63
70
  close: 'Close',
71
+ dismiss: 'Dismiss',
72
+ tryAgain: 'Try again',
73
+ retryConnect: (button)=>`Check the details above, then ${button} again.`,
74
+ retryTest: (button)=>`Pick another model or fix its connection, then ${button} again.`,
75
+ retrySwitch: 'Switch connection again, or create a separate connection instead.',
64
76
  cancel: 'Cancel',
65
77
  testAndAdd: 'Test and add',
66
78
  testAndSave: 'Test and save',
@@ -0,0 +1,293 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ ModelAliasPicker: ()=>ModelAliasPicker
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const external_lucide_react_namespaceObject = require("lucide-react");
31
+ const external_react_namespaceObject = require("react");
32
+ const external_button_cjs_namespaceObject = require("../button.cjs");
33
+ const external_command_cjs_namespaceObject = require("../command.cjs");
34
+ const external_input_cjs_namespaceObject = require("../input.cjs");
35
+ const external_popover_cjs_namespaceObject = require("../popover.cjs");
36
+ const external_tooltip_cjs_namespaceObject = require("../tooltip.cjs");
37
+ const index_cjs_namespaceObject = require("../../../lib/index.cjs");
38
+ function ModelAliasPicker({ replaceable, allowsCustom, value, onChange, disabled, invalid, container, labels }) {
39
+ const [open, setOpen] = external_react_namespaceObject.useState(false);
40
+ const [query, setQuery] = external_react_namespaceObject.useState('');
41
+ const [adding, setAdding] = external_react_namespaceObject.useState(false);
42
+ const [draft, setDraft] = external_react_namespaceObject.useState('');
43
+ const searchRef = external_react_namespaceObject.useRef(null);
44
+ const custom = value?.kind === 'custom' ? value.name : null;
45
+ const q = query.trim().toLowerCase();
46
+ const shown = replaceable.filter((m)=>m.name.toLowerCase().includes(q));
47
+ const customShown = custom?.toLowerCase().includes(q) ?? false;
48
+ const close = ()=>{
49
+ setOpen(false);
50
+ setQuery('');
51
+ setAdding(false);
52
+ setDraft('');
53
+ };
54
+ const choose = (alias)=>{
55
+ onChange(alias);
56
+ close();
57
+ };
58
+ const startAdding = ()=>{
59
+ setDraft(custom ?? query.trim());
60
+ setAdding(true);
61
+ };
62
+ const [returning, setReturning] = external_react_namespaceObject.useState(false);
63
+ const stopAdding = ()=>{
64
+ setAdding(false);
65
+ setReturning(true);
66
+ };
67
+ external_react_namespaceObject.useEffect(()=>{
68
+ if (!returning) return;
69
+ setReturning(false);
70
+ searchRef.current?.focus();
71
+ }, [
72
+ returning
73
+ ]);
74
+ const confirmCustom = ()=>{
75
+ const name = draft.trim();
76
+ if (name) choose({
77
+ kind: 'custom',
78
+ name
79
+ });
80
+ };
81
+ const placeholder = replaceable.length ? labels.replacementPlaceholder : labels.addCustomAlias;
82
+ const customGroup = allowsCustom && (null === custom || customShown) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
83
+ heading: labels.useOwnName,
84
+ children: null !== custom ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
85
+ value: `custom:${custom}`,
86
+ onSelect: ()=>choose({
87
+ kind: 'custom',
88
+ name: custom
89
+ }),
90
+ className: "gap-2 py-1",
91
+ children: [
92
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Selected, {
93
+ on: true
94
+ }),
95
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
96
+ className: "min-w-0 truncate font-mono text-xs text-foreground",
97
+ children: custom
98
+ }),
99
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider, {
100
+ delayDuration: 300,
101
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
102
+ children: [
103
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
104
+ asChild: true,
105
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
106
+ variant: "ghost",
107
+ size: "3xs",
108
+ icon: true,
109
+ className: "ml-auto",
110
+ "aria-label": labels.editCustomAlias,
111
+ onPointerDown: (e)=>e.stopPropagation(),
112
+ onKeyDown: (e)=>{
113
+ if ('Enter' === e.key || ' ' === e.key) e.stopPropagation();
114
+ },
115
+ onClick: (e)=>{
116
+ e.preventDefault();
117
+ e.stopPropagation();
118
+ startAdding();
119
+ },
120
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Pencil, {})
121
+ })
122
+ }),
123
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipPortal, {
124
+ container: container,
125
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
126
+ children: labels.editCustomAlias
127
+ })
128
+ })
129
+ ]
130
+ })
131
+ })
132
+ ]
133
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
134
+ value: "custom:add",
135
+ onSelect: startAdding,
136
+ className: "gap-2 py-1.5 text-foreground-accent",
137
+ children: [
138
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Plus, {
139
+ size: 14
140
+ }),
141
+ labels.addCustomAlias
142
+ ]
143
+ })
144
+ });
145
+ const customLast = Boolean(q) && null === custom && shown.length > 0;
146
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
147
+ open: open,
148
+ onOpenChange: (next)=>next ? setOpen(true) : close(),
149
+ modal: true,
150
+ children: [
151
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
152
+ asChild: true,
153
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
154
+ variant: "outline",
155
+ role: "combobox",
156
+ "aria-expanded": open,
157
+ "aria-label": labels.nameStep,
158
+ "aria-invalid": invalid || void 0,
159
+ disabled: disabled,
160
+ className: "w-full justify-between font-normal",
161
+ children: [
162
+ value ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
163
+ className: "flex min-w-0 items-center gap-2",
164
+ children: [
165
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
166
+ className: "truncate font-mono text-xs",
167
+ children: value.name
168
+ }),
169
+ 'custom' === value.kind && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
170
+ className: "shrink-0 text-xs text-foreground-muted",
171
+ children: labels.useOwnName
172
+ })
173
+ ]
174
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
175
+ className: "truncate text-foreground-muted",
176
+ children: placeholder
177
+ }),
178
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
179
+ className: "shrink-0 opacity-50"
180
+ })
181
+ ]
182
+ })
183
+ }),
184
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
185
+ container: container,
186
+ align: "start",
187
+ className: "w-[var(--radix-popover-trigger-width)] overflow-hidden p-0",
188
+ onOpenAutoFocus: (e)=>{
189
+ e.preventDefault();
190
+ searchRef.current?.focus();
191
+ },
192
+ onEscapeKeyDown: (e)=>{
193
+ if (!adding) return;
194
+ e.preventDefault();
195
+ stopAdding();
196
+ },
197
+ children: adding ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
198
+ className: "flex flex-col gap-2 p-2",
199
+ children: [
200
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
201
+ autoFocus: true,
202
+ "aria-label": labels.customAliasPlaceholder,
203
+ placeholder: labels.customAliasPlaceholder,
204
+ value: draft,
205
+ onChange: (e)=>setDraft(e.target.value),
206
+ onKeyDown: (e)=>{
207
+ if ('Enter' === e.key) {
208
+ e.preventDefault();
209
+ confirmCustom();
210
+ }
211
+ }
212
+ }),
213
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
214
+ className: "flex gap-2",
215
+ children: [
216
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
217
+ size: "2xs",
218
+ disabled: !draft.trim(),
219
+ onClick: confirmCustom,
220
+ children: null === custom ? labels.addAlias : labels.saveAlias
221
+ }),
222
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
223
+ size: "2xs",
224
+ variant: "ghost",
225
+ onClick: stopAdding,
226
+ children: labels.cancel
227
+ })
228
+ ]
229
+ })
230
+ ]
231
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.Command, {
232
+ shouldFilter: false,
233
+ children: [
234
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandInput, {
235
+ ref: searchRef,
236
+ "aria-label": labels.nameStep,
237
+ placeholder: labels.aliasSearch,
238
+ value: query,
239
+ onValueChange: setQuery
240
+ }),
241
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandList, {
242
+ className: "max-h-[280px]",
243
+ children: [
244
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
245
+ children: labels.aliasNoMatch(query)
246
+ }),
247
+ !customLast && customGroup,
248
+ shown.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
249
+ heading: labels.useReplacement,
250
+ children: shown.map((m)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
251
+ value: `replacement:${m.name}`,
252
+ onSelect: ()=>choose({
253
+ kind: 'replacement',
254
+ name: m.name
255
+ }),
256
+ className: "gap-2 py-1.5",
257
+ children: [
258
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Selected, {
259
+ on: value?.kind === 'replacement' && value.name === m.name
260
+ }),
261
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
262
+ className: "min-w-0 truncate font-mono text-xs text-foreground",
263
+ children: m.name
264
+ }),
265
+ m.retiresOn && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
266
+ className: "ml-auto shrink-0 pl-2 text-xs text-foreground-muted",
267
+ children: labels.deprecated
268
+ })
269
+ ]
270
+ }, m.name))
271
+ }),
272
+ customLast && customGroup
273
+ ]
274
+ })
275
+ ]
276
+ })
277
+ })
278
+ ]
279
+ });
280
+ }
281
+ function Selected({ on }) {
282
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
283
+ size: 14,
284
+ className: (0, index_cjs_namespaceObject.cn)('shrink-0', on ? 'text-foreground-accent' : 'opacity-0')
285
+ });
286
+ }
287
+ exports.ModelAliasPicker = __webpack_exports__.ModelAliasPicker;
288
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
289
+ "ModelAliasPicker"
290
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
291
+ Object.defineProperty(exports, '__esModule', {
292
+ value: true
293
+ });
@@ -0,0 +1,24 @@
1
+ import type { PortalContainerOverride } from '../portal-container';
2
+ import type { ByoModelDialogLabels } from './labels';
3
+ import type { ByoReplaceableModel } from './types';
4
+ /** The name the model takes: a UiPath model it replaces, or a custom alias. */
5
+ export interface ModelAlias {
6
+ kind: 'replacement' | 'custom';
7
+ name: string;
8
+ }
9
+ interface ModelAliasPickerProps {
10
+ replaceable: ByoReplaceableModel[];
11
+ allowsCustom: boolean;
12
+ value: ModelAlias | null;
13
+ onChange: (alias: ModelAlias) => void;
14
+ disabled?: boolean;
15
+ invalid?: boolean;
16
+ container?: PortalContainerOverride;
17
+ labels: ByoModelDialogLabels;
18
+ }
19
+ /**
20
+ * One list for the model's name, as in AI Trust Layer: the UiPath models it can replace, and,
21
+ * where the feature takes them, a custom alias typed in place.
22
+ */
23
+ export declare function ModelAliasPicker({ replaceable, allowsCustom, value, onChange, disabled, invalid, container, labels, }: ModelAliasPickerProps): import("react/jsx-runtime").JSX.Element;
24
+ export {};