Skip to content

Changes for unlink functionality #140

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jwelchMS
Copy link

Added the ability to unlink work items to the work_items_link tool

132

Associated Risks

Unlinking can't be done in batch currently, so performance and API usage may be a factor.

PR Checklist

  • I have read the contribution guidelines
  • I have read the code of conduct guidelines
  • Title of the pull request is clear and informative.
  • 👌 Code hygiene
  • [N/A] 🔭 Telemetry added, updated, or N/A
  • 📄 Documentation added, updated, or N/A
  • 🛡️ Automated tests added, or N/A

🧪 How did you test it?

Claude Sonnet 4, requested it to do various linking and unlinking, including batch updates.

@danhellem danhellem self-assigned this Jun 26, 2025
@danhellem danhellem added Do Not Merge ❌ do not merge this pull request Needs Review 👓 Needs review by the product team labels Jun 26, 2025
@danhellem
Copy link
Contributor

danhellem commented Jun 26, 2025

@jwelchMS please put together some screen shots, or even better, a screen recording so we can see this in action

@danhellem
Copy link
Contributor

Although i love the ideal, this seems overly complicated IMO. I will try and create a separate PR and keep it simple as we can.

@jwelchMS
Copy link
Author

It is definitely more complicated than I would like. The initial version with a separate tool (with no batch capabilities) was much simpler.

A few things that make it more complicated:

  • Deleting a link requires a patch call that removes the link by index, rather than by identifying it by work item id.
  • This means that batching doesn't work, and the code needs additional logic to ensure the deletes are done in a safe order, as each one changes the index.
@danhellem danhellem linked an issue Jul 2, 2025 that may be closed by this pull request
@kboom
Copy link
Contributor

kboom commented Jul 8, 2025

This feature is clearly useful, but we should aim to rely more on AI to avoid implementing complex logic. It might be possible to create a simpler version that uses straightforward tools aligned with what the ADO API directly offers, along with clear prompts to guide their use for this specific case. Can we try that?

@jwelchMS
Copy link
Author

jwelchMS commented Jul 8, 2025

This feature is clearly useful, but we should aim to rely more on AI to avoid implementing complex logic. It might be possible to create a simpler version that uses straightforward tools aligned with what the ADO API directly offers, along with clear prompts to guide their use for this specific case. Can we try that?

That was my first pass (a simple tool that just handled unlinking 1 item). I was told we needed to reduce the number of tools and to combine with linking - which is a very different operation via the API, thus the complexity,

Happy to submit the original code - just let me know.

@danhellem
Copy link
Contributor

@jwelchMS it does seem like we can simplify this and keep it in the same tool. But maybe I am wrong. can you take another stab at it and simplify? Lets start with a draft PR and we work together on it. Feel free to ping me on Teams when ready.

@danhellem danhellem closed this Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge ❌ do not merge this pull request Needs Review 👓 Needs review by the product team
3 participants