MCPcopy
hub / github.com/cursor/cookbook / formatToolIcon

Function formatToolIcon

sdk/coding-agent-cli/src/tui/App.tsx:966–995  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

964}
965
966function formatToolIcon(name: string) {
967 const key = name.toLowerCase()
968
969 if (key.includes("read")) {
970 return "[R]"
971 }
972
973 if (key.includes("glob") || key.includes("grep") || key.includes("search")) {
974 return "[S]"
975 }
976
977 if (key.includes("shell") || key.includes("terminal") || key.includes("command")) {
978 return "$"
979 }
980
981 if (
982 key.includes("edit") ||
983 key.includes("write") ||
984 key.includes("patch") ||
985 key.includes("delete")
986 ) {
987 return "[E]"
988 }
989
990 if (key.includes("todo") || key.includes("task")) {
991 return "[T]"
992 }
993
994 return "[*]"
995}
996
997function formatRunStatus(status: string) {
998 switch (status) {

Callers 1

applyAgentEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected