Removes the meeting transcription/recording feature end-to-end (get_last_meeting_summary, meetingRecorder/meetingStore/summarize, the useMeetingRecorder renderer hook, and the related IPC/preload wiring) and the remember_info/forget_info long-term memory skills: all three were only ever reachable from the now-removed Assistant mode. adjust_mood and its mood store are unrelated (transversal) and are kept as-is. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
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)
|
|
})
|
|
})
|