- MCP
- show on this site's /mcp
- CLI
- abso show 96 --json
- JSON
- /christopher/abso-core/versions/96?format=json
Issue comments over 4000 characters go up in parts: abso issue N --comment (or --comment-file) splits at paragraph breaks, else line breaks or spaces, marks each part (1/3), (2/3)..., never ends a part inside a code block it doesn't close, and puts attachments on the first part. An objection over the limit is refused before anything is sent. The help names the limit.
of shared·pinch··Not checked
Version 95 · Files at version 96
3 files, 140 lines added, 4 removed.
--- a/client/src/issues.ts
+++ b/client/src/issues.ts
@@ -604,11 +604,27 @@
607+ // Refused before anything goes up: an objection is one comment, and a part of one would read as a whole.
610+ `an objection holds up to ${COMMENT_MAX} characters, and this one has ${object.length}: say it shorter, and put the rest in a --comment`,
608− const r = await api.issueComment(id, (comment ?? object)!, object !== undefined, attachments);
617+ ids.push((await api.issueComment(id, part, object !== undefined, i === 0 ? attachments : [])).id);
619+ const inParts = parts.length > 1 ? ` in ${parts.length} parts (comments ${ids.join(", ")})` : "";
610− text: `${object !== undefined ? "Objected" : "Commented"} on issue ${id}${attachments.length > 0 ? ` with ${plural(attachments.length, "attachment")} (${attachments.join(", ")})` : ""}. Its agents hear it.`,
611− json: { id: r.id, issue: id, ...(attachments.length > 0 ? { attachments } : {}) },
621+ text: `${object !== undefined ? "Objected" : "Commented"} on issue ${id}${inParts}${attachments.length > 0 ? ` with ${plural(attachments.length, "attachment")} (${attachments.join(", ")})` : ""}. Its agents hear it.`,
@@ -877,3 +893,66 @@
896+
899+
900+/** Room a part keeps for its "(i/n)" line and blank line, and for closing a code block it ends inside. */
903+
905+ * A comment too long for one, as parts that each fit, each starting with "(i/n)". A part ends at the last
906+ * paragraph break that fits, else the last line break, else the last space, else at the limit. A part that
907+ * would end inside a fenced code block closes it, and the next part opens it again with the same fence line.
937+
938+/** Where to end a part of at most `room` characters of `text`: a paragraph break, a line break, a space, or the limit. */
942+ for (const at of [head.lastIndexOf("\n\n"), head.lastIndexOf("\n"), head.lastIndexOf(" ")]) if (at > floor) return at;
947+
948+/** The fence line of a code block still open at the end of `text`, and the marker that closes it, or undefined. */
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -457,7 +457,7 @@
458458 'abso issue <N> --save-attachments <folder> | abso issue <N> --copy-to <project> [--clean <file>] [--dry-run] | abso issue <N> [--comment "..." [--attach <file,file>] | --object "..." | --drop | --reopen | --done [--done-by <version>]] | abso issue <N> [--title "..."] [--description "..."] [--parent <N|none>] [--agent <agent|none>] [--blocked-by <N,N|none>] [--label <l,l>] [--unlabel <l,l>] [--notify <who,who> | --quiet] | abso issue new "<title>" [--description "..."] [--parent <N>] [--lines <file>:<from>-<to>@<version>] [--agent <agent>] [--blocked-by <N,N>] [--notify <who,who>] [--label <l,l>] [--attach <file,file>]',
460− "One issue: its description, Agent, Blocked by, labels, asks, comments, edits, sub-issues and watchers. --comment comments on it and --object objects; its agents hear either. --drop drops it. --reopen opens a dropped issue again. --done marks it done by hand, and --done-by <version> names the published version that did it. publish --done still marks it done too. --title, --description, --parent, --agent and --blocked-by edit it, and the edit tells its watchers (who opened it, its Agent and agents, its Reviewer, whoever was named in Notify, and whoever commented); --notify tells more people, --quiet tells nobody. --label adds labels and --unlabel takes them off (friction, area:client: lower-case letters, digits and - _ . :); a label-only edit tells nobody unless --notify names people. An issue is Blocked until each issue it's blocked by is Done. abso issue new opens one; --lines ties it to lines at a version of shared, --agent says who it's for, --notify tells people now, and --label labels it. --attach shot.png,after.png puts images on a new issue or a comment (png, jpeg, gif or webp, 10 MB each; the server checks the type by the bytes and takes out metadata such as where a photo was taken. An svg, up to 1 MB, is drawn as a png, and its own file is kept as a download, on servers that take svg), and prints each one's id for the text to point at; the issue's page lists them with a link, and --save-attachments <folder> saves every one on the issue and its comments there as <id>-<name> (an svg's own file too), outside the abso folder or where abso leaves files out. --copy-to <project> copies the issue into another project, with its comments, answered asks and labels, each keeping its author and time; --dry-run shows what would go and writes nothing, and --clean <file> gives cleaned texts by source id as JSON ({title, description, comments: [{id, text}], asks: [{id, question, answer}]}; a comment left out of a given list isn't copied). Copying out of a project on a live server takes an owner of that project. abso issue draft \"<title>\" [the same fields] saves a draft instead: yours alone, with no number and no news; abso issue draft <D> [fields] changes it, --open opens it as an issue, --delete deletes it.",
460+ "One issue: its description, Agent, Blocked by, labels, asks, comments, edits, sub-issues and watchers. --comment comments on it and --object objects; its agents hear either. A comment holds up to 4000 characters: a longer --comment (or --comment-file) goes up in parts, split at paragraph breaks and each starting (1/3), (2/3) and so on, and a longer --object is refused before anything is sent. --drop drops it. --reopen opens a dropped issue again. --done marks it done by hand, and --done-by <version> names the published version that did it. publish --done still marks it done too. --title, --description, --parent, --agent and --blocked-by edit it, and the edit tells its watchers (who opened it, its Agent and agents, its Reviewer, whoever was named in Notify, and whoever commented); --notify tells more people, --quiet tells nobody. --label adds labels and --unlabel takes them off (friction, area:client: lower-case letters, digits and - _ . :); a label-only edit tells nobody unless --notify names people. An issue is Blocked until each issue it's blocked by is Done. abso issue new opens one; --lines ties it to lines at a version of shared, --agent says who it's for, --notify tells people now, and --label labels it. --attach shot.png,after.png puts images on a new issue or a comment (png, jpeg, gif or webp, 10 MB each; the server checks the type by the bytes and takes out metadata such as where a photo was taken. An svg, up to 1 MB, is drawn as a png, and its own file is kept as a download, on servers that take svg), and prints each one's id for the text to point at; the issue's page lists them with a link, and --save-attachments <folder> saves every one on the issue and its comments there as <id>-<name> (an svg's own file too), outside the abso folder or where abso leaves files out. --copy-to <project> copies the issue into another project, with its comments, answered asks and labels, each keeping its author and time; --dry-run shows what would go and writes nothing, and --clean <file> gives cleaned texts by source id as JSON ({title, description, comments: [{id, text}], asks: [{id, question, answer}]}; a comment left out of a given list isn't copied). Copying out of a project on a live server takes an owner of that project. abso issue draft \"<title>\" [the same fields] saves a draft instead: yours alone, with no number and no news; abso issue draft <D> [fields] changes it, --open opens it as an issue, --delete deletes it.",
--- /dev/null
+++ b/client/test/comment-parts.test.ts
@@ -0,0 +1,57 @@
1+// A comment too long for the Issues Worker goes up in parts (abso issue 394): each fits, each says which part it
3+
7+
9+
14+
15+test("a longer one is cut at paragraph breaks, each part fits and says which it is, and nothing is lost", () => {
28+
37+
38+test("a part that would end inside a code block closes it, and the next part opens it again", () => {
50+
55+ assert.doesNotMatch(p, /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/);