@epam/ai-dial-chat-hooks 1.2.0-dev.319 → 1.2.0-dev.321

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.
@@ -3,248 +3,283 @@ import { isPublicToolsetId as t } from "../oauth/toolset-id.js";
3
3
  import { formatCalendarDate as n } from "../shared/formatting.js";
4
4
  import { formatUnitPrice as r } from "@epam/ai-dial-chat-shared";
5
5
  import { mimeTypesToExtensionLabels as i } from "@epam/ai-dial-attachment-input";
6
- import { CredentialStatus as a, ToolsetAuthenticationType as o } from "@epam/ai-dial-catalog";
6
+ import { CatalogPricingUnit as a, CredentialStatus as o, ToolsetAuthenticationType as s } from "@epam/ai-dial-catalog";
7
7
  //#region src/catalog/map-entity-details-to-catalog.ts
8
- var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens` : `${e} tokens`, c = (e) => {
8
+ var c = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens` : `${e} tokens`, l = (e) => {
9
9
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
10
10
  if (t == null) return e;
11
11
  let [, r, i, a] = t, o = Number(r), s = Number(i) - 1, c = Number(a), l = new Date(o, s, c);
12
12
  return l.getFullYear() !== o || l.getMonth() !== s || l.getDate() !== c ? e : n(l.getTime());
13
- }, l = "unit", u = (e) => {
14
- let t = [];
13
+ }, u = "unit", d = {
14
+ capabilitiesTitle: "Capabilities",
15
+ specificationTitle: "Specification",
16
+ configurationTitle: "Configuration",
17
+ tools: "Tools",
18
+ parallelToolCalls: "Parallel tool calls",
19
+ reasoningEfforts: "Reasoning efforts",
20
+ skills: "Skills",
21
+ provider: "Provider",
22
+ vendor: "Vendor",
23
+ license: "License",
24
+ knowledgeCutoffDate: "Knowledge cutoff date",
25
+ parameters: "Parameters",
26
+ hostedBy: "Hosted by",
27
+ releaseDate: "Release date",
28
+ contextWindow: "Context window",
29
+ maxOutputTokens: "Max output tokens",
30
+ inputModalities: "Input modalities",
31
+ inputAttachments: "Input attachments",
32
+ routes: "Routes",
33
+ configurationSchema: "Configuration schema",
34
+ authentication: "Authentication",
35
+ authorizationEndpoint: "Authorization endpoint",
36
+ tokenEndpoint: "Token endpoint",
37
+ oauthScopes: "OAuth scopes"
38
+ }, f = (e, t) => {
39
+ let r = [];
15
40
  if (e.capabilities != null) {
16
- let { capabilities: n } = e, r = [];
17
- n.hasTools != null && r.push({
18
- label: "Tools",
41
+ let { capabilities: n } = e, i = [];
42
+ n.hasTools != null && i.push({
43
+ label: t.tools,
19
44
  value: n.hasTools
20
- }), n.hasParallelToolCalls != null && r.push({
21
- label: "Parallel tool calls",
45
+ }), n.hasParallelToolCalls != null && i.push({
46
+ label: t.parallelToolCalls,
22
47
  value: n.hasParallelToolCalls
23
- }), n.reasoningEfforts?.length && r.push({
24
- label: "Reasoning efforts",
48
+ }), n.reasoningEfforts?.length && i.push({
49
+ label: t.reasoningEfforts,
25
50
  value: n.reasoningEfforts.join(" · ")
26
- }), n.hasSkills != null && r.push({
27
- label: "Skills",
51
+ }), n.hasSkills != null && i.push({
52
+ label: t.skills,
28
53
  value: n.hasSkills
29
- }), r.length > 0 && t.push({
30
- title: "Capabilities",
31
- specs: r
54
+ }), i.length > 0 && r.push({
55
+ title: t.capabilitiesTitle,
56
+ specs: i
32
57
  });
33
58
  }
34
59
  if (e.specification != null) {
35
- let { specification: r } = e, a = [];
36
- r.provider != null && a.push({
37
- label: "Provider",
38
- value: r.provider
39
- }), r.vendor != null && a.push({
40
- label: "Vendor",
41
- value: r.vendor
42
- }), r.license != null && a.push({
43
- label: "License",
44
- value: r.license
45
- }), r.knowledgeCutoffDate != null && a.push({
46
- label: "Knowledge cutoff date",
47
- value: c(r.knowledgeCutoffDate)
48
- }), r.parameters != null && a.push({
49
- label: "Parameters",
50
- value: r.parameters
51
- }), r.hostedBy != null && a.push({
52
- label: "Hosted by",
53
- value: r.hostedBy
54
- }), r.createdAt != null && a.push({
55
- label: "Release date",
56
- value: n(r.createdAt)
57
- }), r.contextWindowTokens != null && a.push({
58
- label: "Context window",
59
- value: s(r.contextWindowTokens)
60
- }), r.maxOutputTokens != null && a.push({
61
- label: "Max output tokens",
62
- value: s(r.maxOutputTokens)
63
- }), r.inputTypes?.length && a.push({
64
- label: "Input modalities",
65
- value: i(r.inputTypes)
66
- }), a.length > 0 && t.push({
67
- title: "Specification",
68
- specs: a
60
+ let { specification: a } = e, o = [];
61
+ a.provider != null && o.push({
62
+ label: t.provider,
63
+ value: a.provider
64
+ }), a.vendor != null && o.push({
65
+ label: t.vendor,
66
+ value: a.vendor
67
+ }), a.license != null && o.push({
68
+ label: t.license,
69
+ value: a.license
70
+ }), a.knowledgeCutoffDate != null && o.push({
71
+ label: t.knowledgeCutoffDate,
72
+ value: l(a.knowledgeCutoffDate)
73
+ }), a.parameters != null && o.push({
74
+ label: t.parameters,
75
+ value: a.parameters
76
+ }), a.hostedBy != null && o.push({
77
+ label: t.hostedBy,
78
+ value: a.hostedBy
79
+ }), a.createdAt != null && o.push({
80
+ label: t.releaseDate,
81
+ value: n(a.createdAt)
82
+ }), a.contextWindowTokens != null && o.push({
83
+ label: t.contextWindow,
84
+ value: c(a.contextWindowTokens)
85
+ }), a.maxOutputTokens != null && o.push({
86
+ label: t.maxOutputTokens,
87
+ value: c(a.maxOutputTokens)
88
+ }), a.inputTypes?.length && o.push({
89
+ label: t.inputModalities,
90
+ value: i(a.inputTypes)
91
+ }), o.length > 0 && r.push({
92
+ title: t.specificationTitle,
93
+ specs: o
69
94
  });
70
95
  }
71
- let r = h(e.pricing), a = g(e);
96
+ let a = y(e.pricing), o = b(e);
72
97
  return {
73
- overview: t.length > 0 ? { sections: t } : void 0,
74
- pricing: r,
75
- api: a
98
+ overview: r.length > 0 ? { sections: r } : void 0,
99
+ pricing: a,
100
+ api: o
76
101
  };
77
- }, d = {
102
+ }, p = {
78
103
  prompt: "Input tokens",
79
104
  completion: "Output tokens",
80
105
  cache_read: "Cached input",
81
106
  cacheRead: "Cached input",
82
107
  cache_write: "Cached write",
83
108
  cacheWrite: "Cached write"
84
- }, f = [
109
+ }, m = {
110
+ prompt: "Input characters",
111
+ completion: "Output characters"
112
+ }, h = "char_without_whitespace", g = [
85
113
  "prompt",
86
114
  "completion",
87
115
  "cache_read",
88
116
  "cacheRead",
89
117
  "cache_write",
90
118
  "cacheWrite"
91
- ], p = (e) => {
92
- let t = f.indexOf(e);
93
- return t === -1 ? f.length : t;
94
- }, m = (e) => {
95
- let t = d[e];
96
- if (t != null) return t;
97
- let n = e.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
98
- return n === "" ? e : ` ${n.charAt(0).toUpperCase()}${n.slice(1)}`;
99
- }, h = (e) => {
119
+ ], _ = (e) => {
120
+ let t = g.indexOf(e);
121
+ return t === -1 ? g.length : t;
122
+ }, v = (e, t) => {
123
+ let n = (t === a.Character ? m[e] : void 0) ?? p[e];
124
+ if (n != null) return n;
125
+ let r = e.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
126
+ return r === "" ? e : ` ${r.charAt(0).toUpperCase()}${r.slice(1)}`;
127
+ }, y = (e) => {
100
128
  if (e == null) return;
101
- let t = [...e.prices ?? []].sort((e, t) => p(e.key) - p(t.key)).map(({ key: e, price: t }) => ({
102
- label: m(e),
103
- price: t
129
+ let t = e.unit?.toLowerCase() === h ? a.Character : a.Token, n = [...e.prices ?? []].sort((e, t) => _(e.key) - _(t.key)).map(({ key: e, price: n }) => ({
130
+ label: v(e, t),
131
+ price: n
104
132
  }));
105
- if (t.length !== 0) return { prices: t };
106
- }, g = (e) => {
133
+ if (n.length !== 0) return t === a.Character ? {
134
+ prices: n,
135
+ unit: t
136
+ } : { prices: n };
137
+ }, b = (e) => {
107
138
  let { api: t } = e;
108
139
  if (t?.modelId != null) return { resource: { modelId: t.modelId } };
109
- }, _ = (e) => {
110
- let t = [];
140
+ }, x = (e, t) => {
141
+ let r = [];
111
142
  if (e.specification != null) {
112
- let { specification: r } = e, i = [];
113
- r.provider != null && i.push({
114
- label: "Provider",
115
- value: r.provider
116
- }), r.vendor != null && i.push({
117
- label: "Vendor",
118
- value: r.vendor
119
- }), r.license != null && i.push({
120
- label: "License",
121
- value: r.license
122
- }), r.knowledgeCutoffDate != null && i.push({
123
- label: "Knowledge cutoff date",
124
- value: c(r.knowledgeCutoffDate)
125
- }), r.parameters != null && i.push({
126
- label: "Parameters",
127
- value: r.parameters
128
- }), r.hostedBy != null && i.push({
129
- label: "Hosted by",
130
- value: r.hostedBy
131
- }), r.createdAt != null && i.push({
132
- label: "Release date",
133
- value: n(r.createdAt)
134
- }), r.routes?.length && i.push({
135
- label: "Routes",
136
- value: r.routes.join(" · ")
137
- }), i.length > 0 && t.push({
138
- title: "Specification",
139
- specs: i
143
+ let { specification: i } = e, a = [];
144
+ i.provider != null && a.push({
145
+ label: t.provider,
146
+ value: i.provider
147
+ }), i.vendor != null && a.push({
148
+ label: t.vendor,
149
+ value: i.vendor
150
+ }), i.license != null && a.push({
151
+ label: t.license,
152
+ value: i.license
153
+ }), i.knowledgeCutoffDate != null && a.push({
154
+ label: t.knowledgeCutoffDate,
155
+ value: l(i.knowledgeCutoffDate)
156
+ }), i.parameters != null && a.push({
157
+ label: t.parameters,
158
+ value: i.parameters
159
+ }), i.hostedBy != null && a.push({
160
+ label: t.hostedBy,
161
+ value: i.hostedBy
162
+ }), i.createdAt != null && a.push({
163
+ label: t.releaseDate,
164
+ value: n(i.createdAt)
165
+ }), i.routes?.length && a.push({
166
+ label: t.routes,
167
+ value: i.routes.join(" · ")
168
+ }), a.length > 0 && r.push({
169
+ title: t.specificationTitle,
170
+ specs: a
140
171
  });
141
172
  }
142
173
  if (e.capabilities != null) {
143
- let { capabilities: n } = e, r = [];
144
- n.hasTools != null && r.push({
145
- label: "Tools",
174
+ let { capabilities: n } = e, i = [];
175
+ n.hasTools != null && i.push({
176
+ label: t.tools,
146
177
  value: n.hasTools
147
- }), n.hasParallelToolCalls != null && r.push({
148
- label: "Parallel tool calls",
178
+ }), n.hasParallelToolCalls != null && i.push({
179
+ label: t.parallelToolCalls,
149
180
  value: n.hasParallelToolCalls
150
- }), n.hasConfiguration != null && r.push({
151
- label: "Configuration schema",
181
+ }), n.hasConfiguration != null && i.push({
182
+ label: t.configurationSchema,
152
183
  value: n.hasConfiguration
153
- }), n.hasSkills != null && r.push({
154
- label: "Skills",
184
+ }), n.hasSkills != null && i.push({
185
+ label: t.skills,
155
186
  value: n.hasSkills
156
- }), r.length > 0 && t.push({
157
- title: "Capabilities",
158
- specs: r
187
+ }), i.length > 0 && r.push({
188
+ title: t.capabilitiesTitle,
189
+ specs: i
159
190
  });
160
191
  }
161
192
  if (e.configuration != null) {
162
- let { configuration: n } = e, r = [];
163
- n.inputAttachmentTypes?.length && r.push({
164
- label: "Input attachments",
193
+ let { configuration: n } = e, a = [];
194
+ n.inputAttachmentTypes?.length && a.push({
195
+ label: t.inputAttachments,
165
196
  value: i(n.inputAttachmentTypes)
166
- }), r.length > 0 && t.push({
167
- title: "Configuration",
168
- specs: r
197
+ }), a.length > 0 && r.push({
198
+ title: t.configurationTitle,
199
+ specs: a
169
200
  });
170
201
  }
171
- return { overview: t.length > 0 ? { sections: t } : void 0 };
172
- }, v = {
173
- [e.None]: o.None,
174
- [e.ApiKey]: o.ApiKey,
175
- [e.OAuth]: o.OAuth
176
- }, y = {
177
- SIGNED_IN: a.SignedIn,
178
- SIGNED_OUT: a.SignedOut,
179
- FAILED: a.Failed
180
- }, b = (n, r, i) => {
181
- let a = v[r.specification?.authentication ?? e.None];
202
+ return { overview: r.length > 0 ? { sections: r } : void 0 };
203
+ }, S = {
204
+ [e.None]: s.None,
205
+ [e.ApiKey]: s.ApiKey,
206
+ [e.OAuth]: s.OAuth
207
+ }, C = {
208
+ SIGNED_IN: o.SignedIn,
209
+ SIGNED_OUT: o.SignedOut,
210
+ FAILED: o.Failed
211
+ }, w = (n, r, i) => {
212
+ let a = S[r.specification?.authentication ?? e.None];
182
213
  if (a == null) return;
183
214
  let { userLevel: o, global: s } = r.specification?.authStatus ?? {}, c = t(n);
184
215
  return {
185
216
  authenticationType: a,
186
- userStatus: o ? y[o] : void 0,
187
- globalStatus: s ? y[s] : void 0,
217
+ userStatus: o ? C[o] : void 0,
218
+ globalStatus: s ? C[s] : void 0,
188
219
  isPublic: c,
189
220
  isManageableByAdmin: i && c,
190
221
  apiKeyHeader: r.specification?.authStatus?.apiKeyHeader
191
222
  };
192
- }, x = (e) => {
223
+ }, T = (e) => {
193
224
  let t = e?.permissions?.length ? e.permissions : e?.allTools;
194
225
  if (t?.length) return { tools: t.map((e) => ({ name: e })) };
195
- }, S = (e) => {
196
- let t = [];
226
+ }, E = (e, t) => {
227
+ let r = [];
197
228
  if (e.specification != null) {
198
- let { specification: r } = e, i = [];
199
- r.authentication != null && i.push({
200
- label: "Authentication",
201
- value: r.authentication
202
- }), r.provider != null && i.push({
203
- label: "Provider",
204
- value: r.provider
205
- }), r.vendor != null && i.push({
206
- label: "Vendor",
207
- value: r.vendor
208
- }), r.license != null && i.push({
209
- label: "License",
210
- value: r.license
211
- }), r.knowledgeCutoffDate != null && i.push({
212
- label: "Knowledge cutoff date",
213
- value: c(r.knowledgeCutoffDate)
214
- }), r.parameters != null && i.push({
215
- label: "Parameters",
216
- value: r.parameters
217
- }), r.hostedBy != null && i.push({
218
- label: "Hosted by",
219
- value: r.hostedBy
220
- }), r.createdAt != null && i.push({
221
- label: "Release date",
222
- value: n(r.createdAt)
223
- }), r.authStatus?.scopesSupported?.length && i.push({
224
- label: "OAuth scopes",
225
- value: r.authStatus.scopesSupported.join(" · ")
226
- }), r.authStatus?.authorizationEndpoint != null && i.push({
227
- label: "Authorization endpoint",
228
- value: r.authStatus.authorizationEndpoint
229
- }), r.authStatus?.tokenEndpoint != null && i.push({
230
- label: "Token endpoint",
231
- value: r.authStatus.tokenEndpoint
232
- }), i.length > 0 && t.push({
233
- title: "Specification",
234
- specs: i
229
+ let { specification: i } = e, a = [];
230
+ i.authentication != null && a.push({
231
+ label: t.authentication,
232
+ value: i.authentication
233
+ }), i.provider != null && a.push({
234
+ label: t.provider,
235
+ value: i.provider
236
+ }), i.vendor != null && a.push({
237
+ label: t.vendor,
238
+ value: i.vendor
239
+ }), i.license != null && a.push({
240
+ label: t.license,
241
+ value: i.license
242
+ }), i.knowledgeCutoffDate != null && a.push({
243
+ label: t.knowledgeCutoffDate,
244
+ value: l(i.knowledgeCutoffDate)
245
+ }), i.parameters != null && a.push({
246
+ label: t.parameters,
247
+ value: i.parameters
248
+ }), i.hostedBy != null && a.push({
249
+ label: t.hostedBy,
250
+ value: i.hostedBy
251
+ }), i.createdAt != null && a.push({
252
+ label: t.releaseDate,
253
+ value: n(i.createdAt)
254
+ }), i.authStatus?.scopesSupported?.length && a.push({
255
+ label: t.oauthScopes,
256
+ value: i.authStatus.scopesSupported.join(" · ")
257
+ }), i.authStatus?.authorizationEndpoint != null && a.push({
258
+ label: t.authorizationEndpoint,
259
+ value: i.authStatus.authorizationEndpoint
260
+ }), i.authStatus?.tokenEndpoint != null && a.push({
261
+ label: t.tokenEndpoint,
262
+ value: i.authStatus.tokenEndpoint
263
+ }), a.length > 0 && r.push({
264
+ title: t.specificationTitle,
265
+ specs: a
235
266
  });
236
267
  }
237
268
  return {
238
- overview: t.length > 0 ? { sections: t } : void 0,
239
- tools: x(e.specification)
269
+ overview: r.length > 0 ? { sections: r } : void 0,
270
+ tools: T(e.specification)
271
+ };
272
+ }, D = (e, t) => {
273
+ let n = {
274
+ ...d,
275
+ ...t
240
276
  };
241
- }, C = (e) => {
242
277
  switch (e.type) {
243
- case "MODEL": return u(e.data);
244
- case "AGENT": return _(e.data);
245
- case "TOOLSET": return S(e.data);
278
+ case "MODEL": return f(e.data, n);
279
+ case "AGENT": return x(e.data, n);
280
+ case "TOOLSET": return E(e.data, n);
246
281
  }
247
- }, w = (e) => {
282
+ }, O = (e) => {
248
283
  if (e != null) return {
249
284
  hasTools: e.tools,
250
285
  hasMcp: e.mcp,
@@ -261,23 +296,26 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
261
296
  hasSkills: e.skillsSupported,
262
297
  reasoningEfforts: e.reasoningEfforts
263
298
  };
264
- }, T = (e) => {
299
+ }, k = (e) => {
265
300
  if (e == null) return;
266
301
  let t = typeof e.unit == "string" ? e.unit : void 0, n = Object.entries(e).flatMap(([e, n]) => {
267
- if (e === l || typeof n != "string" || n.trim() === "") return [];
302
+ if (e === u || typeof n != "string" || n.trim() === "") return [];
268
303
  let i = r(n, t);
269
304
  return i == null ? [] : [{
270
305
  key: e,
271
306
  price: i
272
307
  }];
273
308
  });
274
- return n.length > 0 ? { prices: n } : void 0;
275
- }, E = (e) => {
309
+ return n.length > 0 ? {
310
+ prices: n,
311
+ unit: t
312
+ } : void 0;
313
+ }, A = (e) => {
276
314
  let { limits: t, pricing: n, features: r, catalogProperties: i, owner: a, inputAttachmentTypes: o, defaultMaxTokens: s, createdAt: c } = e.modelDetails ?? {}, l = t != null || i != null || a != null || c != null || (o?.length ?? 0) > 0;
277
315
  return {
278
316
  type: "MODEL",
279
317
  data: {
280
- capabilities: w(r),
318
+ capabilities: O(r),
281
319
  specification: l ? {
282
320
  provider: i?.provider,
283
321
  vendor: i?.vendor,
@@ -290,16 +328,16 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
290
328
  hostedBy: a,
291
329
  createdAt: c
292
330
  } : void 0,
293
- pricing: T(n),
331
+ pricing: k(n),
294
332
  api: { modelId: e.id }
295
333
  }
296
334
  };
297
- }, D = (e) => {
335
+ }, j = (e) => {
298
336
  let { routes: t, owner: n, inputAttachmentTypes: r, features: i, catalogProperties: a, createdAt: o } = e.applicationDetails ?? {}, s = a != null || n != null || o != null || (t?.length ?? 0) > 0;
299
337
  return {
300
338
  type: "AGENT",
301
339
  data: {
302
- capabilities: w(i),
340
+ capabilities: O(i),
303
341
  specification: s ? {
304
342
  provider: a?.provider,
305
343
  vendor: a?.vendor,
@@ -313,7 +351,7 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
313
351
  configuration: r?.length ? { inputAttachmentTypes: r } : void 0
314
352
  }
315
353
  };
316
- }, O = (t) => t === e.None || t === e.ApiKey || t === e.OAuth, k = (e) => {
354
+ }, M = (t) => t === e.None || t === e.ApiKey || t === e.OAuth, N = (e) => {
317
355
  if (e == null) return;
318
356
  let { globalAuthStatus: t, appLevelAuthStatus: n, userLevelAuthStatus: r, scopesSupported: i, authorizationEndpoint: a, tokenEndpoint: o, apiKeyHeader: s } = e;
319
357
  if (!(t == null && n == null && r == null && a == null && o == null && s == null && !i?.length)) return {
@@ -325,14 +363,14 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
325
363
  tokenEndpoint: o,
326
364
  apiKeyHeader: s
327
365
  };
328
- }, A = (e) => {
366
+ }, P = (e) => {
329
367
  let t = e.toolsetDetails, n = t?.authSettings?.authenticationType;
330
368
  return {
331
369
  type: "TOOLSET",
332
370
  data: {
333
- capabilities: w(t?.features),
371
+ capabilities: O(t?.features),
334
372
  specification: t == null ? void 0 : {
335
- authentication: O(n) ? n : void 0,
373
+ authentication: M(n) ? n : void 0,
336
374
  provider: t.catalogProperties?.provider,
337
375
  vendor: t.catalogProperties?.vendor,
338
376
  license: t.catalogProperties?.license,
@@ -342,16 +380,16 @@ var s = (e) => e >= 1e6 ? `${e / 1e6}M tokens` : e >= 1e3 ? `${e / 1e3}K tokens`
342
380
  allTools: t.allToolNames,
343
381
  hostedBy: t.owner,
344
382
  createdAt: t.createdAt,
345
- authStatus: k(t.authSettings)
383
+ authStatus: N(t.authSettings)
346
384
  }
347
385
  }
348
386
  };
349
- }, j = (e) => {
387
+ }, F = (e) => {
350
388
  switch (e.type) {
351
- case "model": return E(e);
352
- case "application": return D(e);
353
- case "toolset": return A(e);
389
+ case "model": return A(e);
390
+ case "application": return j(e);
391
+ case "toolset": return P(e);
354
392
  }
355
393
  };
356
394
  //#endregion
357
- export { j as mapDeploymentDetailsDtoToEntityDetails, C as mapEntityDetailsToCatalogDetails, b as mapToolsetCredentials };
395
+ export { d as DEFAULT_ENTITY_DETAILS_LABELS, F as mapDeploymentDetailsDtoToEntityDetails, D as mapEntityDetailsToCatalogDetails, w as mapToolsetCredentials };
@@ -12,8 +12,8 @@ var p = (e) => (t) => {
12
12
  if (!s(t)) return e.getPrompt(t.id);
13
13
  let n = a(t.id);
14
14
  return e.getPublicPrompt(n?.path ?? t.id);
15
- }, m = ({ api: a, skills: s, isAdmin: m, dialCoreExternalUrl: h, skillOverviewLabels: g, promptOverviewLabels: _, deploymentLimitsLabels: v }) => {
16
- let { onFetchSkillDetails: y, onLoadContentFile: b, onLoadSkillDetailsFile: x } = u({
15
+ }, m = ({ api: a, skills: s, isAdmin: m, dialCoreExternalUrl: h, skillOverviewLabels: g, promptOverviewLabels: _, deploymentLimitsLabels: v, entityDetailsLabels: y }) => {
16
+ let { onFetchSkillDetails: b, onLoadContentFile: x, onLoadSkillDetailsFile: S } = u({
17
17
  api: a,
18
18
  skills: s,
19
19
  skillOverviewLabels: g
@@ -29,15 +29,15 @@ var p = (e) => (t) => {
29
29
  } catch {
30
30
  return;
31
31
  }
32
- if (s.type === d.Skill) return y(s);
32
+ if (s.type === d.Skill) return b(s);
33
33
  try {
34
- let o = s.type === d.Model ? a.getDeploymentLimits(s.id).catch(() => void 0) : Promise.resolve(void 0), [u, f] = await Promise.all([a.getDeploymentDetails(s.id), o]), p = n(u), g = r(p), _ = l(s.type, s.supportsMcp), y = p.type === "MODEL" || p.type === "AGENT" ? e(h ?? "", s.id, {
34
+ let o = s.type === d.Model ? a.getDeploymentLimits(s.id).catch(() => void 0) : Promise.resolve(void 0), [u, f] = await Promise.all([a.getDeploymentDetails(s.id), o]), p = n(u), g = r(p, y), _ = l(s.type, s.supportsMcp), b = p.type === "MODEL" || p.type === "AGENT" ? e(h ?? "", s.id, {
35
35
  hasChatCompletion: p.data.capabilities?.hasChatCompletion,
36
36
  hasResponsesApi: p.data.capabilities?.hasResponsesApi
37
37
  }) : void 0;
38
38
  return {
39
39
  ...g,
40
- api: _ == null ? y ?? g.api : c(h ?? "", s.id, _),
40
+ api: _ == null ? b ?? g.api : c(h ?? "", s.id, _),
41
41
  limits: t(f, v),
42
42
  credentials: p.type === "TOOLSET" ? i(s.id, p.data, m) : void 0
43
43
  };
@@ -49,11 +49,12 @@ var p = (e) => (t) => {
49
49
  m,
50
50
  v,
51
51
  h,
52
+ y,
52
53
  _,
53
- y
54
+ b
54
55
  ]),
55
- onLoadContentFile: b,
56
- onLoadSkillDetailsFile: x
56
+ onLoadContentFile: x,
57
+ onLoadSkillDetailsFile: S
57
58
  };
58
59
  };
59
60
  //#endregion