Repository navigation
fix(chat): Use Chat SDK primitives for streaming, status, and file uploads - #19
Merged
Merged
Conversation
…loads Replace the custom assistantThreadMetaById cache and direct setAssistantStatus bypass with the Chat SDK's built-in thread.startTyping() and thread.channelId. This removes ~80 lines of map infrastructure that silently failed when entries weren't populated due to inconsistent threadTs resolution across scattered helpers. - Add parseSlackThreadId as single canonical parser for slack:CHANNEL:TS - Rewrite createProgressReporter to use thread.startTyping() - Derive channelId from thread.channelId with message fallback - Derive threadTs from parseSlackThreadId (single source of truth) - Update prompt to allow brief ack before heavy tool work - Broaden image-generate tool description for visual concepts - Remove dead EditableSentMessage/isEditableSentMessage code Fixes #12 Co-Authored-By: Claude <[email protected]>
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace the custom
assistantThreadMetaByIdcache and directsetAssistantStatusadapter bypass with the Chat SDK's built-inthread.startTyping()andthread.channelId.The old approach manually called
getSlackAdapter().setAssistantStatus(channelId, threadTs, ...)which required a global in-memory map to store{channelId, threadTs}per thread. This map silently failed when entries weren't populated — which happened becausethreadTsresolution was scattered across four separate helper functions with inconsistent fallback chains. The same missingthreadTscaused file uploads to be silently skipped.The Chat SDK already handles all of this:
thread.startTyping(status)delegates to the Slack adapter'sassistant.threads.setStatuswith properdecodeThreadId+withToken+ error handling.thread.channelIdis a first-class property. No map needed.What changed:
parseSlackThreadIdas single canonical parser for theslack:CHANNEL:TSformatcreateProgressReporterto usethread.startTyping()instead of the adapter bypasschannelIdfromthread.channelId(Chat SDK property) with message fallbackthreadTsfromparseSlackThreadId— single source of truth, no scattered helpersAssistantThreadMetainterface, map, pruning, population in two call sitesEditableSentMessage/isEditableSentMessagecodeimageGeneratetool description to cover visual concepts, not just explicit creation requestsVerified against the actual Chat SDK contracts:
SlackAdapter.startTypingcalls the sameassistant.threads.setStatusAPI with identical parameters (status+loading_messages: [status]).Fixes #12