Preview timeline image
preview_timelineRender a Rhylthyme program as a static Gantt-chart image so the user can SEE what the live timeline looks like, without committing to opening the live URL. Use this when the user asks for a 'preview' or 'picture' of the timeline, or when you have just built a freehand program and want to give the user a visual before they commit. The tool returns ONLY an image plus a one-line caption — no recipe prose, no ingredient list, no copyright concerns. Just the structural visualization of which step runs when on which track.
Pair with visualize_schedule when the user wants the full shareable interactive URL too. This tool is for the visual-only quick preview case.
Planned versus actual. Pass run — a recorded run of the same program, as load_run returns it in run — and the picture becomes a comparison: each step's real bar over a thin ghost bar at its planned position, outlined green where it finished early and amber where it ran late. That is the fastest way to show a person where a plan drifted.
Rendering option for HTML-artifact-capable clients (Claude.ai etc.): Claude.ai's artifact sandbox blocks external scripts from non-cdnjs sources, so a <script src="https://kitchen.rhylthyme.com/..."> tag will fail. To render the timeline yourself with the official Rhylthyme look, call get_renderer_source first to fetch the renderer's full source as a string, then embed that source verbatim inside a <script>…</script> block in your HTML artifact, followed by your program JSON and a call to Rhylthyme.renderTimeline(document.getElementById('t'), program). The renderer is open-source (Apache-2.0), zero-dependency, ~9KB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run | No | Optional recorded run of the SAME program (`runs` schema 0.1.0-alpha — the `run` object from load_run). Draws planned-vs-actual: the actual bars over ghost bars at the planned positions, coloured by the sign of each step's end deviation. | |
| program | Yes | Rhylthyme program JSON (same shape visualize_schedule accepts). |