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.
@@ -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
- // Send title on first interaction (commands count too)
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
- const title = prompt.slice(0, 60).replace(/\n/g, ' ').trim();
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
- // Send session title on first completed prompt (so Zed shows something useful)
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
- const title = prompt.slice(0, 60).replace(/\n/g, ' ').trim();
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) => {
@@ -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
- const label = file ? ` ${file.split('/').pop()}` : '';
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${label}` };
32
- case 'write_file': return { kind: 'edit', title: `Writing${label}` };
33
- case 'edit_file': return { kind: 'edit', title: `Editing${label}` };
34
- case 'delete_file': return { kind: 'delete', title: `Deleting${label}` };
35
- case 'move_file': return { kind: 'move', title: `Moving${label}` };
36
- case 'list_files': return { kind: 'read', title: `Listing files${label}` };
37
- case 'search_files': return { kind: 'search', title: `Searching${label || ' files'}` };
38
- case 'run_command': return { kind: 'execute', title: `Running: ${params.command ?? ''}` };
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.53",
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",