1111 */
1212
1313import * as fs from 'fs' ;
14+ import * as os from 'os' ;
1415import * as path from 'path' ;
1516
16- export {
17+ import {
1718 encodeWorkspacePath ,
1819 getSessionDirectory ,
1920 discoverSessionDirectory ,
@@ -26,6 +27,19 @@ export {
2627 getAllProjectFolders ,
2728} from 'sidekick-shared/dist/parsers/sessionPathResolver' ;
2829
30+ export {
31+ encodeWorkspacePath ,
32+ getSessionDirectory ,
33+ discoverSessionDirectory ,
34+ findActiveSession ,
35+ findAllSessions ,
36+ findSessionsInDirectory ,
37+ findSubdirectorySessionDirs ,
38+ getMostRecentlyActiveSessionDir ,
39+ decodeEncodedPath ,
40+ getAllProjectFolders ,
41+ } ;
42+
2943// Re-export ProjectFolderInfo from the shared type (used by session providers)
3044export type { ProjectFolderInfo } from 'sidekick-shared/dist/providers/types' ;
3145
@@ -51,18 +65,9 @@ export interface SessionDiagnostics {
5165 * VS Code extension-only (used by debug commands).
5266 */
5367export function getSessionDiagnostics ( workspacePath : string ) : SessionDiagnostics {
54- // Import from shared at runtime to avoid circular dependencies
55- const {
56- encodeWorkspacePath,
57- getSessionDirectory,
58- discoverSessionDirectory,
59- findSubdirectorySessionDirs,
60- getMostRecentlyActiveSessionDir,
61- } = require ( 'sidekick-shared/dist/parsers/sessionPathResolver' ) ;
62-
6368 const encodedPath = encodeWorkspacePath ( workspacePath ) ;
6469 const expectedSessionDir = getSessionDirectory ( workspacePath ) ;
65- const projectsDir = path . join ( require ( 'os' ) . homedir ( ) , '.claude' , 'projects' ) ;
70+ const projectsDir = path . join ( os . homedir ( ) , '.claude' , 'projects' ) ;
6671
6772 let existingProjectDirs : string [ ] = [ ] ;
6873 let expectedDirExists = false ;
0 commit comments