feat: RAG 本地知识库 - 向量存储、文档分块、语义检索、知识库管理面板
This commit is contained in:
@@ -17,6 +17,8 @@ import { initChatArea, renderMessages, clearMessages, enableAutoScroll } from '.
|
||||
import { initInputArea } from './components/input-area.js';
|
||||
import { initSettingsModal, closeSettingsModal } from './components/settings-modal.js';
|
||||
import { initHistoryModal, closeHistoryModal } from './components/history-modal.js';
|
||||
import { initKBModal } from './components/kb-modal.js';
|
||||
import { initVectorStore } from './rag.js';
|
||||
|
||||
console.log('[Metona] 模块化版本 v2.2.0 ' + new Date().toISOString());
|
||||
|
||||
@@ -88,6 +90,7 @@ async function init() {
|
||||
initInputArea();
|
||||
initSettingsModal();
|
||||
initHistoryModal();
|
||||
initKBModal();
|
||||
|
||||
// 5. 绑定全局事件
|
||||
bindGlobalEvents();
|
||||
@@ -96,6 +99,9 @@ async function init() {
|
||||
await checkConnection();
|
||||
await loadModels();
|
||||
|
||||
// 6.1 初始化向量存储
|
||||
await initVectorStore();
|
||||
|
||||
// 7. 恢复上次选择的模型
|
||||
const savedModel = await db.getSetting('selectedModel', '');
|
||||
if (savedModel) {
|
||||
|
||||
Reference in New Issue
Block a user