UNPKG

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

4 lines 3.51 kB
/* 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 T,c as V,d as Y,e as Z}from"./chunk-VZTFFEJU.js";import{c as x,d as b,e as k,f as C}from"./chunk-PSQR4KXO.js";import{c as W,d as y,e as w,f as S}from"./chunk-TNMN536Z.js";import{b as E,c as R,d as O,e as A}from"./chunk-WXJU5KQM.js";import{b as F,c as z,d as G,e as j}from"./chunk-QFH6Q4E7.js";import{c as I,d as M,e as B,f as N}from"./chunk-OY42LAGY.js";import{b as D,c as L,d as X,e as $}from"./chunk-EIJWLKSV.js";import{b as U,c as Q,d as q,e as H}from"./chunk-HSFKFEZ4.js";import{b as s,c as m,d as p,e as d}from"./chunk-23CD3UYQ.js";import{b as l,c,d as h,e as g}from"./chunk-UVCGEIMD.js";import{b as f,c as u,d as v,e as P}from"./chunk-MONCMSA6.js";import{b as K}from"./chunk-AHHBETNN.js";import{f as J}from"./chunk-XTEBLTG6.js";var n={anthropic:s,azure:l,bedrock:f,cerebras:x,deepseek:W,google:E,mistral:I,ollama:D,openai:U,xai:T,lmstudio:F},_={anthropic:p,azure:h,bedrock:v,cerebras:k,deepseek:w,google:O,lmstudio:G,mistral:B,ollama:X,openai:q,xai:Y},We={"amazon-bedrock":"generateWithBedrock",anthropic:"generateWithAnthropic",azure:"generateWithAzure",bedrock:"generateWithBedrock",cerebras:"generateWithCerebras",deepseek:"generateWithDeepSeek",google:"generateWithGoogle",lmstudio:"generateWithLMStudio",mistral:"generateWithMistral",ollama:"generateWithOllama",openai:"generateWithOpenAI",xai:"generateWithXAI"},ye=e=>n[e],we=()=>Object.values(n),Se=()=>Object.keys(n),Ee=e=>{let o=_[e];if(!o)throw new Error(`Chat provider '${e}' not found`);return o},Re=()=>Object.keys(_);var ee=async(e,o,t={})=>{let r;switch(e.provider){case"google":r=R;break;case"ollama":r=L;break;case"anthropic":r=m;break;case"openai":r=Q;break;case"xai":r=V;break;case"azure":r=c;break;case"bedrock":r=u;break;case"lmstudio":r=z;break;case"deepseek":r=y;break;case"mistral":r=M;break;case"cerebras":r=b;break;default:throw new Error(`Unsupported provider: ${e.provider}`)}if(t.filtering?.enabled){let i=new J({enabled:!0,types:t.filtering.types,showFiltered:t.filtering.showFiltered,highlightFiltered:t.filtering.highlightFiltered});return await K(r,{filter:i,logStats:!1})(e,o)}return await r(e,o)},He=async(e,o,t={})=>{try{let r=await ee(e,o,{filtering:t.filtering}),i="";for await(let a of r.textStream)i+=a,t.onChunk&&t.onChunk(a);return t.onComplete&&t.onComplete(i),i}catch(r){throw t.onError&&t.onError(r instanceof Error?r:new Error(String(r))),r}};async function Je(e){let o=e.credentials.provider;switch(o){case"ollama":return $(e);case"openai":return H(e);case"anthropic":return d(e);case"google":return A(e);case"xai":return Z(e);case"deepseek":return S(e);case"mistral":return N(e);case"cerebras":return C(e);case"lmstudio":return j(e);case"azure":return g(e);case"bedrock":return P(e);default:throw new Error(`Unsupported provider for exec: ${o}`)}}export{ee as a,He as b,Je as c,n as d,_ as e,We as f,ye as g,we as h,Se as i,Ee as j,Re as k}; /* 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-HI45C3TT.js.map