MCPcopy Index your code

hub / github.com/RimuruW/pi-hashline-edit / functions

Functions172 in github.com/RimuruW/pi-hashline-edit

↓ 121 callersFunctioncomputeLineHash
(fileLines: readonly string[], index: number)
src/hashline/hash.ts:67
↓ 112 callersFunctiongetTool
(name: string)
test/support/fixtures.ts:88
↓ 106 callersFunctiongetText
(result: { content: Array<{ type: string; text?: string }>; })
test/support/fixtures.ts:106
↓ 105 callersFunctionapplyHashlineEdits
( content: string, edits: HashlineEdit[], signal?: AbortSignal, )
src/hashline/apply.ts:891
↓ 103 callersFunctionmakeToolContext
(cwd: string)
test/support/fixtures.ts:102
↓ 102 callersFunctionwithTempFile
( name: string, content: string, run: (args: { cwd: string; path: string }) => Promise<void>, )
test/support/fixtures.ts:19
↓ 90 callersFunctionmakeFakePiRegistry
()
test/support/fixtures.ts:72
↓ 50 callersFunctionresolveEditAnchors
(edits: HashlineToolEdit[])
src/hashline/parse.ts:327
↓ 40 callersFunctionmakeTag
(fileContent: string, line: number)
test/core/hashline.apply.test.ts:4
↓ 25 callersFunctionrememberReadSnapshot
(canonicalPath: string, content: string)
src/read-snapshot.ts:68
↓ 24 callersFunctionmakeTag
(fileContent: string, lineNum: number)
test/core/hashline.recovery.test.ts:11
↓ 20 callersFunctionloadFileKindAndText
( filePath: string, )
src/file-kind.ts:33
↓ 19 callersFunctionthrowIfAborted
(signal?: AbortSignal)
src/runtime.ts:1
↓ 18 callersFunctionnormalizeEditRequest
(input: unknown)
src/edit-normalize.ts:167
↓ 16 callersFunctionparseHashlineConfig
(raw: unknown)
src/config.ts:38
↓ 14 callersFunction__setHashLengthForTests
(n: 2 | 3 | 4)
src/config.ts:143
↓ 14 callersFunctionformatHashlineReadPreview
( text: string, options: { offset?: number; limit?: number; raw?: boolean }, )
src/read.ts:65
↓ 13 callersFunctiondescribeEdit
(edit: HashlineEdit)
src/hashline/apply.ts:295
↓ 13 callersFunctionrewriteAnchorExamples
(text: string, len: number)
src/prompt-loader.ts:34
↓ 13 callersFunctionvalidate
(ref: Anchor)
src/hashline/apply.ts:675
↓ 13 callersFunctionwithTempBytes
( name: string, bytes: Uint8Array, run: (args: { cwd: string; path: string }) => Promise<void>, )
test/support/fixtures.ts:34
↓ 12 callersFunctioncomputeAffectedLineRange
(params: { firstChangedLine: number | undefined; lastChangedLine: number | undefined; resultLineCount: numb
src/hashline/format.ts:20
↓ 12 callersFunctiongetGrepTool
()
test/tools/grep.test.ts:17
↓ 12 callersFunctiongetReadSnapshot
(canonicalPath: string)
src/read-snapshot.ts:120
↓ 12 callersFunctionparseRef
(ref: string)
test/core/hashline.parse.test.ts:6
↓ 11 callersFunctioncomputeChangedLineRange
( original: string, result: string, )
src/hashline/format.ts:80
↓ 11 callersFunctionformatHashlineRegion
( fileLines: readonly string[], startLine: number, endLine: number, )
src/hashline/format.ts:57
↓ 11 callersFunctionloadPrompt
(url: URL)
src/prompt-loader.ts:50
↓ 11 callersFunctionregisterEditTool
(pi: ExtensionAPI)
src/edit.ts:690
↓ 11 callersFunctionresolveToCwd
(filePath: string, cwd: string)
src/path-utils.ts:10
↓ 10 callersFunctiongetReadSnapshotVersions
(canonicalPath: string)
src/read-snapshot.ts:129
↓ 10 callersFunctionhasOwn
(record: Record<string, unknown>, key: string)
src/edit-normalize.ts:54
↓ 10 callersFunctionnormalizeToLF
(text: string)
src/edit-diff.ts:13
↓ 9 callersFunctioncomputeHashFromContext
(prev: string, curr: string, next: string)
src/hashline/hash.ts:52
↓ 9 callersFunctionhasMixedLineEndings
(content: string)
src/edit-diff.ts:27
↓ 9 callersFunctionstripBom
(content: string)
src/edit-diff.ts:38
↓ 8 callersFunctionassertEditRequest
( request: unknown, )
src/edit.ts:189
↓ 8 callersFunctionexampleAnchor
(len?: number)
src/config.ts:135
↓ 8 callersFunctionregisterGrepTool
(pi: ExtensionAPI)
src/grep.ts:236
↓ 8 callersFunctionwriteFileAtomically
( path: string, content: string, options?: { alreadyResolved?: true }, )
src/fs-write.ts:71
↓ 7 callersFunctioncomputeEditPreview
( request: unknown, cwd: string, )
src/edit.ts:412
↓ 7 callersFunctiongetHashLength
()
src/config.ts:118
↓ 7 callersFunctionmakeTag
(fileContent: string, lineNum: number)
test/core/hashline.duplicate-insert-warning.test.ts:4
↓ 7 callersFunctionresetReadSnapshot
()
src/read-snapshot.ts:138
↓ 6 callersFunction__resetConfigForTests
()
src/config.ts:153
↓ 6 callersFunctiondetectLineEnding
(content: string)
src/edit-diff.ts:6
↓ 6 callersFunctionmake15Lines
()
test/integration/snapshot-merge-recovery.test.ts:84
↓ 6 callersFunctionmakeStaleAnchorWithHint
* Build a stale anchor: the hash is from the file's old state (before a line * moved), but the anchor carries a textHint matching the original conten
test/core/hashline.mismatch-candidates.test.ts:10
↓ 6 callersFunctionnormalizeHashInput
(line: string)
src/hashline/hash.ts:36
↓ 6 callersFunctionparseLines
(lines: string[])
test/core/hashline.parse.test.ts:62
↓ 5 callersFunctionfakeChild
(opts: { errorEvent?: Error; closeCode?: number | null; stdout?: string; stderr?: string; })
test/tools/grep.test.ts:397
↓ 5 callersFunctionmakeTempDir
(prefix: string)
test/support/fixtures.ts:14
↓ 5 callersFunctionmatchEvent
(path: string, lineNumber: number)
test/tools/grep.test.ts:490
↓ 5 callersFunctionsettleReject
(error: Error)
src/grep.ts:158
↓ 5 callersFunctionthreeWayMerge
( base: string, baseEdited: string, current: string, )
src/merge.ts:20
↓ 4 callersFunctionapplyTool
(toolEdits: HashlineToolEdit[])
test/core/hashline-strict-input.test.ts:138
↓ 4 callersFunctioncomputeInsertionBoundary
( edit: Extract<HashlineEdit, { op: "append" | "prepend" }>, lineIndex: LineIndex, )
src/hashline/apply.ts:324
↓ 4 callersFunctioncountVisibleLines
(text: string)
src/hashline/format.ts:86
↓ 4 callersFunctionliteralStringSchema
( value: Value, options: { description: string }, )
src/edit.ts:55
↓ 4 callersFunctionmake15Lines
()
test/integration/multi-version-snapshot-recovery.test.ts:23
↓ 4 callersFunctionparseAnchorRef
(ref: string)
src/hashline/parse.ts:129
↓ 4 callersFunctionreadPrompt
(name: string)
test/prompts/prompt-examples.test.ts:15
↓ 4 callersFunctionresolveMutationTargetPath
(path: string)
src/fs-write.ts:13
↓ 3 callersFunctioncleanup
()
src/grep.ts:147
↓ 3 callersFunctioncolorDiffLines
(lines: string[], theme: FgTheme)
src/edit-render.ts:63
↓ 3 callersFunctionformatDiffPreviewLine
( prefix: " " | "+" | "-", lineNum: number, lineNumWidth: number, line: string, includeHash: boolean, al
src/edit-diff.ts:46
↓ 3 callersFunctiongenerateDiffString
( oldContent: string, newContent: string, contextLines = 4, )
src/edit-diff.ts:65
↓ 3 callersFunctionhashlineParseText
* Validate and return replacement lines. * * Array input is preserved verbatim so explicitly provided blank lines remain * intact. Display prefixes
src/hashline/parse.ts:210
↓ 3 callersFunctionisFuzzyEquivalentLine
(expected: string, actual: string)
src/hashline/hash.ts:89
↓ 3 callersFunctionlineRef
(readText: string, lineContent: string)
test/integration/multi-version-snapshot-recovery.test.ts:27
↓ 3 callersFunctionmakeFakeRegistry
()
test/tools/edit.queue.test.ts:28
↓ 3 callersFunctionmakeTag
(fileLines: string[], lineNum: number)
test/integration/stale-position-compound.test.ts:12
↓ 3 callersFunctionnoteUtf8DecodeErrors
(chunk?: Uint8Array)
src/file-kind.ts:90
↓ 3 callersFunctionresetNoopLoopGuard
()
src/noop-loop-guard.ts:71
↓ 3 callersFunctionthrowEditConflict
( left: { index: number; label: string }, right: { index: number; label: string }, reason: string, )
src/hashline/apply.ts:314
↓ 2 callersFunctionexecuteEditPipeline
* Shared edit pipeline: read file, resolve anchors, and apply edits. Public * entrypoints normalize + validate before calling this; access mode contr
src/edit.ts:222
↓ 2 callersFunctionflushPlainLines
()
src/edit-render.ts:192
↓ 2 callersFunctiongetGrepEnabled
()
src/config.ts:122
↓ 2 callersFunctionhasNullByte
(buffer: Uint8Array)
src/file-kind.ts:29
↓ 2 callersFunctionindexToLine
(charIdx: number, text: string)
src/hashline/format.ts:126
↓ 2 callersFunctionisRecord
* Single normalization layer that maps the dialects a model may emit onto the * canonical hashline edit request before validation runs. * * Why thi
src/edit-normalize.ts:27
↓ 2 callersFunctionmakeRecordingPI
()
test/extension/register.test.ts:10
↓ 2 callersFunctionmakeTestTheme
( overrides: Partial<{ bold: (text: string) => string; fg: (token: string, text: string) => string; }> =
test/support/fixtures.ts:127
↓ 2 callersFunctionnormalizeExactText
(text: string | undefined)
src/hashline/parse.ts:372
↓ 2 callersFunctionnormalizeFuzzyLine
(text: string)
src/hashline/hash.ts:80
↓ 2 callersFunctionnormalizePositiveInteger
( value: number | undefined, name: "offset" | "limit", )
src/read.ts:41
↓ 2 callersFunctionpreviewText
(text: string)
src/hashline/apply.ts:290
↓ 2 callersFunctionregisterReadTool
(pi: ExtensionAPI)
src/read.ts:131
↓ 2 callersFunctionrenderTextResult
( lastComponent: unknown, textContent: string | undefined, )
src/edit.ts:454
↓ 2 callersFunctionresetPreview
()
src/edit.ts:487
↓ 2 callersFunctionsettleResolve
()
src/grep.ts:151
↓ 2 callersFunctiontrimEdgeEmptyLines
(lines: string[])
src/edit-render.ts:169
↓ 2 callersFunctionwarnDuplicateInsert
* Warn when an append or prepend payload exactly matches the lines already * adjacent at the insertion point — indicates a duplicate insert after a
src/hashline/apply.ts:598
↓ 2 callersFunctionwarningsBlockOf
(warnings: string[] | undefined)
src/edit-response.ts:58
↓ 2 callersFunctionwithTempDirectory
( name: string, run: (args: { cwd: string; path: string }) => Promise<void>, )
test/support/fixtures.ts:49
↓ 2 callersFunctionxxh32
(input: string, seed = 0)
src/hashline/hash.ts:31
↓ 1 callersFunction__setGrepEnabledForTests
(v: boolean)
src/config.ts:148
↓ 1 callersFunctionaddMatch
( matchesByFile: Map<string, number[]>, filePath: string, lineNum: number, )
src/grep.ts:81
↓ 1 callersFunctionappendLimitedStderr
(current: string, chunk: string)
src/grep.ts:109
↓ 1 callersFunctionassembleEditResult
* Apply ordered spans to content in reverse (back-to-front) order so earlier * spans' offsets stay valid.
src/hashline/apply.ts:860
next →1–100 of 172, ranked by callers