Displays

Render formatted content within the run timeline
Runs can use either the JavaScript or Python SDK to render formatted content within the run UI using displays. Displays are helpful for surfacing contextual information about a run to operators, such as:
  • Conveying the state of a run
  • Rendering output in a custom format
Displays are independent of run Output.

Text

Creates a display that renders markdown-rendered text.
typescript
Copied
1
await airplane.display.text(`Found **${users.length}** users from team "${team.name}".`);

Table

Creates a display that renders a list of rows in a table.
typescript
Copied
1
await airplane.display.table(users);

JSON

Creates a display that renders a JSON document with syntax highlighting.
typescript
Copied
1
await airplane.display.json(httpResponse);

File

Creates a display that renders a File and allows users to download it from the UI. If the file is a text, csv, image, video, or audio file, it will be rendered inline in the UI.
typescript
Copied
1
// First ask the user for a file.
2
const { photo } = await airplane.prompt({ photo: "upload" });
3
4
// Then display it in the UI
5
await airplane.display.file(photo);

SDK reference

See Display SDK reference for more information.