"use strict";exports.id=6318,exports.ids=[6318],exports.modules={"./src/commands/about.ts"(e,t,l){l.r(t),l.d(t,{gatherAboutInfo:()=>c,handleAbout:()=>v});var n=l("node:os"),s=l.n(n),a=l("../proto/dist/generated/aiserver/v1/dashboard_pb.js"),o=l("../../../../var/folders/gy/wcfhjzc55d96bnvx1zv223lc0000gn/T/agent-cli-mac-macos-x64-019f6d3d-8812-4a7d-ad69-e1d1701ab9a2.1ELq4Ger/pnpm-virtual-store/chalk@5.6.2/node_modules/chalk/source/index.js"),r=l("./src/console-io.ts"),u=l("./src/state/session.ts"),i=l("./src/utils/terminal-environment.ts"),d=function(e,t,l,n){return new(l||(l=Promise))((function(s,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function r(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?s(e.value):(t=e.value,t instanceof l?t:new l((function(e){e(t)}))).then(o,r)}u((n=n.apply(e,t||[])).next())}))};function c(e,t,l){return d(this,void 0,void 0,(function*(){var n,o,r,d,c,v,m;const g=null!=="2026.07.16-899851b"?"2026.07.16-899851b":"unknown",f=t.get(),q=null!==(d=null!==(o=null===(n=f.model)||void 0===n?void 0:n.displayName)&&void 0!==o?o:null===(r=f.model)||void 0===r?void 0:r.modelId)&&void 0!==d?d:"Auto",h=s().platform(),b=s().arch(),p=(0,i.detectTerminalProgram)(),R=(0,i.detectShell)(),y=u.d.getLastParentAgentRequestId();let A=null,I=null;try{const t=yield e.getAccessToken(),n=yield e.getRefreshToken();if(t&&n){try{A=null!==(c=(yield l.getMe(new a.GetMeRequest({}))).email)&&void 0!==c?c:null}catch(e){}try{I=null!==(m=null===(v=(yield l.getPlanInfo(new a.GetPlanInfoRequest({}))).planInfo)||void 0===v?void 0:v.planName)&&void 0!==m?m:null}catch(e){}}}catch(e){}return{cliVersion:g,model:q,subscriptionTier:I,osPlatform:h,osArch:b,userEmail:A,terminalProgram:p,shell:R,lastRequestId:y}}))}function v(e,t,l){return d(this,arguments,void 0,(function*(e,t,l,n={}){var s,a;const u=null!==(s=n.format)&&void 0!==s?s:"text";let i=0;try{const n=yield c(e,t,l);"json"===u?(0,r.OT)(JSON.stringify(n,null,2)):(0,r.OT)(function(e){var t,l;const n=[{label:"CLI Version",value:e.cliVersion},{label:"Model",value:e.model},{label:"Subscription Tier",value:null!==(t=e.subscriptionTier)&&void 0!==t?t:"Unknown"},{label:"OS",value:`${e.osPlatform} (${e.osArch})`},{label:"Terminal",value:e.terminalProgram},{label:"Shell",value:e.shell}];return e.lastRequestId&&n.push({label:"Last Request ID",value:e.lastRequestId}),n.push({label:"User Email",value:null!==(l=e.userEmail)&&void 0!==l?l:"Not logged in"}),`${o.Ay.bold.cyan("About Cursor CLI")}\n\n${n.map((e=>`${o.Ay.dim(e.label.padEnd(20))}${e.value}`)).join("\n")}`}(n))}catch(e){i=1;const t=String(e&&"object"==typeof e&&"message"in e&&null!==(a=e.message)&&void 0!==a?a:e);"json"===u?(0,r.OT)(JSON.stringify({status:"error",message:`Failed to get about info: ${t}`},null,2)):(0,r.p2)(o.Ay.red(`Failed to get about info: ${t}`))}finally{process.exit(i)}}))}},"./src/state/session.ts"(e,t,l){l.d(t,{d:()=>a});const n=Object.seal({lastRequest:null,lastParentAgentRequest:null});function s(e,t){return{id:e,timestamp:Date.now(),path:null==t?void 0:t.path}}const a=Object.seal({get lastRequest(){return n.lastRequest},recordLastRequest(e,t){n.lastRequest=s(e,t)},recordLastParentAgentRequest(e,t){n.lastParentAgentRequest=s(e,t)},recordRequestFromMiddleware(e){const t={path:e.inner.url};n.lastRequest=s(e.requestId,t),e.inner.header.get("x-parent-request-id")||(n.lastParentAgentRequest=s(e.requestId,t))},getLastRequestId(){var e,t;return null!==(t=null===(e=n.lastRequest)||void 0===e?void 0:e.id)&&void 0!==t?t:null},getLastRequest:()=>n.lastRequest,getLastParentAgentRequestId(){var e,t;return null!==(t=null===(e=n.lastParentAgentRequest)||void 0===e?void 0:e.id)&&void 0!==t?t:null},clearLastRequest(){n.lastRequest=null,n.lastParentAgentRequest=null}})}};