Skip to content

Conversation

@nmaguiar
Copy link
Contributor

@nmaguiar nmaguiar commented Jan 27, 2026

Motivation

  • Add a new useplotly option so the agent can be primed to emit Plotly JSON fenced blocks (` ```plotly````) similar to existing Chart.js and Mermaid support.
  • Render Plotly blocks in the browser UI only when the feature is enabled to avoid unconditional CDN loads.
  • Provide guidance and consistent UX for interactive, multi-series visuals that benefit from Plotly's capabilities.

Description

  • Wire a new boolean option through the stack by adding useplotly to mini-a.yaml, mini-a-web.yaml, mini-a-con.js, and CLI argument parsing in mini-a.js.
  • Extend MiniA.buildVisualKnowledge in mini-a.js to include Plotly guidance and to preserve plotly code fences in final answers.
  • Expose a /settings endpoint in mini-a-web.yaml and a small UI settings loader in public/index.md so the web UI can query whether Plotly is enabled.
  • Implement client-side Plotly rendering in public/index.md including: conditional CDN loading (PLOTLY_CDN) only when useplotly=true, JSON parsing/validation, theming, container/CSS, destroy/resize/re-render helpers, and integration points to force rendering alongside existing Chart.js/Mermaid flows.
  • Update documentation and examples (CHEATSHEET.md, USAGE.md, README.md) to document the new useplotly flag and example usage.

Testing

  • Performed an automated headless UI smoke exercise that injected a plotly fenced block into the page and invoked the rendering routine via a headless browser script, which produced a screenshot artifact (artifacts/plotly-ui.png) indicating successful rendering.
  • No unit test suites were modified or executed during this change; existing test jobs remain unchanged.
  • The change was committed (git commit) after local verification of the UI rendering step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants