toolnet-memory 0.3.5 → 0.3.6
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/bundle/full-index.js +23 -22
- package/bundle/graph-index.js +1 -1
- package/bundle/impact.js +2 -2
- package/bundle/mcp.js +20 -20
- package/bundle/runtime.js +6 -6
- package/bundle/semantic.js +6 -6
- package/bundle/shimmer-worker.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parentPort as v,workerData as G}from"worker_threads";import{writeSync as w}from"fs";var O={spinner:["\xB7","\u2722","\u2733","\u2736","\u273B","\u273D"],barFilled:"\u2588",barEmpty:"\u2591",phaseDone:"\u25C6",phaseActive:"\u25C7",rail:"\u2502",branch:"\u251C",corner:"\u2514",dash:"\u2014"},P={spinner:[".","*","+","x","*","+"],barFilled:"#",barEmpty:"-",phaseDone:"[OK]",phaseActive:"[>>]",rail:"|",branch:"|",corner:"\\",dash:"-"};function D(){if(process.env.TOOLNET_ASCII==="1")return!1;if(process.env.TOOLNET_UNICODE==="1")return!0;if(process.platform==="win32"){let e=process.env.TERM_PROGRAM,r=process.env.WT_SESSION,n=process.env.VSCODE_PID,t=process.env.ConEmuPID;return!!(r||n||t||e==="vscode")}return process.env.TERM!=="linux"}function N(){return process.platform==="win32"?!1:D()}var $;function g(){return $||($=N()?O:P),$}function S(e){w(1,e)}var i=g(),d=i.spinner,L=150,T=3,f=G.colors!==!1,s=f?"\x1B[0m":"",l=f?"\x1B[2m":"",E=f?"\x1B[1m":"",W=G.startTime;function _(){return Math.floor((Date.now()-W)/L)}function p(e,r,n){return Math.round(e+(r-e)*n)}function C(e){if(!f)return"";let r=(Math.sin(e*2*Math.PI/13)+1)/2,n=p(160,251,r),t=p(100,191,r),o=p(9,36,r);return`\x1B[38;2;${n};${t};${o}m${E}`}function A(e){return e.toLocaleString()}function F(e,r,n){if(r===0)return`${l}${i.barEmpty.repeat(n)}${s}`;let t=24,o=e%t/t*(r+6)-3,y=3,c="";for(let u=0;u<r;u++){if(!f){c+=i.barFilled;continue}let M=Math.abs(u-o),b=Math.max(0,1-M/y),I=p(160,251,b),x=p(100,191,b),R=p(9,36,b);c+=`\x1B[38;2;${I};${x};${R}m${E}${i.barFilled}`}return c+=`${s}${l}${i.barEmpty.repeat(n)}${s}`,c}var a="",m=-1,h=0;function k(){if(!a)return;let e=_(),r=Math.floor(e/T)%d.length,n=d[r]??d[0]??".",t=C(e),o;if(m>=0){let c=Math.round(25*m/100),u=25-c;o=`${l}${i.rail}${s} ${t}${n}${s} ${a} ${F(e,c,u)} ${m}%`}else h>0?o=`${l}${i.rail}${s} ${t}${n}${s} ${a}... ${A(h)} found`:o=`${l}${i.rail}${s} ${t}${n}${s} ${a}...`;S(`\r\x1B[K${o}`)}function H(){a&&(S("\r\x1B[K"),a="",m=-1,h=0)}var U=setInterval(k,50);v.on("message",e=>{e.type==="update"?(a=e.phaseName??"",m=e.percent??-1,h=e.count??0):e.type==="stop"&&(clearInterval(U),H(),v.postMessage({type:"stopped"}))});
|