MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / updateReadState

Function updateReadState

tools/builtin.go:1128–1143  ·  view source on GitHub ↗
(execCtx ExecutionContext, path, content, lineEndings string, isPartial bool)

Source from the content-addressed store, hash-verified

1126func jsonMarshalCompact(v any) (string, error) {
1127 var buf bytes.Buffer
1128 encoder := json.NewEncoder(&buf)
1129 encoder.SetEscapeHTML(false)
1130 err := encoder.Encode(v)
1131 if err != nil {
1132 return "{}", err
1133 }
1134 return string(spacePythonJSONSeparators(bytes.TrimSuffix(buf.Bytes(), []byte("\n")))), nil
1135}
1136
1137func spacePythonJSONSeparators(data []byte) []byte {
1138 out := make([]byte, 0, len(data)+8)
1139 inString := false
1140 escaped := false
1141 for _, b := range data {
1142 out = append(out, b)
1143 if escaped {
1144 escaped = false
1145 continue
1146 }

Callers 2

ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls 2

fileMTimeFunction · 0.85
SetReadFileStateMethod · 0.65

Tested by

no test coverage detected