PageSourceSearch

https://app.dapta.ai/chunk-RDSHUMXY.js

js dapta.ai collected 2026-09-29 00:05:36 UTC 10,879 bytes, 1 lines download raw bytes

1import{a as W,b as P,c as X}from"./chunk-D3OIRDRZ.js";import"./chunk-YZZ6CKB3.js";import{Ka as K}from"./chunk-KMATS7MR.js";import"./chunk-SOWBZJHY.js";import"./chunk-5PPGBWZY.js";import"./chunk-AJIXN4TP.js";import"./chunk-W2WMVSUV.js";import"./chunk-Z5IDDGYY.js";import"./chunk-QPSR7IOW.js";import"./chunk-EW7HN6J6.js";import"./chunk-77A7GLJT.js";import"./chunk-NU5RVLAA.js";import"./chunk-4ZVJIHHJ.js";import"./chunk-FQIDAGIB.js";import"./chunk-3RVQ53QU.js";import"./chunk-7ZBURVDA.js";import"./chunk-7SYR2AQN.js";import"./chunk-2WBHW3LQ.js";import"./chunk-6L2VFEGZ.js";import"./chunk-CZWE744E.js";import"./chunk-QDRIPFVV.js";import"./chunk-HH446EG3.js";import"./chunk-X4XHRKJK.js";import"./chunk-OUVDWREM.js";import"./chunk-WWYUABQM.js";import"./chunk-DGOHN5MI.js";import"./chunk-P6TIZVOU.js";import{a as J}from"./chunk-DRMZ367D.js";import"./chunk-UVNRP7DL.js";import"./chunk-MPKK35XZ.js";import"./chunk-4HVR5UFO.js";import"./chunk-CLSAFS5Q.js";import"./chunk-CJXEOJFV.js";import"./chunk-DGJ3RKEZ.js";import"./chunk-4WAUMBH6.js";import"./chunk-DAYZHUJE.js";import"./chunk-KH7K5DGA.js";import"./chunk-THXGMAON.js";import{f as q}from"./chunk-CBOWKMQR.js";import"./chunk-2EYN7LRM.js";import"./chunk-XQXSI2MI.js";import{a as Q}from"./chunk-JZVF4UFD.js";import{a as A}from"./chunk-EBRNEVEB.js";import"./chunk-JFIIL3O5.js";import"./chunk-QCRLQ6PS.js";import"./chunk-A3CGAD34.js";import"./chunk-ACAFCOC3.js";import"./chunk-VO63BEYI.js";import"./chunk-XXUVMEHX.js";import"./chunk-5WAKHBSE.js";import"./chunk-5QZ3NKAH.js";import"./chunk-TRRJULT5.js";import"./chunk-SIVW2O5K.js";import"./chunk-IXYALPCC.js";import"./chunk-X25PQIQX.js";import"./chunk-ATONT6NO.js";import"./chunk-6KLVNBIT.js";import"./chunk-YLMGPHJT.js";import"./chunk-2INMHT5S.js";import"./chunk-TW5YOGRO.js";import"./chunk-AV4I7H6P.js";import{C as H,F as j,g as R,h as $,m as z,q as B,t as G}from"./chunk-3G75FYOC.js";import"./chunk-MIJHCTDG.js";import"./chunk-PZHDZNOO.js";import"./chunk-ICVBEL6B.js";import"./chunk-GGODJQRR.js";import"./chunk-4ZHAVEY3.js";import"./chunk-EVJHW347.js";import"./chunk-ERNNOIEA.js";import"./chunk-BFJOYHTI.js";import"./chunk-SRQR6N6L.js";import"./chunk-7QCXACDV.js";import"./chunk-PQEV5SKX.js";import{Ac as V,Db as C,Fb as u,Hb as d,K as O,La as l,Lb as N,Mb as k,Nb as I,Ta as f,Vc as D,Wa as S,Wb as s,Xc as E,Yb as x,a as y,ab as h,fd as F,la as c,ma as g,mc as v,md as U,rb as i,sb as p,tb as m,vc as M,xc as T}from"./chunk-NMIDHYRA.js";import{k as w}from"./chunk-ZOCHBAGS.js";var Y=e=>({"phone-numbers--popup":e}),Z=e=>({"margin-top--8":e});function ee(e,o){e&1&&(p(0,"h1",13),s(1,"Prompt Logs"),m())}function te(e,o){e&1&&(p(0,"p",14),s(1," Prompt generation logs. "),m())}function oe(e,o){e&1&&s(0,"No prompt logs created.")}function ne(e,o){if(e&1&&(s(0),M(1,"date")),e&2){let a=o.$implicit;x(" ",T(1,1,a.row.created_at,"MMM d, y HH:mm")," ")}}function ae(e,o){if(e&1&&(s(0),M(1,"date")),e&2){let a=o.$implicit;x(" ",T(1,1,a.row.status_updated_at,"MMM d, y HH:mm")," ")}}function re(e,o){if(e&1){let a=C();p(0,"a",17),u("click",function(){c(a);let n=d().$implicit,t=d();return g(t.openPromptLog(n.row.system_prompt))}),s(1," View prompt "),m()}}function ie(e,o){e&1&&(p(0,"span"),s(1,"No prompt"),m())}function pe(e,o){if(e&1&&h(0,re,2,0,"a",15)(1,ie,2,0,"span",16),e&2){let a=o.$implicit;i("ngIf",a.row.system_prompt),l(),i("ngIf",!a.row.system_prompt)}}function se(e,o){if(e&1){let a=C();p(0,"a",17),u("click",function(){c(a);let n=d().$implicit,t=d();return g(t.openPromptLog(n.row.snapshot_system_prompt))}),s(1," View prompt "),m()}}function me(e,o){e&1&&(p(0,"span"),s(1,"No prompt"),m())}function le(e,o){if(e&1&&h(0,se,2,0,"a",15)(1,me,2,0,"span",16),e&2){let a=o.$implicit;i("ngIf",a.row.snapshot_system_prompt),l(),i("ngIf",!a.row.snapshot_system_prompt)}}function _e(e,o){if(e&1){let a=C();p(0,"a",17),u("click",function(){c(a);let n=d().$implicit,t=d();return g(t.openPromptLog(n.row.generated_prompt))}),s(1," View prompt "),m()}}function ce(e,o){e&1&&(p(0,"span"),s(1,"No prompt"),m())}function ge(e,o){if(e&1&&h(0,_e,2,0,"a",15)(1,ce,2,0,"span",16),e&2){let a=o.$implicit;
1i("ngIf",a.row.generated_prompt),l(),i("ngIf",!a.row.generated_prompt)}}var Se=(()=>{let o=class o{constructor(r,n,t,_){this.daptaToastController=r,this.formBuilder=n,this.daptaPopUpController=t,this.agentService=_,this.queryParamsSub=new y,this.loading={},this.tableConfig={pagination:!0,serverPagination:!0,colDefs:[{name:"agent_name",displayName:"Agent"},{name:"agent_context_name",displayName:" Agent Context"},{name:"company_context_name",displayName:"Company Context"},{name:"snapshot_system_prompt",displayName:"Snapshot System Prompt",columnTemplateName:"snapshot_system_prompt"},{name:"generated_prompt",displayName:"Generated Prompt",columnTemplateName:"generated_prompt"},{name:"status",displayName:"Status"},{name:"type",displayName:"Type"},{name:"created_at",displayName:"Created At",columnTemplateName:"created_at"}]},this.phoneNumbers=[],this.popUp=!1,this.loadingPhoneNumbers=!1,this.totalResults=0,this.searchForm=this.formBuilder.group({search:[""]}),this.searchSub=new y,this.currentPage=1}ngOnInit(){this.popUp&&(this.tableConfig.colDefs=[this.tableConfig.colDefs[0],this.tableConfig.colDefs[1]]),this.getPromptLogs(),this.setSearchDebounce()}setSearchDebounce(){this.searchSub=this.searchForm.controls.search.valueChanges.pipe(O(500)).subscribe(r=>{this.getPromptLogs(1,r||"")})}getPromptLogs(r=1,n=""){return w(this,null,function*(){this.loading.promptLogs=!0;let t=yield this.agentService.getPromptLogs(r,n);this.currentPage=r,this.totalResults=t.total_records,this.phoneNumbers=t.records||[],this.loading.promptLogs=!1})}openPromptLog(r){return w(this,null,function*(){this.daptaToastController.startLoading({message:"Loading prompt logs..."});try{let n=yield this.agentService.getPromptUrl(r);this.downloadFileFromUrl(n)}catch{this.daptaToastController.handleError({message:"Error downloading generation prompt"})}this.daptaToastController.stopLoading()})}downloadFileFromUrl(r){let n=document.createElement("a");n.href=r,n.target="_blank",n.click()}};o.\u0275fac=function(n){return new(n||o)(f(Q),f(H),f(A),f(K))},o.\u0275cmp=S({type:o,selectors:[["app-prompt-logs"]],viewQuery:function(n,t){if(n&1&&N(P,5),n&2){let _;k(_=I())&&(t.daptaTableComponent=_.first)}},decls:14,vars:15,consts:[["emptyTemplate",""],[1,"phone-numbers",3,"ngClass"],["class","text--title",4,"ngIf"],["class","margin-top--8",4,"ngIf"],[1,"flex","space-between","margin-top--16",3,"ngClass"],[3,"formGroup"],["formControlName","search","placeholder","Search by agent name","
1icon","pi pi-search",3,"onEnter","onClear","showClear"],["tableClass","phone-numbers__table",3,"pageChange","totalResults","currentPage","dataSource","loading","tableConfig"],["daptaCellTemplate","created_at"],["daptaCellTemplate","updated_at"],["daptaCellTemplate","system_prompt"],["daptaCellTemplate","snapshot_system_prompt"],["daptaCellTemplate","generated_prompt"],[1,"text--title"],[1,"margin-top--8"],["class","pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"pointer",3,"click"]],template:function(n,t){if(n&1){let _=C();p(0,"section",1),h(1,ee,2,0,"h1",2)(2,te,2,0,"p",3),p(3,"div",4)(4,"form",5)(5,"dui-input",6),u("onEnter",function(){let b;return c(_),g(t.getPromptLogs(1,((b=t.searchForm.get("search"))==null?null:b.value)||""))})("onClear",function(){return c(_),g(t.getPromptLogs(1,""))}),m()()(),p(6,"dapta-table",7),u("pageChange",function(b){return c(_),g(t.getPromptLogs(b.currentPage,t.searchForm.value.search||""))}),h(7,oe,1,0,"ng-template",null,0,V)(9,ne,2,4,"ng-template",8)(10,ae,2,4,"ng-template",9)(11,pe,2,2,"ng-template",10)(12,le,2,2,"ng-template",11)(13,ge,2,2,"ng-template",12),m()()}n&2&&(i("ngClass",v(11,Y,t.popUp)),l(),i("ngIf",!t.popUp),l(),i("ngIf",!t.popUp),l(),i("ngClass",v(13,Z,t.popUp)),l(),i("formGroup",t.searchForm),l(),i("showClear",!0),l(),i("totalResults",t.totalResults)("currentPage",t.currentPage)("dataSource",t.phoneNumbers)("loading",t.loadingPhoneNumbers)("tableConfig",t.tableConfig))},dependencies:[X,P,W,J,q,j,z,R,$,B,G,U,D,E,F],styles:[".phone-numbers[_ngcontent-%COMP%]{height:100%;overflow:auto;padding:var(--page-padding)}.phone-numbers--popup[_ngcontent-%COMP%]{padding:0 4px}.phone-numbers__create-agent[_ngcontent-%COMP%]{width:100%;height:100%;margin-top:24px}@media(min-width:800px){.phone-numbers__create-agent[_ngcontent-%COMP%]{text-align:center}}.phone-numbers__create-agent[_ngcontent-%COMP%]   .dapta-button[_ngcontent-%COMP%]{width:100%;max-width:176px;margin-top:8px;font-size:var(--font-size-body)}@media(min-width:800px){.phone-numbers__create-agent[_ngcontent-%COMP%]   .dapta-button[_ngcontent-%COMP%]{font-size:16px;max-width:224px;margin:8px auto 0}}.phone-numbers__create-agent-text[_ngcontent-%COMP%]{font-family:var(--font-family);font-size:var(--font-size-subtitle);font-weight:var(--font-weight-semibold);line-height:var(--line-height-title)}.phone-numbers__description[_ngcontent-%COMP%]{text-overflow:ellipsis;word-wrap:break-word;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}[_nghost-%COMP%]     .filter-input{height:40px!important}[_nghost-%COMP%]     .phone-numbers__table{margin-top:16px;border:none;border-radius:0;border-collapse:collapse;height:min-content}[_nghost-%COMP%]     .phone-numbers__table tr{border:none}[_nghost-%COMP%]     .phone-numbers__table tbody tr{border-bottom:1px solid var(--space-200)}[_nghost-%COMP%]     .phone-numbers__table tbody tr:hover{background-color:var(--space-400)}[_nghost-%COMP%]     .phone-numbers__table th, [_nghost-%COMP%]     .phone-numbers__table td{border:none;font-weight:400;font-size:16px;padding:8px;max-height:40px}[_nghost-%COMP%]     .phone-numbers__table th{background-color:transparent;font-weight:700}[_nghost-%COMP%]     .phone-numbers__table .tableHead{background-color:var(--space-400)}[_nghost-%COMP%]     .phone-numbers__table .skeleton{width:30%;height:auto}[_nghost-%COMP%]     .phone-numbers__table .row-pointer{cursor:pointer}@media screen and (max-width:800px){[_nghost-%COMP%]     .phone-numbers__table{width:100%;display:block}}[_nghost-%COMP%]     .phone-numbers__table .row-pointer{cursor:initial!important}[_nghost-%COMP%]     .phone-numbers__table .created_at, [_nghost-%COMP%]     .phone-numbers__table .description{display:none}@media screen and (min-width:960px){[_nghost-%COMP%]     .phone-numbers__table .created_at, [_nghost-%COMP%]     .phone-numbers__table .description{display:table-cell}}[_nghost-%COMP%]     .phone-numbers__table .clickable{cursor:pointer}[_nghost-%COMP%]     .phone-numbers__table .clickable:hover{color:var(--primary-500)}.options__item[_ngcontent-%COMP%]{padding:8px 12px;text-align:start}.options__item[_ngcontent-%COMP%]:hover{background-color:var(--space-300)}.current[_ngcontent-%COMP%]{color:var(--space-200)}"]});let e=o;return e})();export{Se as PromptLogsComponent};

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.