agent-afk 3.2.0 → 3.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/dist/cli.mjs +212 -212
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1589,7 +1589,7 @@ ${d.stdout.trim()||"(no changes)"}`;await t.reply(u.slice(0,4e3))}catch(l){r("[f
|
|
|
1589
1589
|
\u25E6 ${w}: Done`,u(o))};try{await Rr(b,async()=>{for(;;){process.env.AFK_TELEGRAM_TRACE&&console.log("[trace] awaiting next event");let m=await k();if(process.env.AFK_TELEGRAM_TRACE&&console.log("[trace] event arrived:",m.done?"DONE":m.value.type),m.done)break;let g=m.value;if(h||(h=!0,console.log("\u{1F4E1} First stream event received:",g.type),r?.("First stream event received:",g.type)),g.type==="chunk"&&g.chunk.type==="content"&&(o+=g.chunk.content,await u(o)),g.type==="chunk"&&g.chunk.type,g.type==="message"&&g.message.role==="assistant"&&(o=g.message.content,await u(o)),g.type==="progress"){let{description:w,summary:I,lastToolName:N}=g.progress,D=N?`
|
|
1590
1590
|
\u25E6 ${w} (${N})`:`
|
|
1591
1591
|
\u25E6 ${w}`;o+=D,I&&(o+=`
|
|
1592
|
-
${I}`),await u(o)}if(g.type==="suggestion"&&(o+=`
|
|
1592
|
+
${I}`),await u(o)}if(g.type==="suggestion"&&g.suggestion.trim()!==o.trim()&&(o+=`
|
|
1593
1593
|
|
|
1594
1594
|
\u{1F4A1} ${g.suggestion}`,await u(o)),g.type==="paused"){a=g.resetsAt??null;let w=a!==null?Math.max(0,Math.ceil((a.getTime()-Date.now())/6e4)):null,I=a!==null?a.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0}):null,N=I!==null&&w!==null?`\u23F8 **Usage paused**
|
|
1595
1595
|
|
package/dist/telegram.mjs
CHANGED
|
@@ -144,7 +144,7 @@ ${d.stdout.trim()||"(no changes)"}`;await t.reply(u.slice(0,4e3))}catch(l){r("[f
|
|
|
144
144
|
\u25E6 ${k}: Done`,u(o))};try{await Ao(b,async()=>{for(;;){process.env.AFK_TELEGRAM_TRACE&&console.log("[trace] awaiting next event");let h=await w();if(process.env.AFK_TELEGRAM_TRACE&&console.log("[trace] event arrived:",h.done?"DONE":h.value.type),h.done)break;let y=h.value;if(g||(g=!0,console.log("\u{1F4E1} First stream event received:",y.type),r?.("First stream event received:",y.type)),y.type==="chunk"&&y.chunk.type==="content"&&(o+=y.chunk.content,await u(o)),y.type==="chunk"&&y.chunk.type,y.type==="message"&&y.message.role==="assistant"&&(o=y.message.content,await u(o)),y.type==="progress"){let{description:k,summary:_,lastToolName:R}=y.progress,v=R?`
|
|
145
145
|
\u25E6 ${k} (${R})`:`
|
|
146
146
|
\u25E6 ${k}`;o+=v,_&&(o+=`
|
|
147
|
-
${_}`),await u(o)}if(y.type==="suggestion"&&(o+=`
|
|
147
|
+
${_}`),await u(o)}if(y.type==="suggestion"&&y.suggestion.trim()!==o.trim()&&(o+=`
|
|
148
148
|
|
|
149
149
|
\u{1F4A1} ${y.suggestion}`,await u(o)),y.type==="paused"){a=y.resetsAt??null;let k=a!==null?Math.max(0,Math.ceil((a.getTime()-Date.now())/6e4)):null,_=a!==null?a.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0}):null,R=_!==null&&k!==null?`\u23F8 **Usage paused**
|
|
150
150
|
|