rawi
Version:
Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into
4 lines • 1.75 kB
JavaScript
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into an intelligent development workspace. */
import c from"ora";var a=class i{static instance;activeSpinners=new Map;constructor(){}static getInstance(){return i.instance||(i.instance=new i),i.instance}start(t,e,s){this.stop(t);let n=c({text:e,color:s?.color||"cyan"}).start();return this.activeSpinners.set(t,n),n}updateText(t,e){let s=this.activeSpinners.get(t);s&&(s.text=e)}succeed(t,e){let s=this.activeSpinners.get(t);s&&(s.succeed(e),this.activeSpinners.delete(t))}fail(t,e){let s=this.activeSpinners.get(t);s&&(s.fail(e),this.activeSpinners.delete(t))}stop(t){let e=this.activeSpinners.get(t);e&&(e.stop(),this.activeSpinners.delete(t))}stopAll(){for(let t of this.activeSpinners.values())t.stop();this.activeSpinners.clear()}get(t){return this.activeSpinners.get(t)}isActive(t){return this.activeSpinners.has(t)}async withSpinner(t,e,s,n){this.start(t,e,{color:n?.color});try{let r=await s();return this.succeed(t,n?.successText),r}catch(r){throw this.fail(t,n?.failText),r}}},o=a.getInstance(),{start:g,updateText:l,succeed:v,fail:h,stop:u,stopAll:S,withSpinner:f}=o;export{a,o as b,g as c,l as d,v as e,h as f,u as g,S as h,f as i};
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 12 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into an intelligent development workspace. */
//# sourceMappingURL=chunk-U7K37PAJ.js.map