MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getStartLine

Method getStartLine

src/core/tools/ReadFileTool.ts:539–546  ·  view source on GitHub ↗

* Get the starting line number for navigation purposes.

(entry: InternalFileEntry)

Source from the content-addressed store, hash-verified

537 * Get the starting line number for navigation purposes.
538 */
539 private getStartLine(entry: InternalFileEntry): number | undefined {
540 if (entry.mode === "indentation") {
541 // For indentation mode, always return the effective anchor line
542 return entry.anchor_line ?? entry.offset ?? 1
543 }
544 const offset = entry.offset ?? 1
545 return offset > 1 ? offset : undefined
546 }
547
548 /**
549 * Generate a human-readable line snippet for approval messages.

Callers 1

requestApprovalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected