mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Merge pull request #214032 from microsoft/tyriar/copilot-5969
Use the default agent name in terminal initial hint
This commit is contained in:
commit
6b5e7259d8
|
@ -193,6 +193,7 @@ class TerminalInitialHintWidget extends Disposable {
|
|||
|
||||
constructor(
|
||||
private readonly _instance: ITerminalInstance,
|
||||
@IChatAgentService private readonly _chatAgentService: IChatAgentService,
|
||||
@ICommandService private readonly commandService: ICommandService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||
|
@ -219,7 +220,11 @@ class TerminalInitialHintWidget extends Disposable {
|
|||
}
|
||||
|
||||
private _getHintInlineChat(agents: IChatAgent[]) {
|
||||
const providerName = (agents.length === 1 ? agents[0].fullName : undefined) ?? this.productService.nameShort;
|
||||
let providerName = (agents.length === 1 ? agents[0].fullName : undefined) ?? this.productService.nameShort;
|
||||
const defaultAgent = this._chatAgentService.getDefaultAgent(ChatAgentLocation.Panel);
|
||||
if (defaultAgent?.extensionId.value === agents[0].extensionId.value) {
|
||||
providerName = defaultAgent.fullName ?? providerName;
|
||||
}
|
||||
|
||||
let ariaLabel = `Ask ${providerName} something or start typing to dismiss.`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue