mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Default to OpenCode Zen with big-pickle model for zero-config first experience
Pre-configure OpenCode Zen as the default AI provider so new users can submit prompts immediately without any setup. Sends x-opencode-* headers to qualify for the higher daily rate limit tier.
This commit is contained in:
5 files changed
+38
-27
No files matched your search
@@ -4,22 +4,17 @@ import { AISettingsContext, type AISettings, type AIProvider, type MCPServer, ty
|
||||
import { useFS } from '@/hooks/useFS';
|
||||
import { useFSPaths } from '@/hooks/useFSPaths';
|
||||
import { readAISettings, writeAISettings } from '@/lib/configUtils';
|
||||
import { OPENCODE_DEFAULT_SETTINGS } from '@/lib/opencode-defaults';
|
||||
|
||||
interface AISettingsProviderProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
const DEFAULT_SETTINGS: AISettings = {
|
||||
providers: [],
|
||||
recentlyUsedModels: [],
|
||||
mcpServers: {},
|
||||
};
|
||||
|
||||
export function AISettingsProvider({ children }: AISettingsProviderProps) {
|
||||
const queryClient = useQueryClient();
|
||||
const { fs } = useFS();
|
||||
const { configPath } = useFSPaths();
|
||||
const [settings, setSettings] = useState<AISettings>(DEFAULT_SETTINGS);
|
||||
const [settings, setSettings] = useState<AISettings>(OPENCODE_DEFAULT_SETTINGS);
|
||||
const [isInitialized, setIsInitialized] = useState(false);
|
||||
|
||||
// Initialize settings from VFS on mount
|
||||
@@ -30,7 +25,7 @@ export function AISettingsProvider({ children }: AISettingsProviderProps) {
|
||||
setSettings(settings);
|
||||
} catch (error) {
|
||||
console.error('Failed to initialize AI settings:', error);
|
||||
setSettings(DEFAULT_SETTINGS);
|
||||
setSettings(OPENCODE_DEFAULT_SETTINGS);
|
||||
} finally {
|
||||
setIsInitialized(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user