codeep 1.0.100 → 1.0.101
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/app.js +12 -1
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -92,6 +92,8 @@ export const App = () => {
|
|
|
92
92
|
const [agentThinking, setAgentThinking] = useState('');
|
|
93
93
|
const [agentResult, setAgentResult] = useState(null);
|
|
94
94
|
const [agentDryRun, setAgentDryRun] = useState(false);
|
|
95
|
+
// Track LiveCodeStream height to render placeholder after agent finishes (prevents ghost content)
|
|
96
|
+
const [lastStreamHeight, setLastStreamHeight] = useState(0);
|
|
95
97
|
// Load API keys for ALL providers on startup and check if current provider is configured
|
|
96
98
|
useEffect(() => {
|
|
97
99
|
loadAllApiKeys().then(() => {
|
|
@@ -190,6 +192,7 @@ export const App = () => {
|
|
|
190
192
|
clearCodeBlocks();
|
|
191
193
|
setAgentResult(null);
|
|
192
194
|
setAgentActions([]);
|
|
195
|
+
setLastStreamHeight(0);
|
|
193
196
|
const newSessId = startNewSession();
|
|
194
197
|
setSessionId(newSessId);
|
|
195
198
|
setClearInputTrigger(prev => prev + 1); // Trigger input clear
|
|
@@ -281,6 +284,7 @@ export const App = () => {
|
|
|
281
284
|
setAgentActions([]);
|
|
282
285
|
setAgentThinking('');
|
|
283
286
|
setAgentResult(null);
|
|
287
|
+
setLastStreamHeight(0);
|
|
284
288
|
setAgentDryRun(dryRun);
|
|
285
289
|
// Add user message
|
|
286
290
|
const userMessage = {
|
|
@@ -327,6 +331,12 @@ export const App = () => {
|
|
|
327
331
|
timestamp: Date.now(),
|
|
328
332
|
};
|
|
329
333
|
setAgentActions(prev => [...prev, actionLog]);
|
|
334
|
+
// Track stream height for ghost content cleanup
|
|
335
|
+
if (details) {
|
|
336
|
+
const lineCount = details.split('\n').length;
|
|
337
|
+
// LiveCodeStream shows: 1 header + lines + 1 loading indicator + 1 footer = ~lineCount + 3
|
|
338
|
+
setLastStreamHeight(Math.min(lineCount, 50) + 5);
|
|
339
|
+
}
|
|
330
340
|
},
|
|
331
341
|
onToolResult: (result, toolCall) => {
|
|
332
342
|
// Replace the last action with the complete one
|
|
@@ -387,6 +397,7 @@ export const App = () => {
|
|
|
387
397
|
if (agentResult) {
|
|
388
398
|
setAgentResult(null);
|
|
389
399
|
setAgentActions([]);
|
|
400
|
+
setLastStreamHeight(0);
|
|
390
401
|
}
|
|
391
402
|
// Validate input
|
|
392
403
|
const validation = validateInput(input);
|
|
@@ -1406,7 +1417,7 @@ export const App = () => {
|
|
|
1406
1417
|
// If we got here, we're in an unknown state - default to chat
|
|
1407
1418
|
return null;
|
|
1408
1419
|
}
|
|
1409
|
-
return (_jsxs(Box, { flexDirection: "column", children: [messages.length === 0 && !isLoading && _jsx(Logo, {}), messages.length === 0 && !isLoading && (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Box, { justifyContent: "center", children: _jsxs(Text, { children: ["Connected to ", _jsx(Text, { color: "#f02a30", children: config.get('model') }), ". Type ", _jsx(Text, { color: "#f02a30", children: "/help" }), " for commands."] }) }), _jsx(Text, { children: " " }), _jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "cyan", bold: true, children: "Welcome to Codeep - Your AI Coding Assistant" }) }), _jsx(Text, { children: " " }), _jsxs(Box, { flexDirection: "column", paddingX: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Ask questions about your code or request implementations"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Use ", _jsxs(Text, { color: "cyan", children: ["/agent ", '<task>'] }), " for autonomous task execution"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Type ", _jsx(Text, { color: "cyan", children: "/diff" }), " to review changes, ", _jsx(Text, { color: "cyan", children: "/commit" }), " to generate commit messages"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Configure settings with ", _jsx(Text, { color: "cyan", children: "/settings" }), " - enable Agent Mode for auto-execution"] })] }), _jsx(Text, { children: " " }), _jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "gray", children: "Start typing your message or use a command to begin..." }) }), _jsx(Text, { children: " " })] })), _jsx(MessageList, { messages: messages, streamingContent: streamingContent, scrollOffset: 0, terminalHeight: stdout.rows || 24 }, sessionId), isLoading && !isAgentRunning && _jsx(Loading, { isStreaming: !!streamingContent }), isAgentRunning ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(LiveCodeStream, { actions: agentActions, isRunning: true, terminalWidth: stdout?.columns || 80 }), _jsx(AgentProgress, { isRunning: true, iteration: agentIteration, maxIterations: 50, actions: agentActions, currentThinking: agentThinking, dryRun: agentDryRun })] }, "agent-running")) : agentResult ? (_jsx(Box, { flexDirection: "column", children: _jsx(AgentSummary, { success: agentResult.success, iterations: agentResult.iterations, actions: agentActions, error: agentResult.error, aborted: agentResult.aborted }) }, "agent-complete")) : null, pendingFileChanges.length > 0 && !isLoading && (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#f02a30", padding: 1, marginY: 1, children: [_jsxs(Text, { color: "#f02a30", bold: true, children: ["\u2713 Detected ", pendingFileChanges.length, " file change(s):"] }), pendingFileChanges.map((change, i) => {
|
|
1420
|
+
return (_jsxs(Box, { flexDirection: "column", children: [messages.length === 0 && !isLoading && _jsx(Logo, {}), messages.length === 0 && !isLoading && (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Box, { justifyContent: "center", children: _jsxs(Text, { children: ["Connected to ", _jsx(Text, { color: "#f02a30", children: config.get('model') }), ". Type ", _jsx(Text, { color: "#f02a30", children: "/help" }), " for commands."] }) }), _jsx(Text, { children: " " }), _jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "cyan", bold: true, children: "Welcome to Codeep - Your AI Coding Assistant" }) }), _jsx(Text, { children: " " }), _jsxs(Box, { flexDirection: "column", paddingX: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Ask questions about your code or request implementations"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Use ", _jsxs(Text, { color: "cyan", children: ["/agent ", '<task>'] }), " for autonomous task execution"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Type ", _jsx(Text, { color: "cyan", children: "/diff" }), " to review changes, ", _jsx(Text, { color: "cyan", children: "/commit" }), " to generate commit messages"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2022" }), " Configure settings with ", _jsx(Text, { color: "cyan", children: "/settings" }), " - enable Agent Mode for auto-execution"] })] }), _jsx(Text, { children: " " }), _jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "gray", children: "Start typing your message or use a command to begin..." }) }), _jsx(Text, { children: " " })] })), _jsx(MessageList, { messages: messages, streamingContent: streamingContent, scrollOffset: 0, terminalHeight: stdout.rows || 24 }, sessionId), isLoading && !isAgentRunning && _jsx(Loading, { isStreaming: !!streamingContent }), isAgentRunning ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(LiveCodeStream, { actions: agentActions, isRunning: true, terminalWidth: stdout?.columns || 80 }), _jsx(AgentProgress, { isRunning: true, iteration: agentIteration, maxIterations: 50, actions: agentActions, currentThinking: agentThinking, dryRun: agentDryRun })] }, "agent-running")) : agentResult ? (_jsxs(Box, { flexDirection: "column", children: [lastStreamHeight > 0 && (_jsx(Box, { flexDirection: "column", children: Array.from({ length: lastStreamHeight }).map((_, i) => (_jsx(Text, { children: " " }, i))) })), _jsx(AgentSummary, { success: agentResult.success, iterations: agentResult.iterations, actions: agentActions, error: agentResult.error, aborted: agentResult.aborted })] }, "agent-complete")) : null, pendingFileChanges.length > 0 && !isLoading && (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#f02a30", padding: 1, marginY: 1, children: [_jsxs(Text, { color: "#f02a30", bold: true, children: ["\u2713 Detected ", pendingFileChanges.length, " file change(s):"] }), pendingFileChanges.map((change, i) => {
|
|
1410
1421
|
const actionColor = change.action === 'delete' ? 'red' : change.action === 'edit' ? 'yellow' : 'green';
|
|
1411
1422
|
const actionLabel = change.action === 'delete' ? 'DELETE' : change.action === 'edit' ? 'EDIT' : 'CREATE';
|
|
1412
1423
|
return (_jsxs(Text, { children: ["\u2022 ", _jsxs(Text, { color: actionColor, children: ["[", actionLabel, "]"] }), " ", change.path, change.action !== 'delete' && change.content.includes('\n') && ` (${change.content.split('\n').length} lines)`] }, i));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.101",
|
|
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",
|