diff --git a/dashboard/src/components/layout/Layout.tsx b/dashboard/src/components/layout/Layout.tsx index 8f0a23c8..6b7a4906 100644 --- a/dashboard/src/components/layout/Layout.tsx +++ b/dashboard/src/components/layout/Layout.tsx @@ -130,7 +130,7 @@ export function Layout({ children }: LayoutProps) { key="settings-sidebar" className="relative z-40 hidden shrink-0 lg:block" initial={{ width: 0, opacity: 0 }} - animate={{ width: sidebarOpen ? 224 : 64, opacity: 1 }} + animate={{ width: sidebarOpen ? 208 : 64, opacity: 1 }} exit={{ width: 0, opacity: 0 }} transition={{ type: 'spring', diff --git a/dashboard/src/components/layout/Sidebar.tsx b/dashboard/src/components/layout/Sidebar.tsx index 0b716ea0..926a0296 100644 --- a/dashboard/src/components/layout/Sidebar.tsx +++ b/dashboard/src/components/layout/Sidebar.tsx @@ -32,8 +32,8 @@ export function Sidebar({ 'fixed inset-y-0 left-0 z-50 isolate flex flex-col border-r transition-all duration-300 lg:relative lg:z-0 lg:h-full', inheritsPageBackground ? 'bg-transparent' : 'bg-card', // 移动端始终显示完整宽度,桌面端根据 sidebarOpen 切换 - 'w-56 lg:w-auto', - sidebarOpen ? 'lg:w-56' : 'lg:w-16', + 'w-52 lg:w-auto', + sidebarOpen ? 'lg:w-52' : 'lg:w-16', mobileMenuOpen ? 'translate-x-0' : '-translate-x-full lg:translate-x-0' )} > diff --git a/dashboard/src/index.css b/dashboard/src/index.css index 4d16efba..31be6e86 100644 --- a/dashboard/src/index.css +++ b/dashboard/src/index.css @@ -183,7 +183,7 @@ --layout-space-lg: 1.5rem; --layout-space-xl: 2rem; --layout-space-2xl: 3rem; - --layout-sidebar-width: 14rem; + --layout-sidebar-width: 13rem; --layout-header-height: 3.5rem; --layout-max-content-width: 1280px; diff --git a/dashboard/src/lib/theme/tokens.ts b/dashboard/src/lib/theme/tokens.ts index 0214b9af..bb0f20dd 100644 --- a/dashboard/src/lib/theme/tokens.ts +++ b/dashboard/src/lib/theme/tokens.ts @@ -225,7 +225,7 @@ export const defaultLightTokens: ThemeTokens = { 'space-lg': '1.5rem', 'space-xl': '2rem', 'space-2xl': '3rem', - 'sidebar-width': '16rem', + 'sidebar-width': '13rem', 'header-height': '3.5rem', 'max-content-width': '1280px', }, @@ -320,7 +320,7 @@ export const defaultDarkTokens: ThemeTokens = { 'space-lg': '1.5rem', 'space-xl': '2rem', 'space-2xl': '3rem', - 'sidebar-width': '16rem', + 'sidebar-width': '13rem', 'header-height': '3.5rem', 'max-content-width': '1280px', }, diff --git a/dashboard/src/routes/config/bot/sections/FeaturesSection.tsx b/dashboard/src/routes/config/bot/sections/FeaturesSection.tsx index af1432b2..9bd5735d 100644 --- a/dashboard/src/routes/config/bot/sections/FeaturesSection.tsx +++ b/dashboard/src/routes/config/bot/sections/FeaturesSection.tsx @@ -113,22 +113,6 @@ export const FeaturesSection = React.memo(function FeaturesSection({ 记忆检索过程中是否启用黑话识别

-
- - onMemoryChange({ ...memoryConfig, global_memory: checked }) - } - /> - -
-

- 允许记忆检索在所有聊天记录中进行全局查询(忽略当前聊天流) -

- {/* 聊天历史总结配置 */}

聊天历史总结配置

diff --git a/dashboard/src/routes/config/bot/types.ts b/dashboard/src/routes/config/bot/types.ts index 5e324468..4c92bd5a 100644 --- a/dashboard/src/routes/config/bot/types.ts +++ b/dashboard/src/routes/config/bot/types.ts @@ -84,7 +84,6 @@ export interface MemoryConfig { max_agent_iterations: number agent_timeout_seconds: number enable_jargon_detection: boolean - global_memory: boolean chat_history_topic_check_message_threshold: number chat_history_topic_check_time_hours: number chat_history_topic_check_min_messages: number diff --git a/dashboard/src/routes/settings/AppearanceTab.tsx b/dashboard/src/routes/settings/AppearanceTab.tsx index 15b99a99..a790274e 100644 --- a/dashboard/src/routes/settings/AppearanceTab.tsx +++ b/dashboard/src/routes/settings/AppearanceTab.tsx @@ -605,12 +605,12 @@ export function AppearanceTab() {
- {getTokenValue(themeConfig.tokenOverrides, 'layout', 'sidebar-width', '16rem')} + {getTokenValue(themeConfig.tokenOverrides, 'layout', 'sidebar-width', '13rem')}
None: try: detected_dimension = await plugin.embedding_manager._detect_dimension() - logger.info(f"嵌入维度检测成功: {detected_dimension}") + logger.info(f"嵌入维度: {detected_dimension}") except Exception as e: logger.warning(f"嵌入维度检测失败: {e},使用默认值") detected_dimension = plugin.embedding_manager.default_dimension @@ -194,11 +194,11 @@ async def initialize_storage_async(plugin: Any) -> None: matrix_format=matrix_format, data_dir=data_dir / "graph", ) - logger.info("图存储初始化完成") + logger.debug("图存储初始化完成") plugin.metadata_store = MetadataStore(data_dir=data_dir / "metadata") plugin.metadata_store.connect() - logger.info("元数据存储初始化完成") + logger.debug("元数据存储初始化完成") plugin.relation_write_service = RelationWriteService( metadata_store=plugin.metadata_store, @@ -233,7 +233,7 @@ async def initialize_storage_async(plugin: Any) -> None: if plugin.vector_store.has_data(): try: plugin.vector_store.load() - logger.info(f"向量数据已加载,共 {plugin.vector_store.num_vectors} 个向量") + logger.debug(f"向量数据已加载,共 {plugin.vector_store.num_vectors} 个向量") except Exception as e: logger.warning(f"加载向量数据失败: {e}") @@ -259,7 +259,7 @@ async def initialize_storage_async(plugin: Any) -> None: if plugin.graph_store.has_data(): try: plugin.graph_store.load() - logger.info(f"图数据已加载,共 {plugin.graph_store.num_nodes} 个节点") + logger.debug(f"图数据已加载,共 {plugin.graph_store.num_nodes} 个节点") except Exception as e: logger.warning(f"加载图数据失败: {e}") diff --git a/src/A_memorix/core/runtime/search_runtime_initializer.py b/src/A_memorix/core/runtime/search_runtime_initializer.py index 0c6146c6..c4b5f810 100644 --- a/src/A_memorix/core/runtime/search_runtime_initializer.py +++ b/src/A_memorix/core/runtime/search_runtime_initializer.py @@ -222,7 +222,7 @@ def build_search_runtime( ) runtime.threshold_filter = DynamicThresholdFilter(threshold_config) runtime.error = "" - log.info(f"{prefix_text}[{owner}] 检索运行时初始化完成") + log.info(f"{prefix_text}[{owner}] 检索运行时就绪") except Exception as e: runtime.retriever = None runtime.threshold_filter = None diff --git a/src/A_memorix/core/storage/graph_store.py b/src/A_memorix/core/storage/graph_store.py index e338ffc5..7e0e1bd0 100644 --- a/src/A_memorix/core/storage/graph_store.py +++ b/src/A_memorix/core/storage/graph_store.py @@ -119,7 +119,7 @@ class GraphStore: # V5: 简单的异步锁 (实际上 asyncio 环境下单线程主循环可能不需要,但为了安全保留) self._lock = asyncio.Lock() - logger.info(f"GraphStore 初始化: format={matrix_format}") + logger.debug(f"图存储初始化: format={matrix_format}") def _canonicalize(self, node: str) -> str: """规范化节点名称 (用于去重和内部索引)""" @@ -1317,8 +1317,8 @@ class GraphStore: self._adjacency_dirty = True logger.info( - f"图存储已加载: {len(self._nodes)} 个节点, " - f"{self._adjacency.nnz if self._adjacency is not None else 0} 条边" + f"图存储已加载: 节点={len(self._nodes)}, " + f"边={self._adjacency.nnz if self._adjacency is not None else 0}" ) def _expand_adjacency_matrix(self, added_nodes: int) -> None: diff --git a/src/A_memorix/core/storage/metadata_store.py b/src/A_memorix/core/storage/metadata_store.py index 29147889..2667e683 100644 --- a/src/A_memorix/core/storage/metadata_store.py +++ b/src/A_memorix/core/storage/metadata_store.py @@ -72,7 +72,7 @@ class MetadataStore: self._is_initialized = False self._db_path: Optional[Path] = None - logger.info(f"MetadataStore 初始化: db={db_name}") + logger.debug(f"元数据存储初始化: db={db_name}") def connect( self, @@ -114,7 +114,7 @@ class MetadataStore: self._conn.execute("PRAGMA temp_store=MEMORY") self._conn.execute("PRAGMA foreign_keys = ON") # 开启外键约束支持级联删除 - logger.info(f"连接到数据库: {db_path}") + logger.info(f"数据库已连接: {db_path}") # 初始化或校验 schema if not self._is_initialized: diff --git a/src/A_memorix/core/storage/vector_store.py b/src/A_memorix/core/storage/vector_store.py index 787e625a..47243175 100644 --- a/src/A_memorix/core/storage/vector_store.py +++ b/src/A_memorix/core/storage/vector_store.py @@ -108,7 +108,7 @@ class VectorStore: # Thread safety lock self._lock = threading.RLock() - logger.info(f"VectorStore Init: dim={dimension}, SQ8 Mode, Append-Only Storage") + logger.info(f"向量存储初始化: dim={dimension}, mode=SQ8") def _init_index(self): """初始化空的 Faiss 索引""" @@ -379,7 +379,7 @@ class VectorStore: 预热状态摘要 """ started = time.perf_counter() - logger.info(f"metric.vector_index_prewarm_started=1 force_train={bool(force_train)}") + logger.debug(f"metric.vector_index_prewarm_started=1 force_train={bool(force_train)}") try: with self._lock: @@ -435,7 +435,7 @@ class VectorStore: ) return summary - logger.info( + logger.debug( "metric.vector_index_prewarm_success=1 " f"metric.vector_index_prewarm_duration_ms={summary['duration_ms']:.2f} " f"trained={summary['trained']} " diff --git a/src/config/config.py b/src/config/config.py index 1944d6e5..37d26f2b 100644 --- a/src/config/config.py +++ b/src/config/config.py @@ -57,7 +57,7 @@ MODEL_CONFIG_PATH: Path = (CONFIG_DIR / "model_config.toml").resolve().absolute( LEGACY_ENV_PATH: Path = (PROJECT_ROOT / ".env").resolve().absolute() A_MEMORIX_LEGACY_CONFIG_PATH: Path = (CONFIG_DIR / "a_memorix.toml").resolve().absolute() MMC_VERSION: str = "1.0.0-pre.11" -CONFIG_VERSION: str = "8.10.7" +CONFIG_VERSION: str = "8.10.8" MODEL_CONFIG_VERSION: str = "1.15.3" logger = get_logger("config") diff --git a/src/config/legacy_migration.py b/src/config/legacy_migration.py index 05714afd..b5b4d0a3 100644 --- a/src/config/legacy_migration.py +++ b/src/config/legacy_migration.py @@ -392,11 +392,6 @@ def try_migrate_legacy_bot_config_dict(data: dict[str, Any]) -> MigrationResult: migrated_any = True reasons.append("visual.visual_style_removed") - memory = _as_dict(data.get("memory")) - if memory is not None and _migrate_target_item_list(memory, "global_memory_blacklist"): - migrated_any = True - reasons.append("memory.global_memory_blacklist") - keyword_reaction = _as_dict(data.get("keyword_reaction")) if keyword_reaction is not None: if _drop_empty_keyword_rules(keyword_reaction, "keyword_rules"): diff --git a/src/config/official_configs.py b/src/config/official_configs.py index 09eaebcf..6b249382 100644 --- a/src/config/official_configs.py +++ b/src/config/official_configs.py @@ -472,26 +472,6 @@ class MemoryConfig(ConfigBase): __ui_parent__ = "a_memorix" - - global_memory: bool = Field( - default=False, - json_schema_extra={ - "x-widget": "switch", - "x-icon": "globe", - }, - ) - """是否允许记忆检索在聊天记录中进行全局查询(忽略当前chat_id,仅对 search_chat_history 等工具生效)""" - - global_memory_blacklist: list[TargetItem] = Field( - default_factory=lambda: [], - json_schema_extra={ - "x-widget": "custom", - "x-icon": "shield-off", - }, - ) - """_wrap_全局记忆黑名单,当启用全局记忆时,不将特定聊天流纳入检索""" - - enable_memory_query_tool: bool = Field( default=True, json_schema_extra={