feat: add trace URL in workflow runs

This commit is contained in:
Abhishek Kumar 2026-01-03 17:59:59 +05:30
parent 085a88308a
commit cdf68533ad
5 changed files with 55 additions and 20 deletions

View file

@ -1,6 +1,6 @@
'use client';
import { Check, Copy, FileText, Video } from 'lucide-react';
import { Check, Copy, ExternalLink, FileText, Video } from 'lucide-react';
import Link from 'next/link';
import { useParams } from 'next/navigation';
import { useEffect, useRef, useState } from 'react';
@ -211,6 +211,26 @@ export default function WorkflowRunPage() {
Recording
</Button>
</div>
{workflowRun?.gathered_context?.trace_url && (
<div className="flex items-center gap-2 border-l border-border pl-4">
<span className="text-sm text-muted-foreground">Trace:</span>
<Button
asChild
size="sm"
variant="outline"
className="gap-2"
>
<a
href={String(workflowRun.gathered_context.trace_url)}
target="_blank"
rel="noopener noreferrer"
>
<ExternalLink className="h-4 w-4" />
View Trace
</a>
</Button>
</div>
)}
</div>
</CardContent>
</Card>

File diff suppressed because one or more lines are too long

View file

@ -367,7 +367,7 @@ export type HttpApiConfig = {
*/
method: string;
/**
* Target URL (supports {{variable}} placeholders)
* Target URL
*/
url: string;
/**
@ -381,27 +381,13 @@ export type HttpApiConfig = {
*/
credential_uuid?: string | null;
/**
* Request body with {{variable}} placeholders
* Parameters that the tool accepts from LLM
*/
body_template?: {
[key: string]: unknown;
} | null;
parameters?: Array<ToolParameter> | null;
/**
* Request timeout in milliseconds
*/
timeout_ms?: number | null;
/**
* Retry configuration
*/
retry_config?: {
[key: string]: unknown;
} | null;
/**
* JSONPath mappings for response extraction
*/
response_mapping?: {
[key: string]: string;
} | null;
};
/**
@ -614,6 +600,28 @@ export type ToolDefinition = {
config: HttpApiConfig;
};
/**
* A parameter that the tool accepts.
*/
export type ToolParameter = {
/**
* Parameter name (used as key in request body)
*/
name: string;
/**
* Parameter type: string, number, or boolean
*/
type: string;
/**
* Description of what this parameter is for
*/
description: string;
/**
* Whether this parameter is required
*/
required?: boolean;
};
/**
* Response schema for a tool.
*/