Skip to content

fix: typo in function.kind check#572

Merged
frol merged 1 commit into
mainfrom
fix/typo-in-function-kind
Mar 11, 2026
Merged

fix: typo in function.kind check#572
frol merged 1 commit into
mainfrom
fix/typo-in-function-kind

Conversation

@frolvanya

Copy link
Copy Markdown
Contributor

No description provided.

@frolvanya frolvanya requested a review from a team as a code owner March 11, 2026 15:47
Copilot AI review requested due to automatic review settings March 11, 2026 15:47
@github-project-automation github-project-automation Bot moved this to NEW❗ in DevTools Mar 11, 2026
@frol frol merged commit 687dadd into main Mar 11, 2026
12 checks passed
@frol frol deleted the fix/typo-in-function-kind branch March 11, 2026 15:48
@github-project-automation github-project-automation Bot moved this from NEW❗ to Shipped 🚀 in DevTools Mar 11, 2026

Copilot AI 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.

Pull request overview

This PR updates the function-name autocompletion logic for contract function calls by changing how ABI functions are filtered by AbiFunctionKind.

Changes:

  • Adjusted the ABI function filter predicate used to build the list of selectable function names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 81 to 83
.filter(|function| {
function_kind == AbiFunctionKind::View || function_kind == function.kind
function.kind == AbiFunctionKind::View || function.kind == function_kind
})

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

The filter predicate now always includes AbiFunctionKind::View functions even when input_call_function_name requests AbiFunctionKind::Call. That means the transaction flow will suggest read-only methods too, which contradicts the prompt ("transaction function") and the ABI semantics elsewhere (e.g. inspect labels Call as transaction-required). If the intent is to list functions of the requested kind, the filter should just match function.kind == function_kind (or otherwise explicitly handle each mode).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Shipped 🚀

Development

Successfully merging this pull request may close these issues.

4 participants