fix: tool report 수정
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 6m11s

This commit is contained in:
juheelee
2026-08-14 13:39:50 +09:00
parent 864884f5cb
commit c6632eac59
15 changed files with 241 additions and 39 deletions

View File

@@ -760,6 +760,7 @@
<a href="/chat.html" style="color:#a1a1aa;" class="hover:text-white transition-colors">Chat</a>
<a href="/tester.html" style="color:#a1a1aa;" class="hover:text-white transition-colors">Tester</a>
<a href="/tool-test-console.html" style="color:#a1a1aa;" class="hover:text-white transition-colors">Console</a>
<a href="/tool-report.html" style="color:#a1a1aa;" class="hover:text-white transition-colors">Report</a>
</nav>
</div>
<div class="flex items-center">

View File

@@ -156,8 +156,15 @@
async function load() {
try {
const response = await fetch('/report/api/report-tools');
if (!response.ok) throw new Error('툴 목록 조회에 실패했습니다.');
state.tools = await response.json();
const body = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(body?.error || body?.message || `툴 목록 조회에 실패했습니다. (${response.status})`);
}
const tools = Array.isArray(body) ? body : body?.result?.tools;
if (!Array.isArray(tools)) {
throw new Error('툴 목록 응답 형식이 올바르지 않습니다.');
}
state.tools = tools;
[...new Set(state.tools.map(tool => tool.categoryKey))].sort().forEach(category => {
const option = document.createElement('option');
option.value = category; option.textContent = category; el('category').appendChild(option);