Add Draft with your agent: a diagram from words, drafted by any agent - #93
Merged
Merged
Conversation
A prompt that teaches the .flow format, copied or opened in Claude or ChatGPT, and the answer pasted back and drawn as one undoable change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FL-90, criterion 1 of 2.
src/domain/draft.js:draftPromptteaches the format (rules, every shape from the registry, a valid example) and asks for one fenced block;readDrafttakes the first fenced block of an answer, or the whole answer.claude -p --model haikuwith the prompt for a URL shortener returned valid.flowfirst time (8 shapes, 7 connections, every part named).Criterion 2, a built-in version, is your call (asked on the task): the person's own API key in the browser (no cost to you), or a call through the isketch server with your key (simplest for them, costs you per diagram, needs rate limits).
Tests:
draft.spec.js(6),e2e/draft.spec.js. vitest 311, e2e 145, lint and typecheck.