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

68 lines
3.2 KiB
PHP
Raw Permalink 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="chat-layout" id="chatLayout">
<!-- 左侧边栏 -->
<div class="sidebar" id="sidebar">
<div class="sidebar-header">
<button class="btn btn-primary btn-sm" onclick="SessionManager.createSession()">+ 新建会话</button>
</div>
<div class="session-list" id="sessionList">
<!-- SessionManager.renderSessionList() 动态渲染 -->
</div>
</div>
<!-- 主聊天区域 -->
<div class="chat-main">
<!-- 顶部工具栏 -->
<div class="toolbar">
<button class="toggle-sidebar" onclick="toggleSidebar()" title="切换侧边栏">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 6h18M3 12h18M3 18h18"/></svg>
</button>
<select id="providerSelect" onchange="onProviderChange()">
<option value="">选择供应商</option>
<!-- loadProviders() 动态填充 -->
</select>
<select id="modelSelect">
<option value="">选择模型</option>
<!-- onProviderChange() 动态填充 -->
</select>
<label class="toggle-switch" title="思考模式">
<input type="checkbox" id="thinkingMode">
<span class="slider"></span>
</label>
<span class="toolbar-think-label">思考</span>
<select id="personalitySelect">
<option value="">默认人格</option>
<!-- loadPersonalities() 动态填充 -->
</select>
<a href="/config.php" class="btn btn-secondary btn-sm settings-link">
<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"><circle cx="12" cy="12" r="3"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
设置
</a>
</div>
<!-- 消息列表 -->
<div class="messages-container" id="messagesContainer">
<div class="empty-state">
<h3>开始新的对话</h3>
<p>输入消息开始聊天</p>
</div>
</div>
<!-- 底部输入区域 -->
<div class="input-area">
<div class="file-preview" id="filePreview"></div>
<div class="input-wrapper">
<button id="uploadBtn" title="上传文件" class="upload-btn">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"/></svg>
</button>
<textarea id="messageInput" rows="1" placeholder="输入消息Ctrl+Enter 发送..."></textarea>
<button id="sendBtn">发送</button>
</div>
</div>
</div>
</div>