@sourcegraph/amp 0.0.1753833719-gea808d → 0.0.1753848924-gc5b307

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.
Files changed (2) hide show
  1. package/dist/main.js +9 -5
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -223,12 +223,16 @@ Do NOT start with 'You asked me to explain' or 'You asked me to summarize' or ot
223
223
  Provide enough information so that someone else can continue the conversation in your place.
224
224
 
225
225
  Your summary should contain:
226
- - what I wanted
226
+ - what I wanted (include any specific requirements the user mentioned)
227
227
  - what we did
228
228
  - what we're currently doing, in case there are tasks we're in the middle of
229
229
  - optional: the next steps that you would take that are related to the recent work
230
230
  - important file paths, function names, code snippets, and commands that are helpful for someone else to continue where we left off. Explain _why_ they are important.
231
231
 
232
+ When summarizing the user's interactions:
233
+ - mention any links, examples, or references the user provided
234
+ - note any preferences or specific approaches the user requested, especially when the user corrected the agent's behavior
235
+
232
236
  Address the user in the second person.
233
237
 
234
238
  Structure your response like this:
@@ -4660,7 +4664,7 @@ ${Y}`}else G=z.map((K)=>` ${K}`).join(`
4660
4664
  `}),!1;if(U.trim().length>0)P(U.trim());return!1}if(!S.ctrl&&!S.meta&&!S.tab&&$)return z({type:"insert-text",text:$}),!1;return!0});let P=async($)=>{W(null),B.add($),B.reset();try{A($)}catch(S){j1.error("Failed to submit message",S)}},j=async($)=>{W(null),B.add($),B.reset();try{Q?.($)}catch(S){j1.error("Failed to queue message",S)}};return A6(s0,{flexDirection:"column",width:"100%",flexGrow:1,flexShrink:0,ref:X,children:[J.imageAttachments.length>0&&A6(s0,{flexDirection:"row",marginBottom:1,children:[z0(DA,{color:"gray",children:"Images: "}),J.imageAttachments.map(($,S)=>A6(DA,{color:"green",children:["[image ",S+1,"]",S<J.imageAttachments.length-1?" ":""]},S))]}),E.lines.map(($,S)=>z0(s0,{flexShrink:0,flexDirection:"row",children:z0(s0,{flexGrow:1,flexShrink:0,width:"100%",children:S===M.line?A6(tD,{children:[z0(DA,{dimColor:D,children:LS.default.substr($.content,0,M.column)||""}),z0(DA,{inverse:!D,dimColor:D,children:LS.default($.content)[M.column]??" "}),z0(DA,{dimColor:D,children:LS.default.substr($.content,M.column+1)||""})]}):z0(DA,{dimColor:D,children:$.content||" "})})},S))]})}function O12(A,Q){let B=LS.default(A),D=Q,J=Q;while(D>0&&/\S/.test(B[D-1]||""))D--;while(J<B.length&&/\S/.test(B[J]||""))J++;let z=B.slice(D,J).join("");if(!z.trim())return null;return{word:z,start:D,end:J}}function Q51(A,Q=45){let B=A.queuedMessage.content.find((D)=>D.type==="text");if(B?.type==="text"){let D=Q-3;return B.text.length>Q?B.text.slice(0,D)+"…":B.text}return"Message with attachments"}function B51(A){return A.queuedMessage.content.some((Q)=>Q.type!=="text")}function N7A({queuedMessages:A,selectedIndex:Q}){return A6(s0,{borderStyle:"round",borderColor:"white",paddingX:1,flexDirection:"column",flexGrow:1,flexShrink:0,children:[A6(s0,{children:[z0(DA,{color:"white",bold:!0,children:"Queue"}),z0(DA,{color:"white",children:" - "}),z0(DA,{color:"red",bold:!0,children:"[D]"}),z0(DA,{color:"dim",children:"elete "}),z0(DA,{color:"magenta",bold:!0,children:"[E]"}),z0(DA,{color:"dim",children:"dit "}),z0(DA,{color:"dim",children:"E"}),z0(DA,{color:"white",bold:!0,children:"[x]"}),z0(DA,{color:"dim",children:"it"})]}),z0(s0,{flexDirection:"column",children:A.map((B,D)=>{let J=D===Q,z=Q51(B,50);return A6(s0,{gap:1,children:[z0(DA,{color:J?"magenta":"dim",children:"▶"}),A6(DA,{color:J?"magenta":"dim",bold:J,children:[B51(B)&&"\uD83D\uDCCE ",z]})]},B.id)})})]})}function C7A({queuedMessages:A}){if(!Array.isArray(A)||A.length===0)return null;return A6(s0,{borderStyle:"round",borderColor:"white",paddingX:1,flexDirection:"column",flexGrow:1,flexShrink:0,children:[z0(s0,{justifyContent:"space-between",children:z0(DA,{color:"white",bold:!0,children:"Queue"})}),z0(s0,{flexDirection:"column",children:A.map((Q,B)=>{let D=Q51(Q);return A6(s0,{gap:1,children:[z0(DA,{color:"dim",children:"▶"}),A6(DA,{color:"white",wrap:"truncate",children:[B51(Q)&&"\uD83D\uDCCE ",D]})]},Q.id)})})]})}var RS=yA(a2(),1);TE();var D51=yA(a2(),1);function O7A(){let[A,Q]=D51.useState(null);return D51.useEffect(()=>{let B=Bi.subscribe(Q);return()=>{B.unsubscribe()}},[]),{jetbrainsState:A}}oQ1();var af1=yA(a2(),1);function V7A({viewState:A}){let Q=af1.useMemo(()=>{return A.state==="active"?A.fileChanges:void 0},[A]),B=af1.useMemo(()=>ih1(Q),[Q]);if(!Q||B.totalFiles===0)return null;let D=B.totalFiles-B.revertedFiles;return A6(s0,{gap:1,children:[A6(DA,{dimColor:!0,children:[D," ",D===1?"file":"files"," changed"]}),(B.totalAdded>0||B.totalModified>0||B.totalRemoved>0)&&A6(DA,{children:[A6(DA,{color:"green",children:["+",B.totalAdded]}),A6(DA,{color:"yellow",children:[" ~",B.totalModified]}),A6(DA,{color:"red",children:[" -",B.totalRemoved]})]})]})}import L7A from"node:path";function R7A({jetbrainsStatus:A}){if(!A||!A.enabled)return null;let Q=process.cwd(),B=A.productName&&A.openFile&&A.workspace===Q,D;if(!A.productName)D=" IDE Not Running. To fix this problem, start your JetBrains IDE, exit this session and run `amp threads continue`.";else if(!A.workspace&&!A.openFile)D=" No Open File. To fix this problem, open a project and open a file in your JetBrains IDE.";else if(!A.workspace&&A.openFile){let J=L7A.basename(A.openFile);if(A.openFile.includes("!/"))D=` External File Open. The open file '${A.openFile}' does not belong to your project root. To fix this problem, open a file in your project sources and try again.`;else D=` Project Detection Failed. Failed to map your open file '${J}' to a project root directory. Please note that multi-root projects are not supported at the moment. Please report a bug on https://ampcode.com/discord and include relevant logs from ~/.cache/amp/logs/cli.log`}else if(!A.openFile)D=" No Open File. To fix this problem, open a file in your project.";else if(A.workspace!==Q)D=` Project Mismatch. The currently open project "${A.workspace}" does not match the working directory of Amp CLI ("${Q}").`;return z0(s0,{gap:B?1:2,children:A6(DA,{color:B?"green":"red",children:[B?"✓":"×"," ",A.productName??"JetBrains"," ",B?"• "+L7A.basename(A.openFile??""):D]})})}var J51=yA(a2(),1);function T7A(){let[A,Q]=J51.useState(0);J51.useEffect(()=>{let J=setInterval(()=>{Q((z)=>z+1)},200);return()=>clearInterval(J)},[]);let B=[{char:"∿",dim:!1},{char:"∾",dim:!1},{char:"∽",dim:!1},{char:"≋",dim:!1},{char:"≈",dim:!1},{char:"∼",dim:!1}],D=B[A%B.length];return z0(DA,{dimColor:D.dim,children:D.char})}var V12=0.8,L12=0.9;function j7A({tokenUsage:A}){let Q=A.totalInputTokens/A.maxInputTokens,B=Math.round(Q*100),J=`${Math.max(0,Math.min(B,100))}%`,z,Z=P7A(Q);if(Z==="danger")z="red";else if(Z==="warning")z="yellow";return z0(DA,{color:z,children:J})}function P7A(A){if(A>=L12)return"danger";else if(A>=V12)return"warning";return!1}function _7A(A){let Q=A.totalInputTokens/A.maxInputTokens;return P7A(Q)}function S7A({threadViewState:A,tokenUsage:Q,waitingForConfirmation:B,showingEphemeralError:D}){let J=null,z=Q?_7A(Q):!1,Z=!1;if(A&&A.state==="active"){if(A.summaryState==="summarizing")J="Compacting...";else if(A.inferenceState==="running")J="Running inference...";else if(A.interactionState==="tool-running")J="Running tools...";else if(!D&&z==="warning")J="Context window is almost full. Use /compact to trim the thread.",Z=!0;else if(!D&&z==="danger")J="Context window is close to full. Use /compact to trim the thread.",Z=!0}let G=Boolean(A&&A.state==="active"&&A.inferenceState!=="cancelled"&&!Z&&!B);if(!A||A.state!=="active"||!J)return null;let X=()=>{if(A.inferenceState==="running"&&A.interactionState!=="tool-running")return"blueBright";if(A.interactionState==="tool-running")return"greenBright";return"default"},Y=()=>{if(Z&&z==="warning")return"yellow";if(Z&&z==="danger")return"red";if(A.inferenceState==="cancelled")return"dim";return"default"};return A6(s0,{flexDirection:"row",gap:1,children:[G&&z0(DA,{color:X(),children:z0(T7A,{})}),z0(DA,{italic:!Z&&A.inferenceState==="cancelled",color:Y(),children:J})]})}function $7A({view:A,threadViewState:Q,threadTokenUsage:B,hasCompletedMessages:D,width:J,promptInput:z}){let{jetbrainsState:Z}=O7A(),G=RS.useRef(null),{stdout:K}=PX(),[X,Y]=RS.useState(K.columns);RS.useEffect(()=>{if(G.current){let{width:M}=RV(G.current);Y(M)}},[K.columns]);let U=J||X,F=U&&U<60,H=Q.state==="active"&&Q.inferenceState==="running",E=z&&z.trim().length>0,w=H&&E,W=A==="confirming"||A==="ephemeral-error",I=Q.state==="active"&&(Q.inferenceState==="running"||Q.interactionState==="tool-running")&&!W;return A6(s0,{gap:2,marginLeft:2,marginRight:2,ref:G,children:[A6(s0,{flexGrow:1,flexDirection:"row",gap:2,children:[z0(S7A,{threadViewState:Q,tokenUsage:B,waitingForConfirmation:W,showingEphemeralError:A==="ephemeral-error"}),I&&z0(s0,{children:z0(DA,{dimColor:!0,children:"Esc to cancel"})}),A6(s0,{children:[A==="confirming-exit"&&z0(DA,{dimColor:!0,children:"Ctrl+C again to exit"}),A==="confirming-clear"&&z0(DA,{dimColor:!0,children:"Esc again to clear prompt"}),A==="help"&&z0(DA,{dimColor:!0,children:"Escape to close help"}),D&&A==="running"&&!F&&A6(DA,{dimColor:!0,children:["Ctrl+R to expand",w?" · Ctrl+Q to queue a message":""]})]})]}),A6(s0,{flexGrow:0,gap:2,children:[z0(R7A,{jetbrainsStatus:Z}),!F&&z0(V7A,{viewState:Q}),B&&z0(j7A,{tokenUsage:B})]})]})}R6();W0.level=1;var R12={code:W0.white,codespan:W0.white,blockquote:W0.gray.italic,html:W0.gray,heading:W0.bold,firstHeading:W0.bold,hr:W0.reset,table:W0.reset,paragraph:W0.reset,strong:W0.bold,em:W0.italic,del:W0.dim.gray.strikethrough,link:W0.cyan,href:W0.cyan,unescape:!0,emoji:!0,showSectionPrefix:!0,reflowText:!1,tab:4,tableOptions:{wordWrap:!0,wrapOnWordBoundary:!1,style:{head:["bold"],border:["grey"],compact:!1}}},T12={keyword:W0.bold,built_in:W0.dim,type:W0.dim,literal:W0.italic,number:W0.reset,regexp:W0.dim.italic,string:W0.dim,subst:W0.reset,symbol:W0.reset,class:W0.bold,function:W0.reset,title:W0.reset,params:W0.reset,comment:W0.dim.italic,doctag:W0.dim.italic,meta:W0.dim,"meta-keyword":W0.reset,"meta-string":W0.reset,section:W0.reset,tag:W0.dim,name:W0.bold,"builtin-name":W0.reset,attr:W0.dim,attribute:W0.reset,variable:W0.reset,bullet:W0.reset,code:W0.reset,emphasis:W0.italic,strong:W0.bold,formula:W0.reset,link:W0.underline,quote:W0.reset,"selector-tag":W0.reset,"selector-id":W0.reset,"selector-class":W0.reset,"selector-attr":W0.reset,"selector-pseudo":W0.reset,"template-tag":W0.reset,"template-variable":W0.reset,addition:W0.bold.underline,deletion:W0.dim.strikethrough,default:W0.reset};J9.use(u2A({...R12,reflowText:!1},{ignoreIllegals:!0,theme:T12}));function z51({children:A}){let Q;try{Q=J9(A,{async:!1}).trimEnd()}catch(B){j1.error("Markdown rendering failed",B,{input:A}),Q=A}return z0(DA,{children:Q})}function v7A({message:A}){let Q=A.content.filter((B)=>B.type==="thinking"||B.type==="text");if(!Q.length)return null;return z0(s0,{flexDirection:"column",marginBottom:1,children:Q.map((B,D)=>{let J=D>0?1:0;if(B.type==="thinking")return z0(A51,{thinking:B.thinking},D);else return z0(s0,{marginTop:J,children:z0(z51,{children:B.text})},D);return null})})}function k7A({message:A,marginTop:Q=0}){if(!A.content.some((X)=>X.type==="text"||X.type==="image"||X.type==="thinking"||X.type==="summary"&&X.summary.type==="message"))return null;let D=A.role==="assistant"&&A.state.type==="cancelled",J=A.content.filter((X)=>X.type==="text"),z=A.content.filter((X)=>X.type==="image"),Z=A.content.filter((X)=>X.type==="thinking"),G=A.content.filter((X)=>X.type==="summary"&&("summary"in X)&&X.summary.type==="message"),K=()=>{if(z.length===0)return null;return A6(s0,{flexDirection:"row",gap:1,marginBottom:1,children:[z0(DA,{color:"gray",children:"Images:"}),z.map((X,Y)=>{return A6(DA,{color:"green",children:["[image ",Y+1,"]"]},`img-${Y}`)})]})};return A6(s0,{flexDirection:"column",gap:1,marginTop:Q,children:[Z.map((X,Y)=>z0(A51,{thinking:X.thinking},`thinking-${Y}`)),J.map((X,Y)=>{switch(A.role){case"assistant":return z0(s0,{flexDirection:"column",children:z0(z51,{children:X.text})},Y);case"user":return A6(s0,{borderStyle:"bold",borderColor:"green",borderLeft:!0,borderTop:!1,borderBottom:!1,borderRight:!1,paddingLeft:1,flexDirection:"column",children:[K(),z0(DA,{color:"green",italic:!0,children:X.text})]},Y);default:return null}}),G.map((X,Y)=>z0(s0,{children:A6(DA,{color:"grey",italic:!0,children:["Summary: ",X.summary.summary]})},`summary-${Y}`)),D&&z0(s0,{children:z0(DA,{italic:!0,dimColor:!0,children:"Cancelled"})})]})}function f7A({todos:A}){if(!Array.isArray(A)||A.length===0)return null;return A6(s0,{borderStyle:"round",borderColor:"dim",paddingX:1,flexDirection:"column",flexGrow:1,flexShrink:0,children:[z0(s0,{children:z0(DA,{dimColor:!0,bold:!0,children:"TODOs"})}),A.map((Q,B)=>z0(s0,{gap:1,children:A6(DA,{dimColor:!0,wrap:"truncate",children:[z0(DA,{children:"• "}),z0(DA,{bold:Q.status==="in-progress",strikethrough:Q.status==="completed",children:Q.content})]})},Q.id))]})}var PI=yA(a2(),1);function rf1({children:A,dependencies:Q}){let{stdout:B}=PX(),D=PI.useRef(null),[J,z]=PI.useState(B.columns),Z=PI.useCallback(()=>{if(D.current){let{width:G}=RV(D.current);z(G)}},[D,z]);return PI.useLayoutEffect(Z,[Z,B.columns,...Q||[]]),z0(s0,{width:"100%",height:"100%",ref:D,children:A(J)})}R6();x6();var RB=yA(a2(),1),Z51=Object.freeze({query:"",options:[]});function y7A(A){let[Q,B]=RB.useState(Z51),[D,J]=RB.useState(""),[z,Z]=RB.useState(null),G=RB.useRef(0),[K]=RB.useState(()=>new y8),X=RB.useCallback((E)=>{if(J(E),E!==z)Z(null)},[z]),Y=RB.useCallback(()=>Z(D),[D]),U=RB.useCallback((E)=>{K.next(E)},[K]),F=RB.useMemo(()=>D.startsWith("@")?D.slice(1):null,[D]);RB.useEffect(()=>{if(F!==null&&D!==z){let w=++G.current;(async()=>{try{let I=await A.query(F);if(w===G.current)B({query:F,options:I})}catch(I){if(w===G.current)j1.error("Completion request failed",{query:F,error:I}),B(Z51)}})()}else B(Z51)},[D,z,A,F]),RB.useEffect(()=>{return()=>{K.complete()}},[K]);let H=RB.useMemo(()=>{if(F===null)return!1;return F.startsWith(Q.query)&&z!==D&&D!==""},[Q,D,z,F]);return{completions:H?Q:Z51,hasCompletions:H?Q.options.length>0:!1,selectCompletion:U,completionSelected:K,onWordHighlight:X,ignore:Y}}var b7A=yA(a2(),1);R6();function g7A({queueSelectedIndex:A,setQueueSelectedIndex:Q,queuedMessages:B,handleRemoveQueuedMessage:D,handleEditQueuedMessage:J,setState:z,thread:Z}){return b7A.useCallback((G,K)=>{if(K.upArrow)Q(Math.max(0,A-1));else if(K.downArrow)Q(Math.min(B.length-1,A+1));else if(G.toLowerCase()==="d"){if(B[A])D(B[A].id).then(()=>{z((X)=>{let Y=Z?.queuedMessages?.length??0;if(Y===0)return Q(0),{...X,baseView:"running"};else return Q((U)=>Math.min(U,Y-1)),X})}).catch((X)=>{j1.error("Failed to remove queued message",X),z((Y)=>({...Y,uiError:X}))})}else if(G.toLowerCase()==="e"){if(B[A])J(B[A].id).then(()=>{Q(0),z((X)=>({...X,baseView:"running"}))}).catch((X)=>{j1.error("Failed to restore queued message",X),z((Y)=>({...Y,uiError:X}))})}else if(G.toLowerCase()==="x")Q(0),z((X)=>({...X,baseView:"running"}))},[A,Q,B,D,J,z,Z])}var G51=yA(a2(),1);function x7A(A){let Q=G51.useMemo(()=>process.cwd().replace(process.env.HOME||"","~"),[]);G51.useEffect(()=>{if(A)process.stdout.write(`\x1B]0;amp - ${A} - ${Q}\x07`);return()=>{process.stdout.write("\x1B]0;\x07")}},[A,Q])}var K51=yA(a2(),1);function h7A(){return z0(s0,{flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:3,marginLeft:4,children:z0(s0,{children:z0(DA,{color:"green",bold:!0,children:"Welcome to Amp"})})})}function m7A(){let[A,Q]=K51.useState(0),B=["Amp","AMP","AmP","amP","aMP","AMp"];return K51.useEffect(()=>{let D=setInterval(()=>{Q((J)=>(J+1)%B.length)},50);return()=>clearInterval(D)},[B.length]),z0(s0,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",minHeight:3,marginLeft:4,children:z0(s0,{children:A6(DA,{color:"green",bold:!0,children:["Welcome to ",B[A]]})})})}var j12=200;function u7A({threadService:A,history:Q,worker:B,sendToolConfirmation:D,sendUserMessage:J,exit:z,cancel:Z,ampURL:G,commands:K,fuzzyClient:X}){let[Y]=e41(),[U,F]=z9.useState(!1),{viewState:H,subagents:E,subagentActiveTools:w,transcript:W,streamingAssistantMessage:I,todosList:M,mainThread:N}=w5A(A,B),O=z9.useMemo(()=>I?W.items.concat({id:"streaming-assistant",type:"message",message:I}):W.items,[I,W.items]),L=N?.title||"Untitled",T=z9.useMemo(()=>N?zm1(N):void 0,[N]),R=z9.useMemo(()=>U?N?.queuedMessages||[]:[],[N?.queuedMessages,U]);x7A(N?.title),z9.useEffect(()=>{async function c1(){try{let P1=await w6(V2);F(P1.settings["queuedMessages.enabled"]??!1)}catch(P1){j1.error("Failed to load queued messages configuration",P1),F(!1)}}c1()},[]);let P=z9.useRef(new y8),[j,$]=z9.useState({baseView:"running",rerendering:!1,resizeCounter:0,dismissedEphemeralError:null,slashCommandQuery:null,uiError:null}),[S,g]=z9.useState(0);z9.useEffect(()=>{if(R.length===0){if(g(0),j.baseView==="queue-management")$((c1)=>({...c1,baseView:"running"}))}else if(S>=R.length)g(Math.max(0,R.length-1))},[R.length,S,j.baseView]);let u=z9.useRef(null),_=z9.useRef(null),k=z9.useRef(null),[b,m]=G7A(),v=z9.useCallback((c1)=>{$((P1)=>({...P1,slashCommandQuery:c1}))},[]),h=z9.useMemo(()=>{if(j.slashCommandQuery===null)return[];return K.query(j.slashCommandQuery).filter((P1)=>P1.name!=="manage-queue"||R.length>0)},[j.slashCommandQuery,K,R.length]),d=z9.useCallback(()=>{$((c1)=>({...c1,rerendering:!0})),process.stdout.write("\x1B[2J\x1B[3J\x1B[H"),P.current.next()},[$,P]),l=z9.useCallback(()=>{if(!U)return;$((c1)=>({...c1,baseView:"queue-management"}))},[U]),B1=z9.useCallback(async(c1)=>{if($((k1)=>({...k1,slashCommandQuery:null})),!c1||!N)return;let P1=!1,q1=(k1)=>{P1=!0,m(k1)},g1=K.get(c1),_1=()=>{$((k1)=>({...k1,baseView:"help"}))};try{let k1=await g1.execute({worker:B,thread:N,editorDispatch:q1,exitApp:z,setQueueManagementMode:l,openHelp:_1});$((H1)=>({...H1,slashCommandQuery:null,uiError:k1||null}))}catch(k1){$((H1)=>({...H1,slashCommandQuery:null,uiError:k1}))}if(!P1)m({type:"clear"})},[K,m,N,B,z,l]),n=z9.useCallback((c1)=>{let P1=[{type:"text",text:c1}];if(b.imageAttachments.length>0)P1.push(...b.imageAttachments);m({type:"clear"}),J(P1)},[m,b.imageAttachments,J]),z1=z9.useCallback(async(c1)=>{if(!U)return;try{await B.handle({type:"user:message-queue:enqueue",message:{content:[{type:"text",text:c1}]}}),m({type:"clear"})}catch(P1){j1.error("Failed to queue message",P1),$((q1)=>({...q1,uiError:P1}))}},[m,B,U,$]),Q1=z9.useMemo(()=>U?z1:void 0,[U,z1]),G1=z9.useCallback(async(c1)=>{if(!U)return;try{await B.handle({type:"user:message-queue:discard",id:c1})}catch(P1){throw j1.error("Failed to remove queued message",P1),P1}},[B,U]),J1=z9.useCallback(async(c1)=>{if(!U)return;try{let P1=R.find((q1)=>q1.id===c1);if(P1){await B.handle({type:"user:message-queue:discard",id:c1});let q1=P1.queuedMessage.content.find((g1)=>g1.type==="text");if(q1?.type==="text")m({type:"set-input",input:q1.text})}}catch(P1){throw j1.error("Failed to restore queued message",P1),P1}},[R,m,B,U]),L1=g7A({queueSelectedIndex:S,setQueueSelectedIndex:g,queuedMessages:R,handleRemoveQueuedMessage:G1,handleEditQueuedMessage:J1,setState:$,thread:N});z9.useEffect(()=>{return process.stdout.on("resize",d),()=>{process.stdout.off("resize",d)}},[d]),z9.useEffect(()=>{let c1=P.current.pipe(MD(j12)).subscribe(()=>{$((P1)=>({...P1,rerendering:!1,resizeCounter:P1.resizeCounter+1}))});return()=>{c1.unsubscribe()}},[P,$]),z9.useEffect(()=>{let c1=P.current,P1=u.current;return()=>{if(c1.complete(),P1)clearTimeout(P1)}},[P]);let a=[...W.activeTools,...w],r=a.filter((c1)=>c1.toolRun.status==="blocked-on-user"),s=z9.useMemo(()=>i5A(r),[r]),D1=y7A(X),{hasCompletions:Z1,completions:X1,selectCompletion:U1}=D1,R1=z9.useMemo(()=>{if(H.state!=="active"||!H.ephemeralError)return null;if(j.dismissedEphemeralError===H.ephemeralError)return null;return H.ephemeralError},[H,j.dismissedEphemeralError]),I1=j.uiError!==null?"ui-error":R1!==null?"ephemeral-error":s!==null?"confirming":j.baseView,V1=(c1)=>{if(!s||s.type!=="tool-use")return;if(s.tools.length>0){let P1=s.tools[0],q1=Array.from(c1==="always"?P1.toAllow??[]:[]);D(P1.useBlock.id,c1==="yes"||c1==="always",q1,s.subthreadID)}},W1=(c1)=>{switch(c1){case"compact":$((P1)=>({...P1,dismissedEphemeralError:null})),B.summarizeThread();break;case"dismiss":$((P1)=>({...P1,dismissedEphemeralError:R1}));break;case"retry":$((P1)=>({...P1,dismissedEphemeralError:null})),B.retry();break;default:j1.warn("action:",{action:c1})}},E1=()=>{$((c1)=>({...c1,uiError:null}))};pH((c1,P1)=>{if(P1.ctrlC)if(j.baseView==="confirming-exit"){if(u.current)clearTimeout(u.current),u.current=null;z()}else{if($((g1)=>({...g1,baseView:"confirming-exit"})),u.current)clearTimeout(u.current);let q1=setTimeout(()=>{$((g1)=>({...g1,baseView:"running"})),u.current=null},1000);u.current=q1}else if(I1==="help"){if(P1.escape)return $((q1)=>({...q1,baseView:"running"})),!1}else if(P1.escape)if(j.baseView==="confirming-clear"){if(_.current)clearTimeout(_.current),_.current=null;m({type:"clear"}),$((q1)=>({...q1,baseView:"running"}))}else if(b.input.trim().length>0){if($((g1)=>({...g1,baseView:"confirming-clear"})),_.current)clearTimeout(_.current);let q1=setTimeout(()=>{$((g1)=>({...g1,baseView:"running"})),_.current=null},1000);_.current=q1}else Z();else if(P1.ctrl&&c1.toLowerCase()==="r")$((q1)=>({...q1,baseView:"expanded-view"}));else if(P1.ctrlL)d();else if(j.baseView==="queue-management")return L1(c1,P1),!1;return!0});let i1=Y>100,s1=j.rerendering&&W.items.length===0?1:"auto",X0="resize-key"+j.resizeCounter,t1=[{type:"welcome",id:"welcome"},...W.items];if(j.baseView==="expanded-view"){let c1=O.filter((P1)=>P1.type==="message").map((P1)=>P1.message);return z0(Y7A,{threadName:L,messages:c1,onExit:()=>$((P1)=>({...P1,baseView:"running"}))})}return A6(s0,{flexDirection:"column",minHeight:"100%",flexGrow:1,height:s1,children:[z0(k41,{items:t1,children:(c1,P1)=>{if(c1.type==="welcome")return z0(h7A,{},"welcome");let q1=P1===0?0:1;return c1.type==="message"?z0(k7A,{message:c1.message,marginTop:q1},c1.id):z0(l5A,{toolUse:c1.toolUse,toolResult:c1.toolResult,marginTop:q1},c1.id)}},X0),A6(s0,{flexDirection:"column",marginTop:t1.length>1?1:0,children:[I&&z0(v7A,{message:I}),z0(L5A,{activeTools:a,subagents:E}),A6(s0,{flexDirection:i1?"row-reverse":"column",children:[(M.length>0||R.length>0)&&A6(s0,{ref:k,flexGrow:0,flexShrink:0,width:i1?"50%":"100%",flexDirection:"column",children:[R.length>0&&(j.baseView==="queue-management"?z0(N7A,{queuedMessages:R,selectedIndex:S}):z0(C7A,{queuedMessages:R})),M.length>0&&z0(f7A,{todos:M})]}),I1==="ui-error"&&j.uiError?z0(o41,{title:Pf1(j.uiError).title,description:Pf1(j.uiError).description,options:[{value:"dismiss",label:"Dismiss"}],onSelect:E1}):I1==="ephemeral-error"&&R1?z0(X7A,{error:R1,onResponse:W1,ampURL:G}):I1==="confirming"&&s?z0(s5A,{currentConfirmation:s,onConfirmationResponse:V1}):I1==="help"?z0(rf1,{dependencies:[M],children:(c1)=>z0(H7A,{width:c1})}):A6(tD,{children:[z0(s0,{flexGrow:1,borderStyle:"round",paddingX:1,children:z0(rf1,{dependencies:[M],children:(c1)=>z0(M7A,{onSubmit:n,onQueueMessage:Q1,history:Q,disabled:I1==="confirming"||I1==="ephemeral-error"||j.baseView==="queue-management"||H.state==="active"&&H.summaryState==="summarizing",editorState:b,editorDispatch:m,onSlashCommandQuery:v,width:c1,completionsState:D1})})}),h.length>0&&z0(P12,{commands:h,onSelect:B1}),Z1&&z0(_12,{completions:X1.options,onSelect:U1,ignoreCompletion:D1.ignore})]})]}),z0($7A,{view:I1,threadViewState:H,threadTokenUsage:T,hasCompletedMessages:W.items.length>0})]})]})}function P12({commands:A,onSelect:Q}){let D=z9.useMemo(()=>A.slice(0,10).map((J)=>({value:J.name,label:J.name,description:J.description})),[A]);return z0(s0,{marginBottom:1,children:z0(_V,{title:"Select command:",options:D,onSelect:Q})})}function _12({completions:A,onSelect:Q,ignoreCompletion:B}){let D=Math.min(10),J=z9.useMemo(()=>A.slice(0,D).map((Z)=>({value:Z,label:Z})),[A,D]),z=z9.useCallback((Z)=>{if(Z===null)B();else Q(Z)},[B,Q]);return z0(s0,{marginBottom:1,children:z0(_V,{title:"Insert file name:",options:J,onSelect:z})})}function p7A(A){let{worker:Q,threadID:B,settingsStorage:D,pipedInput:J,workerDeps:z,configService:Z,fuzzyServer:G}=A,[K,X]=JZ.useState(!1),[Y,U]=JZ.useState(!1);H5A();let F=JZ.useCallback((M,N,O,L)=>{return S12(M,N,O,L,D,Q,z)},[D,Q,z]),H=JZ.useCallback(async(M)=>{await Q.handle({type:"user:message",message:{content:M}})},[Q]),{exit:E}=Tf1(),w=JZ.useCallback(async()=>{if(hZ.cancel(B),Y)try{await Q.handle({type:"user:message-queue:discard"})}catch(M){j1.error("Failed to clear queued messages on cancel",M)}},[B,Q,Y]);JZ.useEffect(()=>{let M=setTimeout(()=>{X(!0)},500);return()=>clearTimeout(M)},[]),JZ.useEffect(()=>{async function M(){try{let N=await w6(V2);U(N.settings["queuedMessages.enabled"]??!1)}catch(N){j1.error("Failed to load queued messages configuration",N),U(!1)}}M()},[]);let W=JZ.useRef(!1);if(JZ.useEffect(()=>{if(W.current)return;if(J)W.current=!0,H([{type:"text",text:J}]),X(!0)},[J,H]),!K)return z0(m7A,{});let I=new _f1;return z0(q5A,{children:z0(D5A,{configService:Z,children:z0(u7A,{history:A.history,threadService:A.threadService,worker:Q,sendToolConfirmation:F,sendUserMessage:H,exit:E,cancel:w,ampURL:A.ampURL,commands:I,fuzzyClient:G})})})}async function S12(A,Q,B,D,J,z,Z){let G=B&&B.length>0||!1;if(B&&B.length>0)await w6(V2).then((X)=>X.settings["experimental.commandApproval.enabled"]?"experimental.commandApproval.allow":"commands.allowlist").then((X)=>{J.get(X,"global").then((Y)=>{let U=[...Y??[],...B];return J.set(X,U,"global")}).catch((Y)=>{j1.error("Failed to update allowlist",Y)})});let K={type:"user:tool-input",toolUse:A,value:{accepted:Q||G}};if(D)(await hZ.getOrCreateForThread(Z,D)).handle(K);else z.handle(K)}global.React=nf1.default;function c7A(A){return W0.level=1,Rf1(nf1.default.createElement(p7A,{...A}),{patchConsole:!0,exitOnCtrlC:!1,stdout:A.stdout,stdin:A.stdin}).waitUntilExit().then(async()=>{let{threadID:B,ampURL:D,threadService:J}=A;if((await J.get(B))?.messages.length!==0){let Z=`${D.replace(/\/$/,"")}/threads/${B}`;A.stdout.write(`
4661
4665
  `),A.stdout.write(`${W0.dim("Thread:")} ${Z}
4662
4666
  `),A.stdout.write(`${W0.dim("Continue this thread with:")} amp threads continue ${B}
4663
- `)}})}var ef1=tf1.join(Hp0||tf1.join(process.env.HOME||process.cwd(),".local","state"),"amp","last-thread-id");async function Ay1(A){try{await x12(tf1.dirname(ef1),{recursive:!0}),await m12(ef1,A,"utf-8")}catch(Q){j1.debug("Failed to save last thread ID",Q)}}async function r7A(){try{return(await h12(ef1,"utf-8")).trim()}catch(A){return null}}async function u12(A){let Q=await $Q(`/api/threads/${A}`);if(!Q.ok){let B=await Q.text();if(Q.status===404||B.includes("not found"))throw new eJ(jG.threadNotFound(A));throw new eJ(`Failed to load thread ${A}`,1,`Use 'amp threads share ${A} --support' to share this with the Amp team if this persists.`)}return await Q.json()}var e7A=process.env.TERMINAL_EMULATOR?.includes("JetBrains")??!1,n7A=[{name:"notifications",long:"notifications",type:"flag",description:(A)=>`${A?"Enable":"Disable"} sound notifications (enabled by default when not in execute mode)`},{name:"color",long:"color",type:"flag",description:(A)=>`${A?"Enable":"Disable"} color output (enabled by default if stdout and stderr are sent to a TTY)`,deprecated:!0},{name:"settingsFile",long:"settings-file",type:"option",default:process.env.AMP_SETTINGS_FILE??GI,description:`Custom settings file path (overrides the default location ${GI})`},{name:"logLevel",long:"log-level",type:"option",description:`Set log level (${Object.keys(j1).join(", ")})`},{name:"logFile",long:"log-file",type:"option",description:"Set log file location"},{name:"format",long:"format",type:"option",description:"output using the standard or new-ui. Options: `ui`, `new-ui`",choices:["ui","jsonl","new-ui"],hidden:!0,deprecated:!0},{name:"dangerouslyAllowAll",long:"dangerously-allow-all",type:"switch",default:!1,description:"Disable all command confirmation prompts (agent will execute all commands without asking)"},{name:"jetbrains",long:"jetbrains",type:"flag",default:e7A,description:(A)=>A?"Enable JetBrains integration. Requires the JetBrains MCP plugin to be installed and you must start Amp in the same directory as your JetBrains project. When enabled, Amp automatically includes your open JetBrains file and text selection with every message, just like it does in VS Code.":"Disable JetBrains integration.",hidden:!0},{name:"interactive",long:"interactive",type:"flag",description:(A)=>A?"Enable interactive mode. This will enable the interactive UI.":"Disable interactive mode. This will disable the interactive UI.",hidden:!0,deprecated:!0}],s7A=(A)=>("deprecated"in A)&&A.deprecated===!0,p12=(A)=>("hidden"in A)&&A.hidden===!0,c12=(A)=>("default"in A),d12=(A)=>("default"in A)?A.default:void 0;function l12(A,Q){let B=Q.args[0],D=Q.commands.map((z)=>z.name());if(B&&!B.includes(" ")&&B.length<30&&!/[./\\]/.test(B)){let z=D.filter((G)=>B.includes(G)||G.includes(B)),Z="Run amp --help for a list of available commands.";if(z.length>0)Z=`Did you mean: ${z.join(", ")}? Or run amp --help for all commands.`;throw new eJ(jG.unknownCommand(B),1,Z)}}async function TS(A,Q){Fm1("0.0.1753833719-gea808d");let B=Q.settingsFile;j1.info("Using settings file",{settingsFile:B});let D=N$1(Ap()),J=ZV({settingsFile:B}),z=WB1({storage:J,secretStorage:D,workspaceRoots:qA.of([c6.file(process.cwd())]),defaultAmpURL:A.ampURL,defaultCacheDirectory:H$1}),Z=await w6(V2);j1.debug("Global configuration initialized",{hasCacheDirectory:!!Z.settings.cacheDirectory,settingsKeys:Object.keys(Z.settings)});let G=await Uf(wv()),K=Fr1({configService:z,toolService:G});try{await K.initialized}catch(L){j1.warn("Failed to wait for MCP servers, continuing anyway:",L)}if(Q.dangerouslyAllowAll)Z.settings.dangerouslyAllowAll=!0;if(Q.jetbrains){if(Z.settings["jetbrains.enabled"]=!0,Bi.subscribe((T)=>{j1.info("jetbrains-status",T)}),await RE(),!await Fc1())if(e7A)MQ("JetBrains integration failed. Try again with `amp --no-jetbrains` or see setup: https://ampcode.com/manual#jetbrains");else MQ("Cannot connect to JetBrains IDE. Check setup: https://ampcode.com/manual#jetbrains")}let X=Z.settings["experimental.reviewTool"]??!1,Y=Z.settings["experimental.tools"]??[];w_1(G,!1,X,Y);let U,F;if(!A.executeMode)U=new Qk1(Z.settings,process.cwd()),await U.start(),F=q8A(U,process.cwd());else U=new class{async start(){}async query(){return[]}dispose(){}},F={[Symbol.dispose]:()=>{}};if(!await D.get("apiKey",A.ampURL)){if(g4.write(`No API key found. Starting login flow...
4667
+ `)}})}var ef1=tf1.join(Hp0||tf1.join(process.env.HOME||process.cwd(),".local","state"),"amp","last-thread-id");async function Ay1(A){try{await x12(tf1.dirname(ef1),{recursive:!0}),await m12(ef1,A,"utf-8")}catch(Q){j1.debug("Failed to save last thread ID",Q)}}async function r7A(){try{return(await h12(ef1,"utf-8")).trim()}catch(A){return null}}async function u12(A){let Q=await $Q(`/api/threads/${A}`);if(!Q.ok){let B=await Q.text();if(Q.status===404||B.includes("not found"))throw new eJ(jG.threadNotFound(A));throw new eJ(`Failed to load thread ${A}`,1,`Use 'amp threads share ${A} --support' to share this with the Amp team if this persists.`)}return await Q.json()}var e7A=process.env.TERMINAL_EMULATOR?.includes("JetBrains")??!1,n7A=[{name:"notifications",long:"notifications",type:"flag",description:(A)=>`${A?"Enable":"Disable"} sound notifications (enabled by default when not in execute mode)`},{name:"color",long:"color",type:"flag",description:(A)=>`${A?"Enable":"Disable"} color output (enabled by default if stdout and stderr are sent to a TTY)`,deprecated:!0},{name:"settingsFile",long:"settings-file",type:"option",default:process.env.AMP_SETTINGS_FILE??GI,description:`Custom settings file path (overrides the default location ${GI})`},{name:"logLevel",long:"log-level",type:"option",description:`Set log level (${Object.keys(j1).join(", ")})`},{name:"logFile",long:"log-file",type:"option",description:"Set log file location"},{name:"format",long:"format",type:"option",description:"output using the standard or new-ui. Options: `ui`, `new-ui`",choices:["ui","jsonl","new-ui"],hidden:!0,deprecated:!0},{name:"dangerouslyAllowAll",long:"dangerously-allow-all",type:"switch",default:!1,description:"Disable all command confirmation prompts (agent will execute all commands without asking)"},{name:"jetbrains",long:"jetbrains",type:"flag",default:e7A,description:(A)=>A?"Enable JetBrains integration. Requires the JetBrains MCP plugin to be installed and you must start Amp in the same directory as your JetBrains project. When enabled, Amp automatically includes your open JetBrains file and text selection with every message, just like it does in VS Code.":"Disable JetBrains integration.",hidden:!0},{name:"interactive",long:"interactive",type:"flag",description:(A)=>A?"Enable interactive mode. This will enable the interactive UI.":"Disable interactive mode. This will disable the interactive UI.",hidden:!0,deprecated:!0}],s7A=(A)=>("deprecated"in A)&&A.deprecated===!0,p12=(A)=>("hidden"in A)&&A.hidden===!0,c12=(A)=>("default"in A),d12=(A)=>("default"in A)?A.default:void 0;function l12(A,Q){let B=Q.args[0],D=Q.commands.map((z)=>z.name());if(B&&!B.includes(" ")&&B.length<30&&!/[./\\]/.test(B)){let z=D.filter((G)=>B.includes(G)||G.includes(B)),Z="Run amp --help for a list of available commands.";if(z.length>0)Z=`Did you mean: ${z.join(", ")}? Or run amp --help for all commands.`;throw new eJ(jG.unknownCommand(B),1,Z)}}async function TS(A,Q){Fm1("0.0.1753848924-gc5b307");let B=Q.settingsFile;j1.info("Using settings file",{settingsFile:B});let D=N$1(Ap()),J=ZV({settingsFile:B}),z=WB1({storage:J,secretStorage:D,workspaceRoots:qA.of([c6.file(process.cwd())]),defaultAmpURL:A.ampURL,defaultCacheDirectory:H$1}),Z=await w6(V2);j1.debug("Global configuration initialized",{hasCacheDirectory:!!Z.settings.cacheDirectory,settingsKeys:Object.keys(Z.settings)});let G=await Uf(wv()),K=Fr1({configService:z,toolService:G});try{await K.initialized}catch(L){j1.warn("Failed to wait for MCP servers, continuing anyway:",L)}if(Q.dangerouslyAllowAll)Z.settings.dangerouslyAllowAll=!0;if(Q.jetbrains){if(Z.settings["jetbrains.enabled"]=!0,Bi.subscribe((T)=>{j1.info("jetbrains-status",T)}),await RE(),!await Fc1())if(e7A)MQ("JetBrains integration failed. Try again with `amp --no-jetbrains` or see setup: https://ampcode.com/manual#jetbrains");else MQ("Cannot connect to JetBrains IDE. Check setup: https://ampcode.com/manual#jetbrains")}let X=Z.settings["experimental.reviewTool"]??!1,Y=Z.settings["experimental.tools"]??[];w_1(G,!1,X,Y);let U,F;if(!A.executeMode)U=new Qk1(Z.settings,process.cwd()),await U.start(),F=q8A(U,process.cwd());else U=new class{async start(){}async query(){return[]}dispose(){}},F={[Symbol.dispose]:()=>{}};if(!await D.get("apiKey",A.ampURL)){if(g4.write(`No API key found. Starting login flow...
4664
4668
  `),!await i12(A,D))process.exit(1)}let H=br1(),E=new fX1(H),w=new $X1(H),W=new HF1(E),I=Q.notifications!==void 0?Q.notifications:!A.executeMode,M=xu0({playNotificationSound:async(L)=>{if(I)gu0(L)},windowFocused:()=>Promise.resolve(!1),threadService:E});j1.info("Starting Amp background services");let N=W90({threadService:E,threadHistoryService:w,isExtensionDevelopment:!1}),O={configService:z,toolService:G,mcpService:K,threadService:E,threadHistoryService:w,threadSummaryService:W,threadSyncService:N,threadStorage:H,secretStorage:D,settingsStorage:J,fileWatcher:F,fuzzyServer:U,notificationService:M};return{...O,async dispose(){await O.mcpService.dispose(),O.configService.unsubscribe(),O.toolService.dispose(),O.fileWatcher[Symbol.dispose](),O.fuzzyServer.dispose(),O.threadSyncService.dispose(),O.settingsStorage[Symbol.dispose]()}}}async function i12(A,Q){if(!A.executeMode){if(await d91("Would you like to log in to Amp?",["(y)es","(n)o"])!="y")return g4.write(`Login cancelled. Run the command again to retry.
