77 */
88
99import type { ExecutionTreeNode } from '@badaitech/chaingraph-executor/types'
10- import { AlertCircle , Clock , Copy , ExternalLink , Hash , Layers , Zap } from 'lucide-react'
10+ import { AlertCircle , Bot , Clock , Copy , ExternalLink , Hash , Layers , Wallet , Zap } from 'lucide-react'
1111import { Badge } from '@/components/ui/badge'
1212import { Button } from '@/components/ui/button'
1313import { Separator } from '@/components/ui/separator'
@@ -31,7 +31,6 @@ export function ExecutionDetails({ execution: node, onClose, className }: Execut
3131 const nodeId = node . id
3232 const parentId = node . parentId
3333 const rootId = execution . rootExecutionId
34- const level = node . level
3534
3635 // Format timestamps
3736 const createdAt = execution . createdAt ? new Date ( execution . createdAt ) : undefined
@@ -177,6 +176,102 @@ export function ExecutionDetails({ execution: node, onClose, className }: Execut
177176 </ >
178177 ) }
179178
179+ { /* Integration Info */ }
180+ { execution . integration && (
181+ < >
182+ < Separator />
183+ < div className = "space-y-3" >
184+ { execution . integration ?. archai && (
185+ < div className = "space-y-2" >
186+ < div className = "flex items-center gap-2 text-sm font-medium" >
187+ < Bot className = "w-4 h-4 text-green-500" />
188+ < span > ArchAI Integration</ span >
189+ </ div >
190+ < div className = "bg-muted/50 rounded-md p-3 space-y-2" >
191+ { execution . integration . archai . agentID && (
192+ < div className = "flex items-center justify-between text-sm" >
193+ < span className = "text-muted-foreground" > Agent ID</ span >
194+ < code className = "font-mono text-xs bg-muted px-2 py-0.5 rounded" >
195+ { execution . integration . archai . agentID }
196+ </ code >
197+ </ div >
198+ ) }
199+ { execution . integration . archai . chatID && (
200+ < div className = "flex items-center justify-between text-sm" >
201+ < span className = "text-muted-foreground" > Chat ID</ span >
202+ < code className = "font-mono text-xs bg-muted px-2 py-0.5 rounded" >
203+ { execution . integration . archai . chatID }
204+ </ code >
205+ </ div >
206+ ) }
207+ { execution . integration . archai . messageID !== undefined && (
208+ < div className = "flex items-center justify-between text-sm" >
209+ < span className = "text-muted-foreground" > Message ID</ span >
210+ < code className = "font-mono text-xs bg-muted px-2 py-0.5 rounded" >
211+ { execution . integration . archai . messageID }
212+ </ code >
213+ </ div >
214+ ) }
215+ { ! execution . integration . archai . agentID && ! execution . integration . archai . chatID && ! execution . integration . archai . messageID && (
216+ < div className = "text-sm text-muted-foreground" > No context available</ div >
217+ ) }
218+ </ div >
219+ </ div >
220+ ) }
221+
222+ { execution . integration ?. wallet && (
223+ < div className = "space-y-2" >
224+ < div className = "flex items-center gap-2 text-sm font-medium" >
225+ < Wallet className = "w-4 h-4 text-purple-500" />
226+ < span > Wallet Integration</ span >
227+ { execution . integration . wallet . isConnected && (
228+ < Badge variant = "outline" className = "text-xs" >
229+ Connected
230+ </ Badge >
231+ ) }
232+ </ div >
233+ < div className = "bg-muted/50 rounded-md p-3 space-y-2" >
234+ { execution . integration . wallet . address && (
235+ < div className = "flex items-center justify-between text-sm" >
236+ < span className = "text-muted-foreground" > Address</ span >
237+ < div className = "flex items-center gap-1" >
238+ < code className = "font-mono text-xs bg-muted px-2 py-0.5 rounded" >
239+ { execution . integration . wallet . address . slice ( 0 , 6 ) }
240+ ...
241+ { execution . integration . wallet . address . slice ( - 4 ) }
242+ </ code >
243+ < Button
244+ variant = "ghost"
245+ size = "icon"
246+ className = "h-6 w-6"
247+ onClick = { ( ) => copyToClipboard ( execution . integration ?. wallet ?. address || '' ) }
248+ >
249+ < Copy className = "h-3 w-3" />
250+ </ Button >
251+ </ div >
252+ </ div >
253+ ) }
254+ { execution . integration . wallet . chainId && (
255+ < div className = "flex items-center justify-between text-sm" >
256+ < span className = "text-muted-foreground" > Chain ID</ span >
257+ < code className = "font-mono text-xs bg-muted px-2 py-0.5 rounded" >
258+ { execution . integration . wallet . chainId }
259+ </ code >
260+ </ div >
261+ ) }
262+ < div className = "flex items-center justify-between text-sm" >
263+ < span className = "text-muted-foreground" > Status</ span >
264+ < span className = "text-xs" >
265+ { execution . integration . wallet . isConnected ? 'Connected' : 'Disconnected' }
266+ </ span >
267+ </ div >
268+ </ div >
269+ </ div >
270+ ) }
271+ </ div >
272+ </ >
273+ ) }
274+
180275 { /* Timestamps */ }
181276 < Separator />
182277 < div className = "space-y-2" >
0 commit comments