Unified · Split
| @@ -230,6 +230,7 @@ export function ResumeApprovalPageView(props: { · 229 unmodified lines | |||
| 230 | const busy = status.state === "submitting"; | 230 | const busy = status.state === "submitting"; |
| 231 | const done = status.state === "done"; | 231 | const done = status.state === "done"; |
| 232 | const canSubmit = Boolean(displayedPaused) && !busy && !done; | 232 | const canSubmit = Boolean(displayedPaused) && !busy && !done; |
| 233 | const unavailable = !nextPaused && AsyncResult.isFailure(paused); | ||
| 233 | 234 | ||
| 234 | return ( | 235 | return ( |
| 235 | <main className="flex min-h-full items-center justify-center bg-background px-4 py-8"> | 236 | <main className="flex min-h-full items-center justify-center bg-background px-4 py-8"> |
| @@ -240,12 +241,14 @@ export function ResumeApprovalPageView(props: { · 4 unmodified lines | |||
| 240 | </div> | 241 | </div> |
| 241 | <div className="min-w-0 flex-1"> | 242 | <div className="min-w-0 flex-1"> |
| 242 | <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground"> | 243 | <p className="text-xs font-medium uppercase tracking-wider text-muted-foreground"> |
| 243 | User approval required | 244 | {unavailable ? "Resume execution" : "User approval required"} |
| 244 | </p> | 245 | </p> |
| 245 | <h1 className="mt-1 text-xl font-semibold text-foreground">Resume execution</h1> | 246 | <h1 className="mt-1 text-xl font-semibold text-foreground">Resume execution</h1> |
| 246 | <p className="mt-2 text-sm leading-6 text-muted-foreground"> | 247 | {!unavailable && ( |
| 247 | A paused tool call is waiting for your decision before it can continue. | 248 | <p className="mt-2 text-sm leading-6 text-muted-foreground"> |
| 248 | </p> | 249 | A paused tool call is waiting for your decision before it can continue. |
| 250 | </p> | ||
| 251 | )} | ||
| 249 | </div> | 252 | </div> |
| 250 | </div> | 253 | </div> |
| 251 | 254 | ||
| @@ -294,7 +297,11 @@ export function ResumeApprovalPageView(props: { · 42 unmodified lines | |||
| 294 | <span className="text-xs font-medium text-muted-foreground">Execution </span> | 297 | <span className="text-xs font-medium text-muted-foreground">Execution </span> |
| 295 | <code className="break-all font-mono text-xs text-foreground">{shortExecutionId}</code> | 298 | <code className="break-all font-mono text-xs text-foreground">{shortExecutionId}</code> |
| 296 | </div> | 299 | </div> |
| 297 | {done ? ( | 300 | {unavailable ? ( |
| 301 | <Button type="button" asChild> | ||
| 302 | <a href="/">Go home</a> | ||
| 303 | </Button> | ||
| 304 | ) : done ? ( | ||
| 298 | <CopyButton | 305 | <CopyButton |
| 299 | value={returnPrompt[status.action]} | 306 | value={returnPrompt[status.action]} |
| 300 | label="Copy prompt" | 307 | label="Copy prompt" |