mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
feat: add trace URL in workflow runs
This commit is contained in:
parent
085a88308a
commit
cdf68533ad
5 changed files with 55 additions and 20 deletions
|
|
@ -109,6 +109,13 @@ def register_task_event_handler(
|
|||
|
||||
gathered_context = await engine.get_gathered_context()
|
||||
|
||||
# Add trace URL if available (must be done before conversation tracing ends)
|
||||
if task.turn_trace_observer:
|
||||
trace_url = task.turn_trace_observer.get_trace_url()
|
||||
if trace_url:
|
||||
gathered_context["trace_url"] = trace_url
|
||||
logger.debug(f"Added trace URL to gathered_context: {trace_url}")
|
||||
|
||||
# also consider existing gathered context in workflow_run
|
||||
gathered_context = {**gathered_context, **workflow_run.gathered_context}
|
||||
|
||||
|
|
|
|||
2
pipecat
2
pipecat
|
|
@ -1 +1 @@
|
|||
Subproject commit c671c54d3aa0c4e360465bce533630de4cb39111
|
||||
Subproject commit dcbb94cf920fbdc5af84d4e9f6844593796fea91
|
||||
|
|
@ -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
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue