MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getIconForOption

Function getIconForOption

webview-ui/src/components/chat/ContextMenu.tsx:213–238  ·  view source on GitHub ↗
(option: ContextMenuQueryItem)

Source from the content-addressed store, hash-verified

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

Callers 1

ContextMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected