MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / fileReferenceToString

Function fileReferenceToString

packages/web/src/features/chat/utils.ts:232–234  ·  view source on GitHub ↗
({ repo, path, range }: Omit<FileReference, 'type' | 'id'>)

Source from the content-addressed store, hash-verified

230}
231
232export const fileReferenceToString = ({ repo, path, range }: Omit<FileReference, 'type' | 'id'>) => {
233 return `${FILE_REFERENCE_PREFIX}{${repo}::${path}${range ? `:${range.startLine}-${range.endLine}` : ''}}`;
234}
235
236export const createFileReference = ({ repo, path, startLine, endLine }: { repo: string, path: string, startLine?: string, endLine?: string }): FileReference => {
237 const range = startLine && endLine ? {

Callers 3

utils.test.tsFile · 0.90
createPromptFunction · 0.90
slateContentToStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected