Refactor context configuration and settings handling

- Updated context configuration loading path from ~/.claude/settings.json to ~/.claude-mem/settings.json.
- Modified the extractPriorMessages function to focus on retrieving the last assistant message only, removing user message extraction.
- Enhanced output formatting for displaying prior assistant messages in the context hook.
- Added new settings related to token economics and observation filtering in the useSettings hook.
This commit is contained in:
Alex Newman
2025-12-01 19:26:33 -05:00
parent 6dc648f07c
commit c768a80bf0
6 changed files with 139 additions and 140 deletions
+2 -2
View File
@@ -889,7 +889,7 @@ export class WorkerService {
*/
private handleGetSettings(req: Request, res: Response): void {
try {
const settingsPath = path.join(homedir(), '.claude', 'settings.json');
const settingsPath = path.join(homedir(), '.claude-mem', 'settings.json');
if (!existsSync(settingsPath)) {
// Return defaults if file doesn't exist
@@ -986,7 +986,7 @@ export class WorkerService {
}
// Read existing settings
const settingsPath = path.join(homedir(), '.claude', 'settings.json');
const settingsPath = path.join(homedir(), '.claude-mem', 'settings.json');
let settings: any = { env: {} };
if (existsSync(settingsPath)) {