From: Anderson A. Giacomolli Date: Fri, 6 Nov 2026 18:12:33 +0000 (-0300) Subject: Mark the line limit with ASCII only X-Git-Url: https://git.giacomolli.uk/onechat/commitdiff_plain/6755f2645bf6bcf8c7cd5b1f3a682a11bf2392f5?ds=sidebyside;hp=67924c68bdee3e45b291667b865f99b79e585718 Mark the line limit with ASCII only The note for a line that is too long ends its cut with "| <- LIMIT" instead of a Unicode arrow, as the guide requires ASCII in every file except Unicode test data. Issue: b14d537 --- diff --git a/compactor.go b/compactor.go index 6840fd4..ac5fd1d 100644 --- a/compactor.go +++ b/compactor.go @@ -129,7 +129,7 @@ func tooLong(line string) string { return fmt.Sprintf(`Too long: your last line for this was %d bytes, over the %d-byte limit. Write the whole line again, cutting just enough of the least valuable items to fit before this cut: -%s| ← LIMIT`, len(line), nodeBytes, cutLine(line)) +%s| <- LIMIT`, len(line), nodeBytes, cutLine(line)) } // cutLine returns the first nodeBytes bytes of line, without a part of a diff --git a/compactor_test.go b/compactor_test.go index 7813c77..cd6311a 100644 --- a/compactor_test.go +++ b/compactor_test.go @@ -85,7 +85,7 @@ func TestCompactorRetriesALongLineWithTheNewestNote(t *testing.T) { require.Equal(t, first, parts[:2]) require.Equal(t, []string{tooLong(want)}, parts[2:]) require.Contains(t, parts[2], "was "+strconv.Itoa(len(want))+" bytes,") - require.Contains(t, parts[2], "\n"+want[:512]+"| ← LIMIT") + require.Contains(t, parts[2], "\n"+want[:512]+"| <- LIMIT") note, err := json.Marshal(map[string]string{ "type": "input_text",