open_diagram_file
Open a rendered diagram file in its default app or reveal its folder location to view cloud architecture diagrams generated from Terraform code.
Instructions
Open a rendered diagram file for the user on their own computer.
Opens the file in its default app: the image viewer for .png, draw.io for .drawio (draw.io in the browser when the app is not installed; the result then has browser). With reveal, opens the folder that holds it instead. Only files returned by render_graph or generate_diagram in this session can be opened. Call it when the user asks, or when a diagram result's "display" says the app has no diagram view; never when "display" says the app is already showing the diagram.
Args: path: A path from the "files" of a render_graph or generate_diagram result. reveal: Show the file in its folder instead of opening it.
Returns: {"opened", "reveal"}, and "browser" when a .drawio file opened in draw.io's web app.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| reveal | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |