MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getToolDisplayInfo

Function getToolDisplayInfo

cli/src/utils/codebuff-client.ts:108–124  ·  view source on GitHub ↗
(toolName: string)

Source from the content-addressed store, hash-verified

106}
107
108export function getToolDisplayInfo(toolName: string): {
109 name: string
110 type: string
111} {
112 const TOOL_NAME_OVERRIDES: Record<string, string> = {
113 list_directory: 'List Directories',
114 }
115
116 const capitalizeWords = (str: string) => {
117 return str.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase())
118 }
119
120 return {
121 name: TOOL_NAME_OVERRIDES[toolName] ?? capitalizeWords(toolName),
122 type: 'tool',
123 }
124}
125
126function toYaml(obj: any, indent = 0): string {
127 const spaces = ' '.repeat(indent)

Callers 1

tool-branch.tsxFile · 0.90

Calls 1

capitalizeWordsFunction · 0.85

Tested by

no test coverage detected