@@ -70,6 +70,18 @@ fn user_input_text_msg(text: &str) -> ResponseItem {
7070 }
7171}
7272
73+ fn developer_input_text_msg ( text : & str ) -> ResponseItem {
74+ ResponseItem :: Message {
75+ id : None ,
76+ role : "developer" . to_string ( ) ,
77+ content : vec ! [ ContentItem :: InputText {
78+ text: text. to_string( ) ,
79+ } ] ,
80+ end_turn : None ,
81+ phase : None ,
82+ }
83+ }
84+
7385fn custom_tool_call_output ( call_id : & str , output : & str ) -> ResponseItem {
7486 ResponseItem :: CustomToolCallOutput {
7587 call_id : call_id. to_string ( ) ,
@@ -616,7 +628,7 @@ fn drop_last_n_user_turns_ignores_session_prefix_user_messages() {
616628 "<skill>\n <name>demo</name>\n <path>skills/demo/SKILL.md</path>\n body\n </skill>" ,
617629 ) ,
618630 user_input_text_msg( "<user_shell_command>echo 42</user_shell_command>" ) ,
619- user_input_text_msg (
631+ developer_input_text_msg (
620632 "<subagent_notification>{\" agent_id\" :\" a\" ,\" status\" :\" completed\" }</subagent_notification>" ,
621633 ) ,
622634 user_input_text_msg( "turn 1 user" ) ,
@@ -638,7 +650,7 @@ fn drop_last_n_user_turns_ignores_session_prefix_user_messages() {
638650 "<skill>\n <name>demo</name>\n <path>skills/demo/SKILL.md</path>\n body\n </skill>" ,
639651 ) ,
640652 user_input_text_msg( "<user_shell_command>echo 42</user_shell_command>" ) ,
641- user_input_text_msg (
653+ developer_input_text_msg (
642654 "<subagent_notification>{\" agent_id\" :\" a\" ,\" status\" :\" completed\" }</subagent_notification>" ,
643655 ) ,
644656 user_input_text_msg( "turn 1 user" ) ,
@@ -659,7 +671,7 @@ fn drop_last_n_user_turns_ignores_session_prefix_user_messages() {
659671 "<skill>\n <name>demo</name>\n <path>skills/demo/SKILL.md</path>\n body\n </skill>" ,
660672 ) ,
661673 user_input_text_msg( "<user_shell_command>echo 42</user_shell_command>" ) ,
662- user_input_text_msg (
674+ developer_input_text_msg (
663675 "<subagent_notification>{\" agent_id\" :\" a\" ,\" status\" :\" completed\" }</subagent_notification>" ,
664676 ) ,
665677 ] ;
@@ -673,7 +685,7 @@ fn drop_last_n_user_turns_ignores_session_prefix_user_messages() {
673685 "<skill>\n <name>demo</name>\n <path>skills/demo/SKILL.md</path>\n body\n </skill>" ,
674686 ) ,
675687 user_input_text_msg( "<user_shell_command>echo 42</user_shell_command>" ) ,
676- user_input_text_msg (
688+ developer_input_text_msg (
677689 "<subagent_notification>{\" agent_id\" :\" a\" ,\" status\" :\" completed\" }</subagent_notification>" ,
678690 ) ,
679691 user_input_text_msg( "turn 1 user" ) ,
@@ -693,7 +705,7 @@ fn drop_last_n_user_turns_ignores_session_prefix_user_messages() {
693705 "<skill>\n <name>demo</name>\n <path>skills/demo/SKILL.md</path>\n body\n </skill>" ,
694706 ) ,
695707 user_input_text_msg( "<user_shell_command>echo 42</user_shell_command>" ) ,
696- user_input_text_msg (
708+ developer_input_text_msg (
697709 "<subagent_notification>{\" agent_id\" :\" a\" ,\" status\" :\" completed\" }</subagent_notification>" ,
698710 ) ,
699711 user_input_text_msg( "turn 1 user" ) ,
0 commit comments