trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

[TRI-1399] feat: Add ability to display images in the Run dashboard using image properties

Open ericallam opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

We currently support task properties with text and an optional URL (that renders the property as a link). It would be really cool to be able to support previewing image urls in Task Properties, especially for OpenAI image tasks (and for Dalle 3 once API support is released).

Describe the solution you'd like to see

Add another field to DisplayPropertySchema called image that is either a string url or an array of strings:

export const DisplayPropertySchema = z.object({
  /** The label for the property */
  label: z.string(),
  /** The value of the property */
  text: z.string(),
  /** The URL to link to when the property is clicked */
  url: z.string().optional(),
  image: z.string().or(z.string().array()).optional()
});

Then we would use that to display the images in the task in a photo carousel

CleanShot 2023-10-13 at 11 36 54

Describe alternate solutions

N/A

Additional information

No response

TRI-1399

ericallam avatar Oct 13 '23 10:10 ericallam