@@ -211,34 +211,14 @@ async def create(
211211
212212 use_kwargs = dict (from_coder .original_kwargs ) # copy orig kwargs
213213
214- # If the edit format changes, we can't leave old ASSISTANT
215- # messages in the chat history. The old edit format will
216- # confused the new LLM. It may try and imitate it, disobeying
217- # the system prompt.
218- # Get DONE messages from ConversationManager
219- done_messages = ConversationManager .get_messages_dict (MessageTag .DONE )
220- if edit_format != from_coder .edit_format and done_messages and summarize_from_coder :
221- try :
222- io .tool_warning ("Summarizing messages, please wait..." )
223- done_messages = await from_coder .summarizer .summarize_all (done_messages )
224- except (KeyboardInterrupt , ValueError ):
225- # If summarization fails, keep the original messages and warn the user
226- io .tool_warning (
227- "Chat history summarization failed, continuing with full history"
228- )
229-
230- # Bring along context from the old Coder
231- # Get CUR messages from ConversationManager
232- cur_messages = ConversationManager .get_messages_dict (MessageTag .CUR )
233-
234214 update = dict (
235215 fnames = list (from_coder .abs_fnames ),
236216 read_only_fnames = list (from_coder .abs_read_only_fnames ), # Copy read-only files
237217 read_only_stubs_fnames = list (
238218 from_coder .abs_read_only_stubs_fnames
239219 ), # Copy read-only stubs
240- done_messages = done_messages ,
241- cur_messages = cur_messages ,
220+ done_messages = [] ,
221+ cur_messages = [] ,
242222 coder_commit_hashes = from_coder .coder_commit_hashes ,
243223 commands = from_coder .commands .clone (),
244224 total_cost = from_coder .total_cost ,
@@ -415,22 +395,6 @@ def __init__(
415395 self .add_gitignore_files = add_gitignore_files
416396 self .abs_read_only_stubs_fnames = set ()
417397
418- # Always use ConversationManager as the source of truth
419- # Add any provided messages to ConversationManager
420- if done_messages :
421- for msg in done_messages :
422- ConversationManager .add_message (
423- message_dict = msg ,
424- tag = MessageTag .DONE ,
425- )
426-
427- if cur_messages :
428- for msg in cur_messages :
429- ConversationManager .add_message (
430- message_dict = msg ,
431- tag = MessageTag .CUR ,
432- )
433-
434398 self .io = io
435399 self .io .coder = weakref .ref (self )
436400
0 commit comments