85 lines
2.8 KiB
HTML
85 lines
2.8 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>SGClaw Skill Converter</title>
|
|
<link rel="stylesheet" href="/style.css" />
|
|
</head>
|
|
<body>
|
|
<main class="page">
|
|
<header class="hero">
|
|
<h1>SGClaw Skill Converter</h1>
|
|
<p>上传脚本、或粘贴脚本内容并填写说明,一键生成可直接打开目录的 SGClaw skill。</p>
|
|
<p class="subnav">
|
|
<a href="/api-config.html">API 配置页</a>
|
|
<span>·</span>
|
|
<a href="/">转换页</a>
|
|
</p>
|
|
</header>
|
|
|
|
<section class="grid">
|
|
<form id="converterForm" class="card">
|
|
<label>
|
|
上传脚本文件(支持多选)
|
|
<input id="scriptFile" type="file" accept=".js,.txt" multiple />
|
|
<small id="selectedFile" class="muted">未选择文件</small>
|
|
</label>
|
|
|
|
<label>
|
|
脚本内容(可手填)
|
|
<textarea id="jsCode" placeholder="粘贴 JS 脚本内容"></textarea>
|
|
</label>
|
|
<label>
|
|
脚本说明(可选)
|
|
<textarea id="scriptNotes" placeholder="例如:抓取知乎热榜,输出 title / heat / rank"></textarea>
|
|
</label>
|
|
|
|
<div class="actions">
|
|
<button type="submit">生成 Skill</button>
|
|
<button type="button" id="clear">清空</button>
|
|
</div>
|
|
</form>
|
|
|
|
<details class="settings-sheet card" open>
|
|
<summary>设置</summary>
|
|
<div class="settings-inner">
|
|
<h4>导出设置</h4>
|
|
<p id="aiStatus" class="muted">AI: 加载中...</p>
|
|
<p id="aiServerCfg" class="muted">服务端: 未加载</p>
|
|
<p id="aiEffectiveCfg" class="muted">实际生效: 未加载</p>
|
|
<label>
|
|
导出目录(可选)
|
|
<select id="skillRoot">
|
|
<option value="skills">skills</option>
|
|
<option value="output">output</option>
|
|
<option value="dist">dist</option>
|
|
<option value="tmp">tmp</option>
|
|
</select>
|
|
</label>
|
|
<label class="inline-checkbox">
|
|
<input id="useAi" type="checkbox" checked />
|
|
使用 AI 生成元数据
|
|
</label>
|
|
<p class="muted">AI 配置读取于本地配置文件页(<a href="/api-config.html">去设置</a>)。</p>
|
|
</div>
|
|
</details>
|
|
|
|
<section class="card">
|
|
<div class="outhead">
|
|
<h3>输出</h3>
|
|
<span id="status" class="muted"></span>
|
|
</div>
|
|
<div id="resultList" class="result-list"></div>
|
|
<details class="raw-wrap">
|
|
<summary>查看原始 JSON</summary>
|
|
<pre id="output" class="output"></pre>
|
|
</details>
|
|
</section>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="/app.js"></script>
|
|
</body>
|
|
</html>
|