⚙️ Settings
-
+
Define your daily macros goal
-
+
+
+
AI Nutrition Cache
+
+
+
+
+ Cached Items:
+ 0
+
+
+ Cache Size:
+ 0 KB
+
+
+
+
diff --git a/settings.css b/settings.css
index 930879e..1baef4c 100644
--- a/settings.css
+++ b/settings.css
@@ -51,3 +51,50 @@
border: 1px solid #5A7BC4;
transform: translateY(-1px);
}
+
+.cache-info-section {
+ backdrop-filter: blur(10px);
+ border-radius: 10px;
+ padding: 25px;
+ min-width: 300px;
+ background: rgba(40, 40, 40, 0.9);
+ border: 1px solid rgba(100, 100, 100, 0.3);
+ margin-top: 20px;
+}
+
+.cache-stats {
+ display: flex;
+ flex-direction: column;
+ gap: 15px;
+ margin-bottom: 20px;
+}
+
+.cache-stat-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 10px;
+ background: rgba(60, 60, 60, 0.5);
+ border-radius: 6px;
+}
+
+.cache-stat-label {
+ color: #b0b0b0;
+ font-size: 0.95rem;
+}
+
+.cache-stat-value {
+ color: #e0e0e0;
+ font-size: 1.1rem;
+ font-weight: 600;
+}
+
+.clear-cache-btn {
+ background: #d66b6b;
+ border: 1px solid #d66b6b;
+}
+
+.clear-cache-btn:hover {
+ background: #c45a5a;
+ border: 1px solid #c45a5a;
+}
diff --git a/src/claudeService.ts b/src/claudeService.ts
index 7cb0592..0e5fbdd 100644
--- a/src/claudeService.ts
+++ b/src/claudeService.ts
@@ -15,37 +15,56 @@ export interface NutritionInfo {
notes: string;
}
-// In-memory cache for nutrition info
-// Key format: "foodName_grams" (e.g., "apple_100", "chicken breast_150")
-const nutritionCache = new Map