refactor agent execution

This commit is contained in:
Ramnique Singh 2025-11-16 20:58:31 +05:30
parent 92b702d039
commit a76cb6089c
6 changed files with 224 additions and 222 deletions

View file

@ -27,7 +27,7 @@ export class StreamRenderer {
render(event: z.infer<typeof RunEvent>) {
switch (event.type) {
case "start": {
this.onStart(event.agent, event.runId, event.interactive);
this.onStart(event.agent, event.runId);
break;
}
case "step-start": {
@ -94,10 +94,9 @@ export class StreamRenderer {
}
}
private onStart(agent: string, runId: string, interactive: boolean) {
private onStart(agent: string, runId: string) {
this.write("\n");
this.write(this.bold(`▶ Agent ${agent} (run ${runId})`));
if (!interactive) this.write(this.dim(" (--no-interactive)"));
this.write("\n");
}