(taskId)
| 108 | } |
| 109 | |
| 110 | async function refreshTask(taskId) { |
| 111 | if (!taskId) return |
| 112 | try { |
| 113 | const response = await taskerApi.fetchTaskDetail(taskId) |
| 114 | if (response?.task) { |
| 115 | upsertTask(response.task) |
| 116 | } |
| 117 | } catch (error) { |
| 118 | console.error(`刷新任务 ${taskId} 详情失败`, error) |
| 119 | lastError.value = error |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | async function cancelTask(taskId) { |
| 124 | if (!taskId) return |
no test coverage detected