copilot-usage-studio 0.2.1 → 0.2.2
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 +14 -1
- package/README.md +15 -11
- package/dist/copilot-usage-studio/browser/{chunk-2SAR2Q6M.js → chunk-23NLHIOR.js} +1 -1
- package/dist/copilot-usage-studio/browser/{chunk-EWN3YOHT.js → chunk-7I2HDBC6.js} +1 -1
- package/dist/copilot-usage-studio/browser/{chunk-XHID4XVE.js → chunk-QMNOUQ2X.js} +1 -1
- package/dist/copilot-usage-studio/browser/{chunk-KS5W2HMH.js → chunk-RTOXDOOI.js} +1 -1
- package/dist/copilot-usage-studio/browser/{chunk-VEKXIM47.js → chunk-TICIZRSM.js} +1 -1
- package/dist/copilot-usage-studio/browser/{chunk-U4H425LY.js → chunk-WWU6QMJC.js} +1 -1
- package/dist/copilot-usage-studio/browser/chunk-XMVGLQQH.js +1 -0
- package/dist/copilot-usage-studio/browser/index.html +1 -1
- package/dist/copilot-usage-studio/browser/main-XFPP45VE.js +1 -0
- package/docs/local-deployment.md +32 -13
- package/docs/pricing.md +2 -0
- package/docs/scanner-api.md +12 -0
- package/lib/local-runtime.mjs +54 -10
- package/package.json +4 -2
- package/scripts/scan-vscode-sessions.mjs +4 -0
- package/scripts/scanner-customization-evidence.mjs +50 -13
- package/scripts/scanner-customization-inventory.mjs +1 -0
- package/scripts/scanner-workspace.mjs +38 -10
- package/dist/copilot-usage-studio/browser/chunk-7FKLWMFH.js +0 -1
- package/dist/copilot-usage-studio/browser/main-OZIMQRXC.js +0 -1
|
@@ -1 +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};
|
|
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-TICIZRSM.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 y,Ba as E,Ca as p,Da as g,Ea as D,Fa as P,Ga as z,Ha as v,Ia as a,Ja as i,Ka as k,O as b,Oa as M,P as S,Qa as x,Sa as d,U as I,Ua as O,Va as s,Wa as m,Xa as C,Ya as T,Z as h,Za as A,_a as _,a as F,ab as N,b as $,db as f,ka as r,nb as V,ob as R,sa as q,sb as B,tb as j,ub as H,vb as W,wb as K,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=d(2);r(),m(t.evidenceScanProgressLabel())}}function oe(o,e){if(o&1&&(a(0,"p",33),s(1),i()),o&2){let t=d(2);r(),m(t.activeScanStats())}}function ae(o,e){if(o&1&&(a(0,"span"),s(1),i()),o&2){let t=d(2);r(),C("Running ",t.elapsedScanLabel())}}function se(o,e){if(o&1&&(a(0,"span"),s(1),i()),o&2){let t=d(2);r(),C("Last update ",t.lastProgressLabel()," ago")}}function re(o,e){if(o&1&&(a(0,"div",31)(1,"div")(2,"strong"),s(3),i(),p(4,ie,2,1,"span"),i(),k(5,"progress",32),i(),p(6,oe,2,1,"p",33),a(7,"p",34),p(8,ae,2,1,"span"),p(9,se,2,1,"span"),i()),o&2){let t=d();r(3),m(t.evidenceScanProgressPercent()?t.evidenceScanProgressPercent()+"%":"Working"),r(),g(t.evidenceScanProgressLabel()?4:-1),r(),v("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=M();a(0,"button",35),x("click",function(){b(t);let c=d();return S(c.cancelScan.emit())}),s(1,"Stop evidence scan"),i()}}function ue(o,e){o&1&&k(0,"span",37)}function me(o,e){if(o&1){let t=M();a(0,"button",36),x("click",function(){b(t);let c=d();return S(c.scanEvidence.emit())}),p(1,ue,1,0,"span",37),s(2),i()}if(o&2){let t=d();v("disabled",t.refreshState==="refreshing"),E("aria-busy",t.refreshState==="refreshing"),r(),g(t.isEvidenceScanActive()?1:-1),r(),C(" ",t.scanActionLabel()," ")}}function pe(o,e){if(o&1&&(a(0,"option",26),s(1),i()),o&2){let t=e.$implicit;v("value",t),r(),m(t==="all"?"All workspaces":t)}}function ge(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=d(2);r(2),m(n.diagnosticKindLabel(t.kind)),r(2),m(t.path)}}function Ce(o,e){o&1&&(a(0,"p",28),s(1,"Showing the first 80 recorded locations. Generated scan diagnostics are capped."),i())}function xe(o,e){if(o&1&&(a(0,"div",38),P(1,ge,5,2,"div",null,J),i(),p(3,Ce,2,0,"p",28)),o&2){let t=d();r(),z(t.scanDiagnostics().locations),r(2),g(t.scanDiagnostics().capped?3:-1)}}function ve(o,e){o&1&&(a(0,"p",28),s(1,"No source-location details were recorded for this scan. This does not mean no customization files were found."),i())}function he(o,e){if(o&1){let t=M();a(0,"button",44),x("click",function(){b(t);let c=d(2);return S(c.resetFilters())}),s(1,"Reset"),i()}}function _e(o,e){if(o&1){let t=M();a(0,"button",45),x("click",function(){let c=b(t).$implicit,l=d(2);return S(l.selectCustomization(c))}),a(1,"span",46),s(2),i(),a(3,"span",47)(4,"strong"),s(5),i(),a(6,"small"),s(7),i()(),a(8,"span",48)(9,"b"),s(10),i(),a(11,"em"),s(12),i()()()}if(o&2){let t=e.$implicit,n=d(2);O("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 fe(o,e){if(o&1&&(a(0,"span")(1,"b"),s(2,"applyTo"),i(),s(3),i()),o&2){let t=d();r(3),C(" ",t.applyTo.join(", "))}}function be(o,e){if(o&1&&(a(0,"span")(1,"b"),s(2,"trigger"),i(),s(3),i()),o&2){let t=d();r(3),C(" ",t.triggers.join(", "))}}function Se(o,e){if(o&1&&(a(0,"div",55)(1,"span",50),s(2,"Matched customization text"),i(),a(3,"p",58),s(4),i()()),o&2){let t=d();r(4),m(t.description)}}function Pe(o,e){if(o&1&&(a(0,"span",70),s(1),i()),o&2){let t=e.$implicit,n=d(6);O("sent",t.status==="sent")("listed",t.status==="listed")("discovered",t.status==="discovered"),E("aria-label",n.timelineMarkerLabel(t)),r(),C(" #",t.callNumber," ")}}function ze(o,e){if(o&1&&(a(0,"span",69),s(1),i()),o&2){let t=d(2).$implicit,n=d(4);r(),C("+",n.timelineOverflow(t)," more")}}function Me(o,e){if(o&1&&(a(0,"span",64),P(1,Pe,2,8,"span",68,ee),p(3,ze,2,1,"span",69),i()),o&2){let t=d().$implicit,n=d(4);E("aria-label",n.sessionEvidenceLabel(t)),r(),z(n.timelineMarkers(t)),r(2),g(n.timelineOverflow(t)?3:-1)}}function ye(o,e){o&1&&(a(0,"span",65),s(1,"No file text found"),i())}function we(o,e){if(o&1){let t=M();a(0,"button",44),x("click",function(){b(t);let c=d().$implicit,l=d(4);return S(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=d().$implicit;r(),C(" ",t.matchedPreview[0]," ")}}function Ee(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 ke(o,e){if(o&1&&(a(0,"article",72)(1,"div",73)(2,"strong"),s(3),i(),a(4,"p"),s(5),i(),p(6,Oe,2,1,"blockquote"),a(7,"details",74)(8,"summary"),s(9),i(),a(10,"div")(11,"span"),s(12,"Visible VS Code log sources"),i(),a(13,"ul"),P(14,Ee,5,2,"li",null,ne),i()()()()()),o&2){let t=e.$implicit,n=d(6);O("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),z(n.rawEvidenceSources(t))}}function Ie(o,e){if(o&1&&(a(0,"div",67),P(1,ke,16,6,"article",71,te),i()),o&2){let t=d().$implicit,n=d(4);r(),z(n.sentCallEvidence(t))}}function Te(o,e){if(o&1&&(a(0,"details",61)(1,"summary")(2,"span",62)(3,"time"),s(4),_(5,"date"),i(),a(6,"b"),s(7),i(),a(8,"em"),s(9),i()(),a(10,"span",63),p(11,Me,4,2,"span",64)(12,ye,2,0,"span",65),a(13,"strong"),s(14),i()()(),a(15,"div",66)(16,"p"),s(17),i(),p(18,we,2,0,"button",41),i(),p(19,Ie,3,0,"div",67),i()),o&2){let t=e.$implicit,n=d(4);O("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 Le(o,e){if(o&1&&(a(0,"section",56)(1,"header")(2,"span",50),s(3,"Where it appeared"),i(),a(4,"h4"),s(5),_(6,"number"),i()(),a(7,"p",59),s(8," Each row is one Copilot session. Open a row for request-level proof. "),i(),P(9,Te,20,17,"details",60,Z),i()),o&2){let t=d(3);r(5),T("",y(6,2,t.selectedSessionEvidence().length)," session",t.selectedSessionEvidence().length===1?"":"s"),r(4),z(t.selectedSessionEvidence())}}function Ne(o,e){if(o&1&&(a(0,"article",43)(1,"header",49)(2,"div")(3,"span",50),s(4),i(),a(5,"h3"),s(6),i(),a(7,"p"),s(8),i()(),a(9,"span",51),s(10),k(11,"app-help-popover",52),i()(),a(12,"div",53)(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,fe,4,1,"span"),p(29,be,4,1,"span"),i(),a(30,"section",54)(31,"div")(32,"span",50),s(33,"Detection result"),i(),a(34,"h4"),s(35),i(),a(36,"p"),s(37),i()(),p(38,Se,5,1,"div",55),i(),p(39,Le,11,4,"section",56),a(40,"footer",57)(41,"span"),s(42,"Local file"),i(),a(43,"code"),s(44),i()()()),o&2){let t=e,n=d(2);r(4),m(n.kindLabel(t.kind)),r(2),m(t.title),r(2),T("",t.workspace||"Local"," \xB7 ",n.fileName(t)),r(),O("sent",t.evidenceStatus==="sent")("listed",t.evidenceStatus==="listed")("discovered",t.evidenceStatus==="discovered"),r(),C(" ",n.statusLabel(t.evidenceStatus)," "),r(),v("text",n.statusHelp(t.evidenceStatus)),r(4),m(y(16,22,t.characterCount)),r(5),m(y(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 Fe(o,e){if(o&1&&(a(0,"section",29)(1,"aside",39)(2,"div",40)(3,"span"),s(4),_(5,"number"),i(),p(6,he,2,0,"button",41),i(),P(7,_e,13,14,"button",42,X),i(),p(9,Ne,45,29,"article",43),i()),o&2){let t,n=d();r(4),C("",y(5,3,n.filteredCustomizations().length)," shown"),r(2),g(n.query()||n.kindFilter()!=="all"||n.statusFilter()!=="all"||n.workspaceFilter()!=="all"?6:-1),r(),z(n.filteredCustomizations()),r(2),g((t=n.selectedCustomization())?9:-1,t)}}function $e(o,e){o&1&&k(0,"span",37)}function qe(o,e){if(o&1){let t=M();a(0,"button",36),x("click",function(){b(t);let c=d(2);return S(c.scanEvidence.emit())}),p(1,$e,1,0,"span",37),s(2),i()}if(o&2){let t=d(2);v("disabled",t.refreshState==="refreshing"),E("aria-busy",t.refreshState==="refreshing"),r(),g(t.isEvidenceScanActive()?1:-1),r(),C(" ",t.scanActionLabel()," ")}}function De(o,e){if(o&1){let t=M();a(0,"button",44),x("click",function(){b(t);let c=d(2);return S(c.resetFilters())}),s(1,"Reset filters"),i()}}function Ae(o,e){if(o&1&&(a(0,"section",30)(1,"h3"),s(2),i(),a(3,"p"),s(4),i(),p(5,qe,3,4,"button",10)(6,De,2,0,"button",41),i()),o&2){let t=d();r(2),m(t.emptyStateTitle()),r(2),m(t.emptyStateText()),r(),g(t.customizationsInput().length?6:5)}}var Y=class o{customizationsInput=h([]);sessionsInput=h([]);ingestionInput=h(null);query=h("");kindFilter=h("all");statusFilter=h("all");workspaceFilter=h("all");selectedId=h(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 I;cancelScan=new I;openSession=new I;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(u=>u.evidenceStatus==="sent").length,c=t.filter(u=>u.evidenceStatus==="listed").length,l=!!(e?.customizationEvidenceAnalyzedAt||(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"?"Analyzing...":!this.customizationsInput().length&&!this.customizationEvidenceSummary().hasScannedEvidence?"Analyze this workspace":this.customizationEvidenceSummary().hasScannedEvidence?"Analyze new activity":"Analyze customizations"}showHeaderScanAction(){return this.isEvidenceScanActive()||this.customizationsInput().length>0||this.customizationEvidenceSummary().hasScannedEvidence||this.refreshState==="error"}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 this.customizationsInput().length?"Analyze customizations to check whether these files appeared inside recent Copilot model requests.":"Analyze this workspace to find customization files and check recent Copilot requests."}emptyStateTitle(){return this.customizationsInput().length?"No customizations match these filters":this.scanDiagnostics().roots>0?"No customization files found":"No customization scan has run yet"}emptyStateText(){return this.customizationsInput().length?"Try a broader search or reset the filters.":this.scanDiagnostics().roots>0?"Checked the current VS Code customization locations. Open Advanced scan coverage if you need to inspect the folders that were checked.":"Scan this workspace to find Copilot instructions, skills, prompts, hooks, and agents, then check recent request logs for evidence."}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}`,u=t.get(c)??{key:c,callNumber:n.modelCallNumber,eventIndex:n.eventIndex,status:n.status,matches:[],sources:[],matchedChunks:0,matchedCharacters:0,matchedPreview:[]};u.matches.push(n),u.status=this.strongerStatus(u.status,n.status),u.matchedChunks+=n.matchedChunks??0,u.matchedCharacters+=n.matchedCharacters??0;for(let w of n.matchedPreview??[])w&&!u.matchedPreview.includes(w)&&u.matchedPreview.push(w);let L={label:this.sourceLabel(n.source),raw:this.rawSourceLabel(n.source)};u.sources.some(w=>w.label===L.label&&w.raw===L.raw)||u.sources.push(L),t.set(c,u)}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),u=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};u.matches.push(n),u.bestStatus=this.strongerStatus(u.bestStatus,n.status),u.timestamp=[u.timestamp,n.timestamp].filter(Boolean).sort().at(-1)??u.timestamp,u.sentCount+=n.status==="sent"?1:0,u.listedCount+=n.status==="listed"?1:0,u.discoveredCount+=n.status==="discovered"?1:0,u.matchedChunks+=n.matchedChunks??0,u.matchedCharacters+=n.matchedCharacters??0,n.modelCallNumber&&!u.modelCallNumbers.includes(n.modelCallNumber)&&u.modelCallNumbers.push(n.modelCallNumber),n.source&&!u.sources.includes(n.source)&&u.sources.push(n.source),t.set(n.sessionId,u)}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:84,vars:22,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,"disabled"],["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"],["type","button",1,"evidence-scan-button",3,"click","disabled"],["aria-hidden","true",1,"button-spinner"],[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),p(28,me,3,4,"button",10),i()()(),a(29,"section",11)(30,"label",12)(31,"span"),s(32,"Search customizations"),i(),a(33,"input",13),x("ngModelChange",function(l){return n.setQuery(l)}),i()(),a(34,"label")(35,"span"),s(36,"Type"),i(),a(37,"select",14),x("ngModelChange",function(l){return n.setKindFilter(l)}),a(38,"option",15),s(39,"All types"),i(),a(40,"option",16),s(41,"Instructions"),i(),a(42,"option",17),s(43,"Skills"),i(),a(44,"option",18),s(45,"Prompts"),i(),a(46,"option",19),s(47,"Hooks"),i(),a(48,"option",20),s(49,"Agents"),i(),a(50,"option",21),s(51,"Other"),i()()(),a(52,"label")(53,"span"),s(54,"Evidence"),i(),a(55,"select",14),x("ngModelChange",function(l){return n.setStatusFilter(l)}),a(56,"option",15),s(57,"All evidence"),i(),a(58,"option",22),s(59,"Text match found"),i(),a(60,"option",23),s(61,"Read by Copilot"),i(),a(62,"option",24),s(63,"Discovered only"),i(),a(64,"option",25),s(65,"Not seen"),i()()(),a(66,"label")(67,"span"),s(68,"Workspace"),i(),a(69,"select",14),x("ngModelChange",function(l){return n.setWorkspaceFilter(l)}),P(70,pe,2,2,"option",26,D),i()()(),a(72,"details",27)(73,"summary")(74,"span"),s(75,"Advanced scan coverage"),i(),a(76,"strong"),s(77),_(78,"number"),_(79,"number"),i()(),p(80,xe,4,1)(81,ve,2,0,"p",28),i(),p(82,Fe,10,5,"section",29)(83,Ae,7,3,"section",30),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(),g(n.showHeaderScanAction()?28:-1),r(5),v("ngModel",n.query()),r(4),v("ngModel",n.kindFilter()),r(18),v("ngModel",n.statusFilter()),r(14),v("ngModel",n.workspaceFilter()),r(),z(n.workspaceOptions()),r(7),A(" ",y(78,18,n.scanDiagnostics().roots)," folders/files checked \xB7 ",y(79,20,n.scanDiagnostics().files)," customization",n.scanDiagnostics().files===1?"":"s"," found "),r(3),g(n.scanDiagnostics().locations.length?80:81),r(2),g(n.filteredCustomizations().length?82:83))},dependencies:[U,Q,G,j,K,H,W,B,V,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;align-self:start;gap:8px;min-height:160px;padding:18px;text-align:center}.customizations-empty[_ngcontent-%COMP%] .evidence-scan-button[_ngcontent-%COMP%]{margin-top:2px}@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};
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
<style>*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Aptos,Segoe UI Variable,Segoe UI,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;line-height:1.45;background:#090d14;color:#d7dde7;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}</style><link rel="stylesheet" href="styles-7RDDQXQV.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-7RDDQXQV.css"></noscript></head>
|
|
10
10
|
<body>
|
|
11
11
|
<app-root></app-root>
|
|
12
|
-
<link rel="modulepreload" href="chunk-OS2XPCVW.js"><link rel="modulepreload" href="chunk-
|
|
12
|
+
<link rel="modulepreload" href="chunk-OS2XPCVW.js"><link rel="modulepreload" href="chunk-TICIZRSM.js"><link rel="modulepreload" href="chunk-WOIYAEKB.js"><script src="main-XFPP45VE.js" type="module"></script></body>
|
|
13
13
|
</html>
|