Add optional chatSessionResource parameter for read operations in ManageTodoListTool#289290
Merged
Add optional chatSessionResource parameter for read operations in ManageTodoListTool#289290
Conversation
3f0cc60 to
1d651db
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a chatSessionResource parameter to the IManageTodoListToolInputParams interface to enable read operations when the session resource is not available through the invocation context. The change provides a fallback mechanism for obtaining the chat session resource specifically for read operations.
Changes:
- Added optional
chatSessionResourcestring parameter toIManageTodoListToolInputParamsinterface - Modified the
invokemethod to use the parameter as a fallback wheninvocation.context?.sessionResourceis undefined and the operation is 'read'
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.ts:100
- The new fallback logic for chatSessionResource when operation is 'read' lacks test coverage. Consider adding tests that verify this behavior, particularly testing scenarios where invocation.context.sessionResource is undefined and args.chatSessionResource is provided, as well as cases with invalid URI strings to ensure proper error handling.
const chatSessionResource = invocation.context?.sessionResource ?? (args.operation === 'read' && args.chatSessionResource ? URI.parse(args.chatSessionResource) : undefined);
…TodoListTool.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
roblourens
reviewed
Jan 21, 2026
| status: 'not-started' | 'in-progress' | 'completed'; | ||
| }>; | ||
| // used for todo read only | ||
| chatSessionResource?: string; |
Collaborator
Author
There was a problem hiding this comment.
No. This is coming from an non llm tool call and I can't pass the sessionResource string back from the chat extension as a URI
DonJayamanne
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.