codeep 1.0.114 → 1.0.115

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.
@@ -147,6 +147,10 @@ const isSectionBreak = (line, prevLine) => {
147
147
  };
148
148
  const MAX_PREVIEW_LINES = 8; // Code preview lines (total box will be ~10 with header/footer)
149
149
  export const LiveCodeStream = memo(({ actions, isRunning, terminalWidth = 80 }) => {
150
+ // Find the current write/edit action for live preview
151
+ const currentAction = actions.length > 0 ? actions[actions.length - 1] : null;
152
+ const isCodeAction = currentAction && (currentAction.type === 'write' || currentAction.type === 'edit');
153
+ // ALL HOOKS MUST BE CALLED BEFORE ANY EARLY RETURNS (Rules of Hooks)
150
154
  // Calculate statistics from all actions
151
155
  const stats = useMemo(() => {
152
156
  const filesCreated = actions.filter(a => a.type === 'write' && a.result === 'success');
@@ -174,19 +178,16 @@ export const LiveCodeStream = memo(({ actions, isRunning, terminalWidth = 80 })
174
178
  editedFiles: filesEdited.map(a => a.target.split('/').pop() || a.target),
175
179
  };
176
180
  }, [actions]);
177
- // Find the current write/edit action for live preview
178
- const currentAction = actions.length > 0 ? actions[actions.length - 1] : null;
179
- const isCodeAction = currentAction && (currentAction.type === 'write' || currentAction.type === 'edit');
180
- // Don't render anything if no actions yet (agent just started)
181
- if (actions.length === 0) {
182
- return null;
183
- }
184
181
  // Get code lines for preview
185
182
  const codeLines = useMemo(() => {
186
183
  if (!isCodeAction || !currentAction?.details)
187
184
  return [];
188
185
  return currentAction.details.split('\n');
189
186
  }, [isCodeAction, currentAction?.details]);
187
+ // Don't render anything if no actions yet (agent just started)
188
+ if (actions.length === 0) {
189
+ return null;
190
+ }
190
191
  const filename = currentAction?.target.split('/').pop() || '';
191
192
  const ext = getFileExtension(filename);
192
193
  const langLabel = getLanguageLabel(ext);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.114",
3
+ "version": "1.0.115",
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",