thatgfsj-code 0.2.1
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/.patches/0001-fix-repl-replace-readline-with-inquirer-input-for-ke.patch +279 -0
- package/.patches/0002-fix-repl-stream-AI-output-directly-to-stdout-so-term.patch +564 -0
- package/.patches/0003-fix-session-break-the-hallucination-loop-in-assistan.patch +194 -0
- package/.patches/0004-chore-release-bump-version-to-0.2.1.patch +24 -0
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/ROADMAP.md +107 -0
- package/dist/agent/core.d.ts +56 -0
- package/dist/agent/core.d.ts.map +1 -0
- package/dist/agent/core.js +142 -0
- package/dist/agent/core.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +8 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/intent.d.ts +36 -0
- package/dist/agent/intent.d.ts.map +1 -0
- package/dist/agent/intent.js +146 -0
- package/dist/agent/intent.js.map +1 -0
- package/dist/agent/streaming.d.ts +50 -0
- package/dist/agent/streaming.d.ts.map +1 -0
- package/dist/agent/streaming.js +110 -0
- package/dist/agent/streaming.js.map +1 -0
- package/dist/core/ai-engine.d.ts +59 -0
- package/dist/core/ai-engine.d.ts.map +1 -0
- package/dist/core/ai-engine.js +378 -0
- package/dist/core/ai-engine.js.map +1 -0
- package/dist/core/cli.d.ts +21 -0
- package/dist/core/cli.d.ts.map +1 -0
- package/dist/core/cli.js +143 -0
- package/dist/core/cli.js.map +1 -0
- package/dist/core/config.d.ts +38 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +129 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/context-compactor.d.ts +54 -0
- package/dist/core/context-compactor.d.ts.map +1 -0
- package/dist/core/context-compactor.js +197 -0
- package/dist/core/context-compactor.js.map +1 -0
- package/dist/core/hooks.d.ts +75 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +146 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/permissions.d.ts +52 -0
- package/dist/core/permissions.d.ts.map +1 -0
- package/dist/core/permissions.js +237 -0
- package/dist/core/permissions.js.map +1 -0
- package/dist/core/session.d.ts +54 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +147 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +175 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/state.d.ts +60 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +106 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/subagent.d.ts +68 -0
- package/dist/core/subagent.d.ts.map +1 -0
- package/dist/core/subagent.js +142 -0
- package/dist/core/subagent.js.map +1 -0
- package/dist/core/system-prompt.d.ts +40 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +138 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/tool-registry.d.ts +53 -0
- package/dist/core/tool-registry.d.ts.map +1 -0
- package/dist/core/tool-registry.js +138 -0
- package/dist/core/tool-registry.js.map +1 -0
- package/dist/core/types.d.ts +206 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +127 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +481 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/client.d.ts +83 -0
- package/dist/mcp/client.d.ts.map +1 -0
- package/dist/mcp/client.js +267 -0
- package/dist/mcp/client.js.map +1 -0
- package/dist/repl/index.d.ts +8 -0
- package/dist/repl/index.d.ts.map +1 -0
- package/dist/repl/index.js +8 -0
- package/dist/repl/index.js.map +1 -0
- package/dist/repl/input.d.ts +61 -0
- package/dist/repl/input.d.ts.map +1 -0
- package/dist/repl/input.js +127 -0
- package/dist/repl/input.js.map +1 -0
- package/dist/repl/loop.d.ts +53 -0
- package/dist/repl/loop.d.ts.map +1 -0
- package/dist/repl/loop.js +241 -0
- package/dist/repl/loop.js.map +1 -0
- package/dist/repl/output.d.ts +105 -0
- package/dist/repl/output.d.ts.map +1 -0
- package/dist/repl/output.js +197 -0
- package/dist/repl/output.js.map +1 -0
- package/dist/repl/welcome.d.ts +68 -0
- package/dist/repl/welcome.d.ts.map +1 -0
- package/dist/repl/welcome.js +249 -0
- package/dist/repl/welcome.js.map +1 -0
- package/dist/tools/file.d.ts +46 -0
- package/dist/tools/file.d.ts.map +1 -0
- package/dist/tools/file.js +100 -0
- package/dist/tools/file.js.map +1 -0
- package/dist/tools/git.d.ts +52 -0
- package/dist/tools/git.d.ts.map +1 -0
- package/dist/tools/git.js +112 -0
- package/dist/tools/git.js.map +1 -0
- package/dist/tools/index.d.ts +22 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +43 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/search.d.ts +36 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +223 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/shell.d.ts +57 -0
- package/dist/tools/shell.d.ts.map +1 -0
- package/dist/tools/shell.js +153 -0
- package/dist/tools/shell.js.map +1 -0
- package/dist/utils/diff-preview.d.ts +42 -0
- package/dist/utils/diff-preview.d.ts.map +1 -0
- package/dist/utils/diff-preview.js +174 -0
- package/dist/utils/diff-preview.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/memory.d.ts +81 -0
- package/dist/utils/memory.d.ts.map +1 -0
- package/dist/utils/memory.js +186 -0
- package/dist/utils/memory.js.map +1 -0
- package/dist/utils/project-context.d.ts +62 -0
- package/dist/utils/project-context.d.ts.map +1 -0
- package/dist/utils/project-context.js +197 -0
- package/dist/utils/project-context.js.map +1 -0
- package/docs/API_KEY_GUIDE.md +236 -0
- package/docs/FAQ.md +182 -0
- package/install.bat +63 -0
- package/install.ps1 +238 -0
- package/install.sh +113 -0
- package/package.json +36 -0
- package/src/agent/core.ts +179 -0
- package/src/agent/index.ts +8 -0
- package/src/agent/intent.ts +181 -0
- package/src/agent/streaming.ts +132 -0
- package/src/core/ai-engine.ts +437 -0
- package/src/core/cli.ts +171 -0
- package/src/core/config.ts +147 -0
- package/src/core/context-compactor.ts +245 -0
- package/src/core/hooks.ts +196 -0
- package/src/core/permissions.ts +308 -0
- package/src/core/session.ts +165 -0
- package/src/core/skills.ts +208 -0
- package/src/core/state.ts +120 -0
- package/src/core/subagent.ts +195 -0
- package/src/core/system-prompt.ts +163 -0
- package/src/core/tool-registry.ts +157 -0
- package/src/core/types.ts +280 -0
- package/src/index.ts +544 -0
- package/src/mcp/client.ts +330 -0
- package/src/repl/index.ts +8 -0
- package/src/repl/input.ts +139 -0
- package/src/repl/loop.ts +280 -0
- package/src/repl/output.ts +222 -0
- package/src/repl/welcome.ts +296 -0
- package/src/tools/file.ts +117 -0
- package/src/tools/git.ts +132 -0
- package/src/tools/index.ts +48 -0
- package/src/tools/search.ts +263 -0
- package/src/tools/shell.ts +181 -0
- package/src/utils/diff-preview.ts +202 -0
- package/src/utils/index.ts +8 -0
- package/src/utils/memory.ts +223 -0
- package/src/utils/project-context.ts +207 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent Recognition
|
|
3
|
+
* Identifies user intent: chat, code, command, or query
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface Intent {
|
|
7
|
+
type: 'chat' | 'code' | 'command' | 'query' | 'complex';
|
|
8
|
+
confidence: number;
|
|
9
|
+
reason?: string;
|
|
10
|
+
subTasks?: SubTask[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SubTask {
|
|
14
|
+
description: string;
|
|
15
|
+
action: string;
|
|
16
|
+
target?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Intent Recognition Prompt
|
|
21
|
+
*/
|
|
22
|
+
const INTENT_PROMPT = `Analyze the user message and identify their intent.
|
|
23
|
+
|
|
24
|
+
Intent types:
|
|
25
|
+
- "chat": General conversation, questions, small talk
|
|
26
|
+
- "code": Write, edit, refactor code
|
|
27
|
+
- "command": Execute shell commands, git operations
|
|
28
|
+
- "query": Search files, find information, read code
|
|
29
|
+
- "complex": Multiple actions needed - break into subtasks
|
|
30
|
+
|
|
31
|
+
Respond with JSON:
|
|
32
|
+
{
|
|
33
|
+
"type": "chat|code|command|query|complex",
|
|
34
|
+
"confidence": 0.0-1.0,
|
|
35
|
+
"reason": "brief explanation",
|
|
36
|
+
"subTasks": [{"description": "...", "action": "...", "target": "..."}] // only for complex
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
User message:`;
|
|
40
|
+
|
|
41
|
+
export class IntentRecognizer {
|
|
42
|
+
private ai: any;
|
|
43
|
+
|
|
44
|
+
constructor(aiEngine: any) {
|
|
45
|
+
this.ai = aiEngine;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Recognize intent from user message
|
|
50
|
+
*/
|
|
51
|
+
async recognize(message: string): Promise<Intent> {
|
|
52
|
+
// Fast path: simple keyword matching for common patterns
|
|
53
|
+
const fastIntent = this.fastRecognize(message);
|
|
54
|
+
if (fastIntent.confidence > 0.8) {
|
|
55
|
+
return fastIntent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Use AI for complex cases
|
|
59
|
+
return await this.aiRecognize(message);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Fast keyword-based recognition
|
|
64
|
+
*/
|
|
65
|
+
private fastRecognize(message: string): Intent {
|
|
66
|
+
const lower = message.toLowerCase().trim();
|
|
67
|
+
const words = lower.split(/\s+/);
|
|
68
|
+
|
|
69
|
+
// Command patterns
|
|
70
|
+
const commandPatterns = [
|
|
71
|
+
/^run\s+/, /^execute\s+/, /^exec\s+/,
|
|
72
|
+
/^npm\s+/, /^node\s+/, /^git\s+/,
|
|
73
|
+
/^pip\s+/, /^python\s+/, /^cargo\s+/,
|
|
74
|
+
/^make\s+/, /^docker\s+/, /^curl\s+/,
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
for (const pattern of commandPatterns) {
|
|
78
|
+
if (pattern.test(lower)) {
|
|
79
|
+
return { type: 'command', confidence: 0.9, reason: 'Command pattern detected' };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Code patterns
|
|
84
|
+
const codePatterns = [
|
|
85
|
+
/^write\s+/, /^create\s+.*file/i,
|
|
86
|
+
/^edit\s+/, /^modify\s+/, /^change\s+/,
|
|
87
|
+
/^refactor/i, /^implement/i,
|
|
88
|
+
/^add\s+.*function/i, /^add\s+.*class/i,
|
|
89
|
+
/\{[\s\S]*\}/, // Contains code block
|
|
90
|
+
/function\s+\w+\s*\(/,
|
|
91
|
+
/const\s+\w+\s*=/,
|
|
92
|
+
/let\s+\w+\s*=/,
|
|
93
|
+
/class\s+\w+/,
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
for (const pattern of codePatterns) {
|
|
97
|
+
if (pattern.test(message)) {
|
|
98
|
+
return { type: 'code', confidence: 0.85, reason: 'Code pattern detected' };
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Query patterns
|
|
103
|
+
const queryPatterns = [
|
|
104
|
+
/^find\s+/, /^search\s+/, /^grep\s+/,
|
|
105
|
+
/^show\s+.*files/i, /^list\s+.*files/i,
|
|
106
|
+
/^what\s+is\s+/, /^how\s+does\s+/,
|
|
107
|
+
/^explain\s+/, /^what's\s+in\s+/,
|
|
108
|
+
/^read\s+/, /^look\s+at\s+/,
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
for (const pattern of queryPatterns) {
|
|
112
|
+
if (pattern.test(lower)) {
|
|
113
|
+
return { type: 'query', confidence: 0.85, reason: 'Query pattern detected' };
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Complex task patterns (multiple actions)
|
|
118
|
+
const complexPatterns = [
|
|
119
|
+
/refactor.*and.*test/i,
|
|
120
|
+
/create.*and.*setup/i,
|
|
121
|
+
/build.*and.*deploy/i,
|
|
122
|
+
/fix.*and.*verify/i,
|
|
123
|
+
/migrate.*to/i,
|
|
124
|
+
/rewrite.*from/i,
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
for (const pattern of complexPatterns) {
|
|
128
|
+
if (pattern.test(lower)) {
|
|
129
|
+
return { type: 'complex', confidence: 0.8, reason: 'Multiple actions detected' };
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Default to chat
|
|
134
|
+
return { type: 'chat', confidence: 0.6, reason: 'Default intent' };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* AI-powered recognition for ambiguous cases
|
|
139
|
+
*/
|
|
140
|
+
private async aiRecognize(message: string): Promise<Intent> {
|
|
141
|
+
// For now, use fast recognition as fallback
|
|
142
|
+
// TODO: Implement AI-based recognition for complex cases
|
|
143
|
+
return this.fastRecognize(message);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Break complex task into subtasks
|
|
148
|
+
*/
|
|
149
|
+
async breakIntoSubtasks(message: string): Promise<SubTask[]> {
|
|
150
|
+
const lower = message.toLowerCase();
|
|
151
|
+
|
|
152
|
+
// Simple rule-based decomposition
|
|
153
|
+
const tasks: SubTask[] = [];
|
|
154
|
+
|
|
155
|
+
// "refactor X and add tests"
|
|
156
|
+
if (lower.includes('refactor') && lower.includes('test')) {
|
|
157
|
+
tasks.push({ description: 'Refactor code', action: 'code', target: 'refactor' });
|
|
158
|
+
tasks.push({ description: 'Add tests', action: 'code', target: 'test' });
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// "create X and setup Y"
|
|
162
|
+
if (lower.includes('create') && lower.includes('setup')) {
|
|
163
|
+
tasks.push({ description: 'Create component', action: 'code', target: 'create' });
|
|
164
|
+
tasks.push({ description: 'Setup configuration', action: 'command', target: 'setup' });
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// "fix X and verify"
|
|
168
|
+
if (lower.includes('fix') && (lower.includes('verify') || lower.includes('test'))) {
|
|
169
|
+
tasks.push({ description: 'Fix issue', action: 'code', target: 'fix' });
|
|
170
|
+
tasks.push({ description: 'Verify fix', action: 'command', target: 'test' });
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// If no decomposition rules matched, treat as single task
|
|
174
|
+
if (tasks.length === 0) {
|
|
175
|
+
const intent = this.fastRecognize(message);
|
|
176
|
+
tasks.push({ description: message, action: intent.type, target: message });
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return tasks;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming Output
|
|
3
|
+
* Handles real-time streaming output with typewriter effect
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
|
|
8
|
+
export type StreamCallback = (chunk: string) => void;
|
|
9
|
+
export type DoneCallback = (full: string) => void;
|
|
10
|
+
|
|
11
|
+
export class StreamingOutput {
|
|
12
|
+
private fullContent: string = '';
|
|
13
|
+
private isStreaming: boolean = false;
|
|
14
|
+
private onChunk?: StreamCallback;
|
|
15
|
+
private onDone?: DoneCallback;
|
|
16
|
+
private buffer: string = '';
|
|
17
|
+
private minChunkDelay: number = 10; // ms between chunks
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Start streaming mode
|
|
21
|
+
*/
|
|
22
|
+
start(callbacks?: { onChunk?: StreamCallback; onDone?: DoneCallback }): void {
|
|
23
|
+
this.fullContent = '';
|
|
24
|
+
this.isStreaming = true;
|
|
25
|
+
this.onChunk = callbacks?.onChunk;
|
|
26
|
+
this.onDone = callbacks?.onDone;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Process a chunk of content
|
|
31
|
+
*/
|
|
32
|
+
processChunk(chunk: string): void {
|
|
33
|
+
if (!this.isStreaming) return;
|
|
34
|
+
|
|
35
|
+
this.fullContent += chunk;
|
|
36
|
+
this.buffer += chunk;
|
|
37
|
+
|
|
38
|
+
// Flush buffer periodically
|
|
39
|
+
if (this.buffer.length > 0) {
|
|
40
|
+
const toPrint = this.buffer;
|
|
41
|
+
this.buffer = '';
|
|
42
|
+
|
|
43
|
+
if (this.onChunk) {
|
|
44
|
+
this.onChunk(toPrint);
|
|
45
|
+
} else {
|
|
46
|
+
process.stdout.write(toPrint);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* End streaming mode
|
|
53
|
+
*/
|
|
54
|
+
end(): string {
|
|
55
|
+
this.isStreaming = false;
|
|
56
|
+
|
|
57
|
+
// Flush remaining buffer
|
|
58
|
+
if (this.buffer.length > 0) {
|
|
59
|
+
if (this.onChunk) {
|
|
60
|
+
this.onChunk(this.buffer);
|
|
61
|
+
} else {
|
|
62
|
+
process.stdout.write(this.buffer);
|
|
63
|
+
}
|
|
64
|
+
this.buffer = '';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (this.onDone) {
|
|
68
|
+
this.onDone(this.fullContent);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return this.fullContent;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Stop streaming (for interrupt)
|
|
76
|
+
*/
|
|
77
|
+
stop(): string {
|
|
78
|
+
this.isStreaming = false;
|
|
79
|
+
return this.fullContent;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get full content so far
|
|
84
|
+
*/
|
|
85
|
+
getContent(): string {
|
|
86
|
+
return this.fullContent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Check if streaming
|
|
91
|
+
*/
|
|
92
|
+
isActive(): boolean {
|
|
93
|
+
return this.isStreaming;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Print with typewriter effect (for interactive mode)
|
|
98
|
+
*/
|
|
99
|
+
static async typewriter(
|
|
100
|
+
text: string,
|
|
101
|
+
delay: number = 20,
|
|
102
|
+
onChunk?: (chunk: string) => void
|
|
103
|
+
): Promise<void> {
|
|
104
|
+
for (let i = 0; i < text.length; i++) {
|
|
105
|
+
process.stdout.write(text[i]);
|
|
106
|
+
if (onChunk) onChunk(text[i]);
|
|
107
|
+
await new Promise(r => setTimeout(r, delay));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Print code block with syntax highlighting hint
|
|
113
|
+
*/
|
|
114
|
+
static printCodeBlock(code: string, language: string = ''): void {
|
|
115
|
+
const lines = code.split('\n');
|
|
116
|
+
const maxLen = Math.max(...lines.map(l => l.length), 60);
|
|
117
|
+
|
|
118
|
+
console.log(chalk.bgBlack.gray('┌' + '─'.repeat(Math.min(maxLen, 80)) + '┐'));
|
|
119
|
+
|
|
120
|
+
if (language) {
|
|
121
|
+
console.log(chalk.bgBlack.gray('│ ') + chalk.cyan(language) + chalk.bgBlack.gray(' '.repeat(Math.max(0, maxLen - language.length - 1))) + chalk.bgBlack.gray('│'));
|
|
122
|
+
console.log(chalk.bgBlack.gray('├' + '─'.repeat(Math.min(maxLen, 80)) + '┤'));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
for (const line of lines) {
|
|
126
|
+
const displayLine = line.length > maxLen ? line.substring(0, maxLen - 3) + '...' : line;
|
|
127
|
+
console.log(chalk.bgBlack('│ ') + displayLine + ' '.repeat(Math.max(0, maxLen - displayLine.length)) + chalk.bgBlack(' │'));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
console.log(chalk.bgBlack.gray('└' + '─'.repeat(Math.min(maxLen, 80)) + '┘'));
|
|
131
|
+
}
|
|
132
|
+
}
|