codeep 1.1.17 → 1.1.19
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.
- package/dist/renderer/App.d.ts +1 -0
- package/dist/renderer/App.js +49 -68
- package/dist/renderer/main.js +6 -0
- package/package.json +1 -1
package/dist/renderer/App.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export interface AppOptions {
|
|
|
21
21
|
onSubmit: (message: string) => Promise<void>;
|
|
22
22
|
onCommand: (command: string, args: string[]) => void;
|
|
23
23
|
onExit: () => void;
|
|
24
|
+
onStopAgent?: () => void;
|
|
24
25
|
getStatus: () => StatusInfo;
|
|
25
26
|
hasWriteAccess?: () => boolean;
|
|
26
27
|
hasProjectContext?: () => boolean;
|
package/dist/renderer/App.js
CHANGED
|
@@ -862,13 +862,17 @@ export class App {
|
|
|
862
862
|
this.handleMenuKey(event);
|
|
863
863
|
return;
|
|
864
864
|
}
|
|
865
|
-
// Escape to cancel streaming/loading or close autocomplete
|
|
865
|
+
// Escape to cancel streaming/loading/agent or close autocomplete
|
|
866
866
|
if (event.key === 'escape') {
|
|
867
867
|
if (this.showAutocomplete) {
|
|
868
868
|
this.showAutocomplete = false;
|
|
869
869
|
this.render();
|
|
870
870
|
return;
|
|
871
871
|
}
|
|
872
|
+
if (this.isAgentRunning && this.options.onStopAgent) {
|
|
873
|
+
this.options.onStopAgent();
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
872
876
|
if (this.isStreaming) {
|
|
873
877
|
this.endStreaming();
|
|
874
878
|
}
|
|
@@ -1561,7 +1565,7 @@ export class App {
|
|
|
1561
1565
|
bottomPanelHeight = previewLines + 6; // title + preview + extra line indicator + options
|
|
1562
1566
|
}
|
|
1563
1567
|
else if (this.isAgentRunning) {
|
|
1564
|
-
bottomPanelHeight =
|
|
1568
|
+
bottomPanelHeight = 5; // Agent progress box (4 lines + 1 margin)
|
|
1565
1569
|
}
|
|
1566
1570
|
else if (this.permissionOpen) {
|
|
1567
1571
|
bottomPanelHeight = 10; // Permission dialog
|
|
@@ -2168,7 +2172,6 @@ export class App {
|
|
|
2168
2172
|
renderInlineAgentProgress(startY, width) {
|
|
2169
2173
|
let y = startY;
|
|
2170
2174
|
const spinner = SPINNER_FRAMES[this.spinnerFrame];
|
|
2171
|
-
const boxWidth = width - 2; // Use full width minus small margin
|
|
2172
2175
|
// Calculate stats
|
|
2173
2176
|
const stats = {
|
|
2174
2177
|
reads: this.agentActions.filter(a => a.type === 'read').length,
|
|
@@ -2180,93 +2183,71 @@ export class App {
|
|
|
2180
2183
|
errors: this.agentActions.filter(a => a.result === 'error').length,
|
|
2181
2184
|
};
|
|
2182
2185
|
// 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
|
|
2191
2186
|
const title = ` ${spinner} AGENT `;
|
|
2192
|
-
const titlePadLeft =
|
|
2193
|
-
const titlePadRight =
|
|
2194
|
-
this.screen.write(0, y, '
|
|
2195
|
-
this.screen.write(titlePadLeft
|
|
2196
|
-
this.screen.write(titlePadLeft +
|
|
2187
|
+
const titlePadLeft = 2;
|
|
2188
|
+
const titlePadRight = width - titlePadLeft - title.length - 1;
|
|
2189
|
+
this.screen.write(0, y, '─'.repeat(titlePadLeft), PRIMARY_COLOR);
|
|
2190
|
+
this.screen.write(titlePadLeft, y, title, PRIMARY_COLOR + style.bold);
|
|
2191
|
+
this.screen.write(titlePadLeft + title.length, y, '─'.repeat(Math.max(0, titlePadRight)), PRIMARY_COLOR);
|
|
2197
2192
|
y++;
|
|
2198
|
-
// Current action line
|
|
2199
|
-
this.screen.write(0, y, '│', PRIMARY_COLOR);
|
|
2193
|
+
// Current action line (no side borders)
|
|
2200
2194
|
if (this.agentActions.length > 0) {
|
|
2201
2195
|
const lastAction = this.agentActions[this.agentActions.length - 1];
|
|
2202
2196
|
const actionLabel = this.getActionLabel(lastAction.type);
|
|
2203
2197
|
const actionColor = this.getActionColor(lastAction.type);
|
|
2204
|
-
const maxTargetLen =
|
|
2198
|
+
const maxTargetLen = width - actionLabel.length - 4;
|
|
2205
2199
|
const target = this.formatActionTarget(lastAction.target, maxTargetLen);
|
|
2206
|
-
this.screen.write(
|
|
2207
|
-
this.screen.write(
|
|
2200
|
+
this.screen.write(1, y, actionLabel, actionColor + style.bold);
|
|
2201
|
+
this.screen.write(1 + actionLabel.length + 1, y, target, fg.white);
|
|
2208
2202
|
}
|
|
2209
2203
|
else {
|
|
2210
|
-
this.screen.write(
|
|
2204
|
+
this.screen.write(1, y, 'Starting...', fg.gray);
|
|
2211
2205
|
}
|
|
2212
|
-
this.screen.write(boxWidth - 1, y, '│', PRIMARY_COLOR);
|
|
2213
2206
|
y++;
|
|
2214
|
-
//
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
// File changes line
|
|
2218
|
-
this.screen.write(0, y, '│', PRIMARY_COLOR);
|
|
2219
|
-
this.screen.write(2, y, 'Files:', fg.cyan);
|
|
2220
|
-
let fileX = 9;
|
|
2207
|
+
// Stats line: Files and step info
|
|
2208
|
+
let x = 1;
|
|
2209
|
+
// File changes
|
|
2221
2210
|
if (stats.writes > 0) {
|
|
2222
2211
|
const txt = `+${stats.writes}`;
|
|
2223
|
-
this.screen.write(
|
|
2224
|
-
|
|
2212
|
+
this.screen.write(x, y, txt, fg.green);
|
|
2213
|
+
x += txt.length + 1;
|
|
2225
2214
|
}
|
|
2226
2215
|
if (stats.edits > 0) {
|
|
2227
2216
|
const txt = `~${stats.edits}`;
|
|
2228
|
-
this.screen.write(
|
|
2229
|
-
|
|
2217
|
+
this.screen.write(x, y, txt, fg.yellow);
|
|
2218
|
+
x += txt.length + 1;
|
|
2230
2219
|
}
|
|
2231
2220
|
if (stats.deletes > 0) {
|
|
2232
2221
|
const txt = `-${stats.deletes}`;
|
|
2233
|
-
this.screen.write(
|
|
2234
|
-
|
|
2235
|
-
}
|
|
2236
|
-
if (stats.
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
if (stats.
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
if (i > 0) {
|
|
2255
|
-
this.screen.write(statX, y, '|', fg.gray);
|
|
2256
|
-
statX += 2;
|
|
2257
|
-
}
|
|
2258
|
-
this.screen.write(statX, y, statParts[i].text, statParts[i].color);
|
|
2259
|
-
statX += statParts[i].text.length + 1;
|
|
2260
|
-
}
|
|
2261
|
-
this.screen.write(boxWidth - 1, y, '│', PRIMARY_COLOR);
|
|
2222
|
+
this.screen.write(x, y, txt, fg.red);
|
|
2223
|
+
x += txt.length + 1;
|
|
2224
|
+
}
|
|
2225
|
+
if (stats.reads > 0) {
|
|
2226
|
+
const txt = `${stats.reads}R`;
|
|
2227
|
+
this.screen.write(x, y, txt, fg.blue);
|
|
2228
|
+
x += txt.length + 1;
|
|
2229
|
+
}
|
|
2230
|
+
if (stats.commands > 0) {
|
|
2231
|
+
const txt = `${stats.commands}C`;
|
|
2232
|
+
this.screen.write(x, y, txt, fg.magenta);
|
|
2233
|
+
x += txt.length + 1;
|
|
2234
|
+
}
|
|
2235
|
+
if (stats.searches > 0) {
|
|
2236
|
+
const txt = `${stats.searches}S`;
|
|
2237
|
+
this.screen.write(x, y, txt, fg.cyan);
|
|
2238
|
+
x += txt.length + 1;
|
|
2239
|
+
}
|
|
2240
|
+
// Step info on the right
|
|
2241
|
+
const stepText = `step ${this.agentIteration}`;
|
|
2242
|
+
this.screen.write(width - stepText.length - 1, y, stepText, fg.gray);
|
|
2262
2243
|
y++;
|
|
2263
2244
|
// Bottom border with help
|
|
2264
2245
|
const helpText = ' Esc to stop ';
|
|
2265
|
-
const helpPadLeft = Math.floor((
|
|
2266
|
-
const helpPadRight = Math.ceil((
|
|
2267
|
-
this.screen.write(0, y, '
|
|
2268
|
-
this.screen.write(helpPadLeft
|
|
2269
|
-
this.screen.write(helpPadLeft +
|
|
2246
|
+
const helpPadLeft = Math.floor((width - helpText.length) / 2);
|
|
2247
|
+
const helpPadRight = Math.ceil((width - helpText.length) / 2);
|
|
2248
|
+
this.screen.write(0, y, '─'.repeat(helpPadLeft), fg.gray);
|
|
2249
|
+
this.screen.write(helpPadLeft, y, helpText, fg.gray);
|
|
2250
|
+
this.screen.write(helpPadLeft + helpText.length, y, '─'.repeat(helpPadRight), fg.gray);
|
|
2270
2251
|
}
|
|
2271
2252
|
/**
|
|
2272
2253
|
* Get color for action type
|
package/dist/renderer/main.js
CHANGED
|
@@ -1504,6 +1504,12 @@ Commands (in chat):
|
|
|
1504
1504
|
console.log('\nGoodbye!');
|
|
1505
1505
|
process.exit(0);
|
|
1506
1506
|
},
|
|
1507
|
+
onStopAgent: () => {
|
|
1508
|
+
if (isAgentRunning && agentAbortController) {
|
|
1509
|
+
agentAbortController.abort();
|
|
1510
|
+
app.notify('Stopping agent...');
|
|
1511
|
+
}
|
|
1512
|
+
},
|
|
1507
1513
|
getStatus,
|
|
1508
1514
|
hasWriteAccess: () => hasWriteAccess,
|
|
1509
1515
|
hasProjectContext: () => projectContext !== null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.19",
|
|
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",
|