@@ -12,8 +12,8 @@ import {
1212type CallGateway = typeof import ( "../gateway/call.js" ) . callGateway ;
1313type GetRuntimeConfig = typeof import ( "./subagent-announce.runtime.js" ) . getRuntimeConfig ;
1414type ReadSessionEntry = typeof import ( "./subagent-announce.runtime.js" ) . readSessionEntry ;
15- type ReadSessionMessagesFromFileAsync =
16- typeof import ( "./subagent-announce.runtime.js" ) . readSessionMessagesFromFileAsync ;
15+ type ReadSessionMessagesAsync =
16+ typeof import ( "./subagent-announce.runtime.js" ) . readSessionMessagesAsync ;
1717type ResolveAgentIdFromSessionKey =
1818 typeof import ( "./subagent-announce.runtime.js" ) . resolveAgentIdFromSessionKey ;
1919type ResolveStorePath = typeof import ( "./subagent-announce.runtime.js" ) . resolveStorePath ;
@@ -23,13 +23,12 @@ function installOutputDeps(params: {
2323 transcriptMessages ?: Array < unknown > ;
2424} ) {
2525 const callGateway = vi . fn ( async ( ) => ( { messages : params . messages } ) ) ;
26- const readSessionMessagesFromFileAsync = vi . fn ( async ( ) => params . transcriptMessages ?? [ ] ) ;
26+ const readSessionMessagesAsync = vi . fn ( async ( ) => params . transcriptMessages ?? [ ] ) ;
2727 testing . setDepsForTest ( {
2828 callGateway : callGateway as unknown as CallGateway ,
29- readSessionMessagesFromFileAsync :
30- readSessionMessagesFromFileAsync as unknown as ReadSessionMessagesFromFileAsync ,
29+ readSessionMessagesAsync : readSessionMessagesAsync as unknown as ReadSessionMessagesAsync ,
3130 } ) ;
32- return { callGateway, readSessionMessagesFromFileAsync } ;
31+ return { callGateway, readSessionMessagesAsync } ;
3332}
3433
3534function sessionsYieldTurn ( message = "Waiting for subagent completion." ) {
@@ -216,7 +215,7 @@ describe("readSubagentOutput", () => {
216215 sessionFile : "/tmp/openclaw-internal-run.jsonl" ,
217216 } ) ,
218217 ) . resolves . toBe ( "fresh recovered output" ) ;
219- expect ( deps . readSessionMessagesFromFileAsync ) . toHaveBeenCalledWith (
218+ expect ( deps . readSessionMessagesAsync ) . toHaveBeenCalledWith (
220219 {
221220 sessionFile : "/tmp/openclaw-internal-run.jsonl" ,
222221 sessionId : "agent:main:subagent:child" ,
0 commit comments