Skip to content

fix: make flow.functions.X clickable by fixing path resolution and bypassing __getattr__ - #22

Merged
dhandal09 merged 4 commits into
mainfrom
feat/direct-function-navigation
Jun 12, 2026
Merged

fix: make flow.functions.X clickable by fixing path resolution and bypassing __getattr__#22
dhandal09 merged 4 commits into
mainfrom
feat/direct-function-navigation

Conversation

@dhandal09

@dhandal09 dhandal09 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix flow function path resolution — was looking at project/functions/flow_name/func.py, now correctly resolves to project/flows/flow_name/functions/func.py using the flow_config.yaml ancestor
  • Add a DocumentLinkProvider for conv.functions.X / flow.functions.X calls so Ctrl+Click navigates directly to the function file, bypassing Pylance's __getattr__ definition

Test plan

  • Ctrl+Click on flow.functions.some_function navigates to flows/<flow>/functions/some_function.py
  • Ctrl+Click on conv.functions.some_function navigates to functions/some_function.py
  • __getattr__ no longer appears as a navigation target
  • Hover over function names still shows description and parameters
  • Find References from a flow function file finds all call sites

🤖 Generated with Claude Code

Previously, only `flow.functions.func_name` and `conv.functions.func_name`
were clickable. Now `flow.func_name` and `conv.func_name` also navigate
to the function definition file, with matching hover and find-references
support. Known runtime attributes (e.g. flow.goto_step, conv.say) are
excluded so they continue to show their runtime tooltips.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhandal09
dhandal09 requested a review from a team June 12, 2026 17:39
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

✅ Valid PR Title

Type Release Breaking
fix patch false

This PR will trigger a patch release when merged to main.

The version will be automatically determined by semantic-release based on the commit messages.

dhandal09 and others added 3 commits June 12, 2026 10:53
…lick

DocumentLinks take priority over definition providers on Ctrl+Click.
This means clicking flow.func_name or conv.func_name navigates directly
to the function file instead of showing Pylance's __getattr__ result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revert the direct flow.X / conv.X changes — the actual patterns are
flow.functions.X and conv.functions.X. The DocumentLinkProvider now
creates links for these qualified patterns so Ctrl+Click navigates
directly to the function file without showing Pylance's __getattr__.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The resolver was looking for flow functions at
project_root/functions/flow_name/func.py but the actual structure is
project_root/flows/flow_name/functions/func.py. Now uses the
flow_config.yaml ancestor to locate the flow directory and looks in
its functions/ subdirectory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhandal09 dhandal09 changed the title feat: support go-to-definition for direct flow.X / conv.X calls feat: support go-to-definition for direct flow.functions.X calls Jun 12, 2026
@dhandal09 dhandal09 changed the title feat: support go-to-definition for direct flow.functions.X calls fix: make flow.functions.X clickable by fixing path resolution and bypassing __getattr__ Jun 12, 2026
@dhandal09
dhandal09 merged commit 0c14c53 into main Jun 12, 2026
9 checks passed
@dhandal09
dhandal09 deleted the feat/direct-function-navigation branch June 12, 2026 18:49
poly-adk-bot Bot pushed a commit that referenced this pull request Jun 12, 2026
## [1.2.2](v1.2.1...v1.2.2) (2026-06-12)

### Bug Fixes

* make flow.functions.X clickable by fixing path resolution and bypassing __getattr__ ([#22](#22)) ([0c14c53](0c14c53))
@poly-adk-bot

poly-adk-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants