PageSourceSearch

https://app.chatbotxl.com/926.a8acaabed903065f.js

js chatbotxl.com collected 2026-09-24 13:47:30 UTC 9,690 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbotpenguin=self.webpackChunkbotpenguin||[]).push([[926],{1926:(R,p,a)=>{a.r(p),a.d(p,{McpTrainingComponent:()=>D});var r=a(10467),_=a(60177),u=a(34813),m=a(95639),t=a(54438),h=a(59982),g=a(95684),T=a(30639),f=a(66480),M=a(42578),x=a(966),E=a(67890),v=a(91290),C=a(43928);function b(o,c){if(1&o&&(t.j41(0,"div",1)(1,"div",5)(2,"div",6),t.nrm(3,"img",7),t.k0s(),t.j41(4,"div")(5,"h3",8),t.EFF(6),t.k0s(),t.j41(7,"p",9),t.EFF(8),t.k0s()()()()),2&o){const e=t.XpG();t.R7$(6),t.JRh(e.staticText.mcpPageTitle),t.R7$(2),t.SpI(" ",e.staticText.mcpPageDescription," ")}}function y(o,c){if(1&o){const e=t.RV6();t.j41(0,"section",2)(1,"div",10),t.nrm(2,"img",7),t.k0s(),t.j41(3,"h6",11),t.EFF(4),t.k0s(),t.j41(5,"p",12),t.EFF(6),t.k0s(),t.j41(7,"app-bp-button-v2",13),t.bIt("clickEvent",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.openMcpModal())}),t.k0s()()}if(2&o){const e=t.XpG();t.R7$(4),t.JRh(e.staticText.mcpModalTitle),t.R7$(2),t.JRh(e.staticText.mcpEmptyDescription),t.R7$(),t.Y8G("label",e.staticText.mcpAddFiles)}}function P(o,c){if(1&o&&t.nrm(0,"app-no-data-found",19),2&o){const e=t.XpG(2);t.Y8G("title",e.staticText.mcpNoFilesTitle)("description",e.staticText.mcpNoSearchDescription)}}function O(o,c){if(1&o){const e=t.RV6();t.j41(0,"section",14)(1,"div",15)(2,"app-bp-mui-input",16),t.bIt("inputChange",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.searchEvent(n))}),t.k0s()(),t.j41(3,"app-bp-button-v2",17),t.bIt("clickEvent",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.openMcpModal())}),t.k0s()(),t.j41(4,"app-bp-table",18),t.bIt("inputClickEvent",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.openFile(n))})("actionEvent",function(n){t.eBV(e);const s=t.XpG();return t.Njj(s.actionHandler(n))}),t.k0s(),t.DNE(5,P,1,2,"app-no-data-found",19)}if(2&o){const e=t.XpG();t.R7$(2),t.Y8G("labelText",e.staticText.placeholders.searchHere)("placeholder",e.staticText.placeholders.searchHere)("value",e.searchText),t.R7$(),t.Y8G("label",e.staticText.mcpAddFiles),t.R7$(),t.Y8G("tableData",e.tableData),t.R7$(),t.vxM(5,e.showNoSearchResult?5:-1)}}let D=(()=>{class o{constructor(e,i,n,s){this.sharedService=e,this.languageService=i,this.commonService=n,this.knowledgeBaseService=s,this.searchText="",this.isPageLoading=!1,this.isMcpModalVisible=!1,this.selectedCredentialId="",this.filesList=[],this.filteredFilesList=[],this.selectedFile=null,this.page=1,this.entityId="",this.modal={title:"Delete File",description:"All the training data will be lost and bot will not function properly",subHeading:"Are you sure, you want to delete this file?",show:!1},this.tableData={thead:[{id:"name",text:"File Name",type:"inputText",isToolTip:!0,textEllipse:!0},{id:"uri",text:"Path",type:"inputText",isToolTip:!0,textEllipse:!0},{id:"status",text:"Training Status",type:"status",isToolTip:!1,status:[{status:"TRAINING",class:"processing"},{status:"INPROGRESS",class:"processing"},{status:"COMPLETED",class:"success"},{status:"FAILED",class:"failed"}]},{id:"lastTrainedOn",text:"Last Trained On",type:"inputText",isToolTip:!1},{id:"actions",text:"Actions",type:"actions",isSortable:!1,isToolTip:!1,actions:["delete"]}],tbody:[]},this.staticText=this.languageService.getStaticText().botBuilder2.trainYourBot.otherSources.mcp,this.entityId=this.sharedService.selectedBotMeta?._id||sessionStorage.getItem("currentId")}ngOnInit(){this.initializeStaticText(),this.getMcpFiles()}get showEmptyState(){return!this.filteredFilesList.length&&!this.searchText}get showNoSearchResult(){return!this.filteredFilesList.length&&!!this.searchText}initializeStaticText(){this.tableData={...this.tableData,thead:[{id:"name",text:this.staticText.fileName,type:"inputText",isToolTip:!0,textEllipse:!0},{id:"uri",text:this.staticText.url,type:"inputText",isToolTip:!0,textEllipse:!0},{id:"status",text:this.staticText.trainingStatus,type:"status",isToolTip:!1,status:[{status:"TRAINING",class:"processing"},{status:"INPROGRESS",class:"processing"},{status:"COMPLETED",class:"success"},{status:"FAILED",class:"failed"}]},{id:"lastTrainedOn",text:this.staticText?.lastTrained,type:"inputText",isToolTip:!1},{id:"actions",text:this.staticText?.actions||"Actions",type:"actions",isSortable:!1,isToolTip:!1,actions:["delete"]}]},this.modal={title:this.staticText.deleteModalTitle,description:this.staticText.deleteModalDesc,subHeading:this.staticText.deleteModalSubHeading,show:!1}}getMcpFiles(){var e=this;return(0,r.A)(function*(){e.sharedService.loader("start");const i={searchText:e.searchText,page:e.page,limit:25,slug:"MCP",entityId:e.entityId};try{const n=yield e.knowledgeBaseService.getOtherSourceData(i),s=Array.isArray(n?.files)?n.files:[];
1e.filesList=(s||[]).map(l=>e.mapMcpFile(l)),e.filterFiles()}finally{e.sharedService.loader("stop")}})()}searchEvent(e){this.searchText=(e.target?.value||"").trim().toLowerCase(),this.filterFiles()}openMcpModal(){this.isMcpModalVisible=!0}closeMcpModal(){this.isMcpModalVisible=!1}onTrainingCompleted(e){var i=this;return(0,r.A)(function*(){i.selectedCredentialId=e?.credentialId||i.selectedCredentialId,i.isMcpModalVisible=!1,yield i.getMcpFiles()})()}openFile(e){const i=this.filteredFilesList[e?.index];i?.uri&&window.open(i.uri,"_blank")}actionHandler(e){"delete"===e?.type&&(this.selectedFile=this.filteredFilesList[e.index],this.modal.show=!0)}deleteFile(e){var i=this;return(0,r.A)(function*(){if(!e)return;const n=i.filteredFilesList.find(d=>d._id===e),{entityType:s,entityPlatform:l}=n,I={entityId:i.entityId,entityType:s,entityPlatform:l,updateType:"DELETE",_training:[n._id]};try{return yield i.knowledgeBaseService.deleteFiles(I),i.sharedService.showToast("success","",i.staticText.fileDeletedSuccessfully),!0}catch{return i.sharedService.showToast("error","",i.staticText.failedToDeleteFile),!1}})()}deleteModalHandler(e){var i=this;return(0,r.A)(function*(){i.modal.show=!1,e&&i.selectedFile._id?(yield i.deleteFile(i.selectedFile._id))&&(i.filesList=i.filesList.filter(s=>s._id!==i.selectedFile._id),i.filterFiles(),i.selectedFile=null):i.selectedFile=null})()}filterFiles(){this.filteredFilesList=this.searchText?this.filesList.filter(e=>e.name.toLowerCase().includes(this.searchText)):[...this.filesList],this.tableData={...this.tableData,tbody:this.filteredFilesList}}mapMcpFile(e){const{fileName:i="",fileUrl:n="-"}=e.meta||{},s="INPROGRESS"===e.status?"TRAINING":e.status||"INPROGRESS";return{...e,name:i,uri:n,status:s,lastTrainedOn:this.commonService.formatDate(e.lastTrained||e.updatedAt)}}static#t=this.\u0275fac=function(i){return new(i||o)(t.rXU(h.d),t.rXU(g.g),t.rXU(T.h),t.rXU(f.r))};static#e=this.\u0275cmp=t.VBU({type:o,selectors:[["app-mcp-training"]],standalone:!0,features:[t.aNF],decls:6,vars:9,consts:[[1,"mcp-training-container"],[1,"page-header"],[1,"empty-state","d-flex","flex-column","justify-content-center","align-items-center","text-center"],[3,"closeModal","trainingCompleted","showModal","selectedCredentialId"],[3,"userInput","title","description","showModal","face","subHeading"],[1,"header-copy","d-flex","align-items-start"],[1,"icon-wrapper","d-flex","justify-content-center","align-items-center"],["src","assets/integration-icons/mcp-client.svg","alt","MCP","width","30","height","30"],[1,"title"],[1,"description"],[1,"brand-icon","d-flex","justify-content-center","align-items-center"],[1,"empty-heading"],[1,"empty-desc"],[3,"clickEvent","label"],[1,"table-toolbar","d-flex","flex-column","flex-md-row","justify-content-between","align-items-stretch","align-items-md-center"],[1,"search-input-container"],["type","search",3,"inputChange","labelText","placeholder","value"],["type","primary","buttonSize","md",3,"clickEvent","label"],[3,"inputClickEvent","actionEvent","tableData"],[3,"title","description"]],template:function(i,n){1&i&&(t.j41(0,"section",0),t.DNE(1,b,9,2,"div",1)(2,y,8,3,"section",2)(3,O,6,6),t.j41(4,"app-mcp-resources-modal",3),t.bIt("closeModal",function(){return n.closeMcpModal()})("trainingCompleted",function(l){return n.onTrainingCompleted(l)}),t.k0s(),t.j41(5,"app-modal",4),t.bIt("userInput",function(l){return n.deleteModalHandler(l)}),t.k0s()()),2&i&&(t.R7$(),t.vxM(1,n.showEmptyState?-1:1),t.R7$(),t.vxM(2,n.showEmptyState?2:3),t.R7$(2),t.Y8G("showModal",n.isMcpModalVisible)("selectedCredentialId",n.selectedCredentialId),t.R7$(),t.Y8G("title",n.modal.title)("description",n.modal.description)("showModal",n.modal.show)("face","delete")("subHeading",n.modal.subHeading))},dependencies:[_.MD,u.G,M.z,x.p,E.o,v.v,C.s,m.a],styles:[".mcp-training-container[_ngcontent-%COMP%]{padding-top:1.5rem}.page-header[_ngcontent-%COMP%]{gap:1rem;margin-bottom:1.5rem}.header-copy[_ngcontent-%COMP%]{gap:1rem}.icon-wrapper[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:18px;background:var(--background-neutral-light)}.title[_ngcontent-%COMP%]{font-family:Matter-SemiBold;font-size:20px}.description[_ngcontent-%COMP%]{font-family:Matter-Regular;color:var(--grey-neutral-100);font-size:14px}.table-toolbar[_ngcontent-%COMP%]{margin-bottom:1rem}.search-input-container[_ngcontent-%COMP%]{width:320px}.empty-state[_ngcontent-%COMP%]{width:360px;margin:7rem auto 0}.empty-state[_ngcontent-%COMP%]   .brand-icon[_ngcontent-%COMP%]{width:48px;height:48px;margin:0 auto 1rem;background-color:var(--background-neutral-light);border-radius:.5rem}.empty-state[_ngcontent-%COMP%]   .empty-heading[_ngcontent-%COMP%]{margin-bottom:.6rem;font-family:Matter-SemiBold}.empty-state[_ngcontent-%COMP%]   .empty-desc[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:14px;font-family:Matter-Regular;color:var(---grey-neutral-100)}@media (max-width: 767px){.search-input-container[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{width:100%}}"]})}return o}
1)()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.