Files
2026Technology-Competition/src/genesis/server/static/chat.html
T

129 lines
5.4 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">
<title>Genesis — 概要设计书自动生成(对话)</title>
<link rel="stylesheet" href="/static/chat.css?v=__ASSET_VER__">
</head>
<body>
<div id="sidebar">
<button id="sidebar-toggle" title="折叠侧边栏" data-state="expanded">«</button>
<div class="brand">
<div class="brand-logo">G</div>
<div class="brand-name">Genesis<span class="brand-sub">概要设计书做成Agent</span></div>
</div>
<button id="new-chat" title="新建会话"><span class="ic-plus">+</span><span class="nc-text">新会话</span></button>
<h2>会话历史</h2>
<div id="session-list"></div>
</div>
<div id="main">
<header>
<span id="session-title" title="当前会话">未创建会话</span>
</header>
<div id="chat"></div>
<div id="composer">
<div id="composer-inner">
<textarea id="input" rows="1" placeholder="输入指令,如:生成概要设计书 / 现在什么状态?(Enter 发送,Shift+Enter 换行)" autocomplete="off" maxlength="2000"></textarea>
<button id="send" aria-label="发送" title="发送"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></svg></button>
</div>
<div id="composer-toolbar">
<div class="proj-switcher" id="proj-switcher">
<button class="tb-btn" id="ps-current" type="button" title="切换项目">
<span class="tb-ic"></span>
<span class="tb-text" id="ps-name">未选择项目</span>
<span class="tb-caret"></span>
</button>
<div class="ps-menu" id="ps-menu" role="menu"></div>
</div>
<button class="tb-btn" id="tb-newproject" type="button" title="新建项目"><span class="tb-ic"></span><span class="tb-text">新建项目</span></button>
<button class="tb-btn" id="tb-upload" type="button" title="上传资料"><span class="tb-ic">📎</span><span class="tb-text">上传资料</span></button>
<div id="rag-bar" hidden>
<label class="rag-switch">
<input type="checkbox" id="rag-enabled">
<span>启用 RAG</span>
</label>
<span class="rag-stats" id="rag-stats">RAG 0 片段</span>
<button id="impact-btn" type="button" disabled>影响调查</button>
</div>
</div>
<div id="upload-panel" hidden>
<div id="upload-bar-inner">
<span id="proj-hint"></span>
<label for="file-type" class="vh">上传类型</label>
<span>📎 上传资料:</span>
<select id="file-type" aria-label="上传类型">
<option value="requirements">要件定义 xlsx(必需)</option>
<option value="template">概要设计模板 docx(必需)</option>
<option value="write_instruction">做成说明书 docx</option>
<option value="rules">记入/图表规则 docx/xlsx</option>
</select>
<label class="file-pick" for="file-input">选择文件</label>
<input type="file" id="file-input" style="display:none">
<button id="upload-btn">上传</button>
<span id="upload-status"></span>
</div>
</div>
</div>
</div>
<div id="proj-drawer" role="dialog" aria-label="项目配置">
<div class="drawer-head">
<h2>项目配置</h2>
<button class="drawer-close" id="drawer-close" title="关闭">×</button>
</div>
<div class="drawer-body">
<div class="drawer-list" id="drawer-list"></div>
<div class="drawer-form" id="drawer-form">
<div class="drawer-hint">选择左侧项目以查看与编辑,或点 <strong>+ 新建项目</strong> 创建;新建时请设置该项目的资料目录。</div>
<div class="field">
<label>项目名(英文/唯一)</label>
<input id="pf-name" placeholder="stock">
</div>
<div class="field">
<label>显示名(可选)</label>
<input id="pf-display" placeholder="股票系统">
</div>
<div class="field">
<label>模板 docx 路径</label>
<input id="pf-template" placeholder="/abs/path/template.docx">
</div>
<div class="field">
<label>做成说明书 docx 路径</label>
<input id="pf-write" placeholder="/abs/path/write_instruction.docx">
</div>
<div class="field">
<label>规则 docx 目录(逗号分隔)</label>
<input id="pf-rules" placeholder="/abs/path/rules, /abs/path/diagrams">
</div>
<div class="field">
<label>既有系统代码库目录</label>
<input id="pf-code" placeholder="/abs/path/existing-system">
</div>
<div class="field">
<label>既有设计文档目录</label>
<input id="pf-design" placeholder="/abs/path/design-docs">
</div>
<div class="drawer-actions">
<button class="btn-save" id="pf-save">保存项目</button>
<button class="btn-delete" id="pf-delete" hidden>删除</button>
</div>
</div>
</div>
</div>
<div id="sess-menu" class="sess-menu" hidden>
<button type="button" class="sm-item" id="sm-rename"><span class="sm-ic"></span>重命名</button>
</div>
<script src="/static/chat_state.js?v=__ASSET_VER__"></script>
<script src="/static/chat_ws.js?v=__ASSET_VER__"></script>
<script src="/static/chat.js?v=__ASSET_VER__" defer></script>
</body>
</html>