Move rest of state to cache (#5404)

* move rest of state to cacheService

* finish moving state to cache

* remove console logs

* fix types

* don't type cast

* add eslint rule banning use of direct storage apis

* fix types

* move vscode state eslint rule to separate rule since it's error and the others aren't

* fix eslint rules parsing
This commit is contained in:
celestial-vault authored and GitHub committed 2025-08-11 14:46:39 -07:00
1 parent 2aa5156905
commit 669e018b85
52 files changed
+1472 -1096

No files matched your search

@@ -2,7 +2,6 @@ import { Controller } from ".."
import { EmptyRequest } from "@shared/proto/cline/common"
import { OpenRouterCompatibleModelInfo, OpenRouterModelInfo } from "@shared/proto/cline/models"
import axios from "axios"
import { getSecret } from "@core/storage/state"
/**
* Refreshes the Requesty models and returns the updated model list
@@ -20,7 +19,7 @@ export async function refreshRequestyModels(controller: Controller, _: EmptyRequ
let models: Record<string, OpenRouterModelInfo> = {}
try {
const apiKey = await getSecret(controller.context, "requestyApiKey")
const apiKey = controller.cacheService.getSecretKey("requestyApiKey")
const headers = {
Authorization: `Bearer ${apiKey}`,
}