| 211 | } |
| 212 | |
| 213 | const getIconForOption = (option: ContextMenuQueryItem): string => { |
| 214 | switch (option.type) { |
| 215 | case ContextMenuOptionType.Mode: |
| 216 | return "symbol-misc" |
| 217 | case ContextMenuOptionType.Command: |
| 218 | return "play" |
| 219 | case ContextMenuOptionType.OpenedFile: |
| 220 | return "window" |
| 221 | case ContextMenuOptionType.File: |
| 222 | return "file" |
| 223 | case ContextMenuOptionType.Folder: |
| 224 | return "folder" |
| 225 | case ContextMenuOptionType.Problems: |
| 226 | return "warning" |
| 227 | case ContextMenuOptionType.Terminal: |
| 228 | return "terminal" |
| 229 | case ContextMenuOptionType.URL: |
| 230 | return "link" |
| 231 | case ContextMenuOptionType.Git: |
| 232 | return "git-commit" |
| 233 | case ContextMenuOptionType.NoResults: |
| 234 | return "info" |
| 235 | default: |
| 236 | return "file" |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | const getMaterialIconForOption = (option: ContextMenuQueryItem): string => { |
| 241 | // only take the last part of the path to handle both file and folder icons |