diff --git a/scripts/setup-pb-collections.mjs b/scripts/setup-pb-collections.mjs index b3da9a2..f457221 100644 --- a/scripts/setup-pb-collections.mjs +++ b/scripts/setup-pb-collections.mjs @@ -21,6 +21,7 @@ const COLLECTIONS = [ type: 'base', ...OPEN_RULES, fields: [ + { name: 'id', type: 'text', primaryKey: true, system: true, min: 1, max: 255, pattern: '^[a-zA-Z0-9_-]+$' }, { name: 'label', type: 'text', required: true }, { name: 'type', type: 'text', required: false }, { name: 'description', type: 'text', required: false }, diff --git a/src/pages/Admin/index.jsx b/src/pages/Admin/index.jsx index 22849e0..7f5b552 100644 --- a/src/pages/Admin/index.jsx +++ b/src/pages/Admin/index.jsx @@ -16,7 +16,6 @@ import { Trash2 } from 'lucide-react'; const Admin = () => { const [activeTab, setActiveTab] = useState('sources'); const [sources, setSources] = useState([]); - const [apiKey, setApiKey] = useState(''); const [model, setModel] = useState(''); const [useSimulation, setUseSimulation] = useState(false); const [saveStatus, setSaveStatus] = useState(null); @@ -31,7 +30,6 @@ const Admin = () => { loadSources(); } if (activeTab === 'settings') { - setApiKey(storage.get('admin:anthropic_key', '')); setModel(storage.get('admin:model', 'claude-sonnet-4-20250514')); setUseSimulation(storage.get('admin:use_simulation', false)); } @@ -39,7 +37,6 @@ const Admin = () => { const saveSettings = (e) => { e.preventDefault(); - storage.set('admin:anthropic_key', apiKey.trim()); storage.set('admin:model', model.trim()); storage.set('admin:use_simulation', useSimulation); setSaveStatus('Saved!'); @@ -170,13 +167,6 @@ const Admin = () => {

AI Configuration

- setApiKey(e.target.value)} - />
{ />

Leave blank for the default. Check your Anthropic Console for available models.

-

- Your API key is stored locally in your browser's localStorage. +

+ Note: Your Anthropic API key is securely managed on the server side via environment variables.