mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-06 07:59:50 +00:00
fix(opencode): avoid caching missing question results
This commit is contained in:
parent
6186ae5e43
commit
08bef1696d
1 changed files with 3 additions and 1 deletions
|
|
@ -202,7 +202,9 @@ export const layer = Layer.effect(
|
|||
const info = yield* InstanceState.get(state)
|
||||
const pending = info.pending.get(requestID)
|
||||
if (pending) return yield* Deferred.await(pending.deferred)
|
||||
return yield* Cache.get(info.completed, requestID)
|
||||
return yield* Cache.get(info.completed, requestID).pipe(
|
||||
Effect.tapError(() => Cache.invalidateWhen(info.completed, requestID, () => true)),
|
||||
)
|
||||
})
|
||||
|
||||
const ask = Effect.fn("Question.ask")(function* (input: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue