@memberjunction/ng-core-entity-forms 2.43.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.d.ts +94 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.js +814 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +198 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +1863 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -0
- package/dist/lib/custom/Actions/actions-top-area-extended.js +2 -2
- package/dist/lib/custom/Entities/entities-form.component.js +2 -2
- package/dist/lib/custom/EntityActions/entityaction.form.component.js +2 -2
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts +48 -0
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Templates/template-param-dialog.component.js +689 -0
- package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -0
- package/dist/lib/custom/Templates/templates-form.component.d.ts +88 -0
- package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Templates/templates-form.component.js +767 -0
- package/dist/lib/custom/Templates/templates-form.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +22 -14
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +63 -10
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/AIAction/aiaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgent/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentAction/aiagentaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentLearningCycle/aiagentlearningcycle.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentLearningCycle/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentModel/aiagentmodel.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentModel/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNote/aiagentnote.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNote/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNoteType/aiagentnotetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNoteType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentPrompt/aiagentprompt.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentPrompt/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentRequest/aiagentrequest.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentRequest/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfiguration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfigurationParam/aiconfigurationparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfigurationParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModel/aimodel.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModel/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelAction/aimodelaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelVendor/aimodelvendor.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelVendor/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPrompt/aiprompt.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPrompt/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptCategory/aipromptcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptModel/aipromptmodel.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptModel/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptRun/aipromptrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptType/aiprompttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIResultCache/airesultcache.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIResultCache/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendor/aivendor.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendor/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorType/aivendortype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorTypeDefinition/aivendortypedefinition.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorTypeDefinition/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Action/action.form.component.js +2 -2
- package/dist/lib/generated/Entities/Action/sections/code.component.js +2 -2
- package/dist/lib/generated/Entities/Action/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Action/sections/top.component.js +2 -2
- package/dist/lib/generated/Entities/ActionAuthorization/actionauthorization.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionAuthorization/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionCategory/actioncategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContext/actioncontext.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContext/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContextType/actioncontexttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContextType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionExecutionLog/actionexecutionlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionExecutionLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionFilter/actionfilter.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionFilter/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionLibrary/actionlibrary.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionLibrary/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionParam/actionparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionResultCode/actionresultcode.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionResultCode/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Application/application.form.component.js +2 -2
- package/dist/lib/generated/Entities/Application/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationEntity/applicationentity.form.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationEntity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationSetting/applicationsetting.form.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationSetting/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ArtifactType/artifacttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ArtifactType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLog/auditlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLogType/auditlogtype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLogType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Authorization/authorization.form.component.js +2 -2
- package/dist/lib/generated/Entities/Authorization/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AuthorizationRole/authorizationrole.form.component.js +2 -2
- package/dist/lib/generated/Entities/AuthorizationRole/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationBaseMessageType/communicationbasemessagetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationBaseMessageType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationLog/communicationlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProvider/communicationprovider.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProvider/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProviderMessageType/communicationprovidermessagetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProviderMessageType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationRun/communicationrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Company/company.form.component.js +2 -2
- package/dist/lib/generated/Entities/Company/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegration/companyintegration.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRecordMap/companyintegrationrecordmap.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRecordMap/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRun/companyintegrationrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunAPILog/companyintegrationrunapilog.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunAPILog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunDetail/companyintegrationrundetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentFileType/contentfiletype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentFileType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItem/contentitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemAttribute/contentitemattribute.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemAttribute/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemTag/contentitemtag.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemTag/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentProcessRun/contentprocessrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentProcessRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSource/contentsource.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSource/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceParam/contentsourceparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceType/contentsourcetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceTypeParam/contentsourcetypeparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceTypeParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentType/contenttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentTypeAttribute/contenttypeattribute.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentTypeAttribute/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Conversation/conversation.form.component.js +2 -2
- package/dist/lib/generated/Entities/Conversation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifact/conversationartifact.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifact/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactPermission/conversationartifactpermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactPermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactVersion/conversationartifactversion.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactVersion/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationDetail/conversationdetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Dashboard/dashboard.form.component.js +2 -2
- package/dist/lib/generated/Entities/Dashboard/sections/details.component.js +5 -5
- package/dist/lib/generated/Entities/DashboardCategory/dashboardcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserPreference/dashboarduserpreference.form.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserPreference/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserState/dashboarduserstate.form.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserState/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DataContext/datacontext.form.component.js +2 -2
- package/dist/lib/generated/Entities/DataContext/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DataContextItem/datacontextitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/DataContextItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Dataset/dataset.form.component.js +2 -2
- package/dist/lib/generated/Entities/Dataset/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DatasetItem/datasetitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/DatasetItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRun/duplicaterun.form.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetail/duplicaterundetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetailMatch/duplicaterundetailmatch.form.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetailMatch/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Employee/employee.form.component.js +2 -2
- package/dist/lib/generated/Entities/Employee/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeCompanyIntegration/employeecompanyintegration.form.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeCompanyIntegration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeRole/employeerole.form.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeRole/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeSkill/employeeskill.form.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeSkill/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/entity.form.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/api.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/audit.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/db.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/top.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/ui.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAIAction/entityaiaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAIAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAction/entityaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionFilter/entityactionfilter.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionFilter/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocation/entityactioninvocation.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocationType/entityactioninvocationtype.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocationType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionParam/entityactionparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationField/entitycommunicationfield.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationField/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationMessageType/entitycommunicationmessagetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationMessageType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocument/entitydocument.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocument/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentRun/entitydocumentrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentSetting/entitydocumentsetting.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentSetting/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentType/entitydocumenttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityField/entityfield.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityField/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityFieldValue/entityfieldvalue.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityFieldValue/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityPermission/entitypermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityPermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRecordDocument/entityrecorddocument.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRecordDocument/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationship/entityrelationship.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationship/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationshipDisplayComponent/entityrelationshipdisplaycomponent.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationshipDisplayComponent/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntitySetting/entitysetting.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntitySetting/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ErrorLog/errorlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/ErrorLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ExplorerNavigationItem/explorernavigationitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/ExplorerNavigationItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/File/file.form.component.js +2 -2
- package/dist/lib/generated/Entities/File/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/FileCategory/filecategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/FileCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/FileEntityRecordLink/fileentityrecordlink.form.component.js +2 -2
- package/dist/lib/generated/Entities/FileEntityRecordLink/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/FileStorageProvider/filestorageprovider.form.component.js +2 -2
- package/dist/lib/generated/Entities/FileStorageProvider/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCode/generatedcode.form.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCode/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCodeCategory/generatedcodecategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCodeCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Integration/integration.form.component.js +2 -2
- package/dist/lib/generated/Entities/Integration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/IntegrationURLFormat/integrationurlformat.form.component.js +2 -2
- package/dist/lib/generated/Entities/IntegrationURLFormat/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Library/library.form.component.js +2 -2
- package/dist/lib/generated/Entities/Library/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/LibraryItem/libraryitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/LibraryItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/List/list.form.component.js +2 -2
- package/dist/lib/generated/Entities/List/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ListCategory/listcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/ListCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ListDetail/listdetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/ListDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/OutputDeliveryType/outputdeliverytype.form.component.js +2 -2
- package/dist/lib/generated/Entities/OutputDeliveryType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/OutputFormatType/outputformattype.form.component.js +2 -2
- package/dist/lib/generated/Entities/OutputFormatType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/OutputTriggerType/outputtriggertype.form.component.js +2 -2
- package/dist/lib/generated/Entities/OutputTriggerType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Query/query.form.component.js +2 -2
- package/dist/lib/generated/Entities/Query/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryCategory/querycategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryEntity/queryentity.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryField/queryfield.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryField/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryPermission/querypermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryPermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Queue/queue.form.component.js +2 -2
- package/dist/lib/generated/Entities/Queue/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueueTask/queuetask.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueueTask/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueueType/queuetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueueType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Recommendation/recommendation.form.component.js +2 -2
- package/dist/lib/generated/Entities/Recommendation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationItem/recommendationitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationProvider/recommendationprovider.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationProvider/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationRun/recommendationrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChange/recordchange.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChange/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChangeReplayRun/recordchangereplayrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChangeReplayRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeDeletionLog/recordmergedeletionlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeDeletionLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeLog/recordmergelog.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Report/report.form.component.js +2 -2
- package/dist/lib/generated/Entities/Report/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportCategory/reportcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportSnapshot/reportsnapshot.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportSnapshot/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportUserState/reportuserstate.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportUserState/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportVersion/reportversion.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportVersion/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceLink/resourcelink.form.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceLink/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ResourcePermission/resourcepermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/ResourcePermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceType/resourcetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Role/role.form.component.js +2 -2
- package/dist/lib/generated/Entities/Role/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RowLevelSecurityFilter/rowlevelsecurityfilter.form.component.js +2 -2
- package/dist/lib/generated/Entities/RowLevelSecurityFilter/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledAction/scheduledaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledActionParam/scheduledactionparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledActionParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/SchemaInfo/schemainfo.form.component.js +2 -2
- package/dist/lib/generated/Entities/SchemaInfo/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Skill/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Skill/skill.form.component.js +2 -2
- package/dist/lib/generated/Entities/Tag/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Tag/tag.form.component.js +2 -2
- package/dist/lib/generated/Entities/TaggedItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TaggedItem/taggeditem.form.component.js +2 -2
- package/dist/lib/generated/Entities/Template/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Template/template.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateCategory/templatecategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContent/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContent/templatecontent.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContentType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContentType/templatecontenttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateParam/templateparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/User/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/User/user.form.component.js +9 -9
- package/dist/lib/generated/Entities/User/user.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/UserApplication/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserApplication/userapplication.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserApplicationEntity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserApplicationEntity/userapplicationentity.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserFavorite/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserFavorite/userfavorite.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserNotification/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserNotification/usernotification.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserRecordLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserRecordLog/userrecordlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserRole/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserRole/userrole.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserView/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserView/userview.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewCategory/userviewcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRun/userviewrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRunDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRunDetail/userviewrundetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/VectorDatabase/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/VectorDatabase/vectordatabase.form.component.js +2 -2
- package/dist/lib/generated/Entities/VectorIndex/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/VectorIndex/vectorindex.form.component.js +2 -2
- package/dist/lib/generated/Entities/VersionInstallation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/VersionInstallation/versioninstallation.form.component.js +2 -2
- package/dist/lib/generated/Entities/Workflow/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Workflow/workflow.form.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowEngine/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowEngine/workflowengine.form.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowRun/workflowrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/Workspace/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Workspace/workspace.form.component.js +2 -2
- package/dist/lib/generated/Entities/WorkspaceItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/WorkspaceItem/workspaceitem.form.component.js +2 -2
- package/dist/lib/shared/components/template-editor.component.d.ts +67 -0
- package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -0
- package/dist/lib/shared/components/template-editor.component.js +698 -0
- package/dist/lib/shared/components/template-editor.component.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,1863 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
import { Component, ViewChild } from '@angular/core';
|
|
17
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
18
|
+
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
19
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
20
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
21
|
+
import { AIPromptFormComponent } from '../../generated/Entities/AIPrompt/aiprompt.form.component';
|
|
22
|
+
import * as i0 from "@angular/core";
|
|
23
|
+
import * as i1 from "@angular/common";
|
|
24
|
+
import * as i2 from "@angular/forms";
|
|
25
|
+
import * as i3 from "@progress/kendo-angular-layout";
|
|
26
|
+
import * as i4 from "@progress/kendo-angular-inputs";
|
|
27
|
+
import * as i5 from "@progress/kendo-angular-dropdowns";
|
|
28
|
+
import * as i6 from "@progress/kendo-angular-buttons";
|
|
29
|
+
import * as i7 from "@memberjunction/ng-user-view-grid";
|
|
30
|
+
import * as i8 from "@memberjunction/ng-base-forms";
|
|
31
|
+
import * as i9 from "@memberjunction/ng-form-toolbar";
|
|
32
|
+
import * as i10 from "@memberjunction/ng-container-directives";
|
|
33
|
+
import * as i11 from "@memberjunction/ng-code-editor";
|
|
34
|
+
import * as i12 from "../../shared/components/template-editor.component";
|
|
35
|
+
import * as i13 from "./ai-prompt-execution-dialog.component";
|
|
36
|
+
const _c0 = ["templateEditor"];
|
|
37
|
+
const _forTrack0 = ($index, $item) => $item.ID || $index;
|
|
38
|
+
const _c1 = () => ({ text: "Active", value: "Active" });
|
|
39
|
+
const _c2 = () => ({ text: "Pending", value: "Pending" });
|
|
40
|
+
const _c3 = () => ({ text: "Disabled", value: "Disabled" });
|
|
41
|
+
const _c4 = (a0, a1, a2) => [a0, a1, a2];
|
|
42
|
+
const _c5 = () => ({ text: "None", value: "None" });
|
|
43
|
+
const _c6 = () => ({ text: "Static Count", value: "StaticCount" });
|
|
44
|
+
const _c7 = () => ({ text: "Config Param", value: "ConfigParam" });
|
|
45
|
+
function AIPromptFormComponentExtended_form_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
47
|
+
i0.ɵɵelementStart(0, "kendo-textbox", 49);
|
|
48
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_9_Template_kendo_textbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Name, $event) || (ctx_r1.record.Name = $event); return i0.ɵɵresetView($event); });
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
52
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.Name);
|
|
53
|
+
} }
|
|
54
|
+
function AIPromptFormComponentExtended_form_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
+
i0.ɵɵelementStart(0, "h4", 50);
|
|
56
|
+
i0.ɵɵtext(1);
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
i0.ɵɵelementStart(2, "span", 51);
|
|
59
|
+
i0.ɵɵtext(3);
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
} if (rf & 2) {
|
|
62
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
63
|
+
i0.ɵɵadvance();
|
|
64
|
+
i0.ɵɵtextInterpolate(ctx_r1.record.Name || "Untitled AI Prompt");
|
|
65
|
+
i0.ɵɵadvance();
|
|
66
|
+
i0.ɵɵstyleProp("background-color", ctx_r1.getStatusBadgeColor());
|
|
67
|
+
i0.ɵɵadvance();
|
|
68
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.record.Status, " ");
|
|
69
|
+
} }
|
|
70
|
+
function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
i0.ɵɵelementStart(0, "div", 54);
|
|
72
|
+
i0.ɵɵelement(1, "i", 56);
|
|
73
|
+
i0.ɵɵtext(2, " Loading types... ");
|
|
74
|
+
i0.ɵɵelementEnd();
|
|
75
|
+
} }
|
|
76
|
+
function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
77
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
78
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 57);
|
|
79
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.TypeID, $event) || (ctx_r1.record.TypeID = $event); return i0.ɵɵresetView($event); });
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
} if (rf & 2) {
|
|
82
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
83
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.TypeID);
|
|
84
|
+
i0.ɵɵproperty("data", ctx_r1.availablePromptTypes)("valuePrimitive", true)("filterable", true);
|
|
85
|
+
} }
|
|
86
|
+
function AIPromptFormComponentExtended_form_1_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
87
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
88
|
+
i0.ɵɵelementStart(0, "div", 14)(1, "div")(2, "label", 47);
|
|
89
|
+
i0.ɵɵtext(3, "Status");
|
|
90
|
+
i0.ɵɵelementEnd();
|
|
91
|
+
i0.ɵɵelementStart(4, "kendo-dropdownlist", 52);
|
|
92
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_11_Template_kendo_dropdownlist_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Status, $event) || (ctx_r1.record.Status = $event); return i0.ɵɵresetView($event); });
|
|
93
|
+
i0.ɵɵelementEnd()();
|
|
94
|
+
i0.ɵɵelementStart(5, "div")(6, "label", 47);
|
|
95
|
+
i0.ɵɵtext(7, " Type ");
|
|
96
|
+
i0.ɵɵelementStart(8, "span", 53);
|
|
97
|
+
i0.ɵɵtext(9, "*");
|
|
98
|
+
i0.ɵɵelementEnd()();
|
|
99
|
+
i0.ɵɵtemplate(10, AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_10_Template, 3, 0, "div", 54)(11, AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Template, 1, 4, "kendo-dropdownlist", 55);
|
|
100
|
+
i0.ɵɵelementEnd()();
|
|
101
|
+
} if (rf & 2) {
|
|
102
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
103
|
+
i0.ɵɵadvance(4);
|
|
104
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.Status);
|
|
105
|
+
i0.ɵɵproperty("data", i0.ɵɵpureFunction3(7, _c4, i0.ɵɵpureFunction0(4, _c1), i0.ɵɵpureFunction0(5, _c2), i0.ɵɵpureFunction0(6, _c3)))("valuePrimitive", true);
|
|
106
|
+
i0.ɵɵadvance(6);
|
|
107
|
+
i0.ɵɵconditional(ctx_r1.isLoadingPromptTypes ? 10 : 11);
|
|
108
|
+
} }
|
|
109
|
+
function AIPromptFormComponentExtended_form_1_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
110
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
111
|
+
i0.ɵɵelementStart(0, "kendo-textarea", 58);
|
|
112
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_12_Template_kendo_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Description, $event) || (ctx_r1.record.Description = $event); return i0.ɵɵresetView($event); });
|
|
113
|
+
i0.ɵɵelementEnd();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
116
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.Description);
|
|
117
|
+
i0.ɵɵproperty("rows", 2);
|
|
118
|
+
} }
|
|
119
|
+
function AIPromptFormComponentExtended_form_1_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
i0.ɵɵelementStart(0, "p", 16);
|
|
121
|
+
i0.ɵɵtext(1);
|
|
122
|
+
i0.ɵɵelementEnd();
|
|
123
|
+
} if (rf & 2) {
|
|
124
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
125
|
+
i0.ɵɵadvance();
|
|
126
|
+
i0.ɵɵtextInterpolate(ctx_r1.record.Description);
|
|
127
|
+
} }
|
|
128
|
+
function AIPromptFormComponentExtended_form_1_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
129
|
+
i0.ɵɵelementStart(0, "div", 18);
|
|
130
|
+
i0.ɵɵelement(1, "i", 59);
|
|
131
|
+
i0.ɵɵelementStart(2, "span", 20);
|
|
132
|
+
i0.ɵɵtext(3, "Type:");
|
|
133
|
+
i0.ɵɵelementEnd();
|
|
134
|
+
i0.ɵɵelementStart(4, "span", 21);
|
|
135
|
+
i0.ɵɵtext(5);
|
|
136
|
+
i0.ɵɵelementEnd()();
|
|
137
|
+
} if (rf & 2) {
|
|
138
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
139
|
+
i0.ɵɵadvance(5);
|
|
140
|
+
i0.ɵɵtextInterpolate(ctx_r1.getPromptTypeDisplayName(ctx_r1.record.TypeID));
|
|
141
|
+
} }
|
|
142
|
+
function AIPromptFormComponentExtended_form_1_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
143
|
+
i0.ɵɵelementStart(0, "div", 18);
|
|
144
|
+
i0.ɵɵelement(1, "i", 60);
|
|
145
|
+
i0.ɵɵelementStart(2, "span", 61);
|
|
146
|
+
i0.ɵɵtext(3, "Caching Enabled");
|
|
147
|
+
i0.ɵɵelementEnd()();
|
|
148
|
+
} }
|
|
149
|
+
function AIPromptFormComponentExtended_form_1_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
150
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
151
|
+
i0.ɵɵelementStart(0, "kendo-button", 62);
|
|
152
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_31_Template_kendo_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.executeAIPrompt()); });
|
|
153
|
+
i0.ɵɵelement(1, "i", 63);
|
|
154
|
+
i0.ɵɵtext(2, " Execute Prompt ");
|
|
155
|
+
i0.ɵɵelementEnd();
|
|
156
|
+
} }
|
|
157
|
+
function AIPromptFormComponentExtended_form_1_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
158
|
+
i0.ɵɵelementStart(0, "kendo-button", 27);
|
|
159
|
+
i0.ɵɵelement(1, "i", 64);
|
|
160
|
+
i0.ɵɵtext(2, " Cannot Execute ");
|
|
161
|
+
i0.ɵɵelementEnd();
|
|
162
|
+
} if (rf & 2) {
|
|
163
|
+
i0.ɵɵproperty("disabled", true);
|
|
164
|
+
} }
|
|
165
|
+
function AIPromptFormComponentExtended_form_1_Conditional_33_Template(rf, ctx) { if (rf & 1) {
|
|
166
|
+
i0.ɵɵelementStart(0, "kendo-button", 28);
|
|
167
|
+
i0.ɵɵelement(1, "i", 65);
|
|
168
|
+
i0.ɵɵtext(2, " History ");
|
|
169
|
+
i0.ɵɵelementEnd();
|
|
170
|
+
} }
|
|
171
|
+
function AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
172
|
+
i0.ɵɵtext(0, " \u2022 Prompt must be Active");
|
|
173
|
+
i0.ɵɵelement(1, "br");
|
|
174
|
+
} }
|
|
175
|
+
function AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
176
|
+
i0.ɵɵtext(0, " \u2022 Template is required");
|
|
177
|
+
i0.ɵɵelement(1, "br");
|
|
178
|
+
} }
|
|
179
|
+
function AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
180
|
+
i0.ɵɵtext(0, " \u2022 Template not found");
|
|
181
|
+
i0.ɵɵelement(1, "br");
|
|
182
|
+
} }
|
|
183
|
+
function AIPromptFormComponentExtended_form_1_Conditional_34_Template(rf, ctx) { if (rf & 1) {
|
|
184
|
+
i0.ɵɵelementStart(0, "div", 29);
|
|
185
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_1_Template, 2, 0, "br")(2, AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_2_Template, 2, 0, "br")(3, AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_3_Template, 2, 0, "br");
|
|
186
|
+
i0.ɵɵelementEnd();
|
|
187
|
+
} if (rf & 2) {
|
|
188
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
189
|
+
i0.ɵɵadvance();
|
|
190
|
+
i0.ɵɵconditional(ctx_r1.record.Status !== "Active" ? 1 : -1);
|
|
191
|
+
i0.ɵɵadvance();
|
|
192
|
+
i0.ɵɵconditional(!ctx_r1.record.TemplateID ? 2 : -1);
|
|
193
|
+
i0.ɵɵadvance();
|
|
194
|
+
i0.ɵɵconditional(!ctx_r1.template && ctx_r1.record.TemplateID ? 3 : -1);
|
|
195
|
+
} }
|
|
196
|
+
function AIPromptFormComponentExtended_form_1_ng_template_37_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
197
|
+
i0.ɵɵelementStart(0, "span", 67);
|
|
198
|
+
i0.ɵɵtext(1);
|
|
199
|
+
i0.ɵɵelementEnd();
|
|
200
|
+
} if (rf & 2) {
|
|
201
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
202
|
+
i0.ɵɵadvance();
|
|
203
|
+
i0.ɵɵtextInterpolate1("\u2022 ", ctx_r1.template.Name, "");
|
|
204
|
+
} }
|
|
205
|
+
function AIPromptFormComponentExtended_form_1_ng_template_37_Template(rf, ctx) { if (rf & 1) {
|
|
206
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
207
|
+
i0.ɵɵelement(1, "i", 22);
|
|
208
|
+
i0.ɵɵtext(2, " Template Editor ");
|
|
209
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_ng_template_37_Conditional_3_Template, 2, 1, "span", 67);
|
|
210
|
+
i0.ɵɵelementEnd();
|
|
211
|
+
} if (rf & 2) {
|
|
212
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
213
|
+
i0.ɵɵadvance(3);
|
|
214
|
+
i0.ɵɵconditional(ctx_r1.template ? 3 : -1);
|
|
215
|
+
} }
|
|
216
|
+
function AIPromptFormComponentExtended_form_1_Conditional_39_Template(rf, ctx) { if (rf & 1) {
|
|
217
|
+
i0.ɵɵelementStart(0, "div", 34);
|
|
218
|
+
i0.ɵɵelement(1, "i", 68);
|
|
219
|
+
i0.ɵɵtext(2, " Loading template... ");
|
|
220
|
+
i0.ɵɵelementEnd();
|
|
221
|
+
} }
|
|
222
|
+
function AIPromptFormComponentExtended_form_1_Conditional_40_Template(rf, ctx) { if (rf & 1) {
|
|
223
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
224
|
+
i0.ɵɵelementStart(0, "div", 35);
|
|
225
|
+
i0.ɵɵelement(1, "i", 69);
|
|
226
|
+
i0.ɵɵelementStart(2, "h5", 70);
|
|
227
|
+
i0.ɵɵtext(3, "No Template Associated");
|
|
228
|
+
i0.ɵɵelementEnd();
|
|
229
|
+
i0.ɵɵelementStart(4, "p", 71);
|
|
230
|
+
i0.ɵɵtext(5, " This AI prompt needs a template to define its structure and parameters. Create a new template or link to an existing one. ");
|
|
231
|
+
i0.ɵɵelementEnd();
|
|
232
|
+
i0.ɵɵelementStart(6, "div", 72)(7, "kendo-button", 73);
|
|
233
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_40_Template_kendo_button_click_7_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.createNewTemplate()); });
|
|
234
|
+
i0.ɵɵelement(8, "i", 74);
|
|
235
|
+
i0.ɵɵtext(9, " Create New Template ");
|
|
236
|
+
i0.ɵɵelementEnd();
|
|
237
|
+
i0.ɵɵelementStart(10, "kendo-button", 75);
|
|
238
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_40_Template_kendo_button_click_10_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.linkExistingTemplate()); });
|
|
239
|
+
i0.ɵɵelement(11, "i", 76);
|
|
240
|
+
i0.ɵɵtext(12, " Link Existing Template ");
|
|
241
|
+
i0.ɵɵelementEnd()()();
|
|
242
|
+
} }
|
|
243
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
244
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
245
|
+
i0.ɵɵelementStart(0, "div", 36);
|
|
246
|
+
i0.ɵɵelement(1, "i", 77);
|
|
247
|
+
i0.ɵɵelementStart(2, "h5", 78);
|
|
248
|
+
i0.ɵɵtext(3, "Template Not Found");
|
|
249
|
+
i0.ɵɵelementEnd();
|
|
250
|
+
i0.ɵɵelementStart(4, "p", 71);
|
|
251
|
+
i0.ɵɵtext(5, " The referenced template could not be loaded. It may have been deleted or moved. ");
|
|
252
|
+
i0.ɵɵelementEnd();
|
|
253
|
+
i0.ɵɵelementStart(6, "div", 72)(7, "kendo-button", 75);
|
|
254
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Template_kendo_button_click_7_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.loadTemplate()); });
|
|
255
|
+
i0.ɵɵelement(8, "i", 79);
|
|
256
|
+
i0.ɵɵtext(9, " Retry Loading ");
|
|
257
|
+
i0.ɵɵelementEnd();
|
|
258
|
+
i0.ɵɵelementStart(10, "kendo-button", 73);
|
|
259
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Template_kendo_button_click_10_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.createNewTemplate()); });
|
|
260
|
+
i0.ɵɵelement(11, "i", 74);
|
|
261
|
+
i0.ɵɵtext(12, " Create New Template ");
|
|
262
|
+
i0.ɵɵelementEnd()()();
|
|
263
|
+
} }
|
|
264
|
+
function AIPromptFormComponentExtended_form_1_Conditional_42_Template(rf, ctx) { if (rf & 1) {
|
|
265
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
266
|
+
i0.ɵɵelementStart(0, "div", 37)(1, "div", 80)(2, "mj-template-editor", 81, 1);
|
|
267
|
+
i0.ɵɵlistener("contentChange", function AIPromptFormComponentExtended_form_1_Conditional_42_Template_mj_template_editor_contentChange_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTemplateContentChange($event)); })("runTemplate", function AIPromptFormComponentExtended_form_1_Conditional_42_Template_mj_template_editor_runTemplate_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTemplateRun($event)); });
|
|
268
|
+
i0.ɵɵelementEnd()()();
|
|
269
|
+
} if (rf & 2) {
|
|
270
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
271
|
+
i0.ɵɵadvance(2);
|
|
272
|
+
i0.ɵɵproperty("template", ctx_r1.template)("config", ctx_r1.templateEditorConfig);
|
|
273
|
+
} }
|
|
274
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
275
|
+
i0.ɵɵelementStart(0, "span", 85);
|
|
276
|
+
i0.ɵɵtext(1);
|
|
277
|
+
i0.ɵɵelementEnd();
|
|
278
|
+
} if (rf & 2) {
|
|
279
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
280
|
+
i0.ɵɵadvance();
|
|
281
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.promptModels.length, " ");
|
|
282
|
+
} }
|
|
283
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
284
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
285
|
+
i0.ɵɵelement(1, "i", 84);
|
|
286
|
+
i0.ɵɵtext(2, " Models ");
|
|
287
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_43_ng_template_1_Conditional_3_Template, 2, 1, "span", 85);
|
|
288
|
+
i0.ɵɵelementEnd();
|
|
289
|
+
} if (rf & 2) {
|
|
290
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
291
|
+
i0.ɵɵadvance(3);
|
|
292
|
+
i0.ɵɵconditional(ctx_r1.promptModels.length > 0 ? 3 : -1);
|
|
293
|
+
} }
|
|
294
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
295
|
+
i0.ɵɵelementStart(0, "div", 83);
|
|
296
|
+
i0.ɵɵelement(1, "i", 56);
|
|
297
|
+
i0.ɵɵtext(2, " Loading models... ");
|
|
298
|
+
i0.ɵɵelementEnd();
|
|
299
|
+
} }
|
|
300
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
301
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
302
|
+
i0.ɵɵelementStart(0, "div", 88)(1, "kendo-button", 89);
|
|
303
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_0_Conditional_3_Template_kendo_button_click_1_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNewModel()); });
|
|
304
|
+
i0.ɵɵelement(2, "i", 74);
|
|
305
|
+
i0.ɵɵtext(3, " Add Model ");
|
|
306
|
+
i0.ɵɵelementEnd()();
|
|
307
|
+
} }
|
|
308
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
309
|
+
i0.ɵɵelementStart(0, "div", 86);
|
|
310
|
+
i0.ɵɵelement(1, "i", 87);
|
|
311
|
+
i0.ɵɵtext(2, " No models configured ");
|
|
312
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_0_Conditional_3_Template, 4, 0, "div", 88);
|
|
313
|
+
i0.ɵɵelementEnd();
|
|
314
|
+
} if (rf & 2) {
|
|
315
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
316
|
+
i0.ɵɵadvance(3);
|
|
317
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : -1);
|
|
318
|
+
} }
|
|
319
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
320
|
+
i0.ɵɵelement(0, "i", 94);
|
|
321
|
+
} }
|
|
322
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
323
|
+
i0.ɵɵelementStart(0, "span", 95);
|
|
324
|
+
i0.ɵɵtext(1);
|
|
325
|
+
i0.ɵɵelementEnd();
|
|
326
|
+
} if (rf & 2) {
|
|
327
|
+
const ɵ$index_278_r11 = i0.ɵɵnextContext().$index;
|
|
328
|
+
i0.ɵɵadvance();
|
|
329
|
+
i0.ɵɵtextInterpolate(ɵ$index_278_r11 + 1);
|
|
330
|
+
} }
|
|
331
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
332
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
333
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 106);
|
|
334
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_5_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const model_r13 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(model_r13.ModelID, $event) || (model_r13.ModelID = $event); return i0.ɵɵresetView($event); });
|
|
335
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_5_Template_kendo_dropdownlist_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const ɵ$index_278_r11 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onModelChange($event, ɵ$index_278_r11)); });
|
|
336
|
+
i0.ɵɵelementEnd();
|
|
337
|
+
} if (rf & 2) {
|
|
338
|
+
const ctx_r13 = i0.ɵɵnextContext();
|
|
339
|
+
const model_r13 = ctx_r13.$implicit;
|
|
340
|
+
const ɵ$index_278_r11 = ctx_r13.$index;
|
|
341
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
342
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r13.ModelID);
|
|
343
|
+
i0.ɵɵproperty("name", "modelId_" + ɵ$index_278_r11)("data", ctx_r1.availableModels)("valuePrimitive", true)("filterable", true);
|
|
344
|
+
} }
|
|
345
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
346
|
+
i0.ɵɵelementStart(0, "span", 23);
|
|
347
|
+
i0.ɵɵtext(1);
|
|
348
|
+
i0.ɵɵelementEnd();
|
|
349
|
+
} if (rf & 2) {
|
|
350
|
+
const model_r13 = i0.ɵɵnextContext().$implicit;
|
|
351
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
352
|
+
i0.ɵɵadvance();
|
|
353
|
+
i0.ɵɵtextInterpolate(ctx_r1.getModelDisplayName(model_r13.ModelID));
|
|
354
|
+
} }
|
|
355
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
356
|
+
i0.ɵɵelementStart(0, "span", 111);
|
|
357
|
+
i0.ɵɵtext(1);
|
|
358
|
+
i0.ɵɵelementEnd();
|
|
359
|
+
} if (rf & 2) {
|
|
360
|
+
const dataItem_r16 = i0.ɵɵnextContext().$implicit;
|
|
361
|
+
const model_r13 = i0.ɵɵnextContext(4).$implicit;
|
|
362
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
363
|
+
i0.ɵɵadvance();
|
|
364
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r13.ModelID, dataItem_r16.ID), ")");
|
|
365
|
+
} }
|
|
366
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
367
|
+
i0.ɵɵelementStart(0, "span");
|
|
368
|
+
i0.ɵɵtext(1);
|
|
369
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Conditional_2_Template, 2, 1, "span", 111);
|
|
370
|
+
i0.ɵɵelementEnd();
|
|
371
|
+
} if (rf & 2) {
|
|
372
|
+
const dataItem_r16 = ctx.$implicit;
|
|
373
|
+
const model_r13 = i0.ɵɵnextContext(4).$implicit;
|
|
374
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
375
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r13.ModelID, dataItem_r16.ID));
|
|
376
|
+
i0.ɵɵadvance();
|
|
377
|
+
i0.ɵɵtextInterpolate1(" ", dataItem_r16.Name, " ");
|
|
378
|
+
i0.ɵɵadvance();
|
|
379
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r13.ModelID, dataItem_r16.ID) !== "Active" ? 2 : -1);
|
|
380
|
+
} }
|
|
381
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
382
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
383
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 109);
|
|
384
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r15); const model_r13 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r13.VendorID, $event) || (model_r13.VendorID = $event); return i0.ɵɵresetView($event); });
|
|
385
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Template, 3, 4, "ng-template", 110);
|
|
386
|
+
i0.ɵɵelementEnd();
|
|
387
|
+
} if (rf & 2) {
|
|
388
|
+
const ctx_r13 = i0.ɵɵnextContext(3);
|
|
389
|
+
const model_r13 = ctx_r13.$implicit;
|
|
390
|
+
const ɵ$index_278_r11 = ctx_r13.$index;
|
|
391
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
392
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r13.VendorID);
|
|
393
|
+
i0.ɵɵproperty("name", "vendorId_" + ɵ$index_278_r11)("data", ctx_r1.getVendorsForModelSync(model_r13.ModelID))("valuePrimitive", true)("filterable", true);
|
|
394
|
+
} }
|
|
395
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
396
|
+
i0.ɵɵelementStart(0, "span", 111);
|
|
397
|
+
i0.ɵɵtext(1);
|
|
398
|
+
i0.ɵɵelementEnd();
|
|
399
|
+
} if (rf & 2) {
|
|
400
|
+
const model_r13 = i0.ɵɵnextContext(5).$implicit;
|
|
401
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
402
|
+
i0.ɵɵadvance();
|
|
403
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r13.ModelID, ctx_r1.getVendorsForModelSync(model_r13.ModelID)[0].ID), ")");
|
|
404
|
+
} }
|
|
405
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
406
|
+
i0.ɵɵelementStart(0, "span", 113);
|
|
407
|
+
i0.ɵɵtext(1);
|
|
408
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Conditional_2_Template, 2, 1, "span", 111);
|
|
409
|
+
i0.ɵɵelementEnd();
|
|
410
|
+
} if (rf & 2) {
|
|
411
|
+
const model_r13 = i0.ɵɵnextContext(4).$implicit;
|
|
412
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
413
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r13.ModelID, ctx_r1.getVendorsForModelSync(model_r13.ModelID)[0].ID));
|
|
414
|
+
i0.ɵɵadvance();
|
|
415
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorsForModelSync(model_r13.ModelID)[0].Name, " ");
|
|
416
|
+
i0.ɵɵadvance();
|
|
417
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r13.ModelID, ctx_r1.getVendorsForModelSync(model_r13.ModelID)[0].ID) !== "Active" ? 2 : -1);
|
|
418
|
+
} }
|
|
419
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
420
|
+
i0.ɵɵelementStart(0, "span", 107);
|
|
421
|
+
i0.ɵɵtext(1, "No vendors available");
|
|
422
|
+
i0.ɵɵelementEnd();
|
|
423
|
+
} }
|
|
424
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
425
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Template, 3, 4, "span", 112)(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Conditional_1_Template, 2, 0, "span", 107);
|
|
426
|
+
} if (rf & 2) {
|
|
427
|
+
const model_r13 = i0.ɵɵnextContext(3).$implicit;
|
|
428
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
429
|
+
i0.ɵɵconditional(ctx_r1.getVendorsForModelSync(model_r13.ModelID).length === 1 ? 0 : 1);
|
|
430
|
+
} }
|
|
431
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
432
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_0_Template, 2, 5, "kendo-dropdownlist", 108)(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Conditional_1_Template, 2, 1);
|
|
433
|
+
} if (rf & 2) {
|
|
434
|
+
const model_r13 = i0.ɵɵnextContext(2).$implicit;
|
|
435
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
436
|
+
i0.ɵɵconditional(ctx_r1.shouldShowVendorDropdown(model_r13.ModelID) ? 0 : 1);
|
|
437
|
+
} }
|
|
438
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
439
|
+
i0.ɵɵelementStart(0, "span", 107);
|
|
440
|
+
i0.ɵɵtext(1, "Select model first");
|
|
441
|
+
i0.ɵɵelementEnd();
|
|
442
|
+
} }
|
|
443
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
444
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_0_Template, 2, 1)(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Conditional_1_Template, 2, 0, "span", 107);
|
|
445
|
+
} if (rf & 2) {
|
|
446
|
+
const model_r13 = i0.ɵɵnextContext().$implicit;
|
|
447
|
+
i0.ɵɵconditional(model_r13.ModelID ? 0 : 1);
|
|
448
|
+
} }
|
|
449
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
450
|
+
i0.ɵɵelementStart(0, "span", 111);
|
|
451
|
+
i0.ɵɵtext(1);
|
|
452
|
+
i0.ɵɵelementEnd();
|
|
453
|
+
} if (rf & 2) {
|
|
454
|
+
const model_r13 = i0.ɵɵnextContext(3).$implicit;
|
|
455
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
456
|
+
i0.ɵɵadvance();
|
|
457
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r13.ModelID, model_r13.VendorID), ")");
|
|
458
|
+
} }
|
|
459
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
460
|
+
i0.ɵɵelementStart(0, "span", 116);
|
|
461
|
+
i0.ɵɵtext(1);
|
|
462
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Conditional_0_Conditional_2_Template, 2, 1, "span", 111);
|
|
463
|
+
i0.ɵɵelementEnd();
|
|
464
|
+
} if (rf & 2) {
|
|
465
|
+
const model_r13 = i0.ɵɵnextContext(2).$implicit;
|
|
466
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
467
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r13.ModelID, model_r13.VendorID));
|
|
468
|
+
i0.ɵɵadvance();
|
|
469
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorDisplayName(model_r13.VendorID), " ");
|
|
470
|
+
i0.ɵɵadvance();
|
|
471
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r13.ModelID, model_r13.VendorID) !== "Active" ? 2 : -1);
|
|
472
|
+
} }
|
|
473
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
474
|
+
i0.ɵɵelementStart(0, "span", 115);
|
|
475
|
+
i0.ɵɵtext(1, "-");
|
|
476
|
+
i0.ɵɵelementEnd();
|
|
477
|
+
} }
|
|
478
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
479
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Conditional_0_Template, 3, 4, "span", 114)(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Conditional_1_Template, 2, 0, "span", 115);
|
|
480
|
+
} if (rf & 2) {
|
|
481
|
+
const model_r13 = i0.ɵɵnextContext().$implicit;
|
|
482
|
+
i0.ɵɵconditional(model_r13.VendorID && model_r13.ModelID ? 0 : 1);
|
|
483
|
+
} }
|
|
484
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
485
|
+
i0.ɵɵelementStart(0, "span", 100);
|
|
486
|
+
i0.ɵɵtext(1);
|
|
487
|
+
i0.ɵɵpipe(2, "date");
|
|
488
|
+
i0.ɵɵelementEnd();
|
|
489
|
+
} if (rf & 2) {
|
|
490
|
+
const model_r13 = i0.ɵɵnextContext().$implicit;
|
|
491
|
+
i0.ɵɵadvance();
|
|
492
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, model_r13.__mj_CreatedAt, "short"));
|
|
493
|
+
} }
|
|
494
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
495
|
+
i0.ɵɵelementStart(0, "span", 101);
|
|
496
|
+
i0.ɵɵtext(1, "New");
|
|
497
|
+
i0.ɵɵelementEnd();
|
|
498
|
+
} }
|
|
499
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
500
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
501
|
+
i0.ɵɵelementStart(0, "div", 117)(1, "kendo-button", 118);
|
|
502
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_14_Template_kendo_button_click_1_listener() { i0.ɵɵrestoreView(_r17); const ɵ$index_278_r11 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.moveModelUp(ɵ$index_278_r11)); });
|
|
503
|
+
i0.ɵɵelement(2, "i", 119);
|
|
504
|
+
i0.ɵɵelementEnd();
|
|
505
|
+
i0.ɵɵelementStart(3, "kendo-button", 120);
|
|
506
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_14_Template_kendo_button_click_3_listener() { i0.ɵɵrestoreView(_r17); const ɵ$index_278_r11 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.moveModelDown(ɵ$index_278_r11)); });
|
|
507
|
+
i0.ɵɵelement(4, "i", 121);
|
|
508
|
+
i0.ɵɵelementEnd()();
|
|
509
|
+
i0.ɵɵelementStart(5, "kendo-button", 122);
|
|
510
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_14_Template_kendo_button_click_5_listener() { i0.ɵɵrestoreView(_r17); const ɵ$index_278_r11 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removePromptModel(ɵ$index_278_r11)); });
|
|
511
|
+
i0.ɵɵelement(6, "i", 123);
|
|
512
|
+
i0.ɵɵelementEnd();
|
|
513
|
+
} if (rf & 2) {
|
|
514
|
+
const ɵ$index_278_r11 = i0.ɵɵnextContext().$index;
|
|
515
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
516
|
+
i0.ɵɵadvance();
|
|
517
|
+
i0.ɵɵproperty("disabled", ɵ$index_278_r11 === 0);
|
|
518
|
+
i0.ɵɵadvance(2);
|
|
519
|
+
i0.ɵɵproperty("disabled", ɵ$index_278_r11 === ctx_r1.promptModels.length - 1);
|
|
520
|
+
} }
|
|
521
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
522
|
+
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
523
|
+
i0.ɵɵtext(2, "Status:");
|
|
524
|
+
i0.ɵɵelementEnd();
|
|
525
|
+
i0.ɵɵtext(3);
|
|
526
|
+
i0.ɵɵelementEnd();
|
|
527
|
+
} if (rf & 2) {
|
|
528
|
+
const model_r13 = i0.ɵɵnextContext().$implicit;
|
|
529
|
+
i0.ɵɵadvance(3);
|
|
530
|
+
i0.ɵɵtextInterpolate1(" ", model_r13.Status, "");
|
|
531
|
+
} }
|
|
532
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
533
|
+
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
534
|
+
i0.ɵɵtext(2, "Configuration:");
|
|
535
|
+
i0.ɵɵelementEnd();
|
|
536
|
+
i0.ɵɵtext(3);
|
|
537
|
+
i0.ɵɵelementEnd();
|
|
538
|
+
} if (rf & 2) {
|
|
539
|
+
const model_r13 = i0.ɵɵnextContext().$implicit;
|
|
540
|
+
i0.ɵɵadvance(3);
|
|
541
|
+
i0.ɵɵtextInterpolate1(" ", model_r13.ConfigurationID, "");
|
|
542
|
+
} }
|
|
543
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
544
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
545
|
+
i0.ɵɵelementStart(0, "div")(1, "label", 128);
|
|
546
|
+
i0.ɵɵtext(2, "Parallel Count");
|
|
547
|
+
i0.ɵɵelementEnd();
|
|
548
|
+
i0.ɵɵelementStart(3, "kendo-numerictextbox", 130);
|
|
549
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Conditional_5_Template_kendo_numerictextbox_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r19); const model_r13 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r13.ParallelCount, $event) || (model_r13.ParallelCount = $event); return i0.ɵɵresetView($event); });
|
|
550
|
+
i0.ɵɵelementEnd()();
|
|
551
|
+
} if (rf & 2) {
|
|
552
|
+
const ctx_r13 = i0.ɵɵnextContext(3);
|
|
553
|
+
const model_r13 = ctx_r13.$implicit;
|
|
554
|
+
const ɵ$index_278_r11 = ctx_r13.$index;
|
|
555
|
+
i0.ɵɵadvance(3);
|
|
556
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r13.ParallelCount);
|
|
557
|
+
i0.ɵɵproperty("name", "parallelCount_" + ɵ$index_278_r11)("min", 1)("step", 1)("format", "n0");
|
|
558
|
+
} }
|
|
559
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
560
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
561
|
+
i0.ɵɵelementStart(0, "div")(1, "label", 128);
|
|
562
|
+
i0.ɵɵtext(2, "Config Parameter");
|
|
563
|
+
i0.ɵɵelementEnd();
|
|
564
|
+
i0.ɵɵelementStart(3, "kendo-textbox", 131);
|
|
565
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Conditional_6_Template_kendo_textbox_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r20); const model_r13 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r13.ParallelConfigParam, $event) || (model_r13.ParallelConfigParam = $event); return i0.ɵɵresetView($event); });
|
|
566
|
+
i0.ɵɵelementEnd()();
|
|
567
|
+
} if (rf & 2) {
|
|
568
|
+
const ctx_r13 = i0.ɵɵnextContext(3);
|
|
569
|
+
const model_r13 = ctx_r13.$implicit;
|
|
570
|
+
const ɵ$index_278_r11 = ctx_r13.$index;
|
|
571
|
+
i0.ɵɵadvance(3);
|
|
572
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r13.ParallelConfigParam);
|
|
573
|
+
i0.ɵɵproperty("name", "parallelConfigParam_" + ɵ$index_278_r11);
|
|
574
|
+
} }
|
|
575
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
576
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
577
|
+
i0.ɵɵelementStart(0, "div", 126)(1, "div")(2, "label", 128);
|
|
578
|
+
i0.ɵɵtext(3, "Parallel Mode");
|
|
579
|
+
i0.ɵɵelementEnd();
|
|
580
|
+
i0.ɵɵelementStart(4, "kendo-dropdownlist", 129);
|
|
581
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Template_kendo_dropdownlist_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r18); const model_r13 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(model_r13.ParallelizationMode, $event) || (model_r13.ParallelizationMode = $event); return i0.ɵɵresetView($event); });
|
|
582
|
+
i0.ɵɵelementEnd()();
|
|
583
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Conditional_5_Template, 4, 5, "div")(6, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Conditional_6_Template, 4, 2, "div");
|
|
584
|
+
i0.ɵɵelementEnd();
|
|
585
|
+
} if (rf & 2) {
|
|
586
|
+
const ctx_r13 = i0.ɵɵnextContext(2);
|
|
587
|
+
const model_r13 = ctx_r13.$implicit;
|
|
588
|
+
const ɵ$index_278_r11 = ctx_r13.$index;
|
|
589
|
+
i0.ɵɵadvance(4);
|
|
590
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r13.ParallelizationMode);
|
|
591
|
+
i0.ɵɵproperty("name", "parallelMode_" + ɵ$index_278_r11)("data", i0.ɵɵpureFunction3(9, _c4, i0.ɵɵpureFunction0(6, _c5), i0.ɵɵpureFunction0(7, _c6), i0.ɵɵpureFunction0(8, _c7)))("valuePrimitive", true);
|
|
592
|
+
i0.ɵɵadvance();
|
|
593
|
+
i0.ɵɵconditional(model_r13.ParallelizationMode === "StaticCount" ? 5 : -1);
|
|
594
|
+
i0.ɵɵadvance();
|
|
595
|
+
i0.ɵɵconditional(model_r13.ParallelizationMode === "ConfigParam" ? 6 : -1);
|
|
596
|
+
} }
|
|
597
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
598
|
+
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
599
|
+
i0.ɵɵtext(2, "Parallel Mode:");
|
|
600
|
+
i0.ɵɵelementEnd();
|
|
601
|
+
i0.ɵɵtext(3);
|
|
602
|
+
i0.ɵɵelementEnd();
|
|
603
|
+
} if (rf & 2) {
|
|
604
|
+
const model_r13 = i0.ɵɵnextContext(3).$implicit;
|
|
605
|
+
i0.ɵɵadvance(3);
|
|
606
|
+
i0.ɵɵtextInterpolate1(" ", model_r13.ParallelizationMode, "");
|
|
607
|
+
} }
|
|
608
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
609
|
+
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
610
|
+
i0.ɵɵtext(2, "Parallel Count:");
|
|
611
|
+
i0.ɵɵelementEnd();
|
|
612
|
+
i0.ɵɵtext(3);
|
|
613
|
+
i0.ɵɵelementEnd();
|
|
614
|
+
} if (rf & 2) {
|
|
615
|
+
const model_r13 = i0.ɵɵnextContext(3).$implicit;
|
|
616
|
+
i0.ɵɵadvance(3);
|
|
617
|
+
i0.ɵɵtextInterpolate1(" ", model_r13.ParallelCount, "");
|
|
618
|
+
} }
|
|
619
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
620
|
+
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
621
|
+
i0.ɵɵtext(2, "Config Param:");
|
|
622
|
+
i0.ɵɵelementEnd();
|
|
623
|
+
i0.ɵɵtext(3);
|
|
624
|
+
i0.ɵɵelementEnd();
|
|
625
|
+
} if (rf & 2) {
|
|
626
|
+
const model_r13 = i0.ɵɵnextContext(3).$implicit;
|
|
627
|
+
i0.ɵɵadvance(3);
|
|
628
|
+
i0.ɵɵtextInterpolate1(" ", model_r13.ParallelConfigParam, "");
|
|
629
|
+
} }
|
|
630
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
631
|
+
i0.ɵɵelementStart(0, "div", 127);
|
|
632
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Conditional_1_Template, 4, 1, "span")(2, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Conditional_2_Template, 4, 1, "span")(3, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Conditional_3_Template, 4, 1, "span");
|
|
633
|
+
i0.ɵɵelementEnd();
|
|
634
|
+
} if (rf & 2) {
|
|
635
|
+
const model_r13 = i0.ɵɵnextContext(2).$implicit;
|
|
636
|
+
i0.ɵɵadvance();
|
|
637
|
+
i0.ɵɵconditional(model_r13.ParallelizationMode ? 1 : -1);
|
|
638
|
+
i0.ɵɵadvance();
|
|
639
|
+
i0.ɵɵconditional(model_r13.ParallelCount ? 2 : -1);
|
|
640
|
+
i0.ɵɵadvance();
|
|
641
|
+
i0.ɵɵconditional(model_r13.ParallelConfigParam ? 3 : -1);
|
|
642
|
+
} }
|
|
643
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
644
|
+
i0.ɵɵelementStart(0, "div", 105)(1, "div", 124);
|
|
645
|
+
i0.ɵɵelement(2, "i", 125);
|
|
646
|
+
i0.ɵɵtext(3, " Model-Specific Parallel Execution ");
|
|
647
|
+
i0.ɵɵelementEnd();
|
|
648
|
+
i0.ɵɵtemplate(4, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_4_Template, 7, 13, "div", 126)(5, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Conditional_5_Template, 4, 3, "div", 127);
|
|
649
|
+
i0.ɵɵelementEnd();
|
|
650
|
+
} if (rf & 2) {
|
|
651
|
+
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
652
|
+
i0.ɵɵadvance(4);
|
|
653
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 4 : 5);
|
|
654
|
+
} }
|
|
655
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
656
|
+
i0.ɵɵelementStart(0, "div", 92)(1, "div", 93);
|
|
657
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_2_Template, 1, 0, "i", 94)(3, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_3_Template, 2, 1, "span", 95);
|
|
658
|
+
i0.ɵɵelementEnd();
|
|
659
|
+
i0.ɵɵelementStart(4, "div", 96);
|
|
660
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_5_Template, 1, 5, "kendo-dropdownlist", 97)(6, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_6_Template, 2, 1, "span", 23);
|
|
661
|
+
i0.ɵɵelementEnd();
|
|
662
|
+
i0.ɵɵelementStart(7, "div", 98);
|
|
663
|
+
i0.ɵɵtemplate(8, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_8_Template, 2, 1)(9, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_9_Template, 2, 1);
|
|
664
|
+
i0.ɵɵelementEnd();
|
|
665
|
+
i0.ɵɵelementStart(10, "div", 99);
|
|
666
|
+
i0.ɵɵtemplate(11, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_11_Template, 3, 4, "span", 100)(12, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_12_Template, 2, 0, "span", 101);
|
|
667
|
+
i0.ɵɵelementEnd();
|
|
668
|
+
i0.ɵɵelementStart(13, "div", 102);
|
|
669
|
+
i0.ɵɵtemplate(14, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_14_Template, 7, 2);
|
|
670
|
+
i0.ɵɵelementEnd()();
|
|
671
|
+
i0.ɵɵelementStart(15, "div", 103);
|
|
672
|
+
i0.ɵɵelement(16, "div");
|
|
673
|
+
i0.ɵɵelementStart(17, "div")(18, "div", 104);
|
|
674
|
+
i0.ɵɵtemplate(19, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_19_Template, 4, 1, "span")(20, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_20_Template, 4, 1, "span");
|
|
675
|
+
i0.ɵɵelementEnd();
|
|
676
|
+
i0.ɵɵtemplate(21, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Conditional_21_Template, 6, 1, "div", 105);
|
|
677
|
+
i0.ɵɵelementEnd()();
|
|
678
|
+
} if (rf & 2) {
|
|
679
|
+
const model_r13 = ctx.$implicit;
|
|
680
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
681
|
+
i0.ɵɵstyleProp("background", !model_r13.ModelID ? "#fff3cd" : "white")("border-left", !model_r13.ModelID ? "3px solid #ffc107" : "none");
|
|
682
|
+
i0.ɵɵadvance(2);
|
|
683
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 2 : 3);
|
|
684
|
+
i0.ɵɵadvance(3);
|
|
685
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 5 : 6);
|
|
686
|
+
i0.ɵɵadvance(3);
|
|
687
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 8 : 9);
|
|
688
|
+
i0.ɵɵadvance(3);
|
|
689
|
+
i0.ɵɵconditional(model_r13.ID ? 11 : 12);
|
|
690
|
+
i0.ɵɵadvance(3);
|
|
691
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 14 : -1);
|
|
692
|
+
i0.ɵɵadvance(5);
|
|
693
|
+
i0.ɵɵconditional(model_r13.Status ? 19 : -1);
|
|
694
|
+
i0.ɵɵadvance();
|
|
695
|
+
i0.ɵɵconditional(model_r13.ConfigurationID ? 20 : -1);
|
|
696
|
+
i0.ɵɵadvance();
|
|
697
|
+
i0.ɵɵconditional(ctx_r1.record.ParallelizationMode === "ModelSpecific" ? 21 : -1);
|
|
698
|
+
} }
|
|
699
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
700
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
701
|
+
i0.ɵɵelementStart(0, "div", 91)(1, "kendo-button", 132);
|
|
702
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_Conditional_14_Template_kendo_button_click_1_listener() { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNewModel()); });
|
|
703
|
+
i0.ɵɵelement(2, "i", 74);
|
|
704
|
+
i0.ɵɵtext(3, " Add Model ");
|
|
705
|
+
i0.ɵɵelementEnd()();
|
|
706
|
+
} }
|
|
707
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
708
|
+
i0.ɵɵelementStart(0, "div", 90);
|
|
709
|
+
i0.ɵɵelement(1, "div");
|
|
710
|
+
i0.ɵɵelementStart(2, "div");
|
|
711
|
+
i0.ɵɵtext(3, "AI Model ");
|
|
712
|
+
i0.ɵɵelementStart(4, "span", 53);
|
|
713
|
+
i0.ɵɵtext(5, "*");
|
|
714
|
+
i0.ɵɵelementEnd()();
|
|
715
|
+
i0.ɵɵelementStart(6, "div");
|
|
716
|
+
i0.ɵɵtext(7, "Vendor");
|
|
717
|
+
i0.ɵɵelementEnd();
|
|
718
|
+
i0.ɵɵelementStart(8, "div");
|
|
719
|
+
i0.ɵɵtext(9, "Created");
|
|
720
|
+
i0.ɵɵelementEnd();
|
|
721
|
+
i0.ɵɵelementStart(10, "div");
|
|
722
|
+
i0.ɵɵtext(11, "Actions");
|
|
723
|
+
i0.ɵɵelementEnd()();
|
|
724
|
+
i0.ɵɵrepeaterCreate(12, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_For_13_Template, 22, 12, null, null, _forTrack0);
|
|
725
|
+
i0.ɵɵtemplate(14, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_Conditional_14_Template, 4, 0, "div", 91);
|
|
726
|
+
} if (rf & 2) {
|
|
727
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
728
|
+
i0.ɵɵadvance(12);
|
|
729
|
+
i0.ɵɵrepeater(ctx_r1.promptModels);
|
|
730
|
+
i0.ɵɵadvance(2);
|
|
731
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 14 : -1);
|
|
732
|
+
} }
|
|
733
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
734
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_0_Template, 4, 1, "div", 86)(1, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Conditional_1_Template, 15, 1);
|
|
735
|
+
} if (rf & 2) {
|
|
736
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
737
|
+
i0.ɵɵconditional(ctx_r1.promptModels.length === 0 ? 0 : 1);
|
|
738
|
+
} }
|
|
739
|
+
function AIPromptFormComponentExtended_form_1_Conditional_43_Template(rf, ctx) { if (rf & 1) {
|
|
740
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 31);
|
|
741
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_43_ng_template_1_Template, 4, 1, "ng-template", 32);
|
|
742
|
+
i0.ɵɵelementStart(2, "div", 38)(3, "div", 82);
|
|
743
|
+
i0.ɵɵtemplate(4, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_4_Template, 3, 0, "div", 83)(5, AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Template, 2, 1);
|
|
744
|
+
i0.ɵɵelementEnd()()();
|
|
745
|
+
} if (rf & 2) {
|
|
746
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
747
|
+
i0.ɵɵproperty("expanded", false);
|
|
748
|
+
i0.ɵɵadvance(4);
|
|
749
|
+
i0.ɵɵconditional(ctx_r1.isLoadingModels ? 4 : 5);
|
|
750
|
+
} }
|
|
751
|
+
function AIPromptFormComponentExtended_form_1_ng_template_45_Template(rf, ctx) { if (rf & 1) {
|
|
752
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
753
|
+
i0.ɵɵelement(1, "i", 133);
|
|
754
|
+
i0.ɵɵtext(2, " Advanced Configuration ");
|
|
755
|
+
i0.ɵɵelementEnd();
|
|
756
|
+
} }
|
|
757
|
+
function AIPromptFormComponentExtended_form_1_Conditional_50_Template(rf, ctx) { if (rf & 1) {
|
|
758
|
+
i0.ɵɵelement(0, "mj-form-field", 41);
|
|
759
|
+
} if (rf & 2) {
|
|
760
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
761
|
+
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
762
|
+
} }
|
|
763
|
+
function AIPromptFormComponentExtended_form_1_Conditional_51_Template(rf, ctx) { if (rf & 1) {
|
|
764
|
+
i0.ɵɵelement(0, "mj-form-field", 42);
|
|
765
|
+
} if (rf & 2) {
|
|
766
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
767
|
+
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
768
|
+
} }
|
|
769
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
770
|
+
i0.ɵɵelementStart(0, "div", 134);
|
|
771
|
+
i0.ɵɵelement(1, "i", 56);
|
|
772
|
+
i0.ɵɵtext(2, " Loading prompts... ");
|
|
773
|
+
i0.ɵɵelementEnd();
|
|
774
|
+
} }
|
|
775
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
776
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
777
|
+
i0.ɵɵelementStart(0, "kendo-dropdowntree", 136);
|
|
778
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_1_Template_kendo_dropdowntree_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.ResultSelectorPromptID, $event) || (ctx_r1.record.ResultSelectorPromptID = $event); return i0.ɵɵresetView($event); });
|
|
779
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_1_Template_kendo_dropdowntree_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onResultSelectorChange($event)); });
|
|
780
|
+
i0.ɵɵelementEnd();
|
|
781
|
+
} if (rf & 2) {
|
|
782
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
783
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.ResultSelectorPromptID);
|
|
784
|
+
i0.ɵɵproperty("data", ctx_r1.resultSelectorTreeData)("valuePrimitive", true)("filterable", true);
|
|
785
|
+
} }
|
|
786
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Template(rf, ctx) { if (rf & 1) {
|
|
787
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_0_Template, 3, 0, "div", 134)(1, AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_1_Template, 1, 4, "kendo-dropdowntree", 135);
|
|
788
|
+
} if (rf & 2) {
|
|
789
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
790
|
+
i0.ɵɵconditional(ctx_r1.isLoadingResultSelectorData ? 0 : 1);
|
|
791
|
+
} }
|
|
792
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Template(rf, ctx) { if (rf & 1) {
|
|
793
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
794
|
+
i0.ɵɵtext(1);
|
|
795
|
+
i0.ɵɵelementEnd();
|
|
796
|
+
} if (rf & 2) {
|
|
797
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
798
|
+
i0.ɵɵadvance();
|
|
799
|
+
i0.ɵɵtextInterpolate(ctx_r1.getPromptDisplayName(ctx_r1.record.ResultSelectorPromptID || "") || "None selected");
|
|
800
|
+
} }
|
|
801
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
802
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
803
|
+
i0.ɵɵelement(1, "i", 22);
|
|
804
|
+
i0.ɵɵtext(2, " Output Example (JSON) ");
|
|
805
|
+
i0.ɵɵelementStart(3, "span", 140);
|
|
806
|
+
i0.ɵɵtext(4, "\u2022 Required for object output type");
|
|
807
|
+
i0.ɵɵelementEnd()();
|
|
808
|
+
} }
|
|
809
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
810
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
811
|
+
i0.ɵɵelementStart(0, "mj-code-editor", 141);
|
|
812
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_3_Template_mj_code_editor_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.OutputExample, $event) || (ctx_r1.record.OutputExample = $event); return i0.ɵɵresetView($event); });
|
|
813
|
+
i0.ɵɵelementEnd();
|
|
814
|
+
i0.ɵɵelementStart(1, "div", 142);
|
|
815
|
+
i0.ɵɵelement(2, "i", 87);
|
|
816
|
+
i0.ɵɵtext(3, " Provide a JSON example that defines the expected structure for object output validation. ");
|
|
817
|
+
i0.ɵɵelementEnd();
|
|
818
|
+
} if (rf & 2) {
|
|
819
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
820
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.OutputExample);
|
|
821
|
+
} }
|
|
822
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
823
|
+
i0.ɵɵelementStart(0, "div", 138);
|
|
824
|
+
i0.ɵɵtext(1);
|
|
825
|
+
i0.ɵɵelementEnd();
|
|
826
|
+
} if (rf & 2) {
|
|
827
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
828
|
+
i0.ɵɵadvance();
|
|
829
|
+
i0.ɵɵtextInterpolate(ctx_r1.record.OutputExample);
|
|
830
|
+
} }
|
|
831
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
832
|
+
i0.ɵɵelementStart(0, "div", 139);
|
|
833
|
+
i0.ɵɵelement(1, "i", 64);
|
|
834
|
+
i0.ɵɵtext(2, " Output example is required when output type is 'object' ");
|
|
835
|
+
i0.ɵɵelementEnd();
|
|
836
|
+
} }
|
|
837
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_Template(rf, ctx) { if (rf & 1) {
|
|
838
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 31);
|
|
839
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_61_ng_template_1_Template, 5, 0, "ng-template", 32);
|
|
840
|
+
i0.ɵɵelementStart(2, "div", 137);
|
|
841
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_3_Template, 4, 1)(4, AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_4_Template, 2, 1, "div", 138)(5, AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_5_Template, 3, 0, "div", 139);
|
|
842
|
+
i0.ɵɵelementEnd()();
|
|
843
|
+
} if (rf & 2) {
|
|
844
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
845
|
+
i0.ɵɵproperty("expanded", true);
|
|
846
|
+
i0.ɵɵadvance(3);
|
|
847
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : ctx_r1.record.OutputExample ? 4 : 5);
|
|
848
|
+
} }
|
|
849
|
+
function AIPromptFormComponentExtended_form_1_Conditional_62_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
850
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
851
|
+
i0.ɵɵelement(1, "i", 144);
|
|
852
|
+
i0.ɵɵtext(2, " Execution History ");
|
|
853
|
+
i0.ɵɵelementEnd();
|
|
854
|
+
} }
|
|
855
|
+
function AIPromptFormComponentExtended_form_1_Conditional_62_Template(rf, ctx) { if (rf & 1) {
|
|
856
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 31);
|
|
857
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_62_ng_template_1_Template, 3, 0, "ng-template", 32);
|
|
858
|
+
i0.ɵɵelementStart(2, "div", 38);
|
|
859
|
+
i0.ɵɵelement(3, "mj-user-view-grid", 143);
|
|
860
|
+
i0.ɵɵelementEnd()();
|
|
861
|
+
} if (rf & 2) {
|
|
862
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
863
|
+
i0.ɵɵproperty("expanded", false);
|
|
864
|
+
i0.ɵɵadvance(3);
|
|
865
|
+
i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: AI Prompt Runs", "PromptID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: AI Prompt Runs"))("AllowLoad", true)("EditMode", ctx_r1.GridEditMode())("BottomMargin", 0);
|
|
866
|
+
} }
|
|
867
|
+
function AIPromptFormComponentExtended_form_1_Conditional_63_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
868
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
869
|
+
i0.ɵɵelement(1, "i", 145);
|
|
870
|
+
i0.ɵɵtext(2, " Result Cache ");
|
|
871
|
+
i0.ɵɵelementEnd();
|
|
872
|
+
} }
|
|
873
|
+
function AIPromptFormComponentExtended_form_1_Conditional_63_Template(rf, ctx) { if (rf & 1) {
|
|
874
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 31);
|
|
875
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_63_ng_template_1_Template, 3, 0, "ng-template", 32);
|
|
876
|
+
i0.ɵɵelementStart(2, "div", 38);
|
|
877
|
+
i0.ɵɵelement(3, "mj-user-view-grid", 143);
|
|
878
|
+
i0.ɵɵelementEnd()();
|
|
879
|
+
} if (rf & 2) {
|
|
880
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
881
|
+
i0.ɵɵproperty("expanded", false);
|
|
882
|
+
i0.ɵɵadvance(3);
|
|
883
|
+
i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("AI Result Cache", "AIPromptID"))("NewRecordValues", ctx_r1.NewRecordValues("AI Result Cache"))("AllowLoad", true)("EditMode", ctx_r1.GridEditMode())("BottomMargin", 0);
|
|
884
|
+
} }
|
|
885
|
+
function AIPromptFormComponentExtended_form_1_Conditional_64_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
886
|
+
i0.ɵɵelementStart(0, "span", 66);
|
|
887
|
+
i0.ɵɵelement(1, "i", 148);
|
|
888
|
+
i0.ɵɵtext(2, " Related Items ");
|
|
889
|
+
i0.ɵɵelementEnd();
|
|
890
|
+
} }
|
|
891
|
+
function AIPromptFormComponentExtended_form_1_Conditional_64_Template(rf, ctx) { if (rf & 1) {
|
|
892
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 31);
|
|
893
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_64_ng_template_1_Template, 3, 0, "ng-template", 32);
|
|
894
|
+
i0.ɵɵelementStart(2, "div", 38)(3, "div", 39)(4, "div")(5, "h6", 146);
|
|
895
|
+
i0.ɵɵtext(6, "AI Agents Using This Prompt");
|
|
896
|
+
i0.ɵɵelementEnd();
|
|
897
|
+
i0.ɵɵelement(7, "mj-user-view-grid", 147);
|
|
898
|
+
i0.ɵɵelementEnd();
|
|
899
|
+
i0.ɵɵelementStart(8, "div")(9, "h6", 146);
|
|
900
|
+
i0.ɵɵtext(10, "Prompts Using This as Result Selector");
|
|
901
|
+
i0.ɵɵelementEnd();
|
|
902
|
+
i0.ɵɵelement(11, "mj-user-view-grid", 147);
|
|
903
|
+
i0.ɵɵelementEnd()()()();
|
|
904
|
+
} if (rf & 2) {
|
|
905
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
906
|
+
i0.ɵɵproperty("expanded", false);
|
|
907
|
+
i0.ɵɵadvance(7);
|
|
908
|
+
i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("MJ: AI Agent Prompts", "PromptID"))("NewRecordValues", ctx_r1.NewRecordValues("MJ: AI Agent Prompts"))("AllowLoad", true)("EditMode", ctx_r1.GridEditMode())("BottomMargin", 0);
|
|
909
|
+
i0.ɵɵadvance(4);
|
|
910
|
+
i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("AI Prompts", "ResultSelectorPromptID"))("NewRecordValues", ctx_r1.NewRecordValues("AI Prompts"))("AllowLoad", true)("EditMode", ctx_r1.GridEditMode())("BottomMargin", 0);
|
|
911
|
+
} }
|
|
912
|
+
function AIPromptFormComponentExtended_form_1_Template(rf, ctx) { if (rf & 1) {
|
|
913
|
+
i0.ɵɵelementStart(0, "form", 5, 0);
|
|
914
|
+
i0.ɵɵelement(2, "mj-form-toolbar", 6);
|
|
915
|
+
i0.ɵɵelementStart(3, "div", 7)(4, "div", 8)(5, "div", 9)(6, "div", 10)(7, "div", 11);
|
|
916
|
+
i0.ɵɵelement(8, "i", 12);
|
|
917
|
+
i0.ɵɵtemplate(9, AIPromptFormComponentExtended_form_1_Conditional_9_Template, 1, 1, "kendo-textbox", 13)(10, AIPromptFormComponentExtended_form_1_Conditional_10_Template, 4, 4);
|
|
918
|
+
i0.ɵɵelementEnd();
|
|
919
|
+
i0.ɵɵtemplate(11, AIPromptFormComponentExtended_form_1_Conditional_11_Template, 12, 11, "div", 14)(12, AIPromptFormComponentExtended_form_1_Conditional_12_Template, 1, 2, "kendo-textarea", 15)(13, AIPromptFormComponentExtended_form_1_Conditional_13_Template, 2, 1, "p", 16);
|
|
920
|
+
i0.ɵɵelementStart(14, "div", 17);
|
|
921
|
+
i0.ɵɵtemplate(15, AIPromptFormComponentExtended_form_1_Conditional_15_Template, 6, 1, "div", 18);
|
|
922
|
+
i0.ɵɵelementStart(16, "div", 18);
|
|
923
|
+
i0.ɵɵelement(17, "i", 19);
|
|
924
|
+
i0.ɵɵelementStart(18, "span", 20);
|
|
925
|
+
i0.ɵɵtext(19, "Parallelization:");
|
|
926
|
+
i0.ɵɵelementEnd();
|
|
927
|
+
i0.ɵɵelementStart(20, "span", 21);
|
|
928
|
+
i0.ɵɵtext(21);
|
|
929
|
+
i0.ɵɵelementEnd()();
|
|
930
|
+
i0.ɵɵelementStart(22, "div", 18);
|
|
931
|
+
i0.ɵɵelement(23, "i", 22);
|
|
932
|
+
i0.ɵɵelementStart(24, "span", 20);
|
|
933
|
+
i0.ɵɵtext(25, "Output:");
|
|
934
|
+
i0.ɵɵelementEnd();
|
|
935
|
+
i0.ɵɵelementStart(26, "span", 23);
|
|
936
|
+
i0.ɵɵtext(27);
|
|
937
|
+
i0.ɵɵelementEnd()();
|
|
938
|
+
i0.ɵɵtemplate(28, AIPromptFormComponentExtended_form_1_Conditional_28_Template, 4, 0, "div", 18);
|
|
939
|
+
i0.ɵɵelementEnd()();
|
|
940
|
+
i0.ɵɵelementStart(29, "div", 24)(30, "div", 25);
|
|
941
|
+
i0.ɵɵtemplate(31, AIPromptFormComponentExtended_form_1_Conditional_31_Template, 3, 0, "kendo-button", 26)(32, AIPromptFormComponentExtended_form_1_Conditional_32_Template, 3, 1, "kendo-button", 27)(33, AIPromptFormComponentExtended_form_1_Conditional_33_Template, 3, 0, "kendo-button", 28);
|
|
942
|
+
i0.ɵɵelementEnd();
|
|
943
|
+
i0.ɵɵtemplate(34, AIPromptFormComponentExtended_form_1_Conditional_34_Template, 4, 3, "div", 29);
|
|
944
|
+
i0.ɵɵelementEnd()()();
|
|
945
|
+
i0.ɵɵelementStart(35, "div", 30)(36, "kendo-expansionpanel", 31);
|
|
946
|
+
i0.ɵɵtemplate(37, AIPromptFormComponentExtended_form_1_ng_template_37_Template, 4, 1, "ng-template", 32);
|
|
947
|
+
i0.ɵɵelementStart(38, "div", 33);
|
|
948
|
+
i0.ɵɵtemplate(39, AIPromptFormComponentExtended_form_1_Conditional_39_Template, 3, 0, "div", 34)(40, AIPromptFormComponentExtended_form_1_Conditional_40_Template, 13, 0, "div", 35)(41, AIPromptFormComponentExtended_form_1_Conditional_41_Template, 13, 0, "div", 36)(42, AIPromptFormComponentExtended_form_1_Conditional_42_Template, 4, 2, "div", 37);
|
|
949
|
+
i0.ɵɵelementEnd()();
|
|
950
|
+
i0.ɵɵtemplate(43, AIPromptFormComponentExtended_form_1_Conditional_43_Template, 6, 2, "kendo-expansionpanel", 31);
|
|
951
|
+
i0.ɵɵelementStart(44, "kendo-expansionpanel", 31);
|
|
952
|
+
i0.ɵɵtemplate(45, AIPromptFormComponentExtended_form_1_ng_template_45_Template, 3, 0, "ng-template", 32);
|
|
953
|
+
i0.ɵɵelementStart(46, "div", 38)(47, "div", 39)(48, "div");
|
|
954
|
+
i0.ɵɵelement(49, "mj-form-field", 40);
|
|
955
|
+
i0.ɵɵtemplate(50, AIPromptFormComponentExtended_form_1_Conditional_50_Template, 1, 3, "mj-form-field", 41)(51, AIPromptFormComponentExtended_form_1_Conditional_51_Template, 1, 3, "mj-form-field", 42);
|
|
956
|
+
i0.ɵɵelement(52, "mj-form-field", 43);
|
|
957
|
+
i0.ɵɵelementEnd();
|
|
958
|
+
i0.ɵɵelementStart(53, "div");
|
|
959
|
+
i0.ɵɵelement(54, "mj-form-field", 44)(55, "mj-form-field", 45);
|
|
960
|
+
i0.ɵɵelementStart(56, "div", 46)(57, "label", 47);
|
|
961
|
+
i0.ɵɵtext(58, " Result Selector Prompt ");
|
|
962
|
+
i0.ɵɵelementEnd();
|
|
963
|
+
i0.ɵɵtemplate(59, AIPromptFormComponentExtended_form_1_Conditional_59_Template, 2, 1)(60, AIPromptFormComponentExtended_form_1_Conditional_60_Template, 2, 1, "span", 48);
|
|
964
|
+
i0.ɵɵelementEnd()()()()();
|
|
965
|
+
i0.ɵɵtemplate(61, AIPromptFormComponentExtended_form_1_Conditional_61_Template, 6, 2, "kendo-expansionpanel", 31)(62, AIPromptFormComponentExtended_form_1_Conditional_62_Template, 4, 6, "kendo-expansionpanel", 31)(63, AIPromptFormComponentExtended_form_1_Conditional_63_Template, 4, 6, "kendo-expansionpanel", 31)(64, AIPromptFormComponentExtended_form_1_Conditional_64_Template, 12, 11, "kendo-expansionpanel", 31);
|
|
966
|
+
i0.ɵɵelementEnd()()();
|
|
967
|
+
} if (rf & 2) {
|
|
968
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
969
|
+
i0.ɵɵadvance(2);
|
|
970
|
+
i0.ɵɵproperty("form", ctx_r1);
|
|
971
|
+
i0.ɵɵadvance(7);
|
|
972
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 9 : 10);
|
|
973
|
+
i0.ɵɵadvance(2);
|
|
974
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 11 : -1);
|
|
975
|
+
i0.ɵɵadvance();
|
|
976
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 12 : ctx_r1.record.Description ? 13 : -1);
|
|
977
|
+
i0.ɵɵadvance(3);
|
|
978
|
+
i0.ɵɵconditional(ctx_r1.record.TypeID ? 15 : -1);
|
|
979
|
+
i0.ɵɵadvance(6);
|
|
980
|
+
i0.ɵɵtextInterpolate(ctx_r1.getParallelizationModeDisplay());
|
|
981
|
+
i0.ɵɵadvance(5);
|
|
982
|
+
i0.ɵɵstyleProp("color", ctx_r1.getValidationColor());
|
|
983
|
+
i0.ɵɵadvance();
|
|
984
|
+
i0.ɵɵtextInterpolate(ctx_r1.getOutputTypeDisplay());
|
|
985
|
+
i0.ɵɵadvance();
|
|
986
|
+
i0.ɵɵconditional(ctx_r1.record.EnableCaching ? 28 : -1);
|
|
987
|
+
i0.ɵɵadvance(3);
|
|
988
|
+
i0.ɵɵconditional(ctx_r1.record.ID && ctx_r1.canExecute ? 31 : ctx_r1.record.ID && !ctx_r1.canExecute ? 32 : -1);
|
|
989
|
+
i0.ɵɵadvance(2);
|
|
990
|
+
i0.ɵɵconditional(ctx_r1.record.ID ? 33 : -1);
|
|
991
|
+
i0.ɵɵadvance();
|
|
992
|
+
i0.ɵɵconditional(!ctx_r1.canExecute && ctx_r1.record.ID ? 34 : -1);
|
|
993
|
+
i0.ɵɵadvance(2);
|
|
994
|
+
i0.ɵɵproperty("expanded", true);
|
|
995
|
+
i0.ɵɵadvance(3);
|
|
996
|
+
i0.ɵɵconditional(ctx_r1.isLoadingTemplate ? 39 : !ctx_r1.record.TemplateID ? 40 : !ctx_r1.template ? 41 : 42);
|
|
997
|
+
i0.ɵɵadvance(4);
|
|
998
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 43 : -1);
|
|
999
|
+
i0.ɵɵadvance();
|
|
1000
|
+
i0.ɵɵproperty("expanded", false);
|
|
1001
|
+
i0.ɵɵadvance(5);
|
|
1002
|
+
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1003
|
+
i0.ɵɵadvance();
|
|
1004
|
+
i0.ɵɵconditional(ctx_r1.showParallelCount ? 50 : -1);
|
|
1005
|
+
i0.ɵɵadvance();
|
|
1006
|
+
i0.ɵɵconditional(ctx_r1.showParallelConfigParam ? 51 : -1);
|
|
1007
|
+
i0.ɵɵadvance();
|
|
1008
|
+
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1009
|
+
i0.ɵɵadvance(2);
|
|
1010
|
+
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1011
|
+
i0.ɵɵadvance();
|
|
1012
|
+
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1013
|
+
i0.ɵɵadvance(4);
|
|
1014
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 59 : 60);
|
|
1015
|
+
i0.ɵɵadvance(2);
|
|
1016
|
+
i0.ɵɵconditional(ctx_r1.showOutputExample ? 61 : -1);
|
|
1017
|
+
i0.ɵɵadvance();
|
|
1018
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 62 : -1);
|
|
1019
|
+
i0.ɵɵadvance();
|
|
1020
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved && ctx_r1.record.EnableCaching ? 63 : -1);
|
|
1021
|
+
i0.ɵɵadvance();
|
|
1022
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 64 : -1);
|
|
1023
|
+
} }
|
|
1024
|
+
let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends AIPromptFormComponent {
|
|
1025
|
+
constructor() {
|
|
1026
|
+
super(...arguments);
|
|
1027
|
+
this.template = null;
|
|
1028
|
+
this.isLoadingTemplate = false;
|
|
1029
|
+
this.showExecutionDialog = false;
|
|
1030
|
+
// Model management
|
|
1031
|
+
this.promptModels = [];
|
|
1032
|
+
this.availableModels = [];
|
|
1033
|
+
this.availableVendors = [];
|
|
1034
|
+
this.isLoadingModels = false;
|
|
1035
|
+
// Vendor management per model
|
|
1036
|
+
this.modelVendorsMap = new Map();
|
|
1037
|
+
// AI Prompt Types
|
|
1038
|
+
this.availablePromptTypes = [];
|
|
1039
|
+
this.isLoadingPromptTypes = false;
|
|
1040
|
+
// Result Selector Tree Data
|
|
1041
|
+
this.resultSelectorTreeData = [];
|
|
1042
|
+
this.isLoadingResultSelectorData = false;
|
|
1043
|
+
this._metadata = new Metadata();
|
|
1044
|
+
}
|
|
1045
|
+
// Template editor configuration
|
|
1046
|
+
get templateEditorConfig() {
|
|
1047
|
+
return {
|
|
1048
|
+
allowEdit: this.EditMode,
|
|
1049
|
+
showRunButton: false,
|
|
1050
|
+
compactMode: false
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
ngOnInit() {
|
|
1054
|
+
const _super = Object.create(null, {
|
|
1055
|
+
ngOnInit: { get: () => super.ngOnInit }
|
|
1056
|
+
});
|
|
1057
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1058
|
+
var _a;
|
|
1059
|
+
yield _super.ngOnInit.call(this);
|
|
1060
|
+
// Load template when record changes
|
|
1061
|
+
if ((_a = this.record) === null || _a === void 0 ? void 0 : _a.TemplateID) {
|
|
1062
|
+
this.loadTemplate();
|
|
1063
|
+
}
|
|
1064
|
+
// Load available models, vendors, prompt types, prompt models, and result selector data
|
|
1065
|
+
yield Promise.all([
|
|
1066
|
+
this.loadAvailableModels(),
|
|
1067
|
+
this.loadAvailableVendors(),
|
|
1068
|
+
this.loadAvailablePromptTypes(),
|
|
1069
|
+
this.loadPromptModels(),
|
|
1070
|
+
this.loadResultSelectorTreeData()
|
|
1071
|
+
]);
|
|
1072
|
+
// Set defaults for new records
|
|
1073
|
+
if (!this.record.IsSaved) {
|
|
1074
|
+
// Default to first prompt type if not set
|
|
1075
|
+
if (!this.record.TypeID && this.availablePromptTypes.length > 0) {
|
|
1076
|
+
this.record.TypeID = this.availablePromptTypes[0].ID;
|
|
1077
|
+
}
|
|
1078
|
+
// Default status to Pending if not set
|
|
1079
|
+
if (!this.record.Status) {
|
|
1080
|
+
this.record.Status = 'Pending';
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Loads the template associated with this AI prompt
|
|
1087
|
+
*/
|
|
1088
|
+
loadTemplate() {
|
|
1089
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1090
|
+
var _a;
|
|
1091
|
+
if (!((_a = this.record) === null || _a === void 0 ? void 0 : _a.TemplateID)) {
|
|
1092
|
+
this.template = null;
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
this.isLoadingTemplate = true;
|
|
1096
|
+
try {
|
|
1097
|
+
this.template = yield this._metadata.GetEntityObject('Templates');
|
|
1098
|
+
yield this.template.Load(this.record.TemplateID);
|
|
1099
|
+
if (!this.template.IsSaved) {
|
|
1100
|
+
this.template = null;
|
|
1101
|
+
console.warn(`Template with ID ${this.record.TemplateID} not found`);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
catch (error) {
|
|
1105
|
+
console.error('Error loading template:', error);
|
|
1106
|
+
this.template = null;
|
|
1107
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error loading associated template', 'error', 5000);
|
|
1108
|
+
}
|
|
1109
|
+
finally {
|
|
1110
|
+
this.isLoadingTemplate = false;
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Handles template ID changes in the form
|
|
1116
|
+
*/
|
|
1117
|
+
onTemplateIdChange() {
|
|
1118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1119
|
+
var _a;
|
|
1120
|
+
if ((_a = this.record) === null || _a === void 0 ? void 0 : _a.TemplateID) {
|
|
1121
|
+
yield this.loadTemplate();
|
|
1122
|
+
}
|
|
1123
|
+
else {
|
|
1124
|
+
this.template = null;
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* Opens a dialog to link an existing template
|
|
1130
|
+
*/
|
|
1131
|
+
linkExistingTemplate() {
|
|
1132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1133
|
+
// TODO: Implement template selection dialog
|
|
1134
|
+
MJNotificationService.Instance.CreateSimpleNotification('Template linking functionality coming soon', 'info', 3000);
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Opens the current template in a new window
|
|
1139
|
+
*/
|
|
1140
|
+
openTemplateInNewWindow() {
|
|
1141
|
+
var _a;
|
|
1142
|
+
if (!((_a = this.template) === null || _a === void 0 ? void 0 : _a.ID))
|
|
1143
|
+
return;
|
|
1144
|
+
// TODO: Get the proper URL for template editing
|
|
1145
|
+
const templateUrl = `/templates/${this.template.ID}`;
|
|
1146
|
+
window.open(templateUrl, '_blank');
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Creates a new template for this AI prompt
|
|
1150
|
+
*/
|
|
1151
|
+
createNewTemplate() {
|
|
1152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1153
|
+
var _a, _b;
|
|
1154
|
+
try {
|
|
1155
|
+
const newTemplate = yield this._metadata.GetEntityObject('Templates');
|
|
1156
|
+
newTemplate.NewRecord();
|
|
1157
|
+
newTemplate.Name = `${this.record.Name || 'AI Prompt'} Template`;
|
|
1158
|
+
newTemplate.Description = `Template for AI Prompt: ${this.record.Name}`;
|
|
1159
|
+
newTemplate.UserID = this._metadata.CurrentUser.ID;
|
|
1160
|
+
const saveResult = yield newTemplate.Save();
|
|
1161
|
+
if (!saveResult) {
|
|
1162
|
+
const errorMessage = ((_a = newTemplate.LatestResult) === null || _a === void 0 ? void 0 : _a.Message) || ((_b = newTemplate.LatestResult) === null || _b === void 0 ? void 0 : _b.Errors) || 'Unknown error';
|
|
1163
|
+
console.error('Template save failed:', errorMessage);
|
|
1164
|
+
throw new Error(`Failed to save new template: ${errorMessage}`);
|
|
1165
|
+
}
|
|
1166
|
+
// Update the AI prompt to reference the new template
|
|
1167
|
+
this.record.TemplateID = newTemplate.ID;
|
|
1168
|
+
// Load the new template
|
|
1169
|
+
yield this.loadTemplate();
|
|
1170
|
+
MJNotificationService.Instance.CreateSimpleNotification('New template created and linked successfully', 'success', 4000);
|
|
1171
|
+
}
|
|
1172
|
+
catch (error) {
|
|
1173
|
+
console.error('Error creating new template:', error);
|
|
1174
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
1175
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Error creating new template: ${errorMessage}`, 'error', 6000);
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Opens the AI prompt execution dialog
|
|
1181
|
+
*/
|
|
1182
|
+
executeAIPrompt() {
|
|
1183
|
+
var _a;
|
|
1184
|
+
if (!((_a = this.record) === null || _a === void 0 ? void 0 : _a.ID)) {
|
|
1185
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please save the AI prompt before executing', 'warning', 4000);
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
if (this.record.Status !== 'Active') {
|
|
1189
|
+
MJNotificationService.Instance.CreateSimpleNotification('AI prompt must be Active to execute', 'warning', 4000);
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
this.showExecutionDialog = true;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Handles template content changes from the editor
|
|
1196
|
+
*/
|
|
1197
|
+
onTemplateContentChange(content) {
|
|
1198
|
+
// Handle template content changes if needed
|
|
1199
|
+
console.log('Template content changed:', content);
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Handles template run requests from the editor
|
|
1203
|
+
*/
|
|
1204
|
+
onTemplateRun(template) {
|
|
1205
|
+
console.log('Template run requested:', template);
|
|
1206
|
+
// Could open the template parameter dialog here if needed
|
|
1207
|
+
MJNotificationService.Instance.CreateSimpleNotification('Template run functionality coming soon', 'info', 3000);
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Gets the display text for parallelization mode
|
|
1211
|
+
*/
|
|
1212
|
+
getParallelizationModeDisplay() {
|
|
1213
|
+
var _a;
|
|
1214
|
+
switch ((_a = this.record) === null || _a === void 0 ? void 0 : _a.ParallelizationMode) {
|
|
1215
|
+
case 'None': return 'None';
|
|
1216
|
+
case 'StaticCount': return `Static count (${this.record.ParallelCount || 1})`;
|
|
1217
|
+
case 'ConfigParam': return `Config parameter (${this.record.ParallelConfigParam || 'not set'})`;
|
|
1218
|
+
case 'ModelSpecific': return 'Model-specific configuration';
|
|
1219
|
+
default: return 'Unknown';
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Gets the display text for output type
|
|
1224
|
+
*/
|
|
1225
|
+
getOutputTypeDisplay() {
|
|
1226
|
+
var _a, _b;
|
|
1227
|
+
const type = ((_a = this.record) === null || _a === void 0 ? void 0 : _a.OutputType) || 'string';
|
|
1228
|
+
const validationBehavior = ((_b = this.record) === null || _b === void 0 ? void 0 : _b.ValidationBehavior) || 'Warn';
|
|
1229
|
+
if (validationBehavior === 'None') {
|
|
1230
|
+
return type;
|
|
1231
|
+
}
|
|
1232
|
+
else {
|
|
1233
|
+
return `${type} (${validationBehavior})`;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Gets the color for validation behavior display
|
|
1238
|
+
*/
|
|
1239
|
+
getValidationColor() {
|
|
1240
|
+
var _a;
|
|
1241
|
+
switch ((_a = this.record) === null || _a === void 0 ? void 0 : _a.ValidationBehavior) {
|
|
1242
|
+
case 'Strict': return '#dc3545'; // red
|
|
1243
|
+
case 'Warn': return '#ffc107'; // yellow
|
|
1244
|
+
default: return '#6c757d'; // default gray
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Checks if ParallelCount field should be visible
|
|
1249
|
+
*/
|
|
1250
|
+
get showParallelCount() {
|
|
1251
|
+
var _a;
|
|
1252
|
+
return ((_a = this.record) === null || _a === void 0 ? void 0 : _a.ParallelizationMode) === 'StaticCount';
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Checks if ParallelConfigParam field should be visible
|
|
1256
|
+
*/
|
|
1257
|
+
get showParallelConfigParam() {
|
|
1258
|
+
var _a;
|
|
1259
|
+
return ((_a = this.record) === null || _a === void 0 ? void 0 : _a.ParallelizationMode) === 'ConfigParam';
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Checks if OutputExample field should be visible
|
|
1263
|
+
*/
|
|
1264
|
+
get showOutputExample() {
|
|
1265
|
+
var _a;
|
|
1266
|
+
return ((_a = this.record) === null || _a === void 0 ? void 0 : _a.OutputType) === 'object';
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Checks if the AI prompt can be executed
|
|
1270
|
+
*/
|
|
1271
|
+
get canExecute() {
|
|
1272
|
+
var _a;
|
|
1273
|
+
return !!(((_a = this.record) === null || _a === void 0 ? void 0 : _a.ID) &&
|
|
1274
|
+
this.record.Status === 'Active' &&
|
|
1275
|
+
this.record.TemplateID &&
|
|
1276
|
+
this.template);
|
|
1277
|
+
}
|
|
1278
|
+
/**
|
|
1279
|
+
* Gets status badge color
|
|
1280
|
+
*/
|
|
1281
|
+
getStatusBadgeColor() {
|
|
1282
|
+
var _a;
|
|
1283
|
+
switch ((_a = this.record) === null || _a === void 0 ? void 0 : _a.Status) {
|
|
1284
|
+
case 'Active': return '#28a745';
|
|
1285
|
+
case 'Pending': return '#ffc107';
|
|
1286
|
+
case 'Disabled': return '#6c757d';
|
|
1287
|
+
default: return '#6c757d';
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Loads available AI models for selection
|
|
1292
|
+
*/
|
|
1293
|
+
loadAvailableModels() {
|
|
1294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1295
|
+
try {
|
|
1296
|
+
const rv = new RunView();
|
|
1297
|
+
const results = yield rv.RunView({
|
|
1298
|
+
EntityName: 'AI Models',
|
|
1299
|
+
OrderBy: 'Name ASC',
|
|
1300
|
+
ResultType: 'entity_object'
|
|
1301
|
+
});
|
|
1302
|
+
this.availableModels = results.Results;
|
|
1303
|
+
}
|
|
1304
|
+
catch (error) {
|
|
1305
|
+
console.error('Error loading available models:', error);
|
|
1306
|
+
}
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Loads available AI vendors for selection
|
|
1311
|
+
*/
|
|
1312
|
+
loadAvailableVendors() {
|
|
1313
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1314
|
+
try {
|
|
1315
|
+
const rv = new RunView();
|
|
1316
|
+
const results = yield rv.RunView({
|
|
1317
|
+
EntityName: 'MJ: AI Vendors',
|
|
1318
|
+
OrderBy: 'Name ASC',
|
|
1319
|
+
ResultType: 'entity_object'
|
|
1320
|
+
});
|
|
1321
|
+
this.availableVendors = results.Results;
|
|
1322
|
+
}
|
|
1323
|
+
catch (error) {
|
|
1324
|
+
console.error('Error loading available vendors:', error);
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Loads available AI prompt types for selection
|
|
1330
|
+
*/
|
|
1331
|
+
loadAvailablePromptTypes() {
|
|
1332
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1333
|
+
this.isLoadingPromptTypes = true;
|
|
1334
|
+
try {
|
|
1335
|
+
const rv = new RunView();
|
|
1336
|
+
const results = yield rv.RunView({
|
|
1337
|
+
EntityName: 'AI Prompt Types',
|
|
1338
|
+
OrderBy: '__mj_CreatedAt ASC',
|
|
1339
|
+
ResultType: 'entity_object'
|
|
1340
|
+
});
|
|
1341
|
+
this.availablePromptTypes = results.Results;
|
|
1342
|
+
}
|
|
1343
|
+
catch (error) {
|
|
1344
|
+
console.error('Error loading available prompt types:', error);
|
|
1345
|
+
}
|
|
1346
|
+
finally {
|
|
1347
|
+
this.isLoadingPromptTypes = false;
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Loads vendors available for a specific model
|
|
1353
|
+
*/
|
|
1354
|
+
loadVendorsForModel(modelId) {
|
|
1355
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1356
|
+
if (!modelId) {
|
|
1357
|
+
return { vendors: [], modelVendors: [] };
|
|
1358
|
+
}
|
|
1359
|
+
// Check cache first
|
|
1360
|
+
if (this.modelVendorsMap.has(modelId)) {
|
|
1361
|
+
return this.modelVendorsMap.get(modelId);
|
|
1362
|
+
}
|
|
1363
|
+
try {
|
|
1364
|
+
// Load model vendors for this model
|
|
1365
|
+
const rv = new RunView();
|
|
1366
|
+
const modelVendorsResult = yield rv.RunView({
|
|
1367
|
+
EntityName: 'MJ: AI Model Vendors',
|
|
1368
|
+
ExtraFilter: `ModelID='${modelId}'`,
|
|
1369
|
+
OrderBy: 'VendorID ASC',
|
|
1370
|
+
ResultType: 'entity_object'
|
|
1371
|
+
});
|
|
1372
|
+
const modelVendors = modelVendorsResult.Results || [];
|
|
1373
|
+
// Get unique vendor IDs
|
|
1374
|
+
const vendorIds = [...new Set(modelVendors.map(mv => mv.VendorID))];
|
|
1375
|
+
// Load vendor details
|
|
1376
|
+
const vendors = [];
|
|
1377
|
+
if (vendorIds.length > 0) {
|
|
1378
|
+
const vendorFilter = vendorIds.map(id => `ID='${id}'`).join(' OR ');
|
|
1379
|
+
const vendorsResult = yield rv.RunView({
|
|
1380
|
+
EntityName: 'MJ: AI Vendors',
|
|
1381
|
+
ExtraFilter: vendorFilter,
|
|
1382
|
+
OrderBy: 'Name ASC',
|
|
1383
|
+
ResultType: 'entity_object'
|
|
1384
|
+
});
|
|
1385
|
+
vendors.push(...(vendorsResult.Results || []));
|
|
1386
|
+
}
|
|
1387
|
+
const result = { vendors, modelVendors };
|
|
1388
|
+
this.modelVendorsMap.set(modelId, result);
|
|
1389
|
+
return result;
|
|
1390
|
+
}
|
|
1391
|
+
catch (error) {
|
|
1392
|
+
console.error('Error loading vendors for model:', error);
|
|
1393
|
+
return { vendors: [], modelVendors: [] };
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* Gets vendors for a specific model from cache or loads them
|
|
1399
|
+
*/
|
|
1400
|
+
getVendorsForModel(modelId) {
|
|
1401
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1402
|
+
const result = yield this.loadVendorsForModel(modelId);
|
|
1403
|
+
return result.vendors;
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Gets the status for a model-vendor combination
|
|
1408
|
+
*/
|
|
1409
|
+
getModelVendorStatus(modelId, vendorId) {
|
|
1410
|
+
const modelVendorData = this.modelVendorsMap.get(modelId);
|
|
1411
|
+
if (!modelVendorData)
|
|
1412
|
+
return 'Unknown';
|
|
1413
|
+
const modelVendor = modelVendorData.modelVendors.find(mv => mv.VendorID === vendorId);
|
|
1414
|
+
return (modelVendor === null || modelVendor === void 0 ? void 0 : modelVendor.Status) || 'Unknown';
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Gets the color for vendor status display
|
|
1418
|
+
*/
|
|
1419
|
+
getVendorStatusColor(modelId, vendorId) {
|
|
1420
|
+
const status = this.getModelVendorStatus(modelId, vendorId);
|
|
1421
|
+
switch (status) {
|
|
1422
|
+
case 'Active': return '#28a745'; // green
|
|
1423
|
+
case 'Inactive': return '#dc3545'; // red
|
|
1424
|
+
case 'Pending': return '#ffc107'; // yellow
|
|
1425
|
+
default: return '#6c757d'; // gray
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Handles model selection change and loads vendors for that model
|
|
1430
|
+
*/
|
|
1431
|
+
onModelChange(modelId, promptModelIndex) {
|
|
1432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1433
|
+
const promptModel = this.promptModels[promptModelIndex];
|
|
1434
|
+
if (!promptModel)
|
|
1435
|
+
return;
|
|
1436
|
+
// Clear the vendor selection when model changes
|
|
1437
|
+
promptModel.VendorID = null;
|
|
1438
|
+
// Load vendors for the new model
|
|
1439
|
+
if (modelId) {
|
|
1440
|
+
const vendorData = yield this.loadVendorsForModel(modelId);
|
|
1441
|
+
// Auto-select first vendor if available
|
|
1442
|
+
if (vendorData.vendors.length > 0) {
|
|
1443
|
+
promptModel.VendorID = vendorData.vendors[0].ID;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Gets vendors for a specific model
|
|
1450
|
+
*/
|
|
1451
|
+
getVendorsForModelSync(modelId) {
|
|
1452
|
+
const modelVendorData = this.modelVendorsMap.get(modelId);
|
|
1453
|
+
return (modelVendorData === null || modelVendorData === void 0 ? void 0 : modelVendorData.vendors) || [];
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Checks if vendor dropdown should be shown (more than one vendor)
|
|
1457
|
+
*/
|
|
1458
|
+
shouldShowVendorDropdown(modelId) {
|
|
1459
|
+
if (!modelId)
|
|
1460
|
+
return false;
|
|
1461
|
+
const vendors = this.getVendorsForModelSync(modelId);
|
|
1462
|
+
return vendors.length > 1;
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* Loads prompt models for this AI prompt
|
|
1466
|
+
*/
|
|
1467
|
+
loadPromptModels() {
|
|
1468
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1469
|
+
var _a;
|
|
1470
|
+
if (!((_a = this.record) === null || _a === void 0 ? void 0 : _a.ID)) {
|
|
1471
|
+
this.promptModels = [];
|
|
1472
|
+
return;
|
|
1473
|
+
}
|
|
1474
|
+
this.isLoadingModels = true;
|
|
1475
|
+
try {
|
|
1476
|
+
const rv = new RunView();
|
|
1477
|
+
const results = yield rv.RunView({
|
|
1478
|
+
EntityName: 'MJ: AI Prompt Models',
|
|
1479
|
+
ExtraFilter: `PromptID='${this.record.ID}'`,
|
|
1480
|
+
OrderBy: 'Priority ASC, __mj_CreatedAt ASC',
|
|
1481
|
+
ResultType: 'entity_object'
|
|
1482
|
+
});
|
|
1483
|
+
this.promptModels = results.Results;
|
|
1484
|
+
// Load vendors for existing models
|
|
1485
|
+
const modelIds = this.promptModels
|
|
1486
|
+
.map(pm => pm.ModelID)
|
|
1487
|
+
.filter(id => id); // Filter out null/undefined
|
|
1488
|
+
yield Promise.all(modelIds.map(modelId => this.loadVendorsForModel(modelId)));
|
|
1489
|
+
}
|
|
1490
|
+
catch (error) {
|
|
1491
|
+
console.error('Error loading prompt models:', error);
|
|
1492
|
+
}
|
|
1493
|
+
finally {
|
|
1494
|
+
this.isLoadingModels = false;
|
|
1495
|
+
}
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Adds a new model to the prompt
|
|
1500
|
+
*/
|
|
1501
|
+
addNewModel() {
|
|
1502
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1503
|
+
var _a;
|
|
1504
|
+
if (!((_a = this.record) === null || _a === void 0 ? void 0 : _a.ID))
|
|
1505
|
+
return;
|
|
1506
|
+
try {
|
|
1507
|
+
const newModel = yield this._metadata.GetEntityObject('MJ: AI Prompt Models');
|
|
1508
|
+
newModel.PromptID = this.record.ID;
|
|
1509
|
+
// Set priority to highest existing priority + 1
|
|
1510
|
+
const maxPriority = this.promptModels.length > 0
|
|
1511
|
+
? Math.max(...this.promptModels.map(pm => pm.Priority || 0))
|
|
1512
|
+
: 0;
|
|
1513
|
+
newModel.Priority = maxPriority + 1;
|
|
1514
|
+
// ModelID will be set by user
|
|
1515
|
+
this.promptModels.push(newModel);
|
|
1516
|
+
}
|
|
1517
|
+
catch (error) {
|
|
1518
|
+
console.error('Error creating new model:', error);
|
|
1519
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error creating new model', 'error', 5000);
|
|
1520
|
+
}
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Removes a model from the prompt
|
|
1525
|
+
*/
|
|
1526
|
+
removePromptModel(index) {
|
|
1527
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1528
|
+
if (index < 0 || index >= this.promptModels.length)
|
|
1529
|
+
return;
|
|
1530
|
+
const model = this.promptModels[index];
|
|
1531
|
+
try {
|
|
1532
|
+
// If it's a saved model, delete it from the database
|
|
1533
|
+
if (model.IsSaved) {
|
|
1534
|
+
const deleteResult = yield model.Delete();
|
|
1535
|
+
if (!deleteResult) {
|
|
1536
|
+
throw new Error('Failed to delete model from database');
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
// Remove from local array
|
|
1540
|
+
this.promptModels.splice(index, 1);
|
|
1541
|
+
MJNotificationService.Instance.CreateSimpleNotification('Model removed successfully', 'success', 3000);
|
|
1542
|
+
}
|
|
1543
|
+
catch (error) {
|
|
1544
|
+
console.error('Error removing model:', error);
|
|
1545
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error removing model', 'error', 5000);
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Gets the display name for a model ID
|
|
1551
|
+
*/
|
|
1552
|
+
getModelDisplayName(modelId) {
|
|
1553
|
+
if (!modelId)
|
|
1554
|
+
return '';
|
|
1555
|
+
const model = this.availableModels.find(m => m.ID === modelId);
|
|
1556
|
+
return model ? model.Name : modelId;
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* Gets the display name for a vendor ID
|
|
1560
|
+
*/
|
|
1561
|
+
getVendorDisplayName(vendorId) {
|
|
1562
|
+
if (!vendorId)
|
|
1563
|
+
return '';
|
|
1564
|
+
const vendor = this.availableVendors.find(v => v.ID === vendorId);
|
|
1565
|
+
return vendor ? vendor.Name : vendorId;
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* Gets the display name for a prompt type ID
|
|
1569
|
+
*/
|
|
1570
|
+
getPromptTypeDisplayName(typeId) {
|
|
1571
|
+
if (!typeId)
|
|
1572
|
+
return '';
|
|
1573
|
+
const type = this.availablePromptTypes.find(t => t.ID === typeId);
|
|
1574
|
+
return type ? type.Name : typeId;
|
|
1575
|
+
}
|
|
1576
|
+
/**
|
|
1577
|
+
* Override SaveRecord to auto-save template contents and prompt models
|
|
1578
|
+
*/
|
|
1579
|
+
SaveRecord() {
|
|
1580
|
+
const _super = Object.create(null, {
|
|
1581
|
+
SaveRecord: { get: () => super.SaveRecord }
|
|
1582
|
+
});
|
|
1583
|
+
return __awaiter(this, arguments, void 0, function* (StopEditModeAfterSave = true) {
|
|
1584
|
+
try {
|
|
1585
|
+
// If this is a new prompt with a new template, we need to save the template first
|
|
1586
|
+
if (!this.record.IsSaved && this.template && !this.template.IsSaved) {
|
|
1587
|
+
const templateSaved = yield this.template.Save();
|
|
1588
|
+
if (!templateSaved) {
|
|
1589
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to save template', 'error', 5000);
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
// Set the template ID on the AI prompt before saving
|
|
1593
|
+
this.record.TemplateID = this.template.ID;
|
|
1594
|
+
}
|
|
1595
|
+
// Save the AI prompt itself
|
|
1596
|
+
const promptSaved = yield _super.SaveRecord.call(this, StopEditModeAfterSave);
|
|
1597
|
+
if (promptSaved) {
|
|
1598
|
+
// Save template contents if we have a template
|
|
1599
|
+
if (this.template && this.templateEditor) {
|
|
1600
|
+
const templateContentsSaved = yield this.templateEditor.saveTemplateContents();
|
|
1601
|
+
if (!templateContentsSaved) {
|
|
1602
|
+
MJNotificationService.Instance.CreateSimpleNotification('AI prompt saved, but template contents failed to save', 'warning', 5000);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
// Then save all prompt models
|
|
1606
|
+
return yield this.savePromptModels();
|
|
1607
|
+
}
|
|
1608
|
+
return false;
|
|
1609
|
+
}
|
|
1610
|
+
catch (error) {
|
|
1611
|
+
console.error('Error in SaveRecord:', error);
|
|
1612
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error saving AI prompt', 'error', 5000);
|
|
1613
|
+
return false;
|
|
1614
|
+
}
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Saves all prompt models (creates, updates, deletes)
|
|
1619
|
+
*/
|
|
1620
|
+
savePromptModels() {
|
|
1621
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1622
|
+
try {
|
|
1623
|
+
let allSuccessful = true;
|
|
1624
|
+
// Save each prompt model
|
|
1625
|
+
for (const model of this.promptModels) {
|
|
1626
|
+
if (model.ModelID) { // Only save if a model is selected
|
|
1627
|
+
// Set the PromptID if it's not already set
|
|
1628
|
+
if (!model.PromptID) {
|
|
1629
|
+
model.PromptID = this.record.ID;
|
|
1630
|
+
}
|
|
1631
|
+
const saved = yield model.Save();
|
|
1632
|
+
if (!saved) {
|
|
1633
|
+
console.error('Failed to save prompt model:', model);
|
|
1634
|
+
allSuccessful = false;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
if (allSuccessful) {
|
|
1639
|
+
// Reload the prompt models to get the updated state
|
|
1640
|
+
yield this.loadPromptModels();
|
|
1641
|
+
MJNotificationService.Instance.CreateSimpleNotification('AI prompt and models saved successfully', 'success', 4000);
|
|
1642
|
+
}
|
|
1643
|
+
else {
|
|
1644
|
+
MJNotificationService.Instance.CreateSimpleNotification('AI prompt saved, but some models failed to save', 'warning', 5000);
|
|
1645
|
+
}
|
|
1646
|
+
return allSuccessful;
|
|
1647
|
+
}
|
|
1648
|
+
catch (error) {
|
|
1649
|
+
console.error('Error saving prompt models:', error);
|
|
1650
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error saving prompt models', 'error', 5000);
|
|
1651
|
+
return false;
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* Loads the result selector tree data (categories and prompts)
|
|
1657
|
+
*/
|
|
1658
|
+
loadResultSelectorTreeData() {
|
|
1659
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1660
|
+
this.isLoadingResultSelectorData = true;
|
|
1661
|
+
try {
|
|
1662
|
+
// Load categories and prompts
|
|
1663
|
+
const [categoriesResult, promptsResult] = yield Promise.all([
|
|
1664
|
+
new RunView().RunView({
|
|
1665
|
+
EntityName: 'AI Prompt Categories',
|
|
1666
|
+
OrderBy: 'Name ASC',
|
|
1667
|
+
ResultType: 'entity_object'
|
|
1668
|
+
}),
|
|
1669
|
+
new RunView().RunView({
|
|
1670
|
+
EntityName: 'AI Prompts',
|
|
1671
|
+
ExtraFilter: 'Status=\'Active\'',
|
|
1672
|
+
OrderBy: 'Name ASC',
|
|
1673
|
+
ResultType: 'entity_object'
|
|
1674
|
+
})
|
|
1675
|
+
]);
|
|
1676
|
+
const categories = categoriesResult.Results || [];
|
|
1677
|
+
const prompts = promptsResult.Results || [];
|
|
1678
|
+
// Build tree structure
|
|
1679
|
+
this.resultSelectorTreeData = this.buildResultSelectorTree(categories, prompts);
|
|
1680
|
+
}
|
|
1681
|
+
catch (error) {
|
|
1682
|
+
console.error('Error loading result selector tree data:', error);
|
|
1683
|
+
this.resultSelectorTreeData = [];
|
|
1684
|
+
}
|
|
1685
|
+
finally {
|
|
1686
|
+
this.isLoadingResultSelectorData = false;
|
|
1687
|
+
}
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Builds the tree structure for result selector
|
|
1692
|
+
*/
|
|
1693
|
+
buildResultSelectorTree(categories, prompts) {
|
|
1694
|
+
const tree = [];
|
|
1695
|
+
// Add "Clear Selection" option at the top
|
|
1696
|
+
tree.push({
|
|
1697
|
+
text: '(Clear Selection)',
|
|
1698
|
+
value: null,
|
|
1699
|
+
hasChildren: false,
|
|
1700
|
+
isCategory: false,
|
|
1701
|
+
isClearOption: true
|
|
1702
|
+
});
|
|
1703
|
+
// Create category nodes
|
|
1704
|
+
const categoryMap = new Map();
|
|
1705
|
+
categories.forEach(category => {
|
|
1706
|
+
const node = {
|
|
1707
|
+
text: category.Name,
|
|
1708
|
+
value: null, // Categories don't have values
|
|
1709
|
+
expanded: true,
|
|
1710
|
+
hasChildren: true,
|
|
1711
|
+
items: [],
|
|
1712
|
+
isCategory: true,
|
|
1713
|
+
categoryId: category.ID
|
|
1714
|
+
};
|
|
1715
|
+
categoryMap.set(category.ID, node);
|
|
1716
|
+
// Handle parent-child relationships
|
|
1717
|
+
if (category.ParentID) {
|
|
1718
|
+
const parentNode = categoryMap.get(category.ParentID);
|
|
1719
|
+
if (parentNode) {
|
|
1720
|
+
parentNode.items.push(node);
|
|
1721
|
+
}
|
|
1722
|
+
else {
|
|
1723
|
+
tree.push(node); // Parent not found, add to root
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
else {
|
|
1727
|
+
tree.push(node); // Root category
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
// Collect uncategorized prompts
|
|
1731
|
+
const uncategorizedPrompts = [];
|
|
1732
|
+
// Add prompts to their categories
|
|
1733
|
+
prompts.forEach(prompt => {
|
|
1734
|
+
const promptNode = {
|
|
1735
|
+
text: prompt.Name,
|
|
1736
|
+
value: prompt.ID,
|
|
1737
|
+
hasChildren: false,
|
|
1738
|
+
isCategory: false,
|
|
1739
|
+
promptId: prompt.ID
|
|
1740
|
+
};
|
|
1741
|
+
if (prompt.CategoryID) {
|
|
1742
|
+
const categoryNode = categoryMap.get(prompt.CategoryID);
|
|
1743
|
+
if (categoryNode) {
|
|
1744
|
+
categoryNode.items.push(promptNode);
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
// Category not found, add to uncategorized
|
|
1748
|
+
uncategorizedPrompts.push(promptNode);
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
else {
|
|
1752
|
+
// No category, add to uncategorized
|
|
1753
|
+
uncategorizedPrompts.push(promptNode);
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
// If there are uncategorized prompts, add them to a special section
|
|
1757
|
+
if (uncategorizedPrompts.length > 0) {
|
|
1758
|
+
tree.push({
|
|
1759
|
+
text: 'Uncategorized',
|
|
1760
|
+
value: null,
|
|
1761
|
+
expanded: true,
|
|
1762
|
+
hasChildren: true,
|
|
1763
|
+
items: uncategorizedPrompts,
|
|
1764
|
+
isCategory: true,
|
|
1765
|
+
categoryId: 'uncategorized'
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
return tree;
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* Handles result selector selection
|
|
1772
|
+
*/
|
|
1773
|
+
onResultSelectorChange(value) {
|
|
1774
|
+
this.record.ResultSelectorPromptID = value || null;
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Gets the display name for a prompt ID from the tree data
|
|
1778
|
+
*/
|
|
1779
|
+
getPromptDisplayName(promptId) {
|
|
1780
|
+
if (!promptId)
|
|
1781
|
+
return '';
|
|
1782
|
+
const findPromptInTree = (nodes) => {
|
|
1783
|
+
for (const node of nodes) {
|
|
1784
|
+
if (!node.isCategory && node.value === promptId) {
|
|
1785
|
+
return node.text;
|
|
1786
|
+
}
|
|
1787
|
+
if (node.items && node.items.length > 0) {
|
|
1788
|
+
const found = findPromptInTree(node.items);
|
|
1789
|
+
if (found)
|
|
1790
|
+
return found;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
return '';
|
|
1794
|
+
};
|
|
1795
|
+
return findPromptInTree(this.resultSelectorTreeData);
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Moves a model up in the list
|
|
1799
|
+
*/
|
|
1800
|
+
moveModelUp(index) {
|
|
1801
|
+
if (index > 0 && index < this.promptModels.length) {
|
|
1802
|
+
const model = this.promptModels[index];
|
|
1803
|
+
this.promptModels.splice(index, 1);
|
|
1804
|
+
this.promptModels.splice(index - 1, 0, model);
|
|
1805
|
+
this.updateModelPriorities();
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Moves a model down in the list
|
|
1810
|
+
*/
|
|
1811
|
+
moveModelDown(index) {
|
|
1812
|
+
if (index >= 0 && index < this.promptModels.length - 1) {
|
|
1813
|
+
const model = this.promptModels[index];
|
|
1814
|
+
this.promptModels.splice(index, 1);
|
|
1815
|
+
this.promptModels.splice(index + 1, 0, model);
|
|
1816
|
+
this.updateModelPriorities();
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
* Updates priority values based on array order
|
|
1821
|
+
*/
|
|
1822
|
+
updateModelPriorities() {
|
|
1823
|
+
this.promptModels.forEach((model, index) => {
|
|
1824
|
+
model.Priority = index + 1;
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1828
|
+
AIPromptFormComponentExtended.ɵfac = /*@__PURE__*/ (() => { let ɵAIPromptFormComponentExtended_BaseFactory; return function AIPromptFormComponentExtended_Factory(t) { return (ɵAIPromptFormComponentExtended_BaseFactory || (ɵAIPromptFormComponentExtended_BaseFactory = i0.ɵɵgetInheritedFactory(AIPromptFormComponentExtended)))(t || AIPromptFormComponentExtended); }; })();
|
|
1829
|
+
AIPromptFormComponentExtended.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIPromptFormComponentExtended, selectors: [["mj-ai-prompt-form"]], viewQuery: function AIPromptFormComponentExtended_Query(rf, ctx) { if (rf & 1) {
|
|
1830
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
1831
|
+
} if (rf & 2) {
|
|
1832
|
+
let _t;
|
|
1833
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateEditor = _t.first);
|
|
1834
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 5, consts: [["form", "ngForm"], ["templateEditor", ""], ["mjFillContainer", "", 1, "record-form-container", 3, "bottomMargin", "rightMargin"], ["class", "record-form", "mjFillContainer", "", 4, "ngIf"], [3, "isVisibleChange", "aiPrompt", "isVisible"], ["mjFillContainer", "", 1, "record-form"], [3, "form"], [1, "prompt-main-area", 2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow-y", "auto"], [1, "prompt-header", 2, "flex-shrink", "0", "padding", "20px", "background", "#f8f9fa", "border-bottom", "2px solid #e9ecef"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "gap", "20px"], [2, "flex", "1", "min-width", "0"], [2, "display", "flex", "align-items", "center", "gap", "12px", "margin-bottom", "8px"], [1, "fa-solid", "fa-robot", 2, "color", "#6f42c1", "font-size", "1.4em"], ["name", "promptName", "placeholder", "Enter prompt name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModel"], [2, "display", "flex", "gap", "16px", "margin-bottom", "12px", "flex-wrap", "wrap"], ["name", "promptDescription", "placeholder", "Enter prompt description...", 2, "width", "100%", "max-width", "600px", "margin-bottom", "12px", 3, "ngModel", "rows"], [2, "margin", "0 0 12px 0", "color", "#6c757d", "font-size", "0.9em", "line-height", "1.4"], [1, "quick-config", 2, "display", "flex", "align-items", "center", "gap", "16px", "flex-wrap", "wrap"], [1, "config-item", 2, "display", "flex", "align-items", "center", "gap", "6px", "font-size", "0.85em"], [1, "fa-solid", "fa-layer-group", 2, "color", "#6c757d"], [2, "color", "#6c757d"], [2, "color", "#495057", "font-weight", "500"], [1, "fa-solid", "fa-code", 2, "color", "#6c757d"], [2, "font-weight", "500"], [1, "action-buttons", 2, "display", "flex", "flex-direction", "column", "gap", "8px", "align-items", "flex-end"], [2, "display", "flex", "gap", "8px"], ["themeColor", "primary", "size", "large", "title", "Execute this AI prompt"], ["themeColor", "primary", "size", "large", "title", "Prompt must be Active and have a Template to execute", 3, "disabled"], ["fillMode", "outline", "themeColor", "info", "title", "View execution history"], [2, "font-size", "0.75em", "color", "#dc3545", "text-align", "right", "max-width", "200px"], [1, "configuration-sections", 2, "flex", "1", "background", "white", "border-top", "2px solid #e9ecef", "padding", "16px", "min-height", "0"], [2, "margin-bottom", "12px", 3, "expanded"], ["kendoExpansionPanelTitleDirective", ""], [1, "template-section", 2, "display", "flex", "flex-direction", "column", "min-height", "400px", "padding", "8px"], [1, "loading-state", 2, "flex", "1", "display", "flex", "align-items", "center", "justify-content", "center", "color", "#6c757d"], [1, "no-template-state", 2, "flex", "1", "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "padding", "40px", "color", "#6c757d"], [1, "invalid-template-state", 2, "flex", "1", "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "padding", "40px", "color", "#dc3545"], [1, "template-editor-container", 2, "flex", "1", "display", "flex", "flex-direction", "column", "min-height", "350px"], [2, "padding", "16px 0"], [2, "display", "grid", "grid-template-columns", "1fr 1fr", "gap", "20px"], ["FieldName", "ParallelizationMode", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ParallelCount", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ParallelConfigParam", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "OutputType", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ValidationBehavior", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "EnableCaching", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode"], [2, "margin-bottom", "16px"], [2, "display", "block", "margin-bottom", "4px", "font-weight", "600", "color", "#495057", "font-size", "0.9em"], [2, "color", "#495057"], ["name", "promptName", "placeholder", "Enter prompt name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModelChange", "ngModel"], [2, "margin", "0", "color", "#495057", "font-weight", "600", "flex", "1"], [1, "status-badge", 2, "color", "white", "padding", "4px 10px", "border-radius", "12px", "font-size", "0.75em", "font-weight", "500"], ["name", "promptStatus", "textField", "text", "valueField", "value", 2, "width", "150px", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], [2, "color", "#dc3545"], [2, "padding", "8px", "color", "#6c757d", "font-style", "italic", "width", "200px"], ["name", "promptTypeID", "textField", "Name", "valueField", "ID", "placeholder", "Select prompt type...", 2, "width", "200px", 3, "ngModel", "data", "valuePrimitive", "filterable"], [1, "fa-solid", "fa-spinner", "fa-spin"], ["name", "promptTypeID", "textField", "Name", "valueField", "ID", "placeholder", "Select prompt type...", 2, "width", "200px", 3, "ngModelChange", "ngModel", "data", "valuePrimitive", "filterable"], ["name", "promptDescription", "placeholder", "Enter prompt description...", 2, "width", "100%", "max-width", "600px", "margin-bottom", "12px", 3, "ngModelChange", "ngModel", "rows"], [1, "fa-solid", "fa-tag", 2, "color", "#6c757d"], [1, "fa-solid", "fa-database", 2, "color", "#28a745"], [2, "color", "#28a745", "font-weight", "500"], ["themeColor", "primary", "size", "large", "title", "Execute this AI prompt", 3, "click"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "fa-solid", "fa-history"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [2, "color", "#6c757d", "font-size", "0.9em", "font-weight", "normal"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "24px", "margin-right", "12px"], [1, "fa-solid", "fa-code", 2, "font-size", "64px", "margin-bottom", "20px", "opacity", "0.3"], [2, "margin-bottom", "12px", "color", "#495057"], [2, "margin-bottom", "24px", "text-align", "center", "max-width", "400px"], [2, "display", "flex", "gap", "12px"], ["themeColor", "primary", 3, "click"], [1, "fa-solid", "fa-plus"], ["fillMode", "outline", 3, "click"], [1, "fa-solid", "fa-link"], [1, "fa-solid", "fa-exclamation-triangle", 2, "font-size", "64px", "margin-bottom", "20px", "opacity", "0.7"], [2, "margin-bottom", "12px"], [1, "fa-solid", "fa-refresh"], [2, "flex", "1", "background", "white", "border-radius", "6px", "border", "1px solid #e9ecef"], [2, "display", "block", "min-height", "300px", 3, "contentChange", "runTemplate", "template", "config"], [1, "model-management", 2, "border", "1px solid #dee2e6", "border-radius", "6px", "background", "#f8f9fa"], [1, "loading-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "fa-solid", "fa-microchip", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#17a2b8", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [1, "empty-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "fa-solid", "fa-info-circle"], [2, "margin-top", "10px"], ["fillMode", "outline", "themeColor", "primary", "size", "small", 3, "click"], [1, "model-header", 2, "display", "grid", "grid-template-columns", "40px 2fr 1fr 1fr 60px", "gap", "12px", "padding", "12px 16px", "background", "#e9ecef", "font-weight", "600", "font-size", "0.85em", "color", "#495057", "border-bottom", "1px solid #dee2e6"], [1, "add-model-row", 2, "padding", "12px 16px", "text-align", "center", "background", "#f8f9fa", "border-top", "1px solid #dee2e6"], [1, "model-row", 2, "display", "grid", "grid-template-columns", "40px 2fr 1fr 1fr 60px", "gap", "12px", "padding", "12px 16px", "border-bottom", "1px solid #e9ecef", "align-items", "start"], [1, "drag-handle", 2, "display", "flex", "align-items", "center", "justify-content", "center", "cursor", "move", "color", "#6c757d"], ["title", "Drag to reorder", 1, "fa-solid", "fa-grip-vertical"], [2, "font-size", "0.8em", "color", "#6c757d"], [1, "model-select"], ["textField", "Name", "valueField", "ID", "placeholder", "Select a model...", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], [1, "model-vendor"], [1, "model-created"], [2, "color", "#6c757d", "font-size", "0.8em"], [2, "color", "#28a745", "font-size", "0.8em", "font-style", "italic"], [1, "model-actions", 2, "display", "flex", "gap", "2px", "flex-direction", "column"], [2, "display", "grid", "grid-template-columns", "40px 1fr", "gap", "12px", "padding", "8px 16px", "border-bottom", "1px solid #e9ecef", "background", "#f8f9fa", "font-size", "0.85em", "color", "#6c757d"], [2, "display", "flex", "gap", "16px", "flex-wrap", "wrap", "align-items", "center", "margin-bottom", "8px"], [2, "padding", "8px", "background", "#fff", "border", "1px solid #dee2e6", "border-radius", "4px", "margin-top", "8px"], ["textField", "Name", "valueField", "ID", "placeholder", "Select a model...", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], [2, "color", "#6c757d", "font-style", "italic", "font-size", "0.9em"], ["textField", "Name", "valueField", "ID", "placeholder", "Select vendor...", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], ["textField", "Name", "valueField", "ID", "placeholder", "Select vendor...", 2, "width", "100%", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], ["kendoDropDownListItemTemplate", ""], [2, "font-size", "0.8em", "margin-left", "4px"], [2, "font-size", "0.9em", "font-weight", "500", 3, "color"], [2, "font-size", "0.9em", "font-weight", "500"], [2, "font-size", "0.9em", 3, "color"], [2, "color", "#6c757d", "font-size", "0.9em"], [2, "font-size", "0.9em"], [2, "display", "flex", "gap", "2px", "margin-bottom", "4px"], ["fillMode", "flat", "size", "small", "title", "Move up", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-up"], ["fillMode", "flat", "size", "small", "title", "Move down", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-down"], ["fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove model", 3, "click"], [1, "fa-solid", "fa-times"], [2, "margin-bottom", "6px", "font-weight", "600", "color", "#495057", "font-size", "0.9em"], [1, "fa-solid", "fa-layer-group"], [2, "display", "grid", "grid-template-columns", "1fr 1fr 1fr", "gap", "12px", "align-items", "center"], [2, "display", "flex", "gap", "16px", "flex-wrap", "wrap", "align-items", "center"], [2, "display", "block", "margin-bottom", "2px", "font-size", "0.8em", "font-weight", "600", "color", "#495057"], ["textField", "text", "valueField", "value", "placeholder", "Select mode...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive"], ["placeholder", "Count...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name", "min", "step", "format"], ["placeholder", "Parameter name...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name"], ["fillMode", "outline", "themeColor", "success", "size", "small", 3, "click"], [1, "fa-solid", "fa-cogs", 2, "color", "#6c757d"], [2, "padding", "8px", "color", "#6c757d", "font-style", "italic"], ["name", "resultSelectorPromptID", "textField", "text", "valueField", "value", "placeholder", "Select a result selector prompt...", 2, "width", "100%", 3, "ngModel", "data", "valuePrimitive", "filterable"], ["name", "resultSelectorPromptID", "textField", "text", "valueField", "value", "placeholder", "Select a result selector prompt...", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "data", "valuePrimitive", "filterable"], [2, "padding", "16px"], [2, "background", "#f8f9fa", "border", "1px solid #dee2e6", "border-radius", "4px", "padding", "12px", "font-family", "'Courier New', monospace", "font-size", "0.9em", "white-space", "pre-wrap", "overflow", "auto", "max-height", "250px"], [2, "background", "#fff3cd", "border", "1px solid #ffeaa7", "border-radius", "4px", "padding", "12px", "color", "#856404", "text-align", "center"], [2, "color", "#dc3545", "font-size", "0.8em", "font-weight", "normal"], ["name", "outputExample", "language", "json", "placeholder", "Enter JSON example structure...", 2, "width", "100%", "height", "200px", "border", "1px solid #dee2e6", "border-radius", "4px", 3, "ngModelChange", "ngModel"], [2, "margin-top", "8px", "color", "#6c757d", "font-size", "0.85em"], [2, "height", "300px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode", "BottomMargin"], [1, "fa-solid", "fa-history", 2, "color", "#6c757d"], [1, "fa-solid", "fa-database", 2, "color", "#6c757d"], [2, "margin", "0 0 12px 0", "color", "#495057"], [2, "height", "200px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode", "BottomMargin"], [1, "fa-solid", "fa-link", 2, "color", "#6c757d"]], template: function AIPromptFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
|
|
1835
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
1836
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Template, 65, 36, "form", 3);
|
|
1837
|
+
i0.ɵɵelementStart(2, "mj-ai-prompt-execution-dialog", 4);
|
|
1838
|
+
i0.ɵɵtwoWayListener("isVisibleChange", function AIPromptFormComponentExtended_Template_mj_ai_prompt_execution_dialog_isVisibleChange_2_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.showExecutionDialog, $event) || (ctx.showExecutionDialog = $event); return $event; });
|
|
1839
|
+
i0.ɵɵelementEnd()();
|
|
1840
|
+
} if (rf & 2) {
|
|
1841
|
+
i0.ɵɵproperty("bottomMargin", 20)("rightMargin", 5);
|
|
1842
|
+
i0.ɵɵadvance();
|
|
1843
|
+
i0.ɵɵproperty("ngIf", ctx.record);
|
|
1844
|
+
i0.ɵɵadvance();
|
|
1845
|
+
i0.ɵɵproperty("aiPrompt", ctx.record);
|
|
1846
|
+
i0.ɵɵtwoWayProperty("isVisible", ctx.showExecutionDialog);
|
|
1847
|
+
} }, dependencies: [i1.NgIf, i2.ɵNgNoValidate, i2.NgControlStatus, i2.NgControlStatusGroup, i2.NgModel, i2.NgForm, i3.ExpansionPanelComponent, i3.ExpansionPanelTitleDirective, i4.TextAreaComponent, i4.TextBoxComponent, i4.NumericTextBoxComponent, i5.ItemTemplateDirective, i5.DropDownListComponent, i5.DropDownTreeComponent, i6.ButtonComponent, i7.UserViewGridComponent, i8.MJFormField, i9.FormToolbarComponent, i10.FillContainer, i11.CodeEditorComponent, i12.TemplateEditorComponent, i13.AIPromptExecutionDialogComponent, i1.DatePipe], styles: [".record-form-container[_ngcontent-%COMP%] {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 10px;\n}\n\n.custom-toolbar-actions[_ngcontent-%COMP%] {\n margin-left: auto;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n\n.config-summary[_ngcontent-%COMP%] {\n position: sticky;\n top: 0;\n max-height: 600px;\n overflow-y: auto;\n}\n\n.config-item[_ngcontent-%COMP%] {\n padding: 8px 0;\n border-bottom: 1px solid #e9ecef;\n}\n\n.config-item[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.template-tab-content[_ngcontent-%COMP%] {\n background: #fff;\n}\n\n.template-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n font-size: 1.1em;\n}\n\n.loading-state[_ngcontent-%COMP%], \n.no-template-state[_ngcontent-%COMP%], \n.invalid-template-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.no-template-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.invalid-template-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n opacity: 0.6;\n}\n\n.template-editor-container[_ngcontent-%COMP%] {\n background: #fff;\n border-radius: 6px;\n}\n\n\n\n@media (max-width: 1200px) {\n .record-form-container[_ngcontent-%COMP%] .mj-tab-body[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n grid-template-columns: 1fr !important;\n gap: 20px;\n }\n \n .config-summary[_ngcontent-%COMP%] {\n order: -1;\n position: static;\n max-height: none;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .custom-toolbar-actions[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 4px !important;\n }\n \n .status-badge[_ngcontent-%COMP%] {\n align-self: flex-start;\n }\n}\n\n\n\n.record-form-container[_ngcontent-%COMP%] mj-form-section[_ngcontent-%COMP%] {\n padding: 16px;\n}\n\n\n\n.status-badge[_ngcontent-%COMP%], \n.config-item[_ngcontent-%COMP%], \n.template-header[_ngcontent-%COMP%] {\n transition: all 0.2s ease;\n}\n\n.config-item[_ngcontent-%COMP%]:hover {\n background-color: rgba(0,0,0,0.02);\n border-radius: 4px;\n margin: 0 -8px;\n padding: 8px;\n}"] });
|
|
1848
|
+
AIPromptFormComponentExtended = __decorate([
|
|
1849
|
+
RegisterClass(BaseFormComponent, 'AI Prompts')
|
|
1850
|
+
], AIPromptFormComponentExtended);
|
|
1851
|
+
export { AIPromptFormComponentExtended };
|
|
1852
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIPromptFormComponentExtended, [{
|
|
1853
|
+
type: Component,
|
|
1854
|
+
args: [{ selector: 'mj-ai-prompt-form', template: "<div class=\"record-form-container\" mjFillContainer [bottomMargin]=\"20\" [rightMargin]=\"5\">\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\" mjFillContainer>\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Main Content Area - Template Editor and Configuration -->\n <div class=\"prompt-main-area\" style=\"display: flex; flex-direction: column; height: 100%; overflow-y: auto;\">\n \n <!-- Header Section -->\n <div class=\"prompt-header\" style=\"flex-shrink: 0; padding: 20px; background: #f8f9fa; border-bottom: 2px solid #e9ecef;\">\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;\">\n \n <!-- Left: Prompt Info -->\n <div style=\"flex: 1; min-width: 0;\">\n <div style=\"display: flex; align-items: center; gap: 12px; margin-bottom: 8px;\">\n <i class=\"fa-solid fa-robot\" style=\"color: #6f42c1; font-size: 1.4em;\"></i>\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" \n name=\"promptName\"\n placeholder=\"Enter prompt name...\"\n style=\"font-size: 1.2em; font-weight: 600; min-width: 300px; flex: 1;\">\n </kendo-textbox>\n } @else {\n <h4 style=\"margin: 0; color: #495057; font-weight: 600; flex: 1;\">{{ record.Name || 'Untitled AI Prompt' }}</h4>\n <span class=\"status-badge\" [style.background-color]=\"getStatusBadgeColor()\" \n style=\"color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.75em; font-weight: 500;\">\n {{ record.Status }}\n </span>\n }\n </div>\n \n <!-- Status and Type Editors when in edit mode -->\n @if (EditMode) {\n <div style=\"display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap;\">\n <div>\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">Status</label>\n <kendo-dropdownlist [(ngModel)]=\"record.Status\"\n name=\"promptStatus\"\n [data]=\"[{text: 'Active', value: 'Active'}, {text: 'Pending', value: 'Pending'}, {text: 'Disabled', value: 'Disabled'}]\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n style=\"width: 150px;\">\n </kendo-dropdownlist>\n </div>\n <div>\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n Type <span style=\"color: #dc3545;\">*</span>\n </label>\n @if (isLoadingPromptTypes) {\n <div style=\"padding: 8px; color: #6c757d; font-style: italic; width: 200px;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading types...\n </div>\n } @else {\n <kendo-dropdownlist [(ngModel)]=\"record.TypeID\"\n name=\"promptTypeID\"\n [data]=\"availablePromptTypes\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select prompt type...\"\n style=\"width: 200px;\">\n </kendo-dropdownlist>\n }\n </div>\n </div>\n }\n \n @if (EditMode) {\n <kendo-textarea [(ngModel)]=\"record.Description\" \n name=\"promptDescription\"\n [rows]=\"2\"\n placeholder=\"Enter prompt description...\"\n style=\"width: 100%; max-width: 600px; margin-bottom: 12px;\">\n </kendo-textarea>\n } @else if (record.Description) {\n <p style=\"margin: 0 0 12px 0; color: #6c757d; font-size: 0.9em; line-height: 1.4;\">{{ record.Description }}</p>\n }\n \n <!-- Quick Config Row -->\n <div class=\"quick-config\" style=\"display: flex; align-items: center; gap: 16px; flex-wrap: wrap;\">\n @if (record.TypeID) {\n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-tag\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Type:</span>\n <span style=\"color: #495057; font-weight: 500;\">{{ getPromptTypeDisplayName(record.TypeID) }}</span>\n </div>\n }\n \n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-layer-group\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Parallelization:</span>\n <span style=\"color: #495057; font-weight: 500;\">{{ getParallelizationModeDisplay() }}</span>\n </div>\n \n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Output:</span>\n <span [style.color]=\"getValidationColor()\" style=\"font-weight: 500;\">{{ getOutputTypeDisplay() }}</span>\n </div>\n \n @if (record.EnableCaching) {\n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-database\" style=\"color: #28a745;\"></i>\n <span style=\"color: #28a745; font-weight: 500;\">Caching Enabled</span>\n </div>\n }\n </div>\n </div>\n \n <!-- Right: Action Buttons -->\n <div class=\"action-buttons\" style=\"display: flex; flex-direction: column; gap: 8px; align-items: flex-end;\">\n <div style=\"display: flex; gap: 8px;\">\n @if (record.ID && canExecute) {\n <kendo-button themeColor=\"primary\" size=\"large\"\n (click)=\"executeAIPrompt()\"\n title=\"Execute this AI prompt\">\n <i class=\"fa-solid fa-play\"></i> Execute Prompt\n </kendo-button>\n } @else if (record.ID && !canExecute) {\n <kendo-button themeColor=\"primary\" size=\"large\" [disabled]=\"true\"\n title=\"Prompt must be Active and have a Template to execute\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i> Cannot Execute\n </kendo-button>\n }\n \n @if (record.ID) {\n <kendo-button fillMode=\"outline\" themeColor=\"info\"\n title=\"View execution history\">\n <i class=\"fa-solid fa-history\"></i> History\n </kendo-button>\n }\n </div>\n \n @if (!canExecute && record.ID) {\n <div style=\"font-size: 0.75em; color: #dc3545; text-align: right; max-width: 200px;\">\n @if (record.Status !== 'Active') {\n \u2022 Prompt must be Active<br>\n }\n @if (!record.TemplateID) {\n \u2022 Template is required<br>\n }\n @if (!template && record.TemplateID) {\n \u2022 Template not found<br>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Configuration Sections with Expansion Panels -->\n <div class=\"configuration-sections\" style=\"flex: 1; background: white; border-top: 2px solid #e9ecef; padding: 16px; min-height: 0;\">\n <!-- Template Editor Section -->\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n Template Editor\n @if (template) {\n <span style=\"color: #6c757d; font-size: 0.9em; font-weight: normal;\">\u2022 {{ template.Name }}</span>\n }\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div class=\"template-section\" style=\"display: flex; flex-direction: column; min-height: 400px; padding: 8px;\">\n @if (isLoadingTemplate) {\n <div class=\"loading-state\" style=\"flex: 1; display: flex; align-items: center; justify-content: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 24px; margin-right: 12px;\"></i>\n Loading template...\n </div>\n } @else if (!record.TemplateID) {\n <div class=\"no-template-state\" style=\"flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-code\" style=\"font-size: 64px; margin-bottom: 20px; opacity: 0.3;\"></i>\n <h5 style=\"margin-bottom: 12px; color: #495057;\">No Template Associated</h5>\n <p style=\"margin-bottom: 24px; text-align: center; max-width: 400px;\">\n This AI prompt needs a template to define its structure and parameters. \n Create a new template or link to an existing one.\n </p>\n <div style=\"display: flex; gap: 12px;\">\n <kendo-button themeColor=\"primary\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </kendo-button>\n <kendo-button fillMode=\"outline\" (click)=\"linkExistingTemplate()\">\n <i class=\"fa-solid fa-link\"></i> Link Existing Template\n </kendo-button>\n </div>\n </div>\n } @else if (!template) {\n <div class=\"invalid-template-state\" style=\"flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #dc3545;\">\n <i class=\"fa-solid fa-exclamation-triangle\" style=\"font-size: 64px; margin-bottom: 20px; opacity: 0.7;\"></i>\n <h5 style=\"margin-bottom: 12px;\">Template Not Found</h5>\n <p style=\"margin-bottom: 24px; text-align: center; max-width: 400px;\">\n The referenced template could not be loaded. It may have been deleted or moved.\n </p>\n <div style=\"display: flex; gap: 12px;\">\n <kendo-button fillMode=\"outline\" (click)=\"loadTemplate()\">\n <i class=\"fa-solid fa-refresh\"></i> Retry Loading\n </kendo-button>\n <kendo-button themeColor=\"primary\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </kendo-button>\n </div>\n </div>\n } @else {\n <!-- Active Template Editor -->\n <div class=\"template-editor-container\" style=\"flex: 1; display: flex; flex-direction: column; min-height: 350px;\">\n <!-- Template Editor -->\n <div style=\"flex: 1; background: white; border-radius: 6px; border: 1px solid #e9ecef;\">\n <mj-template-editor \n #templateEditor\n [template]=\"template\"\n [config]=\"templateEditorConfig\"\n (contentChange)=\"onTemplateContentChange($event)\"\n (runTemplate)=\"onTemplateRun($event)\"\n style=\"display: block; min-height: 300px;\">\n </mj-template-editor>\n </div>\n </div>\n }\n </div>\n </kendo-expansionpanel> \n\n <!-- Model Configuration Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-microchip\" style=\"color: #6c757d;\"></i>\n Models\n @if (promptModels.length > 0) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ promptModels.length }}\n </span>\n }\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <!-- Model Management Interface -->\n <div class=\"model-management\" style=\"border: 1px solid #dee2e6; border-radius: 6px; background: #f8f9fa;\">\n @if (isLoadingModels) {\n <div class=\"loading-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading models...\n </div>\n } @else {\n @if (promptModels.length === 0) {\n <div class=\"empty-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i> No models configured\n @if (EditMode) {\n <div style=\"margin-top: 10px;\">\n <kendo-button fillMode=\"outline\" themeColor=\"primary\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </kendo-button>\n </div>\n }\n </div>\n } @else {\n <!-- Column Headers -->\n <div class=\"model-header\" style=\"display: grid; grid-template-columns: 40px 2fr 1fr 1fr 60px; gap: 12px; padding: 12px 16px; background: #e9ecef; font-weight: 600; font-size: 0.85em; color: #495057; border-bottom: 1px solid #dee2e6;\">\n <div></div>\n <div>AI Model <span style=\"color: #dc3545;\">*</span></div>\n <div>Vendor</div>\n <div>Created</div>\n <div>Actions</div>\n </div>\n \n @for (model of promptModels; track model.ID || $index; let i = $index) {\n <div class=\"model-row\" \n [style.background]=\"!model.ModelID ? '#fff3cd' : 'white'\"\n [style.border-left]=\"!model.ModelID ? '3px solid #ffc107' : 'none'\"\n style=\"display: grid; grid-template-columns: 40px 2fr 1fr 1fr 60px; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e9ecef; align-items: start;\">\n \n <!-- Drag Handle -->\n <div class=\"drag-handle\" style=\"display: flex; align-items: center; justify-content: center; cursor: move; color: #6c757d;\">\n @if (EditMode) {\n <i class=\"fa-solid fa-grip-vertical\" title=\"Drag to reorder\"></i>\n } @else {\n <span style=\"font-size: 0.8em; color: #6c757d;\">{{ i + 1 }}</span>\n }\n </div>\n \n <!-- Model Selection -->\n <div class=\"model-select\">\n @if (EditMode) {\n <kendo-dropdownlist [(ngModel)]=\"model.ModelID\"\n [name]=\"'modelId_' + i\"\n [data]=\"availableModels\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select a model...\"\n (valueChange)=\"onModelChange($event, i)\"\n style=\"width: 100%;\">\n </kendo-dropdownlist>\n } @else {\n <span style=\"font-weight: 500;\">{{ getModelDisplayName(model.ModelID) }}</span>\n }\n </div>\n \n <!-- Vendor -->\n <div class=\"model-vendor\">\n @if (EditMode) {\n @if (model.ModelID) {\n @if (shouldShowVendorDropdown(model.ModelID)) {\n <kendo-dropdownlist [(ngModel)]=\"model.VendorID\"\n [name]=\"'vendorId_' + i\"\n [data]=\"getVendorsForModelSync(model.ModelID)\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select vendor...\"\n style=\"width: 100%;\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span [style.color]=\"getVendorStatusColor(model.ModelID, dataItem.ID)\">\n {{ dataItem.Name }}\n @if (getModelVendorStatus(model.ModelID, dataItem.ID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, dataItem.ID) }})</span>\n }\n </span>\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n <!-- Single vendor - just show the name -->\n @if (getVendorsForModelSync(model.ModelID).length === 1) {\n <span [style.color]=\"getVendorStatusColor(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID)\" style=\"font-size: 0.9em; font-weight: 500;\">\n {{ getVendorsForModelSync(model.ModelID)[0].Name }}\n @if (getModelVendorStatus(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID) }})</span>\n }\n </span>\n } @else {\n <span style=\"color: #6c757d; font-style: italic; font-size: 0.9em;\">No vendors available</span>\n }\n }\n } @else {\n <span style=\"color: #6c757d; font-style: italic; font-size: 0.9em;\">Select model first</span>\n }\n } @else {\n @if (model.VendorID && model.ModelID) {\n <span [style.color]=\"getVendorStatusColor(model.ModelID, model.VendorID)\" style=\"font-size: 0.9em;\">\n {{ getVendorDisplayName(model.VendorID) }}\n @if (getModelVendorStatus(model.ModelID, model.VendorID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, model.VendorID) }})</span>\n }\n </span>\n } @else {\n <span style=\"color: #6c757d; font-size: 0.9em;\">-</span>\n }\n }\n </div>\n \n \n <!-- Created Date -->\n <div class=\"model-created\">\n @if (model.ID) {\n <span style=\"color: #6c757d; font-size: 0.8em;\">{{ model.__mj_CreatedAt | date:'short' }}</span>\n } @else {\n <span style=\"color: #28a745; font-size: 0.8em; font-style: italic;\">New</span>\n }\n </div>\n \n <!-- Actions -->\n <div class=\"model-actions\" style=\"display: flex; gap: 2px; flex-direction: column;\">\n @if (EditMode) {\n <div style=\"display: flex; gap: 2px; margin-bottom: 4px;\">\n <kendo-button fillMode=\"flat\" size=\"small\"\n (click)=\"moveModelUp(i)\"\n [disabled]=\"i === 0\"\n title=\"Move up\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </kendo-button>\n <kendo-button fillMode=\"flat\" size=\"small\"\n (click)=\"moveModelDown(i)\"\n [disabled]=\"i === promptModels.length - 1\"\n title=\"Move down\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </kendo-button>\n </div>\n <kendo-button fillMode=\"flat\" themeColor=\"error\" size=\"small\"\n (click)=\"removePromptModel(i)\"\n title=\"Remove model\">\n <i class=\"fa-solid fa-times\"></i>\n </kendo-button>\n }\n </div>\n </div>\n \n <!-- Second row with additional details -->\n <div style=\"display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #e9ecef; background: #f8f9fa; font-size: 0.85em; color: #6c757d;\">\n <div></div>\n <div>\n <!-- Basic model details -->\n <div style=\"display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 8px;\">\n @if (model.Status) {\n <span><strong>Status:</strong> {{ model.Status }}</span>\n }\n @if (model.ConfigurationID) {\n <span><strong>Configuration:</strong> {{ model.ConfigurationID }}</span>\n }\n </div>\n \n <!-- Parallel execution fields when prompt is ModelSpecific -->\n @if (record.ParallelizationMode === 'ModelSpecific') {\n <div style=\"padding: 8px; background: #fff; border: 1px solid #dee2e6; border-radius: 4px; margin-top: 8px;\">\n <div style=\"margin-bottom: 6px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n <i class=\"fa-solid fa-layer-group\"></i> Model-Specific Parallel Execution\n </div>\n \n @if (EditMode) {\n <div style=\"display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center;\">\n <!-- Parallel Mode -->\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Parallel Mode</label>\n <kendo-dropdownlist [(ngModel)]=\"model.ParallelizationMode\"\n [name]=\"'parallelMode_' + i\"\n [data]=\"[{text: 'None', value: 'None'}, {text: 'Static Count', value: 'StaticCount'}, {text: 'Config Param', value: 'ConfigParam'}]\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n placeholder=\"Select mode...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-dropdownlist>\n </div>\n \n <!-- Parallel Count (when StaticCount) -->\n @if (model.ParallelizationMode === 'StaticCount') {\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Parallel Count</label>\n <kendo-numerictextbox [(ngModel)]=\"model.ParallelCount\"\n [name]=\"'parallelCount_' + i\"\n [min]=\"1\"\n [step]=\"1\"\n [format]=\"'n0'\"\n placeholder=\"Count...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-numerictextbox>\n </div>\n }\n \n <!-- Config Param (when ConfigParam) -->\n @if (model.ParallelizationMode === 'ConfigParam') {\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Config Parameter</label>\n <kendo-textbox [(ngModel)]=\"model.ParallelConfigParam\"\n [name]=\"'parallelConfigParam_' + i\"\n placeholder=\"Parameter name...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-textbox>\n </div>\n }\n </div>\n } @else {\n <!-- Read-only display -->\n <div style=\"display: flex; gap: 16px; flex-wrap: wrap; align-items: center;\">\n @if (model.ParallelizationMode) {\n <span><strong>Parallel Mode:</strong> {{ model.ParallelizationMode }}</span>\n }\n @if (model.ParallelCount) {\n <span><strong>Parallel Count:</strong> {{ model.ParallelCount }}</span>\n }\n @if (model.ParallelConfigParam) {\n <span><strong>Config Param:</strong> {{ model.ParallelConfigParam }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n \n @if (EditMode) {\n <div class=\"add-model-row\" style=\"padding: 12px 16px; text-align: center; background: #f8f9fa; border-top: 1px solid #dee2e6;\">\n <kendo-button fillMode=\"outline\" themeColor=\"success\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </kendo-button>\n </div>\n }\n }\n }\n </div>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Advanced Configuration Expansion Panel -->\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-cogs\" style=\"color: #6c757d;\"></i>\n Advanced Configuration\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\n \n <!-- Left Column -->\n <div>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelizationMode\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n @if (showParallelCount) {\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelCount\"\n Type=\"numerictextbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n }\n \n @if (showParallelConfigParam) {\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelConfigParam\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n }\n \n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"OutputType\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n </div>\n \n <!-- Right Column -->\n <div>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ValidationBehavior\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"EnableCaching\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n <!-- Result Selector Prompt with Tree Selector -->\n <div style=\"margin-bottom: 16px;\">\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n Result Selector Prompt\n </label>\n @if (EditMode) {\n @if (isLoadingResultSelectorData) {\n <div style=\"padding: 8px; color: #6c757d; font-style: italic;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading prompts...\n </div>\n } @else {\n <kendo-dropdowntree \n [(ngModel)]=\"record.ResultSelectorPromptID\"\n name=\"resultSelectorPromptID\"\n [data]=\"resultSelectorTreeData\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select a result selector prompt...\"\n style=\"width: 100%;\"\n (valueChange)=\"onResultSelectorChange($event)\">\n </kendo-dropdowntree>\n }\n } @else {\n <span style=\"color: #495057;\">{{ getPromptDisplayName(record.ResultSelectorPromptID || '') || 'None selected' }}</span>\n }\n </div>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n\n <!-- Output Example Expansion Panel (when OutputType = object) -->\n @if (showOutputExample) {\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n Output Example (JSON)\n <span style=\"color: #dc3545; font-size: 0.8em; font-weight: normal;\">\u2022 Required for object output type</span>\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px;\">\n @if (EditMode) {\n <mj-code-editor \n [(ngModel)]=\"record.OutputExample\"\n name=\"outputExample\"\n language=\"json\"\n placeholder=\"Enter JSON example structure...\"\n style=\"width: 100%; height: 200px; border: 1px solid #dee2e6; border-radius: 4px;\">\n </mj-code-editor>\n <div style=\"margin-top: 8px; color: #6c757d; font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\"></i> Provide a JSON example that defines the expected structure for object output validation.\n </div>\n } @else if (record.OutputExample) {\n <div style=\"background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; padding: 12px; font-family: 'Courier New', monospace; font-size: 0.9em; white-space: pre-wrap; overflow: auto; max-height: 250px;\">{{ record.OutputExample }}</div>\n } @else {\n <div style=\"background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 4px; padding: 12px; color: #856404; text-align: center;\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i> Output example is required when output type is 'object'\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Execution History Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-history\" style=\"color: #6c757d;\"></i>\n Execution History\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: AI Prompt Runs','PromptID')\" \n [NewRecordValues]=\"NewRecordValues('MJ: AI Prompt Runs')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"0\"\n style=\"height: 300px;\">\n </mj-user-view-grid>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Cache Expansion Panel -->\n @if (record.IsSaved && record.EnableCaching) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-database\" style=\"color: #6c757d;\"></i>\n Result Cache\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Result Cache','AIPromptID')\" \n [NewRecordValues]=\"NewRecordValues('AI Result Cache')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"0\"\n style=\"height: 300px;\">\n </mj-user-view-grid>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Related Items Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-link\" style=\"color: #6c757d;\"></i>\n Related Items\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\n <!-- AI Agents -->\n <div>\n <h6 style=\"margin: 0 0 12px 0; color: #495057;\">AI Agents Using This Prompt</h6>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: AI Agent Prompts','PromptID')\" \n [NewRecordValues]=\"NewRecordValues('MJ: AI Agent Prompts')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"0\"\n style=\"height: 200px;\">\n </mj-user-view-grid>\n </div>\n \n <!-- Result Selector References -->\n <div>\n <h6 style=\"margin: 0 0 12px 0; color: #495057;\">Prompts Using This as Result Selector</h6>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Prompts','ResultSelectorPromptID')\" \n [NewRecordValues]=\"NewRecordValues('AI Prompts')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"0\"\n style=\"height: 200px;\">\n </mj-user-view-grid>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n }\n </div>\n </div>\n </form>\n\n <!-- AI Prompt Execution Dialog -->\n <mj-ai-prompt-execution-dialog\n [aiPrompt]=\"record\"\n [(isVisible)]=\"showExecutionDialog\">\n </mj-ai-prompt-execution-dialog>\n</div>", styles: [".record-form-container {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 10px;\n}\n\n.custom-toolbar-actions {\n margin-left: auto;\n}\n\n.status-badge {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n\n.config-summary {\n position: sticky;\n top: 0;\n max-height: 600px;\n overflow-y: auto;\n}\n\n.config-item {\n padding: 8px 0;\n border-bottom: 1px solid #e9ecef;\n}\n\n.config-item:last-child {\n border-bottom: none;\n}\n\n.template-tab-content {\n background: #fff;\n}\n\n.template-header h5 {\n font-size: 1.1em;\n}\n\n.loading-state,\n.no-template-state,\n.invalid-template-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.no-template-state i,\n.invalid-template-state i {\n opacity: 0.6;\n}\n\n.template-editor-container {\n background: #fff;\n border-radius: 6px;\n}\n\n/* Grid layout adjustments */\n@media (max-width: 1200px) {\n .record-form-container .mj-tab-body > div {\n grid-template-columns: 1fr !important;\n gap: 20px;\n }\n \n .config-summary {\n order: -1;\n position: static;\n max-height: none;\n }\n}\n\n/* Responsive toolbar */\n@media (max-width: 768px) {\n .custom-toolbar-actions {\n flex-direction: column;\n gap: 4px !important;\n }\n \n .status-badge {\n align-self: flex-start;\n }\n}\n\n/* Ensure proper spacing in form sections */\n.record-form-container mj-form-section {\n padding: 16px;\n}\n\n/* Smooth transitions for better UX */\n.status-badge,\n.config-item,\n.template-header {\n transition: all 0.2s ease;\n}\n\n.config-item:hover {\n background-color: rgba(0,0,0,0.02);\n border-radius: 4px;\n margin: 0 -8px;\n padding: 8px;\n}"] }]
|
|
1855
|
+
}], null, { templateEditor: [{
|
|
1856
|
+
type: ViewChild,
|
|
1857
|
+
args: ['templateEditor']
|
|
1858
|
+
}] }); })();
|
|
1859
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIPromptFormComponentExtended, { className: "AIPromptFormComponentExtended", filePath: "src/lib/custom/AIPrompts/ai-prompt-form.component.ts", lineNumber: 16 }); })();
|
|
1860
|
+
export function LoadAIPromptFormComponentExtended() {
|
|
1861
|
+
// This function ensures the class isn't tree-shaken and registers it with MemberJunction
|
|
1862
|
+
}
|
|
1863
|
+
//# sourceMappingURL=ai-prompt-form.component.js.map
|