Expand description
#846: bynk/sequenceModel — the sequence-diagram custom LSP request.
The first custom (non-standard) request in this server: no workspace/*/ refresh nudge exists for it (there is no generic “refresh a custom
method” in the LSP spec or in tower_lsp::Client), and none is needed —
Tier 1 is on-demand: the client re-issues the request each time the
command/lens fires, rather than the server pushing updates.
Two responsibilities live here, out of lib.rs: locating the Handler
AST node enclosing a cursor position (by re-parsing the committed
snapshot, the same convention identifier_at uses in lib.rs), and the
wire shape sent to the client (a plain serde mirror of
[bynk_ide::sequence::SequenceModel], Span lowered to LSP Range —
same convention as SerKey in lib.rs).
Structs§
- Sequence
Model Params - The
bynk/sequenceModelrequest payload — the same two-field text-document + cursor-position shape every other cursor-anchored request in this server uses (HoverParams,SignatureHelpParams, …). - Wire
AltBlock - Wire
Branch - Wire
Callee - The handler a boundary call reaches: by name, and where it is when the server can find it in the committed round (a client opens the callee’s own sequence diagram there).
- Wire
Message - Wire
Participant - Wire
Sequence Model - Wire
Trigger
Functions§
- handler_
lens_ sites - Every
on <kind>handler declaration intext, for the per-handler “Show Sequence” CodeLens. Notindex_queries::code_lenses— that walksSymbolKind::Handlersites, which only agent handlers get (bynk-check/src/index.rs: “Service handlers have no per-handler name… so only agent dispatch is covered”); reusing it as-is would silently drop the lens for every service (non-agent) handler, which is most of them. A direct AST walk covers both uniformly. - locate_
callee - Find the handler
calleenames amongfiles(the callee unit’s files: URI and analysed text), and return its declaration. A service’s handler is itson call(namedmethod, or unnamed whenmethodisNone); an agent’s is itson call method. - sequence_
model_ at - Locate the
Handlerenclosingoffsetintextand build its sequence model.infois the owning unit’s cross-context/agent table —Nonedegrades classification to capabilities only (still correct; just unable to recognise agent/cross-context lifelines), which happens for a unitsequence_infohas no entry for (a commons file, or one this round never reached because the pipeline bailed before it). - to_wire
- The wire shape of
model, with each callee located bylocate(the server passes a lookup over the committed round’s files).