mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 21:53:28 +08:00
fix: accept shorter mixed-case session IDs (#408)
This commit is contained in:
@@ -17,11 +17,12 @@ const {
|
||||
} = require('./utils');
|
||||
|
||||
// Session filename pattern: YYYY-MM-DD-[session-id]-session.tmp
|
||||
// The session-id is optional (old format) and can include lowercase
|
||||
// alphanumeric characters and hyphens, with a minimum length of 8.
|
||||
// The session-id is optional (old format) and can include letters, digits,
|
||||
// underscores, and hyphens, but must not start with a hyphen.
|
||||
// Matches: "2026-02-01-session.tmp", "2026-02-01-a1b2c3d4-session.tmp",
|
||||
// and "2026-02-01-frontend-worktree-1-session.tmp"
|
||||
const SESSION_FILENAME_REGEX = /^(\d{4}-\d{2}-\d{2})(?:-([a-z0-9-]{8,}))?-session\.tmp$/;
|
||||
// "2026-02-01-frontend-worktree-1-session.tmp", and
|
||||
// "2026-02-01-ChezMoi_2-session.tmp"
|
||||
const SESSION_FILENAME_REGEX = /^(\d{4}-\d{2}-\d{2})(?:-([a-zA-Z0-9_][a-zA-Z0-9_-]*))?-session\.tmp$/;
|
||||
|
||||
/**
|
||||
* Parse session filename to extract metadata
|
||||
|
||||
Reference in New Issue
Block a user