gm-kilo 2.0.457 → 2.0.458
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/gm-kilo.mjs +7 -0
- package/package.json +1 -1
package/gm-kilo.mjs
CHANGED
|
@@ -47,6 +47,13 @@ function runExecSync(rawLang, code, cwd) {
|
|
|
47
47
|
const lang = LANG_ALIASES[rawLang] || rawLang || 'nodejs';
|
|
48
48
|
const opts = { encoding: 'utf-8', timeout: 30000, ...(cwd && { cwd }) };
|
|
49
49
|
const out = (r) => { const o = (r.stdout||'').trimEnd(), e = stripFooter(r.stderr||'').trimEnd(); return o && e ? o+'\n[stderr]\n'+e : o||e||'(no output)'; };
|
|
50
|
+
if (lang === 'codesearch' || lang === 'search') return runPlugkit(['search', '--path', cwd || process.cwd(), code.trim()]);
|
|
51
|
+
if (lang === 'runner') return runPlugkit(['runner', code.trim()]);
|
|
52
|
+
if (lang === 'status') return runPlugkit(['status', code.trim()]);
|
|
53
|
+
if (lang === 'sleep') return runPlugkit(['sleep', code.trim()]);
|
|
54
|
+
if (lang === 'close') return runPlugkit(['close', code.trim()]);
|
|
55
|
+
if (lang === 'browser') return runPlugkit(['exec', '--lang', 'browser', '--code', code.trim(), '--cwd', cwd || process.cwd()]);
|
|
56
|
+
if (lang === 'cmd') return out(spawnSync('cmd',['/c',code],opts));
|
|
50
57
|
const pluginResult = tryLangPlugin(lang, code, cwd);
|
|
51
58
|
if (pluginResult !== null) return pluginResult;
|
|
52
59
|
if (lang === 'python') return out(spawnSync('python3',['-c',code],opts));
|