Skip to content

Commit d389abf

Browse files
README: fix streaming trailer to match the encoder
The streaming example / prose showed a defunct trailer, `## _summary ... sections=targets:1,related:1,edges:1`. The encoder actually emits `##! summary ... counts=1,1,1` (SPEC Section 8.4: positional counts, one per deferred section). Correct the marker and the field to match real output.
1 parent 3448546 commit d389abf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ enc = StreamEncoder(sys.stdout, "context_for_task", token_budget=5000)
9898
enc.write_symbol(Symbol(qualified_name="pkg.Auth", kind="function", score=0.95, provenance="lsp", distance=0))
9999
enc.write_symbol(Symbol(qualified_name="pkg.Server", kind="function", score=0.60, provenance="lsp", distance=1))
100100
enc.write_edge(Edge(source="pkg.Server", target="pkg.Auth", edge_type="calls"))
101-
enc.close() # emits ## _summary trailer
101+
enc.close() # emits ##! summary trailer
102102
```
103103

104104
Output:
@@ -110,7 +110,7 @@ GCF tool=context_for_task budget=5000
110110
@1 fn pkg.Server 0.60 lsp
111111
## edges [?]
112112
@0<@1 calls
113-
## _summary symbols=2 edges=1 sections=targets:1,related:1,edges:1
113+
##! summary symbols=2 edges=1 counts=1,1,1
114114
```
115115

116116
The writer is any object with a `write(s: str)` method. Thread-safe. Standard `decode()` handles streaming output with no changes.

0 commit comments

Comments
 (0)