Skip to content

Commit 79259e3

Browse files
Adam GoughAdam Gough
authored andcommitted
added greptile changes #970
1 parent 49a96b6 commit 79259e3

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

apps/sim/executor/handlers/agent/agent-handler.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -710,22 +710,12 @@ export class AgentBlockHandler implements BlockHandler {
710710
success: true,
711711
output: {},
712712
logs: [],
713-
metadata: {
714-
duration: 0,
715-
startTime: new Date().toISOString(),
716-
},
717-
// Enrich with block metadata so the executor can route streaming correctly
718-
...(block
719-
? {
720-
// These fields are consumed only by the streaming path
721-
// and are safe to include here for routing purposes
722-
blockId: block.id as unknown as undefined,
723-
blockType: block.metadata?.id as unknown as undefined,
724-
blockName: block.metadata?.name as unknown as undefined,
725-
isStreaming: true as unknown as undefined,
726-
}
727-
: { isStreaming: true as unknown as undefined }),
728-
} as any,
713+
metadata: { duration: 0, startTime: new Date().toISOString() },
714+
isStreaming: true,
715+
blockId: block?.id,
716+
blockType: block?.metadata?.id,
717+
blockName: block?.metadata?.name,
718+
},
729719
}
730720
}
731721

apps/sim/executor/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import type {
2929
StreamingExecution,
3030
} from '@/executor/types'
3131
import { streamingResponseFormatProcessor } from '@/executor/utils'
32-
// BlockType imported once at top
3332
import type { SerializedBlock, SerializedWorkflow } from '@/serializer/types'
3433
import { useExecutionStore } from '@/stores/execution/store'
3534
import { useConsoleStore } from '@/stores/panel/console/store'

apps/sim/executor/types.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,13 @@ export interface ExecutionResult {
185185
*/
186186
export interface StreamingExecution {
187187
stream: ReadableStream // The streaming response for the UI to consume
188-
execution: ExecutionResult & { isStreaming?: boolean } // The complete execution data for logging purposes
188+
execution: ExecutionResult & {
189+
// Streaming-specific metadata used by the UI routing path
190+
isStreaming?: boolean
191+
blockId?: string
192+
blockType?: string
193+
blockName?: string
194+
} // The complete execution data for logging purposes
189195
}
190196

191197
/**

0 commit comments

Comments
 (0)