Refactor settings management to use ~/.claude-mem/settings.json
- Updated paths in troubleshooting documentation to reflect new settings file location. - Modified diagnostics and reference files to read from ~/.claude-mem/settings.json. - Introduced getWorkerPort utility for cleaner worker port retrieval. - Enhanced ChromaSync and SDKAgent to load Python version and Claude path from settings. - Updated SettingsRoutes to validate new settings: CLAUDE_MEM_LOG_LEVEL and CLAUDE_MEM_PYTHON_VERSION. - Added early-settings module to load settings for logger and other early-stage modules. - Adjusted logger to use early-loaded log level setting. - Refactored paths to utilize early-loaded data directory setting.
This commit is contained in:
@@ -13,6 +13,8 @@ import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'
|
||||
import { ParsedObservation, ParsedSummary } from '../../sdk/parser.js';
|
||||
import { SessionStore } from '../sqlite/SessionStore.js';
|
||||
import { logger } from '../../utils/logger.js';
|
||||
import { SettingsDefaultsManager } from '../worker/settings/SettingsDefaultsManager.js';
|
||||
import { USER_SETTINGS_PATH } from '../../shared/paths.js';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
|
||||
@@ -96,7 +98,8 @@ export class ChromaSync {
|
||||
try {
|
||||
// Use Python 3.13 by default to avoid onnxruntime compatibility issues with Python 3.14+
|
||||
// See: https://github.com/thedotmack/claude-mem/issues/170 (Python 3.14 incompatibility)
|
||||
const pythonVersion = process.env.CLAUDE_MEM_PYTHON_VERSION || '3.13';
|
||||
const settings = SettingsDefaultsManager.loadFromFile(USER_SETTINGS_PATH);
|
||||
const pythonVersion = settings.CLAUDE_MEM_PYTHON_VERSION;
|
||||
const transport = new StdioClientTransport({
|
||||
command: 'uvx',
|
||||
args: [
|
||||
|
||||
Reference in New Issue
Block a user