4665
4669
  `),!1}return await AQA(A,Q)}async function AQA(A,Q){let B=g12(32).toString("hex"),D=await x8A(A.ampURL,B);g4.write(`If your browser doesn't open automatically, visit:
4666
4670
 
@@ -4674,7 +4678,7 @@ ${W0.blue.bold(D)}
4674
4678
  Login successful! You can now use the Amp CLI.
4675
4679
  `),!0}catch(J){return m9.write(`
4676
4680
  Login failed: ${J instanceof Error?J.message:String(J)}
4677
- `),!1}}function a12(A){let Q=new Su().name("amp").description("AI-powered coding assistant").option("--visibility <visibility>","Set thread visibility (private, public, team)").configureOutput({writeErr:()=>{}});Q.exitOverride((X)=>{if(X.code==="commander.help"||X.code==="commander.version"||X.exitCode===0)Bp(),process.exit(0);let Y=X.originalError??X;u_(Y)}),Q.option("-V, --version","output the version number",()=>{g4.write(`0.0.1753833719-gea808d (released 2025-07-30T00:06:07.279Z)
4681
+ `),!1}}function a12(A){let Q=new Su().name("amp").description("AI-powered coding assistant").option("--visibility <visibility>","Set thread visibility (private, public, team)").configureOutput({writeErr:()=>{}});Q.exitOverride((X)=>{if(X.code==="commander.help"||X.code==="commander.version"||X.exitCode===0)Bp(),process.exit(0);let Y=X.originalError??X;u_(Y)}),Q.option("-V, --version","output the version number",()=>{g4.write(`0.0.1753848924-gc5b307 (released 2025-07-30T04:19:21.647Z)
4678
4682
  `),process.exit(0)}),Q.addHelpText("after",f8A()),Q.configureHelp({formatHelp:y8A}),Q.command("logout").description("Log out by removing stored API key").action(async()=>{let X=await Bz(),Y=Ap();if(process.env.AMP_API_KEY)g4.write(`API key found in environment variable AMP_API_KEY, unset first before running 'amp logout'
