Standardize ellipsis to … in snippet truncation
This commit is contained in:
@@ -8,7 +8,7 @@ function truncateSnippet(snippet: string): string {
|
||||
return normalized;
|
||||
}
|
||||
|
||||
return `${normalized.slice(0, MAX_SNIPPET_LENGTH - 3)}...`;
|
||||
return `${normalized.slice(0, MAX_SNIPPET_LENGTH - 1)}…`;
|
||||
}
|
||||
|
||||
function humanizeAge(timestamp?: string): string {
|
||||
|
||||
@@ -98,7 +98,7 @@ describe("formatForLLM", () => {
|
||||
|
||||
const snippetLine = output
|
||||
.split("\n")
|
||||
.find((line) => line.startsWith(" ") && line.includes("..."));
|
||||
.find((line) => line.startsWith(" ") && line.includes("…"));
|
||||
|
||||
expect(snippetLine).toBeDefined();
|
||||
expect(snippetLine!.trim().length).toBe(240);
|
||||
|
||||
Reference in New Issue
Block a user