Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented find_node_at_offset to find the AST node at a given cursor position. Modified the parser to tolerate missing identifiers after a dot, creating a GetAttr node with an empty name, which allows the LSP to inspect the left-hand side for completions. Added comprehensive tests.


PR created automatically by Jules for task 14534893887575898734 started by @KCarretto

- Add `analysis` module with `find_node_at_offset` function.
- Modify parser to allow missing identifier in dot access (e.g. `sys.`) to support autocomplete.
- Add `Node` enum to represent AST nodes (Stmt or Expr).
- Add tests for cursor finding.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 28, 2025

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2763    ±0 2763    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#188 2763 2763 0 0 0 0 29.0s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2763 0 0 43.3s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
eldritch: random::string_impl::tests::test_string_uniform 3 39.8s 43.3s
eldritch: random::string_impl::tests::test_string_uniform 3 39.8s 43.3s
eldritch: random::string_impl::tests::test_string_uniform 3 39.8s 43.3s
eldritch: random::int_impl::tests::test_random_int_uniform_chi_square 3 4.0s 8.0s
eldritch: random::int_impl::tests::test_random_int_uniform_chi_square 3 4.0s 8.0s
eldritch: random::int_impl::tests::test_random_int_uniform_chi_square 3 4.0s 8.0s
eldritch: random::string_impl::tests::test_string_length 3 6.2s 8.0s
eldritch: random::string_impl::tests::test_string_length 3 6.2s 8.0s
eldritch: random::string_impl::tests::test_string_length 3 6.2s 8.0s
eldritch: random::int_impl::tests::test_random_int_uniform_average 3 3.8s 7.8s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@KCarretto
Copy link
Collaborator

Run cargo fmt

@google-labs-jules
Copy link
Contributor Author

Run cargo fmt

Ran cargo fmt.

- Add `analysis` module with `find_node_at_offset` function.
- Modify parser to allow missing identifier in dot access (e.g. `sys.`) to support autocomplete.
- Add `Node` enum to represent AST nodes (Stmt or Expr).
- Add tests for cursor finding.
- Run `cargo fmt`.
@KCarretto KCarretto marked this pull request as ready for review December 31, 2025 04:34
@KCarretto
Copy link
Collaborator

@hulto this will be helpful for our lsp server (vscode extension). low effort ai pr

@KCarretto KCarretto requested a review from hulto December 31, 2025 04:35
@KCarretto KCarretto merged commit 651e377 into main Jan 2, 2026
6 checks passed
@KCarretto KCarretto deleted the lsp-cursor-finder-14534893887575898734 branch January 2, 2026 15:48
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.

3 participants