feat: emit events for unified_exec (#5448)
This commit is contained in:
@@ -7,6 +7,9 @@ use tokio::time::Instant;
|
||||
|
||||
use crate::exec_env::create_env;
|
||||
use crate::sandboxing::ExecEnv;
|
||||
use crate::tools::events::ToolEmitter;
|
||||
use crate::tools::events::ToolEventCtx;
|
||||
use crate::tools::events::ToolEventStage;
|
||||
use crate::tools::orchestrator::ToolOrchestrator;
|
||||
use crate::tools::runtimes::unified_exec::UnifiedExecRequest as UnifiedExecToolRequest;
|
||||
use crate::tools::runtimes::unified_exec::UnifiedExecRuntime;
|
||||
@@ -246,6 +249,13 @@ impl UnifiedExecSessionManager {
|
||||
None => (DEFAULT_TIMEOUT_MS, None),
|
||||
};
|
||||
|
||||
if !request.input_chunks.is_empty() {
|
||||
let event_ctx = ToolEventCtx::new(context.session, context.turn, context.call_id, None);
|
||||
let emitter =
|
||||
ToolEmitter::shell(request.input_chunks.to_vec(), context.turn.cwd.clone());
|
||||
emitter.emit(event_ctx, ToolEventStage::Begin).await;
|
||||
}
|
||||
|
||||
let mut acquisition = self.acquire_session(&request, &context).await?;
|
||||
|
||||
if acquisition.reuse_requested {
|
||||
|
||||
Reference in New Issue
Block a user