codeep 1.1.16 → 1.1.17

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.
@@ -473,9 +473,11 @@ export class App {
473
473
  this.agentIteration = 0;
474
474
  this.agentActions = [];
475
475
  this.agentThinking = '';
476
+ this.isLoading = false; // Clear loading state when agent takes over
476
477
  this.startSpinner();
477
478
  }
478
479
  else {
480
+ this.isLoading = false; // Ensure loading is cleared when agent finishes
479
481
  this.stopSpinner();
480
482
  }
481
483
  this.render();
@@ -1559,7 +1561,7 @@ export class App {
1559
1561
  bottomPanelHeight = previewLines + 6; // title + preview + extra line indicator + options
1560
1562
  }
1561
1563
  else if (this.isAgentRunning) {
1562
- bottomPanelHeight = 8; // Agent progress box
1564
+ bottomPanelHeight = 6; // Agent progress box (5 lines + 1 margin)
1563
1565
  }
1564
1566
  else if (this.permissionOpen) {
1565
1567
  bottomPanelHeight = 10; // Permission dialog
@@ -2166,7 +2168,7 @@ export class App {
2166
2168
  renderInlineAgentProgress(startY, width) {
2167
2169
  let y = startY;
2168
2170
  const spinner = SPINNER_FRAMES[this.spinnerFrame];
2169
- const boxWidth = Math.min(width - 4, 60);
2171
+ const boxWidth = width - 2; // Use full width minus small margin
2170
2172
  // Calculate stats
2171
2173
  const stats = {
2172
2174
  reads: this.agentActions.filter(a => a.type === 'read').length,
@@ -2178,58 +2180,67 @@ export class App {
2178
2180
  errors: this.agentActions.filter(a => a.result === 'error').length,
2179
2181
  };
2180
2182
  // Top border with title
2183
+ // Helper to draw a box line with content
2184
+ const drawBoxLine = (content, contentStyle = fg.white) => {
2185
+ this.screen.write(0, y, '│', PRIMARY_COLOR);
2186
+ this.screen.write(2, y, content, contentStyle);
2187
+ this.screen.write(boxWidth - 1, y, '│', PRIMARY_COLOR);
2188
+ y++;
2189
+ };
2190
+ // Top border with title
2181
2191
  const title = ` ${spinner} AGENT `;
2182
- const borderLeft = '╭' + '─'.repeat(2);
2183
- const borderRight = '─'.repeat(Math.max(0, boxWidth - title.length - 4)) + '╮';
2184
- this.screen.write(0, y, borderLeft, PRIMARY_COLOR);
2185
- this.screen.write(borderLeft.length, y, title, PRIMARY_COLOR + style.bold);
2186
- this.screen.write(borderLeft.length + title.length, y, borderRight, PRIMARY_COLOR);
2192
+ const titlePadLeft = 3;
2193
+ const titlePadRight = boxWidth - titlePadLeft - title.length - 1;
2194
+ this.screen.write(0, y, '╭' + '─'.repeat(titlePadLeft), PRIMARY_COLOR);
2195
+ this.screen.write(titlePadLeft + 1, y, title, PRIMARY_COLOR + style.bold);
2196
+ this.screen.write(titlePadLeft + 1 + title.length, y, '─'.repeat(Math.max(0, titlePadRight)) + '╮', PRIMARY_COLOR);
2187
2197
  y++;
2188
2198
  // Current action line
2189
- this.screen.write(0, y, '│ ', PRIMARY_COLOR);
2199
+ this.screen.write(0, y, '│', PRIMARY_COLOR);
2190
2200
  if (this.agentActions.length > 0) {
2191
2201
  const lastAction = this.agentActions[this.agentActions.length - 1];
2192
2202
  const actionLabel = this.getActionLabel(lastAction.type);
2193
2203
  const actionColor = this.getActionColor(lastAction.type);
2194
- const target = this.formatActionTarget(lastAction.target, boxWidth - actionLabel.length - 6);
2195
- this.screen.write(2, y, actionLabel + ' ', actionColor + style.bold);
2204
+ const maxTargetLen = boxWidth - actionLabel.length - 6;
2205
+ const target = this.formatActionTarget(lastAction.target, maxTargetLen);
2206
+ this.screen.write(2, y, actionLabel, actionColor + style.bold);
2196
2207
  this.screen.write(2 + actionLabel.length + 1, y, target, fg.white);
2197
2208
  }
2198
2209
  else {
2199
2210
  this.screen.write(2, y, 'Starting...', fg.gray);
2200
2211
  }
2201
- this.screen.write(boxWidth - 1, y, ' │', PRIMARY_COLOR);
2212
+ this.screen.write(boxWidth - 1, y, '│', PRIMARY_COLOR);
2202
2213
  y++;
2203
2214
  // Separator
2204
2215
  this.screen.write(0, y, '├' + '─'.repeat(boxWidth - 2) + '┤', fg.gray);
2205
2216
  y++;
2206
2217
  // File changes line
2207
- this.screen.write(0, y, '│ ', PRIMARY_COLOR);
2208
- this.screen.write(2, y, 'Files: ', fg.cyan);
2218
+ this.screen.write(0, y, '│', PRIMARY_COLOR);
2219
+ this.screen.write(2, y, 'Files:', fg.cyan);
2209
2220
  let fileX = 9;
2210
2221
  if (stats.writes > 0) {
2211
- const txt = `+${stats.writes} `;
2222
+ const txt = `+${stats.writes}`;
2212
2223
  this.screen.write(fileX, y, txt, fg.green);
2213
- fileX += txt.length;
2224
+ fileX += txt.length + 1;
2214
2225
  }
2215
2226
  if (stats.edits > 0) {
2216
- const txt = `~${stats.edits} `;
2227
+ const txt = `~${stats.edits}`;
2217
2228
  this.screen.write(fileX, y, txt, fg.yellow);
2218
- fileX += txt.length;
2229
+ fileX += txt.length + 1;
2219
2230
  }
2220
2231
  if (stats.deletes > 0) {
2221
- const txt = `-${stats.deletes} `;
2232
+ const txt = `-${stats.deletes}`;
2222
2233
  this.screen.write(fileX, y, txt, fg.red);
2223
- fileX += txt.length;
2234
+ fileX += txt.length + 1;
2224
2235
  }
2225
2236
  if (stats.writes === 0 && stats.edits === 0 && stats.deletes === 0) {
2226
2237
  this.screen.write(fileX, y, 'no changes yet', fg.gray);
2227
2238
  }
2228
- this.screen.write(boxWidth - 1, y, ' │', PRIMARY_COLOR);
2239
+ this.screen.write(boxWidth - 1, y, '│', PRIMARY_COLOR);
2229
2240
  y++;
2230
2241
  // Stats line
2231
- this.screen.write(0, y, '│ ', PRIMARY_COLOR);
2232
- this.screen.write(2, y, 'Stats: ', fg.cyan);
2242
+ this.screen.write(0, y, '│', PRIMARY_COLOR);
2243
+ this.screen.write(2, y, 'Stats:', fg.cyan);
2233
2244
  let statX = 9;
2234
2245
  const statParts = [];
2235
2246
  if (stats.reads > 0)
@@ -2241,34 +2252,21 @@ export class App {
2241
2252
  statParts.push({ text: `step ${this.agentIteration}`, color: fg.white });
2242
2253
  for (let i = 0; i < statParts.length; i++) {
2243
2254
  if (i > 0) {
2244
- this.screen.write(statX, y, ' | ', fg.gray);
2245
- statX += 3;
2255
+ this.screen.write(statX, y, '|', fg.gray);
2256
+ statX += 2;
2246
2257
  }
2247
2258
  this.screen.write(statX, y, statParts[i].text, statParts[i].color);
2248
- statX += statParts[i].text.length;
2259
+ statX += statParts[i].text.length + 1;
2249
2260
  }
2250
- this.screen.write(boxWidth - 1, y, ' │', PRIMARY_COLOR);
2251
- y++;
2252
- // Errors line (if any)
2253
- this.screen.write(0, y, '│ ', PRIMARY_COLOR);
2254
- if (stats.errors > 0) {
2255
- this.screen.write(2, y, `${stats.errors} error(s)`, fg.red);
2256
- }
2257
- else if (this.agentThinking) {
2258
- const thinking = this.agentThinking.length > boxWidth - 6
2259
- ? this.agentThinking.slice(0, boxWidth - 9) + '...'
2260
- : this.agentThinking;
2261
- this.screen.write(2, y, '> ' + thinking, fg.gray);
2262
- }
2263
- this.screen.write(boxWidth - 1, y, ' │', PRIMARY_COLOR);
2261
+ this.screen.write(boxWidth - 1, y, '│', PRIMARY_COLOR);
2264
2262
  y++;
2265
2263
  // Bottom border with help
2266
2264
  const helpText = ' Esc to stop ';
2267
- const bottomLeft = '╰' + '─'.repeat(Math.floor((boxWidth - helpText.length - 2) / 2));
2268
- const bottomRight = '─'.repeat(Math.ceil((boxWidth - helpText.length - 2) / 2)) + '╯';
2269
- this.screen.write(0, y, bottomLeft, PRIMARY_COLOR);
2270
- this.screen.write(bottomLeft.length, y, helpText, fg.gray);
2271
- this.screen.write(bottomLeft.length + helpText.length, y, bottomRight, PRIMARY_COLOR);
2265
+ const helpPadLeft = Math.floor((boxWidth - helpText.length - 2) / 2);
2266
+ const helpPadRight = Math.ceil((boxWidth - helpText.length - 2) / 2);
2267
+ this.screen.write(0, y, '╰' + '─'.repeat(helpPadLeft), PRIMARY_COLOR);
2268
+ this.screen.write(helpPadLeft + 1, y, helpText, fg.gray);
2269
+ this.screen.write(helpPadLeft + 1 + helpText.length, y, '─'.repeat(helpPadRight) + '╯', PRIMARY_COLOR);
2272
2270
  }
2273
2271
  /**
2274
2272
  * Get color for action type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
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",