@azure-devops/mcp 2.9.0-nightly.20260831 → 2.9.0-nightly.20260901
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/repositories.js +22 -6
- package/dist/tools/search.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -751,20 +751,21 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
751
751
|
// --- repo_pull_request_thread_write ----------------------------------------
|
|
752
752
|
server.tool(REPO_TOOLS.repo_pull_request_thread_write, "Write operations for pull request comment threads. Use the action parameter to specify the operation.", {
|
|
753
753
|
action: z
|
|
754
|
-
.enum(["create", "reply", "update_status"])
|
|
755
|
-
.describe("The action to perform. Options: create (create a new comment thread on a pull request), reply (reply to a comment in a thread), update_status (update the status of a comment thread)."),
|
|
754
|
+
.enum(["create", "reply", "update", "update_status"])
|
|
755
|
+
.describe("The action to perform. Options: create (create a new comment thread on a pull request), reply (reply to a comment in a thread), update (update an existing comment), update_status (update the status of a comment thread)."),
|
|
756
756
|
repositoryId: z.string().describe("The ID or name of the repository. When using a name instead of a GUID, project must also be provided."),
|
|
757
757
|
pullRequestId: z.coerce.number().min(1).describe("The ID of the pull request."),
|
|
758
758
|
project: z.string().optional().describe("Project ID or project name. Required when repositoryId is a name instead of a GUID."),
|
|
759
|
-
threadId: z.coerce.number().min(1).optional().describe("The ID of the thread. Required for reply and update_status."),
|
|
760
|
-
|
|
759
|
+
threadId: z.coerce.number().min(1).optional().describe("The ID of the thread. Required for reply, update, and update_status."),
|
|
760
|
+
commentId: z.coerce.number().min(1).optional().describe("The ID of the comment to update. Required for update."),
|
|
761
|
+
content: z.string().optional().describe("The content of the comment. Required for create, reply, and update."),
|
|
761
762
|
status: z
|
|
762
763
|
.enum(getEnumKeys(CommentThreadStatus))
|
|
763
764
|
.optional()
|
|
764
765
|
.default(CommentThreadStatus[CommentThreadStatus.Active])
|
|
765
766
|
.describe("The thread status. Used for create (defaults to 'Active') and required for update_status."),
|
|
766
767
|
filePath: z.string().optional().describe("The file path for the comment thread. Used for create."),
|
|
767
|
-
fullResponse: z.boolean().optional().default(false).describe("Return full JSON response. Used for reply."),
|
|
768
|
+
fullResponse: z.boolean().optional().default(false).describe("Return full JSON response. Used for reply and update."),
|
|
768
769
|
rightFileStartLine: z.coerce.number().min(1).optional().describe("Start line in the right file. Used for create."),
|
|
769
770
|
rightFileStartOffset: z.number().optional().describe("Start character offset in the right file. Used for create."),
|
|
770
771
|
rightFileEndLine: z.number().optional().describe("End line in the right file. Used for create."),
|
|
@@ -772,7 +773,7 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
772
773
|
changeTrackingId: z.coerce.number().int().min(1).optional().describe("The file change tracking ID from the pull request iteration changes. Used for create."),
|
|
773
774
|
firstComparingIteration: z.coerce.number().int().min(0).optional().describe("The iteration on the left side of the diff. Used for create."),
|
|
774
775
|
secondComparingIteration: z.coerce.number().int().min(1).optional().describe("The iteration on the right side of the diff. Used for create."),
|
|
775
|
-
}, async ({ action, repositoryId, pullRequestId, project, threadId, content, status, filePath, fullResponse, rightFileStartLine, rightFileStartOffset, rightFileEndLine, rightFileEndOffset, changeTrackingId, firstComparingIteration, secondComparingIteration, }) => {
|
|
776
|
+
}, async ({ action, repositoryId, pullRequestId, project, threadId, commentId, content, status, filePath, fullResponse, rightFileStartLine, rightFileStartOffset, rightFileEndLine, rightFileEndOffset, changeTrackingId, firstComparingIteration, secondComparingIteration, }) => {
|
|
776
777
|
try {
|
|
777
778
|
const connection = await connectionProvider();
|
|
778
779
|
const gitApi = await connection.getGitApi();
|
|
@@ -848,6 +849,21 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
848
849
|
return { content: [{ type: "text", text: JSON.stringify(comment, null, 2) }] };
|
|
849
850
|
return { content: [{ type: "text", text: `Comment successfully added to thread ${threadId}.` }] };
|
|
850
851
|
}
|
|
852
|
+
if (action === "update") {
|
|
853
|
+
if (!threadId)
|
|
854
|
+
return { content: [{ type: "text", text: "threadId is required for update" }], isError: true };
|
|
855
|
+
if (!commentId)
|
|
856
|
+
return { content: [{ type: "text", text: "commentId is required for update" }], isError: true };
|
|
857
|
+
if (!content)
|
|
858
|
+
return { content: [{ type: "text", text: "content is required for update" }], isError: true };
|
|
859
|
+
const comment = await gitApi.updateComment({ content }, repositoryId, pullRequestId, threadId, commentId, project);
|
|
860
|
+
if (!comment) {
|
|
861
|
+
return { content: [{ type: "text", text: `Error: Failed to update comment ${commentId} in thread ${threadId}. The comment was not updated successfully.` }], isError: true };
|
|
862
|
+
}
|
|
863
|
+
if (fullResponse)
|
|
864
|
+
return { content: [{ type: "text", text: JSON.stringify(comment, null, 2) }] };
|
|
865
|
+
return { content: [{ type: "text", text: `Comment ${commentId} successfully updated in thread ${threadId}.` }] };
|
|
866
|
+
}
|
|
851
867
|
if (action === "update_status") {
|
|
852
868
|
if (!threadId)
|
|
853
869
|
return { content: [{ type: "text", text: "threadId is required for update_status" }], isError: true };
|
package/dist/tools/search.js
CHANGED
|
@@ -165,7 +165,7 @@ async function fetchCombinedResults(topSearchResults, gitApi) {
|
|
|
165
165
|
});
|
|
166
166
|
continue;
|
|
167
167
|
}
|
|
168
|
-
const versionDescriptor =
|
|
168
|
+
const versionDescriptor = { version: changeId, versionType: 2, versionOptions: 0 };
|
|
169
169
|
const item = await gitApi.getItem(repositoryId, filePath, projectId, undefined, VersionControlRecursionType.None, true, // includeContentMetadata
|
|
170
170
|
false, // latestProcessedChange
|
|
171
171
|
false, // download
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "2.9.0-nightly.
|
|
1
|
+
export const packageVersion = "2.9.0-nightly.20260901";
|