feat: add baseSystemPrompt
This commit is contained in:
@@ -29,6 +29,18 @@ describe('Persona initialization', () => {
|
||||
expect(debug).toContain('persona.initialized');
|
||||
});
|
||||
|
||||
it('exposes baseSystemPrompt on the persona instance when provided', async () => {
|
||||
const memory = new InMemoryMemoryStore();
|
||||
const persona = new Persona('Hana', 'Hana is a cheerful barista.', {
|
||||
memory,
|
||||
now: '2026-05-01T10:00:00.000Z',
|
||||
baseSystemPrompt: 'You are a helpful assistant. Always be kind.',
|
||||
});
|
||||
|
||||
await persona.ready();
|
||||
expect(persona.baseSystemPrompt).toBe('You are a helpful assistant. Always be kind.');
|
||||
});
|
||||
|
||||
it('loads an existing persona space by space id without creating another space', async () => {
|
||||
const memory = new InMemoryMemoryStore();
|
||||
const created = new Persona('Joon', 'Joon is a freelance designer.', { memory, now: '2026-05-01T10:00:00.000Z' });
|
||||
|
||||
Reference in New Issue
Block a user