codeep 1.0.61 → 1.0.62

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.
@@ -13,9 +13,8 @@ interface AgentProgressProps {
13
13
  }
14
14
  export declare const AgentProgress: React.FC<AgentProgressProps>;
15
15
  /**
16
- * Live Code Stream component - shows ALL code being written/edited by agent
17
- * Displayed ABOVE the AgentProgress component
18
- * Enhanced with better syntax highlighting and visual organization
16
+ * Live Code Stream component - shows code being written/edited by agent
17
+ * FIXED HEIGHT to prevent layout shift and empty lines
19
18
  */
20
19
  interface LiveCodeStreamProps {
21
20
  actions: ActionLog[];
@@ -139,6 +139,7 @@ const isSectionBreak = (line, prevLine) => {
139
139
  }
140
140
  return false;
141
141
  };
142
+ const LIVE_CODE_LINES = 8; // Fixed number of visible lines
142
143
  export const LiveCodeStream = ({ actions, isRunning }) => {
143
144
  // Find the current write/edit action with code content
144
145
  const currentAction = actions.length > 0 ? actions[actions.length - 1] : null;
@@ -158,12 +159,19 @@ export const LiveCodeStream = ({ actions, isRunning }) => {
158
159
  const totalLines = allLines.length;
159
160
  const actionLabel = currentAction.type === 'write' ? '✨ Creating' : '✏️ Editing';
160
161
  const actionColor = currentAction.type === 'write' ? 'green' : 'yellow';
161
- // Show last 10 lines (most recent code being written)
162
- const WINDOW_SIZE = 10;
163
- const startLine = Math.max(0, totalLines - WINDOW_SIZE);
164
- const linesToShow = allLines.slice(startLine, totalLines);
165
- const linesAbove = startLine;
166
- return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { color: actionColor, bold: true, children: [actionLabel, " "] }), _jsx(Text, { color: "white", bold: true, children: filename }), _jsxs(Text, { color: "gray", children: [" \u2022 ", langLabel, " \u2022 "] }), _jsx(Text, { color: "cyan", children: totalLines }), _jsx(Text, { color: "gray", children: " lines" })] }), _jsx(Text, { color: actionColor, children: '─'.repeat(76) }), linesAbove > 0 && (_jsxs(Text, { color: "gray", dimColor: true, children: [" \u22EE ", linesAbove, " lines above"] })), linesToShow.map((line, i) => (_jsxs(Text, { children: [_jsxs(Text, { color: "gray", dimColor: true, children: [String(startLine + i + 1).padStart(4, ' '), " \u2502", ' '] }), _jsx(Text, { color: getCodeColor(line, ext), children: line.slice(0, 68) }), line.length > 68 && _jsx(Text, { color: "gray", children: "\u2026" })] }, `line-${startLine + i}`))), _jsx(Text, { color: actionColor, children: '─'.repeat(76) })] }));
162
+ // Show last N lines (sliding window)
163
+ const startLine = Math.max(0, totalLines - LIVE_CODE_LINES);
164
+ const visibleLines = allLines.slice(startLine, totalLines);
165
+ // Pad to fixed height to prevent layout shift
166
+ const paddedLines = [...visibleLines];
167
+ while (paddedLines.length < LIVE_CODE_LINES) {
168
+ paddedLines.push('');
169
+ }
170
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsxs(Text, { color: actionColor, bold: true, children: [actionLabel, " "] }), _jsx(Text, { color: "white", bold: true, children: filename }), _jsxs(Text, { color: "gray", children: [" \u2022 ", langLabel, " \u2022 "] }), _jsx(Text, { color: "cyan", children: totalLines }), _jsx(Text, { color: "gray", children: " lines" }), startLine > 0 && _jsxs(Text, { color: "gray", dimColor: true, children: [" (showing ", startLine + 1, "-", totalLines, ")"] })] }), paddedLines.map((line, i) => {
171
+ const lineNum = startLine + i + 1;
172
+ const isRealLine = i < visibleLines.length;
173
+ return (_jsxs(Text, { children: [_jsxs(Text, { color: "gray", dimColor: true, children: [isRealLine ? String(lineNum).padStart(4, ' ') : ' ', " \u2502", ' '] }), isRealLine ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: getCodeColor(line, ext), children: line.slice(0, 70) }), line.length > 70 && _jsx(Text, { color: "gray", children: "\u2026" })] })) : (_jsx(Text, { children: " " }))] }, `fixed-line-${i}`));
174
+ })] }));
167
175
  };
168
176
  // Helper functions for action display
169
177
  const getActionColor = (type) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
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",