codeep 1.2.58 → 1.2.59

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.
@@ -144,11 +144,6 @@ export interface SessionUpdateToolCall {
144
144
  locations?: {
145
145
  path: string;
146
146
  }[];
147
- content?: {
148
- type: 'Content';
149
- oldText?: string;
150
- newText?: string;
151
- };
152
147
  }
153
148
  export interface SessionUpdateToolCallUpdate {
154
149
  sessionUpdate: 'tool_call_update';
@@ -440,7 +440,7 @@ export function startAcpServer() {
440
440
  },
441
441
  });
442
442
  },
443
- onToolCall: (toolCallId, toolName, kind, title, status, locations, rawOutput, content) => {
443
+ onToolCall: (toolCallId, toolName, kind, title, status, locations, rawOutput) => {
444
444
  if (status === 'running') {
445
445
  // Initial tool_call notification: spec ToolCall shape
446
446
  transport.notify('session/update', {
@@ -454,7 +454,6 @@ export function startAcpServer() {
454
454
  ...(locations && locations.length > 0
455
455
  ? { locations: locations.map(path => ({ path })) }
456
456
  : {}),
457
- ...(content ? { content } : {}),
458
457
  },
459
458
  });
460
459
  }
@@ -6,11 +6,7 @@ export interface AgentSessionOptions {
6
6
  abortSignal: AbortSignal;
7
7
  onChunk: (text: string) => void;
8
8
  onThought?: (text: string) => void;
9
- onToolCall?: (toolCallId: string, toolName: string, kind: string, title: string, status: 'pending' | 'running' | 'finished' | 'error', locations?: string[], rawOutput?: string, content?: {
10
- type: 'Content';
11
- oldText?: string;
12
- newText?: string;
13
- }) => void;
9
+ onToolCall?: (toolCallId: string, toolName: string, kind: string, title: string, status: 'pending' | 'running' | 'finished' | 'error', locations?: string[], rawOutput?: string) => void;
14
10
  }
15
11
  /**
16
12
  * Build a ProjectContext from a workspace root directory.
@@ -48,24 +48,6 @@ function toolCallMeta(toolName, params, workspaceRoot) {
48
48
  default: return { kind: 'other', title: toolName };
49
49
  }
50
50
  }
51
- // Builds ToolCallContent (oldText/newText) for Zed's diff view in the tool_call card.
52
- function buildToolCallContent(toolName, params) {
53
- switch (toolName) {
54
- case 'write_file': {
55
- const content = params.content ?? '';
56
- return content ? { type: 'Content', newText: content } : undefined;
57
- }
58
- case 'edit_file': {
59
- const oldText = params.old_text ?? '';
60
- const newText = params.new_text ?? '';
61
- if (!oldText && !newText)
62
- return undefined;
63
- return { type: 'Content', oldText: oldText || undefined, newText: newText || undefined };
64
- }
65
- default:
66
- return undefined;
67
- }
68
- }
69
51
  // Builds rawOutput content to display inside tool call cards.
70
52
  // For write/edit operations, returns the code content or diff.
71
53
  // For command execution, returns the command output.
@@ -130,9 +112,8 @@ export async function runAgentSession(opts) {
130
112
  // Track this tool call so onToolResult can emit finished/error
131
113
  const mapKey = toolCall.id ?? `${name}_${toolCallCounter}`;
132
114
  toolCallIdMap.set(mapKey, { toolCallId, kind, locations: locations.length ? locations : undefined });
133
- // Emit tool_call notification (running state) with optional diff content
134
- const toolContent = buildToolCallContent(name, params);
135
- opts.onToolCall?.(toolCallId, name, kind, title, 'running', locations.length ? locations : undefined, undefined, toolContent);
115
+ // Emit tool_call notification (running state)
116
+ opts.onToolCall?.(toolCallId, name, kind, title, 'running', locations.length ? locations : undefined);
136
117
  },
137
118
  onToolResult: (toolResult, toolCall) => {
138
119
  // Find the tracked entry: prefer exact id match, then first FIFO entry for same tool name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
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",