codeep 1.2.52 → 1.2.53

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.
Files changed (2) hide show
  1. package/dist/acp/server.js +20 -0
  2. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  // src/acp/server.ts
2
2
  // Codeep ACP adapter — started via `codeep acp` CLI subcommand
3
3
  import { randomUUID } from 'crypto';
4
+ import { basename as pathBasename } from 'path';
4
5
  import { StdioTransport } from './transport.js';
5
6
  import { runAgentSession } from './session.js';
6
7
  import { initWorkspace, loadWorkspace, handleCommand } from './commands.js';
@@ -174,6 +175,21 @@ export function startAcpServer() {
174
175
  };
175
176
  transport.respond(msg.id, result);
176
177
  }
178
+ // ── helpers ──────────────────────────────────────────────────────────────────
179
+ function sendSessionTitle(sessionId, history, fallback) {
180
+ const firstUserMsg = history.find(m => m.role === 'user');
181
+ const title = firstUserMsg
182
+ ? firstUserMsg.content.replace(/\n/g, ' ').trim().slice(0, 60)
183
+ : (fallback ?? 'Codeep session');
184
+ transport.notify('session/update', {
185
+ sessionId,
186
+ update: {
187
+ sessionUpdate: 'session_info_update',
188
+ title,
189
+ updatedAt: new Date().toISOString(),
190
+ },
191
+ });
192
+ }
177
193
  // ── session/new ─────────────────────────────────────────────────────────────
178
194
  function handleSessionNew(msg) {
179
195
  const params = msg.params;
@@ -203,6 +219,8 @@ export function startAcpServer() {
203
219
  availableCommands: AVAILABLE_COMMANDS,
204
220
  },
205
221
  });
222
+ // Send title immediately so Zed "Recent" panel shows something useful
223
+ sendSessionTitle(acpSessionId, history, pathBasename(params.cwd));
206
224
  // Send welcome message
207
225
  transport.notify('session/update', {
208
226
  sessionId: acpSessionId,
@@ -244,6 +262,8 @@ export function startAcpServer() {
244
262
  configOptions: buildConfigOptions(),
245
263
  };
246
264
  transport.respond(msg.id, result);
265
+ // Send title immediately so Zed "Recent" panel shows something useful
266
+ sendSessionTitle(params.sessionId, history, pathBasename(params.cwd));
247
267
  // Send restored session welcome
248
268
  transport.notify('session/update', {
249
269
  sessionId: params.sessionId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.52",
3
+ "version": "1.2.53",
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",