mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 14:19:24 +00:00
feat(agent): update pi packages to 0.82.1 and implement new SessionStorage interface methods
This commit is contained in:
@@ -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 []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user