fix(ui): 설정 화면 검색 제공자 — 서버값 ollama_cloud를 'ollama' 선택지로 매핑(빈 값으로 저장돼 설정이 덮이는 것 방지), 선택지 이름을 'Ollama 웹검색 (+ SearXNG 병행)'으로
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4968bdf9f7
commit
3491c93ebe
3 files changed
+7
-5
No files matched your search
@@ -879,7 +879,7 @@
|
||||
<select id="settings-provider" onchange="toggleOllamaModelRow(this.value);toggleSearxngUrlRow(this.value)" style="width:100%;border:1px solid var(--line);border-radius:10px;padding:8px;font-size:13px">
|
||||
<option value="searxng">SearXNG (셀프호스트)</option>
|
||||
<option value="ddg">DuckDuckGo</option>
|
||||
<option value="ollama">Ollama (모델 보조 검색)</option>
|
||||
<option value="ollama">Ollama 웹검색 (+ SearXNG 병행)</option>
|
||||
<option value="tavily">Tavily</option>
|
||||
<option value="google">Google CSE</option>
|
||||
<option value="brave">Brave</option>
|
||||
|
||||
@@ -769,7 +769,8 @@ async function saveSettings() {
|
||||
if (!_searchSettingsLoaded) {
|
||||
try {
|
||||
const s = await api('/api/settings/search');
|
||||
document.getElementById('settings-provider').value = s.preferred_provider || '';
|
||||
// 서버 내부 이름 'ollama_cloud'는 화면 선택지 'ollama'와 같은 것이다 — 매핑 안 하면 select가 빈 값이 돼 저장 때 덮어쓴다.
|
||||
document.getElementById('settings-provider').value = s.preferred_provider === 'ollama_cloud' ? 'ollama' : (s.preferred_provider || '');
|
||||
document.getElementById('settings-search-rigor').value = s.search_rigor || 'verified';
|
||||
if (document.getElementById('settings-search-searxng-url'))
|
||||
document.getElementById('settings-search-searxng-url').value = s.searxng_url || '';
|
||||
|
||||
@@ -862,14 +862,15 @@ async function openSettings(tab) {
|
||||
} catch {}
|
||||
try {
|
||||
const s = await api('/api/settings/search');
|
||||
document.getElementById('settings-provider').value = s.preferred_provider || 'ddg';
|
||||
const _uiProvider = s.preferred_provider === 'ollama_cloud' ? 'ollama' : (s.preferred_provider || 'ddg');
|
||||
document.getElementById('settings-provider').value = _uiProvider;
|
||||
document.getElementById('settings-search-rigor').value = s.search_rigor || 'verified';
|
||||
if (document.getElementById('settings-search-ollama-model'))
|
||||
document.getElementById('settings-search-ollama-model').value = s.ollama_model || '';
|
||||
if (document.getElementById('settings-search-searxng-url'))
|
||||
document.getElementById('settings-search-searxng-url').value = s.searxng_url || '';
|
||||
toggleOllamaModelRow(s.preferred_provider);
|
||||
toggleSearxngUrlRow(s.preferred_provider);
|
||||
toggleOllamaModelRow(_uiProvider);
|
||||
toggleSearxngUrlRow(_uiProvider);
|
||||
_searchSettingsLoaded = true;
|
||||
// Keys are loaded via the Credentials tab — not here
|
||||
} catch {}
|
||||
|
||||
Reference in new issue
Block a user