refactor(core): spell out non-nullable token usage type

This commit is contained in:
Aiden Cline
2026-09-24 23:41:30 -05:00
parent 622aa81a8b
commit a1a43964d9
+1 -1
View File
@@ -174,7 +174,7 @@ export interface Interface extends State.Transformable<Editor> {
export class Service extends Context.Service<Service, Interface>()("@opencode/SessionCompaction") {}
const inputTokens = (tokens: SessionMessage.Assistant["tokens"] & {}) =>
const inputTokens = (tokens: NonNullable<SessionMessage.Assistant["tokens"]>) =>
tokens.input + tokens.cache.read + tokens.cache.write
const hasInputUsage = (message: SessionMessage.Info) =>