import { useConsole } from "../context"; import { shortId } from "../api/client"; // Left list panel, Muse screenshot style: rounded search on top, a // 主要聊天 section header with a + button, then the task list. The // search input IS the existing task search (id/prompt); the status and // executor filters are kept as a compact row below it — the screenshot // has no filters, but dropping them would cut functionality, so they // stay, just compact. List rows show the prompt truncated on one line // with a status dot, short id, status and executor below it; the // selected row is highlighted grey, as in the screenshot. export default function TaskListSection({ onNew }: { onNew: () => void }) { const ctx = useConsole(); return (
ctx.setSearchText(e.target.value)} />
主要聊天
{ctx.taskCountText}
{ctx.taskError ?
{ctx.taskError}
: !ctx.projectId ?
先选项目
: ctx.filteredTasks.length === 0 ?
{ctx.tasks.length ? "没有符合筛选条件的任务" : "该项目暂无任务"}
: ( )}
); }