codeep 1.2.56 → 1.2.58

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.
@@ -145,6 +145,7 @@ export interface SessionUpdateToolCall {
145
145
  path: string;
146
146
  }[];
147
147
  content?: {
148
+ type: 'Content';
148
149
  oldText?: string;
149
150
  newText?: string;
150
151
  };
@@ -7,6 +7,7 @@ export interface AgentSessionOptions {
7
7
  onChunk: (text: string) => void;
8
8
  onThought?: (text: string) => void;
9
9
  onToolCall?: (toolCallId: string, toolName: string, kind: string, title: string, status: 'pending' | 'running' | 'finished' | 'error', locations?: string[], rawOutput?: string, content?: {
10
+ type: 'Content';
10
11
  oldText?: string;
11
12
  newText?: string;
12
13
  }) => void;
@@ -37,10 +37,14 @@ function toolCallMeta(toolName, params, workspaceRoot) {
37
37
  case 'edit_file': return { kind: 'edit', title: absFile ? `Edit ${absFile}` : 'Editing file' };
38
38
  case 'delete_file': return { kind: 'delete', title: `Deleting ${basename}` };
39
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' };
43
- case 'web_fetch': return { kind: 'fetch', title: `Fetching ${params.url ?? ''}` };
40
+ case 'list_files': return { kind: 'read', title: `Listing ${basename || 'files'}` };
41
+ case 'create_directory': return { kind: 'edit', title: `Creating dir ${basename}` };
42
+ case 'search_code': return { kind: 'search', title: `Searching ${params.pattern ?? 'code'}` };
43
+ case 'find_files': return { kind: 'search', title: `Finding ${params.pattern ?? 'files'}` };
44
+ case 'execute_command': return { kind: 'execute', title: params.command ?? 'Running command' };
45
+ case 'fetch_url': return { kind: 'fetch', title: `Fetching ${params.url ?? ''}` };
46
+ case 'web_search': return { kind: 'fetch', title: `Searching ${params.query ?? ''}` };
47
+ case 'web_read': return { kind: 'fetch', title: `Reading ${params.url ?? ''}` };
44
48
  default: return { kind: 'other', title: toolName };
45
49
  }
46
50
  }
@@ -49,14 +53,14 @@ function buildToolCallContent(toolName, params) {
49
53
  switch (toolName) {
50
54
  case 'write_file': {
51
55
  const content = params.content ?? '';
52
- return content ? { newText: content } : undefined;
56
+ return content ? { type: 'Content', newText: content } : undefined;
53
57
  }
54
58
  case 'edit_file': {
55
59
  const oldText = params.old_text ?? '';
56
60
  const newText = params.new_text ?? '';
57
61
  if (!oldText && !newText)
58
62
  return undefined;
59
- return { oldText: oldText || undefined, newText: newText || undefined };
63
+ return { type: 'Content', oldText: oldText || undefined, newText: newText || undefined };
60
64
  }
61
65
  default:
62
66
  return undefined;
@@ -81,7 +85,7 @@ function buildRawOutput(toolName, params, toolResult) {
81
85
  const newLines = newText.split('\n').map(l => `+ ${l}`).join('\n');
82
86
  return `${oldLines}\n${newLines}`;
83
87
  }
84
- case 'run_command': {
88
+ case 'execute_command': {
85
89
  return toolResult.output || toolResult.error || undefined;
86
90
  }
87
91
  case 'read_file': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.56",
3
+ "version": "1.2.58",
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",