4679
4683
  `),process.exit(0);if(!await Y.get("apiKey",X.ampURL))g4.write(`Already logged out.
4680
4684
  `),process.exit(0);await Y.set("apiKey","",X.ampURL),g4.write(`Successfully logged out.
@@ -4708,10 +4712,10 @@ Summary: ${L}
4708
4712
  `),m9.write(`
4709
4713
  `),m9.write(`Secrets have been automatically redacted, but please review the file before attaching
4710
4714
  `),m9.write(`it to support requests. Learn more at https://ampcode.com/manual/appendix#support-bundles
4711
- `),process.exit(0)}catch(U){MQ(U instanceof Error?U.message:String(U))}}),Q.addCommand(Z);let G=new Su("update").description("Update Amp CLI to the latest version").option("--version <version>","Update to a specific version").allowUnknownOption(!1);G.action(async(X,Y)=>{try{let U=Y.optsWithGlobals(),{update:F}=await Promise.resolve().then(() => (a7A(),i7A)),{checkNpmUpdate:H}=await Promise.resolve().then(() => (qX1(),xr1)),E="0.0.1753833719-gea808d";if(U.version)m9.write(W0.blue(`Updating to version ${U.version}...
4715
+ `),process.exit(0)}catch(U){MQ(U instanceof Error?U.message:String(U))}}),Q.addCommand(Z);let G=new Su("update").description("Update Amp CLI to the latest version").option("--version <version>","Update to a specific version").allowUnknownOption(!1);G.action(async(X,Y)=>{try{let U=Y.optsWithGlobals(),{update:F}=await Promise.resolve().then(() => (a7A(),i7A)),{checkNpmUpdate:H}=await Promise.resolve().then(() => (qX1(),xr1)),E="0.0.1753848924-gc5b307";if(U.version)m9.write(W0.blue(`Updating to version ${U.version}...
4712
4716
  `)),await F(U.version),m9.write(W0.green(`✓ Successfully updated to version ${U.version}
4713
4717
  `));else{m9.write(W0.blue(`Checking for updates...
4714
- `));let w=await H("0.0.1753833719-gea808d");if(!w.hasUpdate)m9.write(W0.green(`✓ Amp CLI is already up to date.
4718
+ `));let w=await H("0.0.1753848924-gc5b307");if(!w.hasUpdate)m9.write(W0.green(`✓ Amp CLI is already up to date.
4715
4719
  `)),process.exit(0);m9.write(W0.blue(`Updating to version ${w.latestVersion}...
4716
4720
  `)),await F(w.latestVersion),m9.write(W0.green(`✓ Successfully updated to version ${w.latestVersion}
4717
4721
  `))}process.exit(0)}catch(U){m9.write(W0.red("Error updating: ")+`${U instanceof Error?U.message:String(U)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sourcegraph/amp",
3
- "version": "0.0.1753833719-gea808d",
3
+ "version": "0.0.1753848924-gc5b307",
4
4
  "description": "CLI for Amp, an agentic coding tool in research preview from Sourcegraph.",
5
5
  "homepage": "https://ampcode.com/",
6
6
  "author": {