refactor: separate local voice handlers and instructions

This commit is contained in:
Sameh Khamis committed 2026-09-12 12:59:39 -07:00
1 parent 318d37ad8d
commit 638902296a
17 files changed
+1094 -951

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import test from 'node:test';
const voiceConfig = readFileSync(new URL('../../server/providers/local.js', import.meta.url), 'utf8');
const voiceConfig = readFileSync(new URL('../../server/providers/openai/instructions.js', import.meta.url), 'utf8');
const realtime = readFileSync(new URL('./gevRealtime.js', import.meta.url), 'utf8');
test('aircraft identity narration acknowledges missing enrichment', () => {
+1 -1
View File
@@ -35,7 +35,7 @@ test('every live basemap is reachable by its own id — no enum value without a
assert.equal(normalizeStackId('Esri'), 'esri-imagery');
assert.equal(normalizeStackId('esri imagery'), 'esri-imagery');
// And the voice tool's enum must equal the set of live ids — no drift either way.
const config = readFileSync(new URL('../../server/providers/local.js', import.meta.url), 'utf8');
const config = readFileSync(new URL('../../server/providers/openai/tools.js', import.meta.url), 'utf8');
const enumMatch = config.match(/enum: \[('photoreal'[^\]]*)\],\s*\n\s*description: 'photoreal = Google 3D/);
assert.ok(enumMatch, 'set_map_stack enum literal must still be findable');
const enumIds = enumMatch[1].split(',').map((s) => s.trim().replace(/^'|'$/g, ''));