feat(agent): update pi packages to 0.82.1 and implement new SessionStorage interface methods

This commit is contained in:
yiling
2026-08-03 10:25:10 +08:00
parent 16d136b45a
commit dbe3420b6c
10 changed files with 116 additions and 40 deletions
@@ -212,6 +212,30 @@ export class DatabaseSessionStorage implements SessionStorage<DatabaseSessionMet
return (entry as { label?: string } | undefined)?.label
}
async getSessionName(): Promise<string | undefined> {
return undefined
}
async getSessionStats(): Promise<{
messageCount: number
cachedTokens: number
uncachedTokens: number
totalTokens: number
costTotal: number
}> {
return {
messageCount: 0,
cachedTokens: 0,
uncachedTokens: 0,
totalTokens: 0,
costTotal: 0,
}
}
async getPathToRootOrCompaction(leafId: string | null): Promise<SessionTreeEntry[]> {
return this.getPathToRoot(leafId)
}
async getPathToRoot(leafId: string | null): Promise<SessionTreeEntry[]> {
if (!leafId) return []