codeep 1.1.11 → 1.1.12

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.
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Agent Actions component using Static to prevent re-rendering/jumping
2
+ * Agent Actions component - displays actions in the chat area
3
+ * Removed Static component as it renders at top of terminal
3
4
  */
4
5
  import React from 'react';
5
6
  import { ActionLog } from '../utils/tools';
@@ -10,10 +11,8 @@ interface AgentActionsProps {
10
11
  dryRun?: boolean;
11
12
  }
12
13
  /**
13
- * Agent Actions display using Static component
14
- *
15
- * Static renders items once and never re-renders them,
16
- * preventing terminal jumping when new actions are added.
14
+ * Agent Actions display - renders in chat area
15
+ * Shows only the last few actions to prevent too much jumping
17
16
  */
18
17
  export declare const AgentActions: React.FC<AgentActionsProps>;
19
18
  export {};
@@ -1,9 +1,10 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /**
3
- * Agent Actions component using Static to prevent re-rendering/jumping
3
+ * Agent Actions component - displays actions in the chat area
4
+ * Removed Static component as it renders at top of terminal
4
5
  */
5
6
  import { useState, useEffect, memo } from 'react';
6
- import { Box, Text, Static } from 'ink';
7
+ import { Box, Text } from 'ink';
7
8
  // Spinner frames
8
9
  const SPINNER_FRAMES = ['/', '-', '\\', '|'];
9
10
  /**
@@ -100,22 +101,22 @@ const ActionLine = memo(({ action }) => {
100
101
  });
101
102
  ActionLine.displayName = 'ActionLine';
102
103
  /**
103
- * Agent Actions display using Static component
104
- *
105
- * Static renders items once and never re-renders them,
106
- * preventing terminal jumping when new actions are added.
104
+ * Agent Actions display - renders in chat area
105
+ * Shows only the last few actions to prevent too much jumping
107
106
  */
108
107
  export const AgentActions = memo(({ actions, isRunning, currentStep, dryRun, }) => {
109
108
  const color = dryRun ? 'yellow' : '#f02a30';
110
109
  const label = dryRun ? 'DRY RUN' : 'AGENT';
111
- // Get completed actions (all except potentially the last one if still pending)
110
+ // Only show last 5 completed actions to minimize re-render area
111
+ const MAX_VISIBLE_ACTIONS = 5;
112
112
  const completedActions = actions.filter(a => a.result === 'success' || a.result === 'error');
113
+ const visibleActions = completedActions.slice(-MAX_VISIBLE_ACTIONS);
114
+ const hiddenCount = completedActions.length - visibleActions.length;
113
115
  // Current action (last one if result is pending or the running state)
114
116
  const currentAction = actions.length > 0 ? actions[actions.length - 1] : null;
115
- const isCurrentPending = currentAction && currentAction.result !== 'success' && currentAction.result !== 'error';
116
117
  if (!isRunning && actions.length === 0) {
117
118
  return null;
118
119
  }
119
- return (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Static, { items: completedActions.map((a, i) => ({ ...a, id: `action-${i}-${a.timestamp}` })), children: (action) => (_jsx(ActionLine, { action: action }, action.id)) }), isRunning && (_jsxs(Box, { children: [_jsx(Spinner, { color: color }), _jsxs(Text, { color: color, bold: true, children: [" ", label, " "] }), _jsxs(Text, { color: "cyan", children: ["Step ", currentStep] }), currentAction && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "gray", children: " | " }), _jsx(Text, { children: formatAction(currentAction).text })] }))] }))] }));
120
+ return (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [hiddenCount > 0 && (_jsxs(Text, { color: "gray", children: ["... ", hiddenCount, " earlier action(s) ..."] })), visibleActions.map((action, i) => (_jsx(ActionLine, { action: action }, `action-${hiddenCount + i}-${action.timestamp}`))), isRunning && (_jsxs(Box, { children: [_jsx(Spinner, { color: color }), _jsxs(Text, { color: color, bold: true, children: [" ", label, " "] }), _jsxs(Text, { color: "cyan", children: ["Step ", currentStep] }), currentAction && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "gray", children: " | " }), _jsx(Text, { children: formatAction(currentAction).text })] }))] }))] }));
120
121
  });
121
122
  AgentActions.displayName = 'AgentActions';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
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",