chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-28 05:15:21 +00:00
parent 16234a0baf
commit e5524f5bf9
+8 -8
View File
@@ -553,9 +553,8 @@ function makeDirectoryService(sdk: OpencodeClient) {
function makeUsageService(sdk: OpencodeClient) {
const limits = new Map<string, Promise<number | undefined>>()
const contextLimit: UsageService.Interface["contextLimit"] = Effect.fn("ACPNext.promptUsage.contextLimit")(function* (
params,
) {
const contextLimit: UsageService.Interface["contextLimit"] = Effect.fn("ACPNext.promptUsage.contextLimit")(
function* (params) {
const key = `${params.directory}\u0000${params.providerID}\u0000${params.modelID}`
const current = limits.get(key)
if (current) return yield* Effect.promise(() => current)
@@ -574,11 +573,11 @@ function makeUsageService(sdk: OpencodeClient) {
})
limits.set(key, next)
return yield* Effect.promise(() => next)
})
},
)
const sendUpdate: UsageService.Interface["sendUpdate"] = Effect.fn("ACPNext.promptUsage.sendUpdate")(function* (
params,
) {
const sendUpdate: UsageService.Interface["sendUpdate"] = Effect.fn("ACPNext.promptUsage.sendUpdate")(
function* (params) {
const messages = yield* request(
() =>
sdk.session.messages(
@@ -625,7 +624,8 @@ function makeUsageService(sdk: OpencodeClient) {
log.error("failed to send usage update", { error })
}),
)
})
},
)
return UsageService.Service.of({
buildUsage: UsageService.buildUsage,