codeep 1.2.49 → 1.2.50
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/protocol.d.ts +19 -0
- package/dist/acp/server.js +30 -1
- package/package.json +1 -1
package/dist/acp/protocol.d.ts
CHANGED
|
@@ -199,6 +199,25 @@ export interface RequestPermissionResult {
|
|
|
199
199
|
optionId: string;
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
+
export interface ListSessionsParams {
|
|
203
|
+
cwd?: string;
|
|
204
|
+
cursor?: string;
|
|
205
|
+
}
|
|
206
|
+
export interface AcpSessionInfo {
|
|
207
|
+
sessionId: string;
|
|
208
|
+
cwd: string;
|
|
209
|
+
title?: string | null;
|
|
210
|
+
updatedAt?: string | null;
|
|
211
|
+
}
|
|
212
|
+
export interface ListSessionsResult {
|
|
213
|
+
sessions: AcpSessionInfo[];
|
|
214
|
+
nextCursor?: string | null;
|
|
215
|
+
}
|
|
216
|
+
export interface DeleteSessionParams {
|
|
217
|
+
sessionId: string;
|
|
218
|
+
}
|
|
219
|
+
export interface DeleteSessionResult {
|
|
220
|
+
}
|
|
202
221
|
export interface FsReadTextFileParams {
|
|
203
222
|
sessionId: string;
|
|
204
223
|
path: string;
|
package/dist/acp/server.js
CHANGED
|
@@ -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, setProvider } from '../config/index.js';
|
|
7
|
+
import { autoSaveSession, config, setProvider, listSessionsWithInfo, deleteSession as deleteSessionFile } from '../config/index.js';
|
|
8
8
|
import { PROVIDERS } from '../config/providers.js';
|
|
9
9
|
import { getCurrentVersion } from '../utils/update.js';
|
|
10
10
|
// ─── Slash commands advertised to Zed ────────────────────────────────────────
|
|
@@ -140,6 +140,12 @@ export function startAcpServer() {
|
|
|
140
140
|
case 'session/set_config_option':
|
|
141
141
|
handleSetConfigOption(req);
|
|
142
142
|
break;
|
|
143
|
+
case 'session/list':
|
|
144
|
+
handleSessionList(req);
|
|
145
|
+
break;
|
|
146
|
+
case 'session/delete':
|
|
147
|
+
handleSessionDelete(req);
|
|
148
|
+
break;
|
|
143
149
|
default:
|
|
144
150
|
transport.error(req.id, -32601, `Method not found: ${req.method}`);
|
|
145
151
|
}
|
|
@@ -158,6 +164,7 @@ export function startAcpServer() {
|
|
|
158
164
|
protocolVersion: 1,
|
|
159
165
|
agentCapabilities: {
|
|
160
166
|
loadSession: true,
|
|
167
|
+
sessionCapabilities: { list: {} },
|
|
161
168
|
},
|
|
162
169
|
agentInfo: {
|
|
163
170
|
name: 'codeep',
|
|
@@ -301,6 +308,28 @@ export function startAcpServer() {
|
|
|
301
308
|
},
|
|
302
309
|
});
|
|
303
310
|
}
|
|
311
|
+
// ── session/list ─────────────────────────────────────────────────────────────
|
|
312
|
+
function handleSessionList(msg) {
|
|
313
|
+
const params = (msg.params ?? {});
|
|
314
|
+
const sessionInfos = listSessionsWithInfo(params.cwd);
|
|
315
|
+
const acpSessions = sessionInfos.map(s => ({
|
|
316
|
+
sessionId: s.name,
|
|
317
|
+
cwd: params.cwd ?? '',
|
|
318
|
+
title: s.name,
|
|
319
|
+
updatedAt: s.createdAt,
|
|
320
|
+
}));
|
|
321
|
+
const result = { sessions: acpSessions };
|
|
322
|
+
transport.respond(msg.id, result);
|
|
323
|
+
}
|
|
324
|
+
// ── session/delete ───────────────────────────────────────────────────────────
|
|
325
|
+
function handleSessionDelete(msg) {
|
|
326
|
+
const { sessionId } = (msg.params ?? {});
|
|
327
|
+
// Remove from in-memory sessions map if present
|
|
328
|
+
sessions.delete(sessionId);
|
|
329
|
+
// Delete from disk — sessionId is used as the session file name
|
|
330
|
+
deleteSessionFile(sessionId);
|
|
331
|
+
transport.respond(msg.id, {});
|
|
332
|
+
}
|
|
304
333
|
// ── session/prompt ──────────────────────────────────────────────────────────
|
|
305
334
|
function handleSessionPrompt(msg) {
|
|
306
335
|
const params = msg.params;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.50",
|
|
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",
|