neuro-cli 4.1.3 → 4.3.0
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/dist/advisor/advisor.d.ts +0 -0
- package/dist/advisor/advisor.js +0 -0
- package/dist/agents/base.d.ts +0 -0
- package/dist/agents/base.js +1 -1
- package/dist/agents/orchestrator.d.ts +0 -0
- package/dist/agents/orchestrator.js +0 -0
- package/dist/agents/team.d.ts +0 -0
- package/dist/agents/team.js +0 -0
- package/dist/api/models.d.ts +0 -0
- package/dist/api/models.js +0 -0
- package/dist/api/ollama.d.ts +0 -0
- package/dist/api/ollama.js +0 -0
- package/dist/api/openrouter.d.ts +0 -0
- package/dist/api/openrouter.js +0 -0
- package/dist/commands/commands.d.ts +0 -0
- package/dist/commands/commands.js +0 -0
- package/dist/config/config.d.ts +0 -0
- package/dist/config/config.js +9 -9
- package/dist/context/compaction.d.ts +0 -0
- package/dist/context/compaction.js +0 -0
- package/dist/context/custom-agents.d.ts +0 -0
- package/dist/context/custom-agents.js +0 -0
- package/dist/context/custom-tools.d.ts +0 -0
- package/dist/context/custom-tools.js +0 -0
- package/dist/context/git-checkpoint.d.ts +0 -0
- package/dist/context/git-checkpoint.js +0 -0
- package/dist/context/neuro-md.d.ts +0 -0
- package/dist/context/neuro-md.js +0 -0
- package/dist/context/neuroignore.d.ts +0 -0
- package/dist/context/neuroignore.js +0 -0
- package/dist/context/repo-map.d.ts +0 -0
- package/dist/context/repo-map.js +0 -0
- package/dist/context/skill-standard.d.ts +0 -0
- package/dist/context/skill-standard.js +0 -0
- package/dist/context/skill-system.d.ts +0 -0
- package/dist/context/skill-system.js +0 -0
- package/dist/context/tree-sitter.d.ts +0 -0
- package/dist/context/tree-sitter.js +0 -0
- package/dist/core/acp.d.ts +0 -0
- package/dist/core/acp.js +0 -0
- package/dist/core/api-server.d.ts +0 -0
- package/dist/core/api-server.js +0 -0
- package/dist/core/approval.d.ts +4 -0
- package/dist/core/approval.js +74 -46
- package/dist/core/auto-compact.d.ts +0 -0
- package/dist/core/auto-compact.js +0 -0
- package/dist/core/auto-mode.d.ts +0 -0
- package/dist/core/auto-mode.js +0 -0
- package/dist/core/background-session.d.ts +0 -0
- package/dist/core/background-session.js +0 -0
- package/dist/core/cicd.d.ts +0 -0
- package/dist/core/cicd.js +0 -0
- package/dist/core/cloud-sync.d.ts +0 -0
- package/dist/core/cloud-sync.js +0 -0
- package/dist/core/code-review.d.ts +0 -0
- package/dist/core/code-review.js +0 -0
- package/dist/core/completion.d.ts +0 -0
- package/dist/core/completion.js +0 -0
- package/dist/core/context.d.ts +0 -0
- package/dist/core/context.js +0 -0
- package/dist/core/diff-preview.d.ts +0 -0
- package/dist/core/diff-preview.js +8 -16
- package/dist/core/doom-loop.d.ts +0 -0
- package/dist/core/doom-loop.js +0 -0
- package/dist/core/engine.d.ts +4 -0
- package/dist/core/engine.js +45 -13
- package/dist/core/extended-thinking.d.ts +0 -0
- package/dist/core/extended-thinking.js +0 -0
- package/dist/core/fallback.d.ts +0 -0
- package/dist/core/fallback.js +0 -0
- package/dist/core/git-worktree.d.ts +0 -0
- package/dist/core/git-worktree.js +0 -0
- package/dist/core/headless.d.ts +0 -0
- package/dist/core/headless.js +0 -0
- package/dist/core/i18n.d.ts +0 -0
- package/dist/core/i18n.js +0 -0
- package/dist/core/linting.d.ts +0 -0
- package/dist/core/linting.js +0 -0
- package/dist/core/model-router.d.ts +0 -0
- package/dist/core/model-router.js +3 -3
- package/dist/core/multi-model.d.ts +0 -0
- package/dist/core/multi-model.js +0 -0
- package/dist/core/multi-session.d.ts +0 -0
- package/dist/core/multi-session.js +0 -0
- package/dist/core/multimodal.d.ts +0 -0
- package/dist/core/multimodal.js +0 -0
- package/dist/core/observability.d.ts +0 -0
- package/dist/core/observability.js +0 -0
- package/dist/core/os-sandbox.d.ts +0 -0
- package/dist/core/os-sandbox.js +0 -0
- package/dist/core/outcome-grading.d.ts +0 -0
- package/dist/core/outcome-grading.js +0 -0
- package/dist/core/output-styles.d.ts +0 -0
- package/dist/core/output-styles.js +0 -0
- package/dist/core/parallel-agents.d.ts +0 -0
- package/dist/core/parallel-agents.js +0 -0
- package/dist/core/plugin-bundle.d.ts +0 -0
- package/dist/core/plugin-bundle.js +0 -0
- package/dist/core/plugin-sdk.d.ts +0 -0
- package/dist/core/plugin-sdk.js +0 -0
- package/dist/core/prompt-cache.d.ts +0 -0
- package/dist/core/prompt-cache.js +0 -0
- package/dist/core/sandbox.d.ts +0 -0
- package/dist/core/sandbox.js +0 -0
- package/dist/core/scheduled-tasks.d.ts +0 -0
- package/dist/core/scheduled-tasks.js +0 -0
- package/dist/core/security-scanner.d.ts +0 -0
- package/dist/core/security-scanner.js +0 -0
- package/dist/core/session.d.ts +0 -0
- package/dist/core/session.js +0 -0
- package/dist/core/shell-completion.d.ts +0 -0
- package/dist/core/shell-completion.js +0 -0
- package/dist/core/smart-monitor.d.ts +0 -0
- package/dist/core/smart-monitor.js +0 -0
- package/dist/core/spec-driven.d.ts +0 -0
- package/dist/core/spec-driven.js +0 -0
- package/dist/core/spending-warnings.d.ts +0 -0
- package/dist/core/spending-warnings.js +0 -0
- package/dist/core/sub-agent.d.ts +0 -0
- package/dist/core/sub-agent.js +0 -0
- package/dist/core/telemetry.d.ts +0 -0
- package/dist/core/telemetry.js +0 -0
- package/dist/core/terminal-ux.d.ts +0 -0
- package/dist/core/terminal-ux.js +0 -0
- package/dist/core/testing.d.ts +0 -0
- package/dist/core/testing.js +0 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.js +0 -0
- package/dist/core/undo-redo.d.ts +0 -0
- package/dist/core/undo-redo.js +0 -0
- package/dist/core/updater.d.ts +0 -0
- package/dist/core/updater.js +0 -0
- package/dist/core/vim-mode.d.ts +0 -0
- package/dist/core/vim-mode.js +0 -0
- package/dist/core/voice.d.ts +0 -0
- package/dist/core/voice.js +0 -0
- package/dist/core/web-dashboard.d.ts +0 -0
- package/dist/core/web-dashboard.js +0 -0
- package/dist/hooks/hooks.d.ts +0 -0
- package/dist/hooks/hooks.js +0 -0
- package/dist/hooks/llm-evaluator.d.ts +0 -0
- package/dist/hooks/llm-evaluator.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +11 -9
- package/dist/lsp/lsp-manager.d.ts +0 -0
- package/dist/lsp/lsp-manager.js +0 -0
- package/dist/mcp/client.d.ts +0 -0
- package/dist/mcp/client.js +0 -0
- package/dist/mcp/mcp-apps.d.ts +0 -0
- package/dist/mcp/mcp-apps.js +0 -0
- package/dist/tools/bash.d.ts +0 -0
- package/dist/tools/bash.js +0 -0
- package/dist/tools/browser.d.ts +0 -0
- package/dist/tools/browser.js +0 -0
- package/dist/tools/extended.d.ts +0 -0
- package/dist/tools/extended.js +0 -0
- package/dist/tools/file.d.ts +0 -0
- package/dist/tools/file.js +0 -0
- package/dist/tools/github.d.ts +0 -0
- package/dist/tools/github.js +0 -0
- package/dist/tools/index.d.ts +0 -0
- package/dist/tools/index.js +0 -0
- package/dist/tools/memory.d.ts +0 -0
- package/dist/tools/memory.js +0 -0
- package/dist/tools/registry.d.ts +0 -0
- package/dist/tools/registry.js +0 -0
- package/dist/tools/web.d.ts +0 -0
- package/dist/tools/web.js +0 -0
- package/dist/ui/renderer.d.ts +10 -63
- package/dist/ui/renderer.js +170 -155
- package/dist/ui/theme.d.ts +5 -0
- package/dist/ui/theme.js +99 -45
- package/dist/utils/crosspath.d.ts +0 -0
- package/dist/utils/crosspath.js +0 -0
- package/package.json +1 -1
package/dist/ui/renderer.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ============================================================
|
|
2
|
-
// NeuroCLI - Terminal UI Renderer
|
|
3
|
-
//
|
|
2
|
+
// NeuroCLI - Terminal UI Renderer v2
|
|
3
|
+
// Claude Code-inspired minimal, professional terminal output
|
|
4
|
+
// Clean lines, subtle colors, compact information display
|
|
4
5
|
// ============================================================
|
|
5
6
|
import { getTheme } from './theme.js';
|
|
6
7
|
import { MODELS } from '../api/models.js';
|
|
@@ -8,54 +9,48 @@ export class TerminalUI {
|
|
|
8
9
|
theme;
|
|
9
10
|
showTokens;
|
|
10
11
|
showCost;
|
|
11
|
-
|
|
12
|
+
isStreaming = false;
|
|
13
|
+
version = '4.3.0';
|
|
14
|
+
constructor(themeName = 'claude', showTokens = true, showCost = true) {
|
|
12
15
|
this.theme = getTheme(themeName);
|
|
13
16
|
this.showTokens = showTokens;
|
|
14
17
|
this.showCost = showCost;
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
setVersion(v) {
|
|
20
|
+
this.version = v;
|
|
21
|
+
}
|
|
22
|
+
// ── Banner ──────────────────────────────────────────────
|
|
19
23
|
banner() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
${this.theme.
|
|
24
|
-
${this.theme.
|
|
25
|
-
${this.theme.primary(' ║')} ${this.theme.muted('OpenRouter')} ${this.theme.success('●')} ${this.theme.muted('Multi-Agent')} ${this.theme.success('●')} ${this.theme.muted('Streaming')} ${this.theme.success('●')} ${this.theme.primary('║')}
|
|
26
|
-
${this.theme.primary(' ╚══════════════════════════════════════════╝')}
|
|
27
|
-
`;
|
|
28
|
-
console.log(banner);
|
|
24
|
+
// Claude Code style: clean, minimal, no box art
|
|
25
|
+
// Version is injected from index.ts via setVersion()
|
|
26
|
+
console.log();
|
|
27
|
+
console.log(` ${this.theme.bold('NeuroCLI')} ${this.theme.muted(`v${this.version}`)}`);
|
|
28
|
+
console.log(` ${this.theme.dim('─'.repeat(40))}`);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
* Print user message
|
|
32
|
-
*/
|
|
30
|
+
// ── User Messages ───────────────────────────────────────
|
|
33
31
|
userMessage(content) {
|
|
34
|
-
console.log(
|
|
35
|
-
console.log(` ${content}
|
|
32
|
+
console.log();
|
|
33
|
+
console.log(` ${this.theme.accent('>')} ${content}`);
|
|
34
|
+
console.log();
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
* Print assistant message with markdown-like formatting
|
|
39
|
-
*/
|
|
36
|
+
// ── Assistant Messages ──────────────────────────────────
|
|
40
37
|
assistantMessage(content) {
|
|
41
|
-
console.log(`${this.theme.accent('◈')} ${this.theme.bold('Neuro')}`);
|
|
42
|
-
// Simple markdown rendering
|
|
43
38
|
const lines = content.split('\n');
|
|
44
39
|
for (const line of lines) {
|
|
45
40
|
if (line.startsWith('```')) {
|
|
46
|
-
continue;
|
|
41
|
+
continue;
|
|
47
42
|
}
|
|
48
43
|
else if (line.startsWith('# ')) {
|
|
49
|
-
console.log(` ${this.theme.bold(line)}`);
|
|
44
|
+
console.log(` ${this.theme.bold(line.slice(2))}`);
|
|
50
45
|
}
|
|
51
46
|
else if (line.startsWith('## ')) {
|
|
52
|
-
console.log(` ${this.theme.
|
|
47
|
+
console.log(` ${this.theme.bold(line.slice(3))}`);
|
|
53
48
|
}
|
|
54
49
|
else if (line.startsWith('### ')) {
|
|
55
|
-
console.log(` ${this.theme.
|
|
50
|
+
console.log(` ${this.theme.primary(line.slice(4))}`);
|
|
56
51
|
}
|
|
57
52
|
else if (line.startsWith('- ') || line.startsWith('* ')) {
|
|
58
|
-
console.log(` ${this.theme.muted('
|
|
53
|
+
console.log(` ${this.theme.muted('·')} ${line.slice(2)}`);
|
|
59
54
|
}
|
|
60
55
|
else if (line.startsWith('> ')) {
|
|
61
56
|
console.log(` ${this.theme.thinking(line)}`);
|
|
@@ -66,214 +61,234 @@ ${this.theme.primary(' ╚═════════════════
|
|
|
66
61
|
}
|
|
67
62
|
console.log();
|
|
68
63
|
}
|
|
69
|
-
|
|
70
|
-
* Print streaming token
|
|
71
|
-
*/
|
|
64
|
+
// ── Streaming ───────────────────────────────────────────
|
|
72
65
|
streamingToken(token) {
|
|
73
66
|
process.stdout.write(token);
|
|
74
67
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Start streaming block
|
|
77
|
-
*/
|
|
78
68
|
startStreaming() {
|
|
79
|
-
|
|
69
|
+
this.isStreaming = true;
|
|
80
70
|
}
|
|
81
|
-
/**
|
|
82
|
-
* End streaming block
|
|
83
|
-
*/
|
|
84
71
|
endStreaming() {
|
|
72
|
+
this.isStreaming = false;
|
|
85
73
|
console.log('\n');
|
|
86
74
|
}
|
|
87
|
-
|
|
88
|
-
* Print thinking indicator
|
|
89
|
-
*/
|
|
75
|
+
// ── Thinking / Status ───────────────────────────────────
|
|
90
76
|
thinking(message) {
|
|
91
|
-
|
|
77
|
+
// Claude Code: dim italic, compact
|
|
78
|
+
console.log(` ${this.theme.thinking(message)}`);
|
|
92
79
|
}
|
|
93
|
-
|
|
94
|
-
* Print tool call
|
|
95
|
-
*/
|
|
80
|
+
// ── Tool Calls (Claude Code style: compact one-liners) ──
|
|
96
81
|
toolCall(name, args) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
82
|
+
// Build compact argument summary
|
|
83
|
+
const summary = this.formatToolArgs(name, args);
|
|
84
|
+
console.log(` ${this.theme.tool('→')} ${this.theme.tool(name)}${summary}`);
|
|
85
|
+
}
|
|
86
|
+
formatToolArgs(name, args) {
|
|
87
|
+
switch (name) {
|
|
88
|
+
case 'read_file':
|
|
89
|
+
return ` ${this.theme.path(String(args.path || ''))}`;
|
|
90
|
+
case 'write_file':
|
|
91
|
+
return ` ${this.theme.path(String(args.path || ''))} ${this.theme.muted(`(${this.byteSize(String(args.content || ''))})`)}`;
|
|
92
|
+
case 'edit_file':
|
|
93
|
+
return ` ${this.theme.path(String(args.path || ''))}`;
|
|
94
|
+
case 'search_files':
|
|
95
|
+
return ` ${this.theme.muted(`"${args.query || ''}"`)} ${this.theme.path(String(args.path || '.'))}`;
|
|
96
|
+
case 'list_directory':
|
|
97
|
+
return ` ${this.theme.path(String(args.path || args.directory || '.'))}`;
|
|
98
|
+
case 'run_command':
|
|
99
|
+
return ` ${this.theme.muted(this.truncate(String(args.command || ''), 60))}`;
|
|
100
|
+
case 'apply_diff':
|
|
101
|
+
return ` ${this.theme.path(String(args.path || ''))}`;
|
|
102
|
+
case 'delete_file':
|
|
103
|
+
return ` ${this.theme.path(String(args.path || ''))}`;
|
|
104
|
+
case 'web_search':
|
|
105
|
+
return ` ${this.theme.muted(`"${args.query || ''}"`)}`;
|
|
106
|
+
case 'web_fetch':
|
|
107
|
+
return ` ${this.theme.muted(this.truncate(String(args.url || ''), 60))}`;
|
|
108
|
+
default: {
|
|
109
|
+
const entries = Object.entries(args);
|
|
110
|
+
if (entries.length === 0)
|
|
111
|
+
return '';
|
|
112
|
+
const first = entries[0];
|
|
113
|
+
const val = typeof first[1] === 'string' ? this.truncate(first[1], 50) : JSON.stringify(first[1]);
|
|
114
|
+
return ` ${this.theme.muted(`${first[0]}: ${val}`)}`;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
106
117
|
}
|
|
107
|
-
|
|
108
|
-
* Print tool result
|
|
109
|
-
*/
|
|
118
|
+
// ── Tool Results (compact status line) ──────────────────
|
|
110
119
|
toolResult(name, result, isError) {
|
|
111
120
|
if (isError) {
|
|
112
|
-
|
|
121
|
+
const preview = this.truncate(result.replace(/\n/g, ' '), 80);
|
|
122
|
+
console.log(` ${this.theme.error('✗')} ${this.theme.error(preview)}`);
|
|
113
123
|
}
|
|
114
124
|
else {
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
// Show brief success indicator with key info
|
|
126
|
+
const preview = this.truncate(result.replace(/\n/g, ' '), 80);
|
|
127
|
+
if (preview.length > 0 && !preview.startsWith('{') && !preview.startsWith('[')) {
|
|
128
|
+
console.log(` ${this.theme.dim(preview)}`);
|
|
129
|
+
}
|
|
117
130
|
}
|
|
118
131
|
}
|
|
119
|
-
|
|
120
|
-
* Print approval request
|
|
121
|
-
*/
|
|
132
|
+
// ── Approval Prompts (minimal, clear) ───────────────────
|
|
122
133
|
approvalRequest(toolName, args, risk) {
|
|
123
|
-
const
|
|
124
|
-
low: this.theme.success,
|
|
125
|
-
medium: this.theme.warning,
|
|
126
|
-
high: this.theme.error,
|
|
134
|
+
const riskLabel = {
|
|
135
|
+
low: this.theme.success('low'),
|
|
136
|
+
medium: this.theme.warning('med'),
|
|
137
|
+
high: this.theme.error('high'),
|
|
127
138
|
};
|
|
128
|
-
const
|
|
129
|
-
console.log(
|
|
130
|
-
console.log(`
|
|
131
|
-
console.log(`
|
|
139
|
+
const summary = this.formatToolArgs(toolName, args);
|
|
140
|
+
console.log();
|
|
141
|
+
console.log(` ${this.theme.muted('┌─')} ${this.theme.bold(toolName)} ${riskLabel[risk]} risk`);
|
|
142
|
+
console.log(` ${this.theme.muted('└─')}${summary}`);
|
|
132
143
|
return true;
|
|
133
144
|
}
|
|
134
|
-
|
|
135
|
-
* Print token usage
|
|
136
|
-
*/
|
|
145
|
+
// ── Token Usage (compact footer) ────────────────────────
|
|
137
146
|
tokenUsage(usage, modelId) {
|
|
138
147
|
if (!this.showTokens && !this.showCost)
|
|
139
148
|
return;
|
|
140
149
|
const parts = [];
|
|
141
150
|
if (this.showTokens) {
|
|
142
|
-
parts.push(
|
|
143
|
-
parts.push(
|
|
151
|
+
parts.push(`${usage.inputTokens.toLocaleString()}in`);
|
|
152
|
+
parts.push(`${usage.outputTokens.toLocaleString()}out`);
|
|
144
153
|
}
|
|
145
154
|
if (this.showCost) {
|
|
146
|
-
parts.push(
|
|
155
|
+
parts.push(`$${usage.cost.toFixed(4)}`);
|
|
147
156
|
}
|
|
148
157
|
const model = MODELS[modelId];
|
|
149
158
|
const modelName = model?.name || modelId;
|
|
150
|
-
|
|
159
|
+
// Claude Code style: dim compact line
|
|
160
|
+
console.log(` ${this.theme.dim(`${modelName} · ${parts.join(' · ')}`)}`);
|
|
151
161
|
}
|
|
152
|
-
|
|
153
|
-
* Print session stats
|
|
154
|
-
*/
|
|
162
|
+
// ── Session Stats ───────────────────────────────────────
|
|
155
163
|
sessionStats(totalInput, totalOutput, totalCost) {
|
|
156
|
-
console.log(
|
|
157
|
-
console.log(` ${this.theme.muted(
|
|
158
|
-
console.log(` ${this.theme.muted(`Total cost: $${totalCost.toFixed(4)}`)}`);
|
|
164
|
+
console.log();
|
|
165
|
+
console.log(` ${this.theme.muted('Session:')}`, this.theme.dim(`${totalInput.toLocaleString()} in · ${totalOutput.toLocaleString()} out · $${totalCost.toFixed(4)}`));
|
|
159
166
|
}
|
|
160
|
-
|
|
161
|
-
* Print agent activity
|
|
162
|
-
*/
|
|
167
|
+
// ── Agent Activity (subtle indicator) ───────────────────
|
|
163
168
|
agentActivity(agentName, status) {
|
|
164
|
-
const
|
|
165
|
-
starting: '
|
|
166
|
-
working: '
|
|
167
|
-
done: '
|
|
168
|
-
error: '
|
|
169
|
+
const indicators = {
|
|
170
|
+
starting: this.theme.muted('○'),
|
|
171
|
+
working: this.theme.accent('◎'),
|
|
172
|
+
done: this.theme.success('●'),
|
|
173
|
+
error: this.theme.error('●'),
|
|
169
174
|
};
|
|
170
|
-
const
|
|
171
|
-
starting:
|
|
172
|
-
working:
|
|
173
|
-
done:
|
|
174
|
-
error:
|
|
175
|
+
const statusText = {
|
|
176
|
+
starting: 'starting',
|
|
177
|
+
working: 'working...',
|
|
178
|
+
done: 'done',
|
|
179
|
+
error: 'failed',
|
|
175
180
|
};
|
|
176
|
-
console.log(` ${
|
|
181
|
+
console.log(` ${indicators[status]} ${this.theme.muted(agentName)} ${this.theme.dim(statusText[status])}`);
|
|
177
182
|
}
|
|
178
|
-
|
|
179
|
-
* Print error
|
|
180
|
-
*/
|
|
183
|
+
// ── Status Messages (minimal) ───────────────────────────
|
|
181
184
|
error(message) {
|
|
182
|
-
console.error(
|
|
185
|
+
console.error(` ${this.theme.error('✗')} ${message}`);
|
|
183
186
|
}
|
|
184
|
-
/**
|
|
185
|
-
* Print info
|
|
186
|
-
*/
|
|
187
187
|
info(message) {
|
|
188
|
-
console.log(` ${this.theme.
|
|
188
|
+
console.log(` ${this.theme.muted('→')} ${this.theme.muted(message)}`);
|
|
189
189
|
}
|
|
190
|
-
/**
|
|
191
|
-
* Print success
|
|
192
|
-
*/
|
|
193
190
|
success(message) {
|
|
194
|
-
console.log(` ${this.theme.success('✓')} ${
|
|
191
|
+
console.log(` ${this.theme.success('✓')} ${message}`);
|
|
195
192
|
}
|
|
196
|
-
/**
|
|
197
|
-
* Print warning
|
|
198
|
-
*/
|
|
199
193
|
warning(message) {
|
|
200
|
-
console.log(` ${this.theme.warning('
|
|
194
|
+
console.log(` ${this.theme.warning('!')} ${message}`);
|
|
201
195
|
}
|
|
202
|
-
|
|
203
|
-
* Print separator
|
|
204
|
-
*/
|
|
196
|
+
// ── Separator ───────────────────────────────────────────
|
|
205
197
|
separator() {
|
|
206
198
|
console.log(` ${this.theme.dim('─'.repeat(50))}`);
|
|
207
199
|
}
|
|
208
|
-
|
|
209
|
-
* Print code block
|
|
210
|
-
*/
|
|
200
|
+
// ── Code Block (clean frame) ────────────────────────────
|
|
211
201
|
codeBlock(code, language) {
|
|
212
202
|
const header = language ? ` ${language} ` : '';
|
|
213
|
-
|
|
203
|
+
const width = 60;
|
|
204
|
+
console.log(` ${this.theme.dim('┌' + '─'.repeat(width - 2) + '┐')}`);
|
|
214
205
|
if (header) {
|
|
215
|
-
console.log(` ${this.theme.dim('│')} ${this.theme.keyword(header)}${' '.repeat(
|
|
206
|
+
console.log(` ${this.theme.dim('│')} ${this.theme.keyword(header)}${' '.repeat(width - 3 - header.length)}${this.theme.dim('│')}`);
|
|
216
207
|
}
|
|
217
|
-
for (const line of code.split('\n')) {
|
|
218
|
-
const truncated = line.length >
|
|
219
|
-
console.log(` ${this.theme.dim('│')} ${this.theme.code(truncated)}${' '.repeat(Math.max(0,
|
|
208
|
+
for (const line of code.split('\n').slice(0, 30)) {
|
|
209
|
+
const truncated = line.length > width - 4 ? line.slice(0, width - 5) + '…' : line;
|
|
210
|
+
console.log(` ${this.theme.dim('│')} ${this.theme.code(truncated)}${' '.repeat(Math.max(0, width - 3 - truncated.length))}${this.theme.dim('│')}`);
|
|
220
211
|
}
|
|
221
|
-
console.log(` ${this.theme.dim('└' + '─'.repeat(
|
|
212
|
+
console.log(` ${this.theme.dim('└' + '─'.repeat(width - 2) + '┘')}`);
|
|
222
213
|
}
|
|
223
|
-
|
|
224
|
-
* Print model selection menu
|
|
225
|
-
*/
|
|
214
|
+
// ── Model List ──────────────────────────────────────────
|
|
226
215
|
modelList(selectedModel) {
|
|
227
|
-
console.log(
|
|
216
|
+
console.log();
|
|
217
|
+
console.log(` ${this.theme.bold('Models')}`);
|
|
218
|
+
console.log(` ${this.theme.dim('─'.repeat(50))}`);
|
|
228
219
|
const categories = {
|
|
229
|
-
'
|
|
220
|
+
'Free · Coding': [
|
|
230
221
|
'qwen/qwen3-coder:free',
|
|
231
222
|
'nvidia/nemotron-3-super-120b-a12b:free',
|
|
232
|
-
'nvidia/nemotron-3-ultra-550b-a55b:free',
|
|
233
223
|
'cohere/north-mini-code:free',
|
|
234
224
|
],
|
|
235
|
-
'
|
|
236
|
-
'nvidia/nemotron-3-super-120b-a12b:free',
|
|
225
|
+
'Free · Large Context': [
|
|
237
226
|
'nvidia/nemotron-3-ultra-550b-a55b:free',
|
|
238
|
-
'tencent/hy3:free',
|
|
239
227
|
'meta-llama/llama-3.3-70b-instruct:free',
|
|
228
|
+
'tencent/hy3:free',
|
|
240
229
|
],
|
|
241
|
-
'
|
|
230
|
+
'Free · Vision': [
|
|
242
231
|
'google/gemma-4-31b-it:free',
|
|
243
232
|
'nvidia/nemotron-nano-12b-v2-vl:free',
|
|
244
|
-
'openai/gpt-oss-20b:free',
|
|
245
|
-
'poolside/laguna-m.1:free',
|
|
246
233
|
],
|
|
247
|
-
'
|
|
248
|
-
'
|
|
249
|
-
'
|
|
234
|
+
'Premium · Flagship': ['anthropic/claude-opus-4', 'openai/o3', 'google/gemini-2.5-pro'],
|
|
235
|
+
'Premium · Balanced': ['anthropic/claude-sonnet-4', 'openai/gpt-4o', 'deepseek/deepseek-r1'],
|
|
236
|
+
'Premium · Fast': ['anthropic/claude-3.5-haiku', 'openai/gpt-4o-mini', 'google/gemini-2.5-flash'],
|
|
250
237
|
};
|
|
251
238
|
for (const [category, models] of Object.entries(categories)) {
|
|
252
|
-
console.log(` ${this.theme.
|
|
239
|
+
console.log(` ${this.theme.label(category)}`);
|
|
253
240
|
for (const modelId of models) {
|
|
254
241
|
const model = MODELS[modelId];
|
|
255
242
|
if (!model)
|
|
256
243
|
continue;
|
|
257
|
-
const
|
|
244
|
+
const isCurrent = modelId === selectedModel;
|
|
245
|
+
const marker = isCurrent ? this.theme.accent('●') : this.theme.dim('○');
|
|
246
|
+
const name = isCurrent ? this.theme.bold(model.name) : this.theme.muted(model.name);
|
|
258
247
|
const isFree = model.inputPrice === 0 && model.outputPrice === 0;
|
|
259
|
-
const price = isFree ? '
|
|
260
|
-
const
|
|
261
|
-
console.log(` ${
|
|
248
|
+
const price = isFree ? this.theme.success('free') : this.theme.muted(`$${model.inputPrice}/${model.outputPrice}`);
|
|
249
|
+
const ctx = this.theme.dim(`${(model.contextWindow / 1000).toFixed(0)}K`);
|
|
250
|
+
console.log(` ${marker} ${name.padEnd(36)} ${price.padEnd(14)} ${ctx}`);
|
|
262
251
|
}
|
|
263
252
|
console.log();
|
|
264
253
|
}
|
|
265
254
|
}
|
|
266
|
-
|
|
267
|
-
* Print agent list
|
|
268
|
-
*/
|
|
255
|
+
// ── Agent List ──────────────────────────────────────────
|
|
269
256
|
agentList(agents) {
|
|
270
|
-
console.log(
|
|
257
|
+
console.log();
|
|
258
|
+
console.log(` ${this.theme.bold('Agents')}`);
|
|
259
|
+
console.log(` ${this.theme.dim('─'.repeat(50))}`);
|
|
271
260
|
for (const agent of agents) {
|
|
272
|
-
|
|
273
|
-
console.log(` ${this.theme.tool('◆')} ${this.theme.bold(agent.name.padEnd(12))} ${this.theme.muted('- ' + agent.description)}`);
|
|
274
|
-
console.log(` ${this.theme.muted(`Model: ${model?.name || agent.model}`)}`);
|
|
261
|
+
console.log(` ${this.theme.accent('●')} ${this.theme.bold(agent.name.padEnd(12))} ${this.theme.muted(agent.description)}`);
|
|
275
262
|
}
|
|
276
263
|
console.log();
|
|
277
264
|
}
|
|
265
|
+
// ── Diff Display (Claude Code style: + and - lines) ─────
|
|
266
|
+
diffAdd(line) {
|
|
267
|
+
console.log(` ${this.theme.diffAdd('+')} ${this.theme.diffAdd(line)}`);
|
|
268
|
+
}
|
|
269
|
+
diffRemove(line) {
|
|
270
|
+
console.log(` ${this.theme.diffRemove('-')} ${this.theme.diffRemove(line)}`);
|
|
271
|
+
}
|
|
272
|
+
diffContext(line) {
|
|
273
|
+
console.log(` ${this.theme.diffContext(' ')} ${this.theme.diffContext(line)}`);
|
|
274
|
+
}
|
|
275
|
+
diffHeader(file) {
|
|
276
|
+
console.log();
|
|
277
|
+
console.log(` ${this.theme.dim('───')} ${this.theme.path(file)} ${this.theme.dim('───')}`);
|
|
278
|
+
}
|
|
279
|
+
// ── Helpers ─────────────────────────────────────────────
|
|
280
|
+
truncate(str, maxLen) {
|
|
281
|
+
if (str.length <= maxLen)
|
|
282
|
+
return str;
|
|
283
|
+
return str.slice(0, maxLen - 1) + '…';
|
|
284
|
+
}
|
|
285
|
+
byteSize(content) {
|
|
286
|
+
const bytes = Buffer.byteLength(content, 'utf-8');
|
|
287
|
+
if (bytes < 1024)
|
|
288
|
+
return `${bytes}B`;
|
|
289
|
+
if (bytes < 1024 * 1024)
|
|
290
|
+
return `${(bytes / 1024).toFixed(1)}KB`;
|
|
291
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
|
|
292
|
+
}
|
|
278
293
|
}
|
|
279
294
|
//# sourceMappingURL=renderer.js.map
|
package/dist/ui/theme.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ export interface Theme {
|
|
|
21
21
|
keyword: typeof chalk;
|
|
22
22
|
comment: typeof chalk;
|
|
23
23
|
border: typeof chalk;
|
|
24
|
+
diffAdd: typeof chalk;
|
|
25
|
+
diffRemove: typeof chalk;
|
|
26
|
+
diffContext: typeof chalk;
|
|
27
|
+
label: typeof chalk;
|
|
28
|
+
path: typeof chalk;
|
|
24
29
|
}
|
|
25
30
|
export declare function getTheme(name: string): Theme;
|
|
26
31
|
export declare function listThemes(): string[];
|
package/dist/ui/theme.js
CHANGED
|
@@ -1,9 +1,40 @@
|
|
|
1
1
|
// ============================================================
|
|
2
2
|
// NeuroCLI - Terminal UI Theme
|
|
3
|
-
//
|
|
3
|
+
// Inspired by Claude Code's minimal, professional aesthetic
|
|
4
|
+
// Clean color palettes with warm accent tones
|
|
4
5
|
// ============================================================
|
|
5
6
|
import chalk from 'chalk';
|
|
6
7
|
const themes = {
|
|
8
|
+
// Claude Code-inspired warm minimal theme (default)
|
|
9
|
+
claude: {
|
|
10
|
+
name: 'claude',
|
|
11
|
+
primary: chalk.hex('#e5e5e5'),
|
|
12
|
+
secondary: chalk.hex('#888888'),
|
|
13
|
+
accent: chalk.hex('#d97706'), // amber-600 (Claude's signature warm orange)
|
|
14
|
+
success: chalk.hex('#22c55e'),
|
|
15
|
+
warning: chalk.hex('#eab308'),
|
|
16
|
+
error: chalk.hex('#ef4444'),
|
|
17
|
+
muted: chalk.hex('#737373'),
|
|
18
|
+
dim: chalk.hex('#525252'),
|
|
19
|
+
bold: chalk.bold.hex('#fafafa'),
|
|
20
|
+
user: chalk.hex('#d97706'), // amber for user input
|
|
21
|
+
assistant: chalk.hex('#e5e5e5'), // clean white for assistant
|
|
22
|
+
system: chalk.hex('#737373'),
|
|
23
|
+
tool: chalk.hex('#60a5fa'), // blue-400 for tool indicators
|
|
24
|
+
thinking: chalk.hex('#737373').italic,
|
|
25
|
+
code: chalk.hex('#a3e635'), // lime for code
|
|
26
|
+
number: chalk.hex('#c084fc'), // purple for numbers
|
|
27
|
+
string: chalk.hex('#86efac'), // green for strings
|
|
28
|
+
keyword: chalk.hex('#f472b6'), // pink for keywords
|
|
29
|
+
comment: chalk.hex('#737373').italic,
|
|
30
|
+
border: chalk.hex('#404040'),
|
|
31
|
+
diffAdd: chalk.hex('#4ade80'),
|
|
32
|
+
diffRemove: chalk.hex('#f87171'),
|
|
33
|
+
diffContext: chalk.hex('#737373'),
|
|
34
|
+
label: chalk.hex('#a3a3a3'),
|
|
35
|
+
path: chalk.hex('#93c5fd'),
|
|
36
|
+
},
|
|
37
|
+
// Retained dracula theme (classic)
|
|
7
38
|
dracula: {
|
|
8
39
|
name: 'dracula',
|
|
9
40
|
primary: chalk.hex('#bd93f9'),
|
|
@@ -26,30 +57,13 @@ const themes = {
|
|
|
26
57
|
keyword: chalk.hex('#ff79c6'),
|
|
27
58
|
comment: chalk.hex('#6272a4').italic,
|
|
28
59
|
border: chalk.hex('#44475a'),
|
|
60
|
+
diffAdd: chalk.hex('#50fa7b'),
|
|
61
|
+
diffRemove: chalk.hex('#ff5555'),
|
|
62
|
+
diffContext: chalk.hex('#6272a4'),
|
|
63
|
+
label: chalk.hex('#6272a4'),
|
|
64
|
+
path: chalk.hex('#8be9fd'),
|
|
29
65
|
},
|
|
30
|
-
|
|
31
|
-
name: 'dark',
|
|
32
|
-
primary: chalk.blue,
|
|
33
|
-
secondary: chalk.gray,
|
|
34
|
-
accent: chalk.cyan,
|
|
35
|
-
success: chalk.green,
|
|
36
|
-
warning: chalk.yellow,
|
|
37
|
-
error: chalk.red,
|
|
38
|
-
muted: chalk.gray,
|
|
39
|
-
dim: chalk.dim,
|
|
40
|
-
bold: chalk.bold.white,
|
|
41
|
-
user: chalk.cyan,
|
|
42
|
-
assistant: chalk.white,
|
|
43
|
-
system: chalk.gray,
|
|
44
|
-
tool: chalk.yellow,
|
|
45
|
-
thinking: chalk.gray.italic,
|
|
46
|
-
code: chalk.green,
|
|
47
|
-
number: chalk.magenta,
|
|
48
|
-
string: chalk.green,
|
|
49
|
-
keyword: chalk.blue,
|
|
50
|
-
comment: chalk.gray.italic,
|
|
51
|
-
border: chalk.dim,
|
|
52
|
-
},
|
|
66
|
+
// Retained nord theme
|
|
53
67
|
nord: {
|
|
54
68
|
name: 'nord',
|
|
55
69
|
primary: chalk.hex('#88c0d0'),
|
|
@@ -72,33 +86,73 @@ const themes = {
|
|
|
72
86
|
keyword: chalk.hex('#81a1c1'),
|
|
73
87
|
comment: chalk.hex('#4c566a').italic,
|
|
74
88
|
border: chalk.hex('#3b4252'),
|
|
89
|
+
diffAdd: chalk.hex('#a3be8c'),
|
|
90
|
+
diffRemove: chalk.hex('#bf616a'),
|
|
91
|
+
diffContext: chalk.hex('#4c566a'),
|
|
92
|
+
label: chalk.hex('#4c566a'),
|
|
93
|
+
path: chalk.hex('#88c0d0'),
|
|
94
|
+
},
|
|
95
|
+
// Dark minimal (Claude Code variant - cooler tones)
|
|
96
|
+
dark: {
|
|
97
|
+
name: 'dark',
|
|
98
|
+
primary: chalk.hex('#d4d4d4'),
|
|
99
|
+
secondary: chalk.hex('#737373'),
|
|
100
|
+
accent: chalk.hex('#3b82f6'), // blue accent for dark
|
|
101
|
+
success: chalk.hex('#22c55e'),
|
|
102
|
+
warning: chalk.hex('#eab308'),
|
|
103
|
+
error: chalk.hex('#ef4444'),
|
|
104
|
+
muted: chalk.hex('#737373'),
|
|
105
|
+
dim: chalk.hex('#525252'),
|
|
106
|
+
bold: chalk.bold.hex('#fafafa'),
|
|
107
|
+
user: chalk.hex('#3b82f6'),
|
|
108
|
+
assistant: chalk.hex('#d4d4d4'),
|
|
109
|
+
system: chalk.hex('#737373'),
|
|
110
|
+
tool: chalk.hex('#a78bfa'),
|
|
111
|
+
thinking: chalk.hex('#737373').italic,
|
|
112
|
+
code: chalk.hex('#4ade80'),
|
|
113
|
+
number: chalk.hex('#c084fc'),
|
|
114
|
+
string: chalk.hex('#86efac'),
|
|
115
|
+
keyword: chalk.hex('#f472b6'),
|
|
116
|
+
comment: chalk.hex('#737373').italic,
|
|
117
|
+
border: chalk.hex('#404040'),
|
|
118
|
+
diffAdd: chalk.hex('#4ade80'),
|
|
119
|
+
diffRemove: chalk.hex('#f87171'),
|
|
120
|
+
diffContext: chalk.hex('#737373'),
|
|
121
|
+
label: chalk.hex('#a3a3a3'),
|
|
122
|
+
path: chalk.hex('#93c5fd'),
|
|
75
123
|
},
|
|
124
|
+
// Light theme
|
|
76
125
|
light: {
|
|
77
126
|
name: 'light',
|
|
78
|
-
primary: chalk.
|
|
79
|
-
secondary: chalk.
|
|
80
|
-
accent: chalk.
|
|
81
|
-
success: chalk.
|
|
82
|
-
warning: chalk.
|
|
83
|
-
error: chalk.
|
|
84
|
-
muted: chalk.
|
|
85
|
-
dim: chalk.
|
|
86
|
-
bold: chalk.bold.
|
|
87
|
-
user: chalk.
|
|
88
|
-
assistant: chalk.
|
|
89
|
-
system: chalk.
|
|
90
|
-
tool: chalk.
|
|
91
|
-
thinking: chalk.
|
|
92
|
-
code: chalk.
|
|
93
|
-
number: chalk.
|
|
94
|
-
string: chalk.
|
|
95
|
-
keyword: chalk.
|
|
96
|
-
comment: chalk.
|
|
97
|
-
border: chalk.
|
|
127
|
+
primary: chalk.hex('#171717'),
|
|
128
|
+
secondary: chalk.hex('#737373'),
|
|
129
|
+
accent: chalk.hex('#d97706'),
|
|
130
|
+
success: chalk.hex('#16a34a'),
|
|
131
|
+
warning: chalk.hex('#ca8a04'),
|
|
132
|
+
error: chalk.hex('#dc2626'),
|
|
133
|
+
muted: chalk.hex('#737373'),
|
|
134
|
+
dim: chalk.hex('#a3a3a3'),
|
|
135
|
+
bold: chalk.bold.hex('#0a0a0a'),
|
|
136
|
+
user: chalk.hex('#d97706'),
|
|
137
|
+
assistant: chalk.hex('#171717'),
|
|
138
|
+
system: chalk.hex('#737373'),
|
|
139
|
+
tool: chalk.hex('#2563eb'),
|
|
140
|
+
thinking: chalk.hex('#737373').italic,
|
|
141
|
+
code: chalk.hex('#16a34a'),
|
|
142
|
+
number: chalk.hex('#9333ea'),
|
|
143
|
+
string: chalk.hex('#16a34a'),
|
|
144
|
+
keyword: chalk.hex('#db2777'),
|
|
145
|
+
comment: chalk.hex('#737373').italic,
|
|
146
|
+
border: chalk.hex('#d4d4d4'),
|
|
147
|
+
diffAdd: chalk.hex('#16a34a'),
|
|
148
|
+
diffRemove: chalk.hex('#dc2626'),
|
|
149
|
+
diffContext: chalk.hex('#737373'),
|
|
150
|
+
label: chalk.hex('#525252'),
|
|
151
|
+
path: chalk.hex('#2563eb'),
|
|
98
152
|
},
|
|
99
153
|
};
|
|
100
154
|
export function getTheme(name) {
|
|
101
|
-
return themes[name] || themes.
|
|
155
|
+
return themes[name] || themes.claude;
|
|
102
156
|
}
|
|
103
157
|
export function listThemes() {
|
|
104
158
|
return Object.keys(themes);
|
|
File without changes
|
package/dist/utils/crosspath.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neuro-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Advanced AI-powered terminal coding assistant with multi-agent orchestration, sub-agent spawning, ACP protocol, OS-level sandboxing, spec-driven development, smart monitoring, multi-model routing, MCP Apps, auto-updater, and 23+ free models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|