426
}
427
case viewUnreviewedCommentsToolName: {
429
>
// the confirmation, the client flags exactly the comments they chose
430
>
// to reveal with `pendingAgentReveal` on the shared annotations
431
>
// channel. Return those comments and clear the flag so a later
432
>
// invocation does not re-return them; comments the user left
433
>
// unchecked (and review comments accepted by other means) are not
434
>
// flagged and so are excluded.
435
>
const pending = pendingRevealAnnotations(state);
436
>
const comments = pending.map(serializeComment);
437
>
const actions: AnnotationsAction[] = pending.map(annotation => ({
438
>
type: ActionType.AnnotationsSet,
439
>
annotation: clearPendingReveal(annotation),
440
>
}));
441
>
return { actions, result: JSON.stringify({ comments }, undefined, 2) };
442
>
}
443
case deleteCommentsToolName: {
444
const ids = getUniqueCommentIds((rawArgs as IDeleteCommentsArgs)?.commentIds, deleteCommentsToolName);