@@ -1031,19 +1031,45 @@ it.effect(
10311031 } ) ;
10321032 const cases = [
10331033 { text : " /compact " , attachments : [ ] , expected : "compact" } ,
1034+ {
1035+ text : "/compact keep the tests" ,
1036+ attachments : [ ] ,
1037+ expected : "command" ,
1038+ driver : ProviderDriverKind . make ( "pi" ) ,
1039+ } ,
1040+ {
1041+ text : "/compact keep the tests" ,
1042+ attachments : [ attachment ] ,
1043+ expected : "command" ,
1044+ driver : ProviderDriverKind . make ( "pi" ) ,
1045+ } ,
1046+ {
1047+ text : "Continue the work" ,
1048+ attachments : [ ] ,
1049+ expected : "prompt" ,
1050+ driver : ProviderDriverKind . make ( "pi" ) ,
1051+ } ,
1052+ {
1053+ text : "/review" ,
1054+ attachments : [ ] ,
1055+ expected : "command" ,
1056+ driver : ProviderDriverKind . make ( "opencode" ) ,
1057+ } ,
10341058 { text : "/compact" , attachments : [ attachment ] , expected : "prompt" } ,
10351059 { text : "/goal finish the work" , attachments : [ ] , expected : "goal" } ,
10361060 { text : "/goal finish the work" , attachments : [ attachment ] , expected : "prompt" } ,
10371061 { text : "Continue the work" , attachments : [ ] , expected : "prompt" } ,
1038- ] . flatMap ( ( testCase ) =>
1039- (
1040- [
1041- { createdBy : "user" , senderThreadId : ThreadId . make ( "thread:sender" ) } ,
1042- { createdBy : "agent" , senderThreadId : ThreadId . make ( "thread:sender" ) } ,
1043- { createdBy : "agent" , senderThreadId : undefined } ,
1044- ] as const
1045- ) . map ( ( origin ) => ( { ...testCase , ...origin } ) ) ,
1046- ) ;
1062+ ]
1063+ . map ( ( testCase ) => ( { driver, ...testCase } ) )
1064+ . flatMap ( ( testCase ) =>
1065+ (
1066+ [
1067+ { createdBy : "user" , senderThreadId : ThreadId . make ( "thread:sender" ) } ,
1068+ { createdBy : "agent" , senderThreadId : ThreadId . make ( "thread:sender" ) } ,
1069+ { createdBy : "agent" , senderThreadId : undefined } ,
1070+ ] as const
1071+ ) . map ( ( origin ) => ( { ...testCase , ...origin } ) ) ,
1072+ ) ;
10471073 for ( const [ index , testCase ] of cases . entries ( ) ) {
10481074 const prompts : Array < ProviderAdapter . ProviderAdapterV2TurnInput > = [ ] ;
10491075 const threadId = ThreadId . make ( `thread:compact-routing:${ index } ` ) ;
@@ -1053,7 +1079,7 @@ it.effect(
10531079 appThread : rootAppThread ( threadId ) ,
10541080 providerSessionId : ProviderSessionId . make ( `session:compact-routing:${ index } ` ) ,
10551081 session : {
1056- driver,
1082+ driver : testCase . driver ,
10571083 events : Stream . never ,
10581084 startTurn : ( input : ProviderAdapter . ProviderAdapterV2TurnInput ) =>
10591085 Effect . sync ( ( ) => {
@@ -1080,7 +1106,7 @@ it.effect(
10801106 } as OrchestrationV2CheckpointScope ,
10811107 providerThread : {
10821108 id : ProviderThreadId . make ( `provider-thread:compact-routing:${ index } ` ) ,
1083- driver,
1109+ driver : testCase . driver ,
10841110 } as OrchestrationV2ProviderThread ,
10851111 attempt : { id : attemptId , providerTurnId : null } as OrchestrationV2RunAttempt ,
10861112 attemptId,
@@ -1112,6 +1138,7 @@ it.effect(
11121138 if ( prompt !== undefined ) {
11131139 if (
11141140 testCase . expected !== "goal" &&
1141+ testCase . expected !== "command" &&
11151142 testCase . createdBy === "agent" &&
11161143 testCase . senderThreadId !== undefined
11171144 ) {
0 commit comments