190
continue;
191
}
193
>
if (!shouldOfferOption(option, state)) {
194
continue;
195
}
197
>
// and show the argument hint; pure toggles insert nothing (the display
198
>
// comes from `label`).
199
>
const keep = option.argumentHint !== undefined;
200
>
const insertText = keep ? `/${command.command} ` : '';
201
>
const label = keep
202
? `/${command.command}`
203
: (option.arg ? `/${command.command} ${option.arg}` : `/${command.command}`);
205
>
insertText,
206
>
label,
207
>
command: command.command,
208
>
description: option.detail,
209
>
...(option.argumentHint !== undefined ? { argumentHint: option.argumentHint } : {}),
210
>
applyConfig: option.config,
211
>
sortText: option.arg ? `${command.sortText}_${option.arg}` : command.sortText,
212
>
});
213
>
}
214
>
}
215
return items;
216
}