codeep 1.3.38 → 1.3.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.
- package/README.md +18 -1
- package/dist/acp/commands.js +15 -0
- package/dist/acp/server.js +36 -0
- package/dist/acp/transport.js +8 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -959,12 +959,29 @@ Codeep advertises the following [ACP](https://agentclientprotocol.com) capabilit
|
|
|
959
959
|
|
|
960
960
|
- **`promptCapabilities.image`** — paste/drag images into chat for vision analysis.
|
|
961
961
|
- **`promptCapabilities.embeddedContext`** — drag a file or pin a code selection into the chat and the actual file content is injected into the prompt (resource & resource_link blocks, 200 KB cap per file).
|
|
962
|
-
- **`sessionCapabilities.list`** —
|
|
962
|
+
- **`sessionCapabilities.list`** — exposes saved CLI sessions to ACP clients.
|
|
963
963
|
- **`sessionCapabilities.resume`** — instant reconnect on panel reload without replaying history.
|
|
964
964
|
- **`loadSession`** — restore a previous session by id.
|
|
965
965
|
|
|
966
966
|
Codeep also reads `clientCapabilities.terminal` from the client and routes shell commands through the editor's terminal when supported (so you see them in Zed's terminal panel), falling back to local execution otherwise.
|
|
967
967
|
|
|
968
|
+
### Loading CLI sessions in Zed
|
|
969
|
+
|
|
970
|
+
Zed's left sidebar shows only sessions Zed itself created (one per "New Thread") — it does **not** auto-list sessions you saved from the CLI or from a previous Zed window. Two ways to access those:
|
|
971
|
+
|
|
972
|
+
**Inside the chat (recommended):**
|
|
973
|
+
|
|
974
|
+
```
|
|
975
|
+
/sessions # show all saved sessions for this workspace
|
|
976
|
+
/session load <name> # restore one
|
|
977
|
+
```
|
|
978
|
+
|
|
979
|
+
When you open a fresh chat in Zed, Codeep also shows you the most recent CLI sessions for that project right in the welcome message, so you can switch with one command.
|
|
980
|
+
|
|
981
|
+
**Via Zed's import modal:**
|
|
982
|
+
|
|
983
|
+
Open Zed's command palette (`Cmd+Shift+P`) and search for **"Import Threads"**. Codeep's saved sessions appear there as an importable list — once imported they show up in Zed's regular sidebar.
|
|
984
|
+
|
|
968
985
|
## VS Code Extension
|
|
969
986
|
|
|
970
987
|
Install **Codeep** from the VS Code marketplace. The extension is a thin UI around the CLI — all credentials and sessions live in the CLI's config (`~/.config/codeep/config.json`), so keys set anywhere are visible everywhere.
|
package/dist/acp/commands.js
CHANGED
|
@@ -68,6 +68,21 @@ export function initWorkspace(workspaceRoot, fresh = false) {
|
|
|
68
68
|
'',
|
|
69
69
|
'Type `/help` to see available commands.',
|
|
70
70
|
];
|
|
71
|
+
// Surface CLI sessions so Zed users discover them without having to know
|
|
72
|
+
// about the hidden "Import Threads" modal. Show up to 5 most recent.
|
|
73
|
+
if (sessions.length > 1 || (sessions.length === 1 && sessions[0].name !== codeepSessionId)) {
|
|
74
|
+
const others = sessions
|
|
75
|
+
.filter(s => s.name !== codeepSessionId)
|
|
76
|
+
.slice(0, 5);
|
|
77
|
+
if (others.length > 0) {
|
|
78
|
+
lines.push('', '**Other sessions in this project:**');
|
|
79
|
+
for (const s of others) {
|
|
80
|
+
const label = s.title && s.title !== s.name ? `${s.title} (\`${s.name}\`)` : `\`${s.name}\``;
|
|
81
|
+
lines.push(`- ${label} — ${s.messageCount} messages`);
|
|
82
|
+
}
|
|
83
|
+
lines.push('', `Type \`/sessions\` for the full list, or \`/session load <name>\` to switch.`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
71
86
|
if (history.length > 0) {
|
|
72
87
|
lines.push('', '---', '');
|
|
73
88
|
lines.push(...formatSessionPreviewLines(history));
|
package/dist/acp/server.js
CHANGED
|
@@ -493,6 +493,16 @@ export function startAcpServer() {
|
|
|
493
493
|
configOptions: buildConfigOptions(),
|
|
494
494
|
};
|
|
495
495
|
transport.respond(msg.id, result);
|
|
496
|
+
// Re-advertise slash commands so `/` autocomplete works after a reload.
|
|
497
|
+
// Zed only registers commands when AvailableCommandsUpdated fires; without
|
|
498
|
+
// this the slash menu stays empty after session/load.
|
|
499
|
+
transport.notify('session/update', {
|
|
500
|
+
sessionId: acpSessionId,
|
|
501
|
+
update: {
|
|
502
|
+
sessionUpdate: 'available_commands_update',
|
|
503
|
+
availableCommands: AVAILABLE_COMMANDS,
|
|
504
|
+
},
|
|
505
|
+
});
|
|
496
506
|
// Send title immediately so Zed "Recent" panel shows something useful
|
|
497
507
|
sendSessionTitle(params.sessionId, history, pathBasename(params.cwd));
|
|
498
508
|
// Send restored session welcome
|
|
@@ -511,6 +521,18 @@ export function startAcpServer() {
|
|
|
511
521
|
// Falls back to `session/load` semantics if the session isn't in memory yet.
|
|
512
522
|
function handleSessionResume(msg) {
|
|
513
523
|
const params = msg.params;
|
|
524
|
+
// Helper — re-advertise commands so `/` autocomplete works after a panel
|
|
525
|
+
// reload. Without this the slash menu stays empty until a new session is
|
|
526
|
+
// created. Same notification shape as session/new.
|
|
527
|
+
const advertiseCommands = (sessionId) => {
|
|
528
|
+
transport.notify('session/update', {
|
|
529
|
+
sessionId,
|
|
530
|
+
update: {
|
|
531
|
+
sessionUpdate: 'available_commands_update',
|
|
532
|
+
availableCommands: AVAILABLE_COMMANDS,
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
};
|
|
514
536
|
const existing = sessions.get(params.sessionId);
|
|
515
537
|
if (existing) {
|
|
516
538
|
existing.workspaceRoot = params.cwd;
|
|
@@ -520,6 +542,7 @@ export function startAcpServer() {
|
|
|
520
542
|
configOptions: buildConfigOptions(),
|
|
521
543
|
};
|
|
522
544
|
transport.respond(msg.id, result);
|
|
545
|
+
advertiseCommands(params.sessionId);
|
|
523
546
|
return;
|
|
524
547
|
}
|
|
525
548
|
// Session not in memory — load from disk but skip the welcome banner and
|
|
@@ -543,6 +566,7 @@ export function startAcpServer() {
|
|
|
543
566
|
configOptions: buildConfigOptions(),
|
|
544
567
|
};
|
|
545
568
|
transport.respond(msg.id, result);
|
|
569
|
+
advertiseCommands(acpSessionId);
|
|
546
570
|
}
|
|
547
571
|
// ── session/set_mode ────────────────────────────────────────────────────────
|
|
548
572
|
function handleSetMode(msg) {
|
|
@@ -684,6 +708,18 @@ export function startAcpServer() {
|
|
|
684
708
|
transport.error(msg.id, -32602, `Unknown sessionId: ${params.sessionId}`);
|
|
685
709
|
return;
|
|
686
710
|
}
|
|
711
|
+
// Re-advertise commands on every prompt — Zed sometimes drops the initial
|
|
712
|
+
// `available_commands_update` from session/new because the thread_view
|
|
713
|
+
// isn't registered yet on Zed's side (race against the session/new
|
|
714
|
+
// response). Re-sending here guarantees `/` autocomplete works by the
|
|
715
|
+
// time the user could plausibly type the next prompt.
|
|
716
|
+
transport.notify('session/update', {
|
|
717
|
+
sessionId: params.sessionId,
|
|
718
|
+
update: {
|
|
719
|
+
sessionUpdate: 'available_commands_update',
|
|
720
|
+
availableCommands: AVAILABLE_COMMANDS,
|
|
721
|
+
},
|
|
722
|
+
});
|
|
687
723
|
// Extract text from ContentBlock[]
|
|
688
724
|
let prompt = params.prompt
|
|
689
725
|
.filter((b) => b.type === 'text')
|
package/dist/acp/transport.js
CHANGED
|
@@ -26,6 +26,9 @@ export class StdioTransport {
|
|
|
26
26
|
if (!trimmed)
|
|
27
27
|
continue;
|
|
28
28
|
try {
|
|
29
|
+
if (process.env.CODEEP_ACP_DEBUG) {
|
|
30
|
+
process.stderr.write(`[ACP←client] ${trimmed}\n`);
|
|
31
|
+
}
|
|
29
32
|
const msg = JSON.parse(trimmed);
|
|
30
33
|
// Check if this is a response to one of our outbound requests
|
|
31
34
|
if ('result' in msg || 'error' in msg) {
|
|
@@ -45,7 +48,11 @@ export class StdioTransport {
|
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
send(msg) {
|
|
48
|
-
|
|
51
|
+
const line = JSON.stringify(msg);
|
|
52
|
+
if (process.env.CODEEP_ACP_DEBUG) {
|
|
53
|
+
process.stderr.write(`[ACP→client] ${line}\n`);
|
|
54
|
+
}
|
|
55
|
+
process.stdout.write(line + '\n');
|
|
49
56
|
}
|
|
50
57
|
respond(id, result) {
|
|
51
58
|
this.send({ jsonrpc: '2.0', id, result });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.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",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"build:binary": "npm run build && pkg dist/renderer/main.js --targets node18-macos-arm64,node18-macos-x64,node18-linux-x64 --output bin/codeep",
|
|
18
18
|
"test": "vitest run",
|
|
19
19
|
"test:watch": "vitest",
|
|
20
|
-
"test:coverage": "vitest run --coverage"
|
|
20
|
+
"test:coverage": "vitest run --coverage",
|
|
21
|
+
"release": "node scripts/release.js"
|
|
21
22
|
},
|
|
22
23
|
"repository": {
|
|
23
24
|
"type": "git",
|