@fast-simon/dashboard-utilities 1.0.87 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ export declare const REASONING_USE_CACHE_LS_KEY = "reasoning_use_cache";
|
|
|
6
6
|
/**
|
|
7
7
|
* Gets the current cache setting from localStorage
|
|
8
8
|
* @returns {boolean} true if cache should be used (m=0), false if cache should be disabled (m=1)
|
|
9
|
-
* @default
|
|
9
|
+
* @default false (cache disabled for fresh results)
|
|
10
10
|
*/
|
|
11
11
|
export declare function getUseCacheSetting(): boolean;
|
|
12
12
|
/**
|
|
@@ -6,13 +6,13 @@ export const REASONING_USE_CACHE_LS_KEY = "reasoning_use_cache";
|
|
|
6
6
|
/**
|
|
7
7
|
* Gets the current cache setting from localStorage
|
|
8
8
|
* @returns {boolean} true if cache should be used (m=0), false if cache should be disabled (m=1)
|
|
9
|
-
* @default
|
|
9
|
+
* @default false (cache disabled for fresh results)
|
|
10
10
|
*/
|
|
11
11
|
export function getUseCacheSetting() {
|
|
12
12
|
const value = localStorage.getItem(REASONING_USE_CACHE_LS_KEY);
|
|
13
|
-
// Default to
|
|
13
|
+
// Default to false (cache disabled) if not set
|
|
14
14
|
if (value === null) {
|
|
15
|
-
return
|
|
15
|
+
return false;
|
|
16
16
|
}
|
|
17
17
|
return value === "true";
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCacheSettings.js","sourceRoot":"","sources":["../../src/utils/getCacheSettings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAEhE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAC9B,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC/D
|
|
1
|
+
{"version":3,"file":"getCacheSettings.js","sourceRoot":"","sources":["../../src/utils/getCacheSettings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAEhE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAC9B,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC/D,+CAA+C;IAC/C,IAAI,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO,KAAK,CAAC;KAChB;IACD,OAAO,KAAK,KAAK,MAAM,CAAC;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAiB;IAChD,YAAY,CAAC,OAAO,CAAC,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["/**\n * Cache settings utility for AI Explainer reasoning requests\n * Controls whether to use cached results (m=0) or force fresh results (m=1)\n */\n\nexport const REASONING_USE_CACHE_LS_KEY = \"reasoning_use_cache\";\n\n/**\n * Gets the current cache setting from localStorage\n * @returns {boolean} true if cache should be used (m=0), false if cache should be disabled (m=1)\n * @default false (cache disabled for fresh results)\n */\nexport function getUseCacheSetting(): boolean {\n const value = localStorage.getItem(REASONING_USE_CACHE_LS_KEY);\n // Default to false (cache disabled) if not set\n if (value === null) {\n return false;\n }\n return value === \"true\";\n}\n\n/**\n * Sets the cache setting in localStorage\n * @param {boolean} useCache - true to enable cache (m=0), false to disable (m=1)\n */\nexport function setUseCacheSetting(useCache: boolean): void {\n localStorage.setItem(REASONING_USE_CACHE_LS_KEY, JSON.stringify(useCache));\n}\n"]}
|