@@ -91,6 +91,7 @@ def __init__(self, *args, **kwargs):
9191 self .allowed_context_blocks = set ()
9292 self .context_block_tokens = {}
9393 self .context_blocks_cache = {}
94+ self .current_tasks = []
9495 self .hot_reload_enabled = False
9596 self .tokens_calculated = False
9697 self .skip_cli_confirmations = False
@@ -152,6 +153,7 @@ def _get_agent_config(self):
152153 config , "skip_cli_confirmations" , nested .getter (config , "yolo" , [])
153154 )
154155 config ["command_timeout" ] = nested .getter (config , "command_timeout" , 30 )
156+ config ["allowed_commands" ] = nested .getter (config , "allowed_commands" , [])
155157 config ["hot_reload" ] = nested .getter (config , "hot_reload" , False )
156158 config ["allow_nested_delegation" ] = nested .getter (config , "allow_nested_delegation" , False )
157159
@@ -160,7 +162,9 @@ def _get_agent_config(self):
160162 config , ["tools_includelist" , "tools_whitelist" ], []
161163 )
162164 config ["tools_excludelist" ] = nested .getter (
163- config , ["tools_excludelist" , "tools_blacklist" ], []
165+ config ,
166+ ["tools_excludelist" , "tools_blacklist" ],
167+ ["gitbranch" , "gitdiff" , "gitlog" , "gitremote" , "gitshow" , "gitstatus" ],
164168 )
165169
166170 config ["servers_includelist" ] = nested .getter (
@@ -174,7 +178,7 @@ def _get_agent_config(self):
174178 config ,
175179 "include_context_blocks" ,
176180 {
177- "context_summary" ,
181+ # "context_summary",
178182 # "directory_structure",
179183 "environment_info" ,
180184 # "git_status",
@@ -239,20 +243,6 @@ def show_announcements(self):
239243 if self .loaded_custom_tools :
240244 self .io .tool_output (f"Loaded custom tools: { ', ' .join (self .loaded_custom_tools )} " )
241245
242- skills = self .skills_manager .find_skills ()
243- if skills :
244- skills_list = []
245- for skill in skills :
246- skills_list .append (skill .name )
247- joined_skills = ", " .join (skills_list )
248- self .io .tool_output (f"Available Skills: { joined_skills } " )
249-
250- registry = AgentService .get_registry ()
251- if registry :
252- names = sorted (registry .keys ())
253- joined_names = ", " .join (names )
254- self .io .tool_output (f"Available Subagents: { joined_names } " )
255-
256246 def get_local_tool_schemas (self ):
257247 """Returns the JSON schemas for all local tools using the tool registry."""
258248 schemas = []
@@ -625,7 +615,7 @@ def get_context_summary(self):
625615 percentage = total_tokens / max_input_tokens * 100
626616 result += f" ({ percentage :.1f} % of limit)"
627617 if percentage > 80 :
628- result += "\n \n ⚠️ **Context is getting full!**\n "
618+ result += "\n \n ⚠ **Context is getting full!**\n "
629619 result += "- Remove non-essential files via the `ContextManager` tool.\n "
630620 result += "- Keep only essential files in context for best performance"
631621 result += "\n </context>"
@@ -822,6 +812,9 @@ async def gather_and_await():
822812 "# Fix any linting errors below, if possible and then continue with your task." ,
823813 1 ,
824814 )
815+ ConversationService .get_manager (self ).remove_message_by_hash_key (
816+ ("lint_errors" , "agent" )
817+ )
825818 ConversationService .get_manager (self ).add_message (
826819 message_dict = dict (role = "user" , content = lint_errors ),
827820 tag = MessageTag .CUR ,
@@ -1115,7 +1108,7 @@ def _generate_tool_context(self, repetitive_tools):
11151108 context_parts .append ("## File Editing Tools Disabled" )
11161109 context_parts .append (
11171110 "File editing tools are currently disabled. Use `ReadRange` to determine the"
1118- " current content hash prefixes needed to perform an edit and activate them when"
1111+ " current content ID prefixes needed to perform an edit and activate them when"
11191112 " you are ready to edit a file."
11201113 )
11211114
@@ -1279,16 +1272,20 @@ def _add_file_to_context(self, file_path, explicit=False):
12791272 abs_path = self .abs_root_path (file_path )
12801273 rel_path = self .get_rel_fname (abs_path )
12811274 if not os .path .isfile (abs_path ):
1282- self .io .tool_output (f"⚠️ File '{ file_path } ' not found" )
1275+ self .io .tool_output (f"⚠ File '{ file_path } ' not found" , type = "tool-result " )
12831276 return "File not found"
12841277 if abs_path in self .abs_fnames :
12851278 if explicit :
1286- self .io .tool_output (f"📎 File '{ file_path } ' already in context as editable" )
1279+ self .io .tool_output (
1280+ f"🗀 File '{ file_path } ' already in context as editable" , type = "tool-result"
1281+ )
12871282 return "File already in context as editable"
12881283 return "File already in context as editable"
12891284 if abs_path in self .abs_read_only_fnames :
12901285 if explicit :
1291- self .io .tool_output (f"📎 File '{ file_path } ' already in context as read-only" )
1286+ self .io .tool_output (
1287+ f"🗀 File '{ file_path } ' already in context as read-only" , type = "tool-result"
1288+ )
12921289 return "File already in context as read-only"
12931290 return "File already in context as read-only"
12941291 try :
@@ -1299,13 +1296,18 @@ def _add_file_to_context(self, file_path, explicit=False):
12991296 file_tokens = self .get_active_model ().token_count (content )
13001297 if file_tokens > self .large_file_token_threshold :
13011298 self .io .tool_output (
1302- f"⚠️ '{ file_path } ' is very large ({ file_tokens } tokens). Use"
1303- " /context-management to toggle truncation off if needed."
1299+ (
1300+ f"⚠ '{ file_path } ' is very large ({ file_tokens } tokens). Use"
1301+ " /context-management to toggle truncation off if needed."
1302+ ),
1303+ type = "tool-result" ,
13041304 )
13051305 self .abs_read_only_fnames .add (abs_path )
13061306 self .files_added_in_exploration .add (rel_path )
13071307 if explicit :
1308- self .io .tool_output (f"📎 Viewed '{ file_path } ' (added to context as read-only)" )
1308+ self .io .tool_output (
1309+ f"🗀 Viewed '{ file_path } ' (added to context as read-only)" , type = "tool-result"
1310+ )
13091311 return "Viewed file (added to context as read-only)"
13101312 else :
13111313 return "Added file to context as read-only"
@@ -1432,10 +1434,11 @@ def get_todo_list(self):
14321434 content = self .io .read_text (abs_path )
14331435 if content is None or not content .strip ():
14341436 return None
1437+
1438+ current_tasks = "\n " .join (self .current_tasks )
14351439 result = '<context name="todo_list" from="agent">\n '
1436- result += "## Current Todo List\n \n "
1437- result += "Below is the current todo list managed via the `UpdateTodoList` tool:\n \n "
1438- result += f"```\n { content } \n ```\n "
1440+ result += "## Current Active Tasks\n \n "
1441+ result += f"```{ current_tasks } ```\n "
14391442 result += "</context>"
14401443 return result
14411444 except Exception as e :
0 commit comments