Personality controls in settings
Rolling release / release (push) Successful in 7m29s

This commit is contained in:
2026-09-12 15:56:35 -04:00
parent 5317576087
commit 2f6e4b3af9
19 changed files with 104 additions and 13 deletions
+5 -2
View File
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import { mkdtempSync, readFileSync, existsSync, rmSync } from 'node:fs';
import { tmpdir } from 'node:os';
import path from 'node:path';
import { ensureAgentWorkspace, applyAssistantName, normalizeAssistantName, templateWorkspaceDir } from '../daemon/agent-workspace.js';
import { ensureAgentWorkspace, applyAssistantName, applyAssistantPrompt, normalizeAssistantName, templateWorkspaceDir } from '../daemon/agent-workspace.js';
const previous = process.env.XDG_DATA_HOME;
const data = mkdtempSync(path.join(tmpdir(), 'jarvis-workspace-'));
@@ -23,7 +23,10 @@ test('workspace seed copies SOUL and bootstrap, then name writes IDENTITY.md', (
const again = ensureAgentWorkspace({ name: 'Ada' });
assert.equal(again, dir);
assert.match(readFileSync(path.join(dir, 'IDENTITY.md'), 'utf8'), /\*\*Name:\*\* Ada/);
assert.equal(normalizeAssistantName(' '), 'Jarvis');
applyAssistantPrompt(dir, 'Be a dry ship cook. Never say great question.');
assert.match(readFileSync(path.join(dir, 'PERSONA.md'), 'utf8'), /dry ship cook/);
applyAssistantPrompt(dir, '');
assert.equal(readFileSync(path.join(dir, 'PERSONA.md'), 'utf8').trim(), '# PERSONA.md');
assert.match(templateWorkspaceDir(), /agent-workspace$/);
});