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

feat: Add DestructiveHint to delete_project_item tool annotation#1665

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

Open
triepod-ai wants to merge2 commits intogithub:main
base:main
Choose a base branch
Loading
fromtriepod-ai:feat/add-destructive-hint-to-delete-project-item

Conversation

@triepod-ai
Copy link

Summary

AddsDestructiveHint: true annotation to thedelete_project_item tool to be consistent with other delete operations that properly indicate destructive behavior.

Changes

  • AddedDestructiveHint: jsonschema.Ptr(true) todelete_project_item tool inpkg/github/projects.go
  • Aligned field formatting for consistency

Why This Matters

Thedelete_project_item tool permanently removes a project item, making it a destructive operation. Other delete tools in the codebase (delete_file,delete_workflow_run_logs) correctly have this annotation set. This ensures LLMs receive consistent semantic metadata about tool behavior:

ToolCurrent Annotations
delete_fileReadOnlyHint: false, DestructiveHint: true
delete_workflow_run_logsReadOnlyHint: false, DestructiveHint: true
delete_project_itemReadOnlyHint: false ❌ →Fixed

Testing

  • Code follows existing annotation patterns in the codebase
  • Uses samejsonschema.Ptr(true) pattern as other destructive tools

🤖 Generated withClaude Code

Add DestructiveHint: true to the delete_project_item tool to beconsistent with other delete operations (delete_file anddelete_workflow_run_logs) that properly indicate destructive behavior.This helps LLMs better understand that this tool permanently removesdata and should be used with appropriate caution.Co-Authored-By: Claude <noreply@anthropic.com>
CopilotAI review requested due to automatic review settingsDecember 21, 2025 17:48
@triepod-aitriepod-ai requested a review froma team as acode ownerDecember 21, 2025 17:48
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 adds theDestructiveHint: true annotation to thedelete_project_item tool to properly indicate its destructive behavior, maintaining consistency with other delete operations in the codebase likedelete_file anddelete_workflow_run_logs.

Key Changes:

  • AddedDestructiveHint: jsonschema.Ptr(true) todelete_project_item tool annotations
  • Aligned annotation field formatting for consistency (Title, ReadOnlyHint, DestructiveHint)

Comment on lines +903 to +905
Title:t("TOOL_DELETE_PROJECT_ITEM_USER_TITLE","Delete project item"),
ReadOnlyHint:false,
DestructiveHint:jsonschema.Ptr(true),

Choose a reason for hiding this comment

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

The toolsnap file for delete_project_item needs to be updated to reflect the addition of DestructiveHint. After making this code change, you need to run UPDATE_TOOLSNAPS=true go test ./... to update the snapshot file at pkg/github/toolsnaps/delete_project_item.snap. The snapshot should include "destructiveHint": true in the annotations object, similar to delete_file.snap and delete_workflow_run_logs.snap. The updated snapshot file must be committed along with this code change.

Copilot uses AI. Check for mistakes.
Add destructiveHint: true to the snapshot file to match the code change.🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>
@triepod-ai
Copy link
Author

Thanks for the review feedback! I've runUPDATE_TOOLSNAPS=true go test ./pkg/github/... -run DeleteProjectItem and committed the updated snapshot file with thedestructiveHint: true annotation.

The snapshot atpkg/github/__toolsnaps__/delete_project_item.snap now matches the code change.

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

Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@triepod-ai@web-flow

[8]ページ先頭

©2009-2025 Movatter.jp