feat(scaffold): add guided AI tool proposal sample
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 18s

This commit is contained in:
jade
2026-09-07 18:17:03 +09:00
parent c9701a5a94
commit 88d94e8b83

View File

@@ -967,12 +967,14 @@
</div>
</div>
<div class="mb-4 p-3 rounded" style="background:#18181b; border:1px solid #3f3f46;">
<label class="form-label">AI Tool 초안 만들기</label>
<div class="row g-2">
<div class="col-md-6">
<input id="toolNaturalLanguage" type="text" class="form-control" placeholder="예: 고객번호로 계약 상태를 조회하는 Tool">
</div>
<div class="col-md-3">
<label class="form-label" for="toolNaturalLanguage">AI Tool 초안 만들기</label>
<div id="toolNaturalLanguageGuide" class="input-hint mt-0 mb-2">
만들려는 Tool을 제안서처럼 적어주세요. <strong>업무 목적 → 입력값 → 출력값 → 사용 시점 → 제외 범위 → 연계 방식</strong> 순서로 구체적으로 작성할수록 정확한 초안을 만들 수 있습니다.
</div>
<textarea id="toolNaturalLanguage" class="form-control" rows="8" aria-describedby="toolNaturalLanguageGuide" placeholder="예: 고객번호로 보험계약 상태를 조회하는 Tool을 만들어주세요.&#10;목적: 고객의 계약 유지 상태 확인&#10;입력: 고객번호(필수), 기준일자(선택)&#10;출력: 계약번호, 상품명, 계약상태, 계약일자&#10;사용 시점: 고객이 보유 계약이나 계약 상태를 문의할 때&#10;제외 범위: 계약 변경 및 해지 처리&#10;연계 방식: MCI"></textarea>
<div class="d-flex justify-content-between align-items-center gap-2 mt-2 flex-wrap">
<button type="button" class="btn-secondary-action" onclick="loadToolDraftSample()">샘플 불러오기</button>
<div class="d-flex gap-2 flex-wrap">
<select id="aiModelSelect" class="form-select" aria-label="AI 모델 선택">
<optgroup label="[신한라이프 내부망]">
<option value="Qwen3-Coder" selected>Qwen3-Coder</option>
@@ -986,12 +988,10 @@
<option value="nvidia/nemotron-3-nano-30b-a3b:free">NVIDIA Nemotron 3 Nano</option>
</optgroup>
</select>
</div>
<div class="col-md-3 d-grid">
<button id="toolDraftButton" type="button" class="btn-action" onclick="createAiToolDraft()">AI로 Tool 채우기</button>
</div>
</div>
<div class="input-hint">선택한 AI가 Tool 기본 정보와 Input/Output Fields를 채웁니다. Legacy Interface ID와 Client System Code는 실제 연계 명세를 확인해 직접 입력하세요.</div>
<div class="input-hint">잘 모르는 항목은 생략해도 됩니다. 선택한 AI가 입력 내용을 바탕으로 Tool 기본 정보와 Input/Output Fields를 채웁니다. Legacy Interface ID와 Client System Code는 실제 연계 명세를 확인해 직접 입력하세요.</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
@@ -2403,6 +2403,21 @@
return document.getElementById('aiModelSelect').value;
}
const TOOL_DRAFT_SAMPLE = `고객번호로 보험계약 상태를 조회하는 Tool을 만들어주세요.
목적: 고객의 계약 유지 상태 확인
입력: 고객번호(필수), 기준일자(선택)
출력: 계약번호, 상품명, 계약상태, 계약일자
사용 시점: 고객이 보유 계약이나 계약 상태를 문의할 때
제외 범위: 계약 변경 및 해지 처리
연계 방식: MCI`;
function loadToolDraftSample() {
const input = document.getElementById('toolNaturalLanguage');
if (input.value.trim() && !confirm('작성 중인 내용 대신 샘플을 불러올까요?')) return;
input.value = TOOL_DRAFT_SAMPLE;
input.focus();
}
async function createAiToolDraft() {
const source = document.getElementById('toolNaturalLanguage').value.trim();
if (!source) {