copilot-usage-studio 0.1.0 → 0.2.1
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/CHANGELOG.md +29 -4
- package/README.md +206 -150
- package/data/github-copilot-pricing.json +34 -6
- package/dist/copilot-usage-studio/browser/chunk-2SAR2Q6M.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-5JYQJM5G.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-7FKLWMFH.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-EWN3YOHT.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-KS5W2HMH.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-OS2XPCVW.js +2 -0
- package/dist/copilot-usage-studio/browser/chunk-U4H425LY.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-VEKXIM47.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-WOIYAEKB.js +4 -0
- package/dist/copilot-usage-studio/browser/chunk-XHID4XVE.js +1 -0
- package/dist/copilot-usage-studio/browser/index.html +11 -11
- package/dist/copilot-usage-studio/browser/main-OZIMQRXC.js +1 -0
- package/dist/copilot-usage-studio/browser/styles-7RDDQXQV.css +1 -0
- package/docs/copilot-memory.md +91 -0
- package/docs/local-deployment.md +119 -13
- package/docs/pricing.md +3 -3
- package/docs/scanner-api.md +32 -3
- package/lib/cli.mjs +15 -1
- package/lib/local-runtime.mjs +530 -19
- package/lib/scanner-worker.mjs +25 -0
- package/package.json +95 -78
- package/scripts/pricing-utils.mjs +5 -0
- package/scripts/scan-vscode-sessions.mjs +418 -1204
- package/scripts/scanner-customization-evidence.mjs +576 -0
- package/scripts/scanner-customization-inventory.mjs +1021 -0
- package/scripts/scanner-memory.mjs +229 -0
- package/scripts/scanner-session-parser.mjs +1237 -0
- package/scripts/scanner-traversal.mjs +203 -0
- package/scripts/scanner-workspace.mjs +209 -0
- package/dist/copilot-usage-studio/browser/chunk-C6VWIY5S.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-DLWQO3VR.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-F6TIG2GE.js +0 -4
- package/dist/copilot-usage-studio/browser/chunk-JIP7ONRZ.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-RNKEPBEU.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-Z3XIAKMM.js +0 -1
- package/dist/copilot-usage-studio/browser/main-C6XOJRSH.js +0 -2
- package/dist/copilot-usage-studio/browser/styles-GZOQ5QIH.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$a as P,Ba as k,Ca as p,Da as g,Ea as D,Fa as b,Ga as S,Ha as h,Ia as a,Ja as i,Ka as I,O as z,Oa as O,P as y,Qa as v,Sa as u,U as E,Ua as w,Va as s,Wa as m,Xa as C,Ya as T,Z as x,Za as V,_a as _,a as F,ab as N,b as $,db as f,ka as r,nb as A,ob as R,sa as q,sb as B,tb as j,ub as W,vb as K,wb as H,xb as Q,yb as G,zb as U}from"./chunk-WOIYAEKB.js";var J=(o,e)=>e.kind+":"+e.path,X=(o,e)=>e.id,Z=(o,e)=>e.sessionId,ee=(o,e)=>e.callNumber,te=(o,e)=>e.key,ne=(o,e)=>e.raw+e.label;function ie(o,e){if(o&1&&(a(0,"span"),s(1),i()),o&2){let t=u(2);r(),m(t.evidenceScanProgressLabel())}}function oe(o,e){if(o&1&&(a(0,"p",34),s(1),i()),o&2){let t=u(2);r(),m(t.activeScanStats())}}function ae(o,e){if(o&1&&(a(0,"span"),s(1),i()),o&2){let t=u(2);r(),C("Running ",t.elapsedScanLabel())}}function se(o,e){if(o&1&&(a(0,"span"),s(1),i()),o&2){let t=u(2);r(),C("Last update ",t.lastProgressLabel()," ago")}}function re(o,e){if(o&1&&(a(0,"div",32)(1,"div")(2,"strong"),s(3),i(),p(4,ie,2,1,"span"),i(),I(5,"progress",33),i(),p(6,oe,2,1,"p",34),a(7,"p",35),p(8,ae,2,1,"span"),p(9,se,2,1,"span"),i()),o&2){let t=u();r(3),m(t.evidenceScanProgressPercent()?t.evidenceScanProgressPercent()+"%":"Working"),r(),g(t.evidenceScanProgressLabel()?4:-1),r(),h("value",t.evidenceScanProgressPercent()||null),r(),g(t.activeScanStats()?6:-1),r(2),g(t.elapsedScanLabel()?8:-1),r(),g(t.lastProgressLabel()?9:-1)}}function ce(o,e){o&1&&(a(0,"p",7),s(1,"This is taking longer than expected. You can stop it; existing data will be kept."),i())}function le(o,e){o&1&&(a(0,"p",7),s(1,"No recent progress update has been received."),i())}function de(o,e){if(o&1){let t=O();a(0,"button",36),v("click",function(){z(t);let c=u();return y(c.cancelScan.emit())}),s(1,"Stop evidence scan"),i()}}function ue(o,e){o&1&&I(0,"span",11)}function me(o,e){if(o&1&&(a(0,"option",27),s(1),i()),o&2){let t=e.$implicit;h("value",t),r(),m(t==="all"?"All workspaces":t)}}function pe(o,e){if(o&1&&(a(0,"div")(1,"b"),s(2),i(),a(3,"code"),s(4),i()()),o&2){let t=e.$implicit,n=u(2);r(2),m(n.diagnosticKindLabel(t.kind)),r(2),m(t.path)}}function ge(o,e){o&1&&(a(0,"p",29),s(1,"Showing the first 80 recorded locations. Generated scan diagnostics are capped."),i())}function Ce(o,e){if(o&1&&(a(0,"div",37),b(1,pe,5,2,"div",null,J),i(),p(3,ge,2,0,"p",29)),o&2){let t=u();r(),S(t.scanDiagnostics().locations),r(2),g(t.scanDiagnostics().capped?3:-1)}}function ve(o,e){o&1&&(a(0,"p",29),s(1,"No source-location details were recorded for this scan. This does not mean no customization files were found."),i())}function xe(o,e){if(o&1){let t=O();a(0,"button",43),v("click",function(){z(t);let c=u(2);return y(c.resetFilters())}),s(1,"Reset"),i()}}function he(o,e){if(o&1){let t=O();a(0,"button",44),v("click",function(){let c=z(t).$implicit,l=u(2);return y(l.selectCustomization(c))}),a(1,"span",45),s(2),i(),a(3,"span",46)(4,"strong"),s(5),i(),a(6,"small"),s(7),i()(),a(8,"span",47)(9,"b"),s(10),i(),a(11,"em"),s(12),i()()()}if(o&2){let t=e.$implicit,n=u(2);w("active",n.selectedCustomizationId()===t.id)("sent",t.evidenceStatus==="sent")("listed",t.evidenceStatus==="listed")("discovered",t.evidenceStatus==="discovered"),r(2),C(" ",n.kindLabel(t.kind).slice(0,1)," "),r(3),m(t.title),r(2),T("",n.fileName(t)," \xB7 ",n.kindLabel(t.kind)),r(3),m(n.statusLabel(t.evidenceStatus)),r(2),m(n.evidenceCountLabel(t))}}function _e(o,e){if(o&1&&(a(0,"span")(1,"b"),s(2,"applyTo"),i(),s(3),i()),o&2){let t=u();r(3),C(" ",t.applyTo.join(", "))}}function fe(o,e){if(o&1&&(a(0,"span")(1,"b"),s(2,"trigger"),i(),s(3),i()),o&2){let t=u();r(3),C(" ",t.triggers.join(", "))}}function be(o,e){if(o&1&&(a(0,"div",54)(1,"span",49),s(2,"Matched customization text"),i(),a(3,"p",57),s(4),i()()),o&2){let t=u();r(4),m(t.description)}}function Se(o,e){if(o&1&&(a(0,"span",69),s(1),i()),o&2){let t=e.$implicit,n=u(6);w("sent",t.status==="sent")("listed",t.status==="listed")("discovered",t.status==="discovered"),k("aria-label",n.timelineMarkerLabel(t)),r(),C(" #",t.callNumber," ")}}function Pe(o,e){if(o&1&&(a(0,"span",68),s(1),i()),o&2){let t=u(2).$implicit,n=u(4);r(),C("+",n.timelineOverflow(t)," more")}}function Me(o,e){if(o&1&&(a(0,"span",63),b(1,Se,2,8,"span",67,ee),p(3,Pe,2,1,"span",68),i()),o&2){let t=u().$implicit,n=u(4);k("aria-label",n.sessionEvidenceLabel(t)),r(),S(n.timelineMarkers(t)),r(2),g(n.timelineOverflow(t)?3:-1)}}function ze(o,e){o&1&&(a(0,"span",64),s(1,"No file text found"),i())}function ye(o,e){if(o&1){let t=O();a(0,"button",43),v("click",function(){z(t);let c=u().$implicit,l=u(4);return y(l.emitOpenSession(c.sessionId))}),s(1,"Open run"),i()}}function Oe(o,e){if(o&1&&(a(0,"blockquote"),s(1),i()),o&2){let t=u().$implicit;r(),C(" ",t.matchedPreview[0]," ")}}function we(o,e){if(o&1&&(a(0,"li")(1,"b"),s(2),i(),a(3,"code"),s(4),i()()),o&2){let t=e.$implicit;r(2),m(t.label),r(2),m(t.raw)}}function Ee(o,e){if(o&1&&(a(0,"article",71)(1,"div",72)(2,"strong"),s(3),i(),a(4,"p"),s(5),i(),p(6,Oe,2,1,"blockquote"),a(7,"details",73)(8,"summary"),s(9),i(),a(10,"div")(11,"span"),s(12,"Visible VS Code log sources"),i(),a(13,"ul"),b(14,we,5,2,"li",null,ne),i()()()()()),o&2){let t=e.$implicit,n=u(6);w("sent",t.status==="sent"),r(3),m(n.callEvidenceTitle(t)),r(2),m(n.callEvidenceSummary(t)),r(),g(t.matchedPreview.length?6:-1),r(3),C("Proof details \xB7 ",n.evidenceDetailsSummary(t)),r(5),S(n.rawEvidenceSources(t))}}function ke(o,e){if(o&1&&(a(0,"div",66),b(1,Ee,16,6,"article",70,te),i()),o&2){let t=u().$implicit,n=u(4);r(),S(n.sentCallEvidence(t))}}function Ie(o,e){if(o&1&&(a(0,"details",60)(1,"summary")(2,"span",61)(3,"time"),s(4),_(5,"date"),i(),a(6,"b"),s(7),i(),a(8,"em"),s(9),i()(),a(10,"span",62),p(11,Me,4,2,"span",63)(12,ze,2,0,"span",64),a(13,"strong"),s(14),i()()(),a(15,"div",65)(16,"p"),s(17),i(),p(18,ye,2,0,"button",40),i(),p(19,ke,3,0,"div",66),i()),o&2){let t=e.$implicit,n=u(4);w("sent",t.bestStatus==="sent")("listed",t.bestStatus==="listed")("discovered",t.bestStatus==="discovered"),r(4),m(N(5,14,t.timestamp,"medium")),r(3),m(t.title),r(2),m(n.evidenceGroupSubtitle(t)),r(2),g(t.bestStatus==="sent"?11:12),r(3),m(n.sessionEvidenceLabel(t)),r(3),C(" ",n.groupDetailSummary(t)," "),r(),g(t.session?18:-1),r(),g(t.bestStatus==="sent"?19:-1)}}function Te(o,e){if(o&1&&(a(0,"section",55)(1,"header")(2,"span",49),s(3,"Where it appeared"),i(),a(4,"h4"),s(5),_(6,"number"),i()(),a(7,"p",58),s(8," Each row is one Copilot session. Open a row for request-level proof. "),i(),b(9,Ie,20,17,"details",59,Z),i()),o&2){let t=u(3);r(5),T("",P(6,2,t.selectedSessionEvidence().length)," session",t.selectedSessionEvidence().length===1?"":"s"),r(4),S(t.selectedSessionEvidence())}}function Le(o,e){if(o&1&&(a(0,"article",42)(1,"header",48)(2,"div")(3,"span",49),s(4),i(),a(5,"h3"),s(6),i(),a(7,"p"),s(8),i()(),a(9,"span",50),s(10),I(11,"app-help-popover",51),i()(),a(12,"div",52)(13,"span")(14,"b"),s(15),_(16,"number"),i(),s(17," characters"),i(),a(18,"span")(19,"b"),s(20),_(21,"number"),i(),s(22," lines"),i(),a(23,"span")(24,"b"),s(25,"updated"),i(),s(26),_(27,"date"),i(),p(28,_e,4,1,"span"),p(29,fe,4,1,"span"),i(),a(30,"section",53)(31,"div")(32,"span",49),s(33,"Detection result"),i(),a(34,"h4"),s(35),i(),a(36,"p"),s(37),i()(),p(38,be,5,1,"div",54),i(),p(39,Te,11,4,"section",55),a(40,"footer",56)(41,"span"),s(42,"Local file"),i(),a(43,"code"),s(44),i()()()),o&2){let t=e,n=u(2);r(4),m(n.kindLabel(t.kind)),r(2),m(t.title),r(2),T("",t.workspace||"Local"," \xB7 ",n.fileName(t)),r(),w("sent",t.evidenceStatus==="sent")("listed",t.evidenceStatus==="listed")("discovered",t.evidenceStatus==="discovered"),r(),C(" ",n.statusLabel(t.evidenceStatus)," "),r(),h("text",n.statusHelp(t.evidenceStatus)),r(4),m(P(16,22,t.characterCount)),r(5),m(P(21,24,t.lineCount)),r(6),C(" ",N(27,26,t.modifiedAt,"mediumDate")),r(2),g(t.applyTo.length?28:-1),r(),g(t.triggers.length?29:-1),r(6),m(n.statusHeadline(t.evidenceStatus)),r(2),m(n.statusHelp(t.evidenceStatus)),r(),g(t.description?38:-1),r(),g(t.matches.length?39:-1),r(5),m(t.sourcePath)}}function Ne(o,e){if(o&1&&(a(0,"section",30)(1,"aside",38)(2,"div",39)(3,"span"),s(4),_(5,"number"),i(),p(6,xe,2,0,"button",40),i(),b(7,he,13,14,"button",41,X),i(),p(9,Le,45,29,"article",42),i()),o&2){let t,n=u();r(4),C("",P(5,3,n.filteredCustomizations().length)," shown"),r(2),g(n.query()||n.kindFilter()!=="all"||n.statusFilter()!=="all"||n.workspaceFilter()!=="all"?6:-1),r(),S(n.filteredCustomizations()),r(2),g((t=n.selectedCustomization())?9:-1,t)}}function Fe(o,e){if(o&1){let t=O();a(0,"button",43),v("click",function(){z(t);let c=u(2);return y(c.resetFilters())}),s(1,"Reset filters"),i()}}function $e(o,e){if(o&1&&(a(0,"section",31)(1,"h3"),s(2),i(),a(3,"p"),s(4),i(),p(5,Fe,2,0,"button",40),i()),o&2){let t=u();r(2),m(t.customizationsInput().length?"No customizations match these filters":"No Copilot customization files found for this workspace"),r(2),C(" ",t.customizationsInput().length?"Try a broader search or reset the filters.":"The scanner checks known Copilot customization locations for the current workspace. Open Advanced scan coverage to inspect source locations."," "),r(),g(t.customizationsInput().length?5:-1)}}var Y=class o{customizationsInput=x([]);sessionsInput=x([]);ingestionInput=x(null);query=x("");kindFilter=x("all");statusFilter=x("all");workspaceFilter=x("all");selectedId=x(null);set customizations(e){let t=e??[];this.customizationsInput.set(t),(!this.selectedId()||!t.some(n=>n.id===this.selectedId()))&&this.selectedId.set(t[0]?.id??null)}set sessions(e){this.sessionsInput.set(e??[])}set ingestion(e){this.ingestionInput.set(e??null)}refreshState="idle";refreshMessage=null;runtimeStatus=null;scanEvidence=new E;cancelScan=new E;openSession=new E;workspaceOptions=f(()=>["all",...[...new Set(this.customizationsInput().map(e=>e.workspace).filter(Boolean))].sort()]);filteredCustomizations=f(()=>{let e=this.query().trim().toLowerCase(),t=this.kindFilter(),n=this.statusFilter(),c=this.workspaceFilter();return this.customizationsInput().filter(l=>(!e||[l.title,l.name,l.description,l.excerpt,l.relativePath,l.sourcePath,l.kind,l.evidenceStatus,l.workspace,...l.applyTo,...l.triggers].join(" ").toLowerCase().includes(e))&&(t==="all"||l.kind===t)&&(n==="all"||l.evidenceStatus===n)&&(c==="all"||l.workspace===c))});selectedCustomization=f(()=>{let e=this.filteredCustomizations();return e.find(t=>t.id===this.selectedId())??e[0]??null});selectedCustomizationId=f(()=>this.selectedCustomization()?.id??"");selectedSessionEvidence=f(()=>{let e=this.selectedCustomization();return e?this.groupMatchesBySession(e):[]});summary=f(()=>{let e=this.customizationsInput();return{total:e.length,sent:e.filter(t=>t.evidenceStatus==="sent").length,listed:e.filter(t=>t.evidenceStatus==="listed").length,discovered:e.filter(t=>t.evidenceStatus==="discovered").length}});scanDiagnostics=f(()=>{let e=this.ingestionInput(),t=(e?.scannedCustomizationLocations??[]).filter(n=>n.kind!=="candidate");return{roots:e?.scannedCustomizationRoots??0,files:e?.importedCustomizations??this.customizationsInput().length,locations:t.slice(0,80),locationCount:t.length,capped:t.length>=200}});customizationEvidenceSummary=f(()=>{let e=this.ingestionInput(),t=this.customizationsInput(),n=t.filter(d=>d.evidenceStatus==="sent").length,c=t.filter(d=>d.evidenceStatus==="listed").length,l=(e?.customizationEvidenceScannedSessions??0)>0;return{sent:n,notProved:c,hasScannedEvidence:l,label:l?`${n.toLocaleString()} text-matched \xB7 ${c.toLocaleString()} read/referenced`:"Detailed evidence skipped"}});scanActionLabel(){return this.refreshState==="refreshing"?"Scanning...":this.customizationEvidenceSummary().hasScannedEvidence?"Find usage evidence again":"Find usage evidence"}isEvidenceScanActive(){return this.refreshState==="refreshing"&&this.runtimeStatus?.activeScanMode==="customizations"}currentWorkspaceLabel(){let e=this.runtimeStatus?.scanProgress?.workspace||"";if(e)return e;let t=this.workspaceOptions().filter(n=>n!=="all");return this.workspaceFilter()!=="all"?this.workspaceFilter():t.length===1?t[0]:"Current VS Code workspace"}customizationFileCountLabel(){let e=this.summary().total;return`${e.toLocaleString()} customization file${e===1?"":"s"}`}requestTextCountLabel(){let e=this.customizationEvidenceSummary();if(this.isEvidenceScanActive())return"Checking recent requests";if(this.refreshState==="error")return"Scan failed";if(this.refreshMessage?.toLowerCase().includes("stopped"))return"Scan stopped";if(!e.hasScannedEvidence)return"Not checked yet";let t=e.sent;return t?`${t.toLocaleString()} file${t===1?"":"s"} with request text`:"No request text found"}evidenceResultText(){if(this.isEvidenceScanActive())return this.currentScanStep();if(this.refreshState==="error")return this.refreshMessage||"The usage evidence scan did not finish.";if(this.refreshMessage?.toLowerCase().includes("stopped"))return"Scan stopped. Existing customization data was kept.";if(this.customizationEvidenceSummary().hasScannedEvidence){let e=this.customizationEvidenceSummary().sent,t=this.evidenceSessionCount(),n=this.evidenceMatchCount();return e?`${n.toLocaleString()} text match${n===1?"":"es"} across ${t.toLocaleString()} Copilot session${t===1?"":"s"}.`:"Checked recent Copilot requests. No customization file text was found."}return"Run Find usage evidence to check whether these files appeared inside recent Copilot model requests."}evidenceMetricLabel(){return this.isEvidenceScanActive()?"Matches so far":"Last result"}evidenceMetricText(){let e=this.isEvidenceScanActive()?Number(this.runtimeStatus?.scanProgress?.matches??this.evidenceMatchCount()):this.evidenceMatchCount();return`${e.toLocaleString()} text match${e===1?"":"es"}`}activeScanStats(){if(!this.isEvidenceScanActive())return"";let e=this.runtimeStatus?.scanProgress,t=Number(e?.sessions??0),n=Number(e?.modelCalls??0);return[t>0?`${t.toLocaleString()} session${t===1?"":"s"} checked`:"",n>0?`${n.toLocaleString()} model call${n===1?"":"s"} checked`:"",this.evidenceMetricText()].filter(Boolean).join(" \xB7 ")}evidenceScanProgressPercent(){if(!this.isEvidenceScanActive())return 0;let e=this.runtimeStatus?.scanProgress,t=Number(e?.index??e?.workspaceIndex??0),n=Number(e?.total??e?.workspaceTotal??0);return t>0&&n>0?Math.max(1,Math.min(100,Math.round(t/n*100))):0}evidenceScanProgressLabel(){if(!this.isEvidenceScanActive())return"";let e=this.runtimeStatus?.scanProgress,t=Number(e?.index??0),n=Number(e?.total??0);return t>0&&n>0?`${t.toLocaleString()} of ${n.toLocaleString()} Copilot session folders checked`:"Preparing session list"}currentScanStep(){let e=this.runtimeStatus?.scanProgress?.stage??"";return e==="customizations"||e==="workspace"||e==="workspace-state"?"Step 1 of 3: Loading customization files":e==="customization-evidence"||e==="debug-logs"?"Step 2 of 3: Checking recent Copilot sessions":e==="complete"?"Step 3 of 3: Summarising matches":"Preparing current workspace scan"}elapsedScanLabel(){let e=this.runtimeStatus?.lastScanStartedAt;return!e||!this.isEvidenceScanActive()?"":this.durationLabel(Date.now()-Date.parse(e))}lastProgressLabel(){let e=this.runtimeStatus?.scanProgress?.updatedAt;return!e||!this.isEvidenceScanActive()?"":this.durationLabel(Date.now()-Date.parse(e))}isLongRunningScan(){let e=this.runtimeStatus?.lastScanStartedAt;return!e||!this.isEvidenceScanActive()?!1:Date.now()-Date.parse(e)>6e4}isStaleScan(){let e=this.runtimeStatus?.scanProgress?.updatedAt;return!e||!this.isEvidenceScanActive()?!1:Date.now()-Date.parse(e)>3e4}evidenceSessionCount(){return new Set(this.customizationsInput().flatMap(e=>e.matches.map(t=>t.sessionId))).size}evidenceMatchCount(){return this.customizationsInput().reduce((e,t)=>e+t.matches.filter(n=>n.status==="sent").length,0)}durationLabel(e){if(!Number.isFinite(e)||e<0)return"";let t=Math.max(0,Math.round(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}selectCustomization(e){this.selectedId.set(e.id)}setQuery(e){this.query.set(e),this.ensureVisibleSelection()}setKindFilter(e){this.kindFilter.set(e),this.ensureVisibleSelection()}setStatusFilter(e){this.statusFilter.set(e),this.ensureVisibleSelection()}setWorkspaceFilter(e){this.workspaceFilter.set(e),this.ensureVisibleSelection()}resetFilters(){this.query.set(""),this.kindFilter.set("all"),this.statusFilter.set("all"),this.workspaceFilter.set("all"),this.ensureVisibleSelection()}fileName(e){return(e.relativePath||e.sourcePath).split(/[\\/]+/).filter(Boolean).at(-1)??e.title}kindLabel(e){return{instruction:"Instruction",skill:"Skill",prompt:"Prompt",hook:"Hook",agent:"Agent",other:"Other"}[e]}statusLabel(e){return{sent:"Text match found",listed:"Read by Copilot",discovered:"Discovered",not_seen:"Not seen"}[e]}statusHeadline(e){return{sent:"File text appeared in a model request",listed:"Copilot read or referenced this file",discovered:"Found locally, not seen in a request",not_seen:"No evidence in imported sessions"}[e]}statusHelp(e){return{sent:"We found distinctive text from this file inside local VS Code request logs. The text reached a model request, but it may have arrived as customization context or as manually attached file context.",listed:"Local logs show Copilot read or referenced this file, but did not show distinctive file text inside the model request.",discovered:"The file exists in a known customization location, but imported model requests did not show a text match.",not_seen:"The file exists locally, but imported sessions do not show local evidence for it yet."}[e]}evidenceCountLabel(e){let t=new Set(e.matches.map(n=>n.sessionId)).size;return e.matches.length?`${t.toLocaleString()} session${t===1?"":"s"}`:"No sessions"}evidenceGroupSubtitle(e){let t=e.modelCallNumbers.length;if(e.bestStatus==="sent"){let n=this.sentModelCallCount(e);return n?`${n.toLocaleString()} text-matched request${n===1?"":"s"}`:"Text match found"}return e.bestStatus==="listed"?t?"Read or referenced, but no file text found":"Read or referenced":e.bestStatus==="discovered"?"Found during setup or discovery":"No imported evidence"}sourceLabel(e){return/^system_prompt/i.test(e)?"Instructions":/^tools/i.test(e)?"Tool list":{inputMessages:"Complete request",userRequest:"User prompt",copilotFileRead:"File read"}[e]??e}sourceHelp(e){return/^system_prompt/i.test(e.raw)?"Matched inside the instruction/system part of a VS Code request. This is usually where custom instructions and skills appear.":/^tools/i.test(e.raw)?"Matched near the tool definitions included with the request. This can include tool or MCP schema material.":e.raw==="inputMessages"?"Matched somewhere in the full request payload visible in VS Code logs. This is useful as broad local confirmation that the text appeared.":e.raw==="userRequest"?"Matched in the user-facing prompt/request material for this model call.":e.raw==="copilotFileRead"?"VS Code logs show Copilot read this customization file. This is useful evidence, but it does not prove the file text was sent to the model.":"Matched in this VS Code debug-log source. Open the technical proof section if you need the raw field name."}rawSourceLabel(e){return String(e)}sessionEvidenceLabel(e){if(!e.modelCallNumbers.length)return e.bestStatus==="sent"?"Text match found":this.statusLabel(e.bestStatus);if(e.bestStatus!=="sent")return"Read or referenced";let n=this.sentModelCallCount(e),c=n===1?"request":"requests";return`${n.toLocaleString()} text-matched ${c}`}timelineMarkers(e){let t=new Map;for(let n of e.matches){if(!n.modelCallNumber)continue;let c=t.get(n.modelCallNumber)??"not_seen";t.set(n.modelCallNumber,this.strongerStatus(c,n.status))}return[...t.entries()].sort(([n],[c])=>n-c).filter(([,n])=>e.bestStatus!=="sent"||n==="sent").slice(0,18).map(([n,c])=>({callNumber:n,status:c}))}timelineOverflow(e){let t=new Set(e.matches.filter(n=>e.bestStatus!=="sent"||n.status==="sent").map(n=>n.modelCallNumber).filter(Boolean));return Math.max(0,t.size-18)}timelineMarkerLabel(e){return e.status==="sent"?`Model request #${e.callNumber}: this file's text was included`:`Model request #${e.callNumber}: file text not proved`}callEvidence(e){let t=new Map;for(let n of e.matches){let c=n.modelCallNumber?`call:${n.modelCallNumber}`:`event:${n.eventIndex}`,d=t.get(c)??{key:c,callNumber:n.modelCallNumber,eventIndex:n.eventIndex,status:n.status,matches:[],sources:[],matchedChunks:0,matchedCharacters:0,matchedPreview:[]};d.matches.push(n),d.status=this.strongerStatus(d.status,n.status),d.matchedChunks+=n.matchedChunks??0,d.matchedCharacters+=n.matchedCharacters??0;for(let M of n.matchedPreview??[])M&&!d.matchedPreview.includes(M)&&d.matchedPreview.push(M);let L={label:this.sourceLabel(n.source),raw:this.rawSourceLabel(n.source)};d.sources.some(M=>M.label===L.label&&M.raw===L.raw)||d.sources.push(L),t.set(c,d)}return[...t.values()].sort((n,c)=>n.callNumber!==c.callNumber?c.callNumber-n.callNumber:c.eventIndex-n.eventIndex)}sentCallEvidence(e){return this.callEvidence(e).filter(t=>t.status==="sent")}callEvidenceTitle(e){let t=e.callNumber?`Request #${e.callNumber}`:`Event #${e.eventIndex}`;return e.status==="sent"?`${t}: file text found`:e.status==="listed"?`${t}: read or referenced`:`${t}: ${this.statusLabel(e.status).toLowerCase()}`}callEvidenceSummary(e){return e.status==="sent"?"Distinctive file text appeared in this Copilot request.":e.status==="listed"?"Copilot read or referenced this file, but local logs did not show distinctive file text inside this model request.":"No request payload content was verified for this event."}groupDetailSummary(e){if(e.bestStatus==="sent"){let t=this.sentModelCallCount(e),n=t===1?"model request":"model requests";return`File text appeared in ${t.toLocaleString()} Copilot ${n}. This confirms the text was visible in local request logs.`}return e.bestStatus==="listed"?"Copilot read or referenced this file in this session, but imported model requests did not show distinctive file text.":e.bestStatus==="discovered"?"VS Code setup or discovery mentioned this file, but imported model requests did not show distinctive file text.":"No visible request evidence was imported for this session."}evidenceSourceLabels(e){return this.uniqueSources(e.sources).map(t=>t.label)}evidenceSources(e){return this.uniqueSources(e.sources)}rawEvidenceSources(e){return this.uniqueSources(e.sources)}evidenceDetailsSummary(e){let t=[];e.callNumber&&t.push(`request #${e.callNumber}`);let n=this.sourcePhrase(e.sources);return n&&t.push(n),e.matchedCharacters&&t.push(`${e.matchedCharacters.toLocaleString()} characters matched`),t.join(" \xB7 ")||"raw debug-log proof"}sourcePhrase(e){let t=this.uniqueSources(e).map(n=>n.label);return t.length?t.length===1?t[0].toLowerCase():t.length===2?`${t[0].toLowerCase()} and ${t[1].toLowerCase()}`:`${t.slice(0,-1).map(n=>n.toLowerCase()).join(", ")}, and ${t.at(-1)?.toLowerCase()}`:"the model request"}uniqueSources(e){let t=new Set,n=[];for(let c of e){let l=`${c.label}:${c.raw}`;t.has(l)||(t.add(l),n.push(c))}return n}sentModelCallCount(e){return new Set(e.matches.filter(t=>t.status==="sent").map(t=>t.modelCallNumber).filter(Boolean)).size}diagnosticKindLabel(e){return{candidate:"Candidate root",root:"Folder",file:"File","debug-reference":"Debug reference","debug-discovery-root":"VS Code discovery","vscode-setting-root":"VS Code setting","vscode-default-root":"VS Code default","vscode-user-setting-root":"User setting","vscode-workspace-setting-root":"Workspace setting","vscode-workspace-folder-setting-root":"Workspace-folder setting","vscode-parent-repo-default-root":"Parent repo default","user-default-root":"User default"}[e]??e}sessionForMatch(e){return this.sessionsInput().find(t=>t.id===e)??null}emitOpenSession(e){let t=this.sessionForMatch(e);t&&this.openSession.emit(t)}groupMatchesBySession(e){let t=new Map;for(let n of e.matches){let c=this.sessionForMatch(n.sessionId),d=t.get(n.sessionId)??{sessionId:n.sessionId,session:c,title:c?.title??`Session ${n.sessionId.slice(0,8)}`,timestamp:n.timestamp,bestStatus:n.status,matches:[],sentCount:0,listedCount:0,discoveredCount:0,modelCallNumbers:[],sources:[],matchedChunks:0,matchedCharacters:0};d.matches.push(n),d.bestStatus=this.strongerStatus(d.bestStatus,n.status),d.timestamp=[d.timestamp,n.timestamp].filter(Boolean).sort().at(-1)??d.timestamp,d.sentCount+=n.status==="sent"?1:0,d.listedCount+=n.status==="listed"?1:0,d.discoveredCount+=n.status==="discovered"?1:0,d.matchedChunks+=n.matchedChunks??0,d.matchedCharacters+=n.matchedCharacters??0,n.modelCallNumber&&!d.modelCallNumbers.includes(n.modelCallNumber)&&d.modelCallNumbers.push(n.modelCallNumber),n.source&&!d.sources.includes(n.source)&&d.sources.push(n.source),t.set(n.sessionId,d)}return[...t.values()].map(n=>$(F({},n),{modelCallNumbers:[...n.modelCallNumbers].sort((c,l)=>c-l),matches:[...n.matches].sort((c,l)=>l.timestamp.localeCompare(c.timestamp)||l.eventIndex-c.eventIndex)})).sort((n,c)=>c.timestamp.localeCompare(n.timestamp))}strongerStatus(e,t){let n={not_seen:0,discovered:1,listed:2,sent:3};return n[t]>n[e]?t:e}ensureVisibleSelection(){let e=this.filteredCustomizations();if(!e.length){this.selectedId.set(null);return}e.some(t=>t.id===this.selectedId())||this.selectedId.set(e[0].id)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=q({type:o,selectors:[["app-customizations-page"]],inputs:{customizations:"customizations",sessions:"sessions",ingestion:"ingestion",refreshState:"refreshState",refreshMessage:"refreshMessage",runtimeStatus:"runtimeStatus"},outputs:{scanEvidence:"scanEvidence",cancelScan:"cancelScan",openSession:"openSession"},decls:86,vars:25,consts:[[1,"customizations-page"],[1,"customizations-header"],[1,"eyebrow"],[1,"preview-badge"],["aria-label","Customization scan status",1,"customizations-scan-status"],[1,"scan-status-body"],[1,"scan-summary-line"],[1,"scan-warning"],[1,"scan-status-actions"],["type","button",1,"secondary-scan-button"],["type","button",1,"evidence-scan-button",3,"click","disabled"],["aria-hidden","true",1,"button-spinner"],["aria-label","Customization filters",1,"customizations-controls"],[1,"customizations-search"],["type","search","placeholder","Search filename, title, description, applyTo, trigger",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],["value","all"],["value","instruction"],["value","skill"],["value","prompt"],["value","hook"],["value","agent"],["value","other"],["value","sent"],["value","listed"],["value","discovered"],["value","not_seen"],[3,"value"],[1,"customizations-diagnostics"],[1,"diagnostic-note"],[1,"customizations-workspace"],[1,"customizations-empty"],["aria-label","Evidence scan progress",1,"scan-progress-meter"],["max","100",3,"value"],[1,"scan-progress-stats"],[1,"scan-progress-line"],["type","button",1,"secondary-scan-button",3,"click"],[1,"diagnostic-list"],["aria-label","Local customizations",1,"customizations-list"],[1,"customizations-list-heading"],["type","button"],["type","button",1,"customization-card",3,"active","sent","listed","discovered"],[1,"customization-detail"],["type","button",3,"click"],["type","button",1,"customization-card",3,"click"],["aria-hidden","true",1,"customization-file-icon"],[1,"customization-card-main"],[1,"customization-card-side"],[1,"customization-detail-header"],[1,"customization-kicker"],[1,"evidence-badge"],["label","Explain customization evidence",3,"text"],[1,"customization-facts"],[1,"evidence-summary"],[1,"matched-customization-text"],["aria-label","Customization evidence matches",1,"match-list"],[1,"customization-path"],[1,"description"],[1,"match-list-help"],[1,"match-group",3,"sent","listed","discovered"],[1,"match-group"],[1,"match-group-title"],[1,"match-group-status"],[1,"match-group-timeline"],[1,"match-group-weak"],[1,"match-group-detail-header"],[1,"match-events","call-events"],[1,"timeline-marker",3,"sent","listed","discovered"],[1,"timeline-overflow"],[1,"timeline-marker"],[1,"match-event","call-event",3,"sent"],[1,"match-event","call-event"],[1,"call-event-main"],[1,"raw-evidence-details"]],template:function(t,n){t&1&&(a(0,"section",0)(1,"header",1)(2,"div")(3,"p",2),s(4,"Customization evidence "),a(5,"span",3),s(6,"Preview"),i()(),a(7,"h2"),s(8,"Did your rules appear in Copilot requests?"),i(),a(9,"p"),s(10,"Browse local instructions, skills, prompts, hooks, and agents. Preview evidence is based on text visible in imported VS Code model requests."),i()()(),a(11,"section",4)(12,"div",5)(13,"div")(14,"p",6)(15,"strong"),s(16),i(),a(17,"span"),s(18),i(),a(19,"span"),s(20),i()(),a(21,"p"),s(22),i(),p(23,re,10,6),p(24,ce,2,0,"p",7),p(25,le,2,0,"p",7),i(),a(26,"div",8),p(27,de,2,0,"button",9),a(28,"button",10),v("click",function(){return n.scanEvidence.emit()}),p(29,ue,1,0,"span",11),s(30),i()()()(),a(31,"section",12)(32,"label",13)(33,"span"),s(34,"Search customizations"),i(),a(35,"input",14),v("ngModelChange",function(l){return n.setQuery(l)}),i()(),a(36,"label")(37,"span"),s(38,"Type"),i(),a(39,"select",15),v("ngModelChange",function(l){return n.setKindFilter(l)}),a(40,"option",16),s(41,"All types"),i(),a(42,"option",17),s(43,"Instructions"),i(),a(44,"option",18),s(45,"Skills"),i(),a(46,"option",19),s(47,"Prompts"),i(),a(48,"option",20),s(49,"Hooks"),i(),a(50,"option",21),s(51,"Agents"),i(),a(52,"option",22),s(53,"Other"),i()()(),a(54,"label")(55,"span"),s(56,"Evidence"),i(),a(57,"select",15),v("ngModelChange",function(l){return n.setStatusFilter(l)}),a(58,"option",16),s(59,"All evidence"),i(),a(60,"option",23),s(61,"Text match found"),i(),a(62,"option",24),s(63,"Read by Copilot"),i(),a(64,"option",25),s(65,"Discovered only"),i(),a(66,"option",26),s(67,"Not seen"),i()()(),a(68,"label")(69,"span"),s(70,"Workspace"),i(),a(71,"select",15),v("ngModelChange",function(l){return n.setWorkspaceFilter(l)}),b(72,me,2,2,"option",27,D),i()()(),a(74,"details",28)(75,"summary")(76,"span"),s(77,"Advanced scan coverage"),i(),a(78,"strong"),s(79),_(80,"number"),_(81,"number"),i()(),p(82,Ce,4,1)(83,ve,2,0,"p",29),i(),p(84,Ne,10,5,"section",30)(85,$e,6,3,"section",31),i()),t&2&&(r(16),m(n.currentWorkspaceLabel()),r(2),m(n.customizationFileCountLabel()),r(2),m(n.requestTextCountLabel()),r(2),m(n.evidenceResultText()),r(),g(n.isEvidenceScanActive()?23:-1),r(),g(n.isLongRunningScan()?24:-1),r(),g(n.isStaleScan()?25:-1),r(2),g(n.isEvidenceScanActive()?27:-1),r(),h("disabled",n.refreshState==="refreshing"),k("aria-busy",n.refreshState==="refreshing"),r(),g(n.isEvidenceScanActive()?29:-1),r(),C(" ",n.scanActionLabel()," "),r(5),h("ngModel",n.query()),r(4),h("ngModel",n.kindFilter()),r(18),h("ngModel",n.statusFilter()),r(14),h("ngModel",n.workspaceFilter()),r(),S(n.workspaceOptions()),r(7),V(" ",P(80,21,n.scanDiagnostics().roots)," folders/files checked \xB7 ",P(81,23,n.scanDiagnostics().files)," customization",n.scanDiagnostics().files===1?"":"s"," found "),r(3),g(n.scanDiagnostics().locations.length?82:83),r(2),g(n.filteredCustomizations().length?84:85))},dependencies:[U,Q,G,j,H,W,K,B,A,R],styles:['[_nghost-%COMP%]{display:block}.customizations-page[_ngcontent-%COMP%]{display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr);gap:7px;min-height:calc(100vh - 96px)}.customizations-header[_ngcontent-%COMP%], .customizations-scan-status[_ngcontent-%COMP%], .customizations-controls[_ngcontent-%COMP%], .customizations-diagnostics[_ngcontent-%COMP%], .customizations-list[_ngcontent-%COMP%], .customization-detail[_ngcontent-%COMP%], .customizations-empty[_ngcontent-%COMP%]{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow-soft)}.customizations-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:14px;border-color:color-mix(in srgb,var(--accent-2) 18%,var(--line));border-radius:13px;padding:10px 12px;background:var(--header-gradient)}.customizations-scan-status[_ngcontent-%COMP%]{display:grid;gap:4px;border-color:color-mix(in srgb,var(--accent) 22%,var(--line));border-radius:10px;padding:7px 9px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 6%,transparent),transparent 50%),var(--surface)}.scan-status-body[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}.scan-status-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:12px;line-height:1.4}.scan-summary-line[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:7px;color:var(--muted)!important}.scan-summary-line[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px}.scan-summary-line[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:11px}.scan-summary-line[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:before{width:3px;height:3px;border-radius:50%;background:color-mix(in srgb,var(--accent) 62%,var(--muted));content:""}.scan-progress-line[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin-top:3px!important;color:var(--muted-2)!important;font-size:11px!important}.scan-progress-meter[_ngcontent-%COMP%]{display:grid;gap:5px;max-width:460px;margin-top:8px}.scan-progress-meter[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px}.scan-progress-meter[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text)}.scan-progress-meter[_ngcontent-%COMP%] progress[_ngcontent-%COMP%]{width:100%;height:7px;overflow:hidden;border:0;border-radius:999px;background:color-mix(in srgb,var(--surface-soft) 70%,transparent)}.scan-progress-meter[_ngcontent-%COMP%] progress[_ngcontent-%COMP%]::-webkit-progress-bar{border-radius:999px;background:color-mix(in srgb,var(--surface-soft) 70%,transparent)}.scan-progress-meter[_ngcontent-%COMP%] progress[_ngcontent-%COMP%]::-webkit-progress-value{border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2))}.scan-progress-stats[_ngcontent-%COMP%]{margin-top:3px!important;color:var(--text)!important;font-size:11px!important;font-weight:720}.scan-warning[_ngcontent-%COMP%]{margin-top:4px!important;color:var(--warning)!important}.scan-status-actions[_ngcontent-%COMP%]{display:flex;flex:0 0 auto;align-items:center;gap:7px}.eyebrow[_ngcontent-%COMP%], .customization-kicker[_ngcontent-%COMP%]{margin:0;color:var(--muted-2);font-size:9px;font-weight:820;letter-spacing:.08em;text-transform:uppercase}.preview-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;min-height:17px;margin-left:6px;border:1px solid color-mix(in srgb,var(--accent) 42%,var(--line));border-radius:999px;padding:0 7px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent-strong, var(--accent));font-size:9px;letter-spacing:.08em}.customizations-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .customization-detail[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .customizations-empty[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:2px 0 0;color:var(--text-strong);letter-spacing:0}.customizations-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:19px;line-height:1.15}.customizations-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .customization-detail-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .customizations-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .evidence-summary[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.35}.evidence-scan-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:30px;border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));border-radius:999px;padding:6px 11px;background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--accent);font-size:11px;font-weight:780;cursor:pointer}.evidence-scan-button[_ngcontent-%COMP%]:disabled{cursor:wait;opacity:.68}.secondary-scan-button[_ngcontent-%COMP%]{min-height:30px;border:1px solid var(--line);border-radius:999px;padding:6px 11px;background:var(--surface-soft);color:var(--text);font-size:11px;font-weight:760;cursor:pointer}.button-spinner[_ngcontent-%COMP%]{width:12px;height:12px;border:2px solid color-mix(in srgb,var(--accent) 22%,transparent);border-top-color:var(--accent);border-radius:999px;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.customizations-controls[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(260px,1.8fr) repeat(3,minmax(130px,.8fr));gap:6px;align-items:end;border-radius:12px;padding:7px}.customizations-controls[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;align-content:start;gap:4px;min-height:0}.customizations-controls[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:10px;font-weight:760}.customizations-controls[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .customizations-controls[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;height:32px;min-height:32px;border:1px solid var(--line);border-radius:8px;padding:6px 9px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:12px}.customizations-diagnostics[_ngcontent-%COMP%]{border-radius:12px;padding:0;overflow:hidden}.customizations-diagnostics[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;padding:8px 10px;color:var(--muted);font-size:11px;font-weight:760;cursor:pointer}.customizations-diagnostics[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px}.customizations-diagnostics[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-weight:760}.diagnostic-list[_ngcontent-%COMP%]{display:grid;gap:1px;max-height:240px;overflow:auto;border-top:1px solid var(--line);padding:6px;background:var(--surface-soft)}.diagnostic-list[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;align-items:center;min-height:28px;border-radius:7px;padding:5px 7px}.diagnostic-list[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(odd){background:color-mix(in srgb,var(--accent) 4%,transparent)}.diagnostic-list[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;text-transform:uppercase}.diagnostic-list[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{overflow-wrap:anywhere;color:var(--text);font-size:11px}.diagnostic-note[_ngcontent-%COMP%]{margin:0;border-top:1px solid var(--line);padding:8px 10px;color:var(--muted);font-size:11px;background:var(--surface-soft)}.customizations-workspace[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(360px,450px) minmax(0,1fr);gap:8px;align-items:start;min-height:0}.customizations-list[_ngcontent-%COMP%], .customization-detail[_ngcontent-%COMP%], .customizations-empty[_ngcontent-%COMP%]{border-radius:13px}.customizations-list[_ngcontent-%COMP%]{position:sticky;top:66px;display:grid;align-content:start;gap:2px;max-height:calc(100vh - 138px);overflow:auto;padding:6px}.customizations-list-heading[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;min-height:28px;padding:2px 4px 5px;background:var(--surface);color:var(--muted);font-size:11px}.customizations-list-heading[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .customizations-empty[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:7px;padding:5px 8px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:11px;font-weight:760;cursor:pointer}.customization-card[_ngcontent-%COMP%]{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:7px;width:100%;min-height:44px;border:1px solid transparent;border-radius:9px;padding:6px 7px;background:transparent;color:var(--text);text-align:left;cursor:pointer}.customization-card[_ngcontent-%COMP%]:hover, .customization-card.active[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 34%,var(--line));background:color-mix(in srgb,var(--accent) 6%,var(--surface-soft))}.customization-card.sent.active[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 46%,var(--line));background:color-mix(in srgb,var(--accent) 8%,var(--surface-soft))}.customization-card.listed.active[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent-2) 42%,var(--line));background:color-mix(in srgb,var(--accent-2) 7%,var(--surface-soft))}.customization-card.discovered.active[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--warning) 38%,var(--line));background:color-mix(in srgb,var(--warning) 7%,var(--surface-soft))}.customization-file-icon[_ngcontent-%COMP%]{display:grid;place-items:center;width:22px;height:22px;border-radius:6px;background:color-mix(in srgb,var(--accent) 12%,var(--surface-soft));color:var(--accent);font-size:10px;font-weight:850}.customization-card-main[_ngcontent-%COMP%]{display:grid;gap:1px;min-width:0}.customization-card-main[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .customization-card-side[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .match-group[_ngcontent-%COMP%] time[_ngcontent-%COMP%], .customization-path[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:10px;font-style:normal}.customization-card-main[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{overflow:hidden;color:var(--text-strong);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.customization-card-side[_ngcontent-%COMP%]{display:grid;justify-items:end;gap:3px;color:var(--muted);font-size:10px}.customization-card-side[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--accent);font-size:10px}.customization-detail[_ngcontent-%COMP%]{display:grid;align-content:start;gap:9px;min-height:calc(100vh - 138px);padding:10px}.customization-detail-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.customization-detail-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:19px;line-height:1.15}.evidence-badge[_ngcontent-%COMP%], .customization-facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;min-height:27px;border:1px solid var(--line);border-radius:999px;padding:4px 8px;background:var(--surface-soft);color:var(--text);font-size:11px;font-weight:760}.evidence-badge.sent[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 44%,var(--line));background:color-mix(in srgb,var(--accent) 10%,var(--surface-soft));color:var(--accent)}.evidence-badge.listed[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent-2) 44%,var(--line));background:color-mix(in srgb,var(--accent-2) 9%,var(--surface-soft));color:var(--accent-2)}.evidence-badge.discovered[_ngcontent-%COMP%]{color:var(--warning)}.customization-facts[_ngcontent-%COMP%]{display:flex;align-items:flex-start;flex-wrap:wrap;gap:6px}.customization-facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:0 0 auto;min-height:24px;padding:3px 8px}.customization-facts[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--text-strong)}.evidence-summary[_ngcontent-%COMP%], .match-list[_ngcontent-%COMP%], .customization-path[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:11px;padding:10px;background:var(--surface-soft)}.evidence-summary[_ngcontent-%COMP%]{display:grid;gap:10px}.evidence-summary[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .match-list[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;color:var(--text-strong);font-size:15px}.evidence-summary[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:var(--text)}.matched-customization-text[_ngcontent-%COMP%]{border-top:1px solid var(--line);padding-top:9px}.match-list[_ngcontent-%COMP%]{display:grid;gap:5px}.match-list[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.match-list-help[_ngcontent-%COMP%]{margin:-2px 0 2px;color:var(--muted);font-size:11px;line-height:1.35}.match-group[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:8px;background:var(--surface);overflow:hidden}.match-group.sent[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 34%,var(--line))}.match-group.listed[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent-2) 30%,var(--line))}.match-group.discovered[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--warning) 26%,var(--line))}.match-group[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:10px;align-items:center;min-height:46px;padding:6px 10px;cursor:pointer}.match-group[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{color:var(--accent)}.match-group-title[_ngcontent-%COMP%]{display:grid;gap:2px;min-width:0}.match-group-title[_ngcontent-%COMP%] time[_ngcontent-%COMP%]{color:var(--muted);font-size:10px}.match-group-title[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:var(--text-strong);font-size:11px;line-height:1.2}.match-group-title[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{overflow:hidden;color:var(--muted);font-size:10px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.match-group-status[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:5px}.match-group-status[_ngcontent-%COMP%]{justify-content:flex-end;min-width:0}.match-group-status[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;min-height:20px;border-radius:999px;padding:2px 7px;background:color-mix(in srgb,var(--accent) 7%,var(--surface-soft));color:var(--muted);font-size:10px;font-weight:720}.match-group-status[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent)}.match-group-timeline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:3px;min-width:0}.timeline-marker[_ngcontent-%COMP%], .timeline-overflow[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:18px;border:1px solid color-mix(in srgb,var(--line) 86%,transparent);border-radius:999px;padding:0 5px;background:color-mix(in srgb,var(--surface-soft) 88%,var(--surface));color:var(--muted);font-size:9px;font-weight:800;line-height:1}.timeline-marker.sent[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 54%,var(--line));background:color-mix(in srgb,var(--accent) 18%,var(--surface));color:var(--accent-strong, var(--accent))}.timeline-marker.listed[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent-2) 42%,var(--line));background:color-mix(in srgb,var(--accent-2) 13%,var(--surface));color:var(--accent-2)}.timeline-marker.discovered[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--warning) 42%,var(--line));background:color-mix(in srgb,var(--warning) 12%,var(--surface));color:var(--warning)}.timeline-overflow[_ngcontent-%COMP%]{max-width:76px;border-style:dashed;white-space:nowrap}.match-group-weak[_ngcontent-%COMP%]{border:1px dashed color-mix(in srgb,var(--muted) 26%,var(--line));border-radius:999px;padding:2px 7px;color:var(--muted);font-size:10px;font-weight:760}.match-group-detail-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:8px 10px}.match-group-detail-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:11px}.match-group-detail-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:0 0 auto;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:999px;padding:5px 9px;background:color-mix(in srgb,var(--accent) 8%,var(--surface));color:var(--accent);font-size:10px;font-weight:760;cursor:pointer}.match-events[_ngcontent-%COMP%]{display:grid;gap:1px;border-top:1px solid var(--line);background:var(--surface-soft)}.match-event[_ngcontent-%COMP%]{display:block;min-height:36px;padding:7px 10px}.match-event[_ngcontent-%COMP%] + .match-event[_ngcontent-%COMP%]{border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent)}.call-event-main[_ngcontent-%COMP%]{display:grid;gap:3px;min-width:0}.call-event-main[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent-2);font-size:11px;font-weight:780}.call-event.sent[_ngcontent-%COMP%] .call-event-main[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent-strong, var(--accent))}.call-event-main[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:11px}.call-event-main[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:0;border-left:2px solid color-mix(in srgb,var(--accent) 48%,var(--line));border-radius:6px;padding:4px 8px;background:color-mix(in srgb,var(--surface-soft) 84%,transparent);color:var(--text);font-size:11px;line-height:1.35}.raw-evidence-details[_ngcontent-%COMP%]{margin-top:5px}.raw-evidence-details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{width:fit-content;color:var(--muted);font-size:10px;font-weight:760;cursor:pointer}.raw-evidence-details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{color:var(--text)}.raw-evidence-details[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;gap:5px;margin-top:6px;border:1px solid color-mix(in srgb,var(--line) 82%,transparent);border-radius:8px;padding:7px 8px;background:color-mix(in srgb,var(--surface) 76%,transparent)}.raw-evidence-details[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:10px;font-weight:820;letter-spacing:.08em;text-transform:uppercase}.raw-evidence-details[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:grid;gap:4px;margin:0;padding:0;list-style:none}.raw-evidence-details[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;align-items:center;color:var(--muted);font-size:11px}.raw-evidence-details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{border-radius:999px;padding:2px 6px;background:color-mix(in srgb,var(--surface-soft) 80%,transparent);color:var(--muted);font-size:10px}.customization-path[_ngcontent-%COMP%]{display:grid;gap:4px}.customization-path[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{overflow-wrap:anywhere;color:var(--text);font-size:11px}.customizations-empty[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:190px;padding:18px;text-align:center}@media(max-width:980px){.customizations-controls[_ngcontent-%COMP%], .customizations-workspace[_ngcontent-%COMP%]{grid-template-columns:1fr}.customizations-list[_ngcontent-%COMP%]{position:static;max-height:420px}}@media(max-width:700px){.customizations-header[_ngcontent-%COMP%], .customizations-scan-status[_ngcontent-%COMP%], .customization-detail-header[_ngcontent-%COMP%]{display:grid}.scan-status-grid[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}.scan-status-body[_ngcontent-%COMP%]{display:grid}.match-group[_ngcontent-%COMP%] summary[_ngcontent-%COMP%], .match-event[_ngcontent-%COMP%]{grid-template-columns:1fr}.match-group-status[_ngcontent-%COMP%]{justify-content:flex-start}.match-group-weak[_ngcontent-%COMP%]{justify-self:start}.match-group-timeline[_ngcontent-%COMP%]{flex-wrap:wrap}}']})};export{Y as CustomizationsPageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H,b as $,c as W,d as V,e as j,f as q,g as J,h as K,i as y,m as Q,r as X,s as Y}from"./chunk-VEKXIM47.js";import{$a as O,Ca as f,Da as w,Fa as M,Ga as v,Ha as c,Ia as t,Ja as n,Ka as x,O as U,Oa as F,P as D,Qa as E,Sa as C,Ta as L,U as N,Ua as z,Va as i,Wa as s,Xa as d,Ya as T,Z as S,_a as p,a as b,ab as _,b as k,db as P,ja as A,ka as o,nb as G,ob as B,sa as R,sb as Z,ub as ee,vb as te,wb as ne,xb as ie,yb as ae,zb as oe}from"./chunk-WOIYAEKB.js";var re=(l,a)=>a.id,ce=(l,a)=>a.value,se=(l,a)=>a.model+":"+a.tier;function pe(l,a){if(l&1&&(t(0,"option",10),i(1),n()),l&2){let e=a.$implicit;c("value",e.id),o(),s(e.label)}}function de(l,a){if(l&1&&(t(0,"option",10),i(1),n()),l&2){let e=a.$implicit;c("value",e.value),o(),s(e.label)}}function ge(l,a){if(l&1){let e=F();t(0,"button",24),E("click",function(){let g=U(e).$implicit,m=C();return D(m.setSelectedAllowancePlan(g.id))}),t(1,"span"),i(2),n(),t(3,"strong"),i(4),p(5,"number"),n(),t(6,"em"),i(7),n()()}if(l&2){let e=a.$implicit,r=C();z("active",r.selectedAllowance().id===e.id),o(2),s(e.period),o(2),s(O(5,5,e.creditsPerUserMonthly)),o(3),d("",e.label," credits/user/month")}}function me(l,a){if(l&1&&(t(0,"em"),i(1),n()),l&2){let e=C().$implicit;o(),s(e.note)}}function ue(l,a){if(l&1&&(i(0),p(1,"number")),l&2){let e=C().$implicit;d(" $",_(1,1,e.cacheWrite,"1.0-3")," ")}}function he(l,a){l&1&&i(0," - ")}function xe(l,a){if(l&1&&(t(0,"span",26),i(1," Used by imports "),x(2,"app-help-popover",28),n()),l&2){let e=C(3);o(2),c("text",e.help.pricingFallback)}}function _e(l,a){if(l&1&&(t(0,"span",26),i(1," Estimate fallback "),x(2,"app-help-popover",28),n()),l&2){let e=C(3);o(2),c("text",e.help.pricingFallback)}}function Ce(l,a){l&1&&(t(0,"span",27),i(1,"Direct pricing"),n())}function Pe(l,a){if(l&1&&f(0,xe,3,1,"span",26)(1,_e,3,1,"span",26)(2,Ce,2,0,"span",27),l&2){let e=C().$implicit;w(e.usedDirectly&&e.usedAsFallback?0:e.usedAsFallback?1:2)}}function be(l,a){l&1&&(t(0,"span",25),i(1,"Not yet"),n())}function fe(l,a){if(l&1&&(t(0,"div",23)(1,"strong"),i(2),f(3,me,2,1,"em"),n(),t(4,"span"),i(5),n(),t(6,"span"),i(7),n(),t(8,"span"),i(9),n(),t(10,"span"),i(11),t(12,"em"),i(13),n()(),t(14,"span"),i(15),p(16,"number"),n(),t(17,"span"),i(18),p(19,"number"),n(),t(20,"span"),f(21,ue,2,4)(22,he,1,0),n(),t(23,"span"),i(24),p(25,"number"),n(),t(26,"span"),f(27,Pe,3,1)(28,be,2,0,"span",25),n()()),l&2){let e=a.$implicit;o(2),d(" ",e.model," "),o(),w(e.note?3:-1),o(2),s(e.provider),o(2),s(e.releaseStatus),o(2),s(e.category),o(2),d(" ",e.tier," "),o(2),s(e.threshold),o(2),d("$",_(16,12,e.input,"1.0-3")),o(3),d("$",_(19,15,e.cachedInput,"1.0-3")),o(3),w(e.cacheWrite?21:22),o(3),d("$",_(25,18,e.output,"1.0-3")),o(3),w(e.usedByImportedSessions?27:28)}}var le=class l{sessionsInput=S([]);selectedAllowancePlanInput=S("business-standard");usageTimeRange=S("all");set sessions(a){this.sessionsInput.set(a??[])}set selectedAllowancePlan(a){this.selectedAllowancePlanInput.set(a??"business-standard")}selectedAllowancePlanChange=new N;pricingVersion=H;pricingSourceLabel=W;pricingSourceUrl=$;pricingSnapshotDate=V;pricingImportedAt=j;allowanceSourceUrl=J;creditUsd=q;allowancePlans=y;usageTimeOptions=[{value:"all",label:"All imported sessions"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"90d",label:"Last 90 days"}];help={inputTokens:"Normal, non-cached input/context tokens priced at the GitHub input rate. Raw VS Code inputTokens can be higher when cachedTokens are present.",outputTokens:"Generated model response tokens.",cachedInput:"Input/context tokens VS Code reported as cachedTokens. They are part of raw input, but priced with GitHub cached-input rates instead of normal input rates.",cacheWrite:"Provider cache creation tokens when the billing source exposes them. GitHub lists this mainly for Anthropic pricing rows.",pricingFallback:"The raw model name from VS Code did not match a GitHub price row in the local pricing table, so the estimate uses the displayed fallback price row. Treat this as an explicit estimate assumption.",allowance:"Included AI credits for Copilot Business and Enterprise are monthly per assigned license, but GitHub pools them at the organization or enterprise billing entity level.",credit:"GitHub states that 1 AI credit equals $0.01 USD. When VS Code logs GitHub source usage, the app uses that first; otherwise it converts the local token estimate into credits.",usageWindow:"This only filters the imported sessions used by the allowance meter. It does not change the GitHub price table below."};selectedAllowance=P(()=>y.find(a=>a.id===this.selectedAllowancePlanInput())??y[0]);allowanceSessions=P(()=>{let a=this.usageCutoff(this.sessionsInput(),this.usageTimeRange());return this.sessionsInput().filter(e=>!a||new Date(e.startedAt).getTime()>=a)});totalEstimateUsd=P(()=>this.allowanceSessions().reduce((a,e)=>a+X(e),0));totalEstimateCredits=P(()=>this.allowanceSessions().reduce((a,e)=>a+Y(e),0));selectedAllowanceUsage=P(()=>{let a=this.selectedAllowance(),e=this.totalEstimateCredits(),r=a.creditsPerUserMonthly>0?e/a.creditsPerUserMonthly*100:0;return{credits:e,share:r,perUserCredits:a.creditsPerUserMonthly,sessions:this.allowanceSessions().length,totalSessions:this.sessionsInput().length,windowLabel:this.usageTimeOptions.find(g=>g.value===this.usageTimeRange())?.label??"All imported sessions"}});pricingRows=P(()=>Object.entries(K).flatMap(([a,e])=>{let r=u=>{let I=this.sessionsInput().flatMap(h=>h.modelBreakdown).filter(h=>h.pricingModel===a&&(h.pricingTiers?.includes(u)??u===(e.tierLabel??"Default")));return{usedByImportedSessions:I.length>0,usedDirectly:I.some(h=>!this.usesPricingFallback(h.model,h.pricingModel)),usedAsFallback:I.some(h=>this.usesPricingFallback(h.model,h.pricingModel))}},g={model:a,provider:e.provider,releaseStatus:e.releaseStatus,category:e.category,note:e.note},m=e.tierLabel??"Default";return[k(b(b({},g),r(m)),{tier:m,threshold:e.tierThresholdLabel??"All request sizes",input:e.input,cachedInput:e.cachedInput,cacheWrite:e.cacheWrite??0,output:e.output}),...(e.tiers??[]).map(u=>k(b(b({},g),r(u.label)),{tier:u.label,threshold:u.thresholdLabel,input:u.input,cachedInput:u.cachedInput,cacheWrite:u.cacheWrite??e.cacheWrite??0,output:u.output}))]}));setSelectedAllowancePlan(a){if(!y.some(r=>r.id===a))return;let e=a;this.selectedAllowancePlanInput.set(e),this.selectedAllowancePlanChange.emit(e)}setUsageTimeRange(a){this.usageTimeOptions.some(e=>e.value===a)&&this.usageTimeRange.set(a)}usesPricingFallback=Q;usageCutoff(a,e){if(e==="all"||!a.length)return null;let r=e==="7d"?7:e==="30d"?30:90,g=Math.max(...a.map(m=>new Date(m.startedAt).getTime()).filter(Number.isFinite));return Number.isFinite(g)?g-r*24*60*60*1e3:null}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=R({type:l,selectors:[["app-pricing-page"]],inputs:{sessions:"sessions",selectedAllowancePlan:"selectedAllowancePlan"},outputs:{selectedAllowancePlanChange:"selectedAllowancePlanChange"},decls:129,vars:46,consts:[[1,"pricing-page"],[1,"pricing-header"],[1,"eyebrow"],["target","_blank","rel","noreferrer",3,"href"],[1,"pricing-source"],["aria-label","GitHub Copilot AI credit allowance",1,"allowance-panel"],[1,"allowance-copy"],[1,"allowance-control"],["label","Explain AI credit allowance",3,"text"],[3,"ngModelChange","ngModel"],[3,"value"],["label","Explain usage window",3,"text"],[1,"allowance-meter"],["aria-hidden","true",1,"allowance-bar"],["aria-label","Available Copilot allowance plans",1,"allowance-grid"],["type","button",1,"allowance-card",3,"active"],[1,"pricing-note"],[1,"pricing-table"],[1,"pricing-row","pricing-row-heading"],["label","Explain normal input",3,"text"],["label","Explain cached input",3,"text"],["label","Explain cache write",3,"text"],["label","Explain output tokens",3,"text"],[1,"pricing-row"],["type","button",1,"allowance-card",3,"click"],[1,"muted"],[1,"used-pill","fallback-used"],[1,"used-pill"],["label","Explain fallback pricing",3,"text"]],template:function(e,r){e&1&&(t(0,"section",0)(1,"div",1)(2,"div")(3,"p",2),i(4,"Cost inputs"),n(),t(5,"h2"),i(6,"GitHub Copilot prices used by this app"),n(),t(7,"p"),i(8," Evidence page for the rate card, AI-credit conversion, source usage, and token-estimate fallback. "),n()(),t(9,"a",3),i(10,"Open GitHub source"),n()(),t(11,"section",4)(12,"div")(13,"span"),i(14,"Source"),n(),t(15,"strong"),i(16),n()(),t(17,"div")(18,"span"),i(19,"Pricing version"),n(),t(20,"strong"),i(21),n()(),t(22,"div")(23,"span"),i(24,"Source checked"),n(),t(25,"strong"),i(26),p(27,"date"),n()(),t(28,"div")(29,"span"),i(30,"Imported into app"),n(),t(31,"strong"),i(32),p(33,"date"),n()()(),t(34,"section",5)(35,"div",6)(36,"p",2),i(37,"License allowance"),n(),t(38,"h3"),i(39,"AI credits context"),n(),t(40,"p"),i(41," GitHub converts model usage into AI credits at "),t(42,"strong"),i(43),p(44,"number"),n(),i(45,". The meter below compares imported source usage, with token estimates as fallback, against the selected per-license allowance. "),n(),t(46,"a",3),i(47,"Open allowance source"),n()(),t(48,"div",7)(49,"label")(50,"span"),i(51," Selected plan "),x(52,"app-help-popover",8),n(),t(53,"select",9),E("ngModelChange",function(m){return r.setSelectedAllowancePlan(m)}),M(54,pe,2,2,"option",10,re),n()(),t(56,"label")(57,"span"),i(58," Usage window "),x(59,"app-help-popover",11),n(),t(60,"select",9),E("ngModelChange",function(m){return r.setUsageTimeRange(m)}),M(61,de,2,2,"option",10,ce),n()(),t(63,"div",12)(64,"div")(65,"span"),i(66),n(),t(67,"strong"),i(68),p(69,"number"),n(),t(70,"em"),i(71),p(72,"number"),p(73,"number"),n()(),t(74,"div")(75,"span"),i(76,"Monthly allowance"),n(),t(77,"strong"),i(78),p(79,"number"),n()(),t(80,"div")(81,"span"),i(82,"Allowance used"),n(),t(83,"strong"),i(84),p(85,"number"),n()()(),t(86,"div",13),x(87,"span"),n(),t(88,"p"),i(89),n()()(),t(90,"section",14),M(91,ge,8,7,"button",15,re),n(),t(93,"div",16)(94,"strong"),i(95,"Calculation rule"),n(),t(96,"p"),i(97," Per-1M-token GitHub rates are multiplied by imported VS Code token buckets. Normal input is "),t(98,"code"),i(99,"inputTokens - cachedTokens"),n(),i(100," when cached tokens are present. Estimates stay in USD because GitHub prices and AI credits are USD-native; cache write is only priced when a numeric cache-write field is imported. Long-context rates are selected independently for each model call from that call's normal plus cached input. "),n()(),t(101,"div",17)(102,"div",18)(103,"span"),i(104,"Model"),n(),t(105,"span"),i(106,"Provider"),n(),t(107,"span"),i(108,"Status"),n(),t(109,"span"),i(110,"Category"),n(),t(111,"span"),i(112,"Tier"),n(),t(113,"span"),i(114,"Normal input "),x(115,"app-help-popover",19),n(),t(116,"span"),i(117,"Cached input "),x(118,"app-help-popover",20),n(),t(119,"span"),i(120,"Cache write "),x(121,"app-help-popover",21),n(),t(122,"span"),i(123,"Output "),x(124,"app-help-popover",22),n(),t(125,"span"),i(126,"Used"),n()(),M(127,fe,29,21,"div",23,se),n()()),e&2&&(o(9),c("href",r.pricingSourceUrl,A),o(7),s(r.pricingSourceLabel),o(5),s(r.pricingVersion),o(5),s(_(27,25,r.pricingSnapshotDate,"MMM d, y")),o(6),s(_(33,28,r.pricingImportedAt,"MMM d, y")),o(11),d("1 credit = $",_(44,31,r.creditUsd,"1.2-2")," USD"),o(3),c("href",r.allowanceSourceUrl,A),o(6),c("text",r.help.allowance),o(),c("ngModel",r.selectedAllowance().id),o(),v(r.allowancePlans),o(5),c("text",r.help.usageWindow),o(),c("ngModel",r.usageTimeRange()),o(),v(r.usageTimeOptions),o(5),s(r.selectedAllowanceUsage().windowLabel),o(2),d("",_(69,34,r.selectedAllowanceUsage().credits,"1.0-1")," credits"),o(3),T("",O(72,37,r.selectedAllowanceUsage().sessions)," of ",O(73,39,r.selectedAllowanceUsage().totalSessions)," sessions"),o(7),d("",O(79,41,r.selectedAllowance().creditsPerUserMonthly)," credits/user"),o(6),d("",_(85,43,r.selectedAllowanceUsage().share,"1.0-1"),"%"),o(3),L("width",r.selectedAllowanceUsage().share>100?100:r.selectedAllowanceUsage().share,"%"),o(2),T("",r.selectedAllowance().period,". ",r.selectedAllowance().note),o(2),v(r.allowancePlans),o(24),c("text",r.help.inputTokens),o(3),c("text",r.help.cachedInput),o(3),c("text",r.help.cacheWrite),o(3),c("text",r.help.outputTokens),o(3),v(r.pricingRows()))},dependencies:[oe,ie,ae,ne,ee,te,Z,G,B],styles:["[_nghost-%COMP%]{display:block}.pricing-page[_ngcontent-%COMP%]{display:grid;gap:16px}.pricing-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.pricing-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--text-strong);font-size:22px;font-weight:760;letter-spacing:0}.pricing-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.pricing-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:not(.eyebrow){max-width:720px;margin-top:6px;color:var(--muted);font-size:12px;line-height:1.45}.pricing-header[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{border:1px solid var(--line-strong);border-radius:999px;padding:7px 10px;color:var(--text);font-size:12px;font-weight:720;text-decoration:none;white-space:nowrap}.pricing-source[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow, 0 18px 50px rgba(0, 0, 0, .22))}.pricing-source[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{padding:12px;border-right:1px solid var(--line)}.pricing-source[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:last-child{border-right:0}.pricing-source[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .pricing-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .pricing-note[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--muted);font-size:12px}.pricing-source[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:5px;color:var(--text);font-weight:760}.pricing-note[_ngcontent-%COMP%]{border:1px solid var(--line);border-left:4px solid var(--accent-2);border-radius:12px;padding:12px 14px;background:var(--surface-soft)}.pricing-note[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong)}.pricing-note[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:940px;margin:4px 0 0;line-height:1.45}.allowance-panel[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(320px,1.15fr);gap:14px;border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--header-gradient, linear-gradient(135deg, rgba(124, 92, 255, .16), rgba(31, 209, 165, .07)), var(--surface))}.allowance-copy[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:var(--text-strong);font-size:18px;font-weight:760}.allowance-copy[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .allowance-control[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .allowance-card[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .allowance-card[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;line-height:1.45}.allowance-copy[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-flex;margin-top:8px;color:var(--accent-2);font-size:12px;font-weight:760;text-decoration:none}.allowance-control[_ngcontent-%COMP%]{display:grid;align-content:start;gap:12px}.allowance-control[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;gap:6px}.allowance-control[_ngcontent-%COMP%] label[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:760}.allowance-control[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;border:1px solid var(--line-strong);border-radius:10px;padding:8px 10px;background:var(--control-bg, rgba(5, 12, 22, .55));color:var(--text);font:inherit;font-weight:720}.allowance-meter[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.allowance-meter[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface-soft)}.allowance-meter[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:var(--muted);font-size:11px}.allowance-meter[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{display:block;margin-top:3px;color:var(--muted);font-size:11px;font-style:normal}.allowance-meter[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:3px;color:var(--text-strong);font-size:16px;font-weight:760}.allowance-bar[_ngcontent-%COMP%]{height:7px;overflow:hidden;border-radius:999px;background:#6170852e}.allowance-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent-2),#ffba4a)}.allowance-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.allowance-card[_ngcontent-%COMP%]{display:grid;gap:3px;border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--surface);color:inherit;font:inherit;text-align:left;cursor:pointer}.allowance-card.active[_ngcontent-%COMP%]{border-color:#1fd1a570;background:#1fd1a517;box-shadow:0 0 0 1px #1fd1a51f inset}.allowance-card[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:20px;font-weight:760}.pricing-table[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.pricing-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(210px,1.35fr) repeat(3,minmax(100px,.65fr)) minmax(150px,.9fr) repeat(4,minmax(100px,.58fr)) minmax(124px,.7fr);min-width:1240px;border-bottom:1px solid var(--line)}.pricing-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.pricing-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding:10px 12px}.pricing-row-heading[_ngcontent-%COMP%]{background:var(--surface-soft);color:var(--muted);font-size:11px;font-weight:720;text-transform:uppercase}.pricing-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text);font-size:14px;font-weight:760}.pricing-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{display:block;margin-top:4px;color:var(--text);font-size:12px;font-style:normal;font-weight:600}.used-pill[_ngcontent-%COMP%]{display:inline-flex;border:1px solid rgba(31,209,165,.35);border-radius:999px;padding:4px 8px;background:#1fd1a51f;color:var(--success-text, #bbfff0)!important;font-size:12px;font-weight:900;white-space:nowrap}.used-pill.fallback-used[_ngcontent-%COMP%]{border-color:#ffba4a73;background:#ffba4a1f;color:var(--warning-text, #ffe0a0)!important}.muted[_ngcontent-%COMP%]{color:var(--muted)}.eyebrow[_ngcontent-%COMP%]{color:var(--accent-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}@media(max-width:900px){.pricing-header[_ngcontent-%COMP%], .pricing-source[_ngcontent-%COMP%]{display:grid}.pricing-source[_ngcontent-%COMP%], .allowance-panel[_ngcontent-%COMP%], .allowance-grid[_ngcontent-%COMP%], .allowance-meter[_ngcontent-%COMP%]{grid-template-columns:1fr}.pricing-source[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{border-right:0;border-bottom:1px solid var(--line)}.pricing-source[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:last-child{border-bottom:0}}.used-pill[_ngcontent-%COMP%]{padding:3px 7px;font-size:11px;font-weight:760}@media(max-width:1100px){.allowance-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}.theme-light[_nghost-%COMP%] .pricing-source[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .pricing-source[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .pricing-table[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .pricing-table[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .pricing-note[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .pricing-note[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .allowance-panel[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .allowance-panel[_ngcontent-%COMP%]{box-shadow:var(--shadow-soft)}.theme-light[_nghost-%COMP%] .pricing-source[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .pricing-source[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffc2,#ffffff75),var(--surface)}.theme-light[_nghost-%COMP%] .pricing-note[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .pricing-note[_ngcontent-%COMP%]{background:linear-gradient(135deg,#0c9f830b,#6f5cff05),var(--surface)}.theme-light[_nghost-%COMP%] .allowance-panel[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .allowance-panel[_ngcontent-%COMP%]{border-color:#bdcbdae6}.theme-light[_nghost-%COMP%] .allowance-card[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .allowance-card[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .allowance-meter[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .allowance-meter[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background:#ffffffad}.theme-light[_nghost-%COMP%] .pricing-table[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .pricing-table[_ngcontent-%COMP%]{background:var(--surface)}"]})};export{le as PricingPageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as M,q as p,r as d,s as h,w as U}from"./chunk-VEKXIM47.js";import{a as D,b as T}from"./chunk-WOIYAEKB.js";function P(t,r,o,e){let n=O(t,r);return t.filter(s=>{let i=new Date(s.startedAt).getTime();return n.start!==null&&i<n.start||n.end!==null&&i>=n.end||o!=="all"&&s.workspace!==o?!1:e==="all"||s.modelBreakdown.some(u=>u.pricingModel===e||u.model===e)})}function V(t,r){let o=new Map;for(let e of t)for(let n of e.modelBreakdown){let s=`${n.model}::${n.pricingModel}`,i=o.get(s)??{model:n.model,pricingModel:n.pricingModel,turns:0,sessions:new Set,tokens:0,input:0,cachedInput:0,cacheWrite:0,output:0,cost:0};i.turns+=n.turns,i.sessions.add(e.id),i.tokens+=M(n.tokens),i.input+=n.tokens.input,i.cachedInput+=n.tokens.cachedInput,i.cacheWrite+=n.tokens.cacheWrite,i.output+=n.tokens.output,i.cost+=n.cost.usd,o.set(s,i)}return[...o.values()].map(e=>T(D({},e),{sessionCount:e.sessions.size,costPer1k:e.tokens?e.cost/e.tokens*1e3:0,share:r>0?e.cost/r*100:0,usesFallbackPrice:U(e.model,e.pricingModel)})).sort((e,n)=>n.cost-e.cost)}function B(t,r){let o=new Map;for(let e of t){let n=W(e.startedAt,r),s=o.get(n.key)??T(D({},n),{count:0,tokens:0,cost:0,credits:0,topSession:null,topSessionCost:0});s.count+=1,s.tokens+=p(e);let i=d(e);s.cost+=i,s.credits+=h(e),(!s.topSession||i>s.topSessionCost)&&(s.topSession=e,s.topSessionCost=i),o.set(n.key,s)}return[...o.values()].sort((e,n)=>n.key.localeCompare(e.key)).slice(0,8)}function G(t,r){return["Small","Medium","Large","Very large"].map(e=>{let n=t.filter(a=>v(p(a))===e),s=n.reduce((a,c)=>a+p(c),0),i=n.reduce((a,c)=>a+d(c),0),u=n.reduce((a,c)=>a+h(c),0),l=S(n,a=>d(a));return{size:e,count:n.length,tokens:s,cost:i,share:r>0?i/r*100:0,credits:u,topSession:l,topSessionCost:l?d(l):0}})}function E(t,r,o){if(!t.length)return[];let e=F(t.map(s=>d(s))),n=F(t.map(s=>p(s)));return t.map(s=>{let i=p(s),u=e>0?(d(s)-r)/e:0,l=n>0?(i-o)/n:0,a=Math.max(u,l),c=I(s,u,l);return{session:s,tokens:i,score:a,reason:c}}).filter(s=>s.score>=1||t.length<=5).sort((s,i)=>i.score-s.score||d(i.session)-d(s.session)).slice(0,5)}function H(t,r,o=new Date){let e=Number.isFinite(o.getTime())?o:new Date,n=S(t,L=>Date.parse(L.startedAt)||0),s=$(e),i=b(s,1),u=N(e),l=b(s,1),a=R(e),c=Y(e),m=w(t,s,i),g=w(t,u,l),k=w(t,a,c),x=n?z(n.startedAt):null;return[f("last-session","Last session",n?[n]:[],r,n?.title??"No imported sessions",x?y(x):"No imported sessions"),f("today","Today",m,r,"Imported sessions from today",y(s)),f("week","This week",g,r,"Week so far",A(u,b(l,-1))),f("month","Calendar month",k,r,"Current calendar month",A(a,b(c,-1))),f("visible","Selected scope",t,r,"Sessions matching Usage filters","All imported dates in this view")]}function O(t,r){if(r==="all"||!t.length)return{start:null,end:null,anchor:null};let o=Math.max(...t.map(s=>new Date(s.startedAt).getTime()).filter(Number.isFinite));if(!Number.isFinite(o))return{start:null,end:null,anchor:null};let e=new Date(o);if(r==="current-month"||r==="previous-month"){let s=r==="current-month"?0:-1,i=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+s,1)),u=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+s+1,1));return{start:i.getTime(),end:u.getTime(),anchor:e}}return{start:o-(r==="7d"?7:r==="30d"?30:90)*24*60*60*1e3,end:null,anchor:e}}function W(t,r){let o=new Date(t);if(!Number.isFinite(o.getTime()))return{key:"unknown",label:"Unknown date"};let e=C(o);if(r==="day")return{key:e,label:e};if(r==="month")return{key:e.slice(0,7),label:e.slice(0,7)};let n=new Date(Date.UTC(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate())),s=n.getUTCDay()||7;return n.setUTCDate(n.getUTCDate()-s+1),{key:C(n),label:`Week of ${C(n)}`}}function v(t){return t>=15e5?"Very large":t>=5e5?"Large":t>=1e5?"Medium":"Small"}function S(t,r){return t.reduce((o,e)=>!o||r(e)>r(o)?e:o,null)}function I(t,r,o){let e=p(t),n=t.tokens.input+t.tokens.cachedInput+t.tokens.cacheWrite,s=e?n/e*100:0,i=S(t.modelBreakdown,k=>k.cost.usd),u=d(t),l=i&&u>0?i.cost.usd/u*100:0,a=t.traceSummary.modelTurns,c=t.traceSummary.toolCalls,m=a+c;return Math.max(r,o)>=2&&m<=3&&e>=1e5?`Suspicious spike: ${e.toLocaleString()} tokens with only ${m.toLocaleString()} imported model/tool events. Inspect the largest model call and source log shape.`:s>=85&&n>=1e5?`Mostly input/context tokens (${s.toFixed(0)}% of imported tokens). Check prompt context, repo reads, prior conversation, and tool results.`:i&&l>=70?`${i.pricingModel} produced ${l.toFixed(0)}% of this run's estimate. Model mix is the first thing to inspect.`:c>=20?`${c.toLocaleString()} tool calls may have added results back into later model input.`:t.traceSummary.errors===0&&a>=8&&c>=8?`Large but plausible long agent run: ${a.toLocaleString()} model turns and ${c.toLocaleString()} tool calls with no imported errors. Inspect input/context and tool activity before treating it as waste.`:r>=o?`Cost is ${r.toFixed(1)} standard deviations above this cohort. Check model price rows and output mix.`:`Tokens are ${o.toFixed(1)} standard deviations above this cohort. Check input context and model-turn count.`}function f(t,r,o,e,n,s){let i=o.reduce((m,g)=>m+h(g),0),u=o.reduce((m,g)=>m+d(g),0),l=S(o,m=>d(m)),a=o.filter(m=>!m.sourceUsage).length,c=e>0?i/e*100:0;return{id:t,label:r,period:s,credits:i,usd:u,count:o.length,allowanceShare:c,fallbackCount:a,session:l,detail:o.length?`${o.length.toLocaleString()} session${o.length===1?"":"s"}`:n,actionLabel:l?t==="last-session"?"Open run":"Open top run":"No run to open"}}function w(t,r,o){let e=r.getTime(),n=o.getTime();return t.filter(s=>{let i=Date.parse(s.startedAt);return Number.isFinite(i)&&i>=e&&i<n})}function $(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function N(t){let r=t.getDay()||7,o=$(t);return o.setDate(o.getDate()-r+1),o}function R(t){return new Date(t.getFullYear(),t.getMonth(),1)}function Y(t){return new Date(t.getFullYear(),t.getMonth()+1,1)}function b(t,r){let o=new Date(t);return o.setDate(o.getDate()+r),o}function z(t){let r=Date.parse(t);return Number.isFinite(r)?new Date(r):null}function y(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t)}function A(t,r){return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()?`${new Intl.DateTimeFormat("en-US",{month:"short"}).format(t)} ${t.getDate()}-${r.getDate()}, ${t.getFullYear()}`:`${y(t)} - ${y(r)}`}function F(t){if(t.length<2)return 0;let r=t.reduce((e,n)=>e+n,0)/t.length,o=t.reduce((e,n)=>e+(n-r)**2,0)/t.length;return Math.sqrt(o)}function C(t){return t.toISOString().slice(0,10)}export{P as a,V as b,B as c,G as d,E as e,H as f,S as g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as Q,D as g,F as m,H as T,I as v,J as h,K as H,M as J,N as ee,R as re,_ as te,e as K,j as X,kb as oe,n as _,na as ne,pb as se,qb as ie,s as Y,u as q,w as Z}from"./chunk-WOIYAEKB.js";var w=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
2
|
+
`).forEach(r=>{let n=r.indexOf(":");if(n>0){let o=r.slice(0,n),s=r.slice(n+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((r,n)=>{this.addHeaderEntry(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let r=this.headers.get(e.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,r){return this.clone({name:e,value:r,op:"a"})}set(e,r){return this.clone({name:e,value:r,op:"s"})}delete(e,r){return this.clone({name:e,value:r,op:"d"})}maybeSetNormalizedName(e,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(r=>{this.headers.set(r,e.headers.get(r)),this.normalizedNames.set(r,e.normalizedNames.get(r))})}clone(e){let r=new t;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([e]),r}applyUpdate(e){let r=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,r);let o=(e.op==="a"?this.headers.get(r):void 0)||[];o.push(...n),this.headers.set(r,o);break;case"d":let s=e.value;if(!s)this.headers.delete(r),this.normalizedNames.delete(r);else{let i=this.headers.get(r);if(!i)return;i=i.filter(l=>s.indexOf(l)===-1),i.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,i)}break}}addHeaderEntry(e,r){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(r):this.headers.set(n,[r])}setHeaderEntries(e,r){let n=(Array.isArray(r)?r:[r]).map(s=>s.toString()),o=e.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>e(this.normalizedNames.get(r),this.headers.get(r)))}};var L=class{map=new Map;set(e,r){return this.map.set(e,r),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},S=class{encodeKey(e){return ae(e)}encodeValue(e){return ae(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function be(t,e){let r=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,l]=s==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,s)),e.decodeValue(o.slice(s+1))],a=r.get(i)||[];a.push(l),r.set(i,a)}),r}var Re=/%(\d[a-f0-9])/gi,Pe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ae(t){return encodeURIComponent(t).replace(Re,(e,r)=>Pe[r]??e)}function j(t){return`${t}`}var y=class t{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new S,e.fromString){if(e.fromObject)throw new g(2805,!1);this.map=be(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(r=>{let n=e.fromObject[r],o=Array.isArray(n)?n.map(j):[j(n)];this.map.set(r,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let r=this.map.get(e);return r?r[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,r){return this.clone({param:e,value:r,op:"a"})}appendAll(e){let r=[];return Object.keys(e).forEach(n=>{let o=e[n];Array.isArray(o)?o.forEach(s=>{r.push({param:n,value:s,op:"a"})}):r.push({param:n,value:o,op:"a"})}),this.clone(r)}set(e,r){return this.clone({param:e,value:r,op:"s"})}delete(e,r){return this.clone({param:e,value:r,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let r=this.encoder.encodeKey(e);return this.map.get(e).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let r=new t({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(e),r}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let r=(e.op==="a"?this.map.get(e.param):void 0)||[];r.push(j(e.value)),this.map.set(e.param,r);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],o=n.indexOf(j(e.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Me(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ce(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function de(t){return typeof Blob<"u"&&t instanceof Blob}function le(t){return typeof FormData<"u"&&t instanceof FormData}function Ne(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var ue="Content-Type",he="Accept",fe="text/plain",pe="application/json",Oe=`${pe}, ${fe}, */*`,M=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,r,n,o){this.url=r,this.method=e.toUpperCase();let s;if(Me(this.method)||o?(this.body=n!==void 0?n:null,s=o):s=n,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new g(2822,"");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),s.integrity&&(this.integrity=s.integrity),s.referrer&&(this.referrer=s.referrer),s.referrerPolicy&&(this.referrerPolicy=s.referrerPolicy),this.transferCache=s.transferCache}if(this.headers??=new w,this.context??=new L,!this.params)this.params=new y,this.urlWithParams=r;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=r;else{let l=r.indexOf("?"),a=l===-1?"?":l<r.length-1?"&":"";this.urlWithParams=r+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ce(this.body)||de(this.body)||le(this.body)||Ne(this.body)?this.body:this.body instanceof y?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||le(this.body)?null:de(this.body)?this.body.type||null:ce(this.body)?null:typeof this.body=="string"?fe:this.body instanceof y?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?pe:null}clone(e={}){let r=e.method||this.method,n=e.url||this.url,o=e.responseType||this.responseType,s=e.keepalive??this.keepalive,i=e.priority||this.priority,l=e.cache||this.cache,a=e.mode||this.mode,f=e.redirect||this.redirect,x=e.credentials||this.credentials,E=e.referrer||this.referrer,D=e.integrity||this.integrity,F=e.referrerPolicy||this.referrerPolicy,C=e.transferCache??this.transferCache,U=e.timeout??this.timeout,c=e.body!==void 0?e.body:this.body,d=e.withCredentials??this.withCredentials,p=e.reportProgress??this.reportProgress,P=e.headers||this.headers,u=e.params||this.params,I=e.context??this.context;return e.setHeaders!==void 0&&(P=Object.keys(e.setHeaders).reduce((A,b)=>A.set(b,e.setHeaders[b]),P)),e.setParams&&(u=Object.keys(e.setParams).reduce((A,b)=>A.set(b,e.setParams[b]),u)),new t(r,n,c,{params:u,headers:P,context:I,reportProgress:p,responseType:o,withCredentials:d,transferCache:C,keepalive:s,cache:l,priority:i,timeout:U,mode:a,redirect:f,credentials:x,referrer:E,integrity:D,referrerPolicy:F})}},R=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(R||{}),O=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,r=200,n="OK"){this.headers=e.headers||new w,this.status=e.status!==void 0?e.status:r,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},B=class t extends O{constructor(e={}){super(e)}type=R.ResponseHeader;clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},k=class t extends O{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=R.Response;clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},N=class extends O{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},De=200,Ie=204;var Ae=new T("");var _e=/^\)\]\}',?\n/;var V=(()=>{class t{xhrFactory;tracingService=h(ne,{optional:!0});constructor(r){this.xhrFactory=r}maybePropagateTrace(r){return this.tracingService?.propagate?this.tracingService.propagate(r):r}handle(r){if(r.method==="JSONP")throw new g(-2800,!1);let n=this.xhrFactory;return X(null).pipe(Q(()=>new K(s=>{let i=n.build();if(i.open(r.method,r.urlWithParams),r.withCredentials&&(i.withCredentials=!0),r.headers.forEach((c,d)=>i.setRequestHeader(c,d.join(","))),r.headers.has(he)||i.setRequestHeader(he,Oe),!r.headers.has(ue)){let c=r.detectContentTypeHeader();c!==null&&i.setRequestHeader(ue,c)}if(r.timeout&&(i.timeout=r.timeout),r.responseType){let c=r.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let l=r.serializeBody(),a=null,f=()=>{if(a!==null)return a;let c=i.statusText||"OK",d=new w(i.getAllResponseHeaders()),p=i.responseURL||r.url;return a=new B({headers:d,status:i.status,statusText:c,url:p}),a},x=this.maybePropagateTrace(()=>{let{headers:c,status:d,statusText:p,url:P}=f(),u=null;d!==Ie&&(u=typeof i.response>"u"?i.responseText:i.response),d===0&&(d=u?De:0);let I=d>=200&&d<300;if(r.responseType==="json"&&typeof u=="string"){let A=u;u=u.replace(_e,"");try{u=u!==""?JSON.parse(u):null}catch(b){u=A,I&&(I=!1,u={error:b,text:u})}}I?(s.next(new k({body:u,headers:c,status:d,statusText:p,url:P||void 0})),s.complete()):s.error(new N({error:u,headers:c,status:d,statusText:p,url:P||void 0}))}),E=this.maybePropagateTrace(c=>{let{url:d}=f(),p=new N({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:d||void 0});s.error(p)}),D=E;r.timeout&&(D=this.maybePropagateTrace(c=>{let{url:d}=f(),p=new N({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:d||void 0});s.error(p)}));let F=!1,C=this.maybePropagateTrace(c=>{F||(s.next(f()),F=!0);let d={type:R.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(d.total=c.total),r.responseType==="text"&&i.responseText&&(d.partialText=i.responseText),s.next(d)}),U=this.maybePropagateTrace(c=>{let d={type:R.UploadProgress,loaded:c.loaded};c.lengthComputable&&(d.total=c.total),s.next(d)});return i.addEventListener("load",x),i.addEventListener("error",E),i.addEventListener("timeout",D),i.addEventListener("abort",E),r.reportProgress&&(i.addEventListener("progress",C),l!==null&&i.upload&&i.upload.addEventListener("progress",U)),i.send(l),s.next({type:R.Sent}),()=>{i.removeEventListener("error",E),i.removeEventListener("abort",E),i.removeEventListener("load",x),i.removeEventListener("timeout",D),r.reportProgress&&(i.removeEventListener("progress",C),l!==null&&i.upload&&i.upload.removeEventListener("progress",U)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||t)(v(ie))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ke(t,e){return e(t)}function xe(t,e,r){return(n,o)=>ee(r,()=>e(n,s=>t(s,o)))}var ye=new T("",{factory:()=>[]}),ge=new T(""),me=new T("",{factory:()=>!0});var G=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=m({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=v(V),o},providedIn:"root"})}return t})();var z=(()=>{class t{backend;injector;chain=null;pendingTasks=h(te);contributeToStability=h(me);constructor(r,n){this.backend=r,this.injector=n}handle(r){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(ye),...this.injector.get(ge,[])]));this.chain=n.reduceRight((o,s)=>xe(o,s,this.injector),ke)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(r,o=>this.backend.handle(o)).pipe(Z(n))}else return this.chain(r,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(v(G),v(J))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),W=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=m({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=v(z),o},providedIn:"root"})}return t})();function $(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer,referrerPolicy:t.referrerPolicy}}var Te=(()=>{class t{handler;constructor(r){this.handler=r}request(r,n,o={}){let s;if(r instanceof M)s=r;else{let a;o.headers instanceof w?a=o.headers:a=new w(o.headers);let f;o.params&&(o.params instanceof y?f=o.params:f=new y({fromObject:o.params})),s=new M(r,n,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:f,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let i=X(s).pipe(q(a=>this.handler.handle(a)));if(r instanceof M||o.observe==="events")return i;let l=i.pipe(Y(a=>a instanceof k));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(_(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new g(2806,!1);return a.body}));case"blob":return l.pipe(_(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new g(2807,!1);return a.body}));case"text":return l.pipe(_(a=>{if(a.body!==null&&typeof a.body!="string")throw new g(2808,!1);return a.body}));default:return l.pipe(_(a=>a.body))}case"response":return l;default:throw new g(2809,!1)}}delete(r,n={}){return this.request("DELETE",r,n)}get(r,n={}){return this.request("GET",r,n)}head(r,n={}){return this.request("HEAD",r,n)}jsonp(r,n){return this.request("JSONP",r,{params:new y().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(r,n={}){return this.request("OPTIONS",r,n)}patch(r,n,o={}){return this.request("PATCH",r,$(o,n))}post(r,n,o={}){return this.request("POST",r,$(o,n))}put(r,n,o={}){return this.request("PUT",r,$(o,n))}static \u0275fac=function(n){return new(n||t)(v(W))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Fe=new T("",{factory:()=>!0}),Ce="XSRF-TOKEN",Ue=new T("",{factory:()=>Ce}),je="X-XSRF-TOKEN",Le=new T("",{factory:()=>je}),Se=(()=>{class t{cookieName=h(Ue);doc=h(re);lastCookieString="";lastToken=null;parseCount=0;getToken(){let r=this.doc.cookie||"";return r!==this.lastCookieString&&(this.parseCount++,this.lastToken=se(r,this.cookieName),this.lastCookieString=r),this.lastToken}static \u0275fac=function(n){return new(n||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ve=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=m({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=v(Se),o},providedIn:"root"})}return t})();function Be(t,e){if(!h(Fe)||t.method==="GET"||t.method==="HEAD")return e(t);try{let o=h(oe).href,{origin:s}=new URL(o),{origin:i}=new URL(t.url,s);if(s!==i)return e(t)}catch{return e(t)}let r=h(ve).getToken(),n=h(Le);return r!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,r)})),e(t)}function ze(...t){let e=[Te,z,{provide:W,useExisting:z},{provide:G,useFactory:()=>h(Ae,{optional:!0})??h(V)},{provide:ye,useValue:Be,multi:!0}];for(let r of t)e.push(...r.\u0275providers);return H(e)}function we(){return globalThis.window?.__COPILOT_USAGE_STUDIO_HOST__??{}}function Ir(t){let e=we().apiBaseUrl?.replace(/\/+$/,"")??"",r=t.startsWith("/")?t:`/${t}`;return`${e}${r}`}function Ar(t){let e=we().allowedViews;return Array.isArray(e)&&e.length?e:t}export{Te as a,ze as b,we as c,Ir as d,Ar as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as K,o as X,p as L,q as G,r as w,v as S,w as Y,x as j}from"./chunk-VEKXIM47.js";import{$a as b,Ba as W,Ca as x,Da as h,Fa as T,Ga as E,Ha as A,Ia as a,Ja as o,Ka as Q,O as U,Oa as F,P as D,Qa as O,Sa as u,U as z,Ua as y,Va as c,Wa as f,Xa as k,Ya as C,Z as B,Za as V,_a as m,ab as _,db as v,ka as s,mb as H,ob as J,sa as q,sb as Z,tb as ee,ub as te,vb as ne,zb as ie}from"./chunk-WOIYAEKB.js";var re=(r,t)=>t.id,ae=(r,t)=>t.label,se=(r,t)=>t.title,ce=(r,t)=>t.model+t.pricingModel;function le(r,t){if(r&1){let e=F();a(0,"button",12),O("click",function(){U(e);let i=u();return D(i.openBaselinePicker())}),a(1,"strong"),c(2),o(),a(3,"em"),c(4),m(5,"number"),o()()}if(r&2){let e=t,n=u();s(2),f(e.title),s(2),C("",n.compactDate(e.startedAt)," \xB7 $",_(5,3,n.usageUsd(e),"1.2-4"))}}function pe(r,t){r&1&&(a(0,"em",15),c(1,"Same prompt as B"),o())}function de(r,t){if(r&1&&(a(0,"em",16),c(1),m(2,"number"),o()),r&2){let e=u().$implicit,n=u(2);s(),k("",b(2,1,n.promptRepeatCount(e))," matching prompts")}}function me(r,t){if(r&1){let e=F();a(0,"button",14),O("click",function(){let i=U(e).$implicit,l=u(2);return D(l.setCompareA(i.id))}),a(1,"strong"),c(2),o(),a(3,"span"),c(4),m(5,"number"),m(6,"number"),o(),x(7,pe,2,0,"em",15)(8,de,3,3,"em",16),o()}if(r&2){let e=t.$implicit,n=u(2);y("active",e.id===n.selectedAId())("same-prompt",n.isSamePromptAsOther(e,"baseline")),W("aria-selected",e.id===n.selectedAId()),s(2),f(e.title),s(2),V(" ",n.compactDate(e.startedAt)," \xB7 $",_(5,10,n.usageUsd(e),"1.2-4")," \xB7 ",b(6,13,n.runTokenTotal(e))," tokens "),s(3),h(n.isSamePromptAsOther(e,"baseline")?7:n.promptRepeatCount(e)>1?8:-1)}}function ue(r,t){r&1&&(a(0,"em"),c(1,"No matching runs"),o())}function ge(r,t){if(r&1&&(a(0,"div",7),T(1,me,9,15,"button",13,re,!1,ue,2,0,"em"),o()),r&2){let e=u();s(),E(e.baselineOptions().slice(0,8))}}function Ce(r,t){if(r&1){let e=F();a(0,"button",17),O("click",function(){U(e);let i=u();return D(i.openCandidatePicker())}),a(1,"strong"),c(2),o(),a(3,"em"),c(4),m(5,"number"),o()()}if(r&2){let e=t,n=u();s(2),f(e.title),s(2),C("",n.compactDate(e.startedAt)," \xB7 $",_(5,3,n.usageUsd(e),"1.2-4"))}}function _e(r,t){r&1&&(a(0,"em",15),c(1,"Same prompt as A"),o())}function xe(r,t){if(r&1&&(a(0,"em",16),c(1),m(2,"number"),o()),r&2){let e=u().$implicit,n=u(2);s(),k("",b(2,1,n.promptRepeatCount(e))," matching prompts")}}function he(r,t){if(r&1){let e=F();a(0,"button",14),O("click",function(){let i=U(e).$implicit,l=u(2);return D(l.setCompareB(i.id))}),a(1,"strong"),c(2),o(),a(3,"span"),c(4),m(5,"number"),m(6,"number"),o(),x(7,_e,2,0,"em",15)(8,xe,3,3,"em",16),o()}if(r&2){let e=t.$implicit,n=u(2);y("active",e.id===n.selectedBId())("same-prompt",n.isSamePromptAsOther(e,"candidate")),W("aria-selected",e.id===n.selectedBId()),s(2),f(e.title),s(2),V(" ",n.compactDate(e.startedAt)," \xB7 $",_(5,10,n.usageUsd(e),"1.2-4")," \xB7 ",b(6,13,n.runTokenTotal(e))," tokens "),s(3),h(n.isSamePromptAsOther(e,"candidate")?7:n.promptRepeatCount(e)>1?8:-1)}}function be(r,t){r&1&&(a(0,"em"),c(1,"No matching runs"),o())}function fe(r,t){if(r&1&&(a(0,"div",10),T(1,he,9,15,"button",13,re,!1,be,2,0,"em"),o()),r&2){let e=u();s(),E(e.candidateOptions().slice(0,8))}}function ve(r,t){r&1&&(a(0,"p",19),c(1,"These first prompts differ, so read this as run comparison rather than prompt A/B testing."),o())}function Pe(r,t){if(r&1&&(a(0,"strong"),c(1),m(2,"number"),o(),a(3,"em"),c(4),m(5,"number"),m(6,"number"),o()),r&2){let e=u().$implicit,n=u(2);y("saving",e.lowerIsBetter&&e.delta<0),s(),C(" ",e.delta<0?"-":"+","$",_(2,6,n.abs(e.delta),"1.2-4")," "),s(3),C("A $",_(5,9,e.a,"1.2-4")," / B $",_(6,12,e.b,"1.2-4"))}}function Me(r,t){if(r&1&&(c(0),m(1,"number")),r&2){let e=u(2).$implicit;C(" \xB7 ",e.percent>=0?"+":"","",_(1,2,e.percent,"1.0-0"),"% ")}}function Oe(r,t){if(r&1&&(a(0,"strong"),c(1),m(2,"number"),o(),a(3,"em"),c(4),m(5,"number"),m(6,"number"),x(7,Me,2,5),o()),r&2){let e=u().$implicit;y("saving",e.lowerIsBetter&&e.delta<0),s(),C(" ",e.delta>=0?"+":"","",b(2,7,e.delta)," "),s(3),C(" A ",b(5,9,e.a)," / B ",b(6,11,e.b)," "),s(3),h(e.percent!==null?7:-1)}}function ye(r,t){if(r&1&&(a(0,"div")(1,"span"),c(2),Q(3,"app-help-popover",29),o(),x(4,Pe,7,15)(5,Oe,8,13),o()),r&2){let e=t.$implicit;s(2),k(" ",e.label," "),s(),A("text",e.help)("label","Explain "+e.label),s(),h(e.format==="currency"?4:5)}}function ke(r,t){if(r&1&&(a(0,"article",24)(1,"div")(2,"span"),c(3),o(),a(4,"strong"),c(5),o()(),a(6,"p"),c(7),o()()),r&2){let e=t.$implicit;A("ngClass",e.tone),s(3),f(e.title),s(2),f(e.value),s(2),f(e.detail)}}function we(r,t){if(r&1&&(a(0,"em",30),c(1," fallback pricing "),Q(2,"app-help-popover",32),o()),r&2){let e=u().$implicit,n=u(2);s(2),A("text",n.pricingFallbackReason(e.model,e.pricingModel))}}function Se(r,t){if(r&1&&(a(0,"em"),c(1),o()),r&2){let e=u().$implicit,n=u(2);s(),k("write ",n.tokenDeltaLabel(e.cacheWriteDelta))}}function Be(r,t){if(r&1&&(a(0,"div",28)(1,"strong"),c(2),o(),a(3,"span"),c(4),x(5,we,3,1,"em",30),o(),a(6,"span"),c(7),m(8,"number"),m(9,"number"),o(),a(10,"span",31)(11,"strong"),c(12),m(13,"number"),o(),a(14,"em"),c(15),o(),x(16,Se,2,1,"em"),a(17,"em"),c(18),o()(),a(19,"span"),c(20),m(21,"number"),m(22,"number"),o(),a(23,"span"),c(24),m(25,"number"),o()()),r&2){let e=t.$implicit,n=u(2);s(2),f(e.model),s(2),k(" ",e.pricingModel," "),s(),h(e.usesFallbackPrice?5:-1),s(2),C("$",_(8,17,e.aCost,"1.4-6")," / $",_(9,20,e.bCost,"1.4-6")),s(5),C("",e.tokenDelta>=0?"+":"","",b(13,23,e.tokenDelta)),s(3),C(" normal ",n.tokenDeltaLabel(e.inputDelta)," \xB7 cached ",n.tokenDeltaLabel(e.cachedInputDelta)," "),s(),h(e.cacheWriteDelta?16:-1),s(2),k("out ",n.tokenDeltaLabel(e.outputDelta)),s(2),C("",b(21,25,e.aTurns)," / ",b(22,27,e.bTurns)),s(3),y("saving",e.costDelta<0),s(),C(" ",e.costDelta<0?"-":"+","$",_(25,29,n.abs(e.costDelta),"1.4-4")," ")}}function Ie(r,t){if(r&1&&(a(0,"div",18)(1,"div")(2,"span"),c(3),o(),a(4,"strong"),c(5),m(6,"number"),o(),a(7,"p"),c(8),o(),x(9,ve,2,0,"p",19),o(),a(10,"dl")(11,"div")(12,"dt"),c(13,"A"),o(),a(14,"dd"),c(15),m(16,"number"),o()(),a(17,"div")(18,"dt"),c(19,"B"),o(),a(20,"dd"),c(21),m(22,"number"),o()(),a(23,"div")(24,"dt"),c(25,"Tokens"),o(),a(26,"dd"),c(27),m(28,"number"),o()()()(),a(29,"div",20),T(30,ye,6,4,"div",null,ae),o(),a(32,"section",21)(33,"div",22)(34,"h3"),c(35,"What changed"),o()(),a(36,"div",23),T(37,ke,8,4,"article",24,se),o()(),a(39,"section",25)(40,"div",22)(41,"h3"),c(42,"Model movement"),o(),a(43,"p"),c(44,"Pricing row, token buckets, turns, and cost movement."),o()(),a(45,"div",26)(46,"div",27)(47,"span"),c(48,"Model"),o(),a(49,"span"),c(50,"Price row"),o(),a(51,"span"),c(52,"Cost A / B"),o(),a(53,"span"),c(54,"Token movement"),o(),a(55,"span"),c(56,"Model calls A / B"),o(),a(57,"span"),c(58,"Cost delta"),o()(),T(59,Be,26,32,"div",28,ce),o()()),r&2){let e=t,n=u();s(3),f(e.promptMatch?"Same-prompt read":"Manual comparison read"),s(),y("saving",e.costDelta<0),s(),C(" ",e.costDelta<0?"-":"+","$",_(6,11,n.abs(e.costDelta),"1.2-4")," "),s(3),f(e.summary),s(),h(e.promptMatch?-1:9),s(6),k("",_(16,14,n.usageUsd(e.a),"1.2-2")," USD"),s(6),k("",_(22,17,n.usageUsd(e.b),"1.2-2")," USD"),s(6),C("",e.totalTokenDelta>=0?"+":"","",b(28,20,e.totalTokenDelta)),s(3),E(e.metrics),s(7),E(e.drivers),s(22),E(e.modelRows)}}function Te(r,t){r&1&&(a(0,"p",11),c(1,"Pick two different sessions to compare cost and token deltas."),o())}var oe=class r{sessionsInput=B([]);compareAInput=B(null);compareBInput=B(null);baselineQuery=B("");candidateQuery=B("");baselinePickerOpen=B(!1);candidatePickerOpen=B(!1);compareAChange=new z;compareBChange=new z;set sessions(t){this.sessionsInput.set(t??[])}set compareA(t){this.compareAInput.set(t??null)}set compareB(t){this.compareBInput.set(t??null)}sessionOptions=v(()=>this.sessionsInput());selectedAId=v(()=>this.compareAInput()??this.sessionOptions()[0]?.id??null);selectedBId=v(()=>this.compareBInput()??this.sessionOptions()[1]?.id??null);selectedASession=v(()=>this.sessionOptions().find(t=>t.id===this.selectedAId())??null);selectedBSession=v(()=>this.sessionOptions().find(t=>t.id===this.selectedBId())??null);baselineOptions=v(()=>this.filteredSessionOptions(this.baselineQuery(),this.selectedAId()));candidateOptions=v(()=>this.filteredSessionOptions(this.candidateQuery(),this.selectedBId()));abs=Math.abs;pricingFallbackReason=K;promptGroups=v(()=>this.samePromptGroups(this.sessionOptions()));comparison=v(()=>{let t=this.sessionOptions().find(R=>R.id===this.selectedAId()),e=this.sessionOptions().find(R=>R.id===this.selectedBId());if(!t||!e||t.id===e.id)return null;let n=this.sessionComparisonAnalysis(t),i=this.sessionComparisonAnalysis(e),l=i.totalTokens-n.totalTokens,p=w(t),d=w(e),g=d-p,P=i.inputContextUsd-n.inputContextUsd,I=i.outputUsd-n.outputUsd,M=e.traceSummary.toolCalls-t.traceSummary.toolCalls,N=e.traceSummary.modelTurns-t.traceSummary.modelTurns;return{a:t,b:e,aAnalysis:n,bAnalysis:i,promptMatch:$(t.firstPrompt)===$(e.firstPrompt),costDelta:g,totalTokenDelta:l,percent:S(p,d),summary:this.comparisonSummary(g,l,P,I,M,N),metrics:[{label:"Usage",a:p,b:d,delta:g,percent:S(p,d),format:"currency",lowerIsBetter:!0,help:"GitHub source usage when VS Code logged it. Falls back to local token pricing when source usage is unavailable."},{label:"Normal input tokens",a:t.tokens.input,b:e.tokens.input,delta:e.tokens.input-t.tokens.input,percent:S(t.tokens.input,e.tokens.input),format:"number",lowerIsBetter:!0,help:"Prompt/context tokens priced at the normal input rate. Cached input is shown separately when present."},{label:"Cached input tokens",a:t.tokens.cachedInput,b:e.tokens.cachedInput,delta:e.tokens.cachedInput-t.tokens.cachedInput,percent:S(t.tokens.cachedInput,e.tokens.cachedInput),format:"number",lowerIsBetter:!0,help:"Prompt/context tokens VS Code reported as cachedTokens. These are priced with the cached-input rate, not merged into normal input."},{label:"Cache write tokens",a:t.tokens.cacheWrite,b:e.tokens.cacheWrite,delta:e.tokens.cacheWrite-t.tokens.cacheWrite,percent:S(t.tokens.cacheWrite,e.tokens.cacheWrite),format:"number",lowerIsBetter:!0,help:"Cache creation tokens when VS Code exposes a numeric cache-write field. These are priced separately from normal and cached input."},{label:"Output tokens",a:t.tokens.output,b:e.tokens.output,delta:e.tokens.output-t.tokens.output,percent:S(t.tokens.output,e.tokens.output),format:"number",lowerIsBetter:!1,help:"Generated response tokens. More output can be useful, but it still affects cost."},{label:"Model turns",a:t.traceSummary.modelTurns,b:e.traceSummary.modelTurns,delta:N,percent:S(t.traceSummary.modelTurns,e.traceSummary.modelTurns),format:"number",lowerIsBetter:!1,help:"Model request count. More turns often means more accumulated context gets resent."},{label:"Tool calls",a:t.traceSummary.toolCalls,b:e.traceSummary.toolCalls,delta:M,percent:S(t.traceSummary.toolCalls,e.traceSummary.toolCalls),format:"number",lowerIsBetter:!1,help:"Tool activity. Tool results can become later input context."}],drivers:this.comparisonDrivers(n,i,g,P,I,M,N),modelRows:this.compareModelRows(n.modelRows,i.modelRows)}});setCompareA(t){let e=this.selectedAId(),n=this.selectedBId();this.compareAInput.set(t),this.compareAChange.emit(t),t&&t===n&&e&&e!==t&&(this.compareBInput.set(e),this.compareBChange.emit(e)),this.baselineQuery.set(""),this.baselinePickerOpen.set(!1)}setCompareB(t){let e=this.selectedAId(),n=this.selectedBId();this.compareBInput.set(t),this.compareBChange.emit(t),t&&t===e&&n&&n!==t&&(this.compareAInput.set(n),this.compareAChange.emit(n)),this.candidateQuery.set(""),this.candidatePickerOpen.set(!1)}setBaselineQuery(t){this.baselineQuery.set(t),this.baselinePickerOpen.set(!0)}setCandidateQuery(t){this.candidateQuery.set(t),this.candidatePickerOpen.set(!0)}openBaselinePicker(){this.baselinePickerOpen.set(!0)}openCandidatePicker(){this.candidatePickerOpen.set(!0)}closePickerOnFocusOut(t,e){let n=e.relatedTarget;if(!(n instanceof Node&&e.currentTarget instanceof Node&&e.currentTarget.contains(n))){if(t==="baseline"){this.baselinePickerOpen.set(!1);return}this.candidatePickerOpen.set(!1)}}compactDate(t){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(t))}runTokenTotal(t){return G(t)}usageUsd(t){return w(t)}promptRepeatCount(t){let e=$(t.firstPrompt);return e?this.promptGroups().find(n=>n.key===e)?.sessions.length??1:1}isSamePromptAsOther(t,e){let n=e==="baseline"?this.selectedBSession():this.selectedASession(),i=$(t.firstPrompt);return!!(n&&i&&i===$(n.firstPrompt))}tokenDeltaLabel(t){return`${t>=0?"+":""}${t.toLocaleString()}`}filteredSessionOptions(t,e){let n=t.trim().toLowerCase();if(!n)return this.sessionOptions();let i=this.sessionOptions().filter(p=>[p.title,p.firstPrompt,p.model,p.workspace].join(" ").toLowerCase().includes(n)),l=this.sessionOptions().find(p=>p.id===e);return l&&!i.some(p=>p.id===l.id)?[l,...i]:i}sessionComparisonAnalysis(t){let e=t.modelBreakdown.map(i=>X(i,w(t))),n=[...e].sort((i,l)=>l.totalUsd-i.totalUsd)[0]??null;return{session:t,modelRows:e,totalTokens:G(t),inputUsd:e.reduce((i,l)=>i+l.inputUsd,0),inputContextUsd:e.reduce((i,l)=>i+l.inputUsd+l.cachedInputUsd+l.cacheWriteUsd,0),outputUsd:e.reduce((i,l)=>i+l.outputUsd,0),cachedInputUsd:e.reduce((i,l)=>i+l.cachedInputUsd,0),cacheWriteUsd:e.reduce((i,l)=>i+l.cacheWriteUsd,0),topModel:n,modelNames:new Set(e.map(i=>i.model)),pricingRows:new Set(e.map(i=>i.pricingModel))}}samePromptGroups(t){let e=new Map;for(let n of t){let i=$(n.firstPrompt);i&&e.set(i,[...e.get(i)??[],n])}return[...e.entries()].filter(([,n])=>n.length>1).map(([n,i])=>{let l=[...i].sort((p,d)=>w(p)-w(d));return{key:n,sessions:[...i].sort((p,d)=>p.startedAt.localeCompare(d.startedAt)),costRangeUsd:w(l[l.length-1])-w(l[0])}}).sort((n,i)=>i.sessions.length-n.sessions.length||i.costRangeUsd-n.costRangeUsd)}comparisonSummary(t,e,n,i,l,p){let d=t>0?"more expensive":t<0?"cheaper":"about the same cost",g=e>0?"more":e<0?"fewer":"the same number of",P=Math.abs(n)>=Math.abs(i)?"input/context tokens":"generated output tokens",I=Math.abs(p)>=Math.abs(l)?`${Math.abs(p).toLocaleString()} ${p>=0?"more":"fewer"} model turns`:`${Math.abs(l).toLocaleString()} ${l>=0?"more":"fewer"} tool calls`;return t===0&&e===0?"These runs look equivalent on imported cost and token totals. Check logs if behavior differed qualitatively.":`Run B is ${d}, with ${Math.abs(e).toLocaleString()} ${g} imported tokens. The largest priced movement is ${P}; activity changed by ${I}.`}comparisonDrivers(t,e,n,i,l,p,d){let g=j(t.modelNames,e.modelNames)||j(t.pricingRows,e.pricingRows),P=t.topModel?.pricingModel!==e.topModel?.pricingModel;return[{title:"Cost movement",value:n>0?"Higher":n<0?"Lower":"Flat",tone:n>0?"high":n<0?"info":"medium",detail:n===0?"The imported estimate did not materially change between these two runs.":`Run B moved by ${n>0?"+":"-"}$${Math.abs(n).toFixed(4)}. Cheaper is only better if the run still did the job.`},{title:"Priced token driver",value:Math.abs(i)>=Math.abs(l)?"Input":"Output",tone:Math.abs(i)>=Math.abs(l)?"high":"medium",detail:Math.abs(i)>=Math.abs(l)?`Input/context cost moved by ${i>=0?"+":"-"}$${Math.abs(i).toFixed(4)} across normal input, cached input, and cache-write buckets. This is usually repo context, prior chat, or tool results.`:`Output cost moved by ${l>=0?"+":"-"}$${Math.abs(l).toFixed(4)}. The later run generated more or less text.`},{title:"Model pricing",value:g?"Changed":"Same",tone:g||P?"medium":"info",detail:g?`The model or pricing-row mix changed. A: ${[...t.pricingRows].join(", ")}. B: ${[...e.pricingRows].join(", ")}.`:`Both runs used the same imported pricing row mix: ${[...e.pricingRows].join(", ")}.`},{title:"Agent activity",value:`${d>=0?"+":""}${d} turns`,tone:d>3||p>10?"medium":"info",detail:`Run B has ${Math.abs(d)} ${d>=0?"more":"fewer"} model turns and ${Math.abs(p)} ${p>=0?"more":"fewer"} tool calls.`}]}compareModelRows(t,e){return[...new Set([...t,...e].map(i=>`${i.model}::${i.pricingModel}`))].map(i=>{let[l,p]=i.split("::"),d=t.find(M=>M.model===l&&M.pricingModel===p),g=e.find(M=>M.model===l&&M.pricingModel===p),P=d?L(d.tokens):0,I=g?L(g.tokens):0;return{model:l,pricingModel:p,usesFallbackPrice:Y(l,p),aCost:d?.totalUsd??0,bCost:g?.totalUsd??0,costDelta:(g?.totalUsd??0)-(d?.totalUsd??0),aTokens:P,bTokens:I,tokenDelta:I-P,inputDelta:(g?.tokens.input??0)-(d?.tokens.input??0),cachedInputDelta:(g?.tokens.cachedInput??0)-(d?.tokens.cachedInput??0),cacheWriteDelta:(g?.tokens.cacheWrite??0)-(d?.tokens.cacheWrite??0),outputDelta:(g?.tokens.output??0)-(d?.tokens.output??0),aTurns:d?.turns??0,bTurns:g?.turns??0}}).sort((i,l)=>Math.abs(l.costDelta)-Math.abs(i.costDelta))}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=q({type:r,selectors:[["app-compare-page"]],inputs:{sessions:"sessions",compareA:"compareA",compareB:"compareB"},outputs:{compareAChange:"compareAChange",compareBChange:"compareBChange"},decls:24,vars:11,consts:[[1,"compare"],[1,"compare-header"],[1,"eyebrow"],[1,"selectors"],[1,"run-picker",3,"focusout"],["type","button","aria-label","Open baseline run picker",1,"selected-run"],["type","search","placeholder","Search baseline runs","aria-label","Search baseline runs",3,"ngModelChange","focus","ngModel"],["role","listbox","aria-label","Baseline run results",1,"selector-results"],["type","button","aria-label","Open candidate run picker",1,"selected-run"],["type","search","placeholder","Search candidate runs","aria-label","Search candidate runs",3,"ngModelChange","focus","ngModel"],["role","listbox","aria-label","Candidate run results",1,"selector-results"],[1,"empty"],["type","button","aria-label","Open baseline run picker",1,"selected-run",3,"click"],["type","button","role","option",3,"active","same-prompt"],["type","button","role","option",3,"click"],[1,"match-chip"],[1,"match-chip","muted-chip"],["type","button","aria-label","Open candidate run picker",1,"selected-run",3,"click"],[1,"compare-readout"],[1,"compare-caveat"],[1,"comparison-grid","advanced"],[1,"comparison-section","comparison-drivers"],[1,"section-heading"],[1,"driver-list"],[3,"ngClass"],[1,"comparison-section","comparison-models"],[1,"cost-table","compact-table"],[1,"cost-row","cost-row-heading"],[1,"cost-row"],[3,"text","label"],[1,"warning-text"],[1,"token-movement"],["label","Explain fallback pricing",3,"text"]],template:function(e,n){if(e&1&&(a(0,"section",0)(1,"div",1)(2,"div")(3,"p",2),c(4,"Evaluation"),o(),a(5,"h2"),c(6,"Compare runs"),o(),a(7,"p"),c(8,"Pick a baseline and a candidate run. The page explains what changed in cost, tokens, activity, and model mix."),o()(),a(9,"div",3)(10,"div",4),O("focusout",function(l){return n.closePickerOnFocusOut("baseline",l)}),a(11,"span"),c(12,"Baseline A"),o(),x(13,le,6,6,"button",5),a(14,"input",6),O("ngModelChange",function(l){return n.setBaselineQuery(l)})("focus",function(){return n.openBaselinePicker()}),o(),x(15,ge,4,1,"div",7),o(),a(16,"div",4),O("focusout",function(l){return n.closePickerOnFocusOut("candidate",l)}),a(17,"span"),c(18,"Candidate B"),o(),x(19,Ce,6,6,"button",8),a(20,"input",9),O("ngModelChange",function(l){return n.setCandidateQuery(l)})("focus",function(){return n.openCandidatePicker()}),o(),x(21,fe,4,1,"div",10),o()()(),x(22,Ie,61,22)(23,Te,2,0,"p",11),o()),e&2){let i,l,p;s(10),y("open",n.baselinePickerOpen()),s(3),h((i=n.selectedASession())?13:-1,i),s(),A("ngModel",n.baselineQuery()),s(),h(n.baselinePickerOpen()?15:-1),s(),y("open",n.candidatePickerOpen()),s(3),h((l=n.selectedBSession())?19:-1,l),s(),A("ngModel",n.candidateQuery()),s(),h(n.candidatePickerOpen()?21:-1),s(),h((p=n.comparison())?22:23,p)}},dependencies:[ie,ee,te,ne,Z,H,J],styles:["[_nghost-%COMP%]{display:block}.compare[_ngcontent-%COMP%]{display:grid;gap:10px;border:1px solid var(--line);border-radius:16px;padding:16px;background:linear-gradient(180deg,#6f5cff09,#0c9f8305),var(--surface);box-shadow:var(--shadow-soft, 0 16px 38px rgba(15, 23, 42, .1))}.compare-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.compare[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--text-strong);font-size:22px;font-weight:760;letter-spacing:0}.compare-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:not(.eyebrow){max-width:620px;margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.45}.eyebrow[_ngcontent-%COMP%]{margin:0;color:var(--accent-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.selectors[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(260px,360px));gap:12px;min-width:min(760px,62vw)}.run-picker[_ngcontent-%COMP%]{position:relative;display:grid;gap:6px;min-width:0}.run-picker[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-weight:760}.selectors[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .selected-run[_ngcontent-%COMP%]{width:100%;border:1px solid var(--line);border-radius:10px;padding:9px 11px;background:var(--control-bg, var(--surface-soft));color:var(--text);font:inherit;font-size:12px}.selected-run[_ngcontent-%COMP%]{display:grid;gap:3px;min-height:50px;text-align:left;cursor:pointer}.selected-run[_ngcontent-%COMP%]:hover, .run-picker.open[_ngcontent-%COMP%] .selected-run[_ngcontent-%COMP%]{border-color:#1fd1a573;box-shadow:0 0 0 3px #1fd1a514}.selected-run[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .selected-run[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selected-run[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px;font-weight:760}.selected-run[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-style:normal}.selectors[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-height:34px;border-color:#637d9438;background:color-mix(in srgb,var(--surface-soft) 78%,transparent)}.selectors[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--muted-2)}.selector-results[_ngcontent-%COMP%]{position:absolute;z-index:20;top:calc(100% + 6px);left:0;right:0;display:grid;gap:6px;max-height:min(320px,46vh);overflow:auto;border:1px solid var(--line);border-radius:11px;padding:6px;background:var(--surface);box-shadow:0 18px 42px #0f172a29}.selector-results[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:grid;gap:2px;width:100%;border:1px solid transparent;border-radius:9px;padding:8px 9px;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}.selector-results[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .selector-results[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-color:#1fd1a559;background:#1fd1a514}.selector-results[_ngcontent-%COMP%] button.same-prompt[_ngcontent-%COMP%]{border-color:#6f5cff61;background:linear-gradient(135deg,#6f5cff17,#1fd1a50e),transparent}.selector-results[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{overflow:hidden;color:var(--text-strong);font-size:12px;font-weight:760;text-overflow:ellipsis;white-space:nowrap}.selector-results[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .selector-results[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{overflow:hidden;color:var(--muted);font-size:11px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.match-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:fit-content;max-width:100%;border:1px solid rgba(111,92,255,.28);border-radius:999px;padding:2px 7px;background:#6f5cff17;color:var(--text-strong)!important;font-size:10px!important;font-weight:760;line-height:1.2}.match-chip.muted-chip[_ngcontent-%COMP%]{border-color:var(--line);background:color-mix(in srgb,var(--surface-soft) 72%,transparent);color:var(--muted)!important}.compare-readout[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch;border:1px solid rgba(12,159,131,.2);border-radius:13px;padding:12px;background:radial-gradient(circle at 100% 0%,rgba(111,92,255,.11),transparent 34%),linear-gradient(135deg,#0c9f8313,#6f5cff09),var(--surface)}.compare-readout[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border-left:4px solid var(--accent-2);padding-left:12px}.compare-readout[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(86px,1fr));gap:8px;align-self:center;margin:0}.compare-readout[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;gap:4px;border:1px solid var(--line);border-radius:11px;padding:9px;background:var(--surface-soft)}.compare-readout[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.compare-readout[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;color:var(--text-strong);font-size:14px;font-weight:760;white-space:nowrap}.compare-readout[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;margin-bottom:3px;color:var(--muted);font-size:11px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.compare-readout[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:22px;font-weight:760}.compare-readout[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:920px;margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.45}.compare-caveat[_ngcontent-%COMP%]{color:var(--warning-text, #ffcf75)!important}.comparison-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:7px}.comparison-grid[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:3px;border:1px solid var(--line);border-radius:10px;padding:8px 9px;background:var(--surface-soft)}.comparison-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .comparison-grid[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-style:normal}.comparison-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:15px;font-weight:760;letter-spacing:0}.comparison-section[_ngcontent-%COMP%]{display:grid;gap:8px}.section-heading[_ngcontent-%COMP%]{display:flex;align-items:end;justify-content:space-between;gap:14px}.section-heading[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:var(--text-strong);font-size:15px;font-weight:760}.section-heading[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:12px}.driver-list[_ngcontent-%COMP%]{display:grid;gap:6px}.driver-list[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(155px,.34fr) minmax(0,1fr);gap:10px;align-items:start;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:10px;padding:8px 10px;background:color-mix(in srgb,var(--surface-soft) 58%,transparent)}.driver-list[_ngcontent-%COMP%] article.medium[_ngcontent-%COMP%]{border-left-color:var(--warning)}.driver-list[_ngcontent-%COMP%] article.high[_ngcontent-%COMP%]{border-left-color:var(--danger)}.driver-list[_ngcontent-%COMP%] article[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:2px;min-width:0}.driver-list[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.driver-list[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:14px;font-weight:760;line-height:1.1;overflow-wrap:anywhere}.driver-list[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--text);font-size:12px;line-height:1.35}.cost-table[_ngcontent-%COMP%]{display:grid;overflow:auto hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.cost-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(140px,1.05fr) minmax(110px,.82fr) minmax(128px,.95fr) minmax(190px,1.25fr) minmax(96px,.7fr) minmax(74px,.5fr);gap:8px;align-items:start;min-width:760px;border-bottom:1px solid var(--line);padding:8px 9px}.cost-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.cost-row-heading[_ngcontent-%COMP%]{background:var(--surface-soft);font-size:11px;font-weight:720;text-transform:uppercase}.cost-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:3px}.cost-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong)}.cost-row[_ngcontent-%COMP%] .token-movement[_ngcontent-%COMP%]{gap:4px}.cost-row[_ngcontent-%COMP%] .token-movement[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;color:var(--text-strong);font-size:12px}.cost-row[_ngcontent-%COMP%] .token-movement[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{line-height:1.35}.saving[_ngcontent-%COMP%]{color:var(--success-text, #35d07f)!important}.warning-text[_ngcontent-%COMP%]{color:var(--warning-text, #ffcf75)!important;font-weight:900}.empty[_ngcontent-%COMP%]{margin:0;color:var(--muted)}@media(max-width:900px){.compare-header[_ngcontent-%COMP%], .compare-readout[_ngcontent-%COMP%], .section-heading[_ngcontent-%COMP%]{display:grid}.comparison-grid[_ngcontent-%COMP%], .driver-list[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .selectors[_ngcontent-%COMP%], .compare-readout[_ngcontent-%COMP%] dl[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%]{grid-template-columns:1fr}.cost-row[_ngcontent-%COMP%], .selectors[_ngcontent-%COMP%]{min-width:0}}"]})};function $(r){return String(r??"").toLowerCase().replace(/[^\p{L}\p{N}#/@._-]+/gu," ").replace(/\s+/g," ").trim()}export{oe as ComparePageComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,b as l}from"./chunk-WOIYAEKB.js";var u={version:"github-copilot-usage-pricing-2026-07-05",sourceUrl:"https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing",sourceLabel:"GitHub Docs: Models and pricing for GitHub Copilot",snapshotDate:"2026-07-05",importedAt:"2026-07-05",fallbackModel:"GPT-5.4",models:{"GPT-5 mini":{provider:"OpenAI",releaseStatus:"GA",category:"Lightweight",input:.25,cachedInput:.025,output:2},"GPT-5.3-Codex":{provider:"OpenAI",releaseStatus:"GA",category:"Powerful",input:1.75,cachedInput:.175,output:14},"GPT-5.4":{provider:"OpenAI",releaseStatus:"GA",category:"Versatile",input:2.5,cachedInput:.25,output:15,tierLabel:"Default",tierThresholdLabel:"Up to 272K input tokens",tiers:[{id:"long-context",label:"Long context",thresholdInputTokensExclusive:272e3,thresholdLabel:"Over 272K input tokens",input:5,cachedInput:.5,output:22.5}]},"GPT-5.4 mini":{provider:"OpenAI",releaseStatus:"GA",category:"Lightweight",input:.75,cachedInput:.075,output:4.5},"GPT-5.4 nano":{provider:"OpenAI",releaseStatus:"GA",category:"Lightweight",input:.2,cachedInput:.02,output:1.25},"GPT-5.5":{provider:"OpenAI",releaseStatus:"GA",category:"Powerful",input:5,cachedInput:.5,output:30,tierLabel:"Default",tierThresholdLabel:"Up to 272K input tokens",tiers:[{id:"long-context",label:"Long context",thresholdInputTokensExclusive:272e3,thresholdLabel:"Over 272K input tokens",input:10,cachedInput:1,output:45}]},"Claude Haiku 4.5":{provider:"Anthropic",releaseStatus:"GA",category:"Versatile",input:1,cachedInput:.1,cacheWrite:1.25,output:5},"Claude Sonnet 4":{provider:"Anthropic",releaseStatus:"GA",category:"Versatile",input:3,cachedInput:.3,cacheWrite:3.75,output:15},"Claude Sonnet 4.5":{provider:"Anthropic",releaseStatus:"GA",category:"Versatile",input:3,cachedInput:.3,cacheWrite:3.75,output:15},"Claude Sonnet 4.6":{provider:"Anthropic",releaseStatus:"GA",category:"Versatile",input:3,cachedInput:.3,cacheWrite:3.75,output:15},"Claude Opus 4.5":{provider:"Anthropic",releaseStatus:"GA",category:"Powerful",input:5,cachedInput:.5,cacheWrite:6.25,output:25},"Claude Opus 4.6":{provider:"Anthropic",releaseStatus:"GA",category:"Powerful",input:5,cachedInput:.5,cacheWrite:6.25,output:25},"Claude Opus 4.7":{provider:"Anthropic",releaseStatus:"GA",category:"Powerful",input:5,cachedInput:.5,cacheWrite:6.25,output:25},"Claude Opus 4.8":{provider:"Anthropic",releaseStatus:"GA",category:"Powerful",input:5,cachedInput:.5,cacheWrite:6.25,output:25},"Claude Sonnet 5":{provider:"Anthropic",releaseStatus:"GA",category:"Versatile",input:2,cachedInput:.2,cacheWrite:2.5,output:10,note:"GitHub documents this promotional pricing through August 31, 2026."},"Claude Opus 4.8 (fast mode)":{provider:"Anthropic",releaseStatus:"GA",category:"Powerful",input:10,cachedInput:1,cacheWrite:12.5,output:50,aliases:["Claude Opus 4.8 fast","claude-opus-4.8-fast"],note:"GitHub's table includes '(preview)' in the model label."},"Claude Fable 5":{provider:"Anthropic",releaseStatus:"GA",category:"Powerful",input:10,cachedInput:1,cacheWrite:12.5,output:50},"Gemini 2.5 Pro":{provider:"Google",releaseStatus:"GA",category:"Powerful",input:1.25,cachedInput:.125,output:10},"Gemini 3 Flash":{provider:"Google",releaseStatus:"Public preview",category:"Lightweight",input:.5,cachedInput:.05,output:3},"Gemini 3.1 Pro":{provider:"Google",releaseStatus:"Public preview",category:"Powerful",input:2,cachedInput:.2,output:12,tierLabel:"Default",tierThresholdLabel:"Up to 200K input tokens",tiers:[{id:"long-context",label:"Long context",thresholdInputTokensExclusive:2e5,thresholdLabel:"Over 200K input tokens",input:4,cachedInput:.4,output:18}]},"Gemini 3.5 Flash":{provider:"Google",releaseStatus:"GA",category:"Lightweight",input:1.5,cachedInput:.15,output:9},"Raptor mini":{provider:"Fine-tuned (GitHub)",releaseStatus:"GA",category:"Versatile",input:.25,cachedInput:.025,output:2},"MAI-Code-1-Flash":{provider:"Microsoft",releaseStatus:"GA",category:"Lightweight",input:.75,cachedInput:.075,output:4.5},"Kimi K2.7 Code":{provider:"Moonshot AI",releaseStatus:"GA",category:"Versatile",input:.95,cachedInput:.19,output:4}}};var v=u.version,U=u.sourceUrl,M=u.sourceLabel,_=u.snapshotDate,E=u.importedAt,A=u.fallbackModel,P=.01,O="https://docs.github.com/en/copilot/concepts/billing/usage-based-billing-for-organizations-and-enterprises",a=u.models,y=[{id:"business-standard",label:"Copilot Business",shortLabel:"Business",creditsPerUserMonthly:1900,period:"Standard monthly allowance",note:"Included AI credits are pooled at the billing entity level."},{id:"enterprise-standard",label:"Copilot Enterprise",shortLabel:"Enterprise",creditsPerUserMonthly:3900,period:"Standard monthly allowance",note:"Included AI credits are pooled at the billing entity level."},{id:"business-promo",label:"Copilot Business promo",shortLabel:"Business promo",creditsPerUserMonthly:3e3,period:"Existing-customer promo, Jun 1-Sep 1 2026",note:"GitHub documents this temporary higher allowance for existing Business customers."},{id:"enterprise-promo",label:"Copilot Enterprise promo",shortLabel:"Enterprise promo",creditsPerUserMonthly:7e3,period:"Existing-customer promo, Jun 1-Sep 1 2026",note:"GitHub documents this temporary higher allowance for existing Enterprise customers."}];function p(e){return String(e??"").replace(/^copilot\//i,"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim().replace(/\s+/g," ")}function g(e){let r=String(e??"").replace(/^copilot\//i,"").trim(),n=p(r),t=Object.keys(a),i=t.flatMap(o=>(a[o].aliases??[]).map(s=>({name:o,aliasKey:p(s)})));return t.find(o=>p(o)===n)??i.find(({aliasKey:o})=>o===n)?.name??t.find(o=>n.includes(p(o)))??i.find(({aliasKey:o})=>n.includes(o))?.name??(r||"Unknown model")}function x(e){let r=g(e);return a[r]?r:A}function S(e){return a[e||""]??a[A]}function w(e,r){let n=S(e),t=Math.max(0,r.input)+Math.max(0,r.cachedInput),i=[...n.tiers??[]].sort((o,s)=>s.thresholdInputTokensExclusive-o.thresholdInputTokensExclusive).find(o=>t>o.thresholdInputTokensExclusive);return i?l(c(c({},n),i),{tiers:n.tiers}):n}function d(e,r){let n=g(e);return(r||x(n))!==n||!a[n]}function G(e,r){let n=g(e),t=r||x(n);return d(n,t)?`${n||"Unknown model"} is priced with the ${t} row because that raw model id is not in the local GitHub pricing table.`:"This model matched a GitHub price row directly."}function D(e,r){let n=e.pricingModel||e.model,t=w(n,e.tokens),i=e.costBreakdown?.inputUsd??h(e.tokens.input,t.input),o=e.costBreakdown?.cachedInputUsd??h(e.tokens.cachedInput,t.cachedInput),s=e.costBreakdown?.cacheWriteUsd??h(e.tokens.cacheWrite,t.cacheWrite??0),m=e.costBreakdown?.outputUsd??h(e.tokens.output,t.output),I=i+o+s+m,f=e.pricingTiers?.length?e.pricingTiers:[t.label??t.tierLabel??"Default"];return l(c({},e),{provider:t.provider,releaseStatus:t.releaseStatus,category:t.category,inputRate:t.input,cachedInputRate:t.cachedInput,cacheWriteRate:t.cacheWrite??0,outputRate:t.output,inputUsd:i,cachedInputUsd:o,cacheWriteUsd:s,outputUsd:m,totalUsd:I,share:r>0?I/r*100:0,usesFallbackPrice:d(e.model,n),pricingTierLabel:f.join(" + "),hasMixedPricingTiers:f.length>1})}function h(e,r){return e/1e6*r}function T(e){return e.input+e.cachedInput+e.cacheWrite+e.output}function H(e){return T(e.tokens)}function N(e){return b(e.sourceUsage?.usd)??e.cost.usd}function K(e){return b(e.sourceUsage?.credits)??e.cost.usd/P}function V(e){return e.sourceUsage?"GitHub usage":"Estimate fallback"}function z(e){return b(e.sourceUsage?.usd)}function j(e,r){return e===0?null:(r-e)/e*100}var J=d;function $(e,r){return e.size!==r.size?!0:[...e].some(n=>!r.has(n))}function b(e){return typeof e=="number"&&Number.isFinite(e)?e:null}export{v as a,U as b,M as c,_ as d,E as e,P as f,O as g,a as h,y as i,p as j,x as k,w as l,d as m,G as n,D as o,T as p,H as q,N as r,K as s,V as t,z as u,j as v,J as w,$ as x};
|