( task: T, capability: Awaited<ReturnType<typeof detectProjectGitCapability>> )
| 222 | consumedEnd: number; |
| 223 | body: string; |
| 224 | } { |
| 225 | const linePattern = /[^\r\n]+/g; |
| 226 | let lineMatch: RegExpExecArray | null; |
| 227 | |
| 228 | while ((lineMatch = linePattern.exec(rawBody)) !== null) { |
| 229 | const compactedLine = compactWhitespaceWithSourceOffsets(lineMatch[0]); |
| 230 | if (compactedLine.value.length === 0) { |
| 231 | continue; |
| 232 | } |
| 233 | |
| 234 | const sentenceMatch = compactedLine.value.match(/^(.+?[。!?.!?])(?:\s|$)/u); |
| 235 | const candidate = sentenceMatch?.[1] ?? compactedLine.value; |
| 236 | const normalizedTitle = truncateWithEllipsisDetails(candidate, TASK_TITLE_MAX_LENGTH); |
| 237 | const consumedLineEnd = compactedLine.sourceEndOffsets[normalizedTitle.consumedLength - 1] ?? 0; |
| 238 | const rawConsumedEnd = lineMatch.index + consumedLineEnd; |
no outgoing calls
no test coverage detected