Charles Grandjean commited on
Commit
db65cdc
·
1 Parent(s): 0403fed

fix current document

Browse files
Files changed (1) hide show
  1. agents/doc_editor.py +2 -5
agents/doc_editor.py CHANGED
@@ -177,14 +177,11 @@ Use this plan as your guide for the editing steps to perform."""
177
 
178
  args = tool_call['args'].copy()
179
 
180
- # Inject doc_text for editing tools
181
- if tool_name in ["replace_html", "add_html", "delete_html"]:
182
  args["doc_text"] = state["doc_text"]
183
  logger.info(f"Injecting doc_text ({len(state['doc_text'])}b) into {tool_name}")
184
 
185
- if tool_name == "view_current_document":
186
- logger.info(f"Viewing current document ({len(state['doc_text'])}b)")
187
-
188
  try:
189
  result = await tool_func.ainvoke(args)
190
 
 
177
 
178
  args = tool_call['args'].copy()
179
 
180
+ # Inject doc_text for editing tools AND view_current_document
181
+ if tool_name in ["replace_html", "add_html", "delete_html", "view_current_document"]:
182
  args["doc_text"] = state["doc_text"]
183
  logger.info(f"Injecting doc_text ({len(state['doc_text'])}b) into {tool_name}")
184
 
 
 
 
185
  try:
186
  result = await tool_func.ainvoke(args)
187