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

Function addLineNumbers

packages/web/src/features/chat/utils.ts:186–188  ·  view source on GitHub ↗
(source: string, lineOffset = 1)

Source from the content-addressed store, hash-verified

184}
185
186export const addLineNumbers = (source: string, lineOffset = 1) => {
187 return source.split('\n').map((line, index) => `${index + lineOffset}: ${line}`).join('\n');
188}
189
190export const createUIMessage = (text: string, mentions: MentionData[], selectedSearchScopes: SearchScope[], disabledMcpServerIds: string[] = []): CreateUIMessage<SBChatMessage> => {
191 // Converts applicable mentions into sources.

Callers 1

createPromptFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected