claude-threads 0.16.6 → 0.16.7
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/CHANGELOG.md +2 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.16.6] - 2025-12-31
|
|
11
|
+
|
|
10
12
|
### Added
|
|
11
13
|
- **Worktree context**: Replay first user prompt after mid-session worktree creation (`!worktree create`)
|
|
12
14
|
- **Thread context prompt**: When starting a session mid-thread (replying to an existing thread), offers to include previous conversation context
|
package/dist/index.js
CHANGED
|
@@ -18926,6 +18926,7 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18926
18926
|
|
|
18927
18927
|
// src/session/lifecycle.ts
|
|
18928
18928
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
18929
|
+
import { existsSync as existsSync7 } from "fs";
|
|
18929
18930
|
function findPersistedByThreadId(persisted, threadId) {
|
|
18930
18931
|
for (const session of persisted.values()) {
|
|
18931
18932
|
if (session.threadId === threadId) {
|
|
@@ -19059,6 +19060,17 @@ async function resumeSession(state, ctx) {
|
|
|
19059
19060
|
console.log(` \u26A0\uFE0F Max sessions reached, skipping resume for ${shortId}...`);
|
|
19060
19061
|
return;
|
|
19061
19062
|
}
|
|
19063
|
+
if (!existsSync7(state.workingDir)) {
|
|
19064
|
+
console.log(` \u26A0\uFE0F Working directory ${state.workingDir} no longer exists, skipping resume for ${shortId}...`);
|
|
19065
|
+
ctx.sessionStore.remove(`${state.platformId}:${state.threadId}`);
|
|
19066
|
+
try {
|
|
19067
|
+
await platform.createPost(`\u26A0\uFE0F **Cannot resume session** - working directory no longer exists:
|
|
19068
|
+
\`${state.workingDir}\`
|
|
19069
|
+
|
|
19070
|
+
Please start a new session.`, state.threadId);
|
|
19071
|
+
} catch {}
|
|
19072
|
+
return;
|
|
19073
|
+
}
|
|
19062
19074
|
const platformId = state.platformId;
|
|
19063
19075
|
const sessionId = ctx.getSessionId(platformId, state.threadId);
|
|
19064
19076
|
const skipPerms = ctx.skipPermissions && !state.forceInteractivePermissions;
|