textfile

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertLine

func InsertLine(code string, lineNumber int, newText string) (string, error)

func InsertLinesAtIndices

func InsertLinesAtIndices(file string, indices []int, linesToInsert []string) (string, error)

func ReplaceLines

func ReplaceLines(code string, startLine int, endLine int, newText string) (string, error)

Types

type SplitFile

type SplitFile struct {
	Path      string
	Contents  string
	StartLine int
	EndLine   int
}

func Split

func Split(path, model string) ([]SplitFile, error)

splits the file based on the max tokens allowed by the model

func (*SplitFile) Hash

func (s *SplitFile) Hash() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL