(projectPath?: string | undefined | null | undefined)
| 15 | } |
| 16 | |
| 17 | export async function getPiSessionStorage(projectPath?: string | undefined | null | undefined) { |
| 18 | const { SettingsManager, SessionManager, getAgentDir } = await getPiModule() |
| 19 | const cwd = projectPath ?? getDesktopWorkingDirectory() |
| 20 | const agentDir = getAgentDir() |
| 21 | const settingsManager = SettingsManager.create(cwd, agentDir) |
| 22 | const configuredSessionDir = settingsManager.getSessionDir() |
| 23 | |
| 24 | return { |
| 25 | agentDir, |
| 26 | sessionDir: configuredSessionDir ?? SessionManager.create(cwd).getSessionDir(), |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | export async function loadPiSettingsInHost( |
| 31 | projectPath?: string | undefined | null | undefined, |
no test coverage detected