Repository navigation
feat(narrative): read a block's body as one line #2280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -236,7 +236,7 @@ context is the origin of, or joined to, a thing (§14). | |
|
|
||
| | Thing | Line | | ||
| | --- | --- | | ||
| | Input | with user content: `user: <text>` (images as `[image]`), followed by `+ <blocks>` when it also carries blocks; with blocks only: `<blocks>: <first line of the first block's body>`, or `<blocks>` alone when that body is empty. A block's body is the text between its opening tag and its own closing tag, so a tag inside the body stays; a block whose text opens with no tag has that text as its body. `<blocks>` names each block in order by its opening tag and attributes as written, or `block` for a block whose text opens with no tag, with `(current)` for a live block and `(ended)` for one that retires its `key` | | ||
| | Input | with user content: `user: <text>` (images as `[image]`), followed by `+ <blocks>` when it also carries blocks; with blocks only: `<blocks>: <the first block's body as one line>`, or `<blocks>` alone when that body is empty. A block's body is the text between its opening tag and its own closing tag, so a tag inside the body stays; a block whose text opens with no tag has that text as its body. The body reads as one line: each run of whitespace in it, line breaks included, becomes one space, and nothing else is added, so a body whose first line only leads into the rest still says what follows. `<blocks>` names each block in order by its opening tag and attributes as written, or `block` for a block whose text opens with no tag, with `(current)` for a live block and `(ended)` for one that retires its `key` | | ||
| | Your reply | `you: <text>`, thinking left out; an output that did not complete is `your reply was cut off (<reason>): <partial text>`, with the committed text and the outcome of its `step/model-output-end`; an output the head ends inside is `you (still writing): <text so far>` | | ||
| | Tool call | `you called <tool> <input brief> → <ending>`; a call whose arguments never arrived is `you started calling <tool> (arguments not received) → <ending>` | | ||
| | Interrupt | `the user interrupted the turn` | | ||
|
|
@@ -292,7 +292,8 @@ context)` or `(ended)` where it applies, paged by characters like any thing. | |
| **The input brief** is generic, for every tool alike: the scalar fields of `input` as | ||
| `key=value`, nested values as `{…}`. Opening the call shows the full input. | ||
|
|
||
| **Every line has a fixed maximum length.** A line is one line: a quoted text is its first line. | ||
| **Every line has a fixed maximum length.** A line is one line: a quoted text is its first line, | ||
| except a block's body, which reads as one line with its whitespace joined (§3.4). | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3 (optional). This exception is easy to read as every block body, but a line write still uses its first line. A multi-line message from another line is read by |
||
| Each variable part of a line is cut at 120 characters with `…`: a quoted text (user text, a reply, | ||
| a block's body, a result), the input brief as a whole, `<blocks>`, a tool name, a turn's tool | ||
| summary, a reason, a task id, an agent name, a mode or a parent line. No line has more than four | ||
|
|
@@ -335,7 +336,7 @@ The inputs that open a turn are the ones it consumed before its first model requ | |
| later, such as a steer while it works, does not open it. The line gives the first user text among | ||
| the opening inputs; when none of them carries user text (a Goal continuation, a message from | ||
| another line), the first of them that carries a line write (§3.4), or else the driving input as its line | ||
| reads, `<blocks>: <first line of the first block's body>`: the first opening input that is not Append, since an Append input joins the request | ||
| reads, `<blocks>: <the first block's body as one line>`: the first opening input that is not Append, since an Append input joins the request | ||
| but does not open the turn. A turn with no opening input has none of these: its line reads | ||
| `turn: no opening input`. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3 (optional). The new case does not exercise the 120-character cut. This body is short, so the test passes whether the code truncates before or after flattening. Add a long multi-line body and assert the rendered line is 120 characters and ends with an ellipsis; the agreed direction applies the existing cut after flattening.