Skip to content

kagi assistant buffers full response instead of streaming #107

@adrianipopescu

Description

@adrianipopescu

Server-side this endpoint streams: POST /assistant/prompt returns chunked HTML with <div hidden>JSON</div><script>scriptStreamCallback(KEY)</script> markers, and new_message.json updates incrementally (waitingstreamingdone). kagi-cli waits for the final state and prints the whole thing at once.

Would like a --stream flag that emits NDJSON, one line per new_message.json update, with the md delta since last emission. Current behavior stays default.

Use case: building a proxy on top of kagi-cli. Right now I either fake the stream (chunk the buffered reply) or bypass kagi-cli entirely and parse the HTML protocol myself.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions