Replies: 1 comment
-
|
👋 Thank you for opening this issue! Summary: The user is requesting a comprehensive inline AI assistance system for draw.io, including Cursor-style Tab-to-accept ghost previews of predicted next shapes/edges, a live AI suggestions side panel with previewable patches, and deterministic auto-fix nudges for alignment/spacing — all designed to augment the editing flow without interrupting it. 📝 Additional Information NeededTo help us investigate this more effectively, could you please provide:
🤖 This is an automated response to help with initial triage. A human maintainer will review this issue. If you've provided all the requested information, no further action is needed - we'll get back to you soon! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Inline AI assistance: Cursor-style Tab completion, ghost previews, and a live suggestions panel
Is your feature request related to a problem? Please describe.
Diagramming is inherently iterative — you place a shape, adjust alignment, draw a connector, and realise the layout is off. The existing Generate tool (sparkle button) is great for one-shot prompt-to-diagram, but it's too heavy for small in-flight decisions like "this node probably belongs next to that one" or "this branch needs a decision diamond before the merge." There's no way to get lightweight, context-aware suggestions while editing without interrupting the drawing flow entirely.
Describe the solution you'd like
Inline AI assistance that works alongside the user during editing, not instead of it — similar to how Cursor's Tab completion works in code editors.
Tab-to-accept ghost previews. As the user works, the assistant predicts the next likely shape, edge, or label and renders it as a low-opacity ghost on the canvas. Tab accepts, Esc dismisses, any other action ignores it. Triggers after placing a shape, after a short pause near an obvious extension point, or on demand via hotkey. The user controls when suggestions appear.
Live suggestions side panel. An optional right-side panel accepts a context prompt (e.g. "auth flow for a microservice") and surfaces 3–5 ranked suggestions in real time as the diagram evolves. Each is a previewable patch — add / remove / move / relabel / restyle. Hover to ghost-preview on canvas, click to apply.
Iterate-and-edit loop. After accepting a suggestion, the user can refine in natural language or drop straight back into manual editing without losing context.
Auto-fix nudges. Separate from the LLM suggestions: lightweight, deterministic fixes surfaced inline — misaligned nodes, inconsistent spacing, crossed edges with a cleaner routing, unlabeled connectors in an otherwise labeled set. Usable without an API key.
Describe alternatives you've considered
Using the existing Generate / Update / Assist actions — these replace or regenerate the diagram rather than augmenting an in-progress edit. The interaction model is different: you leave the canvas, describe what you want, and get a result back. There's no way to stay in the drawing flow.
Manual editing — fine for simple diagrams, but tedious for anything with consistent layout rules or repeated structural patterns.
Third-party wrappers work around the problem by building a separate UI on top of draw.io, but lose the native editing experience.
Additional context
The existing AI infrastructure in jgraph/drawio — configurable backends (gptApiKey, claudeApiKey), the assist action, and aiGlobals for system prompt customisation — is a natural extension point. A new inline or complete action with a streaming-friendly system prompt could power both the ghost preview and the side panel without a full redesign.
Implementation notes:
The model should receive a compact diff of recent edits + the surrounding sub-graph, not the full , to keep latency and token cost low.
Ghost previews need a render hook that does not pollute undo history until accepted.
Auto-fix should be a separate module, no API key required.
Open questions: debounce/trigger heuristics for ghost predictions; whether the side panel should be plugin-extensible; caching policy to avoid re-calling the LLM on minor canvas changes.
Beta Was this translation helpful? Give feedback.
All reactions