Skip to content

Commit

Permalink
Merge pull request #2501 from Agenta-AI/oss-hot-fix/-remove-unused-ca…
Browse files Browse the repository at this point in the history
…ched-value-checks-in-appSchemaMiddleware

[AGE-1540](frontend): Latest variant version is not shown in the Configure evaluator
  • Loading branch information
jp-agenta authored Feb 20, 2025
2 parents fe02460 + fb41896 commit 5e8f1e5
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ const appSchemaMiddleware: PlaygroundMiddleware = (useSWRNext: SWRHook) => {
}
const cachedValue = cache.get(url)?.data

if (cachedValue) {
if (
!config.initialVariants ||
(!!config.initialVariants &&
isEqual(
cachedValue.variants.map((v) => v.id),
config.initialVariants.map((v) => v.id),
))
) {
return cachedValue
}
}

let state = structuredClone(cachedValue || initialState) as Data

if (!fetcher) {
Expand Down Expand Up @@ -115,8 +102,6 @@ const appSchemaMiddleware: PlaygroundMiddleware = (useSWRNext: SWRHook) => {
compare: (a, b) => {
return isEqual(a, b)
},
revalidateOnFocus: false,
revalidateOnReconnect: false,
})
}
return useImplementation({key, fetcher, config})
Expand Down

0 comments on commit 5e8f1e5

Please sign in to comment.