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 • 4.96 kB
JavaScript
Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/* 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. */
var _path = require('path');var _filetype = require('file-type');var o={".pdf":"pdf",".docx":"docx",".pptx":"pptx",".xlsx":"xlsx",".xls":"xlsx",".odt":"odt",".odp":"odp",".ods":"ods",".txt":"txt",".js":"js",".jsx":"jsx",".ts":"ts",".tsx":"tsx",".py":"py",".java":"java",".cpp":"cpp",".cc":"cpp",".cxx":"cpp",".c":"c",".h":"h",".hpp":"h",".hxx":"h",".go":"go",".rs":"rs",".rb":"rb",".kt":"kt",".swift":"swift",".dart":"dart",".scala":"scala",".r":"r",".m":"m",".pl":"pl",".lua":"lua",".php":"php",".json":"json",".md":"md",".yml":"yml",".yaml":"yaml",".csv":"csv",".toml":"toml",".env":"env",".ini":"ini",".conf":"conf",".cfg":"cfg",".xml":"xml",".html":"html",".htm":"htm",".css":"css",".sql":"sql",".sh":"sh",".bash":"bash",".vim":"vim",".dockerfile":"dockerfile",Dockerfile:"dockerfile",".makefile":"makefile",Makefile:"makefile",".gitignore":"gitignore",".log":"log"},f={"application/pdf":"pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-excel":"xlsx","application/excel":"xlsx","application/vnd.oasis.opendocument.text":"odt","application/vnd.oasis.opendocument.presentation":"odp","application/vnd.oasis.opendocument.spreadsheet":"ods","text/plain":"txt","application/javascript":"js","text/javascript":"js","application/x-typescript":"ts","text/x-python":"py","application/json":"json","text/markdown":"md","application/x-yaml":"yml","text/yaml":"yml","text/csv":"csv","application/xml":"xml","text/xml":"xml","text/html":"html","text/css":"css","application/sql":"sql"};function l(e){let t=_path.extname.call(void 0, e).toLowerCase(),i=_path.basename.call(void 0, e),n=o[t];return n||(n=o[i]),n?{fileType:n,confidence:"high",detectionMethod:"extension"}:null}async function p(e){try{let t=await _filetype.fileTypeFromFile.call(void 0, e);if(_optionalChain([t, 'optionalAccess', _ => _.mime])){let i=f[t.mime];return i?{fileType:i,mimeType:t.mime,confidence:"high",detectionMethod:"mime"}:{fileType:"unknown",mimeType:t.mime,confidence:"medium",detectionMethod:"mime"}}}catch (e2){}return null}async function u(e,t){if(t==="extension")return l(e)||{fileType:"unknown",confidence:"low",detectionMethod:"fallback"};if(t==="mime")return await p(e)||{fileType:"unknown",confidence:"low",detectionMethod:"fallback"};let i=l(e);if(i)return i;let n=await p(e);return n||{fileType:"unknown",confidence:"low",detectionMethod:"fallback"}}function x(e){return e!=="unknown"}function L(e){return{pdf:"PDF document",docx:"Word document",pptx:"PowerPoint presentation",xlsx:"Excel spreadsheet",odt:"OpenDocument Text",odp:"OpenDocument Presentation",ods:"OpenDocument Spreadsheet",txt:"Text file",js:"JavaScript file",jsx:"React JSX file",ts:"TypeScript file",tsx:"React TypeScript file",py:"Python file",java:"Java file",cpp:"C++ file",c:"C file",h:"C/C++ header file",go:"Go file",rs:"Rust file",rb:"Ruby file",kt:"Kotlin file",swift:"Swift file",dart:"Dart file",scala:"Scala file",r:"R file",m:"MATLAB/Objective-C file",pl:"Perl file",lua:"Lua file",php:"PHP file",json:"JSON file",md:"Markdown file",yml:"YAML file",yaml:"YAML file",csv:"CSV file",toml:"TOML file",env:"Environment file",ini:"INI file",conf:"Configuration file",cfg:"Configuration file",xml:"XML file",html:"HTML file",htm:"HTML file",css:"CSS file",sql:"SQL file",sh:"Shell script",bash:"Bash script",vim:"Vim configuration",dockerfile:"Dockerfile",makefile:"Makefile",gitignore:"Git ignore file",log:"Log file",unknown:"Unknown file type"}[e]||"Unknown File Type"}exports.a = l; exports.b = p; exports.c = u; exports.d = x; exports.e = L;
/* 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-YSXMNCFW.cjs.map
;