/** * Component: BookDate Settings Tab * Documentation: documentation/settings-pages.md */ 'use client'; import React from 'react'; import { Button } from '@/components/ui/Button'; import { Input } from '@/components/ui/Input'; import { useBookDateSettings } from './useBookDateSettings'; interface BookDateTabProps { onSuccess: (message: string) => void; onError: (message: string) => void; } export function BookDateTab({ onSuccess, onError }: BookDateTabProps) { const { provider, apiKey, model, baseUrl, enabled, configured, models, testing, saving, clearingSwipes, setProvider, setApiKey, setModel, setBaseUrl, setEnabled, setModels, testConnection, saveConfig, clearSwipes, } = useBookDateSettings(); return (
Configure global AI-powered audiobook recommendations. All users share this API key, but receive personalized recommendations based on their individual library and ratings.
{enabled ? 'Feature is currently enabled' : 'Feature is currently disabled'}
Examples:
• Ollama: http://localhost:11434/v1
• LM Studio: http://localhost:1234/v1
• vLLM: http://localhost:8000/v1
{provider === 'custom' ? 'Optional: Leave blank if your endpoint does not require authentication (e.g., Ollama, LM Studio)' : 'The API key is stored securely and encrypted. Leave blank to keep existing key.'}
Note: Library scope and custom prompt preferences are now configured per-user. Users can adjust these settings in their BookDate preferences (settings icon on the BookDate page).
Remove all swipe history and cached recommendations for ALL users. This will reset everyone's BookDate recommendations.