@acorex/modules 21.0.0-next.46 → 21.0.0-next.47
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/fesm2022/acorex-modules-ai-management.mjs +52 -164
- package/fesm2022/acorex-modules-ai-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-common-search-popup.component-BbRyjGia.mjs → acorex-modules-common-search-popup.component-CVuE0xgM.mjs} +14 -7
- package/fesm2022/acorex-modules-common-search-popup.component-CVuE0xgM.mjs.map +1 -0
- package/fesm2022/acorex-modules-common.mjs +2 -2
- package/fesm2022/{acorex-modules-conversation-acorex-modules-conversation-Dm9D7la2.mjs → acorex-modules-conversation-acorex-modules-conversation-F7nQo1GU.mjs} +364 -112
- package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-F7nQo1GU.mjs.map +1 -0
- package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-DnKfkEg1.mjs → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BB5Uyydt.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-DnKfkEg1.mjs.map → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BB5Uyydt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-comments-page.component-JPIzhBys.mjs → acorex-modules-conversation-comments-page.component-QnDogSDy.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-comments-page.component-JPIzhBys.mjs.map → acorex-modules-conversation-comments-page.component-QnDogSDy.mjs.map} +1 -1
- package/fesm2022/acorex-modules-conversation-start-assist-chat.command-DRlWzEDp.mjs +45 -0
- package/fesm2022/acorex-modules-conversation-start-assist-chat.command-DRlWzEDp.mjs.map +1 -0
- package/fesm2022/acorex-modules-conversation.mjs +1 -1
- package/fesm2022/{acorex-modules-dashboard-management-acorex-modules-dashboard-management-D11VudG8.mjs → acorex-modules-dashboard-management-acorex-modules-dashboard-management-kk0CINL1.mjs} +5 -5
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-kk0CINL1.mjs.map +1 -0
- package/fesm2022/{acorex-modules-dashboard-management-index-DB3Uh1wL.mjs → acorex-modules-dashboard-management-index-Bhm8mAON.mjs} +2 -2
- package/fesm2022/{acorex-modules-dashboard-management-index-DB3Uh1wL.mjs.map → acorex-modules-dashboard-management-index-Bhm8mAON.mjs.map} +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
- package/fesm2022/acorex-modules-person-core.mjs +4 -0
- package/fesm2022/acorex-modules-person-core.mjs.map +1 -1
- package/fesm2022/{acorex-modules-platform-dev-tools-menu.provider-BFueKnuF.mjs → acorex-modules-platform-dev-tools-menu.provider-DDjYvQr7.mjs} +6 -2
- package/fesm2022/acorex-modules-platform-dev-tools-menu.provider-DDjYvQr7.mjs.map +1 -0
- package/fesm2022/acorex-modules-platform-dev-tools.mjs +42 -5
- package/fesm2022/acorex-modules-platform-dev-tools.mjs.map +1 -1
- package/fesm2022/acorex-modules-project-management.mjs +33 -3
- package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-report-management.mjs +12 -8
- package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-acorex-modules-task-management-BIEMYKVF.mjs → acorex-modules-task-management-acorex-modules-task-management-BL2IOcx3.mjs} +2 -2
- package/fesm2022/{acorex-modules-task-management-acorex-modules-task-management-BIEMYKVF.mjs.map → acorex-modules-task-management-acorex-modules-task-management-BL2IOcx3.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-CkVHYIl5.mjs → acorex-modules-task-management-task-board.page-DUIHtqnr.mjs} +138 -68
- package/fesm2022/acorex-modules-task-management-task-board.page-DUIHtqnr.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +1 -1
- package/fesm2022/{acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-Dj6LkQeZ.mjs → acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-CYyr1kQk.mjs} +3 -3
- package/fesm2022/{acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-Dj6LkQeZ.mjs.map → acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-CYyr1kQk.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-index-Eh5DDK-V.mjs → acorex-modules-workflow-management-index-DC_9M9dk.mjs} +3 -3
- package/fesm2022/{acorex-modules-workflow-management-index-Eh5DDK-V.mjs.map → acorex-modules-workflow-management-index-DC_9M9dk.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-index-V4OesZTq.mjs → acorex-modules-workflow-management-index-jin24dmb.mjs} +3 -3
- package/fesm2022/{acorex-modules-workflow-management-index-V4OesZTq.mjs.map → acorex-modules-workflow-management-index-jin24dmb.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-workflow-instance.entity-B_V3uMSI.mjs → acorex-modules-workflow-management-workflow-instance.entity-BnKT3Wgh.mjs} +2 -2
- package/fesm2022/{acorex-modules-workflow-management-workflow-instance.entity-B_V3uMSI.mjs.map → acorex-modules-workflow-management-workflow-instance.entity-BnKT3Wgh.mjs.map} +1 -1
- package/fesm2022/acorex-modules-workflow-management.mjs +8 -15
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/package.json +2 -2
- package/types/acorex-modules-ai-management.d.ts +17 -22
- package/types/acorex-modules-conversation.d.ts +7 -1
- package/types/acorex-modules-dashboard-management.d.ts +2 -2
- package/types/acorex-modules-platform-dev-tools.d.ts +16 -2
- package/types/acorex-modules-report-management.d.ts +8 -1
- package/types/acorex-modules-workflow-management.d.ts +2 -3
- package/fesm2022/acorex-modules-common-search-popup.component-BbRyjGia.mjs.map +0 -1
- package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-Dm9D7la2.mjs.map +0 -1
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-D11VudG8.mjs.map +0 -1
- package/fesm2022/acorex-modules-platform-dev-tools-menu.provider-BFueKnuF.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-CkVHYIl5.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-l37iXJIY.mjs +0 -362
- package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-l37iXJIY.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
1
2
|
import { AXPSettingsService, AXPRegionalSetting, AXPFileStorageStatus, AXPFileStorageService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
2
3
|
import * as i1$1 from '@acorex/platform/core';
|
|
3
4
|
import { objectKeyValueTransforms, AXPTagProvider, AXPPlatformScope, AXPComponentSlotModule, AXP_MODULE_MANIFEST_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_TAG_PROVIDER } from '@acorex/platform/core';
|
|
@@ -13,7 +14,6 @@ import { RootConfig as RootConfig$1 } from '@acorex/modules/platform-management'
|
|
|
13
14
|
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
14
15
|
import * as i7 from '@acorex/core/translation';
|
|
15
16
|
import { AXTranslationService, AXTranslationModule, resolveMultiLanguageString } from '@acorex/core/translation';
|
|
16
|
-
import { AXPSessionService } from '@acorex/platform/auth';
|
|
17
17
|
import * as i2 from '@acorex/components/button';
|
|
18
18
|
import { AXButtonModule } from '@acorex/components/button';
|
|
19
19
|
import * as i3 from '@acorex/components/decorators';
|
|
@@ -150,6 +150,12 @@ const AXPAiManagementMenuKeys = {
|
|
|
150
150
|
};
|
|
151
151
|
//#endregion
|
|
152
152
|
|
|
153
|
+
const AXMPermissionsKeys = {
|
|
154
|
+
AiManagement: {
|
|
155
|
+
Management: 'AiManagement:Permission:Management',
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
153
159
|
//#region ---- Imports ----
|
|
154
160
|
//#endregion
|
|
155
161
|
//#region ---- Menu Provider ----
|
|
@@ -169,10 +175,18 @@ class AXMAiManagementMenuProvider {
|
|
|
169
175
|
icon: module.icon,
|
|
170
176
|
type: 'menu',
|
|
171
177
|
priority: 8941,
|
|
178
|
+
policy: {
|
|
179
|
+
features: [module.name],
|
|
180
|
+
permissions: [AXMPermissionsKeys.AiManagement.Management],
|
|
181
|
+
},
|
|
172
182
|
children: [],
|
|
173
183
|
},
|
|
174
184
|
]);
|
|
175
185
|
}
|
|
186
|
+
const aiMenuPolicy = {
|
|
187
|
+
features: [module.name],
|
|
188
|
+
permissions: [AXMPermissionsKeys.AiManagement.Management],
|
|
189
|
+
};
|
|
176
190
|
context.find(AXPCommonMenuKeys.AiManagementConfig).addItems([
|
|
177
191
|
{
|
|
178
192
|
name: AXPAiManagementMenuKeys.Agents,
|
|
@@ -180,6 +194,7 @@ class AXMAiManagementMenuProvider {
|
|
|
180
194
|
path: this.entityService.createPath(module.name, RootConfig.entities.agent.name),
|
|
181
195
|
icon: RootConfig.entities.agent.icon,
|
|
182
196
|
priority: -1,
|
|
197
|
+
policy: aiMenuPolicy,
|
|
183
198
|
},
|
|
184
199
|
{
|
|
185
200
|
name: AXPAiManagementMenuKeys.Assists,
|
|
@@ -187,6 +202,7 @@ class AXMAiManagementMenuProvider {
|
|
|
187
202
|
path: this.entityService.createPath(module.name, RootConfig.entities.assist.name),
|
|
188
203
|
icon: RootConfig.entities.assist.icon,
|
|
189
204
|
priority: 0,
|
|
205
|
+
policy: aiMenuPolicy,
|
|
190
206
|
},
|
|
191
207
|
{
|
|
192
208
|
name: AXPAiManagementMenuKeys.OpenAiEndpoints,
|
|
@@ -194,6 +210,7 @@ class AXMAiManagementMenuProvider {
|
|
|
194
210
|
path: this.entityService.createPath(module.name, RootConfig.entities.openAiEndpoint.name),
|
|
195
211
|
icon: RootConfig.entities.openAiEndpoint.icon,
|
|
196
212
|
priority: 2,
|
|
213
|
+
policy: aiMenuPolicy,
|
|
197
214
|
},
|
|
198
215
|
{
|
|
199
216
|
name: AXPAiManagementMenuKeys.Models,
|
|
@@ -201,6 +218,7 @@ class AXMAiManagementMenuProvider {
|
|
|
201
218
|
path: this.entityService.createPath(module.name, RootConfig.entities.model.name),
|
|
202
219
|
icon: RootConfig.entities.model.icon,
|
|
203
220
|
priority: 1,
|
|
221
|
+
policy: aiMenuPolicy,
|
|
204
222
|
},
|
|
205
223
|
]);
|
|
206
224
|
//#endregion
|
|
@@ -212,6 +230,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
212
230
|
type: Injectable
|
|
213
231
|
}] });
|
|
214
232
|
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region ---- Permission Definition Provider ----
|
|
235
|
+
class AXMPermissionDefinitionProvider {
|
|
236
|
+
async define(context) {
|
|
237
|
+
const keys = AXMPermissionsKeys.AiManagement;
|
|
238
|
+
const modulePermissions = '@ai-management:module.permissions';
|
|
239
|
+
context
|
|
240
|
+
.addGroup(RootConfig.module.name, `${modulePermissions}.title`, `${modulePermissions}.description`)
|
|
241
|
+
.addPermission(keys.Management, `${modulePermissions}.manage.title`, `${modulePermissions}.manage.description`)
|
|
242
|
+
.endPermission()
|
|
243
|
+
.endGroup();
|
|
244
|
+
}
|
|
245
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMPermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
246
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMPermissionDefinitionProvider }); }
|
|
247
|
+
}
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMPermissionDefinitionProvider, decorators: [{
|
|
249
|
+
type: Injectable
|
|
250
|
+
}] });
|
|
251
|
+
|
|
215
252
|
//#region ---- Setting Keys ----
|
|
216
253
|
/**
|
|
217
254
|
* AI Management setting keys.
|
|
@@ -220,24 +257,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
220
257
|
const AXPAiManagementSettings = {
|
|
221
258
|
/** Assist primary key (`id`) used when no assist is explicitly selected (tenant-scoped). */
|
|
222
259
|
DefaultAssistId: 'AiManagement:Setting:DefaultAssistId',
|
|
223
|
-
/**
|
|
224
|
-
* Optional catalog `AiModel` row id (`id`) used as a tenant-wide fallback when a feature does not
|
|
225
|
-
* receive an explicit model (e.g. chat picker, vision/OCR pipeline, image, speech, TTS).
|
|
226
|
-
*/
|
|
227
|
-
DefaultModelChat: 'AiManagement:Setting:DefaultModel.Chat',
|
|
228
|
-
/** Preferred model for document/vision extraction and similar OCR-style tasks. */
|
|
229
|
-
DefaultModelVision: 'AiManagement:Setting:DefaultModel.Vision',
|
|
230
|
-
DefaultModelImage: 'AiManagement:Setting:DefaultModel.Image',
|
|
231
|
-
DefaultModelSpeech: 'AiManagement:Setting:DefaultModel.Speech',
|
|
232
|
-
DefaultModelTts: 'AiManagement:Setting:DefaultModel.Tts',
|
|
233
260
|
Providers: {
|
|
234
261
|
Gemini: {
|
|
235
262
|
ApiKey: 'AiManagement:Setting:Providers.Gemini.ApiKey',
|
|
236
263
|
},
|
|
237
264
|
Demis: {
|
|
238
265
|
BearerToken: 'AiManagement:Setting:Providers.Demis.BearerToken',
|
|
239
|
-
/** AiAgent catalog `name` (slug) used as Demisco `agent_uuid` when no agent run context exists. */
|
|
240
|
-
DefaultAgentName: 'AiManagement:Setting:Providers.Demis.DefaultAgentName',
|
|
241
266
|
},
|
|
242
267
|
},
|
|
243
268
|
};
|
|
@@ -270,103 +295,6 @@ class AXMAiManagementSettingProvider {
|
|
|
270
295
|
},
|
|
271
296
|
},
|
|
272
297
|
description: `${I18N}.default-assist.name.description`,
|
|
273
|
-
})
|
|
274
|
-
.endSection()
|
|
275
|
-
.addSection('default-models', `${I18N}.section.default-models.title`, `${I18N}.section.default-models.description`)
|
|
276
|
-
.addSetting({
|
|
277
|
-
key: AXPAiManagementSettings.DefaultModelChat,
|
|
278
|
-
title: `${I18N}.default-models.chat.title`,
|
|
279
|
-
scope: 'T',
|
|
280
|
-
isInherited: true,
|
|
281
|
-
defaultValue: '',
|
|
282
|
-
widget: {
|
|
283
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
284
|
-
options: {
|
|
285
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.model.name}`,
|
|
286
|
-
look: 'select',
|
|
287
|
-
multiple: false,
|
|
288
|
-
textField: 'title',
|
|
289
|
-
valueField: 'id',
|
|
290
|
-
hasClearButton: true,
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
description: `${I18N}.default-models.chat.description`,
|
|
294
|
-
})
|
|
295
|
-
.addSetting({
|
|
296
|
-
key: AXPAiManagementSettings.DefaultModelVision,
|
|
297
|
-
title: `${I18N}.default-models.vision.title`,
|
|
298
|
-
scope: 'T',
|
|
299
|
-
isInherited: true,
|
|
300
|
-
defaultValue: '',
|
|
301
|
-
widget: {
|
|
302
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
303
|
-
options: {
|
|
304
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.model.name}`,
|
|
305
|
-
look: 'select',
|
|
306
|
-
multiple: false,
|
|
307
|
-
textField: 'title',
|
|
308
|
-
valueField: 'id',
|
|
309
|
-
hasClearButton: true,
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
description: `${I18N}.default-models.vision.description`,
|
|
313
|
-
})
|
|
314
|
-
.addSetting({
|
|
315
|
-
key: AXPAiManagementSettings.DefaultModelImage,
|
|
316
|
-
title: `${I18N}.default-models.image.title`,
|
|
317
|
-
scope: 'T',
|
|
318
|
-
isInherited: true,
|
|
319
|
-
defaultValue: '',
|
|
320
|
-
widget: {
|
|
321
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
322
|
-
options: {
|
|
323
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.model.name}`,
|
|
324
|
-
look: 'select',
|
|
325
|
-
multiple: false,
|
|
326
|
-
textField: 'title',
|
|
327
|
-
valueField: 'id',
|
|
328
|
-
hasClearButton: true,
|
|
329
|
-
},
|
|
330
|
-
},
|
|
331
|
-
description: `${I18N}.default-models.image.description`,
|
|
332
|
-
})
|
|
333
|
-
.addSetting({
|
|
334
|
-
key: AXPAiManagementSettings.DefaultModelSpeech,
|
|
335
|
-
title: `${I18N}.default-models.speech.title`,
|
|
336
|
-
scope: 'T',
|
|
337
|
-
isInherited: true,
|
|
338
|
-
defaultValue: '',
|
|
339
|
-
widget: {
|
|
340
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
341
|
-
options: {
|
|
342
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.model.name}`,
|
|
343
|
-
look: 'select',
|
|
344
|
-
multiple: false,
|
|
345
|
-
textField: 'title',
|
|
346
|
-
valueField: 'id',
|
|
347
|
-
hasClearButton: true,
|
|
348
|
-
},
|
|
349
|
-
},
|
|
350
|
-
description: `${I18N}.default-models.speech.description`,
|
|
351
|
-
})
|
|
352
|
-
.addSetting({
|
|
353
|
-
key: AXPAiManagementSettings.DefaultModelTts,
|
|
354
|
-
title: `${I18N}.default-models.tts.title`,
|
|
355
|
-
scope: 'T',
|
|
356
|
-
isInherited: true,
|
|
357
|
-
defaultValue: '',
|
|
358
|
-
widget: {
|
|
359
|
-
type: AXPWidgetsList.Editors.LookupBox,
|
|
360
|
-
options: {
|
|
361
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.model.name}`,
|
|
362
|
-
look: 'select',
|
|
363
|
-
multiple: false,
|
|
364
|
-
textField: 'title',
|
|
365
|
-
valueField: 'id',
|
|
366
|
-
hasClearButton: true,
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
description: `${I18N}.default-models.tts.description`,
|
|
370
298
|
})
|
|
371
299
|
.endSection()
|
|
372
300
|
.addSection('gemini', `${I18N}.section.gemini.title`, `${I18N}.section.gemini.description`)
|
|
@@ -399,20 +327,6 @@ class AXMAiManagementSettingProvider {
|
|
|
399
327
|
},
|
|
400
328
|
},
|
|
401
329
|
description: `${I18N}.demis.bearer-token.description`,
|
|
402
|
-
})
|
|
403
|
-
.addSetting({
|
|
404
|
-
key: AXPAiManagementSettings.Providers.Demis.DefaultAgentName,
|
|
405
|
-
title: `${I18N}.demis.default-agent-name.title`,
|
|
406
|
-
scope: 'T',
|
|
407
|
-
isInherited: true,
|
|
408
|
-
defaultValue: '',
|
|
409
|
-
widget: {
|
|
410
|
-
type: AXPWidgetsList.Editors.TextBox,
|
|
411
|
-
options: {
|
|
412
|
-
placeholder: `${I18N}.demis.default-agent-name.placeholder`,
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
description: `${I18N}.demis.default-agent-name.description`,
|
|
416
330
|
})
|
|
417
331
|
.endSection()
|
|
418
332
|
.endGroup();
|
|
@@ -3588,6 +3502,11 @@ class AXMAiManagementModule {
|
|
|
3588
3502
|
useValue: AiManagementManifest,
|
|
3589
3503
|
multi: true,
|
|
3590
3504
|
},
|
|
3505
|
+
{
|
|
3506
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
3507
|
+
useClass: AXMPermissionDefinitionProvider,
|
|
3508
|
+
multi: true,
|
|
3509
|
+
},
|
|
3591
3510
|
{
|
|
3592
3511
|
provide: AXP_MENU_PROVIDER,
|
|
3593
3512
|
useClass: AXMAiManagementMenuProvider,
|
|
@@ -3658,6 +3577,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
3658
3577
|
useValue: AiManagementManifest,
|
|
3659
3578
|
multi: true,
|
|
3660
3579
|
},
|
|
3580
|
+
{
|
|
3581
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
3582
|
+
useClass: AXMPermissionDefinitionProvider,
|
|
3583
|
+
multi: true,
|
|
3584
|
+
},
|
|
3661
3585
|
{
|
|
3662
3586
|
provide: AXP_MENU_PROVIDER,
|
|
3663
3587
|
useClass: AXMAiManagementMenuProvider,
|
|
@@ -4367,37 +4291,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
4367
4291
|
//#endregion
|
|
4368
4292
|
//#region ---- Service ----
|
|
4369
4293
|
class AXPAiDefaultModelPickerService {
|
|
4370
|
-
constructor() {
|
|
4371
|
-
//#region ---- Services & Dependencies ----
|
|
4372
|
-
this.settings = inject(AXPSettingsService);
|
|
4373
|
-
}
|
|
4374
|
-
//#endregion
|
|
4375
4294
|
//#region ---- Public API ----
|
|
4376
4295
|
/**
|
|
4377
|
-
*
|
|
4296
|
+
* Picks a model from chat/vision catalog candidates: first entry that supports the purpose;
|
|
4297
|
+
* otherwise the first candidate.
|
|
4378
4298
|
*/
|
|
4379
|
-
|
|
4380
|
-
const key = settingKeyForPurpose(purpose);
|
|
4381
|
-
const raw = await this.settings.get(key);
|
|
4382
|
-
const id = typeof raw === 'string' ? raw.trim() : '';
|
|
4383
|
-
return id || undefined;
|
|
4384
|
-
}
|
|
4385
|
-
/**
|
|
4386
|
-
* Picks a model from chat/vision catalog candidates:
|
|
4387
|
-
* tenant default when it matches an entry and supports the purpose; otherwise first candidate
|
|
4388
|
-
* that supports the purpose; otherwise the first candidate.
|
|
4389
|
-
*/
|
|
4390
|
-
pickFromChatCatalogForPurpose(models, purpose, tenantPreferredId) {
|
|
4299
|
+
pickFromChatCatalogForPurpose(models, purpose) {
|
|
4391
4300
|
if (!models.length) {
|
|
4392
4301
|
return undefined;
|
|
4393
4302
|
}
|
|
4394
|
-
const preferred = tenantPreferredId?.trim();
|
|
4395
|
-
if (preferred) {
|
|
4396
|
-
const match = models.find((m) => m.id === preferred);
|
|
4397
|
-
if (match && modelItemSupportsChatCatalogPurpose(match, purpose)) {
|
|
4398
|
-
return match;
|
|
4399
|
-
}
|
|
4400
|
-
}
|
|
4401
4303
|
const byPurpose = models.find((m) => modelItemSupportsChatCatalogPurpose(m, purpose));
|
|
4402
4304
|
if (byPurpose) {
|
|
4403
4305
|
return byPurpose;
|
|
@@ -4413,20 +4315,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
4413
4315
|
}] });
|
|
4414
4316
|
//#endregion
|
|
4415
4317
|
//#region ---- Helpers ----
|
|
4416
|
-
function settingKeyForPurpose(purpose) {
|
|
4417
|
-
switch (purpose) {
|
|
4418
|
-
case 'chat':
|
|
4419
|
-
return AXPAiManagementSettings.DefaultModelChat;
|
|
4420
|
-
case 'vision':
|
|
4421
|
-
return AXPAiManagementSettings.DefaultModelVision;
|
|
4422
|
-
case 'image':
|
|
4423
|
-
return AXPAiManagementSettings.DefaultModelImage;
|
|
4424
|
-
case 'speech':
|
|
4425
|
-
return AXPAiManagementSettings.DefaultModelSpeech;
|
|
4426
|
-
case 'tts':
|
|
4427
|
-
return AXPAiManagementSettings.DefaultModelTts;
|
|
4428
|
-
}
|
|
4429
|
-
}
|
|
4430
4318
|
function modelItemSupportsChatCatalogPurpose(m, purpose) {
|
|
4431
4319
|
const p = m.modelPurposes?.length ? m.modelPurposes : [];
|
|
4432
4320
|
if (purpose === 'vision') {
|
|
@@ -4439,5 +4327,5 @@ function modelItemSupportsChatCatalogPurpose(m, purpose) {
|
|
|
4439
4327
|
* Generated bundle index. Do not edit.
|
|
4440
4328
|
*/
|
|
4441
4329
|
|
|
4442
|
-
export { AIMANAGEMENT_CHAT_GENERATE_IMAGE_COMMAND_KEY, AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY, AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY, AIMANAGEMENT_EXTRACT_DOCUMENT_TEXT_COMMAND_KEY, AIMANAGEMENT_STRUCTURED_TEXT_COMPLETION_COMMAND_KEY, AI_AGENT_CATALOG_DATASOURCE_NAME, AI_CHAT_ATTACHMENT_CATEGORY, AI_CHAT_ATTACHMENT_REF_TYPE, AI_CHAT_GENERATED_IMAGE_REF_TYPE, AI_CHAT_GENERATED_SPEECH_REF_TYPE, AI_COMMAND_REGISTRY_CATALOG_DATASOURCE_NAME, AI_GENERATED_IMAGE_MAX_REMOTE_URL_IN_TOOL, AI_MODEL_CATALOG_DATASOURCE_NAME, AI_MODEL_IMAGE_CATALOG_DATASOURCE_NAME, AI_MODEL_SPEECH_CATALOG_DATASOURCE_NAME, AI_MODEL_TTS_CATALOG_DATASOURCE_NAME, AI_QUERY_REGISTRY_CATALOG_DATASOURCE_NAME, AXMAiAgentCatalogDataSourceDefinition, AXMAiAssistPromptBoxComponent, AXMAiAssistPromptBoxService, AXMAiCommandRegistryCatalogDataSourceDefinition, AXMAiManagementEntityProvider, AXMAiManagementMenuProvider, AXMAiManagementModule, AXMAiModelCatalogDataSourceDefinition, AXMAiQueryRegistryCatalogDataSourceDefinition, AXPAI_DELEGATED_AGENT_DEFAULT_MAX_STEPS, AXPAI_DOCUMENT_VISION_DEFAULT_USER_INSTRUCTION, AXPAI_DOCUMENT_VISION_EXTRACTION_SYSTEM, AXPAI_ENGINE_DEFAULT_MAX_STEPS, AXPAI_SUPERVISOR_AGENT_TOOL_PREFIX, AXPAiAssistChatModelCatalogService, AXPAiAssistDefaultMaxStructuredRetries, AXPAiAssistDefaultStructuredMaxTokens, AXPAiAssistService, AXPAiChatToolRunContextService, AXPAiDefaultModelPickerService, AXPAiEngine, AXPAiManagementMenuKeys, AXPAiManagementSettings, AXPAiManagerService, AXPAiPlatformRuntimeContextBuilder, AXPAiStructuredOutputError, AiManagementManifest, RootConfig, axpAiAssistInitialMessagesToTranscript, axpAiChatAgentResultMessage, axpAiChatDelegatedReflectionAssistantMessage, axpAiChatMessageGetText, axpAiChatMessageIsDelegatedReflectionExcluded, axpAiChatMessagesFromProviderAssistant, axpAiChatTextMessage, axpAiChatToolOrAgentResultBodyJson, axpAiChatToolResultBodyJson, axpAiChatToolResultMessage, axpAiChatUserMessage, axpAiCoercePlanningAssistantTextToThink, axpAiCollectDelegatedAgentOutcomeResponses, axpAiDelegatedAgentOutcomeResponsesPlainText, axpAiDelegatedAgentPromptPreview, axpAiDelegatedSubTranscriptAppendFileArtifactFromToolResults, axpAiExtractLastStoredFileArtifactFromChatMessages, axpAiExtractStoredFileArtifactFromUnknown, axpAiMergePlainAssistantTextTurn, axpAiNormalizeHandlerResultToToolBody, axpAiParseDelegatedAgentResultSegmentsFromUnknown, axpAiParseSupervisorAgentToolName, axpAiPruneAssistantPiecesToFirstToolOnly, axpAiStripAssistInitialHtmlToPlain, axpAiSupervisorAgentToolName, axpAiToolCallFromAssistantToolMessage, blobOrFileFromImageResult, getAiChatCommandLlmParametersOverride, isChatPurposeModelRow, isImagePurposeModelRow, isSpeechPurposeModelRow, isTtsPurposeModelRow, modelRowHasPurpose, normalizeAiToolCommandArgs, normalizeModelPurposes, persistAiChatAttachmentImage, persistAiGeneratedImage, persistAiGeneratedSpeech };
|
|
4330
|
+
export { AIMANAGEMENT_CHAT_GENERATE_IMAGE_COMMAND_KEY, AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY, AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY, AIMANAGEMENT_EXTRACT_DOCUMENT_TEXT_COMMAND_KEY, AIMANAGEMENT_STRUCTURED_TEXT_COMPLETION_COMMAND_KEY, AI_AGENT_CATALOG_DATASOURCE_NAME, AI_CHAT_ATTACHMENT_CATEGORY, AI_CHAT_ATTACHMENT_REF_TYPE, AI_CHAT_GENERATED_IMAGE_REF_TYPE, AI_CHAT_GENERATED_SPEECH_REF_TYPE, AI_COMMAND_REGISTRY_CATALOG_DATASOURCE_NAME, AI_GENERATED_IMAGE_MAX_REMOTE_URL_IN_TOOL, AI_MODEL_CATALOG_DATASOURCE_NAME, AI_MODEL_IMAGE_CATALOG_DATASOURCE_NAME, AI_MODEL_SPEECH_CATALOG_DATASOURCE_NAME, AI_MODEL_TTS_CATALOG_DATASOURCE_NAME, AI_QUERY_REGISTRY_CATALOG_DATASOURCE_NAME, AXMAiAgentCatalogDataSourceDefinition, AXMAiAssistPromptBoxComponent, AXMAiAssistPromptBoxService, AXMAiCommandRegistryCatalogDataSourceDefinition, AXMAiManagementEntityProvider, AXMAiManagementMenuProvider, AXMAiManagementModule, AXMAiModelCatalogDataSourceDefinition, AXMAiQueryRegistryCatalogDataSourceDefinition, AXMPermissionDefinitionProvider, AXMPermissionsKeys, AXPAI_DELEGATED_AGENT_DEFAULT_MAX_STEPS, AXPAI_DOCUMENT_VISION_DEFAULT_USER_INSTRUCTION, AXPAI_DOCUMENT_VISION_EXTRACTION_SYSTEM, AXPAI_ENGINE_DEFAULT_MAX_STEPS, AXPAI_SUPERVISOR_AGENT_TOOL_PREFIX, AXPAiAssistChatModelCatalogService, AXPAiAssistDefaultMaxStructuredRetries, AXPAiAssistDefaultStructuredMaxTokens, AXPAiAssistService, AXPAiChatToolRunContextService, AXPAiDefaultModelPickerService, AXPAiEngine, AXPAiManagementMenuKeys, AXPAiManagementSettings, AXPAiManagerService, AXPAiPlatformRuntimeContextBuilder, AXPAiStructuredOutputError, AiManagementManifest, RootConfig, axpAiAssistInitialMessagesToTranscript, axpAiChatAgentResultMessage, axpAiChatDelegatedReflectionAssistantMessage, axpAiChatMessageGetText, axpAiChatMessageIsDelegatedReflectionExcluded, axpAiChatMessagesFromProviderAssistant, axpAiChatTextMessage, axpAiChatToolOrAgentResultBodyJson, axpAiChatToolResultBodyJson, axpAiChatToolResultMessage, axpAiChatUserMessage, axpAiCoercePlanningAssistantTextToThink, axpAiCollectDelegatedAgentOutcomeResponses, axpAiDelegatedAgentOutcomeResponsesPlainText, axpAiDelegatedAgentPromptPreview, axpAiDelegatedSubTranscriptAppendFileArtifactFromToolResults, axpAiExtractLastStoredFileArtifactFromChatMessages, axpAiExtractStoredFileArtifactFromUnknown, axpAiMergePlainAssistantTextTurn, axpAiNormalizeHandlerResultToToolBody, axpAiParseDelegatedAgentResultSegmentsFromUnknown, axpAiParseSupervisorAgentToolName, axpAiPruneAssistantPiecesToFirstToolOnly, axpAiStripAssistInitialHtmlToPlain, axpAiSupervisorAgentToolName, axpAiToolCallFromAssistantToolMessage, blobOrFileFromImageResult, getAiChatCommandLlmParametersOverride, isChatPurposeModelRow, isImagePurposeModelRow, isSpeechPurposeModelRow, isTtsPurposeModelRow, modelRowHasPurpose, normalizeAiToolCommandArgs, normalizeModelPurposes, persistAiChatAttachmentImage, persistAiGeneratedImage, persistAiGeneratedSpeech };
|
|
4443
4331
|
//# sourceMappingURL=acorex-modules-ai-management.mjs.map
|