import { useState } from "react";
import { useConsole } from "../../context";
import { Bar } from "../../components/ui";
import { TRACE_TERMINAL } from "../../api/types";
// Detail actions + fork only. Continue/followup input lives in
// ContinuePanel (shared ChatInput), not in a second form here.
export default function DetailActions() {
const ctx = useConsole();
const t = ctx.currentTask;
const [forkMsg, setForkMsg] = useState("");
if (!t) return null;
const terminal = TRACE_TERMINAL.includes(t.status);
const retryOk = ["failed", "interrupted", "merge-failed"].includes(t.status);
// 旁聊(Muse 角色对齐 P2):无 worktree/分支,后端 /fork /merge
// /pr 一律 409,这里只留重试/取消/查成本,不渲染那三处入口。
const isSide = t.kind === "side";
return (
<>