-
Notifications
You must be signed in to change notification settings - Fork 850
feat: add plan_update chunk for chat streaming #1821
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
Merged
zimeg
merged 15 commits into
feat-ai-apps-thinking-steps
from
zimeg-feat-ai-apps-chunks-plan-update
Jan 17, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c3bdb2d
feat: accept chunks as arguments to chat.{start,append,stop}Stream me…
zimeg 8c56e22
fix: remove unsupported and unused identifiers for full support
zimeg 783ada5
style: remove mypy extra ignore comment for overriden attributes
zimeg 1fb7355
test: confirm chunks parse as expected json values
zimeg 5de794b
feat: support and flush chunks in the chat stream helper
zimeg 61d6d53
test: dump chunks json before comparison for exact parsings
zimeg 85081e1
test: update async tests to expect chunks when flushing buffer
zimeg a6bb951
style: prefer using markdown text chunks in internal calls
zimeg 92c93e0
fix: support explicit json values as chunk objects
zimeg 7c32814
fix: mirror dictionary chunk option to async streamer
zimeg 00b8652
feat: add plan_update chunk for chat streaming
zimeg b3da1b2
test: update expected output to match actual usage
zimeg 4d355da
fix: parse stringified plan_update chunks
zimeg 453db76
chore: merge w base branch
zimeg 33f745a
test: import for tests to pass without errors again
zimeg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,8 @@ def parse(cls, chunk: Union[Dict, "Chunk"]) -> Optional["Chunk"]: | |
| type = chunk["type"] | ||
| if type == MarkdownTextChunk.type: | ||
| return MarkdownTextChunk(**chunk) | ||
| elif type == PlanUpdateChunk.type: | ||
| return PlanUpdateChunk(**chunk) | ||
| elif type == TaskUpdateChunk.type: | ||
| return TaskUpdateChunk(**chunk) | ||
| else: | ||
|
|
@@ -67,6 +69,29 @@ def __init__( | |
| self.text = text | ||
|
|
||
|
|
||
| class PlanUpdateChunk(Chunk): | ||
| type = "plan_update" | ||
|
|
||
| @property | ||
| def attributes(self) -> Set[str]: # type: ignore[override] | ||
| return super().attributes.union({"title"}) | ||
|
|
||
| def __init__( | ||
| self, | ||
| *, | ||
| title: str, | ||
| **others: Dict, | ||
| ): | ||
| """An updated title of plans for task and tool calls. | ||
|
|
||
| https://docs.slack.dev/messaging/sending-and-scheduling-messages#text-streaming | ||
| """ | ||
| super().__init__(type=self.type) | ||
| show_unknown_key_warning(self, others) | ||
|
|
||
| self.title = title | ||
|
Contributor
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. thanks for getting clarification on what this chunk should look like 😸 |
||
|
|
||
|
|
||
| class TaskUpdateChunk(Chunk): | ||
| type = "task_update" | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🌟