Skip to content

Commit f7c3517

Browse files
committed
Refine relationship projection branching\n\nUse an explicit relationship switch when deriving nullable directness for compact explain responses. This keeps direct and transitive handling clear while preserving unknown relationships as unspecified.
1 parent fe30509 commit f7c3517

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

internal/mcp/compact_explain.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ func compactExplainPaths(paths []output.DependencyPath, trunc *TruncationInfo) (
9595
known := false
9696
out := make([][]string, 0, len(paths))
9797
for idx, path := range paths {
98-
if path.Relationship == "direct" {
98+
switch path.Relationship {
99+
case "direct":
99100
direct = true
100101
known = true
101-
} else if path.Relationship == "transitive" {
102+
case "transitive":
102103
known = true
103104
}
104105
if idx >= maxExplainPaths {

0 commit comments

Comments
 (0)