fix(agent): 在passthrough模式下添加direct参数以绕过超时检查
当启用passthrough模式时,通过direct参数跳过60秒超时检查,确保消息直接发送而不受限制
This commit is contained in:
+2
-2
@@ -91,7 +91,7 @@ class SessionManager:
|
||||
)
|
||||
return session
|
||||
|
||||
async def send(self, conv_id: str, message: str, user_id: Optional[str] = None) -> str:
|
||||
async def send(self, conv_id: str, message: str, user_id: Optional[str] = None, direct: bool = False) -> str:
|
||||
async with self._lock:
|
||||
session = self._sessions.get(conv_id)
|
||||
if session is None:
|
||||
@@ -108,7 +108,7 @@ class SessionManager:
|
||||
session.started = True
|
||||
self._save()
|
||||
|
||||
if cc_timeout > 60:
|
||||
if not direct and cc_timeout > 60:
|
||||
from agent.task_runner import task_runner
|
||||
from orchestrator.tools import get_current_chat, set_current_chat, set_current_user
|
||||
|
||||
|
||||
Reference in New Issue
Block a user