LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsbackendsformatSourceBlock
Function●Since v1.13

formatSourceBlock

Copy
formatSourceBlock(content: string | string[]): string
View source on GitHub

Parameters

NameTypeDescription
content*string | string[]

Join file content into the unmodified source body of a read_file result.

Source lines are emitted unchanged, with no numbering. A status header carries the line-range metadata separately, so nothing here needs to encode line numbers or escape anything.