@sftech/ng-orchestrator 0.0.9 → 0.0.11

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.
Files changed (33) hide show
  1. package/fesm2022/{sftech-ng-orchestrator-agent.service-B-Oyla5f.mjs → sftech-ng-orchestrator-agent.service-CM9cDrXP.mjs} +12 -6
  2. package/fesm2022/sftech-ng-orchestrator-agent.service-CM9cDrXP.mjs.map +1 -0
  3. package/fesm2022/sftech-ng-orchestrator-agents.routes-GsOhn5LG.mjs +159 -0
  4. package/fesm2022/sftech-ng-orchestrator-agents.routes-GsOhn5LG.mjs.map +1 -0
  5. package/fesm2022/{sftech-ng-orchestrator-chat.routes-C-qQU3r4.mjs → sftech-ng-orchestrator-chat.routes-BiKjhPDt.mjs} +11 -12
  6. package/fesm2022/sftech-ng-orchestrator-chat.routes-BiKjhPDt.mjs.map +1 -0
  7. package/fesm2022/sftech-ng-orchestrator-prompt-display.component-5a8wT14o.mjs +114 -0
  8. package/fesm2022/sftech-ng-orchestrator-prompt-display.component-5a8wT14o.mjs.map +1 -0
  9. package/fesm2022/{sftech-ng-orchestrator-prompt.service-CGjm-Lgg.mjs → sftech-ng-orchestrator-prompt.service-BQ9cKQCm.mjs} +8 -8
  10. package/fesm2022/{sftech-ng-orchestrator-prompt.service-CGjm-Lgg.mjs.map → sftech-ng-orchestrator-prompt.service-BQ9cKQCm.mjs.map} +1 -1
  11. package/fesm2022/{sftech-ng-orchestrator-prompts.routes-C0Lzyz67.mjs → sftech-ng-orchestrator-prompts.routes-DLAz29Gn.mjs} +9 -9
  12. package/fesm2022/{sftech-ng-orchestrator-prompts.routes-C0Lzyz67.mjs.map → sftech-ng-orchestrator-prompts.routes-DLAz29Gn.mjs.map} +1 -1
  13. package/fesm2022/{sftech-ng-orchestrator-sftech-ng-orchestrator-BvI6i-px.mjs → sftech-ng-orchestrator-sftech-ng-orchestrator-QxboGYpc.mjs} +55 -14
  14. package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-QxboGYpc.mjs.map +1 -0
  15. package/fesm2022/sftech-ng-orchestrator.mjs +1 -1
  16. package/lib/ng-orchestrator/agents/components/agent/agent-display/agent-display.component.d.ts +10 -2
  17. package/lib/ng-orchestrator/agents/core/dtos/agent-create-request.dto.d.ts +3 -2
  18. package/lib/ng-orchestrator/agents/core/dtos/agent-response.dto.d.ts +2 -0
  19. package/lib/ng-orchestrator/agents/core/dtos/agent-update-request.dto.d.ts +1 -0
  20. package/lib/ng-orchestrator/agents/core/models/agent.model.d.ts +2 -0
  21. package/lib/ng-orchestrator/core/configuration/orchestrator-config.interface.d.ts +9 -1
  22. package/lib/ng-orchestrator/core/configuration/orchestrator-config.mapper.d.ts +3 -2
  23. package/lib/ng-orchestrator/core/dtos/mcp-tool-response.dto.d.ts +5 -0
  24. package/lib/ng-orchestrator/core/models/mcp-tool.model.d.ts +7 -0
  25. package/lib/ng-orchestrator/core/service/orcherstrator.service.d.ts +8 -6
  26. package/package.json +2 -2
  27. package/fesm2022/sftech-ng-orchestrator-agent.service-B-Oyla5f.mjs.map +0 -1
  28. package/fesm2022/sftech-ng-orchestrator-agents.routes-DB9PYB14.mjs +0 -130
  29. package/fesm2022/sftech-ng-orchestrator-agents.routes-DB9PYB14.mjs.map +0 -1
  30. package/fesm2022/sftech-ng-orchestrator-chat.routes-C-qQU3r4.mjs.map +0 -1
  31. package/fesm2022/sftech-ng-orchestrator-prompt-display.component-LSo-QYNv.mjs +0 -114
  32. package/fesm2022/sftech-ng-orchestrator-prompt-display.component-LSo-QYNv.mjs.map +0 -1
  33. package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-BvI6i-px.mjs.map +0 -1
@@ -2,14 +2,23 @@ import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/common/http';
5
- import { map } from 'rxjs';
6
- import { MappedApiResponseRaw } from '@sftech/ng-shared';
5
+ import { MappedApiResponseRaw, MappedApiError } from '@sftech/ng-shared';
6
+ import { map, catchError, of } from 'rxjs';
7
7
 
8
+ // biome-ignore lint/complexity/noStaticOnlyClass: <explanation>
8
9
  class OrchestratorConfigMapper {
9
10
  static map(config) {
10
11
  return {
11
12
  orchestratorUrl: config['ORCHESTRATOR_URL'],
12
13
  orchestratorDbUrl: config['ORCHESTRATOR_DB_URL'],
14
+ defaultConnectorUrl: config['DEFAULT_CONNECTOR_URL'],
15
+ defaultAnswerSpecification: config['DEFAULT_ANSWER_SPECIFICATION'],
16
+ defaultLlmProvider: config['DEFAULT_LLM_PROVIDER'],
17
+ defaultLlmModel: config['DEFAULT_LLM_MODEL'],
18
+ defaultLlmTemperature: config['DEFAULT_LLM_TEMPERATURE'],
19
+ defaultLlmTimeout: config['DEFAULT_LLM_TIMEOUT'],
20
+ defaultLlmRetries: config['DEFAULT_LLM_RETRIES'],
21
+ defaultLlmMaxTokens: config['DEFAULT_LLM_MAX_TOKENS'],
13
22
  };
14
23
  }
15
24
  }
@@ -39,6 +48,19 @@ class LlmTokens {
39
48
  }
40
49
  }
41
50
 
