codeep 1.2.50 → 1.2.51
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 +6 -1
- package/dist/acp/server.js +42 -2
- package/package.json +1 -1
package/dist/acp/protocol.d.ts
CHANGED
|
@@ -169,7 +169,12 @@ export interface SessionUpdateConfigOption {
|
|
|
169
169
|
sessionUpdate: 'config_option_update';
|
|
170
170
|
configOptions: SessionConfigOption[];
|
|
171
171
|
}
|
|
172
|
-
export
|
|
172
|
+
export interface SessionUpdateSessionInfo {
|
|
173
|
+
sessionUpdate: 'session_info_update';
|
|
174
|
+
title: string;
|
|
175
|
+
updatedAt?: string;
|
|
176
|
+
}
|
|
177
|
+
export type SessionUpdateInner = SessionUpdateAgentMessageChunk | SessionUpdateAgentThoughtChunk | SessionUpdateToolCall | SessionUpdateToolCallUpdate | SessionUpdateAvailableCommands | SessionUpdateCurrentMode | SessionUpdateConfigOption | SessionUpdateSessionInfo;
|
|
173
178
|
export interface SessionUpdateParams {
|
|
174
179
|
sessionId: string;
|
|
175
180
|
update: SessionUpdateInner;
|
package/dist/acp/server.js
CHANGED
|
@@ -187,6 +187,7 @@ export function startAcpServer() {
|
|
|
187
187
|
addedFiles: new Map(),
|
|
188
188
|
abortController: null,
|
|
189
189
|
currentModeId: 'auto',
|
|
190
|
+
titleSent: false,
|
|
190
191
|
});
|
|
191
192
|
const result = {
|
|
192
193
|
sessionId: acpSessionId,
|
|
@@ -235,6 +236,7 @@ export function startAcpServer() {
|
|
|
235
236
|
codeepSessionId,
|
|
236
237
|
addedFiles: new Map(),
|
|
237
238
|
abortController: null,
|
|
239
|
+
titleSent: false,
|
|
238
240
|
currentModeId: 'auto',
|
|
239
241
|
});
|
|
240
242
|
const result = {
|
|
@@ -311,8 +313,20 @@ export function startAcpServer() {
|
|
|
311
313
|
// ── session/list ─────────────────────────────────────────────────────────────
|
|
312
314
|
function handleSessionList(msg) {
|
|
313
315
|
const params = (msg.params ?? {});
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
+
// Collect local (project-scoped) sessions and global sessions, deduplicated by name
|
|
317
|
+
const seen = new Set();
|
|
318
|
+
const merged = [
|
|
319
|
+
...listSessionsWithInfo(params.cwd), // project-local first
|
|
320
|
+
...listSessionsWithInfo(), // global fallback
|
|
321
|
+
].filter(s => {
|
|
322
|
+
if (seen.has(s.name))
|
|
323
|
+
return false;
|
|
324
|
+
seen.add(s.name);
|
|
325
|
+
return true;
|
|
326
|
+
});
|
|
327
|
+
// Sort newest first
|
|
328
|
+
merged.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
329
|
+
const acpSessions = merged.map(s => ({
|
|
316
330
|
sessionId: s.name,
|
|
317
331
|
cwd: params.cwd ?? '',
|
|
318
332
|
title: s.name,
|
|
@@ -372,6 +386,19 @@ export function startAcpServer() {
|
|
|
372
386
|
},
|
|
373
387
|
});
|
|
374
388
|
}
|
|
389
|
+
// Send title on first interaction (commands count too)
|
|
390
|
+
if (!session.titleSent) {
|
|
391
|
+
session.titleSent = true;
|
|
392
|
+
const title = prompt.slice(0, 60).replace(/\n/g, ' ').trim();
|
|
393
|
+
transport.notify('session/update', {
|
|
394
|
+
sessionId: params.sessionId,
|
|
395
|
+
update: {
|
|
396
|
+
sessionUpdate: 'session_info_update',
|
|
397
|
+
title,
|
|
398
|
+
updatedAt: new Date().toISOString(),
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
}
|
|
375
402
|
transport.respond(msg.id, { stopReason: 'end_turn' });
|
|
376
403
|
return;
|
|
377
404
|
}
|
|
@@ -435,6 +462,19 @@ export function startAcpServer() {
|
|
|
435
462
|
session.history.push({ role: 'assistant', content: agentResponse });
|
|
436
463
|
}
|
|
437
464
|
autoSaveSession(session.history, session.workspaceRoot);
|
|
465
|
+
// Send session title on first completed prompt (so Zed shows something useful)
|
|
466
|
+
if (!session.titleSent) {
|
|
467
|
+
session.titleSent = true;
|
|
468
|
+
const title = prompt.slice(0, 60).replace(/\n/g, ' ').trim();
|
|
469
|
+
transport.notify('session/update', {
|
|
470
|
+
sessionId: params.sessionId,
|
|
471
|
+
update: {
|
|
472
|
+
sessionUpdate: 'session_info_update',
|
|
473
|
+
title,
|
|
474
|
+
updatedAt: new Date().toISOString(),
|
|
475
|
+
},
|
|
476
|
+
});
|
|
477
|
+
}
|
|
438
478
|
transport.respond(msg.id, { stopReason: 'end_turn' });
|
|
439
479
|
}).catch((err) => {
|
|
440
480
|
if (err.name === 'AbortError') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
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",
|