(taskId: string)
| 1244 | }, [listMcpTasks, nextTaskCursor]); |
| 1245 | |
| 1246 | const cancelTask = async (taskId: string) => { |
| 1247 | try { |
| 1248 | const response = await cancelMcpTask(taskId); |
| 1249 | setTasks((prev) => prev.map((t) => (t.taskId === taskId ? response : t))); |
| 1250 | if (selectedTask?.taskId === taskId) { |
| 1251 | setSelectedTask(response); |
| 1252 | } |
| 1253 | clearError("tasks"); |
| 1254 | } catch (e) { |
| 1255 | setErrors((prev) => ({ |
| 1256 | ...prev, |
| 1257 | tasks: (e as Error).message ?? String(e), |
| 1258 | })); |
| 1259 | } |
| 1260 | }; |
| 1261 | |
| 1262 | const handleRootsChange = async () => { |
| 1263 | await sendNotification({ method: "notifications/roots/list_changed" }); |
nothing calls this directly
no test coverage detected