Skip to content
Merged
Changes from 1 commit
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 @@ -841,6 +841,10 @@ interface ITunnelPickItem extends IQuickPickItem {
readonly tunnel: ITunnelInfo;
}

export function sortTunnelsByName(tunnels: readonly ITunnelInfo[]): ITunnelInfo[] {
Comment thread
dmitrivMS marked this conversation as resolved.
Outdated
return [...tunnels].sort((a, b) => a.name.localeCompare(b.name));
}

async function promptToConnectViaTunnel(
accessor: ServicesAccessor,
options: { showBackButton?: boolean } = {},
Expand Down Expand Up @@ -901,7 +905,7 @@ async function promptToConnectViaTunnel(
tooltip: localize('tunnelDeleteTooltip', "Delete Dev Tunnel"),
};
const isHostedTunnel = (tunnel: ITunnelInfo): boolean => isTunnelHosted(tunnelHostService.sharingInfo, tunnel);
const toTunnelPickItems = (tunnelInfos: readonly ITunnelInfo[]): ITunnelPickItem[] => tunnelInfos
const toTunnelPickItems = (tunnelInfos: readonly ITunnelInfo[]): ITunnelPickItem[] => sortTunnelsByName(tunnelInfos)
.filter(tunnel => !isHostedTunnel(tunnel))
.map(tunnel => ({
label: tunnel.name,
Expand Down
Loading