Skip to content

Commit 5adea64

Browse files
authored
1 parent 56c9d0a commit 5adea64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,16 @@ class AgentCompletions extends Disposable {
293293
suggestions: agents.flatMap(agent => agent.slashCommands.map((c, i) => {
294294
const { label: agentLabel, isDupe } = this.getAgentCompletionDetails(agent);
295295
const withSlash = `${chatSubcommandLeader}${c.name}`;
296+
const extraSortText = agent.id === 'github.copilot.terminalPanel' ? `z` : ``;
297+
const sortText = `${chatSubcommandLeader}${extraSortText}${agent.name}${c.name}`;
296298
const item: CompletionItem = {
297299
label: { label: withSlash, description: agentLabel, detail: isDupe ? ` (${agent.publisherDisplayName})` : undefined },
298300
commitCharacters: [' '],
299301
insertText: `${agentLabel} ${withSlash} `,
300302
detail: `(${agentLabel}) ${c.description ?? ''}`,
301303
range: new Range(1, 1, 1, 1),
302304
kind: CompletionItemKind.Text, // The icons are disabled here anyway
303-
sortText: `${chatSubcommandLeader}${agent.name}${c.name}`,
305+
sortText,
304306
command: { id: AssignSelectedAgentAction.ID, title: AssignSelectedAgentAction.ID, arguments: [{ agent, widget } satisfies AssignSelectedAgentActionArgs] },
305307
};
306308

0 commit comments

Comments
 (0)