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

Function addPath

cli/src/utils/image-handler.ts:297–302  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

295 const cleanInput = input.replace(/```[\s\S]*?```|`[^`]*`/g, ' ')
296
297 const addPath = (p: string) => {
298 const cleaned = p.replace(/[.,!?;)\]}>">]+$/, '') // Remove trailing punctuation
299 if (isImageFile(cleaned) && !paths.includes(cleaned)) {
300 paths.push(cleaned)
301 }
302 }
303
304 // @path syntax
305 for (const match of cleanInput.matchAll(/@([^\s]+)/g)) {

Callers 1

extractImagePathsFunction · 0.85

Calls 1

isImageFileFunction · 0.85

Tested by

no test coverage detected