Skip to content

feat(cli): simplify and clarify baml describe#3989

Draft
ashley-ha wants to merge 15 commits into
BoundaryML:canaryfrom
ashley-ha:describe-agent-improvements
Draft

feat(cli): simplify and clarify baml describe#3989
ashley-ha wants to merge 15 commits into
BoundaryML:canaryfrom
ashley-ha:describe-agent-improvements

Conversation

@ashley-ha

@ashley-ha ashley-ha commented Jul 12, 2026

Copy link
Copy Markdown

Problem

baml describe had accumulated overlapping discovery, rendering, and agent-specific flags. The CLI made users choose a consumer-oriented compact output mode even though color, serialization, search confidence, relationship direction, and line budgeting are separate concerns.

That made the command harder to predict:

  • exact lookup and search used different flag families
  • impact and inward dependencies were easy to conflate
  • compact changed workflow behavior as well as presentation
  • humans could lose highlighting simply by selecting a bounded text format
  • agents needed specialized instructions instead of using the normal text surface

Fix

The command now centers on three workflows:

baml describe
baml describe <SYMBOL>...
baml describe --search <QUERY>...

Command surface

  • exact lookup supports one or more positional symbols
  • discovery uses repeatable or comma-delimited --search
  • --kind and --file narrow discovery
  • --view overview|source|usage|impact|dependencies selects relationship direction
  • --max-lines is the single soft output budget
  • --output text|json controls serialization only
  • top-level --color auto|always|never controls styling independently

Rendering and navigation

  • text output retains terminal highlighting for humans and automatically becomes plain when piped or captured by a recognized agent
  • JSON is always ANSI-free
  • multi-symbol text output shares the line budget fairly and emits one combined follow-up when truncated
  • search previews only a unique exact single-term match; ambiguous and multi-term searches remain discovery-only
  • suggested follow-ups preserve the selected view without requiring a special agent output mode
  • dependencies are split into contract and implementation relationships using compiler-resolved definitions
  • overview expands direct contract shapes while leaving transitive exploration explicit

Breaking changes

This branch is unreleased, so the PR makes a clean break:

  • removes --grep, --symbols, --limit, --ignore-case, --agent, --json, --budget, and --depth
  • removes --output compact; valid output values are now text and json
  • makes --color and --features top-level-only
  • replaces recursive depth with explicit views and exact-symbol follow-ups
  • uses search JSON schema version 2

Evidence

The guided describe dependency benchmark covered parse_trophy, agent.tool_edit_file, and root.cc.Parser.parse_stmt:

condition median wall median calls median cost median context
natural navigation 52.5s 6.5 $0.281 163.0k
bounded grep control 66s 7.5 $0.253 209.6k
guided describe 37s 3.5 $0.152 95.3k

A broader multiview run tested eight ordinary user intents:

condition median wall median calls median cost median context
natural navigation 23s 3 $0.203 84.7k
direct guided describe 25s 2 $0.117 71.0k
describe subagent 30s 3.5 $0.129 69.9k

The benchmark work also exposed and fixed two correctness issues:

  • member and enum-variant references now win over ambiguous same-named global items
  • source view no longer prints a misleading unloaded references (0) section

Evidence packages:

Real-project verification

Exercised against tools/agent-tries-baml:

baml describe notify_slack_result --view dependencies --max-lines 28
baml describe parse_trophy --view dependencies --max-lines 30
baml describe RouteMention --max-lines 35
baml describe --search convex,slack --view impact

Verified that terminal text is colored, JSON remains valid and ANSI-free even with --color always, multi-symbol text stays bounded, and removed compact invocations fail with a clear valid-values message.

Testing

  • cargo fmt --manifest-path baml_language/Cargo.toml --check -p baml_cli
  • cargo test --manifest-path baml_language/Cargo.toml -p baml_cli
    • 309 unit tests
    • 3 agent-install end-to-end tests
    • 41 CLI end-to-end tests
    • 8 pack end-to-end tests
  • real-project output-contract scenario against tools/agent-tries-baml
  • git diff --check

The three Vercel authorization checks shown on this PR are repository authorization failures rather than failures in this change.

Rework describe for coding-agent navigation based on benchmark traces:
- add --grep semantic project search (term1 || term2 syntax), replacing
  the standalone grep command (module renamed to project_search)
