mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
fix(cli): count emitted documents and normalize token windows
This commit is contained in:
+10
@@ -909,3 +909,13 @@ REA's failure status:
|
||||
set -o pipefail
|
||||
rea inspect-artifact ./app.asar --json | jq . > inspection.json
|
||||
```
|
||||
|
||||
`--token-count` reports a tokenx estimate for the selected emitted document,
|
||||
including a requested full-output envelope and metadata. JSON uses the same
|
||||
terminal indentation or compact piped representation as normal output; JSONL
|
||||
uses its emitted line representation. The final newline is included (tokenx
|
||||
assigns whitespace no tokens). This is an estimate, not a model tokenizer count.
|
||||
Counting retains the existing bounded formatted-string allocation after capacity
|
||||
admission; omit the flag to stream large JSON documents without materializing
|
||||
the complete formatted text. Exhausted token windows display an empty range at
|
||||
the total token count and have no next offset.
|
||||
|
||||
Reference in New Issue
Block a user