fix: example 입력
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 2m24s

This commit is contained in:
jade
2026-08-05 14:19:37 +09:00
parent 3a86a8e0c7
commit ac60d046eb
24 changed files with 81 additions and 27 deletions

View File

@@ -191,6 +191,7 @@
<svg class="w-3 h-3 text-zinc-500" fill="currentColor" viewBox="0 0 20 20"><path d="M10 18a8 8 0 100-16 8 8 0 000 16zM9 9a1 1 0 012 0v4a1 1 0 11-2 0V9zm1-5a1 1 0 110 2 1 1 0 010-2z"></path></svg>
Auto-saved to LocalStorage
</div>
<button onclick="resetPayload()" class="btn-sm py-2 px-4 text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400 mr-2" style="font-size:12px;" title="저장된 페이로드를 삭제하고 스키마 기본값으로 초기화합니다">Reset to Schema</button>
<button onclick="closePayloadModal()" class="btn-sm py-2 px-4">Cancel</button>
<button onclick="savePayload()" class="btn-execute py-2 px-4" style="font-size:12px;">Save & Apply</button>
</div>
@@ -771,6 +772,26 @@
document.getElementById('payloadModal').style.display = 'none';
}
function resetPayload() {
if (currentEditIndex === -1) return;
const tool = allTools[currentEditIndex];
// 로컬 스토리지에서 삭제
const savedPayloads = JSON.parse(localStorage.getItem('mcp_tester_payloads') || '{}');
delete savedPayloads[tool.name];
localStorage.setItem('mcp_tester_payloads', JSON.stringify(savedPayloads));
// 런타임 상태 초기화
tool._customPayload = null;
// 새 스키마 기반 기본 페이로드 생성
const freshPayload = generateDummyPayload(tool);
// UI 업데이트
document.getElementById('payloadEditor').value = JSON.stringify(freshPayload, null, 2);
renderSmartForm(tool, freshPayload);
}
function savePayload() {
let finalPayload = {};
if (currentPayloadMode === 'form') {