@@ -3,7 +3,12 @@ import { mkdtemp, mkdir, rm, writeFile } from "node:fs/promises";
33import { tmpdir } from "node:os" ;
44import { join } from "node:path" ;
55import { loadConfig } from "./config.js" ;
6- import { loadLocalAgentProfiles , summarizeLocalAgentProfile } from "./local-agent-profiles.js" ;
6+ import {
7+ buildLocalAgentProfilePrompt ,
8+ fingerprintLocalAgentProfile ,
9+ loadLocalAgentProfiles ,
10+ summarizeLocalAgentProfile ,
11+ } from "./local-agent-profiles.js" ;
712import type { ServerConfig } from "./config.js" ;
813
914const root = await mkdtemp ( join ( tmpdir ( ) , "devspace-agent-profiles-test-" ) ) ;
7378 assert . equal ( profiles [ 0 ] ?. model , "sonnet" ) ;
7479 assert . equal ( profiles [ 0 ] ?. effort , "high" ) ;
7580 assert . equal ( profiles [ 0 ] ?. body , "Project body." ) ;
81+ assert . equal (
82+ buildLocalAgentProfilePrompt ( profiles [ 0 ] ! , "Review auth" ) ,
83+ "Project body.\n\nTask:\nReview auth" ,
84+ ) ;
85+ assert . equal ( fingerprintLocalAgentProfile ( profiles [ 0 ] ! ) . length , 64 ) ;
86+ assert . notEqual (
87+ fingerprintLocalAgentProfile ( profiles [ 0 ] ! ) ,
88+ fingerprintLocalAgentProfile ( { ...profiles [ 0 ] ! , body : "Changed body." } ) ,
89+ ) ;
7690 assert . deepEqual ( summarizeLocalAgentProfile ( profiles [ 0 ] ! ) , {
7791 name : "reviewer" ,
7892 description : "Project reviewer #1." ,
0 commit comments