Skip to content

Remove requester info from API#277233

Merged
lramos15 merged 3 commits into
mainfrom
lramos15/scattered-kiwi
Nov 13, 2025
Merged

Remove requester info from API#277233
lramos15 merged 3 commits into
mainfrom
lramos15/scattered-kiwi

Conversation

@lramos15
Copy link
Copy Markdown
Member

@lramos15 lramos15 commented Nov 13, 2025

Removes requester information form the API in favor of rendering a generic user profile since it will save us an API request

cc @roblourens

Copilot AI review requested due to automatic review settings November 13, 2025 18:41
@lramos15 lramos15 enabled auto-merge (squash) November 13, 2025 18:41
@lramos15 lramos15 self-assigned this Nov 13, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes requester information from the chat agent API in favor of using a generic user profile. The changes eliminate the IChatRequesterInformation interface and all associated properties that stored requester username and avatar icons, replacing them with hardcoded values ("User" username and account codicon).

Key Changes:

  • Removed IChatRequesterInformation interface and related API surface
  • Updated chat view models to return hardcoded user profile information
  • Cleaned up serialization interfaces and test data

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/chatAgents.ts Removed IChatRequesterInformation interface and requester property from IChatAgentMetadata
src/vs/workbench/api/common/extHostChatAgents2.ts Removed _requester field and related getter/setter from ExtHostChatAgent class
src/vs/workbench/contrib/chat/common/chatModel.ts Removed requester-related properties from model interfaces, removed username/avatar getters, simplified serialization
src/vs/workbench/contrib/chat/common/chatViewModel.ts Changed username to return hardcoded "User" string and avatarIcon to return Codicon.account
src/vs/workbench/contrib/chat/common/chatServiceImpl.ts Removed requester fields from serialized metadata object
src/vs/workbench/contrib/chat/test/common/chatModel.test.ts Removed requester fields from test data objects
src/vs/workbench/contrib/chat/test/common/chatService.test.ts Updated updateAgent calls to pass empty objects instead of requester information

import { ChatAgentVoteDirection, ChatAgentVoteDownReason, IChatChangesSummary, IChatCodeCitation, IChatContentReference, IChatFollowup, IChatMcpServersStarting, IChatProgressMessage, IChatResponseErrorDetails, IChatTask, IChatUsedContext } from './chatService.js';
import { countWords } from './chatWordCounter.js';
import { CodeBlockModelCollection } from './codeBlockModelCollection.js';
import { Codicon } from '../../../../base/common/codicons.js';
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Codicon import should be grouped with other imports from base/common to follow VS Code's import organization conventions. Move this import to be adjacent to the existing base/common imports at the top of the file.

Copilot uses AI. Check for mistakes.
get avatarIcon() {
return this._model.avatarIconUri;
get avatarIcon(): ThemeIcon {
return Codicon.account;
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type is declared as ThemeIcon but Codicon.account returns a CSSIcon. The return type should be ThemeIcon | URI | undefined to match the original interface, or the import should include ThemeIcon from the codicons module and wrap the codicon appropriately.

Suggested change
return Codicon.account;
return new ThemeIcon(Codicon.account.id);

Copilot uses AI. Check for mistakes.
const data = obj as IExportableChatData;
return typeof data === 'object' &&
typeof data.requesterUsername === 'string';
return typeof data === 'object';
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation is too permissive and will return true for null values since typeof null === 'object'. Add a null check: return typeof data === 'object' && data !== null;

Suggested change
return typeof data === 'object';
return typeof data === 'object' && data !== null;

Copilot uses AI. Check for mistakes.
@vs-code-engineering vs-code-engineering Bot added this to the November 2025 milestone Nov 13, 2025
mjbvz
mjbvz previously approved these changes Nov 13, 2025
@lramos15 lramos15 merged commit 13b1a4e into main Nov 13, 2025
28 checks passed
@lramos15 lramos15 deleted the lramos15/scattered-kiwi branch November 13, 2025 20:10
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Dec 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants