forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
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 user3. 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels