Files
fire-safety-ymd/internal/handler/chatpage/index.html
2026-09-06 00:25:25 +08:00

58 lines
2.6 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">
<meta name="color-scheme" content="light">
<title>养马岛森林防火助手</title>
<link rel="stylesheet" href="/chat/app.css">
<script src="/chat/app.js" defer></script>
</head>
<body>
<main class="shell" id="chat-app" data-app-id="{{.AppID}}">
<noscript>
<p class="noscript-warning" role="alert">此测试页面需要启用 JavaScript。请勿在脚本不可用时输入访问凭证或问题。</p>
</noscript>
<header class="masthead">
<div>
<p class="eyebrow">FIRE SAFETY · YMD</p>
<h1>森林防火演练助手</h1>
<p class="intro">基于现有消防空间资料提供候选信息。结果需经现场核验,不能替代报警、撤离和现场指挥。</p>
</div>
<button class="quiet-button" id="new-chat" type="button">新对话</button>
</header>
<section class="credential-card" aria-labelledby="credential-title">
<div>
<h2 id="credential-title">访问凭证</h2>
<p>凭证只保存在本页面内存中,刷新或关闭页面后即清除。</p>
</div>
<form id="credential-form" class="credential-form" method="post" action="/chat/">
<label class="sr-only" for="token">xtoken</label>
<input id="token" name="token" type="password" autocomplete="off" autocapitalize="none" spellcheck="false" maxlength="4096" required placeholder="输入 xtoken">
<button type="submit">应用凭证</button>
<button class="quiet-button" id="clear-token" type="button">清除</button>
</form>
<p class="credential-state" id="credential-state" role="status">尚未设置凭证</p>
</section>
<section class="conversation" aria-label="对话">
<div class="messages" id="messages" role="log" aria-live="polite" aria-relevant="additions text">
<article class="message assistant-message">
<p>请先设置访问凭证,然后输入你的森林防火演练问题。</p>
</article>
</div>
<form class="composer" id="composer" method="post" action="/chat/">
<label class="sr-only" for="prompt">问题</label>
<textarea id="prompt" name="prompt" rows="3" maxlength="8000" required placeholder="例如:我要在观水镇附近进行演练,请先搜索地点候选。"></textarea>
<div class="composer-footer">
<p id="request-state" role="status">Enter 发送,Shift + Enter 换行</p>
<button id="send" type="submit">发送</button>
</div>
</form>
</section>
</main>
</body>
</html>