peppa/apps/web/components/ChatSwitch.tsx
peppa-bot e8247924c6 PEP-207: чаты — понятно, что от меня нужно, и это можно сделать на месте
Агент не меняет статус принятой задачи (причина противоречия в PEP-204);
«Посмотреть результат» / «Принять» / «Поправить» в сообщении «готово»;
переписка сверху вниз с полем ввода внизу; строка состояния вместо служебных
сообщений; компактные события; очистка «Всех событий»; выбор проекта списком;
«Задача описана. Начать работу?».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 00:30:02 +05:00

21 lines
762 B
TypeScript

"use client";
// PEP-207: the project of the chats is picked from a list on top, not from a row of tabs that
// doesn't fit on a phone.
import { useRouter } from "next/navigation";
import { useT } from "@/components/I18n";
import { NativeSelect } from "@/components/ui/input";
export function ChatSwitch({ current, options }: { current: string; options: Array<{ slug: string; label: string }> }) {
const router = useRouter();
const t = useT();
return (
<NativeSelect aria-label={t("Проект")} value={current} onChange={(e) => router.push(`/chats/${e.target.value}?list=1`)} className="h-9 w-full">
{options.map((o) => (
<option key={o.slug} value={o.slug}>
{o.label}
</option>
))}
</NativeSelect>
);
}