mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
fix(core): refresh model catalog every five minutes (#38142)
Co-authored-by: Victor Navarro <36263538+vimtor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
69d7c2add7
commit
023f76f6fc
@@ -651,7 +651,7 @@ export const layer = (options?: Options) => Layer.effect(
|
||||
|
||||
if (fetch && !process.argv.includes("--get-yargs-completions")) {
|
||||
// Schedule.spaced runs the effect once, then waits between completions.
|
||||
yield* Effect.forkScoped(refresh().pipe(Effect.repeat(Schedule.spaced("60 minutes")), Effect.ignore))
|
||||
yield* Effect.forkScoped(refresh().pipe(Effect.repeat(Schedule.spaced(ttl)), Effect.ignore))
|
||||
}
|
||||
|
||||
return Service.of({ get, refresh })
|
||||
|
||||
Reference in New Issue
Block a user