PageSourceSearch

https://www.trainwithkickoff.com/_next/static/chunks/pages/coach-prompt-ai-eval-34e7da25e36a863e.js

js trainwithkickoff.com collected 2026-10-04 00:04:39 UTC 26,617 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8527],{46015:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StartEvalRun"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startCoachPromptAiEvalRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:126}};n.loc.source={body:"mutation StartEvalRun {\n  startCoachPromptAiEvalRun {\n    id\n    status\n    totalCount\n    completedCount\n    createdAt\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function i(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);else if("VariableDefinition"===n.kind){var i=n.type;"NamedType"===i.kind&&t.add(i.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})})(e,n),t[e.name.value]=n}}),e.exports=n,e.exports.StartEvalRun=function(e,n){var a={kind:e.kind,definitions:[i(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var s=t[n]||new Set,r=new Set,l=new Set;for(s.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){r.has(e)||(r.add(e),(t[e]||new Set).forEach(function(e){l.add(e)}))})}return r.forEach(function(n){var t=i(e,n);t&&a.definitions.push(t)}),a}(n,"StartEvalRun")},67899:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EvalScenarios"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coachPromptAiEvalScenarios"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"clientName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promptKeys"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sentMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contextSnapshot"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EvalRuns"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coachPromptAiEvalRuns"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"datasetVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EvalRun"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coachPromptAiEvalRun"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"generations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scenarioKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"promptKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"variant"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pipelineVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"model"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"systemPrompt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userPrompt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"generatedText"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"latencyMs"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:664}};n.loc.source={body:"query EvalScenarios {\n  coachPromptAiEvalScenarios {\n    key\n    clientKey\n    clientName\n    title\n    description\n    promptKeys\n    sentMessage\n    contextSnapshot\n  }\n}\n\nquery EvalRuns {\n  coachPromptAiEvalRuns {\n    id\n    status\n    totalCount\n    completedCount\n    datasetVersion\n    createdAt\n  }\n}
1\n\nquery EvalRun($id: ID!) {\n  coachPromptAiEvalRun(id: $id) {\n    id\n    status\n    totalCount\n    completedCount\n    error\n    generations {\n      id\n      scenarioKey\n      promptKey\n      variant\n      pipelineVersion\n      model\n      systemPrompt\n      userPrompt\n      generatedText\n      reason\n      evidence\n      latencyMs\n      error\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function i(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}function a(e,n){var a={kind:e.kind,definitions:[i(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var s=t[n]||new Set,r=new Set,l=new Set;for(s.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){r.has(e)||(r.add(e),(t[e]||new Set).forEach(function(e){l.add(e)}))})}return r.forEach(function(n){var t=i(e,n);t&&a.definitions.push(t)}),a}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);else if("VariableDefinition"===n.kind){var i=n.type;"NamedType"===i.kind&&t.add(i.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})})(e,n),t[e.name.value]=n}}),e.exports=n,e.exports.EvalScenarios=a(n,"EvalScenarios"),e.exports.EvalRuns=a(n,"EvalRuns"),e.exports.EvalRun=a(n,"EvalRun")},74548:function(e,n,t){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"signInToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"token"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signInToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"token"},value:{kind:"Variable",name:{kind:"Name",value:"token"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sessionToken"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"me"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"meFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:159}};i.loc.source={body:"#import 'fragments/me.graphql'\n\nmutation signInToken($token: String!) {\n  signInToken(token: $token) {\n    sessionToken\n    me {\n      ...meFields\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};i.definitions=i.definitions.concat(t(67973).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!a[n]&&(a[n]=!0,!0)}));var s={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}i.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);else if("VariableDefinition"===n.kind){var i=n.type;"NamedType"===i.kind&&t.add(i.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})})(e,n),s[e.name.value]=n}}),e.exports=i,e.exports.signInToken=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=s[n]||new Set,a=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var o=l;l=new Set,o.forEach(function(e){a.has(e)||(a.add(e),(s[e]||new Set).forEach(function(e){l.add(e)}))})}return a.forEach(function(n){var i=r(e,n);i&&t.definitions.push(i)}),t}(i,"signInToken")},81234:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/coach-prompt-ai-eval",function(){return t(74954)}])},90716:function(e,n,t){"use strict";var i=t(73292),a=t(85893),s=t(93967),r=t.n(s),l=t(44662),o=t(57236),c=t.n(o);n.Z=function(e){var n,t=e.padded,s=e.className,o=e.transparent,d=void 0!==o&&o;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:d?c().transparentBackgroun
1d:""}),(0,a.jsx)("div",{className:r()(c().screen,(n={},(0,i._)(n,c().padded,void 0!==t&&t),(0,i._)(n,c().transparent,d),n),s),children:(0,a.jsx)(l.Z,{})})]})}},44662:function(e,n,t){"use strict";var i=t(85893),a=t(67814),s=t(93967),r=t.n(s),l=t(51436),o=t(78947),c=t(51892),d=t.n(c);o.vI.add(l.LM3),n.Z=function(e){var n=e.className;return(0,i.jsx)(a.G,{className:r()(d().spinner,n),icon:"spinner",spin:!0,pulse:!0})}},89007:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var i=t(30137),a=t(73292),s=t(76341),r=t(67462),l=t(97582),o=t(62286),c=t(53103),d=t(63953),u=t(7433),m=t(74548),v=function(e){var n;return n=(0,i._)(function(n){var t,i,v,p,f,_,h;return(0,l.Jh)(this,function(l){switch(l.label){case 0:if(t=n.ctx||n,i=n.apolloClient,v=t.query.token,p=t.pathname,!("string"==typeof v&&""!==v&&"undefined"!==v&&"null"!==v))return[3,2];return[4,i.mutate({mutation:m.signInToken,variables:{token:v}})];case 1:(f=l.sent().data.signInToken.sessionToken)&&((0,o.setCookie)(t,d.I,f,{path:"/",maxAge:30*c.x4}),t.overrideCookies=(0,a._)({},d.I,f),i.__contextRef&&(i.__contextRef.current=t)),l.label=2;case 2:return _="/client-sign-up"===p,[4,i.query({query:_?u.getCurrentUserWithSurvey:u.getCurrentUser,fetchPolicy:"network-only"})];case 3:return h=l.sent(),[2,e((0,r._)((0,s._)({},n),{currentUserPayload:h}))]}})}),function(e){return n.apply(this,arguments)}}},74954:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return I}});var i=t(85893),a=t(30137),s=t(93128),r=t(53353),l=t(97582),o=t(67294),c=t(6812),d=t(50319),u=t(8323),m=t(90716),v=t(67899),p=t(46015),f=t(39763),_=t.n(f),h=function(e){var n=e.label,t=e.generation;return(0,i.jsxs)("div",{className:_().variantCell,children:[(0,i.jsxs)("div",{className:_().variantHeader,children:[(0,i.jsx)("span",{className:_().variantLabel,children:n}),(null==t?void 0:t.model)&&(0,i.jsx)("span",{className:_().modelBadge,children:t.model}),"number"==typeof(null==t?void 0:t.latencyMs)&&(0,i.jsxs)("span",{className:_().latency,children:[t.latencyMs,"ms"]})]}),t?t.error?(0,i.jsx)("div",{className:_().cellError,children:t.error}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:_().draft,children:t.generatedText}),(t.reason||t.evidence&&t.evidence.length>0)&&(0,i.jsxs)("details",{className:_().why,children:[(0,i.jsx)("summary",{className:_().whySummary,children:"Why this message?"}),t.reason&&(0,i.jsx)("p",{className:_().reason,children:t.reason}),t.evidence&&t.evidence.length>0&&(0,i.jsx)("ul",{className:_().evidence,children:t.evidence.map(function(e,n){return(0,i.jsxs)("li",{className:_().evidenceItem,children:[(0,i.jsx)("span",{className:_().evidenceFact,children:e.fact}),(0,i.jsx)("span",{className:_().evidenceSource,children:e.source}),e.detail&&(0,i.jsx)("span",{className:_().evidenceDetail,children:e.detail})]},n)})})]}),(t.systemPrompt||t.userPrompt)&&(0,i.jsxs)("details",{className:_().prompt,children:[(0,i.jsx)("summary",{className:_().promptSummary,children:"Full prompt sent"}),t.systemPrompt&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:_().promptSubhead,children:"System"}),(0,i.jsx)("pre",{className:_().promptText,children:t.systemPrompt})]}),t.userPrompt&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:_().promptSubhead,children:"User"}),(0,i.jsx)("pre",{className:_().promptText,children:t.userPrompt})]})]})]}):(0,i.jsx)("div",{className:_().pending,children:"—"})]})},k={"intro-next-workout":"Introduce next workout","send-weekly-schedule":"Send weekly schedule","nutrition-wellness-encouragement":"Nutrition & wellness encouragement","answer-wo-questions-via-text":"Answer workout question","wish-client-happy-birthday":"Wish happy birthday",5:"Address missed workout"},y={currentWorkoutDetails:"This workout",upcomingSchedule:"Upcoming schedule",completedLastWeek:"Completed last week",weeklyCompletionSummary:"Last 7 days",clientGoals:"Goals",trainingStage:"Training stage",activeHabits:"Active habits",habitCompletionData:"Habit tracking",clientFeedbackOnRecentWorkouts:"Recent workout feedback",clientFeedbackOnWorkoutTemplate:"Workout feedback",clientCommentsOnCompletedWorkout:"Workout comments",clientWorkoutRating:"Workout rating",clientPerformanceRating:"Performance rating",transcriptTakeaways:"Call notes",clientToday:"Today"},g=["currentWorkoutDetails","upcomingSchedule","completedLastWeek","weeklyCompletionSummary","clientGoals","trainingStage","activeHabits","habitCompletionData","clientFeedbackOnRecentWorkouts","clientFeedbackOnWorkoutTemplate","clientCommentsOnCompletedWorkout","clientWorkoutRating","clientPerformanceRating","transcriptTakeaways"],x=function(e){var n,t,a,s,r,l,o=e.snapshot;if(!o)return null;var c=function(e){var n=o[e];return"string"==typeof n&&n.trim()?n:null},d=g.filter(function(e){return c(e)}),u=null!==(a=o.clientThreadMessages)&&void 0!==a?a:[],m=o.coachVoiceByPipeline,v=(m?[{label:"p2 (new)",profile:null!==(s=null===(n=m.p2)||void 0===n?void 0:n.profile)&&void 0!==s?s:null,exemplars:null!==(r=null===(t=m.p2)||void 0===t?void 0:t.exemplars)&&void 0!==r?r:[]}]:[{label:"Coach voice",profile:c("coachVoiceProfile"),exemplars:null!==(l=o.coachRecentMessages)&&void 0!==l?l:[]}]).filter(function(e){return e.profile&&e.profile.trim()||e.exemplars.length>0});return(0,i.jsxs)("div",{className:_().context,children:[d.map(function(e){var n;return(0,i.jsxs)("details",{className:_().contextMore,children:[(0,i.jsx)("summary",{className:_().contextSummary,children:null!==(n=y[e])&&void 0!==n?n:e}
1),(0,i.jsx)("div",{className:_().contextBody,children:(0,i.jsx)("p",{className:_().contextValue,children:String(o[e])})})]},e)}),v.map(function(e,n){return(0,i.jsxs)("details",{className:_().contextMore,children:[(0,i.jsxs)("summary",{className:_().contextSummary,children:["Coach voice \xb7 ",e.label]}),(0,i.jsxs)("div",{className:_().contextBody,children:[e.profile&&e.profile.trim()&&(0,i.jsxs)("div",{className:_().contextBlock,children:[(0,i.jsx)("div",{className:_().contextSubhead,children:"profile"}),(0,i.jsx)("div",{className:_().contextMsg,children:e.profile})]}),e.exemplars.length>0&&(0,i.jsxs)("div",{className:_().contextBlock,children:[(0,i.jsx)("div",{className:_().contextSubhead,children:"examples"}),e.exemplars.map(function(e,n){return(0,i.jsx)("div",{className:_().contextMsg,children:e},n)})]})]})]},"voice-".concat(n))}),u.length>0&&(0,i.jsxs)("details",{open:!0,className:_().contextMore,children:[(0,i.jsx)("summary",{className:_().contextSummary,children:"Recent messages"}),(0,i.jsx)("div",{className:_().contextBody,children:u.map(function(e,n){return(0,i.jsxs)("div",{className:_().contextMsg,children:[(0,i.jsxs)("span",{className:_().contextMsgWho,children:["inbound"===e.direction?"Client":"Coach",e.sentLabel?" (".concat(e.sentLabel,")"):"",":"]})," ",e.body]},n)})})]})]})},N=function(e){var n,t,a=e.scenario,s=e.promptLabels,r=e.generationsByCell,l=a.promptKeys[0],o=null!==(n=r["".concat(a.key,"::").concat(l)])&&void 0!==n?n:{};return(0,i.jsxs)("section",{className:_().scenarioCard,children:[(0,i.jsxs)("div",{className:_().scenarioHeader,children:[(0,i.jsx)("h3",{className:_().scenarioTitle,children:null!==(t=s[l])&&void 0!==t?t:a.title}),a.description&&(0,i.jsx)("p",{className:_().scenarioDescription,children:a.description})]}),(0,i.jsx)(x,{snapshot:a.contextSnapshot}),a.sentMessage?(0,i.jsxs)("div",{className:_().sentMessage,children:[(0,i.jsx)("span",{className:_().sentLabel,children:"Coach actually sent"}),(0,i.jsx)("p",{className:_().sentText,children:a.sentMessage})]}):(0,i.jsx)("div",{className:_().notSent,children:"Coach didn’t send a message here"}),(0,i.jsx)("div",{className:_().variants,children:(0,i.jsx)(h,{label:"p2",generation:o.C})})]})},S=["pending","running"],j=function(e){if(!e)return"";var n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleString()},b=function(){var e,n,t,f=(0,c.a)(v.EvalScenarios),h=f.data,y=f.loading,g=(0,c.a)(v.EvalRuns,{fetchPolicy:"cache-and-network"}),x=g.data,b=g.refetch,E=(0,s._)((0,d.D)(p.StartEvalRun),1)[0],F=(0,o.useMemo)(function(){var e;return null!==(e=null==x?void 0:x.coachPromptAiEvalRuns)&&void 0!==e?e:[]},[x]),w=(0,s._)((0,o.useState)(null),2),C=w[0],P=w[1],D=C&&F.some(function(e){return e.id===C})?C:null!==(t=null===(n=F[0])||void 0===n?void 0:n.id)&&void 0!==t?t:null,T=(0,c.a)(v.EvalRun,{variables:{id:D},skip:!D,fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0}),R=T.data,M=T.startPolling,A=T.stopPolling,B=null==R?void 0:R.coachPromptAiEvalRun,I=!!B&&S.includes(B.status),L=(0,o.useRef)(!1);(0,o.useEffect)(function(){if(I){L.current=!0,M(4e3);var e=setInterval(function(){return b()},4e3);return function(){A(),clearInterval(e)}}A(),L.current&&(L.current=!1,b())},[I,M,A,b]);var O=(0,o.useMemo)(function(){var e={},n=!0,t=!1,i=void 0;try{for(var a,s,r=(null!==(a=null==B?void 0:B.generations)&&void 0!==a?a:[])[Symbol.iterator]();!(n=(s=r.next()).done);n=!0){var l=s.value,o="".concat(l.scenarioKey,"::").concat(l.promptKey);e[o]||(e[o]={}),e[o][l.variant]=l}}catch(e){t=!0,i=e}finally{try{n||null==r.return||r.return()}finally{if(t)throw i}}return e},[B]),W=(0,o.useMemo)(function(){var e;return null!==(e=null==h?void 0:h.coachPromptAiEvalScenarios)&&void 0!==e?e:[]},[h]),V=(0,o.useMemo)(function(){var e=new Map,n=!0,t=!1,i=void 0;try{for(var a,s=W[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l,o=a.value,c=null!==(l=e.get(o.clientKey))&&void 0!==l?l:[];c.push(o),e.set(o.clientKey,c)}}catch(e){t=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(t)throw i}}return(0,r._)(e.values())},[W]),q=(e=(0,a._)(function(){var e,n,t;return(0,l.Jh)(this,function(i){switch(i.label){case 0:return[4,E()];case 1:return t=null===(n=i.sent().data)||void 0===n?void 0:null===(e=n.startCo
1achPromptAiEvalRun)||void 0===e?void 0:e.id,[4,b()];case 2:return i.sent(),t&&P(String(t)),[2]}})}),function(){return e.apply(this,arguments)});return y&&0===W.length?(0,i.jsx)(m.Z,{}):(0,i.jsxs)("div",{className:_().container,children:[(0,i.jsxs)("header",{className:_().header,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:_().title,children:"Suggested Messages — p2 Eval"}),(0,i.jsxs)("p",{className:_().subtitle,children:["Showing ",(0,i.jsx)("strong",{children:"p2"})," (candidate: new voice + style + focused prompts, gpt-5.4-nano). Only p2 is generated while we iterate; add p0/p1 back in run-eval-run.ts for a full A/B/C comparison."]})]}),(0,i.jsxs)("div",{className:_().runStatus,children:[(0,i.jsxs)("div",{className:_().runPicker,children:[F.length>0?(0,i.jsx)("select",{"aria-label":"Eval run",className:_().runSelect,value:null!=D?D:"",onChange:function(e){return P(e.target.value)},children:F.map(function(e){return(0,i.jsx)("option",{value:e.id,children:"#".concat(e.id," \xb7 ").concat(j(e.createdAt)," \xb7 ").concat(e.status," \xb7 ").concat(e.completedCount,"/").concat(e.totalCount).concat(e.datasetVersion?" \xb7 ".concat(e.datasetVersion):"")},e.id)})}):(0,i.jsx)("span",{className:_().runMeta,children:"No runs yet"}),B&&(0,i.jsxs)("span",{className:_()["status_".concat(B.status)]||_().statusBadge,children:[B.status,I?" ".concat(B.completedCount,"/").concat(B.totalCount):""]})]}),(0,i.jsx)(u.HR,{onClick:q,disabled:I,children:F.length>0?"New run":"Generate"})]})]}),(null==B?void 0:B.error)&&(0,i.jsxs)("div",{className:_().error,children:["Run failed: ",B.error]}),(0,i.jsx)("div",{className:_().clients,children:V.map(function(e){return(0,i.jsxs)("section",{className:_().clientSection,children:[(0,i.jsx)("h2",{className:_().clientName,children:e[0].clientName}),(0,i.jsx)("div",{className:_().scenarios,children:e.map(function(e){return(0,i.jsx)(N,{scenario:e,promptLabels:k,generationsByCell:O},e.key)})})]},e[0].clientKey)})})]})},E=t(37977),F=t(30470),w=t(89007),C=t(9008),P=t.n(C),D=t(47915),T=t(43783),R=t(39737),M=t(9736),A=t(11342),B=function(){return(0,i.jsx)(A.B,{children:(0,i.jsx)(E.Z,{children:(0,i.jsxs)(D.Z,{children:[(0,i.jsx)(P(),{children:(0,i.jsx)("title",{children:"Suggested Messages A/B Eval"},"title")}),(0,i.jsx)(b,{})]})})})};B.getInitialProps=(0,w.Z)(function(e){var n,t=e.ctx,i=e.currentUserPayload.data.me,a=null==i?void 0:null===(n=i.user)||void 0===n?void 0:n.coach;return a&&a.isActive&&(0,M.y)(a)||(0,T.Z)(R.ZP.clientDashboard(),t),{}});var I=(0,F.C)(B)},58961:function(e,n,t){"use strict";t.d(n,{Y:function(){return r}});var i=t(85893),a=t(20726),s=t.n(a),r=function(e){var n=e.font,t=e.children;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s(),{id:"56a506ffc98e56a8",dynamic:[n.style.fontFamily],children:"html{font-family:".concat(n.style.fontFamily,"}")}),t]})}},11342:function(e,n,t){"use strict";t.d(n,{B:function(){return l}});var i=t(85893),a=t(98415),s=t.n(a),r=t(58961),l=function(e){var n=e.children;return(0,i.jsx)(r.Y,{font:s(),children:n})}},9736:function(e,n,t){"use strict";t.d(n,{y:function(){return i}});var i=function(e){return(null==e?void 0:e.isAdmin)||(null==e?void 0:e.isSuperAdmin)}},98415:function(e){e.exports={style:{fontFamily:"'__heebo_a54333', '__heebo_Fallback_a54333'"},className:"__className_a54333"}},39763:function(e){e.exports={colors:"'styles/colors.module.css'",SEMI_BLACK:"#1D1D1D",GREY_2_V2:"#B7B7B7",GREY_3_V2:"#888888",GREY_4_V2:"#606060",PRIMARY_DEFAULT:"#830051",PALE_BLUE:"#D3E5F0",container:"styles_container__miaIZ",header:"styles_header__GLlp_",title:"styles_title__q3blm",subtitle:"styles_subtitle__u0E4e",runStatus:"styles_runStatus__MFHhp",statusBadge:"styles_statusBadge__YrVhm",status_pending:"styles_status_pending__uDzcx",status_running:"styles_status_running__3X9ud",status_completed:"styles_status_completed__FoO7p",status_failed:"styles_status_failed__mSFQD",runMeta:"styles_runMeta__yA1JR",error:"styles_error__HbDDG",scenarios:"styles_scenarios__5eosv",scenarioCard:"styles_scenarioCard__jdgHU",scenarioHeader:"styles_scenarioHeader__yKVnp",scenarioTitle:"styles_scenarioTitle__xtt_x",scenarioDescription:"styles_scenarioDescription___a_Rr",variants:"styles_variants__druZh",variantCell:"styles_variantCell__Igdi9",variantHeader:"styles_variantHeader__Beony",variantLabel:"styles_variantLabel__PsWni",modelBadge:"styles_modelBadge__1D61C",latency:"styles_latency__ju95
1H",draft:"styles_draft__vs2G2",pending:"styles_pending__UJi5L",cellError:"styles_cellError__LIOWZ",why:"styles_why__YC_Ja",whySummary:"styles_whySummary__Rwy3O",reason:"styles_reason__qqqKj",evidence:"styles_evidence__c_oXl",evidenceItem:"styles_evidenceItem__CeOLD",evidenceFact:"styles_evidenceFact__lrRSo",evidenceSource:"styles_evidenceSource__c9lAk",evidenceDetail:"styles_evidenceDetail__nBj7i",clients:"styles_clients__jSs0l",clientSection:"styles_clientSection__GGTub",clientName:"styles_clientName__hGC3T",context:"styles_context__ZdGzH",contextMore:"styles_contextMore__hIqAA",contextSummary:"styles_contextSummary__6vGTk",contextBody:"styles_contextBody__AK1er",contextValue:"styles_contextValue__aa0lf",contextBlock:"styles_contextBlock__WskWF",contextSubhead:"styles_contextSubhead__spUPo",contextMsg:"styles_contextMsg__7A1uh",contextMsgWho:"styles_contextMsgWho__CMPPZ",prompt:"styles_prompt__MwpTZ",promptSummary:"styles_promptSummary__ycQQj",promptSubhead:"styles_promptSubhead__RH4GN",promptText:"styles_promptText__ya3NP",sentMessage:"styles_sentMessage__COq2m",sentLabel:"styles_sentLabel__RXhTI",sentText:"styles_sentText__1MN4E",notSent:"styles_notSent__QpaKY",runPicker:"styles_runPicker__FWwh6",runSelect:"styles_runSelect__grwAB"}},57236:function(e){e.exports={screen:"styles_screen__JzZT2",padded:"styles_padded__wDJYB",transparentBackground:"styles_transparentBackground__ijoPP styles_screen__JzZT2",transparent:"styles_transparent__owvmg"}},51892:function(e){e.exports={colors:"'~styles/colors.module.css'",PURPLE:"#830051",spinner:"styles_spinner__wRTlm"}},12918:function(e,n,t){e.exports=t(18529)}},function(e){e.O(0,[9468,8523,4853,8407,6025,984,546,7362,7844,8909,945,2201,2964,9405,7977,3420,2888,9774,179],function(){return e(e.s=81234)}),_N_E=e.O()}]);
2//# sourceMappingURL=coach-prompt-ai-eval-34e7da25e36a863e.js.map

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