The domain object TheaTask still hard-depends on the TheaProvider interface. TaskManager.createProviderShim() (src/core/TaskManager.ts) fakes that interface with no-op postMessageToWebview / postStateToWebview, and the inline comment says "TheaTask currently expects TheaProvider — well need to update it."
It works only because TheaTask also emits message events (src/core/TheaTask.ts:295,302) that the chat participant subscribes to (src/ux/chat/registerChatParticipant.ts).
Problems
- Core/domain layer is coupled to a retired UI-provider shape (inverted dependency).
- The chat handler drops all
partial messages (registerChatParticipant.ts:127 returns early on message.partial), so there is no incremental/streaming output in the chat UI — only completed blocks render.
Proposed
- Define a small
TaskHost/TaskContext interface (context, state, mcpHub, event sink) and have TheaTask depend on that instead of TheaProvider.
- Stream partials to
ChatResponseStream.markdown() (or progress) instead of discarding them.
Acceptance
TheaTask no longer imports TheaProvider.
- Chat output streams incrementally.
The domain object
TheaTaskstill hard-depends on theTheaProviderinterface.TaskManager.createProviderShim()(src/core/TaskManager.ts) fakes that interface with no-oppostMessageToWebview/postStateToWebview, and the inline comment says "TheaTask currently expects TheaProvider — well need to update it."It works only because
TheaTaskalso emitsmessageevents (src/core/TheaTask.ts:295,302) that the chat participant subscribes to (src/ux/chat/registerChatParticipant.ts).Problems
partialmessages (registerChatParticipant.ts:127returns early onmessage.partial), so there is no incremental/streaming output in the chat UI — only completed blocks render.Proposed
TaskHost/TaskContextinterface (context, state, mcpHub, event sink) and haveTheaTaskdepend on that instead ofTheaProvider.ChatResponseStream.markdown()(or progress) instead of discarding them.Acceptance
TheaTaskno longer importsTheaProvider.