codeep 1.2.38 → 1.2.40

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.
@@ -32,13 +32,23 @@ export interface InitializeParams {
32
32
  version: string;
33
33
  };
34
34
  }
35
+ export interface AgentCapabilities {
36
+ loadSession?: boolean;
37
+ promptCapabilities?: {
38
+ image?: boolean;
39
+ audio?: boolean;
40
+ embeddedContext?: boolean;
41
+ };
42
+ mcpCapabilities?: {
43
+ stdio?: boolean;
44
+ sse?: boolean;
45
+ http?: boolean;
46
+ };
47
+ sessionCapabilities?: Record<string, unknown>;
48
+ }
35
49
  export interface InitializeResult {
36
50
  protocolVersion: number;
37
- agentCapabilities: {
38
- loadSession?: boolean;
39
- streaming?: boolean;
40
- fileEditing?: boolean;
41
- };
51
+ agentCapabilities: AgentCapabilities;
42
52
  agentInfo: {
43
53
  name: string;
44
54
  version: string;
@@ -66,11 +76,11 @@ export interface SessionConfigOption {
66
76
  description?: string | null;
67
77
  category?: 'mode' | 'model' | 'thought_level' | null;
68
78
  type: 'select';
69
- options?: {
70
- id: string;
79
+ currentValue: string;
80
+ options: {
81
+ value: string;
71
82
  name: string;
72
83
  }[];
73
- currentValue?: string;
74
84
  }
75
85
  export interface SessionNewParams {
76
86
  cwd: string;
@@ -128,8 +138,12 @@ export interface SessionUpdateAgentThoughtChunk {
128
138
  export interface SessionUpdateToolCall {
129
139
  sessionUpdate: 'tool_call';
130
140
  toolCallId: string;
131
- status: 'pending';
132
- rawInput: unknown;
141
+ title: string;
142
+ kind?: string;
143
+ status: 'pending' | 'in_progress';
144
+ locations?: {
145
+ uri: string;
146
+ }[];
133
147
  }
134
148
  export interface SessionUpdateToolCallUpdate {
135
149
  sessionUpdate: 'tool_call_update';
@@ -4,7 +4,7 @@ import { randomUUID } from 'crypto';
4
4
  import { StdioTransport } from './transport.js';
5
5
  import { runAgentSession } from './session.js';
6
6
  import { initWorkspace, loadWorkspace, handleCommand } from './commands.js';
7
- import { autoSaveSession, config } from '../config/index.js';
7
+ import { autoSaveSession, config, getModelsForCurrentProvider } from '../config/index.js';
8
8
  import { getCurrentVersion } from '../utils/update.js';
9
9
  // ─── Slash commands advertised to Zed ────────────────────────────────────────
10
10
  const AVAILABLE_COMMANDS = [
@@ -59,6 +59,16 @@ const AGENT_MODES = {
59
59
  };
60
60
  // ─── Config options ───────────────────────────────────────────────────────────
61
61
  function buildConfigOptions() {
62
+ const models = getModelsForCurrentProvider();
63
+ const currentModel = config.get('model') ?? '';
64
+ const modelOptions = Object.entries(models).map(([id, label]) => ({
65
+ value: id,
66
+ name: label,
67
+ }));
68
+ // Ensure currentValue is always one of the valid options
69
+ const currentValue = modelOptions.some(o => o.value === currentModel)
70
+ ? currentModel
71
+ : (modelOptions[0]?.value ?? '');
62
72
  return [
63
73
  {
64
74
  id: 'model',
@@ -66,7 +76,8 @@ function buildConfigOptions() {
66
76
  description: 'AI model to use',
67
77
  category: 'model',
68
78
  type: 'select',
69
- currentValue: config.get('model'),
79
+ currentValue,
80
+ options: modelOptions,
70
81
  },
71
82
  ];
72
83
  }
@@ -120,8 +131,6 @@ export function startAcpServer() {
120
131
  protocolVersion: 1,
121
132
  agentCapabilities: {
122
133
  loadSession: true,
123
- streaming: true,
124
- fileEditing: true,
125
134
  },
126
135
  agentInfo: {
127
136
  name: 'codeep',
@@ -152,7 +161,7 @@ export function startAcpServer() {
152
161
  };
153
162
  transport.respond(msg.id, result);
154
163
  // Advertise slash commands
155
- transport.notify('session/update', {
164
+ transport.notify('sessionUpdate', {
156
165
  sessionId: acpSessionId,
157
166
  update: {
158
167
  sessionUpdate: 'available_commands_update',
@@ -160,7 +169,7 @@ export function startAcpServer() {
160
169
  },
161
170
  });
162
171
  // Send welcome message
163
- transport.notify('session/update', {
172
+ transport.notify('sessionUpdate', {
164
173
  sessionId: acpSessionId,
165
174
  update: {
166
175
  sessionUpdate: 'agent_message_chunk',
@@ -200,7 +209,7 @@ export function startAcpServer() {
200
209
  };
201
210
  transport.respond(msg.id, result);
202
211
  // Send restored session welcome
203
- transport.notify('session/update', {
212
+ transport.notify('sessionUpdate', {
204
213
  sessionId: params.sessionId,
205
214
  update: {
206
215
  sessionUpdate: 'agent_message_chunk',
@@ -226,7 +235,7 @@ export function startAcpServer() {
226
235
  config.set('agentConfirmation', modeId === 'manual' ? 'dangerous' : 'never');
227
236
  transport.respond(msg.id, {});
228
237
  // Notify Zed of the mode change
229
- transport.notify('session/update', {
238
+ transport.notify('sessionUpdate', {
230
239
  sessionId,
231
240
  update: {
232
241
  sessionUpdate: 'current_mode_update',
@@ -265,7 +274,7 @@ export function startAcpServer() {
265
274
  const agentResponseChunks = [];
266
275
  const sendChunk = (text) => {
267
276
  agentResponseChunks.push(text);
268
- transport.notify('session/update', {
277
+ transport.notify('sessionUpdate', {
269
278
  sessionId: params.sessionId,
270
279
  update: {
271
280
  sessionUpdate: 'agent_message_chunk',
@@ -298,7 +307,7 @@ export function startAcpServer() {
298
307
  abortSignal: abortController.signal,
299
308
  onChunk: sendChunk,
300
309
  onThought: (text) => {
301
- transport.notify('session/update', {
310
+ transport.notify('sessionUpdate', {
302
311
  sessionId: params.sessionId,
303
312
  update: {
304
313
  sessionUpdate: 'agent_thought_chunk',
@@ -306,26 +315,31 @@ export function startAcpServer() {
306
315
  },
307
316
  });
308
317
  },
309
- onToolCall: (toolCallId, toolName, _kind, _title, status, _locations) => {
318
+ onToolCall: (toolCallId, toolName, kind, title, status, locations) => {
310
319
  if (status === 'running') {
311
- transport.notify('session/update', {
320
+ // Initial tool_call notification: spec ToolCall shape
321
+ transport.notify('sessionUpdate', {
312
322
  sessionId: params.sessionId,
313
323
  update: {
314
324
  sessionUpdate: 'tool_call',
315
325
  toolCallId,
316
- status: 'pending',
317
- rawInput: { toolName },
326
+ title: title || toolName,
327
+ kind: kind || 'other',
328
+ status: 'in_progress',
329
+ ...(locations && locations.length > 0
330
+ ? { locations: locations.map(uri => ({ uri })) }
331
+ : {}),
318
332
  },
319
333
  });
320
334
  }
321
335
  else {
322
- transport.notify('session/update', {
336
+ // tool_call_update: update status to completed/failed
337
+ transport.notify('sessionUpdate', {
323
338
  sessionId: params.sessionId,
324
339
  update: {
325
340
  sessionUpdate: 'tool_call_update',
326
341
  toolCallId,
327
342
  status: status === 'finished' ? 'completed' : 'failed',
328
- rawOutput: '',
329
343
  },
330
344
  });
331
345
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.38",
3
+ "version": "1.2.40",
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",