diff --git a/css/style.css b/css/style.css
index 6ecb9a2..772b6c5 100644
--- a/css/style.css
+++ b/css/style.css
@@ -1713,6 +1713,68 @@ body::before {
to { opacity: 0; transform: translateX(40px); }
}
+/* ═══════════════ 帮助弹框 ═══════════════ */
+
+.help-btn {
+ margin-left: 4px;
+ opacity: 0.6;
+}
+.help-btn:hover {
+ opacity: 1;
+}
+
+.help-section {
+ margin-bottom: 18px;
+}
+.help-section:last-child {
+ margin-bottom: 0;
+}
+.help-section h4 {
+ font-size: 14px;
+ font-weight: 600;
+ margin-bottom: 8px;
+ color: var(--text-primary);
+}
+.help-section ul,
+.help-section ol {
+ padding-left: 20px;
+ font-size: 13px;
+ color: var(--text-secondary);
+ line-height: 1.8;
+}
+.help-section li {
+ margin-bottom: 2px;
+}
+.help-section code {
+ background: rgba(0,245,212,0.1);
+ color: var(--accent-cyan);
+ padding: 1px 6px;
+ border-radius: 4px;
+ font-size: 12px;
+}
+.help-section kbd {
+ background: rgba(255,255,255,0.08);
+ border: 1px solid rgba(255,255,255,0.15);
+ border-radius: 4px;
+ padding: 1px 6px;
+ font-size: 12px;
+ font-family: inherit;
+}
+
+.help-shortcuts {
+ width: 100%;
+ font-size: 13px;
+ border-collapse: collapse;
+}
+.help-shortcuts td {
+ padding: 4px 8px;
+ border-bottom: 1px solid var(--border-glass);
+}
+.help-shortcuts td:first-child {
+ width: 140px;
+ text-align: center;
+}
+
/* ═══════════════ 知识库管理 ═══════════════ */
.modal-lg {
diff --git a/index.html b/index.html
index c06cb5c..1071d78 100644
--- a/index.html
+++ b/index.html
@@ -21,6 +21,12 @@
🦙
Metona Ollama
v2.2.0
+
+
+
+
+
+
+
+
🚀 快速开始
+
+ - 确保 Ollama 已启动(默认
http://127.0.0.1:11434)
+ - 顶部下拉框选择一个模型
+ - 输入消息,按 Enter 发送,Shift+Enter 换行
+
+
+
+
💬 聊天功能
+
+ - 流式回复 — 实时打字效果,随时点 ■ 停止
+ - Think 推理 — 🧠 按钮开启深度思考(需模型支持)
+ - 上下文长度 — 设置中调整
num_ctx,越大记忆越长
+ - 系统提示词 — 设置中开启,定义 AI 的角色和行为
+
+
+
+
📎 文件与图片
+
+ - 📷 上传图片 — 图标按钮上传,模型需支持 Vision
+ - 📄 上传文件 — 支持 50+ 种文本/代码格式,单文件 ≤500KB
+ - 文件内容自动以代码块格式发送给模型分析
+
+
+
+
📚 知识库 (RAG)
+
+ - 点击顶部 📚 按钮打开知识库管理
+ - 创建集合 → 选择嵌入模型(推荐
nomic-embed-text 等)
+ - 上传文档,自动分块并生成向量索引
+ - 开启 RAG 检索后,聊天时自动检索相关文档注入回答
+
+
+
+
🕐 历史记录
+
+ - 所有会话自动保存到浏览器本地(IndexedDB)
+ - 点击 🕐 按钮查看、搜索、恢复历史会话
+ - 支持导出
.metona 加密备份文件
+
+
+
+
⚙️ 设置
+
+ - 服务地址 — 修改 Ollama API 端点
+ - 释放显存 — 卸载当前模型,释放 GPU 内存
+ - 跨域问题 — 启动 Ollama 时设置
OLLAMA_ORIGINS="*"
+
+
+
+
⚡ 快捷键
+
+ | Enter | 发送消息 |
+ | Shift + Enter | 换行 |
+ | Esc | 关闭弹窗 |
+
+
+
+
+
+
diff --git a/js/app.js b/js/app.js
index 3aa69fe..a61e66f 100644
--- a/js/app.js
+++ b/js/app.js
@@ -20,6 +20,19 @@ import { initHistoryModal, closeHistoryModal } from './components/history-modal.
import { initKBModal } from './components/kb-modal.js';
import { initVectorStore } from './rag.js';
+function initHelpModal() {
+ const helpModal = document.querySelector('#helpModal');
+ document.querySelector('#btnHelp').addEventListener('click', () => {
+ helpModal.style.display = '';
+ });
+ document.querySelector('#btnCloseHelp').addEventListener('click', () => {
+ helpModal.style.display = 'none';
+ });
+ helpModal.addEventListener('click', (e) => {
+ if (e.target === helpModal) helpModal.style.display = 'none';
+ });
+}
+
console.log('[Metona] 模块化版本 v2.2.0 ' + new Date().toISOString());
// ── 会话管理 ──
@@ -91,6 +104,7 @@ async function init() {
initSettingsModal();
initHistoryModal();
initKBModal();
+ initHelpModal();
// 5. 绑定全局事件
bindGlobalEvents();
@@ -162,6 +176,8 @@ function bindGlobalEvents() {
closeSettingsModal();
closeHistoryModal();
closeLightbox();
+ document.querySelector('#helpModal').style.display = 'none';
+ document.querySelector('#kbModal').style.display = 'none';
}
});