codeep 1.2.53 → 1.2.54
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/acp/server.js +8 -22
- package/dist/acp/session.js +15 -11
- package/package.json +1 -1
package/dist/acp/server.js
CHANGED
|
@@ -204,6 +204,7 @@ export function startAcpServer() {
|
|
|
204
204
|
abortController: null,
|
|
205
205
|
currentModeId: 'auto',
|
|
206
206
|
titleSent: false,
|
|
207
|
+
hadHistory: history.length > 0,
|
|
207
208
|
});
|
|
208
209
|
const result = {
|
|
209
210
|
sessionId: acpSessionId,
|
|
@@ -255,6 +256,7 @@ export function startAcpServer() {
|
|
|
255
256
|
addedFiles: new Map(),
|
|
256
257
|
abortController: null,
|
|
257
258
|
titleSent: false,
|
|
259
|
+
hadHistory: history.length > 0,
|
|
258
260
|
currentModeId: 'auto',
|
|
259
261
|
});
|
|
260
262
|
const result = {
|
|
@@ -406,18 +408,10 @@ export function startAcpServer() {
|
|
|
406
408
|
},
|
|
407
409
|
});
|
|
408
410
|
}
|
|
409
|
-
//
|
|
410
|
-
if (!session.titleSent) {
|
|
411
|
+
// Update title with first real prompt if session had no history
|
|
412
|
+
if (!session.titleSent && !session.hadHistory) {
|
|
411
413
|
session.titleSent = true;
|
|
412
|
-
|
|
413
|
-
transport.notify('session/update', {
|
|
414
|
-
sessionId: params.sessionId,
|
|
415
|
-
update: {
|
|
416
|
-
sessionUpdate: 'session_info_update',
|
|
417
|
-
title,
|
|
418
|
-
updatedAt: new Date().toISOString(),
|
|
419
|
-
},
|
|
420
|
-
});
|
|
414
|
+
sendSessionTitle(params.sessionId, [{ role: 'user', content: prompt }]);
|
|
421
415
|
}
|
|
422
416
|
transport.respond(msg.id, { stopReason: 'end_turn' });
|
|
423
417
|
return;
|
|
@@ -482,18 +476,10 @@ export function startAcpServer() {
|
|
|
482
476
|
session.history.push({ role: 'assistant', content: agentResponse });
|
|
483
477
|
}
|
|
484
478
|
autoSaveSession(session.history, session.workspaceRoot);
|
|
485
|
-
//
|
|
486
|
-
if (!session.titleSent) {
|
|
479
|
+
// Update title with first real prompt if session had no history
|
|
480
|
+
if (!session.titleSent && !session.hadHistory) {
|
|
487
481
|
session.titleSent = true;
|
|
488
|
-
|
|
489
|
-
transport.notify('session/update', {
|
|
490
|
-
sessionId: params.sessionId,
|
|
491
|
-
update: {
|
|
492
|
-
sessionUpdate: 'session_info_update',
|
|
493
|
-
title,
|
|
494
|
-
updatedAt: new Date().toISOString(),
|
|
495
|
-
},
|
|
496
|
-
});
|
|
482
|
+
sendSessionTitle(params.sessionId, [{ role: 'user', content: prompt }]);
|
|
497
483
|
}
|
|
498
484
|
transport.respond(msg.id, { stopReason: 'end_turn' });
|
|
499
485
|
}).catch((err) => {
|
package/dist/acp/session.js
CHANGED
|
@@ -24,18 +24,22 @@ export function buildProjectContext(workspaceRoot) {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
// Maps internal tool names to ACP tool_call kind values and human titles.
|
|
27
|
-
function toolCallMeta(toolName, params) {
|
|
27
|
+
function toolCallMeta(toolName, params, workspaceRoot) {
|
|
28
28
|
const file = params.path ?? params.file ?? '';
|
|
29
|
-
|
|
29
|
+
// Use full path for edit tools (Zed renders it as a clickable file link)
|
|
30
|
+
const absFile = file
|
|
31
|
+
? (isAbsolute(file) ? file : join(workspaceRoot, file))
|
|
32
|
+
: '';
|
|
33
|
+
const basename = absFile ? absFile.split('/').pop() ?? '' : '';
|
|
30
34
|
switch (toolName) {
|
|
31
|
-
case 'read_file': return { kind: 'read', title: `Reading${
|
|
32
|
-
case 'write_file': return { kind: 'edit', title: `
|
|
33
|
-
case 'edit_file': return { kind: 'edit', title: `
|
|
34
|
-
case 'delete_file': return { kind: 'delete', title: `Deleting${
|
|
35
|
-
case 'move_file': return { kind: 'move', title: `Moving${
|
|
36
|
-
case 'list_files': return { kind: 'read', title: `Listing files${
|
|
37
|
-
case 'search_files': return { kind: 'search', title: `Searching${
|
|
38
|
-
case 'run_command': return { kind: 'execute', title:
|
|
35
|
+
case 'read_file': return { kind: 'read', title: `Reading ${basename}` };
|
|
36
|
+
case 'write_file': return { kind: 'edit', title: absFile ? `Edit ${absFile}` : 'Writing file' };
|
|
37
|
+
case 'edit_file': return { kind: 'edit', title: absFile ? `Edit ${absFile}` : 'Editing file' };
|
|
38
|
+
case 'delete_file': return { kind: 'delete', title: `Deleting ${basename}` };
|
|
39
|
+
case 'move_file': return { kind: 'move', title: `Moving ${basename}` };
|
|
40
|
+
case 'list_files': return { kind: 'read', title: `Listing files ${basename}` };
|
|
41
|
+
case 'search_files': return { kind: 'search', title: `Searching ${basename || 'files'}` };
|
|
42
|
+
case 'run_command': return { kind: 'execute', title: params.command ?? 'Running command' };
|
|
39
43
|
case 'web_fetch': return { kind: 'fetch', title: `Fetching ${params.url ?? ''}` };
|
|
40
44
|
default: return { kind: 'other', title: toolName };
|
|
41
45
|
}
|
|
@@ -60,7 +64,7 @@ export async function runAgentSession(opts) {
|
|
|
60
64
|
onToolCall: (toolCall) => {
|
|
61
65
|
const name = toolCall.tool;
|
|
62
66
|
const params = (toolCall.parameters ?? {});
|
|
63
|
-
const { kind, title } = toolCallMeta(name, params);
|
|
67
|
+
const { kind, title } = toolCallMeta(name, params, opts.workspaceRoot);
|
|
64
68
|
const toolCallId = `tc_${++toolCallCounter}`;
|
|
65
69
|
// Resolve file locations for edit/read/delete/move tools
|
|
66
70
|
// ToolCallLocation.path expects a filesystem path, not a file:// URI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.54",
|
|
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",
|