@@ -82,6 +82,9 @@ Please check the format of the request and try again.
8282
8383If you think you have finished your task and want to stop,
8484please just output a special token [[[[DONE]]]].
85+
86+ Otherwise, please either continue to use the tool with [[[[INVOKE]]]] or
87+ write the documentation with [[[[DOCUMENT]]]] without outputting any [[[[DONE]]]].
8588"#
8689 ) )
8790 }
@@ -92,7 +95,7 @@ fn run_pipeline(agent: &mut Agent, toolset: &tools::ToolSet) {
9295 println ! ( "\n ============= LLM RESPONSE =============" ) ;
9396 if let Ok ( response) = agent. post ( ) {
9497 if response. trim ( ) . ends_with ( "[[[[DONE]]]]" ) {
95- println ! ( "Done ." ) ;
98+ println ! ( "\n \n Done ." ) ;
9699 break ;
97100 }
98101 agent. add_message ( "assistant" , & response) ;
@@ -207,15 +210,42 @@ Please output a special heading and than JSON requests following the format (mus
207210 "arg2": value2
208211 }}
209212}}
213+ ```
210214
211- If you would like to document a file, please output a special heading and than the documentation in Rust standard format:
215+ Please note that you can only call **one** tool **once** at a time. Otherwise errors will be returned.
216+
217+ If you would like to document a file, please output a special [[[[DOCUMENT]]]] token and then the
218+ documentation in Rust standard format:
212219[[[[DOCUMENT]]]]
213220<file name here with path on a new line>
214221
215- Some documentation here...
216- ```
222+ <<<<<<< SEARCH
223+ LINE 00001: mod xxx;
224+ LINE 00002: use yyyy;
225+ ======= REPLACE
226+ /// Some description here
227+ /// Some description here
228+ mod xxx;
229+ use yyyy;
230+ >>>>>>> FINISH
217231
218- Please note that you can only call **one** tool **once** at a time. Otherwise errors will be returned.
232+ <<<<<<< SEARCH
233+ LINE 00123: fn foo() {{
234+ ======= REPLACE
235+ /// Some description here
236+ /// Some description here
237+ fn foo() {{
238+ ...
239+ >>>>>>> FINISH
240+
241+ Note that you **MUST** output "<<<<<<< SEARCH" and "======= REPLACE" and ">>>>>>> FINISH" signs!!!
242+ And you **MUST** keep the SEARCH part **AS SMALL AS POSSIBLE**, but you cannot mistake the line numbers.
243+
244+ You may make a plan first, determine all the files to be processed.
245+ During each step, you should always be checking if you are on the right track.
246+ Do not leave any files unprocessed. Remember to check and update the plan carefully.
247+
248+ Keep track of the files you have processed and the ones you have not.
219249"# ,
220250 help
221251 ) ;
0 commit comments