diff --git a/src/main.ts b/src/main.ts index c05857a..c941450 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,9 +9,9 @@ const execAsync = promisify(exec); function extractSessionNameFromId(sessionId: string): string { if (!sessionId) return 'session'; - // Match pattern: -Users-${whoami}-workspace-${sessionType}-${sessionName} - // Extract the session name (the part after the second dash after workspace) - const match = sessionId.match(/-workspace-[^-]+-([^-]+)/); + // Match pattern: -Users-${whoami}-workspace-${sessionType}-${sessionName} + // Extract the session name (everything after workspace-type-) + const match = sessionId.match(/-workspace-[^-]+-(.+)/); if (match && match[1]) { return match[1]; }