codeep 1.0.100 → 1.0.102

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.
Files changed (2) hide show
  1. package/dist/app.js +21 -1
  2. package/package.json +1 -1
package/dist/app.js CHANGED
@@ -92,6 +92,17 @@ 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);
97
+ // Clear placeholder height after agent finishes (let it overwrite ghost, then disappear)
98
+ useEffect(() => {
99
+ if (agentResult && lastStreamHeight > 0) {
100
+ const timer = setTimeout(() => {
101
+ setLastStreamHeight(0);
102
+ }, 100); // Short delay to allow one render cycle to overwrite ghost
103
+ return () => clearTimeout(timer);
104
+ }
105
+ }, [agentResult, lastStreamHeight]);
95
106
  // Load API keys for ALL providers on startup and check if current provider is configured
96
107
  useEffect(() => {
97
108
  loadAllApiKeys().then(() => {
@@ -190,6 +201,7 @@ export const App = () => {
190
201
  clearCodeBlocks();
191
202
  setAgentResult(null);
192
203
  setAgentActions([]);
204
+ setLastStreamHeight(0);
193
205
  const newSessId = startNewSession();
194
206
  setSessionId(newSessId);
195
207
  setClearInputTrigger(prev => prev + 1); // Trigger input clear
@@ -281,6 +293,7 @@ export const App = () => {
281
293
  setAgentActions([]);
282
294
  setAgentThinking('');
283
295
  setAgentResult(null);
296
+ setLastStreamHeight(0);
284
297
  setAgentDryRun(dryRun);
285
298
  // Add user message
286
299
  const userMessage = {
@@ -327,6 +340,12 @@ export const App = () => {
327
340
  timestamp: Date.now(),
328
341
  };
329
342
  setAgentActions(prev => [...prev, actionLog]);
343
+ // Track stream height for ghost content cleanup
344
+ if (details) {
345
+ const lineCount = details.split('\n').length;
346
+ // LiveCodeStream shows: 1 header + lines + 1 loading indicator + 1 footer = ~lineCount + 3
347
+ setLastStreamHeight(Math.min(lineCount, 50) + 5);
348
+ }
330
349
  },
331
350
  onToolResult: (result, toolCall) => {
332
351
  // Replace the last action with the complete one
@@ -387,6 +406,7 @@ export const App = () => {
387
406
  if (agentResult) {
388
407
  setAgentResult(null);
389
408
  setAgentActions([]);
409
+ setLastStreamHeight(0);
390
410
  }
391
411
  // Validate input
392
412
  const validation = validateInput(input);
@@ -1406,7 +1426,7 @@ export const App = () => {
1406
1426
  // If we got here, we're in an unknown state - default to chat
1407
1427
  return null;
1408
1428
  }
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) => {
1429
+ 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
1430
  const actionColor = change.action === 'delete' ? 'red' : change.action === 'edit' ? 'yellow' : 'green';
1411
1431
  const actionLabel = change.action === 'delete' ? 'DELETE' : change.action === 'edit' ? 'EDIT' : 'CREATE';
1412
1432
  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.100",
3
+ "version": "1.0.102",
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",