feat: add column pinning (freeze) functionality in Pricing Units tab

- Add Pin Columns button to select columns to freeze
- Implement sticky columns with left positioning for pinned columns
- Support pinning dynamic pricing and container columns
- Add Pin icon indicator on pinned columns
- Include reset and unpin all options in pin panel
This commit is contained in:
Christian Vidal Wolf
2026-04-24 13:23:18 +02:00
parent b8a960e3e5
commit e6207dff64
3 changed files with 278 additions and 47 deletions
+13 -7
View File
@@ -13,13 +13,12 @@ export async function generateGemini(prompt: string, systemPrompt: string): Prom
throw new Error('Gemini API Key not found. Please set VITE_GEMINI_API_KEY in .env or GEMINI_API_KEY in localStorage.');
}
// Model fallback list - updated for March 2026
// Model fallback list - using current stable and experimental versions
const modelOptions = [
'gemini-2.5-flash',
'gemini-2.5-flash-lite',
'gemini-2.5-pro',
'gemini-2.0-flash',
'gemini-1.5-flash'
'gemini-1.5-flash',
'gemini-1.5-pro',
'gemini-2.0-flash-exp',
'gemini-2.0-flash'
];
let lastError: any = null;
@@ -61,5 +60,12 @@ export async function generateGemini(prompt: string, systemPrompt: string): Prom
}
}
throw new Error(lastError?.error?.message || lastError?.message || 'All Gemini models failed. Check console for details.');
let errorMessage = lastError?.error?.message || lastError?.message || 'All Gemini models failed.';
// Check if it's a quota error (429)
if (lastError?.error?.code === 429 || lastError?.status === 429 || errorMessage.toLowerCase().includes('quota') || errorMessage.toLowerCase().includes('429')) {
errorMessage = 'Gemini API quota exceeded. You may need to wait or switch to a paid billing plan in Google AI Studio.';
}
throw new Error(errorMessage + ' Check console for details.');
}