Problem
oclite TUI renders but is completely non-functional:
- Input disappears on Enter
- No LLM response
- No slash commands work
- No error messages
Root Causes
1. No text streaming event handler
handleEvent in useSDKEvents.ts doesn't handle text streaming events. The reducer has STREAM_TEXT action but nothing dispatches it.
2. Session init errors swallowed
initSession().catch(console.error)// Errors hidden from user
3. Race condition on submit
User can press Enter before state.session.id is set - message lost silently.
4. Event subscription failures silent
If SSE connection fails, no feedback to user.
Required Fixes
1. Add text streaming handler in useSDKEvents.ts:
case"message.part.updated":
if(event.properties.part?.type==="text"){dispatch({type: "STREAM_TEXT",payload: event.properties.part.text||"",})}// ... existing tool handling2. Show session init errors in UI
3. Guard handleSubmit when session not ready
4. Show event stream errors in UI
Files
packages/opencode/src/cli/ink/hooks/useSDKEvents.tspackages/opencode/src/cli/ink/App.tsx
Problem
oclite TUI renders but is completely non-functional:
Root Causes
1. No text streaming event handler
handleEventinuseSDKEvents.tsdoesn't handle text streaming events. The reducer hasSTREAM_TEXTaction but nothing dispatches it.2. Session init errors swallowed
3. Race condition on submit
User can press Enter before
state.session.idis set - message lost silently.4. Event subscription failures silent
If SSE connection fails, no feedback to user.
Required Fixes
1. Add text streaming handler in useSDKEvents.ts:
2. Show session init errors in UI
3. Guard handleSubmit when session not ready
4. Show event stream errors in UI
Files
packages/opencode/src/cli/ink/hooks/useSDKEvents.tspackages/opencode/src/cli/ink/App.tsx