Repository navigation
Chat: sequence diagrams and the diagram lines of the skill (#696, D287) - #743
Merged
Merged
Conversation
Package diagram parses a contr-seq block (A -> B: text, --> for a reply, A -> A for a message to itself) and draws actors, lifelines and arrows with the Painter. A block that does not parse or is too large shows as code. The chat-writing skill says when and how to write contr-flow and contr-seq blocks.
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.
Fixes #696
What
internal/app/diagram/seq.go:ParseSeq(A -> B: text,A --> B: textreply,A -> A: textto itself) andSeqView(actors, dashed lifelines, arrows, dashed replies, self loop), from the spike, Painter only, tokens only, chat text size. Limits: 6 actors, 16 messages, actor 28 and message 40 characters, wider than the column → code block.Chat.seqBlockin chatview, the same shape asflowBlock.kit/skills/chat-writing: a Diagrams section forcontr-flow(syntax fromdiagram.Parsein main) andcontr-seq, with limits and one example each.ChatSeq, see.sh fixturechat-seq(the flow fixture now shares a helper).Tests
TestParseSeq,TestParseSeqErrors,TestSeqLimits,TestSeqView,TestSeqBlock.scripts/see.sh chat-seq dark|light: pass, all labels checked in the PNGs.Pre-check
contr-seq, label "Sequence diagram", D287.internal/app/diagram.