51
+ class McpTool {
52
+ name;
53
+ identifier;
54
+ desceription;
55
+ static fromDto(dto) {
56
+ const tool = new McpTool();
57
+ tool.name = dto.name;
58
+ tool.identifier = dto.identifier;
59
+ tool.desceription = dto.description;
60
+ return tool;
61
+ }
62
+ }
63
+
42
64
  class OrcherstratorService {
43
65
  http;
44
66
  config;
@@ -48,7 +70,7 @@ class OrcherstratorService {
48
70
  }
49
71
  runAgent(runConfig) {
50
72
  const url = `${this.config.orchestratorUrl}/generic/run`;
51
- return this.http.post(url, runConfig).pipe(map(res => {
73
+ return this.http.post(url, runConfig).pipe(map((res) => {
52
74
  console.log(res);
53
75
  const apiResponse = new MappedApiResponseRaw();
54
76
  apiResponse.status = res.status;
@@ -58,10 +80,29 @@ class OrcherstratorService {
58
80
  return apiResponse;
59
81
  }));
60
82
  }
61
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: OrcherstratorService, deps: [{ token: i1.HttpClient }, { token: ORCHESTRATOR_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
62
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: OrcherstratorService });
83
+ getTools() {
84
+ const url = `${this.config.orchestratorUrl}/tools`;
85
+ return this.http.get(url).pipe(map((res) => {
86
+ console.log(res);
87
+ const apiResponse = new MappedApiResponseRaw();
88
+ apiResponse.status = res.status;
89
+ apiResponse.messages = res.messages ? res.messages : [];
90
+ apiResponse.isError = false;
91
+ apiResponse.data = res.data.map((t) => McpTool.fromDto(t));
92
+ return apiResponse;
93
+ }), catchError((err) => {
94
+ console.error('Error fetching tools:', err);
95
+ const error = new MappedApiError();
96
+ error.messages = err.messages ? err.messages : [];
97
+ error.status = err.status ? err.status : 500;
98
+ error.isError = true;
99
+ return of(error);
100
+ }));
101
+ }
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrcherstratorService, deps: [{ token: i1.HttpClient }, { token: ORCHESTRATOR_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
103
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrcherstratorService });
63
104
  }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: OrcherstratorService, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrcherstratorService, decorators: [{
65
106
  type: Injectable
66
107
  }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
67
108
  type: Inject,
@@ -82,11 +123,11 @@ class OrchestratorModule {
82
123
  ],
83
124
  };
84
125
  }
85
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: OrchestratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
86
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
87
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
127
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
128
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
88
129
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: OrchestratorModule, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, decorators: [{
90
131
  type: NgModule,
91
132
  args: [{
92
133
  declarations: [],
@@ -97,15 +138,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
97
138
  const orchestratorRoutes = [
98
139
  {
99
140
  path: 'chats',
100
- loadChildren: () => import('./sftech-ng-orchestrator-chat.routes-C-qQU3r4.mjs').then(m => m.chatRoutes)
141
+ loadChildren: () => import('./sftech-ng-orchestrator-chat.routes-BiKjhPDt.mjs').then(m => m.chatRoutes)
101
142
  },
102
143
  {
103
144
  path: 'prompts',
104
- loadChildren: () => import('./sftech-ng-orchestrator-prompts.routes-C0Lzyz67.mjs').then(m => m.promptsRoutes)
145
+ loadChildren: () => import('./sftech-ng-orchestrator-prompts.routes-DLAz29Gn.mjs').then(m => m.promptsRoutes)
105
146
  },
106
147
  {
107
148
  path: 'agents',
108
- loadChildren: () => import('./sftech-ng-orchestrator-agents.routes-DB9PYB14.mjs').then(m => m.agentsRoutes)
149
+ loadChildren: () => import('./sftech-ng-orchestrator-agents.routes-GsOhn5LG.mjs').then(m => m.agentsRoutes)
109
150
  },
110
151
  ];
111
152
 
@@ -114,4 +155,4 @@ const orchestratorRoutes = [
114
155
  */
115
156
 
116
157
  export { OrcherstratorService as O, ORCHESTRATOR_CONFIGURATION as a, OrchestratorModule as b, orchestratorRoutes as o };
117
- //# sourceMappingURL=sftech-ng-orchestrator-sftech-ng-orchestrator-BvI6i-px.mjs.map
158
+ //# sourceMappingURL=sftech-ng-orchestrator-sftech-ng-orchestrator-QxboGYpc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sftech-ng-orchestrator-sftech-ng-orchestrator-QxboGYpc.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/configuration/orchestrator-config.mapper.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/configuration/orchestrator-configuration.token.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/llm-response.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/mcp-tool.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/service/orcherstrator.service.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/orchestrator.module.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/orchestrator.routes.ts","../../../../libs/ng-orchestrator/src/sftech-ng-orchestrator.ts"],"sourcesContent":["import { IAppConfig } from '@sftech/ng-shared';\r\nimport { IOrchestratorConfig } from './orchestrator-config.interface';\r\n\r\n// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>\r\nexport class OrchestratorConfigMapper {\r\n public static map(config: IAppConfig): IOrchestratorConfig {\r\n return {\r\n orchestratorUrl: config['ORCHESTRATOR_URL'] as string,\r\n orchestratorDbUrl: config['ORCHESTRATOR_DB_URL'] as string,\r\n defaultConnectorUrl: config['DEFAULT_CONNECTOR_URL'] as string,\r\n defaultAnswerSpecification: config['DEFAULT_ANSWER_SPECIFICATION'] as string,\r\n defaultLlmProvider: config['DEFAULT_LLM_PROVIDER'] as string,\r\n defaultLlmModel: config['DEFAULT_LLM_MODEL'] as string,\r\n defaultLlmTemperature: config['DEFAULT_LLM_TEMPERATURE'] as number,\r\n defaultLlmTimeout: config['DEFAULT_LLM_TIMEOUT'] as number,\r\n defaultLlmRetries: config['DEFAULT_LLM_RETRIES'] as number,\r\n defaultLlmMaxTokens: config['DEFAULT_LLM_MAX_TOKENS'] as number,\r\n };\r\n }\r\n}\r\n","import {InjectionToken} from \"@angular/core\";\r\nimport {IOrchestratorConfig} from \"./orchestrator-config.interface\";\r\n\r\nexport const ORCHESTRATOR_CONFIGURATION = new InjectionToken<IOrchestratorConfig>('ORCHESTRATOR_CONFIGURATION');","import {ILlmResponseDto, ILlmTokensDto} from \"../dtos/llm-response.dto\";\r\n\r\nexport class LlmResponse {\r\n message!: string;\r\n tokens?: LlmTokens\r\n\r\n public static fromDto(dto: ILlmResponseDto): LlmResponse {\r\n const model = new LlmResponse();\r\n model.message = dto.message;\r\n model.tokens = dto.tokens ? LlmTokens.fromDto(dto.tokens) : undefined;\r\n return model;\r\n }\r\n}\r\n\r\nexport class LlmTokens {\r\n public input!: number;\r\n public output!: number;\r\n public total!: number;\r\n\r\n public static fromDto(dto: ILlmTokensDto): LlmTokens {\r\n const model = new LlmTokens();\r\n model.input = dto.input;\r\n model.output = dto.output;\r\n model.total = dto.total;\r\n return model;\r\n }\r\n}","import {IMcpToolResponseDto} from \"../dtos/mcp-tool-response.dto\";\r\n\r\nexport class McpTool {\r\n name!: string;\r\n identifier!: string;\r\n desceription!: string;\r\n\r\n public static fromDto(dto: IMcpToolResponseDto): McpTool {\r\n const tool = new McpTool();\r\n tool.name = dto.name;\r\n tool.identifier = dto.identifier;\r\n tool.desceription = dto.description;\r\n return tool;\r\n }\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport {IApiResponse, MappedApiError, MappedApiResponse, MappedApiResponseRaw} from '@sftech/ng-shared';\r\nimport { Observable, catchError, map, of } from 'rxjs';\r\nimport { IOrchestratorConfig } from '../configuration/orchestrator-config.interface';\r\nimport { ORCHESTRATOR_CONFIGURATION } from '../configuration/orchestrator-configuration.token';\r\nimport { ILlmResponseDto } from '../dtos/llm-response.dto';\r\nimport { IMcpToolResponseDto } from '../dtos/mcp-tool-response.dto';\r\nimport { IOrchestratorRunDto } from '../dtos/orchestrator-run.dto';\r\nimport { LlmResponse } from '../models/llm-response.model';\r\nimport {McpTool} from \"../models/mcp-tool.model\";\r\n\r\n@Injectable()\r\nexport class OrcherstratorService {\r\n public constructor(\r\n private readonly http: HttpClient,\r\n @Inject(ORCHESTRATOR_CONFIGURATION) private readonly config: IOrchestratorConfig,\r\n ) {}\r\n\r\n public runAgent(runConfig: IOrchestratorRunDto): Observable<MappedApiResponseRaw<LlmResponse>> {\r\n const url = `${this.config.orchestratorUrl}/generic/run`;\r\n return this.http.post<IApiResponse<ILlmResponseDto>>(url, runConfig).pipe(\r\n map((res) => {\r\n console.log(res);\r\n const apiResponse = new MappedApiResponseRaw<LlmResponse>();\r\n apiResponse.status = res.status;\r\n apiResponse.messages = res.messages ? res.messages : [];\r\n apiResponse.isError = false;\r\n apiResponse.data = LlmResponse.fromDto(res.data as ILlmResponseDto);\r\n return apiResponse;\r\n }),\r\n // catchError((err) => {\r\n // const error = new MappedApiError()\r\n // error.messages = err.messages ? err.messages : [];\r\n // return of(new MappedApiError())\r\n // })\r\n );\r\n }\r\n\r\n public getTools(): Observable<MappedApiResponseRaw<McpTool[]>> {\r\n const url = `${this.config.orchestratorUrl}/tools`;\r\n return this.http.get<IApiResponse<IMcpToolResponseDto[]>>(url).pipe(\r\n map((res) => {\r\n console.log(res);\r\n const apiResponse = new MappedApiResponseRaw<McpTool[]>();\r\n apiResponse.status = res.status;\r\n apiResponse.messages = res.messages ? res.messages : [];\r\n apiResponse.isError = false;\r\n apiResponse.data = (res.data as IMcpToolResponseDto[]).map((t) => McpTool.fromDto(t));\r\n return apiResponse;\r\n }),\r\n catchError((err) => {\r\n console.error('Error fetching tools:', err);\r\n const error = new MappedApiError();\r\n error.messages = err.messages ? err.messages : [];\r\n error.status = err.status ? err.status : 500;\r\n error.isError = true;\r\n return of(error);\r\n }),\r\n );\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { IAppConfig } from '@sftech/ng-shared';\r\nimport { OrchestratorConfigMapper } from './core/configuration/orchestrator-config.mapper';\r\nimport { ORCHESTRATOR_CONFIGURATION } from './core/configuration/orchestrator-configuration.token';\r\nimport { OrcherstratorService } from './core/service/orcherstrator.service';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [CommonModule],\r\n})\r\n// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>\r\nexport class OrchestratorModule {\r\n public static forRoot(config: IAppConfig): ModuleWithProviders<OrchestratorModule> {\r\n return {\r\n ngModule: OrchestratorModule,\r\n providers: [\r\n {\r\n provide: ORCHESTRATOR_CONFIGURATION,\r\n useValue: OrchestratorConfigMapper.map(config),\r\n },\r\n OrcherstratorService,\r\n ],\r\n };\r\n }\r\n}\r\n","import {Route} from '@angular/router';\r\n\r\nexport const orchestratorRoutes: Route[] = [\r\n {\r\n path: 'chats',\r\n loadChildren: () => import('./chat/chat.routes').then(m => m.chatRoutes)\r\n },\r\n {\r\n path: 'prompts',\r\n loadChildren: () => import('./prompts/prompts.routes').then(m => m.promptsRoutes)\r\n },\r\n {\r\n path: 'agents',\r\n loadChildren: () => import('./agents/agents.routes').then(m => m.agentsRoutes)\r\n },\r\n];\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;M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Y,CAAC;AAC1B,iBAAA;;;ACRY,MAAA,kBAAkB,GAAY;AACvC,IAAA;AACI,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,YAAY,EAAE,MAAM,OAAO,mDAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU;AAC1E,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,YAAY,EAAE,MAAM,OAAO,sDAA0B,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa;AACnF,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,YAAY,EAAE,MAAM,OAAO,qDAAwB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY;AAChF,KAAA;;;ACdL;;AAEG;;;;"}
@@ -1,2 +1,2 @@
1
- export { b as OrchestratorModule, o as orchestratorRoutes } from './sftech-ng-orchestrator-sftech-ng-orchestrator-BvI6i-px.mjs';
1
+ export { b as OrchestratorModule, o as orchestratorRoutes } from './sftech-ng-orchestrator-sftech-ng-orchestrator-QxboGYpc.mjs';
2
2
  //# sourceMappingURL=sftech-ng-orchestrator.mjs.map
@@ -1,3 +1,4 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { FormGroup } from '@angular/forms';
2
3
  import { BaseDisplayComponent } from '@sftech/ng-shared';
3
4
  import { DialogService } from 'primeng/dynamicdialog';
@@ -5,15 +6,22 @@ import { IAgentResponseDto } from '../../../core/dtos/agent-response.dto';
5
6
  import { IAgentUpdateDto } from '../../../core/dtos/agent-update-request.dto';
6
7
  import { Agent } from '../../../core/models/agent.model';
7
8
  import { AgentService } from '../../../core/services/agent.service';
9
+ import { OrcherstratorService } from "../../../../core/service/orcherstrator.service";
10
+ import { IAgentCreateDto } from "../../../core/dtos/agent-create-request.dto";
11
+ import { McpTool } from "../../../../core/models/mcp-tool.model";
8
12
  import * as i0 from "@angular/core";
9
- export declare class AgentDisplayComponent extends BaseDisplayComponent<Agent, IAgentUpdateDto, IAgentUpdateDto, IAgentResponseDto> {
13
+ export declare class AgentDisplayComponent extends BaseDisplayComponent<Agent, IAgentUpdateDto, IAgentUpdateDto, IAgentResponseDto> implements OnInit {
10
14
  protected _repo: AgentService;
11
15
  protected _route: string;
16
+ protected _orchestratorService: OrcherstratorService;
17
+ tools: import("@angular/core").WritableSignal<McpTool[] | undefined>;
12
18
  protected dialog: DialogService;
19
+ private _options;
20
+ ngOnInit(): void;
13
21
  protected initializeForm(): FormGroup;
14
22
  protected getNewModel(): Agent;
15
23
  protected mapFormToUpdateDto(): IAgentUpdateDto;
16
- protected mapFormToCreateDto(): IAgentUpdateDto;
24
+ protected mapFormToCreateDto(): IAgentCreateDto;
17
25
  openPromptModal(promptId: number | undefined): void;
18
26
  static ɵfac: i0.ɵɵFactoryDeclaration<AgentDisplayComponent, never>;
19
27
  static ɵcmp: i0.ɵɵComponentDeclaration<AgentDisplayComponent, "sftech-prompt-display", never, {}, {}, never, never, true, never>;
@@ -1,8 +1,9 @@
1
- import { IBaseDbResponseDto } from '@sftech/ng-shared';
2
- export interface IAgentCreateDto extends IBaseDbResponseDto {
1
+ import { IBaseDbCreateDto } from '@sftech/ng-shared';
2
+ export interface IAgentCreateDto extends IBaseDbCreateDto {
3
3
  description: string;
4
4
  name: string;
5
5
  connectorUrl: string;
6
+ answerSpecification: string;
6
7
  tools?: string[];
7
8
  llmProvider: string;
8
9
  llmModel: string;
@@ -5,6 +5,8 @@ export interface IAgentResponseDto extends IBaseDbResponseDto {
5
5
  description: string;
6
6
  name: string;
7
7
  connectorUrl: string;
8
+ isGeneric: boolean;
9
+ answerSpecification: string;
8
10
  tools?: string[];
9
11
  llmProvider: string;
10
12
  llmModel: string;
@@ -3,6 +3,7 @@ export interface IAgentUpdateDto extends IBaseDbUpdateDto {
3
3
  description: string;
4
4
  name: string;
5
5
  connectorUrl: string;
6
+ answerSpecification: string;
6
7
  tools?: string[];
7
8
  llmProvider: string;
8
9
  llmModel: string;
@@ -7,6 +7,8 @@ export declare class Agent extends BaseDbModel {
7
7
  description: string;
8
8
  name: string;
9
9
  connectorUrl: string;
10
+ isGeneric: boolean;
11
+ answerSpecification: string;
10
12
  tools: string[];
11
13
  llmProvider: string;
12
14
  llmModel: string;
@@ -1,5 +1,13 @@
1
- import { IAppConfig } from "@sftech/ng-shared";
1
+ import { IAppConfig } from '@sftech/ng-shared';
2
2
  export interface IOrchestratorConfig extends IAppConfig {
3
3
  orchestratorUrl: string;
4
4
  orchestratorDbUrl: string;
5
+ defaultConnectorUrl: string;
6
+ defaultAnswerSpecification: string;
7
+ defaultLlmProvider: string;
8
+ defaultLlmModel: string;
9
+ defaultLlmTemperature: number;
10
+ defaultLlmTimeout: number;
11
+ defaultLlmRetries: number;
12
+ defaultLlmMaxTokens: number;
5
13
  }
@@ -1,4 +1,5 @@
1
- import { IOrchestratorConfig } from "./orchestrator-config.interface";
1
+ import { IAppConfig } from '@sftech/ng-shared';
2
+ import { IOrchestratorConfig } from './orchestrator-config.interface';
2
3
  export declare class OrchestratorConfigMapper {
3
- static map(config: any): IOrchestratorConfig;
4
+ static map(config: IAppConfig): IOrchestratorConfig;
4
5
  }
@@ -0,0 +1,5 @@
1
+ export interface IMcpToolResponseDto {
2
+ name: string;
3
+ identifier: string;
4
+ description: string;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { IMcpToolResponseDto } from "../dtos/mcp-tool-response.dto";
2
+ export declare class McpTool {
3
+ name: string;
4
+ identifier: string;
5
+ desceription: string;
6
+ static fromDto(dto: IMcpToolResponseDto): McpTool;
7
+ }
@@ -1,15 +1,17 @@
1
- import { HttpClient } from "@angular/common/http";
2
- import { IOrchestratorRunDto } from "../dtos/orchestrator-run.dto";
3
- import { Observable } from "rxjs";
4
- import { IOrchestratorConfig } from "../configuration/orchestrator-config.interface";
5
- import { MappedApiResponseRaw } from "@sftech/ng-shared";
6
- import { LlmResponse } from "../models/llm-response.model";
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { MappedApiResponseRaw } from '@sftech/ng-shared';
3
+ import { Observable } from 'rxjs';
4
+ import { IOrchestratorConfig } from '../configuration/orchestrator-config.interface';
5
+ import { IOrchestratorRunDto } from '../dtos/orchestrator-run.dto';
6
+ import { LlmResponse } from '../models/llm-response.model';
7
+ import { McpTool } from "../models/mcp-tool.model";
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class OrcherstratorService {
9
10
  private readonly http;
10
11
  private readonly config;
11
12
  constructor(http: HttpClient, config: IOrchestratorConfig);
12
13
  runAgent(runConfig: IOrchestratorRunDto): Observable<MappedApiResponseRaw<LlmResponse>>;
14
+ getTools(): Observable<MappedApiResponseRaw<McpTool[]>>;
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<OrcherstratorService, never>;
14
16
  static ɵprov: i0.ɵɵInjectableDeclaration<OrcherstratorService>;
15
17
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@sftech/ng-orchestrator",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",
7
- "@sftech/ng-shared": ">=0.0.7"
7
+ "@sftech/ng-shared": ">=0.0.9"
8
8
  },
9
9
  "sideEffects": false,
10
10
  "module": "fesm2022/sftech-ng-orchestrator.mjs",
@@ -1 +0,0 @@
1
- {"version":3,"file":"sftech-ng-orchestrator-agent.service-B-Oyla5f.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/agents/core/models/agent.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/agents/core/services/agent.service.ts"],"sourcesContent":["import { BaseDbModel, EFilterTypes, IBaseDbResponseDto } from '@sftech/ng-shared';\r\nimport { IAgentResponseDto } from '../dtos/agent-response.dto';\r\nimport {IPromptHistoryResponseDto} from \"../../../prompts/core/dtos/prompt-history-response.dto\";\r\nimport {Prompt} from \"../../../prompts/core/models/prompt.model\";\r\nimport {PromptHistory} from \"../../../prompts/core/models/prompt-history.model\";\r\n\r\nexport class Agent extends BaseDbModel {\r\n public identifier!: string;\r\n\r\n public description!: string;\r\n\r\n public name!: string;\r\n\r\n public connectorUrl!: string;\r\n\r\n public tools!: string[];\r\n\r\n public llmProvider!: string;\r\n\r\n public llmModel!: string;\r\n\r\n public llmTemperature!: number;\r\n\r\n public llmTimeout?: number;\r\n\r\n public llmRetries?: number;\r\n\r\n public llmMaxTokens?: number;\r\n\r\n public llmUserPromptId!: number;\r\n\r\n public llmUserPrompt?: Prompt;\r\n\r\n public llmSystemPromptId!: number;\r\n\r\n public llmSystemPrompt?: Prompt;\r\n\r\n public llmUserPromptHistoryId?: number;\r\n\r\n public llmUserPromptHistory?: PromptHistory;\r\n\r\n public llmSystemPromptHistoryId?: number;\r\n\r\n public llmSystemPromptHistory?: PromptHistory;\r\n\r\n public override propertiesToShow = ['name', 'identifier', 'description'];\r\n\r\n public override propertyUINames = new Map<string, string>([\r\n ['name', 'Name'],\r\n ['description', 'Beschreibung'],\r\n ['identifier', 'identifier'],\r\n ['llmUserPromptTemplateIdentifier', 'User Prompt Identifier'],\r\n ['connectorUrl', 'Connector-Url'],\r\n ['tools', 'LLM-Tools'],\r\n ['llmProvider', 'LLM-Provider'],\r\n ['llmModel', 'LLM-Model'],\r\n ['llmTemperature', 'LLM-Temperature'],\r\n ['llmTimeout', 'LLM-Timeout'],\r\n ['llmRetries', 'LLM-Retries'],\r\n ['llmMaxTokens', 'LLM-Max-Tokens'],\r\n ['llmUserPromptId', 'User Prompt ID'],\r\n ['llmUserPrompt', 'User Prompt Template'],\r\n ['llmSystemPromptId', 'System Prompt ID'],\r\n ['llmSystemPrompt', 'System Prompt Template'],\r\n ]);\r\n\r\n public override propertyFilterType = new Map<string, EFilterTypes>([\r\n ['name', EFilterTypes.STRING],\r\n ['template', EFilterTypes.STRING],\r\n ['identifier', EFilterTypes.STRING],\r\n ]);\r\n\r\n public override fromDto(dto: IAgentResponseDto): Agent {\r\n const model = new Agent();\r\n model.id = dto.id;\r\n model.createdAt = new Date(dto.createdAt);\r\n model.name = dto.name;\r\n model.identifier = dto.identifier;\r\n model.description = dto.description;\r\n model.connectorUrl = dto.connectorUrl;\r\n model.tools = dto.tools ? dto.tools : [];\r\n model.llmProvider = dto.llmProvider;\r\n model.llmModel = dto.llmModel;\r\n model.llmTemperature = dto.llmTemperature;\r\n model.llmTimeout = dto.llmTimeout;\r\n model.llmRetries = dto.llmRetries;\r\n model.llmMaxTokens = dto.llmMaxTokens;\r\n model.llmUserPrompt = dto.llmUserPrompt ? Prompt.fromDto(dto.llmUserPrompt) as Prompt : undefined;\r\n model.llmUserPromptId = dto.llmUserPromptId;\r\n model.llmSystemPrompt = dto.llmSystemPrompt ? Prompt.fromDto(dto.llmSystemPrompt) as Prompt : undefined;\r\n model.llmSystemPromptId = dto.llmSystemPromptId;\r\n model.llmUserPromptHistory = dto.llmUserPromptHistory ? Prompt.fromDto(dto.llmUserPromptHistory) as PromptHistory : undefined;\r\n model.llmUserPromptHistoryId = dto.llmUserPromptHistoryId;\r\n model.llmSystemPromptHistory = dto.llmSystemPromptHistory ? Prompt.fromDto(dto.llmSystemPromptHistory) as PromptHistory : undefined;\r\n model.llmSystemPromptHistoryId = dto.llmSystemPromptHistoryId;\r\n return model;\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport { BaseDbApiService } from '@sftech/ng-shared';\r\nimport { IOrchestratorConfig } from '../../../core/configuration/orchestrator-config.interface';\r\nimport { ORCHESTRATOR_CONFIGURATION } from '../../../core/configuration/orchestrator-configuration.token';\r\nimport { IAgentCreateDto } from '../dtos/agent-create-request.dto';\r\nimport { IAgentResponseDto } from '../dtos/agent-response.dto';\r\nimport { IAgentUpdateDto } from '../dtos/agent-update-request.dto';\r\nimport { Agent } from '../models/agent.model';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AgentService extends BaseDbApiService<Agent, IAgentCreateDto, IAgentUpdateDto, IAgentResponseDto> {\r\n constructor(\r\n protected override readonly http: HttpClient,\r\n @Inject(ORCHESTRATOR_CONFIGURATION) protected override readonly config: IOrchestratorConfig,\r\n ) {\r\n super(http, config);\r\n this.url = `${this.config.orchestratorDbUrl}/agents`;\r\n }\r\n\r\n protected getNewModel(): Agent {\r\n return new Agent();\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;AAMM,MAAO,KAAM,SAAQ,WAAW,CAAA;AAC3B,IAAA,UAAU;AAEV,IAAA,WAAW;AAEX,IAAA,IAAI;AAEJ,IAAA,YAAY;AAEZ,IAAA,KAAK;AAEL,IAAA,WAAW;AAEX,IAAA,QAAQ;AAER,IAAA,cAAc;AAEd,IAAA,UAAU;AAEV,IAAA,UAAU;AAEV,IAAA,YAAY;AAEZ,IAAA,eAAe;AAEf,IAAA,aAAa;AAEb,IAAA,iBAAiB;AAEjB,IAAA,eAAe;AAEf,IAAA,sBAAsB;AAEtB,IAAA,oBAAoB;AAEpB,IAAA,wBAAwB;AAExB,IAAA,sBAAsB;IAEb,gBAAgB,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,aAAa,CAAC;IAExD,eAAe,GAAG,IAAI,GAAG,CAAiB;QACtD,CAAC,MAAM,EAAE,MAAM,CAAC;QAChB,CAAC,aAAa,EAAE,cAAc,CAAC;QAC/B,CAAC,YAAY,EAAE,YAAY,CAAC;QAC5B,CAAC,iCAAiC,EAAE,wBAAwB,CAAC;QAC7D,CAAC,cAAc,EAAE,eAAe,CAAC;QACjC,CAAC,OAAO,EAAE,WAAW,CAAC;QACtB,CAAC,aAAa,EAAE,cAAc,CAAC;QAC/B,CAAC,UAAU,EAAE,WAAW,CAAC;QACzB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;QACrC,CAAC,YAAY,EAAE,aAAa,CAAC;QAC7B,CAAC,YAAY,EAAE,aAAa,CAAC;QAC7B,CAAC,cAAc,EAAE,gBAAgB,CAAC;QAClC,CAA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AA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,4CAGT,0BAA0B,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAH7B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAIzB,MAAM;2BAAC,0BAA0B;;;;;"}
@@ -1,130 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, inject } from '@angular/core';
3
- import { RouterOutlet } from '@angular/router';
4
- import { BaseDisplayComponent, BaseDialogComponent, BaseListComponent, IconProvider, PaginatorComponent } from '@sftech/ng-shared';
5
- import { DialogService } from 'primeng/dynamicdialog';
6
- import { Panel } from 'primeng/panel';
7
- import * as i1$1 from 'primeng/table';
8
- import { TableModule } from 'primeng/table';
9
- import { A as AgentService, a as Agent } from './sftech-ng-orchestrator-agent.service-B-Oyla5f.mjs';
10
- import * as i1 from '@angular/forms';
11
- import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
12
- import { AutoFocus } from 'primeng/autofocus';
13
- import { Button } from 'primeng/button';
14
- import { DatePicker } from 'primeng/datepicker';
15
- import { Fieldset } from 'primeng/fieldset';
16
- import { FloatLabel } from 'primeng/floatlabel';
17
- import { InputText } from 'primeng/inputtext';
18
- import { Textarea } from 'primeng/textarea';
19
- import { P as PromptDisplayComponent } from './sftech-ng-orchestrator-prompt-display.component-LSo-QYNv.mjs';
20
-
21
- class AgentsComponent {
22
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AgentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AgentsComponent, isStandalone: true, selector: "sftech-agents", ngImport: i0, template: "<router-outlet></router-outlet>\r\n", styles: [""], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AgentsComponent, decorators: [{
26
- type: Component,
27
- args: [{ selector: 'sftech-agents', imports: [RouterOutlet], template: "<router-outlet></router-outlet>\r\n" }]
28
- }] });
29
-
30
- class AgentDisplayComponent extends BaseDisplayComponent {
31
- _repo = inject(AgentService);
32
- _route = 'agents';
33
- dialog = inject(DialogService);
34
- initializeForm() {
35
- return new FormGroup({
36
- id: new FormControl({ value: this.model().id, disabled: true }),
37
- createdAt: new FormControl({ value: this.model().createdAt, disabled: true }),
38
- identifier: new FormControl({ value: this.model().identifier, disabled: true }),
39
- llmUserPrompt: new FormControl({ value: this.model().llmUserPrompt, disabled: true }),
40
- llmSystemPrompt: new FormControl({ value: this.model().llmSystemPrompt, disabled: true }),
41
- description: new FormControl({ value: this.model().description, disabled: !this.canEdit }),
42
- connectorUrl: new FormControl({ value: this.model().connectorUrl, disabled: !this.canEdit }),
43
- tools: new FormControl({ value: this.model().tools, disabled: !this.canEdit }),
44
- llmProvider: new FormControl({ value: this.model().llmProvider, disabled: !this.canEdit }),
45
- llmModel: new FormControl({ value: this.model().llmModel, disabled: !this.canEdit }),
46
- llmTemperature: new FormControl({ value: this.model().llmTemperature, disabled: !this.canEdit }),
47
- llmTimeout: new FormControl({ value: this.model().llmTimeout, disabled: !this.canEdit }),
48
- llmRetries: new FormControl({ value: this.model().llmRetries, disabled: !this.canEdit }),
49
- llmMaxTokens: new FormControl({ value: this.model().llmMaxTokens, disabled: !this.canEdit }),
50
- name: new FormControl(this.model()?.name),
51
- });
52
- }
53
- getNewModel() {
54
- return new Agent();
55
- }
56
- mapFormToUpdateDto() {
57
- return {
58
- description: this.form.get('description')?.value,
59
- connectorUrl: this.form.get('connectorUrl')?.value,
60
- tools: this.form.get('tools')?.value,
61
- llmProvider: this.form.get('llmProvider')?.value,
62
- llmModel: this.form.get('llmModel')?.value,
63
- llmTemperature: this.form.get('llmTemperature')?.value,
64
- llmTimeout: this.form.get('llmTimeout')?.value,
65
- llmRetries: this.form.get('llmRetries')?.value,
66
- llmMaxTokens: this.form.get('llmMaxTokens')?.value,
67
- name: this.form.get('name')?.value,
68
- };
69
- }
70
- mapFormToCreateDto() {
71
- return {
72
- description: this.form.get('description')?.value,
73
- connectorUrl: this.form.get('connectorUrl')?.value,
74
- tools: this.form.get('tools')?.value,
75
- llmProvider: this.form.get('llmProvider')?.value,
76
- llmModel: this.form.get('llmModel')?.value,
77
- llmTemperature: this.form.get('llmTemperature')?.value,
78
- llmTimeout: this.form.get('llmTimeout')?.value,
79
- llmRetries: this.form.get('llmRetries')?.value,
80
- llmMaxTokens: this.form.get('llmMaxTokens')?.value,
81
- name: this.form.get('name')?.value,
82
- };
83
- }
84
- openPromptModal(promptId) {
85
- console.log(promptId);
86
- if (!promptId) {
87
- return;
88
- }
89
- this.dialog.open(PromptDisplayComponent, { inputValues: { id: promptId, canEdit: true, openedAsModal: true }, focusOnShow: false, modal: true, dismissableMask: true, width: '70%', contentStyle: { overflow: 'auto' } });
90
- }
91
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AgentDisplayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
92
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: AgentDisplayComponent, isStandalone: true, selector: "sftech-prompt-display", providers: [DialogService], usesInheritance: true, ngImport: i0, template: "<sftech-base-dialog [hasHeader]=\"true\" (closed)=\"close({ operation: 'aborted' })\">\r\n <ng-template #header>\r\n <div class=\"flex justify-between\">\r\n <h2 class=\"text-xl font-semibold\">\r\n Agent\r\n @if (model()) {\r\n <span class=\"ms-1\">{{ this.model().identifier }}</span>\r\n }\r\n </h2>\r\n </div>\r\n </ng-template>\r\n <ng-template #body>\r\n @if (model()) {\r\n <form [formGroup]=\"form\" [pAutoFocus]=\"true\">\r\n <p-fieldset legend=\"Stammdaten\">\r\n <div class=\"grid grid-cols-3 gap-2\">\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"id\" formControlName=\"id\" pInputText class=\"w-full\"/>\r\n <label for=\"id\">{{ this.model().getUiNameForProperty('id') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"identifier\" formControlName=\"identifier\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('identifier')?.dirty && form.get('identifier')?.invalid\"/>\r\n <label for=\"identifier\">{{ this.model().getUiNameForProperty('identifier') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <p-datePicker id=\"createdAt\" formControlName=\"createdAt\" dateFormat=\"dd.mm.yy\" [showTime]=\"true\"\r\n [hourFormat]=\"'24'\" [style]=\"{'width': '100%'}\" [class.ng-invalid]=\"form.get('createdAt')?.dirty && form.get('createdAt')?.invalid\"></p-datePicker>\r\n <label for=\"createdAt\">{{ this.model().getUiNameForProperty('createdAt') }}</label>\r\n </p-floatlabel>\r\n </div>\r\n <p-floatlabel variant=\"in\" class=\"w-full mt-2\">\r\n <input type=\"text\" id=\"name\" formControlName=\"name\" pTextarea class=\"w-full\" [class.ng-invalid]=\"form.get('name')?.dirty && form.get('name')?.invalid\" />\r\n <label for=\"name\">{{ this.model().getUiNameForProperty('name') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full mt-2\">\r\n <textarea rows=\"5\" id=\"description\" formControlName=\"description\" pTextarea class=\"w-full\" [class.ng-invalid]=\"form.get('description')?.dirty && form.get('description')?.invalid\"></textarea>\r\n <label for=\"description\">{{ this.model().getUiNameForProperty('description') }}</label>\r\n </p-floatlabel>\r\n </p-fieldset>\r\n <p-fieldset legend=\"Prompts\">\r\n <div class=\"grid grid-cols-3 mb-2 gap-2\">\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmUserPrompt\" (click)=\"openPromptModal(model().llmUserPromptId)\"\r\n [value]=\"model().llmUserPrompt?.identifier\" pInputText class=\"w-full cursor-pointer\"/>\r\n <label for=\"llmUserPrompt\">{{ this.model().getUiNameForProperty('llmUserPrompt') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmSystemPrompt\" (click)=\"openPromptModal(model().llmSystemPromptId)\"\r\n [value]=\"model().llmSystemPrompt?.identifier\" pInputText class=\"w-full cursor-pointer\"/>\r\n <label for=\"llmSystemPrompt\">{{ this.model().getUiNameForProperty('llmSystemPrompt') }}</label>\r\n </p-floatlabel>\r\n\r\n </div>\r\n </p-fieldset>\r\n <p-fieldset legend=\"LLM-Konfiguration\">\r\n <div class=\"grid grid-cols-3 mb-2 gap-2\">\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"connectorUrl\"\r\n formControlName=\"connectorUrl\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('connectorUrl')?.dirty && form.get('connectorUrl')?.invalid\"/>\r\n <label for=\"connectorUrl\">{{ this.model().getUiNameForProperty('connectorUrl') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmProvider\"\r\n formControlName=\"llmProvider\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmProvider')?.dirty && form.get('llmProvider')?.invalid\"/>\r\n <label for=\"llmProvider\">{{ this.model().getUiNameForProperty('llmProvider') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmModel\"\r\n formControlName=\"llmModel\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmModel')?.dirty && form.get('llmModel')?.invalid\"/>\r\n <label for=\"llmModel\">{{ this.model().getUiNameForProperty('llmModel') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmTemperature\"\r\n formControlName=\"llmTemperature\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmTemperature')?.dirty && form.get('llmTemperature')?.invalid\"/>\r\n <label for=\"llmTemperature\">{{ this.model().getUiNameForProperty('llmTemperature') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmTimeout\"\r\n formControlName=\"llmTimeout\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmTimeout')?.dirty && form.get('llmTimeout')?.invalid\"/>\r\n <label for=\"llmTimeout\">{{ this.model().getUiNameForProperty('llmTimeout') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmRetries\"\r\n formControlName=\"llmRetries\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmRetries')?.dirty && form.get('llmRetries')?.invalid\"/>\r\n <label for=\"llmRetries\">{{ this.model().getUiNameForProperty('llmRetries') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmMaxTokens\"\r\n formControlName=\"llmMaxTokens\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmMaxTokens')?.dirty && form.get('llmMaxTokens')?.invalid\"/>\r\n <label for=\"llmMaxTokens\">{{ this.model().getUiNameForProperty('llmMaxTokens') }}</label>\r\n </p-floatlabel>\r\n\r\n </div>\r\n </p-fieldset>\r\n\r\n <div class=\"flex justify-end\">\r\n <p-button label=\"Speichern\" type=\"submit\" (onClick)=\"submitForm()\" (keyup.enter)=\"submitForm()\"\r\n [disabled]=\"!form.dirty\"></p-button>\r\n </div>\r\n </form>\r\n }\r\n </ng-template>\r\n <ng-template #footer>\r\n\r\n </ng-template>\r\n</sftech-base-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus", "pAutoFocus"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: BaseDialogComponent, selector: "sftech-base-dialog", inputs: ["hasHeader", "hasFooter", "showButtons", "headerText"], outputs: ["closed"] }, { kind: "component", type: Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] });
93
- }
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AgentDisplayComponent, decorators: [{
95
- type: Component,
96
- args: [{ selector: 'sftech-prompt-display', imports: [ReactiveFormsModule, InputText, AutoFocus, FloatLabel, DatePicker, Textarea, Button, BaseDialogComponent, Fieldset], providers: [DialogService], template: "<sftech-base-dialog [hasHeader]=\"true\" (closed)=\"close({ operation: 'aborted' })\">\r\n <ng-template #header>\r\n <div class=\"flex justify-between\">\r\n <h2 class=\"text-xl font-semibold\">\r\n Agent\r\n @if (model()) {\r\n <span class=\"ms-1\">{{ this.model().identifier }}</span>\r\n }\r\n </h2>\r\n </div>\r\n </ng-template>\r\n <ng-template #body>\r\n @if (model()) {\r\n <form [formGroup]=\"form\" [pAutoFocus]=\"true\">\r\n <p-fieldset legend=\"Stammdaten\">\r\n <div class=\"grid grid-cols-3 gap-2\">\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"id\" formControlName=\"id\" pInputText class=\"w-full\"/>\r\n <label for=\"id\">{{ this.model().getUiNameForProperty('id') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"identifier\" formControlName=\"identifier\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('identifier')?.dirty && form.get('identifier')?.invalid\"/>\r\n <label for=\"identifier\">{{ this.model().getUiNameForProperty('identifier') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <p-datePicker id=\"createdAt\" formControlName=\"createdAt\" dateFormat=\"dd.mm.yy\" [showTime]=\"true\"\r\n [hourFormat]=\"'24'\" [style]=\"{'width': '100%'}\" [class.ng-invalid]=\"form.get('createdAt')?.dirty && form.get('createdAt')?.invalid\"></p-datePicker>\r\n <label for=\"createdAt\">{{ this.model().getUiNameForProperty('createdAt') }}</label>\r\n </p-floatlabel>\r\n </div>\r\n <p-floatlabel variant=\"in\" class=\"w-full mt-2\">\r\n <input type=\"text\" id=\"name\" formControlName=\"name\" pTextarea class=\"w-full\" [class.ng-invalid]=\"form.get('name')?.dirty && form.get('name')?.invalid\" />\r\n <label for=\"name\">{{ this.model().getUiNameForProperty('name') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full mt-2\">\r\n <textarea rows=\"5\" id=\"description\" formControlName=\"description\" pTextarea class=\"w-full\" [class.ng-invalid]=\"form.get('description')?.dirty && form.get('description')?.invalid\"></textarea>\r\n <label for=\"description\">{{ this.model().getUiNameForProperty('description') }}</label>\r\n </p-floatlabel>\r\n </p-fieldset>\r\n <p-fieldset legend=\"Prompts\">\r\n <div class=\"grid grid-cols-3 mb-2 gap-2\">\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmUserPrompt\" (click)=\"openPromptModal(model().llmUserPromptId)\"\r\n [value]=\"model().llmUserPrompt?.identifier\" pInputText class=\"w-full cursor-pointer\"/>\r\n <label for=\"llmUserPrompt\">{{ this.model().getUiNameForProperty('llmUserPrompt') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmSystemPrompt\" (click)=\"openPromptModal(model().llmSystemPromptId)\"\r\n [value]=\"model().llmSystemPrompt?.identifier\" pInputText class=\"w-full cursor-pointer\"/>\r\n <label for=\"llmSystemPrompt\">{{ this.model().getUiNameForProperty('llmSystemPrompt') }}</label>\r\n </p-floatlabel>\r\n\r\n </div>\r\n </p-fieldset>\r\n <p-fieldset legend=\"LLM-Konfiguration\">\r\n <div class=\"grid grid-cols-3 mb-2 gap-2\">\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"connectorUrl\"\r\n formControlName=\"connectorUrl\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('connectorUrl')?.dirty && form.get('connectorUrl')?.invalid\"/>\r\n <label for=\"connectorUrl\">{{ this.model().getUiNameForProperty('connectorUrl') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmProvider\"\r\n formControlName=\"llmProvider\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmProvider')?.dirty && form.get('llmProvider')?.invalid\"/>\r\n <label for=\"llmProvider\">{{ this.model().getUiNameForProperty('llmProvider') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"text\" id=\"llmModel\"\r\n formControlName=\"llmModel\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmModel')?.dirty && form.get('llmModel')?.invalid\"/>\r\n <label for=\"llmModel\">{{ this.model().getUiNameForProperty('llmModel') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmTemperature\"\r\n formControlName=\"llmTemperature\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmTemperature')?.dirty && form.get('llmTemperature')?.invalid\"/>\r\n <label for=\"llmTemperature\">{{ this.model().getUiNameForProperty('llmTemperature') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmTimeout\"\r\n formControlName=\"llmTimeout\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmTimeout')?.dirty && form.get('llmTimeout')?.invalid\"/>\r\n <label for=\"llmTimeout\">{{ this.model().getUiNameForProperty('llmTimeout') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmRetries\"\r\n formControlName=\"llmRetries\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmRetries')?.dirty && form.get('llmRetries')?.invalid\"/>\r\n <label for=\"llmRetries\">{{ this.model().getUiNameForProperty('llmRetries') }}</label>\r\n </p-floatlabel>\r\n <p-floatlabel variant=\"in\" class=\"w-full\">\r\n <input type=\"number\" id=\"llmMaxTokens\"\r\n formControlName=\"llmMaxTokens\" pInputText class=\"w-full\" [class.ng-invalid]=\"form.get('llmMaxTokens')?.dirty && form.get('llmMaxTokens')?.invalid\"/>\r\n <label for=\"llmMaxTokens\">{{ this.model().getUiNameForProperty('llmMaxTokens') }}</label>\r\n </p-floatlabel>\r\n\r\n </div>\r\n </p-fieldset>\r\n\r\n <div class=\"flex justify-end\">\r\n <p-button label=\"Speichern\" type=\"submit\" (onClick)=\"submitForm()\" (keyup.enter)=\"submitForm()\"\r\n [disabled]=\"!form.dirty\"></p-button>\r\n </div>\r\n </form>\r\n }\r\n </ng-template>\r\n <ng-template #footer>\r\n\r\n </ng-template>\r\n</sftech-base-dialog>\r\n" }]
97
- }] });
98
-
99
- class AgentsListComponent extends BaseListComponent {
100
- _repo = inject(AgentService);
101
- _route = 'agents';
102
- _modalComponent = AgentDisplayComponent;
103
- detailModalHeaderText = 'Agent-Details';
104
- iconProvider = IconProvider;
105
- constructor() {
106
- super();
107
- }
108
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AgentsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: AgentsListComponent, isStandalone: true, selector: "sftech-prompts-list", providers: [DialogService], usesInheritance: true, ngImport: i0, template: "<h1 class=\"text-primary-900 font-bold text-xl p-2 my-4\">Agent-\u00DCbersicht</h1>\r\n\r\n@if (!data()) {\r\n <p-panel [toggleable]=\"false\">\r\n <p class=\"m-0\">\r\n Daten werden geladen...\r\n </p>\r\n </p-panel>\r\n} @else if (data()!.length === 0) {\r\n <p-panel [toggleable]=\"false\">\r\n <p class=\"m-0\">\r\n Es sind keine Prompts vorhanden.\r\n </p>\r\n </p-panel>\r\n} @else if (data()!.length > 0) {\r\n <p-table [value]=\"data()!\"\r\n stripedRows\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n selectionMode=\"single\"\r\n [resizableColumns]=\"true\"\r\n dataKey=\"id\"\r\n >\r\n <ng-template #header>\r\n <tr>\r\n @for(column of data()![0].propertiesToShow; track column) {\r\n <th>{{ data()![0].getUiNameForProperty(column) }}</th>\r\n }\r\n </tr>\r\n </ng-template>\r\n <ng-template #body let-prompt>\r\n <tr (click)=\"openDisplay(prompt.id)\" [pSelectableRow]=\"prompt\">\r\n @for(column of data()![0].propertiesToShow; track column) {\r\n <td style=\"white-space: pre-wrap\">\r\n {{ prompt.getPropertyValue(column) }}\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <sftech-paginator [pagination]=\"odata().pagination\" (odataChanged)=\"updatePagination($event)\"></sftech-paginator>\r\n}\r\n\r\n", styles: [""], dependencies: [{ kind: "component", type: PaginatorComponent, selector: "sftech-paginator", inputs: ["pagination"], outputs: ["odataChanged"] }, { kind: "component", type: Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$1.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }] });
110
- }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AgentsListComponent, decorators: [{
112
- type: Component,
113
- args: [{ selector: 'sftech-prompts-list', imports: [PaginatorComponent, Panel, TableModule], providers: [DialogService], template: "<h1 class=\"text-primary-900 font-bold text-xl p-2 my-4\">Agent-\u00DCbersicht</h1>\r\n\r\n@if (!data()) {\r\n <p-panel [toggleable]=\"false\">\r\n <p class=\"m-0\">\r\n Daten werden geladen...\r\n </p>\r\n </p-panel>\r\n} @else if (data()!.length === 0) {\r\n <p-panel [toggleable]=\"false\">\r\n <p class=\"m-0\">\r\n Es sind keine Prompts vorhanden.\r\n </p>\r\n </p-panel>\r\n} @else if (data()!.length > 0) {\r\n <p-table [value]=\"data()!\"\r\n stripedRows\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n selectionMode=\"single\"\r\n [resizableColumns]=\"true\"\r\n dataKey=\"id\"\r\n >\r\n <ng-template #header>\r\n <tr>\r\n @for(column of data()![0].propertiesToShow; track column) {\r\n <th>{{ data()![0].getUiNameForProperty(column) }}</th>\r\n }\r\n </tr>\r\n </ng-template>\r\n <ng-template #body let-prompt>\r\n <tr (click)=\"openDisplay(prompt.id)\" [pSelectableRow]=\"prompt\">\r\n @for(column of data()![0].propertiesToShow; track column) {\r\n <td style=\"white-space: pre-wrap\">\r\n {{ prompt.getPropertyValue(column) }}\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <sftech-paginator [pagination]=\"odata().pagination\" (odataChanged)=\"updatePagination($event)\"></sftech-paginator>\r\n}\r\n\r\n" }]
114
- }], ctorParameters: () => [] });
115
-
116
- const agentsRoutes = [
117
- {
118
- path: '',
119
- component: AgentsComponent,
120
- children: [
121
- {
122
- path: '',
123
- component: AgentsListComponent,
124
- },
125
- ],
126
- },
127
- ];
128
-
129
- export { agentsRoutes };
130
- //# sourceMappingURL=sftech-ng-orchestrator-agents.routes-DB9PYB14.mjs.map