Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function isMcpToolInvocation(toolInvocation: IChatToolInvocation | IChatT
*/
export function shouldShimmerForTool(toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized): boolean {
if (isMcpToolInvocation(toolInvocation)) {
return true;
return !IChatToolInvocation.isComplete(toolInvocation);
}
if (toolInvocation.toolId === 'copilot_askQuestions' || toolInvocation.toolId === 'vscode_askQuestions') {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,11 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
return false;
}

// Don't show working spinner when there's an in-progress MCP tool - MCP tools have their own progress indicator
if (partsToRender.some(part => part.kind === 'toolInvocation' && !IChatToolInvocation.isComplete(part) && isMcpToolInvocation(part))) {
return false;
}

// Show if no content, only "used references", ends with a complete tool call, or ends with complete text edits and there is no incomplete tool call (edits are still being applied some time after they are all generated)
const lastPart = findLast(partsToRender, part => part.kind !== 'markdownContent' || part.content.value.trim().length > 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ suite('ChatToolProgressSubPart', () => {
});

test('adds shimmer styling for active MCP tool progress', () => {
const mcpTool = createSerializedToolInvocation({
const mcpTool = createToolInvocation({
source: {
type: 'mcp',
label: 'Weather MCP',
Expand Down Expand Up @@ -221,4 +221,28 @@ suite('ChatToolProgressSubPart', () => {

assert.strictEqual(part.domNode.querySelector('.shimmer-progress'), null);
});

test('does not add shimmer styling for completed MCP tool progress', () => {
const mcpTool = createSerializedToolInvocation({
source: {
type: 'mcp',
label: 'Weather MCP',
serverLabel: 'Weather',
instructions: undefined,
collectionId: 'collection',
definitionId: 'definition'
},
toolId: 'weather_lookup'
});

const part = disposables.add(instantiationService.createInstance(
ChatToolProgressSubPart,
mcpTool,
createRenderContext(false),
mockMarkdownRenderer,
new Set<string>()
));

assert.strictEqual(part.domNode.querySelector('.shimmer-progress'), null);
});
});
Loading