- support multi-symbol batching in one invocation
- add --agent compact output mode
- add --limit/--budget output bounding
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

@ashley-ha is attempting to deploy a commit to the Boundary Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

baml describe now supports multi-symbol discovery, multiple views, bounded output, JSON, filtering, and batch mode. Compiler-aware project search replaces grep APIs, while the grep CLI command and related wiring are removed.

Changes

Describe and project search consolidation

Layer / File(s) Summary
Compiler-aware project search API
baml_language/crates/baml_lsp2_actions/src/project_search.rs, project_search_tests.rs, testing.rs, lib.rs
Project search returns semantic or text results with kind filtering and enriched annotations.
Configurable symbol description construction
baml_language/crates/baml_lsp2_actions/src/describe.rs, describe_tests.rs
Descriptions gain option-aware computation and implementation dependency discovery.
Multi-view describe CLI flow
baml_language/crates/baml_cli/src/describe_command.rs, commands.rs, lib.rs
baml describe gains search, filtering, views, JSON, batching, and --max-lines; grep command wiring is removed.
View, batch, and CLI behavior coverage
baml_language/crates/baml_cli/src/describe_command_tests.rs, tests/exit_code_e2e.rs, TEST_INSTRUCTIONS.md
Tests and instructions cover rendering, search, batching, truncation, removed flags, and updated option placement.
Agent-navigation benchmark documentation
docs/benchmarks/baml-describe-agent-navigation/...
Benchmark results and transcripts document describe navigation and recorded agent workflows.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ProjectSearch
  participant DescriptionBuilder
  participant ViewRenderer
  CLI->>ProjectSearch: Search terms and filters
  ProjectSearch-->>CLI: Semantic descriptions or text matches
  CLI->>DescriptionBuilder: Build selected description options
  DescriptionBuilder-->>CLI: Symbol descriptions
  CLI->>ViewRenderer: Render selected view within max-lines
  ViewRenderer-->>CLI: Text or JSON output
Loading

Possibly related PRs

Suggested reviewers: rossirpaulo, hellovai

Poem

I’m a rabbit with views in my burrow tonight,
Describing symbols in overview light.
Search hops semantic, then text follows through,
Budgets keep every output neat and true.
Grep rests its paws; describe takes flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: it streamlines and clarifies the baml describe CLI workflow.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
baml_language/crates/baml_lsp2_actions/src/testing.rs (1)

313-342: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Doc comments on these helpers still read Run grep()``, but they now delegate to project_search::search_project/`list_symbols`. Cosmetic only.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/testing.rs` around lines 313 -
342, Update the doc comments for search_project and grep_case_insensitive to
describe project_search::search_project rather than grep(), and update the
list_symbols and list_symbols_compiler2_visible comments to accurately describe
project_search::list_symbols. Keep the helper behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@baml_language/crates/baml_lsp2_actions/src/testing.rs`:
- Around line 313-342: Update the doc comments for search_project and
grep_case_insensitive to describe project_search::search_project rather than
grep(), and update the list_symbols and list_symbols_compiler2_visible comments
to accurately describe project_search::list_symbols. Keep the helper behavior
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fb4e5c61-bc04-44d8-8f1f-f1efe576300d

📥 Commits

Reviewing files that changed from the base of the PR and between 663ad17 and 4804523.

⛔ Files ignored due to path filters (6)
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__grep_tests__grep_case_insensitive_text_search.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__project_search_tests__case_insensitive_text_search.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__project_search_tests__enum_symbol_search.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__project_search_tests__list_symbols_snapshot.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__project_search_tests__semantic_result_snapshot.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__project_search_tests__text_search_with_matches.snap is excluded by !**/*.snap
📒 Files selected for processing (11)
  • baml_language/crates/baml_cli/src/commands.rs
  • baml_language/crates/baml_cli/src/describe_command.rs
  • baml_language/crates/baml_cli/src/describe_command_tests.rs
  • baml_language/crates/baml_cli/src/grep_command.rs
  • baml_language/crates/baml_cli/src/lib.rs
  • baml_language/crates/baml_cli/tests/exit_code_e2e.rs
  • baml_language/crates/baml_lsp2_actions/src/describe.rs
  • baml_language/crates/baml_lsp2_actions/src/lib.rs
  • baml_language/crates/baml_lsp2_actions/src/project_search.rs
  • baml_language/crates/baml_lsp2_actions/src/project_search_tests.rs
  • baml_language/crates/baml_lsp2_actions/src/testing.rs
💤 Files with no reviewable changes (3)
  • baml_language/crates/baml_cli/src/lib.rs
  • baml_language/crates/baml_cli/src/grep_command.rs
  • baml_language/crates/baml_cli/src/commands.rs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/benchmarks/baml-describe-agent-navigation/README.md`:
- Around line 35-44: Add a clear condition-name mapping note in the benchmark
README connecting the table labels “natural grep/read,” “bounded grep control,”
and “bounded `describe` hybrid” to the transcript names “natural,”
“guided-grep,” and “guided-hybrid-slim.” Apply the mapping consistently across
all three benchmark tables and transcript link descriptions so readers can
cross-reference results without inference.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 24af38f6-d2e0-4275-ad46-d3f3c6e06888

📥 Commits

Reviewing files that changed from the base of the PR and between 4804523 and f3709d8.

📒 Files selected for processing (5)
  • baml_language/crates/baml_lsp2_actions/src/testing.rs
  • docs/benchmarks/baml-describe-agent-navigation/README.md
  • docs/benchmarks/baml-describe-agent-navigation/transcripts/claude-trophy-flow.md
  • docs/benchmarks/baml-describe-agent-navigation/transcripts/codex-edit-file-transfer.md
  • docs/benchmarks/baml-describe-agent-navigation/transcripts/codex-trophy-flow.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • baml_language/crates/baml_lsp2_actions/src/testing.rs

Comment thread docs/benchmarks/baml-describe-agent-navigation/README.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
baml_language/crates/baml_cli/src/describe_command.rs (1)

683-697: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

checked_div + unwrap_or(0) is defensive but unreachable.

descriptions.is_empty() is guarded at line 675 (returns ExitCode::Other), so descriptions.len() >= 1 here. checked_div will never return None, making unwrap_or(0) dead code. Consider saturating_div(descriptions.len()) for clarity, or add a comment noting the guard.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_cli/src/describe_command.rs` around lines 683 -
697, In the result formatting logic around batch_description_to_json, remove the
unreachable checked_div(...).unwrap_or(0) fallback and use saturating_div with
descriptions.len() after the existing empty-descriptions guard. Preserve the
current max-line calculation and per-result mapping behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@baml_language/crates/baml_cli/src/describe_command.rs`:
- Around line 683-697: In the result formatting logic around
batch_description_to_json, remove the unreachable checked_div(...).unwrap_or(0)
fallback and use saturating_div with descriptions.len() after the existing
empty-descriptions guard. Preserve the current max-line calculation and
per-result mapping behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 47107214-acb9-4922-9128-155174947c9d

📥 Commits

Reviewing files that changed from the base of the PR and between f3709d8 and f690235.

⛔ Files ignored due to path filters (3)
  • baml_language/crates/baml_cli/src/snapshots/baml_cli__describe_command_tests__render_describe_alias_string.snap is excluded by !**/*.snap
  • baml_language/crates/baml_cli/src/snapshots/baml_cli__describe_command_tests__render_describe_builtin_item_by_definition.snap is excluded by !**/*.snap
  • baml_language/crates/baml_cli/src/snapshots/baml_cli__describe_command_tests__render_describe_builtin_string.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • baml_language/TEST_INSTRUCTIONS.md
  • baml_language/crates/baml_cli/src/describe_command.rs
  • baml_language/crates/baml_cli/src/describe_command_tests.rs
  • baml_language/crates/baml_cli/tests/exit_code_e2e.rs
  • docs/benchmarks/baml-describe-agent-navigation/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/benchmarks/baml-describe-agent-navigation/README.md
  • baml_language/crates/baml_cli/src/describe_command_tests.rs

@ashley-ha
ashley-ha marked this pull request as draft July 13, 2026 21:35
@ashley-ha ashley-ha changed the title feat(cli): agent-oriented baml describe improvements feat(cli): simplify and clarify baml describe Jul 13, 2026
@ashley-ha

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
baml_language/crates/baml_cli/src/describe_command.rs (1)

569-591: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

source_candidate_ranges reconstructs every symbol's full body just to read item_range.

describe_listing_entry(..., DescribeOptions::source()) is called once per top-level entry solely to compute (start_line, end_line) from description.item_range. item_range is already computed unconditionally in describe_top_level before any options-gated field, but DescribeOptions::source() also sets full_body: true, which forces a clean_body_source reconstruction (CST comment-stripping over the whole item) for every entry — work that's discarded immediately. This runs on every --search invocation across all matching top-level entries, which is now the primary discovery path.

⚡ Add a minimal options preset for range-only lookups
+    pub const fn identity() -> Self {
+        Self {
+            shape: false,
+            docstring: false,
+            dependencies: false,
+            implementation_dependencies: false,
+            resolved_type: false,
+            references: false,
+            methods: false,
+            full_body: false,
+        }
+    }
             let description = describe_listing_entry(
                 db,
                 files,
                 entry,
-                baml_lsp2_actions::DescribeOptions::source(),
+                baml_lsp2_actions::DescribeOptions::identity(),
             )?;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_cli/src/describe_command.rs` around lines 569 -
591, Update source_candidate_ranges to use a minimal DescribeOptions preset that
requests the item range without enabling full_body or other source rendering
fields. Add or reuse a range-only option near DescribeOptions and pass it to
describe_listing_entry, preserving the existing definition_line_range
calculation and returned entry ranges.
baml_language/crates/baml_lsp2_actions/src/describe.rs (2)

1193-1261: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

describe_class_method always computes dependencies/implementation_dependencies, unlike describe_top_level.

describe_top_level gates the new dependency work behind DescribeOptions (lines 419-430), but describe_class_method — and describe_item_member, which calls it and is invoked directly from the CLI's ResolvedTarget::Member arm — take no DescribeOptions parameter at all. Every method/member describe (even --view source) unconditionally runs collect_ty_deps plus the full find_implementation_dependencies scan, regardless of what the caller actually needs.

♻️ Thread DescribeOptions through the member path
-fn describe_class_method(
-    db: &dyn Db,
-    files: &[SourceFile],
-    class_loc: baml_compiler2_hir::loc::ClassLoc<'_>,
-    member_name: &str,
-) -> Option<SymbolDescription> {
+fn describe_class_method(
+    db: &dyn Db,
+    files: &[SourceFile],
+    class_loc: baml_compiler2_hir::loc::ClassLoc<'_>,
+    member_name: &str,
+    options: DescribeOptions,
+) -> Option<SymbolDescription> {
     ...
-    let mut dependencies = Vec::new();
-    let mut seen = std::collections::HashSet::from([...]);
-    if let Some(ef) = ef {
-        ...
-    }
-    ...
-    let implementation_dependencies =
-        find_implementation_dependencies(db, file, m.span, &sym, &dependencies);
+    let mut dependencies = Vec::new();
+    if options.dependencies {
+        let mut seen = std::collections::HashSet::from([...]);
+        if let Some(ef) = ef {
+            ...
+        }
+    }
+    let implementation_dependencies = if options.implementation_dependencies {
+        find_implementation_dependencies(db, file, m.span, &sym, &dependencies)
+    } else {
+        Vec::new()
+    };

describe_item_member would need the same options: DescribeOptions parameter, and its one call site in describe_command.rs's ResolvedTarget::Member arm should pass self.describe_options().

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/describe.rs` around lines 1193 -
1261, Thread DescribeOptions through describe_item_member and
describe_class_method, updating the ResolvedTarget::Member call in
describe_command.rs to pass self.describe_options(). Gate collect_ty_deps and
find_implementation_dependencies behind the same options used by
describe_top_level, so source-only member descriptions skip dependency
computation while dependency-enabled requests retain the existing behavior.

1621-1666: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

find_implementation_dependencies walks the entire file's token stream on every call.

tree.descendants_with_tokens() iterates every token in the whole file; the item_range bounds are only applied as a filter inside the loop, so this is O(file size) per describe invocation regardless of how small the described symbol is. This function is called once per describe_top_level (for any symbol with implementation_dependencies enabled — the dependencies view and JSON/default output) and once per describe_class_method call (currently unconditional, see the sibling comment), so for the dependencies view or JSON output on a large file this repeats a full-file scan per symbol described.

rowan's SyntaxNode supports finding the node/token covering a given range in O(log N) (e.g. covering_element), so the walk can be scoped to the item's own subtree instead of the whole tree — similar to how extract_docstring (line ~1507) already locates the item node via token_at_offset + parent_ancestors().

♻️ Scope the token walk to the item's subtree
-    let tree = baml_compiler_parser::syntax_tree(db, file);
+    let tree = baml_compiler_parser::syntax_tree(db, file);
+    let root: rowan::NodeOrToken<_, _> = tree.covering_element(item_range);
     let mut seen = contract_dependencies...;
     ...
-    for node_or_token in tree.descendants_with_tokens() {
+    let tokens: Vec<_> = match root {
+        rowan::NodeOrToken::Node(node) => node.descendants_with_tokens().collect(),
+        rowan::NodeOrToken::Token(token) => vec![rowan::NodeOrToken::Token(token)],
+    };
+    for node_or_token in tokens {
         let rowan::NodeOrToken::Token(token) = node_or_token else { continue };
         if token.kind() != SyntaxKind::WORD && !token.kind().is_keyword() { continue; }
-        let token_range = token.text_range();
-        if token_range.start() < item_range.start() || token_range.end() > item_range.end() {
-            continue;
-        }
+        let token_range = token.text_range();
         ...
     }

Please confirm the exact scoping API available in the rowan version pinned by this workspace (e.g. covering_element vs. a differently-named helper) before applying.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/describe.rs` around lines 1621 -
1666, Update find_implementation_dependencies to locate the syntax node covering
item_range using the rowan API available in this workspace, first confirming
whether covering_element or its version-specific equivalent is supported. Walk
descendants_with_tokens only from that item subtree, preserving the existing
token filtering, definition lookup, and deduplication behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@baml_language/crates/baml_cli/src/describe_command.rs`:
- Around line 569-591: Update source_candidate_ranges to use a minimal
DescribeOptions preset that requests the item range without enabling full_body
or other source rendering fields. Add or reuse a range-only option near
DescribeOptions and pass it to describe_listing_entry, preserving the existing
definition_line_range calculation and returned entry ranges.

In `@baml_language/crates/baml_lsp2_actions/src/describe.rs`:
- Around line 1193-1261: Thread DescribeOptions through describe_item_member and
describe_class_method, updating the ResolvedTarget::Member call in
describe_command.rs to pass self.describe_options(). Gate collect_ty_deps and
find_implementation_dependencies behind the same options used by
describe_top_level, so source-only member descriptions skip dependency
computation while dependency-enabled requests retain the existing behavior.
- Around line 1621-1666: Update find_implementation_dependencies to locate the
syntax node covering item_range using the rowan API available in this workspace,
first confirming whether covering_element or its version-specific equivalent is
supported. Walk descendants_with_tokens only from that item subtree, preserving
the existing token filtering, definition lookup, and deduplication behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cede6325-714a-40ab-8b17-174a99cdcb2b

📥 Commits

Reviewing files that changed from the base of the PR and between f690235 and e9611c5.

📒 Files selected for processing (9)
  • baml_language/TEST_INSTRUCTIONS.md
  • baml_language/crates/baml_cli/src/commands.rs
  • baml_language/crates/baml_cli/src/describe_command.rs
  • baml_language/crates/baml_cli/src/describe_command_tests.rs
  • baml_language/crates/baml_cli/tests/exit_code_e2e.rs
  • baml_language/crates/baml_lsp2_actions/src/describe.rs
  • baml_language/crates/baml_lsp2_actions/src/describe_tests.rs
  • baml_language/crates/baml_lsp2_actions/src/project_search.rs
  • docs/benchmarks/baml-describe-agent-navigation/README.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • baml_language/TEST_INSTRUCTIONS.md
  • docs/benchmarks/baml-describe-agent-navigation/README.md
  • baml_language/crates/baml_cli/src/describe_command_tests.rs
  • baml_language/crates/baml_lsp2_actions/src/project_search.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant