Files
AI-Chat/app/Views/config.php
2026-05-06 17:25:06 +08:00

52 lines
2.6 KiB
PHP
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.
<div class="config-container">
<div class="config-header">
<h1>
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon-inline-md"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"/></svg>
系统配置
</h1>
<a href="/chat.php" class="btn btn-secondary">
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon-inline"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
返回聊天
</a>
</div>
<!-- 供应商管理 -->
<div class="config-section">
<h2>AI 供应商管理</h2>
<div id="providerList">
<!-- JS 动态渲染 -->
</div>
<button class="btn btn-secondary config-add-btn" onclick="ConfigPage.addProvider()">+ 添加供应商</button>
</div>
<!-- 人格管理 -->
<div class="config-section">
<h2>人格管理</h2>
<div id="personalityList">
<!-- JS 动态渲染 -->
</div>
<h3>添加自定义人格</h3>
<div class="form-group">
<label>名称</label>
<input type="text" id="newPersonalityName" placeholder="人格名称">
</div>
<div class="form-group">
<label>图标</label>
<input type="text" id="newPersonalityIcon" placeholder="A" maxlength="2">
</div>
<div class="form-group">
<label>提示词</label>
<textarea id="newPersonalityPrompt" rows="3" placeholder="人格的系统提示词"></textarea>
</div>
<div class="form-group">
<label>描述</label>
<input type="text" id="newPersonalityDesc" placeholder="简短描述">
</div>
<button class="btn btn-primary" onclick="ConfigPage.createPersonality()">添加人格</button>
</div>
</div>
<div id="configMessage"></div>
<script src="/assets/js/config.js"></script>