codeep 1.0.46 → 1.0.48
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.
|
@@ -21,8 +21,18 @@ export const AgentProgress = ({ isRunning, iteration, maxIterations, actions, cu
|
|
|
21
21
|
if (!isRunning && actions.length === 0) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
// Show last
|
|
25
|
-
const recentActions = actions.slice(-
|
|
24
|
+
// Show last 5 actions (more compact)
|
|
25
|
+
const recentActions = actions.slice(-5);
|
|
26
|
+
// Get current/last action for prominent display
|
|
27
|
+
const currentAction = actions.length > 0 ? actions[actions.length - 1] : null;
|
|
28
|
+
// Count actions by type
|
|
29
|
+
const actionCounts = {
|
|
30
|
+
reads: actions.filter(a => a.type === 'read').length,
|
|
31
|
+
writes: actions.filter(a => a.type === 'write').length,
|
|
32
|
+
edits: actions.filter(a => a.type === 'edit').length,
|
|
33
|
+
commands: actions.filter(a => a.type === 'command').length,
|
|
34
|
+
searches: actions.filter(a => a.type === 'search').length,
|
|
35
|
+
};
|
|
26
36
|
// Count file changes
|
|
27
37
|
const fileChanges = {
|
|
28
38
|
created: actions.filter(a => a.type === 'write' && a.result === 'success').length,
|
|
@@ -30,7 +40,48 @@ export const AgentProgress = ({ isRunning, iteration, maxIterations, actions, cu
|
|
|
30
40
|
deleted: actions.filter(a => a.type === 'delete' && a.result === 'success').length,
|
|
31
41
|
};
|
|
32
42
|
const totalFileChanges = fileChanges.created + fileChanges.modified + fileChanges.deleted;
|
|
33
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: dryRun ? 'yellow' : '#f02a30', padding: 1, marginY: 1, children: [_jsx(Box, { children: isRunning ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: dryRun ? 'yellow' : '#f02a30', children: ["[", SPINNER_FRAMES[spinnerFrame], "]"] }), _jsxs(Text, { color: dryRun ? 'yellow' : '#f02a30', bold: true, children: [' ', dryRun ? 'DRY RUN' : 'AGENT', ' '] }), _jsx(Text, { color: "gray", children: "|" }), _jsxs(Text, { color: "cyan", children: [" step ", iteration] }), _jsx(Text, { color: "gray", children: " | " }), _jsxs(Text, { color: "
|
|
43
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: dryRun ? 'yellow' : '#f02a30', padding: 1, marginY: 1, children: [_jsx(Box, { children: isRunning ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: dryRun ? 'yellow' : '#f02a30', children: ["[", SPINNER_FRAMES[spinnerFrame], "]"] }), _jsxs(Text, { color: dryRun ? 'yellow' : '#f02a30', bold: true, children: [' ', dryRun ? 'DRY RUN' : 'AGENT', ' '] }), _jsx(Text, { color: "gray", children: "|" }), _jsxs(Text, { color: "cyan", children: [" step ", iteration] }), _jsx(Text, { color: "gray", children: " | " }), actionCounts.reads > 0 && _jsxs(Text, { color: "blue", children: [actionCounts.reads, "R "] }), actionCounts.writes > 0 && _jsxs(Text, { color: "green", children: [actionCounts.writes, "W "] }), actionCounts.edits > 0 && _jsxs(Text, { color: "yellow", children: [actionCounts.edits, "E "] }), actionCounts.commands > 0 && _jsxs(Text, { color: "magenta", children: [actionCounts.commands, "C "] }), actionCounts.searches > 0 && _jsxs(Text, { color: "cyan", children: [actionCounts.searches, "S "] }), actions.length === 0 && _jsx(Text, { color: "gray", children: "0 actions" })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { color: "green", bold: true, children: "[DONE] " }), _jsx(Text, { children: "Agent completed" }), _jsx(Text, { color: "gray", children: " | " }), _jsxs(Text, { color: "white", children: [actions.length, " actions"] })] })) }), isRunning && currentAction && (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "white", bold: true, children: "Now: " }), _jsxs(Text, { color: getActionColor(currentAction.type), children: [getActionLabel(currentAction.type), " "] }), _jsx(Text, { color: "white", children: formatTarget(currentAction.target) })] })), _jsx(Text, { color: "gray", children: '─'.repeat(50) }), recentActions.length > 1 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "gray", dimColor: true, children: "Recent:" }), recentActions.slice(0, -1).map((action, i) => (_jsx(ActionItem, { action: action }, i)))] })), isRunning && totalFileChanges > 0 && (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "gray", children: "Changes: " }), fileChanges.created > 0 && _jsxs(Text, { color: "green", children: ["+", fileChanges.created, " "] }), fileChanges.modified > 0 && _jsxs(Text, { color: "yellow", children: ["~", fileChanges.modified, " "] }), fileChanges.deleted > 0 && _jsxs(Text, { color: "red", children: ["-", fileChanges.deleted] })] })), isRunning && currentThinking && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", wrap: "truncate-end", children: ["> ", currentThinking.slice(0, 80), currentThinking.length > 80 ? '...' : ''] }) })), isRunning && (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "gray", children: "Press " }), _jsx(Text, { color: "#f02a30", children: "Esc" }), _jsx(Text, { color: "gray", children: " to stop" })] })), !isRunning && totalFileChanges > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, children: "File Changes:" }), fileChanges.created > 0 && (_jsxs(Text, { color: "green", children: [" + ", fileChanges.created, " file(s) created"] })), fileChanges.modified > 0 && (_jsxs(Text, { color: "yellow", children: [" ~ ", fileChanges.modified, " file(s) modified"] })), fileChanges.deleted > 0 && (_jsxs(Text, { color: "red", children: [" - ", fileChanges.deleted, " file(s) deleted"] }))] }))] }));
|
|
44
|
+
};
|
|
45
|
+
// Helper functions for action display
|
|
46
|
+
const getActionColor = (type) => {
|
|
47
|
+
switch (type) {
|
|
48
|
+
case 'read': return 'blue';
|
|
49
|
+
case 'write': return 'green';
|
|
50
|
+
case 'edit': return 'yellow';
|
|
51
|
+
case 'delete': return 'red';
|
|
52
|
+
case 'command': return 'magenta';
|
|
53
|
+
case 'search': return 'cyan';
|
|
54
|
+
case 'list': return 'white';
|
|
55
|
+
case 'mkdir': return 'blue';
|
|
56
|
+
case 'fetch': return 'cyan';
|
|
57
|
+
default: return 'white';
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const getActionLabel = (type) => {
|
|
61
|
+
switch (type) {
|
|
62
|
+
case 'read': return 'Reading';
|
|
63
|
+
case 'write': return 'Creating';
|
|
64
|
+
case 'edit': return 'Editing';
|
|
65
|
+
case 'delete': return 'Deleting';
|
|
66
|
+
case 'command': return 'Running';
|
|
67
|
+
case 'search': return 'Searching';
|
|
68
|
+
case 'list': return 'Listing';
|
|
69
|
+
case 'mkdir': return 'Creating dir';
|
|
70
|
+
case 'fetch': return 'Fetching';
|
|
71
|
+
default: return type.toUpperCase();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const formatTarget = (target) => {
|
|
75
|
+
// For file paths, show just the filename or last part
|
|
76
|
+
if (target.includes('/')) {
|
|
77
|
+
const parts = target.split('/');
|
|
78
|
+
const filename = parts[parts.length - 1];
|
|
79
|
+
if (parts.length > 2) {
|
|
80
|
+
return `.../${parts[parts.length - 2]}/${filename}`;
|
|
81
|
+
}
|
|
82
|
+
return target.length > 50 ? '...' + target.slice(-47) : target;
|
|
83
|
+
}
|
|
84
|
+
return target.length > 50 ? target.slice(0, 47) + '...' : target;
|
|
34
85
|
};
|
|
35
86
|
/**
|
|
36
87
|
* Single action item display
|
|
@@ -39,39 +90,14 @@ const ActionItem = ({ action }) => {
|
|
|
39
90
|
const getStatusIndicator = () => {
|
|
40
91
|
switch (action.result) {
|
|
41
92
|
case 'success':
|
|
42
|
-
return _jsx(Text, { color: "green", children: "
|
|
93
|
+
return _jsx(Text, { color: "green", children: "\u2713" });
|
|
43
94
|
case 'error':
|
|
44
|
-
return _jsx(Text, { color: "red", children: "
|
|
45
|
-
default:
|
|
46
|
-
return _jsx(Text, { color: "yellow", children: "[..]" });
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
const getTypeInfo = () => {
|
|
50
|
-
switch (action.type) {
|
|
51
|
-
case 'read':
|
|
52
|
-
return { color: 'blue', label: 'READ' };
|
|
53
|
-
case 'write':
|
|
54
|
-
return { color: 'green', label: 'CREATE' };
|
|
55
|
-
case 'edit':
|
|
56
|
-
return { color: 'yellow', label: 'EDIT' };
|
|
57
|
-
case 'delete':
|
|
58
|
-
return { color: 'red', label: 'DELETE' };
|
|
59
|
-
case 'command':
|
|
60
|
-
return { color: 'magenta', label: 'EXEC' };
|
|
61
|
-
case 'search':
|
|
62
|
-
return { color: 'cyan', label: 'SEARCH' };
|
|
63
|
-
case 'list':
|
|
64
|
-
return { color: 'white', label: 'LIST' };
|
|
65
|
-
case 'mkdir':
|
|
66
|
-
return { color: 'blue', label: 'MKDIR' };
|
|
67
|
-
case 'fetch':
|
|
68
|
-
return { color: 'cyan', label: 'FETCH' };
|
|
95
|
+
return _jsx(Text, { color: "red", children: "\u2717" });
|
|
69
96
|
default:
|
|
70
|
-
return { color:
|
|
97
|
+
return _jsx(Text, { color: "yellow", children: "\u00B7" });
|
|
71
98
|
}
|
|
72
99
|
};
|
|
73
|
-
|
|
74
|
-
return (_jsxs(Text, { children: [getStatusIndicator(), ' ', _jsx(Text, { color: typeInfo.color, children: typeInfo.label.padEnd(6) }), ' ', _jsxs(Text, { children: [action.target.slice(0, 40), action.target.length > 40 ? '...' : ''] })] }));
|
|
100
|
+
return (_jsxs(Text, { children: [getStatusIndicator(), ' ', _jsx(Text, { color: getActionColor(action.type), children: getActionLabel(action.type).padEnd(10) }), ' ', _jsx(Text, { color: "gray", children: formatTarget(action.target) })] }));
|
|
75
101
|
};
|
|
76
102
|
export const AgentSummary = ({ success, iterations, actions, error, aborted, }) => {
|
|
77
103
|
const filesWritten = actions.filter(a => a.type === 'write' && a.result === 'success');
|
package/dist/components/Input.js
CHANGED
|
@@ -323,5 +323,5 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
|
|
|
323
323
|
const after = value.slice(cursorPos + 1);
|
|
324
324
|
return (_jsxs(Text, { children: [before, _jsx(Text, { backgroundColor: "white", color: "black", children: cursor }), after] }));
|
|
325
325
|
};
|
|
326
|
-
return (_jsxs(Box, { flexDirection: "column", children: [suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [suggestions.
|
|
326
|
+
return (_jsxs(Box, { flexDirection: "column", children: [suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [suggestions.map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, bold: i === selectedIndex, children: s.cmd }), _jsxs(Text, { color: i === selectedIndex ? undefined : 'gray', children: [" - ", s.desc] })] }, s.cmd))), _jsx(Text, { color: "gray", dimColor: true, children: "\u2191\u2193 navigate \u2022 Tab complete \u2022 Esc cancel" })] })), pasteInfo && (_jsx(Box, { borderStyle: "round", borderColor: "green", paddingX: 1, marginBottom: 1, flexDirection: "column", children: _jsxs(Text, { children: [_jsx(Text, { color: "green", bold: true, children: "\uD83D\uDCCB " }), _jsx(Text, { color: "white", bold: true, children: pasteInfo.chars }), _jsx(Text, { color: "gray", children: " chars" }), pasteInfo.lines > 1 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "gray", children: " \u2022 " }), _jsx(Text, { color: "white", bold: true, children: pasteInfo.lines }), _jsx(Text, { color: "gray", children: " lines" })] })), _jsx(Text, { color: "gray", dimColor: true, children: " (Enter send \u2022 Esc cancel)" })] }) })), _jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: '> ' }), disabled ? (_jsx(Text, { color: "yellow", children: "Agent working... (Esc to stop)" })) : (renderInput())] })] }));
|
|
327
327
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|