codeep 1.2.51 → 1.2.52
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/commands.js +2 -1
- package/dist/acp/server.js +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +14 -1
- package/package.json +1 -1
package/dist/acp/commands.js
CHANGED
|
@@ -585,7 +585,8 @@ function buildSessionList(workspaceRoot) {
|
|
|
585
585
|
return 'No saved sessions. Start chatting to create one.';
|
|
586
586
|
const lines = ['## Saved Sessions', ''];
|
|
587
587
|
for (const s of sessions) {
|
|
588
|
-
|
|
588
|
+
const label = s.title !== s.name ? `**${s.title}** (\`${s.name}\`)` : `\`${s.name}\``;
|
|
589
|
+
lines.push(`- ${label} — ${s.messageCount} messages — ${new Date(s.createdAt).toLocaleString()}`);
|
|
589
590
|
}
|
|
590
591
|
lines.push('', 'Use `/session load <name>` to restore.');
|
|
591
592
|
return lines.join('\n');
|
package/dist/acp/server.js
CHANGED
package/dist/config/index.d.ts
CHANGED
package/dist/config/index.js
CHANGED
|
@@ -495,8 +495,14 @@ export function flushAutoSave() {
|
|
|
495
495
|
// Session management
|
|
496
496
|
export function saveSession(name, history, projectPath) {
|
|
497
497
|
try {
|
|
498
|
+
// Derive a human-readable title from the first user message
|
|
499
|
+
const firstUserMsg = history.find(m => m.role === 'user');
|
|
500
|
+
const title = firstUserMsg
|
|
501
|
+
? firstUserMsg.content.replace(/\n/g, ' ').trim().slice(0, 60)
|
|
502
|
+
: name;
|
|
498
503
|
const session = {
|
|
499
504
|
name,
|
|
505
|
+
title,
|
|
500
506
|
history,
|
|
501
507
|
createdAt: new Date().toISOString(),
|
|
502
508
|
};
|
|
@@ -616,8 +622,15 @@ export function listSessionsWithInfo(projectPath) {
|
|
|
616
622
|
try {
|
|
617
623
|
const stat = statSync(filePath);
|
|
618
624
|
const data = JSON.parse(readFileSync(filePath, 'utf-8'));
|
|
625
|
+
const sessionName = data.name || file.replace('.json', '');
|
|
626
|
+
// Derive title: use stored title, else first user message, else session name
|
|
627
|
+
const firstUserMsg = data.history?.find(m => m.role === 'user');
|
|
628
|
+
const title = data.title
|
|
629
|
+
|| (firstUserMsg ? firstUserMsg.content.replace(/\n/g, ' ').trim().slice(0, 60) : null)
|
|
630
|
+
|| sessionName;
|
|
619
631
|
sessions.push({
|
|
620
|
-
name:
|
|
632
|
+
name: sessionName,
|
|
633
|
+
title,
|
|
621
634
|
createdAt: data.createdAt || stat.mtime.toISOString(),
|
|
622
635
|
messageCount: data.history?.length || 0,
|
|
623
636
|
fileSize: stat.size,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.52",
|
|
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",
|