mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
refactor(core): spell out non-nullable token usage type
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user