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

Function firstRunes

agentContext/builder.go:574–583  ·  view source on GitHub ↗
(text string, limit int)

Source from the content-addressed store, hash-verified

572 if len([]rune(current)) > budget.MaxChars {
573 return firstRunes(current, budget.MaxChars), true
574 }
575 for _, chunk := range chunks[1:] {
576 piece := *preserveSeparator + chunk
577 if len([]rune(current+piece)) > budget.MaxChars {
578 return current, true
579 }
580 current += piece
581 }
582 return current, true
583 }
584 }
585 return firstRunes(candidate, budget.MaxChars), true
586}

Callers 1

TruncateAttachmentTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected