ventureos 1.0.8 → 1.0.9
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/install.js +55 -2
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -326,6 +326,19 @@ async function startChat() {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
// ── If using Claude CLI, redirect to native Claude Code experience ─────────
|
|
330
|
+
if (useCLI && cliCmd === 'claude') {
|
|
331
|
+
console.log(line());
|
|
332
|
+
console.log(' Use Claude Code natively — it\'s a much better experience.\n');
|
|
333
|
+
console.log(' In Claude Code, start your VentureOS session by typing:\n');
|
|
334
|
+
console.log(' @ventureOS/venture-master.md\n');
|
|
335
|
+
console.log(' That gives you full markdown rendering, streaming, and all');
|
|
336
|
+
console.log(' native Claude Code features — no terminal wrapper needed.');
|
|
337
|
+
console.log(line() + '\n');
|
|
338
|
+
rl.close();
|
|
339
|
+
process.exit(0);
|
|
340
|
+
}
|
|
341
|
+
|
|
329
342
|
// ── Load system prompt ─────────────────────────────────────────────────────
|
|
330
343
|
const masterPath = path.join(projectRoot, 'ventureOS', 'venture-master.md');
|
|
331
344
|
let systemPrompt = fs.readFileSync(masterPath, 'utf8')
|
|
@@ -472,10 +485,50 @@ async function autoLoadAgents(response, messages, projectRoot) {
|
|
|
472
485
|
}
|
|
473
486
|
}
|
|
474
487
|
|
|
475
|
-
// ───
|
|
488
|
+
// ─── Markdown renderer (terminal-friendly, zero deps) ─────────────────────────
|
|
476
489
|
|
|
477
490
|
function indentText(text) {
|
|
478
|
-
|
|
491
|
+
const B = '\x1b[1m', D = '\x1b[2m', R = '\x1b[0m', C = '\x1b[36m';
|
|
492
|
+
let inCode = false;
|
|
493
|
+
const out = [];
|
|
494
|
+
|
|
495
|
+
for (const raw of text.split('\n')) {
|
|
496
|
+
// Code fence toggle
|
|
497
|
+
if (raw.trimStart().startsWith('```')) {
|
|
498
|
+
inCode = !inCode;
|
|
499
|
+
out.push(D + ' ' + '─'.repeat(40) + R);
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
if (inCode) { out.push(D + ' ' + raw + R); continue; }
|
|
503
|
+
|
|
504
|
+
// Horizontal rule
|
|
505
|
+
if (/^[-─]{3,}$/.test(raw.trim())) { out.push(' ' + '─'.repeat(50)); continue; }
|
|
506
|
+
|
|
507
|
+
// Headings
|
|
508
|
+
if (raw.startsWith('### ')) { out.push('\n ' + B + raw.slice(4).trim() + R); continue; }
|
|
509
|
+
if (raw.startsWith('## ')) { out.push('\n ' + B + raw.slice(3).trim() + R); continue; }
|
|
510
|
+
if (raw.startsWith('# ')) { out.push('\n ' + B + raw.slice(2).trim().toUpperCase() + R); continue; }
|
|
511
|
+
|
|
512
|
+
// Table separator — skip
|
|
513
|
+
if (/^\|[\s|:-]+\|$/.test(raw.trim())) continue;
|
|
514
|
+
|
|
515
|
+
// Table row
|
|
516
|
+
if (raw.trim().startsWith('|') && raw.trim().endsWith('|')) {
|
|
517
|
+
const cells = raw.split('|').slice(1, -1).map(c => c.trim());
|
|
518
|
+
out.push(' ' + cells.join(' │ ').replace(/\*\*(.+?)\*\*/g, B + '$1' + R));
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Inline: bold, italic, code
|
|
523
|
+
const line = raw
|
|
524
|
+
.replace(/\*\*(.+?)\*\*/g, B + '$1' + R)
|
|
525
|
+
.replace(/\*(.+?)\*/g, '$1')
|
|
526
|
+
.replace(/`([^`]+)`/g, D + '$1' + R);
|
|
527
|
+
|
|
528
|
+
out.push(' ' + line);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return out.join('\n');
|
|
479
532
|
}
|
|
480
533
|
|
|
481
534
|
// ─── LLM API calls — zero dependencies, native fetch ──────────────────────────
|