Skip to content

Commit 76c4567

Browse files
committed
Forward chat/list and chat/open with not_supported error envelope
1 parent 551c831 commit 76c4567

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

src/bridge/outbound-handler.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,32 @@ export async function handleOutbound(
222222
}
223223
break;
224224

225+
// --- Chat resume picker (not available in web — respond cleanly) ---
226+
//
227+
// The remote ECA server doesn't expose REST endpoints for
228+
// `chat/list` (would need a JSON-RPC method that lists persisted
229+
// chats with summary metadata) or `chat/open` (which depends on
230+
// the server's notification cascade — `chat/cleared` +
231+
// `chat/opened` + `chat/contentReceived` — that the SSE channel
232+
// doesn't replay on demand). Return an error envelope on both
233+
// so the webview's resume picker sees `result.error` and stays
234+
// hidden — `listChats` thunk handles this by setting
235+
// `resumableChats = []`, which hides the resume-hint affordance
236+
// entirely. Users on the web client just don't see the picker,
237+
// rather than seeing a broken affordance that times out.
238+
case 'chat/list':
239+
case 'chat/open':
240+
if (data.requestId) {
241+
dispatch(type, {
242+
requestId: data.requestId,
243+
error: {
244+
code: 'not_supported',
245+
message: 'Resuming previous chats is not available in the web client.',
246+
},
247+
});
248+
}
249+
break;
250+
225251
// --- Background Jobs ---
226252
case 'jobs/list': {
227253
const jobsResult = await api.jobsList();

0 commit comments

Comments
 (0)