diff --git a/app/components/workflow.tsx b/app/components/workflow.tsx index f8d22b2c..206a38b3 100644 --- a/app/components/workflow.tsx +++ b/app/components/workflow.tsx @@ -354,100 +354,115 @@ export function Run({
{run.test ? ( -
+
) : ( -
+
)} - - {run.test ? "Test Run" : "Run"} - +
+ + {run.test ? "Test Run" : "Run"} + +

{run.id}

+
- {run.metadata && ( -
- { - Object.entries(run.metadata).length > 0 && ( -
- {Object.entries(run.metadata).map( - ([key, value]) => ( -
- {key}: {value} -
- ) - )} -
- ) - } -
- )} + {run.metadata && Object.keys(run.metadata).length > 0 && ( +
+ + Metadata + +
+ {Object.entries(run.metadata).map(([key, value]) => ( +
+ {key}: {value} +
+ ))} +
+
+ )} - {run.context && ( -
-

Context

- { - Object.entries(run.context).length > 0 && ( -
- {Object.entries(run.context) - .map(([key, value]) => [key, JSON.stringify(value, null, 2)]) - .map(([key, value]) => [key, value.length > 50 ? value.slice(0, 50) + "..." : value]) - .map( - ([key, value]) => ( -
- {key}: {value} -
- ) - )} -
- ) - } -
- )} - -
- Functions:{" "} - {run.attachedFunctions && - run.attachedFunctions.length > 0 ? ( - - {run.attachedFunctions.join(", ")} + {run.context && Object.keys(run.context).length > 0 && ( +
+ + Context - ) : ( - - Full access including{" "} - - Standard Library - +
+ {Object.entries(run.context).map(([key, value]) => { + const displayValue = + typeof value === "string" && value.length > 50 + ? value.slice(0, 47) + "..." + : JSON.stringify(value); + return ( +
+ {key}: {displayValue} +
+ ); + })} +
+
+ )} + + {run.attachedFunctions && run.attachedFunctions.length > 0 ? ( +
+ + Functions - )} -
+
+ {run.attachedFunctions.map((fn) => ( +
+ {fn} +
+ ))} +
+
+ ) : ( +
+ + Functions + +
+
+ Full access including{" "} + + Standard Library + +
+
+
+ )} {run.userId && ( -
- User Id:{" "} - - {run.userId} +
+ + User Context +
+
+ Id: {run.userId} +
+
)}