Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check if the tool is _NOT_ read only before skipping it in read-only mode#1514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
omgitsads merged 1 commit intomainfromfix-broken-read-only-hint
Dec 1, 2025

Conversation

@omgitsads
Copy link
Member

Previously these were pointers to a Bool, now they are concrete types and this was incorrectly ported in the Go SDK move.

Closes:

@omgitsadsomgitsads requested a review froma team as acode ownerDecember 1, 2025 15:25
CopilotAI review requested due to automatic review settingsDecember 1, 2025 15:25
@omgitsadsomgitsads merged commit9b34211 intomainDec 1, 2025
20 checks passed
@omgitsadsomgitsads deleted the fix-broken-read-only-hint branchDecember 1, 2025 15:27
Copilot finished reviewing on behalf ofomgitsadsDecember 1, 2025 15:27
Copy link
Contributor

CopilotAI left a comment

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 fixes a critical logic error in theRegisterSpecificTools function that was incorrectly ported during the Go SDK migration. The bug inverted the condition for skipping write tools in read-only mode, causing the function to skip read-only tools instead.

Key Change:

  • Corrects the condition fromif tool.Tool.Annotations.ReadOnlyHint && readOnly toif !tool.Tool.Annotations.ReadOnlyHint && readOnly to properly skip write tools (those without the ReadOnlyHint) when in read-only mode
Comments suppressed due to low confidence (1)

pkg/toolsets/toolsets.go:332

  • The corrected read-only mode filtering logic lacks test coverage. Consider adding a test case inpkg/toolsets/toolsets_test.go that verifiesRegisterSpecificTools correctly skips write tools (whereReadOnlyHint is false) whenreadOnly=true is passed, and that it registers read-only tools (whereReadOnlyHint is true).
if !tool.Tool.Annotations.ReadOnlyHint && readOnly {// Skip write tools in read-only modeskippedTools = append(skippedTools, toolName)continue}

You can also share your feedback on Copilot code review for a chance to win a $100 gift card.Take the survey.

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

Reviewers

Copilot code reviewCopilotCopilot left review comments

@almaleksiaalmaleksiaalmaleksia approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@omgitsads@almaleksia

[8]ページ先頭

©2009-2025 Movatter.jp