GitHub Actions commited on
Commit
68e25b1
ยท
1 Parent(s): 35c5064

Auto-deploy from GitHub Actions - 2025-12-12 07:33:00

Browse files
Files changed (1) hide show
  1. templates/index.html +89 -83
templates/index.html CHANGED
@@ -1553,9 +1553,9 @@
1553
  <button class="modal-close" onclick="closeWebnovelsModal()">&times;</button>
1554
  </div>
1555
  <div class="modal-body" style="display: flex; flex-direction: column; height: calc(90vh - 120px);">
1556
- <div style="margin-bottom: 16px;">
1557
  <select id="webnovelModelFilter" onchange="loadWebnovels()" style="width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary);">
1558
- <option value="">๋ชจ๋“  ๋ชจ๋ธ</option>
1559
  </select>
1560
  </div>
1561
  <div id="webnovelsList" style="flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 12px;">
@@ -1680,10 +1680,12 @@
1680
  async function loadNovels() {
1681
  try {
1682
  // ๋ชจ๋ธ์ด ์„ ํƒ๋˜์–ด ์žˆ์œผ๋ฉด ํ•ด๋‹น ๋ชจ๋ธ์˜ ํŒŒ์ผ๋งŒ, ์—†์œผ๋ฉด ๋ชจ๋“  ํŒŒ์ผ
1683
- // ๊ณต๊ฐœ ํŒŒ์ผ๋งŒ ์กฐํšŒ (public_only=true)
1684
- const url = selectedModel
1685
- ? `/api/files?model_name=${encodeURIComponent(selectedModel)}&public_only=true`
1686
- : '/api/files?public_only=true';
 
 
1687
 
1688
  console.log('[์›น์†Œ์„ค ๋ชฉ๋ก] API ์š”์ฒญ:', url, '์„ ํƒ๋œ ๋ชจ๋ธ:', selectedModel || '์—†์Œ (์ „์ฒด)');
1689
 
@@ -1709,22 +1711,8 @@
1709
  let files = data.files || [];
1710
  console.log('[์›น์†Œ์„ค ๋ชฉ๋ก] ํŒŒ์ผ ๊ฐœ์ˆ˜:', files.length);
1711
 
1712
- // ๋ชจ๋ธ์ด ์„ ํƒ๋˜์–ด ์žˆ๋Š”๋ฐ ํ•ด๋‹น ๋ชจ๋ธ์˜ ํŒŒ์ผ์ด ์—†์œผ๋ฉด, ๋ชจ๋“  ํŒŒ์ผ ๋‹ค์‹œ ์กฐํšŒ (๊ณต๊ฐœ ํŒŒ์ผ๋งŒ)
1713
- if (selectedModel && files.length === 0) {
1714
- console.log('[์›น์†Œ์„ค ๋ชฉ๋ก] ์„ ํƒํ•œ ๋ชจ๋ธ์— ํŒŒ์ผ์ด ์—†์–ด ์ „์ฒด ํŒŒ์ผ ์กฐํšŒ ์ค‘...');
1715
- try {
1716
- const allFilesResponse = await fetch('/api/files?public_only=true', {
1717
- credentials: 'include'
1718
- });
1719
- if (allFilesResponse.ok) {
1720
- const allFilesData = await allFilesResponse.json();
1721
- files = allFilesData.files || [];
1722
- console.log('[์›น์†Œ์„ค ๋ชฉ๋ก] ์ „์ฒด ํŒŒ์ผ ๊ฐœ์ˆ˜:', files.length);
1723
- }
1724
- } catch (e) {
1725
- console.error('[์›น์†Œ์„ค ๋ชฉ๋ก] ์ „์ฒด ํŒŒ์ผ ์กฐํšŒ ์˜ค๋ฅ˜:', e);
1726
- }
1727
- }
1728
 
1729
  if (files.length > 0) {
1730
  files.forEach(file => {
@@ -1755,8 +1743,8 @@
1755
  });
1756
  updateSelectedNovelsInfo();
1757
  } else {
1758
- // ๋ชจ๋“  ํŒŒ์ผ์„ ์กฐํšŒํ–ˆ๋Š”๋ฐ๋„ ์—†์œผ๋ฉด ์ง„์งœ ์—†๋Š” ๊ฒƒ
1759
- novelList.innerHTML = '<div class="novel-item-empty">์—…๋กœ๋“œ๋œ ์›น์†Œ์„ค์ด ์—†์Šต๋‹ˆ๋‹ค</div>';
1760
  selectedNovelsInfo.textContent = '';
1761
  }
1762
  } catch (error) {
@@ -1892,24 +1880,19 @@
1892
  const response = await fetch('/api/ollama/models');
1893
  const data = await response.json();
1894
 
1895
- modelSelect.innerHTML = '<option value="">๋ชจ๋ธ์„ ์„ ํƒํ•˜์„ธ์š”...</option>';
1896
 
1897
- // ๊ธฐ๋ณธ ๋ชจ๋ธ ์„ค์ • ๊ฐ€์ ธ์˜ค๊ธฐ (localStorage์— ์„ ํƒ๋œ ๋ชจ๋ธ์ด ์—†์„ ๋•Œ๋งŒ ์‚ฌ์šฉ)
1898
- let defaultAnalysisModel = null;
 
 
 
 
 
 
1899
  if (!selectedModel) {
1900
- try {
1901
- const defaultResponse = await fetch('/api/default-models');
1902
- if (defaultResponse.ok) {
1903
- const defaultData = await defaultResponse.json();
1904
- defaultAnalysisModel = defaultData.default_analysis_model || null;
1905
- if (defaultAnalysisModel) {
1906
- selectedModel = defaultAnalysisModel;
1907
- localStorage.setItem('selectedModel', selectedModel);
1908
- }
1909
- }
1910
- } catch (e) {
1911
- console.log('๊ธฐ๋ณธ ๋ชจ๋ธ ์„ค์ • ๋กœ๋“œ ์‹คํŒจ:', e);
1912
- }
1913
  }
1914
 
1915
  if (data.models && data.models.length > 0) {
@@ -1925,15 +1908,18 @@
1925
  }
1926
  });
1927
 
1928
- // ๋“œ๋กญ๋‹ค์šด์— ์ถ”๊ฐ€
1929
- // Ollama ๋ชจ๋ธ ๊ทธ๋ฃน
1930
- if (ollamaModels.length > 0) {
1931
  const optgroup = document.createElement('optgroup');
1932
- optgroup.label = '๐Ÿค– Ollama ๋ชจ๋ธ';
1933
- ollamaModels.forEach(model => {
1934
  const option = document.createElement('option');
1935
  option.value = model.name;
1936
- option.textContent = model.name;
 
 
 
 
1937
  if (model.name === selectedModel) {
1938
  option.selected = true;
1939
  }
@@ -1942,18 +1928,14 @@
1942
  modelSelect.appendChild(optgroup);
1943
  }
1944
 
1945
- // Gemini ๋ชจ๋ธ ๊ทธ๋ฃน
1946
- if (geminiModels.length > 0) {
1947
  const optgroup = document.createElement('optgroup');
1948
- optgroup.label = 'โœจ Gemini ๋ชจ๋ธ';
1949
- geminiModels.forEach(model => {
1950
  const option = document.createElement('option');
1951
  option.value = model.name;
1952
- // "gemini:" ์ ‘๋‘์‚ฌ ์ œ๊ฑฐํ•˜์—ฌ ํ‘œ์‹œ
1953
- const displayName = model.name.startsWith('gemini:')
1954
- ? model.name.substring(7)
1955
- : model.name;
1956
- option.textContent = displayName;
1957
  if (model.name === selectedModel) {
1958
  option.selected = true;
1959
  }
@@ -1962,18 +1944,29 @@
1962
  modelSelect.appendChild(optgroup);
1963
  }
1964
 
1965
- // ๊ธฐ๋ณธ ๋ชจ๋ธ์ด ์„ค์ •๋˜์–ด ์žˆ๊ณ  ์„ ํƒ๋˜์—ˆ์œผ๋ฉด ๋ชจ๋ธ ์„ ํƒ ์ด๋ฒคํŠธ ํŠธ๋ฆฌ๊ฑฐ
1966
- if (defaultAnalysisModel && modelSelect.value === defaultAnalysisModel) {
1967
- modelSelect.dispatchEvent(new Event('change'));
1968
  }
1969
 
1970
  updateModelStatus('connected');
1971
  } else {
1972
- updateModelStatus('error', '์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ์ด ์—†์Šต๋‹ˆ๋‹ค');
 
1973
  }
1974
  } catch (error) {
1975
  updateModelStatus('error', '๋ชจ๋ธ ๋ชฉ๋ก ๋กœ๋“œ ์‹คํŒจ');
1976
  console.error('๋ชจ๋ธ ๋กœ๋“œ ์˜ค๋ฅ˜:', error);
 
 
 
 
 
 
 
 
 
 
1977
  } finally {
1978
  refreshModelsBtn.disabled = false;
1979
  refreshModelsBtn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg> ๋ชจ๋ธ ์ƒˆ๋กœ๊ณ ์นจ';
@@ -2759,44 +2752,57 @@
2759
  async function showWebnovelsModal() {
2760
  const modal = document.getElementById('webnovelsModal');
2761
  modal.style.display = 'block';
2762
- await loadWebnovels();
2763
- await loadWebnovelModelFilter();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2764
  }
2765
 
2766
  function closeWebnovelsModal() {
2767
  document.getElementById('webnovelsModal').style.display = 'none';
2768
  }
2769
 
 
2770
  async function loadWebnovelModelFilter() {
2771
- try {
2772
- const response = await fetch('/api/ollama/models');
2773
- if (!response.ok) throw new Error('๋ชจ๋ธ ๋ชฉ๋ก์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.');
2774
- const data = await response.json();
2775
- const models = data.models || [];
2776
-
2777
- const filter = document.getElementById('webnovelModelFilter');
2778
- filter.innerHTML = '<option value="">๋ชจ๋“  ๋ชจ๋ธ</option>';
2779
- models.forEach(model => {
2780
- const option = document.createElement('option');
2781
- option.value = model.name;
2782
- option.textContent = model.name;
2783
- filter.appendChild(option);
2784
- });
2785
- } catch (error) {
2786
- console.error('๋ชจ๋ธ ํ•„ํ„ฐ ๋กœ๋“œ ์˜ค๋ฅ˜:', error);
2787
- }
2788
  }
2789
 
2790
- async function loadWebnovels() {
2791
  const listContainer = document.getElementById('webnovelsList');
2792
- const modelFilter = document.getElementById('webnovelModelFilter');
2793
- const modelName = modelFilter ? modelFilter.value : '';
 
2794
 
2795
  listContainer.innerHTML = '<div style="text-align: center; color: var(--text-secondary); padding: 24px;">์›น์†Œ์„ค ๋ชฉ๋ก์„ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘...</div>';
2796
 
2797
  try {
2798
- // ์ „์ฒด ๋ชจ๋ธ ์„ ํƒ ์‹œ ๊ณต๊ฐœ๋œ ๋ชจ๋“  ํŒŒ์ผ ์กฐํšŒ (public_only=true)
2799
- const url = modelName ? `/api/files?model_name=${encodeURIComponent(modelName)}` : '/api/files?public_only=true';
 
 
 
 
 
 
 
2800
  const response = await fetch(url);
2801
  if (!response.ok) throw new Error('์›น์†Œ์„ค ๋ชฉ๋ก์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.');
2802
 
 
1553
  <button class="modal-close" onclick="closeWebnovelsModal()">&times;</button>
1554
  </div>
1555
  <div class="modal-body" style="display: flex; flex-direction: column; height: calc(90vh - 120px);">
1556
+ <div style="margin-bottom: 16px; display: none;">
1557
  <select id="webnovelModelFilter" onchange="loadWebnovels()" style="width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary);">
1558
+ <option value="">์ „์ฒด ๋ชจ๋ธ</option>
1559
  </select>
1560
  </div>
1561
  <div id="webnovelsList" style="flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 12px;">
 
1680
  async function loadNovels() {
1681
  try {
1682
  // ๋ชจ๋ธ์ด ์„ ํƒ๋˜์–ด ์žˆ์œผ๋ฉด ํ•ด๋‹น ๋ชจ๋ธ์˜ ํŒŒ์ผ๋งŒ, ์—†์œผ๋ฉด ๋ชจ๋“  ํŒŒ์ผ
1683
+ // 'all'์ธ ๊ฒฝ์šฐ์—๋„ ๋ชจ๋“  ํŒŒ์ผ (public_only=true)
1684
+ let url = '/api/files?public_only=true';
1685
+
1686
+ if (selectedModel && selectedModel !== 'all') {
1687
+ url = `/api/files?model_name=${encodeURIComponent(selectedModel)}&public_only=true`;
1688
+ }
1689
 
1690
  console.log('[์›น์†Œ์„ค ๋ชฉ๋ก] API ์š”์ฒญ:', url, '์„ ํƒ๋œ ๋ชจ๋ธ:', selectedModel || '์—†์Œ (์ „์ฒด)');
1691
 
 
1711
  let files = data.files || [];
1712
  console.log('[์›น์†Œ์„ค ๋ชฉ๋ก] ํŒŒ์ผ ๊ฐœ์ˆ˜:', files.length);
1713
 
1714
+ // ํŒŒ์ผ์ด ์—†์œผ๋ฉด ์ „์ฒด ํŒŒ์ผ ์žฌ์กฐํšŒ ๋กœ์ง ์ œ๊ฑฐ (์‚ฌ์šฉ์ž ์š”์ฒญ์— ๋”ฐ๋ผ)
1715
+ // if (selectedModel && files.length === 0) { ... } ์ œ๊ฑฐ๋จ
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1716
 
1717
  if (files.length > 0) {
1718
  files.forEach(file => {
 
1743
  });
1744
  updateSelectedNovelsInfo();
1745
  } else {
1746
+ // ์„ ํƒ๋œ ๋ชจ๋ธ์— ํ•ด๋‹นํ•˜๋Š” ํŒŒ์ผ์ด ์—†๋Š” ๊ฒฝ์šฐ
1747
+ novelList.innerHTML = '<div class="novel-item-empty">ํ•ด๋‹น ๋ชจ๋ธ๋กœ ๋ถ„์„๋œ ์›น์†Œ์„ค์ด ์—†์Šต๋‹ˆ๋‹ค</div>';
1748
  selectedNovelsInfo.textContent = '';
1749
  }
1750
  } catch (error) {
 
1880
  const response = await fetch('/api/ollama/models');
1881
  const data = await response.json();
1882
 
1883
+ modelSelect.innerHTML = '';
1884
 
1885
+ // ์ „์ฒด ๋ชจ๋ธ ์˜ต์…˜ ์ถ”๊ฐ€ (๊ธฐ๋ณธ๊ฐ’)
1886
+ const allOption = document.createElement('option');
1887
+ allOption.value = 'all';
1888
+ allOption.textContent = 'โœจ ์ „์ฒด ๋ชจ๋ธ (๋ชจ๋“  ๊ณต๊ฐœ ์›น์†Œ์„ค)';
1889
+ modelSelect.appendChild(allOption);
1890
+
1891
+ // ๊ธฐ๋ณธ ๋ชจ๋ธ ์„ค์ • ๊ฐ€์ ธ์˜ค๊ธฐ
1892
+ let defaultAnalysisModel = 'all'; // ๊ธฐ๋ณธ๊ฐ’์€ ์ „์ฒด ๋ชจ๋ธ
1893
  if (!selectedModel) {
1894
+ selectedModel = defaultAnalysisModel;
1895
+ localStorage.setItem('selectedModel', selectedModel);
 
 
 
 
 
 
 
 
 
 
 
1896
  }
1897
 
1898
  if (data.models && data.models.length > 0) {
 
1908
  }
1909
  });
1910
 
1911
+ // Gemini ๋ชจ๋ธ ๊ทธ๋ฃน (์šฐ์„  ํ‘œ์‹œ)
1912
+ if (geminiModels.length > 0) {
 
1913
  const optgroup = document.createElement('optgroup');
1914
+ optgroup.label = 'โœจ Gemini ๋ชจ๋ธ';
1915
+ geminiModels.forEach(model => {
1916
  const option = document.createElement('option');
1917
  option.value = model.name;
1918
+ // "gemini:" ์ ‘๋‘์‚ฌ ์ œ๊ฑฐํ•˜์—ฌ ํ‘œ์‹œ
1919
+ const displayName = model.name.startsWith('gemini:')
1920
+ ? model.name.substring(7)
1921
+ : model.name;
1922
+ option.textContent = displayName;
1923
  if (model.name === selectedModel) {
1924
  option.selected = true;
1925
  }
 
1928
  modelSelect.appendChild(optgroup);
1929
  }
1930
 
1931
+ // Ollama ๋ชจ๋ธ ๊ทธ๋ฃน
1932
+ if (ollamaModels.length > 0) {
1933
  const optgroup = document.createElement('optgroup');
1934
+ optgroup.label = '๐Ÿค– Ollama ๋ชจ๋ธ';
1935
+ ollamaModels.forEach(model => {
1936
  const option = document.createElement('option');
1937
  option.value = model.name;
1938
+ option.textContent = model.name;
 
 
 
 
1939
  if (model.name === selectedModel) {
1940
  option.selected = true;
1941
  }
 
1944
  modelSelect.appendChild(optgroup);
1945
  }
1946
 
1947
+ // ์ด์ „์— ์„ ํƒํ•œ ๋ชจ๋ธ์ด 'all'์ธ ๊ฒฝ์šฐ ์ฒ˜๋ฆฌ
1948
+ if (selectedModel === 'all') {
1949
+ allOption.selected = true;
1950
  }
1951
 
1952
  updateModelStatus('connected');
1953
  } else {
1954
+ // ๋ชจ๋ธ์ด ์—†์–ด๋„ ์ „์ฒด ๋ชจ๋ธ ์˜ต์…˜์€ ์œ ์ง€
1955
+ updateModelStatus('connected');
1956
  }
1957
  } catch (error) {
1958
  updateModelStatus('error', '๋ชจ๋ธ ๋ชฉ๋ก ๋กœ๋“œ ์‹คํŒจ');
1959
  console.error('๋ชจ๋ธ ๋กœ๋“œ ์˜ค๋ฅ˜:', error);
1960
+
1961
+ // ์˜ค๋ฅ˜ ๋ฐœ์ƒ ์‹œ์—๋„ ์ „์ฒด ๋ชจ๋ธ ์˜ต์…˜์€ ํ‘œ์‹œ
1962
+ modelSelect.innerHTML = '';
1963
+ const allOption = document.createElement('option');
1964
+ allOption.value = 'all';
1965
+ allOption.textContent = 'โœจ ์ „์ฒด ๋ชจ๋ธ (๋ชจ๋“  ๊ณต๊ฐœ ์›น์†Œ์„ค)';
1966
+ allOption.selected = true;
1967
+ modelSelect.appendChild(allOption);
1968
+ selectedModel = 'all';
1969
+
1970
  } finally {
1971
  refreshModelsBtn.disabled = false;
1972
  refreshModelsBtn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg> ๋ชจ๋ธ ์ƒˆ๋กœ๊ณ ์นจ';
 
2752
  async function showWebnovelsModal() {
2753
  const modal = document.getElementById('webnovelsModal');
2754
  modal.style.display = 'block';
2755
+
2756
+ // ๋ฉ”์ธ ํ™”๋ฉด์—์„œ ์„ ํƒ๋œ ๋ชจ๋ธ ๊ฐ’ ๊ฐ€์ ธ์˜ค๊ธฐ
2757
+ // 'all'์ด๋ฉด ์ „์ฒด ๋ชจ๋ธ, ์•„๋‹ˆ๋ฉด ํ•ด๋‹น ๋ชจ๋ธ๋กœ ํ•„ํ„ฐ๋ง
2758
+ // ๋‚ด๋ถ€ ํ•„ํ„ฐ๋Š” ์ œ๊ฑฐํ•˜๊ณ  ๋ฉ”์ธ ํ™”๋ฉด ์„ ํƒ์„ ๋”ฐ๋ฆ„
2759
+ const currentModel = selectedModel || 'all';
2760
+
2761
+ // ๋ชจ๋‹ฌ ์ œ๋ชฉ์— ํ˜„์žฌ ์„ ํƒ๋œ ๋ชจ๋ธ ํ‘œ์‹œ (์„ ํƒ์‚ฌํ•ญ)
2762
+ const modalTitle = document.querySelector('#webnovelsModal .modal-header h2');
2763
+ if (modalTitle) {
2764
+ if (currentModel === 'all') {
2765
+ modalTitle.textContent = 'ํ•™์Šตํ•  ์›น์†Œ์„ค ์„ ํƒ (์ „์ฒด ๋ชจ๋ธ)';
2766
+ } else {
2767
+ const displayName = currentModel.startsWith('gemini:') ? currentModel.substring(7) : currentModel;
2768
+ modalTitle.textContent = `ํ•™์Šตํ•  ์›น์†Œ์„ค ์„ ํƒ (${displayName})`;
2769
+ }
2770
+ }
2771
+
2772
+ // ๋‚ด๋ถ€ ๋ชจ๋ธ ํ•„ํ„ฐ ์ˆจ๊ธฐ๊ธฐ (๋ฉ”์ธ ํ™”๋ฉด ์„ ํƒ์„ ๋”ฐ๋ฅด๋ฏ€๋กœ)
2773
+ const filterContainer = document.querySelector('#webnovelsModal .filter-container'); // ํ•„ํ„ฐ ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์žˆ๋‹ค๋ฉด
2774
+ if (filterContainer) filterContainer.style.display = 'none';
2775
+
2776
+ await loadWebnovels(currentModel);
2777
  }
2778
 
2779
  function closeWebnovelsModal() {
2780
  document.getElementById('webnovelsModal').style.display = 'none';
2781
  }
2782
 
2783
+ // loadWebnovelModelFilter ํ•จ์ˆ˜๋Š” ์ด์ œ ํ•„์š” ์—†์ง€๋งŒ ํ˜ธํ™˜์„ฑ์„ ์œ„ํ•ด ๋‚จ๊ฒจ๋‘๊ฑฐ๋‚˜ ์‚ญ์ œ ๊ฐ€๋Šฅ
2784
  async function loadWebnovelModelFilter() {
2785
+ // ๋” ์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š์Œ
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2786
  }
2787
 
2788
+ async function loadWebnovels(forcedModelName = null) {
2789
  const listContainer = document.getElementById('webnovelsList');
2790
+ // forcedModelName์ด ์žˆ์œผ๋ฉด ๊ทธ๊ฒƒ์„ ์‚ฌ์šฉ, ์—†์œผ๋ฉด ํ•„ํ„ฐ(์ด์ œ ์ˆจ๊น€) ๊ฐ’ ์‚ฌ์šฉ
2791
+ // ํ•˜์ง€๋งŒ showWebnovelsModal์—์„œ ํ•ญ์ƒ ๊ฐ’์„ ๋„˜๊ฒจ์ฃผ๋ฏ€๋กœ forcedModelName ์‚ฌ์šฉ
2792
+ const modelName = forcedModelName !== null ? forcedModelName : (selectedModel || 'all');
2793
 
2794
  listContainer.innerHTML = '<div style="text-align: center; color: var(--text-secondary); padding: 24px;">์›น์†Œ์„ค ๋ชฉ๋ก์„ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘...</div>';
2795
 
2796
  try {
2797
+ // modelName์ด 'all'์ด๋ฉด public_only=true๋กœ ํ˜ธ์ถœ
2798
+ // modelName์ด ์žˆ์œผ๋ฉด model_name ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ํ˜ธ์ถœ
2799
+ let url = '/api/files';
2800
+ if (modelName === 'all') {
2801
+ url += '?public_only=true';
2802
+ } else {
2803
+ url += `?model_name=${encodeURIComponent(modelName)}`;
2804
+ }
2805
+
2806
  const response = await fetch(url);
2807
  if (!response.ok) throw new Error('์›น์†Œ์„ค ๋ชฉ๋ก์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.');
2808