rawi
Version:
Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 major AI providers directly to your terminal. With seamless shell integration, persistent conversations, and 200+ specialized prompt templates, Rawi transforms your command line into
7 lines • 1.54 kB
JavaScript
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 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{b as a}from"./chunk-FTL5CSJ6.js";import o from"chalk";var d=async(f,n,i,p,m,e,s)=>{s.verbose&&a.start("query","Processing your query...");try{let r=await f.generateStream({message:i,context:p||""}),t="",c=!0;for await(let u of r)c&&(s.verbose&&a.stop("query"),c=!1),process.stdout.write(u),t+=u;t.endsWith(`
`)||process.stdout.write(`
`),await m.addMessage(n,"user",i,e.provider,e.model||"default",e.temperature,e.maxTokens),await m.addMessage(n,"assistant",t,e.provider,e.model||"default",e.temperature,e.maxTokens),s.verbose&&console.log(o.dim(`
\u2705 Response saved to session history`))}catch(r){s.verbose&&a.fail("query","Failed to process query"),console.error(o.red("\u274C Error processing query:")),console.error(o.red(r.message)),s.verbose&&r instanceof Error&&r.stack&&(console.error(o.dim("Stack trace:")),console.error(o.dim(r.stack))),process.exit(1)}};export{d as a};
/* Rawi (راوي) is the developer-friendly AI CLI that brings the power of 11 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-EZQAUTEV.js.map