@@ -5,6 +5,7 @@ import { buildClaudeCommand, buildClaudeCommandArgs } from "../claude/client";
55import { buildCodexCommand , buildCodexCommandArgs } from "../codex/client" ;
66import { buildKimiCommand , buildKimiCommandArgs } from "../kimi/client" ;
77import { buildKiroCommand , buildKiroCommandArgs } from "../kiro/client" ;
8+ import { buildQwenCommand , buildQwenCommandArgs } from "../qwen/client" ;
89
910describe ( "agent cli command formatting" , ( ) => {
1011 it ( "builds the final Claude CLI command" , ( ) => {
@@ -89,6 +90,23 @@ describe("agent cli command formatting", () => {
8990 expect ( command ) . toContain ( "'hello from codex'" ) ;
9091 } ) ;
9192
93+ it ( "builds the Codex plan command" , ( ) => {
94+ const args = buildCodexCommandArgs ( {
95+ sessionId : "session-3" ,
96+ model : "gpt-5-codex" ,
97+ prompt : "plan this change" ,
98+ planMode : true ,
99+ } ) ;
100+ const command = buildCodexCommand ( args ) ;
101+
102+ expect ( command ) . toContain ( "codex exec resume" ) ;
103+ expect ( command ) . toContain ( "--json" ) ;
104+ expect ( command ) . toContain ( "--sandbox read-only" ) ;
105+ expect ( command ) . not . toContain ( "--full-auto" ) ;
106+ expect ( command ) . toContain ( "session-3" ) ;
107+ expect ( command ) . toContain ( "'plan this change'" ) ;
108+ } ) ;
109+
92110 it ( "builds the Kimi print command" , ( ) => {
93111 const args = buildKimiCommandArgs ( {
94112 sessionId : "session-4" ,
@@ -119,4 +137,31 @@ describe("agent cli command formatting", () => {
119137 expect ( command ) . toContain ( "--agent plan" ) ;
120138 expect ( command ) . toContain ( "'hello from kiro'" ) ;
121139 } ) ;
140+
141+ it ( "builds the Qwen plan-mode command" , ( ) => {
142+ const args = buildQwenCommandArgs ( {
143+ sessionId : "session-5" ,
144+ isNewSession : false ,
145+ prompt : "plan migration" ,
146+ approvalMode : "plan" ,
147+ } ) ;
148+ const command = buildQwenCommand ( args ) ;
149+
150+ expect ( command ) . toContain ( "--approval-mode plan" ) ;
151+ expect ( command ) . not . toContain ( "--yolo" ) ;
152+ expect ( command ) . toContain ( "--resume session-5" ) ;
153+ expect ( command ) . toContain ( "-p 'plan migration'" ) ;
154+ } ) ;
155+
156+ it ( "builds the Qwen default automation command" , ( ) => {
157+ const args = buildQwenCommandArgs ( {
158+ sessionId : "session-6" ,
159+ isNewSession : true ,
160+ prompt : "implement feature" ,
161+ } ) ;
162+ const command = buildQwenCommand ( args ) ;
163+
164+ expect ( command ) . toContain ( "--yolo" ) ;
165+ expect ( command ) . not . toContain ( "--approval-mode plan" ) ;
166+ } ) ;
122167} ) ;
0 commit comments