Fix tool call results not reaching client - return actual service result in SSE HTTP response
- SSE handler was returning generic status message instead of actual service result - Extract actualResult from service response (same as regular HTTP handler) - Tool calls now return proper content including screen execution results - Fixes issue where tools worked but results didn't reach opencode client
Showing
1 changed file
with
3 additions
and
1 deletions
| ... | @@ -537,7 +537,9 @@ try { | ... | @@ -537,7 +537,9 @@ try { |
| 537 | response.writer.write(JsonOutput.toJson([ | 537 | response.writer.write(JsonOutput.toJson([ |
| 538 | jsonrpc: "2.0", | 538 | jsonrpc: "2.0", |
| 539 | id: rpcRequest.id, | 539 | id: rpcRequest.id, |
| 540 | result: [status: "processed", sessionId: sessionId, architecture: "Visit-based"] | 540 | // Extract actual result from service response (same as regular handler) |
| 541 | def actualResult = result?.result ?: result | ||
| 542 | result: actualResult | ||
| 541 | ])) | 543 | ])) |
| 542 | 544 | ||
| 543 | } catch (Exception e) { | 545 | } catch (Exception e) { | ... | ... |
-
Please register or sign in to post a comment