import React, { useState } from 'react'; import { useAppTranslation } from '@features/localization/renderer'; import { Button } from '@renderer/components/ui/button'; import { ChevronDown, ChevronRight, ExternalLink, Info } from 'lucide-react'; const OPENCODE_CONFIG_DOCS_URL = 'https://opencode.ai/docs/config/'; const OPENCODE_PROVIDERS_DOCS_URL = 'https://opencode.ai/docs/providers'; const OPENCODE_CONTEXT_CONFIG_EXAMPLE = `{ "$schema": "https://opencode.ai/config.json", "provider": { "local": { "models": { "your-model": { "limit": { "context": 10000, "output": 2000 } } } } }, "compaction": { "auto": true, "prune": true, "reserved": 2000 } }`; export const OpenCodeContextConfigHint = (): React.JSX.Element => { const { t } = useAppTranslation('team'); const [expanded, setExpanded] = useState(false); return (
{t('openCodeContextConfigHint.description')}
{OPENCODE_CONTEXT_CONFIG_EXAMPLE}
{t('openCodeContextConfigHint.replacePrefix')} local{' '}
{t('openCodeContextConfigHint.and')} your-model{' '}
{t('openCodeContextConfigHint.replaceSuffix')}{' '}
stay below 10000 tokens{' '}
{t('openCodeContextConfigHint.promptInstructionsSuffix')}