mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-26 07:25:58 +00:00
update
This commit is contained in:
parent
96c7274a0e
commit
2d5f002ccc
5 changed files with 16 additions and 11 deletions
|
|
@ -737,9 +737,7 @@ class ListenChatAgent(ChatAgent):
|
|||
|
||||
# Restore original CDP URL in parent toolkit
|
||||
if new_cdp_port is not None and hasattr(self, "_browser_toolkit"):
|
||||
self._browser_toolkit.config_loader.get_browser_config().cdp_url = (
|
||||
original_cdp_url
|
||||
)
|
||||
self._browser_toolkit.config_loader.get_browser_config().cdp_url = original_cdp_url
|
||||
|
||||
new_agent = ListenChatAgent(
|
||||
api_task_id=self.api_task_id,
|
||||
|
|
|
|||
|
|
@ -171,7 +171,9 @@ def _log_deactivate(
|
|||
)
|
||||
|
||||
|
||||
def _filter_kwargs_for_callable(func: Callable[..., Any], kwargs: dict) -> dict:
|
||||
def _filter_kwargs_for_callable(
|
||||
func: Callable[..., Any], kwargs: dict
|
||||
) -> dict:
|
||||
"""Drop unexpected kwargs unless the callable accepts **kwargs."""
|
||||
if not kwargs:
|
||||
return kwargs
|
||||
|
|
@ -179,7 +181,9 @@ def _filter_kwargs_for_callable(func: Callable[..., Any], kwargs: dict) -> dict:
|
|||
sig = signature(func)
|
||||
except (TypeError, ValueError):
|
||||
return kwargs
|
||||
if any(param.kind == param.VAR_KEYWORD for param in sig.parameters.values()):
|
||||
if any(
|
||||
param.kind == param.VAR_KEYWORD for param in sig.parameters.values()
|
||||
):
|
||||
return kwargs
|
||||
allowed = set(sig.parameters.keys())
|
||||
return {k: v for k, v in kwargs.items() if k in allowed}
|
||||
|
|
|
|||
|
|
@ -87,8 +87,14 @@ class SingleAgentWorker(BaseSingleAgentWorker):
|
|||
`TaskState.FAILED`.
|
||||
"""
|
||||
# Log task details before getting agent (for clone tracking)
|
||||
task_content_preview = task.content[:100] + "..." if len(task.content) > 100 else task.content
|
||||
logger.info(f"[TASK REQUEST] Requesting agent for task_id={task.id}, content_preview='{task_content_preview}'")
|
||||
task_content_preview = (
|
||||
task.content[:100] + "..."
|
||||
if len(task.content) > 100
|
||||
else task.content
|
||||
)
|
||||
logger.info(
|
||||
f"[TASK REQUEST] Requesting agent for task_id={task.id}, content_preview='{task_content_preview}'"
|
||||
)
|
||||
|
||||
# Get agent efficiently (from pool or by cloning)
|
||||
worker_agent = await self._get_worker_agent()
|
||||
|
|
|
|||
|
|
@ -11,4 +11,3 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
|
||||
|
||||
|
|
|
|||
|
|
@ -952,9 +952,7 @@ class Workforce(BaseWorkforce):
|
|||
# Cleanup agents in AgentPool
|
||||
if hasattr(child, "agent_pool") and child.agent_pool:
|
||||
pool = child.agent_pool
|
||||
for agent in list(
|
||||
getattr(pool, "_available_agents", [])
|
||||
):
|
||||
for agent in list(getattr(pool, "_available_agents", [])):
|
||||
cb = getattr(agent, "_cdp_release_callback", None)
|
||||
if callable(cb):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue