Files
AIcreat/app/templates/index.html
2026-04-06 14:20:53 +08:00

108 lines
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ app_name }}</title>
<link rel="stylesheet" href="/static/style.css" />
</head>
<body>
<header class="topbar">
<div class="brand">
<h1>{{ app_name }}</h1>
<p class="muted">粘贴原文 → 洗成约 <strong>5 段、500 字内</strong> 的短文(无小标题)→ 右侧预览 → 满意后发布。</p>
<p id="backendConfig" class="backend-config muted small" aria-live="polite"></p>
</div>
<div class="badge">Beta</div>
</header>
<main class="layout">
<section class="panel input-panel">
<h2>输入与改写策略</h2>
<ol class="flow-hint muted">
<li>粘贴原文并设置语气/读者</li>
<li>点击改写 → 右侧为短标题、摘要与<strong>五段正文</strong>(段落间空一行)</li>
<li>看「运行追踪」:<strong>模式为 AI</strong> 且模型名正确,即千问/接口已生效</li>
<li>人工改好后 →「发布到公众号草稿箱」(需配置 WECHAT_*</li>
</ol>
<div class="field-head">
<label>原始内容</label>
<span id="sourceCount" class="meta">0 字</span>
</div>
<textarea id="sourceText" rows="14" placeholder="粘贴原文(长帖、线程、摘录均可),洗稿会围绕原文主题展开…"></textarea>
<div class="grid2">
<div>
<label>标题提示</label>
<input id="titleHint" type="text" placeholder="如AI Agent 商业化路径" />
</div>
<div>
<label>目标读者</label>
<input id="audience" type="text" value="公众号运营者/产品经理" />
</div>
</div>
<div class="grid2">
<div>
<label>语气风格</label>
<input id="tone" type="text" value="专业、有观点、口语自然" />
</div>
<div>
<label>避免词汇</label>
<input id="avoidWords" type="text" placeholder="如:颠覆、闭环、赋能" />
</div>
</div>
<label>必须保留观点</label>
<input id="keepPoints" type="text" placeholder="逗号分隔" />
<button id="rewriteBtn" class="primary">AI 改写并排版</button>
<p id="status" class="status"></p>
</section>
<section class="panel output-panel">
<h2>发布内容</h2>
<p class="muted small">下方「运行追踪」会显示本次请求 ID、耗时、质检项与是否降级便于与容器日志对照。</p>
<label>标题</label>
<input id="title" type="text" />
<div class="field-head">
<label>摘要</label>
<span id="summaryCount" class="meta">0 字</span>
</div>
<textarea id="summary" rows="3"></textarea>
<div class="field-head">
<label>正文5 自然段,建议 ≤500 字)</label>
<span id="bodyCount" class="meta">0 字</span>
</div>
<div class="body-split">
<textarea id="body" rows="10" placeholder="五段之间空一行;无需 # 标题"></textarea>
<div class="preview-panel">
<div class="field-head">
<label>排版预览</label>
<span class="meta">与公众号 HTML 渲染接近</span>
</div>
<div id="bodyPreview" class="markdown-preview"></div>
</div>
</div>
<details id="traceWrap" class="trace-wrap">
<summary>运行追踪 <span id="traceBadge" class="trace-badge"></span></summary>
<pre id="traceJson" class="trace-json"></pre>
</details>
<div class="actions">
<button id="wechatBtn">发布到公众号草稿箱</button>
<button id="imBtn">发送到 IM</button>
</div>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="/static/app.js"></script>
</body>
</html>