MCPcopy Create free account
hub / github.com/agent-tower/core / needsBodySplit

Function needsBodySplit

packages/server/src/services/task.service.ts:98–105  ·  view source on GitHub ↗
(rawTitle: string, normalizedTitle: string)

Source from the content-addressed store, hash-verified

96 sliced.lastIndexOf(','),
97 sliced.lastIndexOf('。'),
98 sliced.lastIndexOf(','),
99 sliced.lastIndexOf('.')
100 );
101 const candidate = boundary >= Math.floor(limit * 0.6) ? sliced.slice(0, boundary) : sliced;
102 return `${candidate.trimEnd()}...`;
103}
104
105function sliceAtCompleteCodePointBoundary(value: string, maxLength: number): string {
106 let end = 0;
107 for (const character of value) {
108 if (end + character.length > maxLength) {

Callers 2

normalizeCreateTaskInputFunction · 0.85
normalizeUpdateTaskInputFunction · 0.85

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected