chore(cleanup): remove mood tracking

Remove adjust_mood, the SQLite-backed mood store (src/main/memory/store.ts)
and the mood-description paragraph of openrouter.ts's system prompt. The
mood concept served the general-purpose assistant persona, which no
longer exists now that Max is an exclusive freelance coach.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 20:35:21 +01:00
co-authored by Claude Sonnet 5
parent 0cc277049e
commit 6cb38a2f36
6 changed files with 3 additions and 115 deletions
@@ -1,35 +0,0 @@
import { describe, it, expect, vi } from 'vitest'
import { mkdtempSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
const tempDir = mkdtempSync(join(tmpdir(), 'forge-avatar-memory-test-'))
vi.mock('electron', () => ({
app: { getPath: () => tempDir }
}))
const { getMood } = await import('../../src/main/memory/store')
const { adjustMoodSkill } = await import('../../src/main/skills/memory/adjustMood')
describe('adjust_mood', () => {
it('should increase the mood score on a positive change', async () => {
const before = getMood()
await adjustMoodSkill.execute({ change: 'positif' })
expect(getMood()).toBe(Math.min(3, before + 1))
})
it('should decrease the mood score on a negative change', async () => {
await adjustMoodSkill.execute({ change: 'negatif' })
const before = getMood()
await adjustMoodSkill.execute({ change: 'negatif' })
expect(getMood()).toBe(Math.max(-3, before - 1))
})
it('should never exceed the [-3, 3] bounds regardless of repeated changes', async () => {
for (let i = 0; i < 10; i++) await adjustMoodSkill.execute({ change: 'positif' })
expect(getMood()).toBe(3)
for (let i = 0; i < 10; i++) await adjustMoodSkill.execute({ change: 'negatif' })
expect(getMood()).toBe(-3)
})
})