Repository navigation
Chat: contr-flow blocks draw as flow diagrams (#696, D284) - #738
Merged
Merged
Conversation
A connector, plugin or other MCP call of a known server shows the monochrome Simple Icons mark of the server in ink-48 in place of the kind icon. One table in chatview/tools.go maps the server name.
…o agent/709-brand-marks
A worker of the Claude, OpenAI or DeepSeek family shows its mark in place of its 6px dot, in the dot's ink, and hops while it works. Another program keeps the dot. Adds the OpenAI and DeepSeek marks of Simple Icons.
PR chips and the board's PR cell show the pull request Octicon of their state (open, draft, merged, closed); issue chips show the issue Octicon (open, closed). The icons are drawn in ink-48. The read of a number adds isDraft. NOTICE credits Octicons (MIT).
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.
Part of #696 (step 2, PR 1 of 2: flow diagrams).
What changed
internal/app/diagram: the flow parser, the layout and the Painter drawing, moved from the spike. Only the flow parts are here: nocontr-seq, no Mermaid.Parsereturns an error for each bad input.Viewbuilds nothing and returns false when the flow is too large: more than 12 nodes, a label over 28 characters, more than 6 layers, more than 4 nodes in a layer, or wider thanmaxW.contr-flowCode hook (flowBlockinchatview/content.go). The text uses the chat'sts(D272), and the box height grows with the text. The diagram is at most the column wide. A block that does not parse, does not fit or is still being written shows asmarkdown.DefaultCodeBlock, as before.ChatFlow; see.sh fixturechat-flow.docs/spec/ChatView.mdgets a Diagrams section.Steps
internal/app/diagram, flow only.Tests
diagram:TestParse,TestParseErrors(chain, empty, no arrow, bad state),TestLimits(12/13 nodes, long label, layers, fan-out, back edge),TestView(fits, too wide).chatview:TestFlowBlock(good gives the diagram element; bad, large and wide give the code block).scripts/see.sh chat-flow dark|lightran. In the .txt, the "Flow diagram" group shows between the two prose lines.Size
The diff has about 740 added lines, about 270 of them tests.
layout.goandview.goare the spike code, almost unchanged.Pre-check
TestFlowBlockgood. No chain check:TestParseErrorsandTestFlowBlockbad. No width check:TestViewandTestFlowBlockwide.contr-seqand the skill lines are left for PR 2, as the brief says.contr-flow, decision D284, element label "Flow diagram".content.goorDECISIONS.md, but the conflicts would be small.scripts/check.sh: ok, run before the main merge. After the merge, gofmt, vet and the touched tests pass.