feat(sessions): show token usage and estimated cost in logs (#557)

* feat(sessions): show token usage and estimated cost in logs

* fix(sessions): compact the usage footer

* fix(ci): bypass Bun cache for Windows ARM64
This commit is contained in:
Yiling-J
2026-12-01 20:49:07 +08:00
committed by GitHub
parent e3fe5792b9
commit bfeabb8244
16 changed files with 292 additions and 60 deletions
+7
View File
@@ -1,5 +1,7 @@
import type { EntryRecord } from '@earendil-works/pi-durable'
import { AgentType } from '@shumai/db/enums'
import { z } from 'zod'
import type { AiUsageMetrics } from './ai'
export * from './agent-avatar'
@@ -143,3 +145,8 @@ export const agentSessionSchema = z.object({
agentId: z.string().optional(),
})
export type AgentSessionInfo = z.infer<typeof agentSessionSchema>
export interface AgentSessionLogs {
entries: EntryRecord[]
usage: AiUsageMetrics | null
}