From eba98f9754fd3cf3f77618a10ac1d3f9527080c4 Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 14:57:56 +0000 Subject: [PATCH 01/12] feat(delivery): a conversation setting for what a limited seat does The orchestrator lineup footer gains "When a seat is limited" beside Critique round and Participants' access, on the same Select: Swap automatically (the default), Ask me, Leave it out. It is saved on the conversation's lineup, so it is read at the start of each turn and applies from the next message. A new conversation starts from the team profile's whenSeatLimited when the engine serves one. A board task's conversation does not show the control: its team's own setting decides there. Co-Authored-By: Claude Fable 5.2 --- apps/web/src/components/chat/ChatComposer.tsx | 4 ++ .../src/components/chat/useComposerSend.ts | 1 + .../delivery/OrchestratorChatSetup.tsx | 1 + .../OrchestratorLineup.browser.test.tsx | 41 +++++++++++++ .../delivery/OrchestratorLineup.tsx | 7 +++ .../delivery/OrchestratorParticipants.tsx | 60 ++++++++++++++++++- apps/web/src/i18n/translations/de.json | 5 ++ apps/web/src/i18n/translations/en.json | 5 ++ apps/web/src/i18n/translations/es.json | 5 ++ apps/web/src/i18n/translations/fr.json | 5 ++ apps/web/src/i18n/translations/ja.json | 5 ++ apps/web/src/i18n/translations/ko.json | 5 ++ apps/web/src/i18n/translations/pt-BR.json | 5 ++ apps/web/src/i18n/translations/ru.json | 5 ++ apps/web/src/i18n/translations/sv.json | 5 ++ apps/web/src/i18n/translations/zh.json | 5 ++ apps/web/src/lib/delivery.ts | 6 ++ apps/web/src/lib/orchestratorChat.test.ts | 26 ++++++++ apps/web/src/lib/orchestratorChat.ts | 8 ++- apps/web/src/state/delivery.ts | 3 + packages/contracts/src/delivery.ts | 10 ++++ 21 files changed, 215 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index be7b073fc2c50..662836edf2b9a 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -63,6 +63,7 @@ import { EnvironmentRequestInvalidError, AuthOrchestrationOperateScope, clampManagedRuntimeMode, + isServerOwnedThreadLineage, ProviderDriverKind, ProviderInstanceId, PROVIDER_SEND_TURN_MAX_ATTACHMENTS, @@ -2750,6 +2751,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) entries={providerInstanceEntries} models={modelOptionsByInstance} onFocusChat={startSingleChatForSeat} + boardOwned={ + activeThread !== undefined && isServerOwnedThreadLineage(activeThread.lineage) + } onLeaveToSingle={() => void switchStartedThreadToSingle()} /> ), diff --git a/apps/web/src/components/chat/useComposerSend.ts b/apps/web/src/components/chat/useComposerSend.ts index 41019aae9cff3..d66050caa7c1d 100644 --- a/apps/web/src/components/chat/useComposerSend.ts +++ b/apps/web/src/components/chat/useComposerSend.ts @@ -1076,6 +1076,7 @@ export function useComposerSend(input: ComposerSendInput) { entries: providerInstanceEntries, critique: orchestratorDraft.critique, access: orchestratorDraft.access, + limitedSeat: orchestratorDraft.limitedSeat, extras: orchestratorDraft.extraParticipants, orchestrator: { harness: ctxSelectedProvider diff --git a/apps/web/src/components/delivery/OrchestratorChatSetup.tsx b/apps/web/src/components/delivery/OrchestratorChatSetup.tsx index 95ad77522d1b9..bf053eea8ff71 100644 --- a/apps/web/src/components/delivery/OrchestratorChatSetup.tsx +++ b/apps/web/src/components/delivery/OrchestratorChatSetup.tsx @@ -71,6 +71,7 @@ export function OrchestratorChatSetup(props: { entries: props.entries, critique: draft?.critique, access: draft?.access, + limitedSeat: draft?.limitedSeat, extras: draft?.extraParticipants, orchestrator: { harness: leadEntry ? (DELIVERY_HARNESS_BY_DRIVER[leadEntry.driverKind] ?? null) : null, diff --git a/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx b/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx index c8b9866845c40..f055651dbf3ed 100644 --- a/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx +++ b/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx @@ -443,3 +443,44 @@ it("saves reasoning and context window together in the participant model selecti ); await expect.element(scout.getByRole("button", { name: /Maximum/ })).toBeVisible(); }); + +it("saves what a limited seat does from the footer, and leaves the control off a board task", async () => { + testState.threadState = { + data: { binding: RESEARCH_BINDING, lineup: LINEUP_OF_THREE, pending: null }, + }; + testState.setLineup.mockClear(); + await using screen = await render( + , + ); + + const control = page.getByRole("combobox", { name: "When a seat is limited" }); + await expect.element(control).toHaveTextContent("Swap automatically"); + await control.click(); + await page.getByRole("option", { name: "Ask me" }).click(); + await vi.waitFor(() => { + expect(testState.setLineup).toHaveBeenCalledWith({ + environmentId: "env-a", + input: { threadId: "t1", orchestration: { ...LINEUP_OF_THREE, limitedSeat: "ask" } }, + }); + }); + await expect.element(control).toHaveTextContent("Ask me"); + + await screen.rerender( + , + ); + await expect.element(control).not.toBeInTheDocument(); + await expect.element(page.getByRole("combobox", { name: "Critique round" })).toBeInTheDocument(); +}); diff --git a/apps/web/src/components/delivery/OrchestratorLineup.tsx b/apps/web/src/components/delivery/OrchestratorLineup.tsx index cc79ab1bc83dc..8db9889279fb4 100644 --- a/apps/web/src/components/delivery/OrchestratorLineup.tsx +++ b/apps/web/src/components/delivery/OrchestratorLineup.tsx @@ -1,5 +1,6 @@ import { DELIVERY_HARNESS_BY_DRIVER, + deliveryLimitedSeatPolicy, type DeliveryOrchestrationConfig, type EnvironmentId, type ModelSelection, @@ -60,6 +61,8 @@ function valueOfLineup( })), ...(lineup.critique ? { critique: lineup.critique } : {}), ...(lineup.access ? { access: lineup.access } : {}), + // A started conversation keeps its own answer; the team's default is for new ones. + limitedSeat: deliveryLimitedSeatPolicy(lineup), }; } @@ -81,6 +84,8 @@ export function OrchestratorLineup(props: { readonly role: string; readonly modelSelection: ModelSelection; }) => void; + /** A board task's conversation, where the team's own setting decides for a limited seat. */ + readonly boardOwned?: boolean | undefined; /** Leaves the team for ordinary chat; the composer remembers it server-side. */ readonly onLeaveToSingle?: () => void; }) { @@ -119,6 +124,7 @@ export function OrchestratorLineup(props: { entries: props.entries, critique: forValue.critique, access: forValue.access, + limitedSeat: forValue.limitedSeat, extras: forValue.extraParticipants, orchestrator: { harness: @@ -227,6 +233,7 @@ export function OrchestratorLineup(props: { roster={roster} entries={props.entries} models={props.models} + boardOwned={props.boardOwned} {...(props.onFocusChat ? { onFocus: props.onFocusChat } : {})} {...(binding ? { about: "A conversation keeps the team it started with." } : {})} {...(lineup && props.onLeaveToSingle diff --git a/apps/web/src/components/delivery/OrchestratorParticipants.tsx b/apps/web/src/components/delivery/OrchestratorParticipants.tsx index b7538f0b31952..c357d16edf68e 100644 --- a/apps/web/src/components/delivery/OrchestratorParticipants.tsx +++ b/apps/web/src/components/delivery/OrchestratorParticipants.tsx @@ -6,7 +6,16 @@ import type { } from "@t3tools/contracts"; import { DELIVERY_HARNESS_BY_DRIVER } from "@t3tools/contracts"; import { createModelSelection } from "@t3tools/shared/model"; -import { CrownIcon, MessageCircleIcon, PlusIcon, RepeatIcon, Undo2Icon, XIcon } from "lucide-react"; +import { useGT } from "gt-react"; +import { + CrownIcon, + GaugeIcon, + MessageCircleIcon, + PlusIcon, + RepeatIcon, + Undo2Icon, + XIcon, +} from "lucide-react"; import type { ReactNode } from "react"; import { cn } from "~/lib/utils"; import type { DeliveryTeam } from "../../lib/delivery"; @@ -14,6 +23,7 @@ import type { OrchestratorAccess, OrchestratorCritique, OrchestratorExtraParticipant, + OrchestratorLimitedSeat, OrchestratorParticipantAccess, OrchestratorParticipantChoice, resolveOrchestratorRoster, @@ -51,6 +61,7 @@ export interface OrchestratorLineupValue { readonly extraParticipants?: ReadonlyArray; readonly critique?: OrchestratorCritique; readonly access?: OrchestratorAccess | undefined; + readonly limitedSeat?: OrchestratorLimitedSeat | undefined; } /** The participants of a team conversation, with its critique round and access. */ @@ -73,12 +84,24 @@ export function OrchestratorParticipants(props: { readonly onFocus?: | ((row: { readonly role: string; readonly modelSelection: ModelSelection }) => void) | undefined; + /** A board task's conversation: its team's own setting decides what a limited seat does. */ + readonly boardOwned?: boolean | undefined; /** What the owning panel adds to the explanation behind the info button. */ readonly about?: ReactNode; /** The owning panel's own action, at the end of the footer row. */ readonly footer?: ReactNode; }) { + const gt = useGT(); const { team, value, roster } = props; + const limitedSeatOptions: ReadonlyArray<{ + readonly value: OrchestratorLimitedSeat; + readonly label: string; + }> = [ + { value: "swap", label: gt("Swap automatically") }, + { value: "ask", label: gt("Ask me") }, + { value: "skip", label: gt("Leave it out") }, + ]; + const limitedSeatLabel = gt("When a seat is limited"); const entries = props.entries.filter((entry) => DELIVERY_HARNESS_BY_DRIVER[entry.driverKind]); const models = new Map(props.models); for (const row of roster.rows) { @@ -145,6 +168,14 @@ export function OrchestratorParticipants(props: { edit, commit, push and post. A participant's own access, set beside it, comes first, and a seat the team keeps read-only stays read-only unless you change it here. + {props.boardOwned ? null : ( + + {limitedSeatLabel}: + {gt( + "a seat whose model has reached its usage limit moves to the first free model in your Favorites, waits for you to choose, or sits the message out. It applies from your next message. A model you chose for a seat by hand is never swapped without asking.", + )} + + )}
@@ -474,6 +505,33 @@ export function OrchestratorParticipants(props: { ))} + {props.boardOwned ? null : ( + + )} {props.footer ? {props.footer} : null}
{roster.problem ? ( diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index a78cbae36068a..fbb1e9435f7d8 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -5249,6 +5249,11 @@ "1906276908851026": "Die Bereitstellungsverknüpfung des Boards fehlt oder ist nicht mehr gültig.", "8b6d0952fdc89d82": "Repository nicht bei der Engine registriert", "bcea9e841c892321": "Registriere das Repository des Boards bei der Engine, bevor du eine Bereitstellung verknüpfst.", + "9d9fc700a3511518": "Automatisch wechseln", + "1e45ab6154dd542f": "Mich fragen", + "2ef682d5c194431e": "Auslassen", + "3d79bb50390a59bd": "Wenn ein Platz limitiert ist", + "718bee1b985e1e6b": "ein Platz, dessen Modell sein Nutzungslimit erreicht hat, wechselt zum ersten freien Modell in deinen Favoriten, wartet auf deine Entscheidung oder setzt bei der Nachricht aus. Das gilt ab deiner nächsten Nachricht. Ein Modell, das du für einen Platz von Hand gewählt hast, wird nie ohne Rückfrage gewechselt.", "a7ce372eaf721f33": "{count, plural, one {Eine Frage an dich} other {{count} Fragen an dich}}", "e30c38e983fbfbd4": "{count, plural, one {Eine Änderung zu bestätigen} other {{count} Änderungen zu bestätigen}}", "d12dc4f286a5ebde": "Wartet auf deine Freigabe. Genehmigt von {names}.", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index cadb6c9682c8c..71989a08240a0 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -5249,6 +5249,11 @@ "1906276908851026": "The board's deployment link is missing or no longer valid.", "8b6d0952fdc89d82": "Repository not registered with the engine", "bcea9e841c892321": "Register the board's repository with the engine before linking a deployment.", + "9d9fc700a3511518": "Swap automatically", + "1e45ab6154dd542f": "Ask me", + "2ef682d5c194431e": "Leave it out", + "3d79bb50390a59bd": "When a seat is limited", + "718bee1b985e1e6b": "a seat whose model has reached its usage limit moves to the first free model in your Favorites, waits for you to choose, or sits the message out. It applies from your next message. A model you chose for a seat by hand is never swapped without asking.", "a7ce372eaf721f33": "{count, plural, one {A question for you} other {{count} questions for you}}", "e30c38e983fbfbd4": "{count, plural, one {A change to confirm} other {{count} changes to confirm}}", "d12dc4f286a5ebde": "Waiting for your sign-off. {names} approved.", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 43221088433c0..7464c76d35975 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -5247,6 +5247,11 @@ "1906276908851026": "El vínculo de despliegue del tablero falta o ya no es válido.", "8b6d0952fdc89d82": "Repositorio no registrado en el motor", "bcea9e841c892321": "Registra el repositorio del tablero en el motor antes de vincular un despliegue.", + "9d9fc700a3511518": "Cambiar automáticamente", + "1e45ab6154dd542f": "Preguntarme", + "2ef682d5c194431e": "Dejarlo fuera", + "3d79bb50390a59bd": "Cuando un puesto alcanza su límite", + "718bee1b985e1e6b": "un puesto cuyo modelo alcanzó su límite de uso pasa al primer modelo libre de tus Favoritos, espera a que elijas o no participa en el mensaje. Se aplica desde tu próximo mensaje. Un modelo que elegiste a mano para un puesto nunca se cambia sin preguntar.", "a7ce372eaf721f33": "{count, plural, one {Una pregunta para ti} other {{count} preguntas para ti}}", "e30c38e983fbfbd4": "{count, plural, one {Un cambio por confirmar} other {{count} cambios por confirmar}}", "d12dc4f286a5ebde": "Esperando tu aprobación. Aprobado por {names}.", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 56d9ba529d20b..a8061bf8f7e43 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -5248,6 +5248,11 @@ "1906276908851026": "Le lien de déploiement du tableau est absent ou n'est plus valide.", "8b6d0952fdc89d82": "Dépôt non enregistré auprès du moteur", "bcea9e841c892321": "Enregistrez le dépôt du tableau auprès du moteur avant de lier un déploiement.", + "9d9fc700a3511518": "Remplacer automatiquement", + "1e45ab6154dd542f": "Me demander", + "2ef682d5c194431e": "Le laisser de côté", + "3d79bb50390a59bd": "Quand un siège est limité", + "718bee1b985e1e6b": "un siège dont le modèle a atteint sa limite d'utilisation passe au premier modèle libre de vos Favoris, attend votre choix ou ne participe pas au message. Cela s'applique à partir de votre prochain message. Un modèle que vous avez choisi à la main pour un siège n'est jamais remplacé sans demander.", "a7ce372eaf721f33": "{count, plural, one {Une question pour vous} other {{count} questions pour vous}}", "e30c38e983fbfbd4": "{count, plural, one {Une modification à confirmer} other {{count} modifications à confirmer}}", "d12dc4f286a5ebde": "En attente de votre validation. Approuvé par {names}.", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 58b37026d557d..882e75d582a9e 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -5234,6 +5234,11 @@ "1906276908851026": "ボードのデプロイリンクがないか、もう有効ではありません。", "8b6d0952fdc89d82": "リポジトリがエンジンに登録されていません", "bcea9e841c892321": "デプロイをリンクする前に、ボードのリポジトリをエンジンに登録してください。", + "9d9fc700a3511518": "自動で切り替える", + "1e45ab6154dd542f": "確認する", + "2ef682d5c194431e": "参加させない", + "3d79bb50390a59bd": "席が制限に達したとき", + "718bee1b985e1e6b": "モデルが使用制限に達した席は、お気に入りの中で最初に空いているモデルに切り替わるか、あなたの選択を待つか、そのメッセージには参加しません。次のメッセージから適用されます。あなたが手動で選んだ席のモデルは、確認なしに切り替わることはありません。", "a7ce372eaf721f33": "{count, plural, other {あなたへの質問が{count}件}}", "e30c38e983fbfbd4": "{count, plural, other {確認待ちの変更が{count}件}}", "d12dc4f286a5ebde": "あなたの承認待ちです。{names} が承認済みです。", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index d0b8a743bd720..b4a449daeda04 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -5231,6 +5231,11 @@ "1906276908851026": "보드의 배포 연결이 없거나 더 이상 유효하지 않습니다.", "8b6d0952fdc89d82": "저장소가 엔진에 등록되지 않음", "bcea9e841c892321": "배포를 연결하기 전에 보드의 저장소를 엔진에 등록하세요.", + "9d9fc700a3511518": "자동으로 교체", + "1e45ab6154dd542f": "나에게 묻기", + "2ef682d5c194431e": "제외하기", + "3d79bb50390a59bd": "자리가 한도에 도달했을 때", + "718bee1b985e1e6b": "모델이 사용 한도에 도달한 자리는 즐겨찾기에서 처음으로 사용 가능한 모델로 옮기거나, 선택을 기다리거나, 해당 메시지에서 빠집니다. 다음 메시지부터 적용됩니다. 자리에 직접 고른 모델은 묻지 않고 교체되지 않습니다.", "a7ce372eaf721f33": "{count, plural, other {질문 {count}개가 답변을 기다리고 있습니다}}", "e30c38e983fbfbd4": "{count, plural, other {확인할 변경 사항 {count}개}}", "d12dc4f286a5ebde": "내 승인을 기다리는 중입니다. {names} 님이 승인했습니다.", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index e56ec30d7efb0..6694d7c76c4dd 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -5247,6 +5247,11 @@ "1906276908851026": "O vínculo de implantação do quadro está ausente ou não é mais válido.", "8b6d0952fdc89d82": "Repositório não registrado no motor", "bcea9e841c892321": "Registre o repositório do quadro no motor antes de vincular uma implantação.", + "9d9fc700a3511518": "Trocar automaticamente", + "1e45ab6154dd542f": "Perguntar para mim", + "2ef682d5c194431e": "Deixar de fora", + "3d79bb50390a59bd": "Quando um assento atinge o limite", + "718bee1b985e1e6b": "um assento cujo modelo atingiu o limite de uso passa para o primeiro modelo livre dos seus Favoritos, espera você escolher ou fica fora da mensagem. Vale a partir da sua próxima mensagem. Um modelo que você escolheu à mão para um assento nunca é trocado sem perguntar.", "a7ce372eaf721f33": "{count, plural, one {Uma pergunta para você} other {{count} perguntas para você}}", "e30c38e983fbfbd4": "{count, plural, one {Uma alteração para confirmar} other {{count} alterações para confirmar}}", "d12dc4f286a5ebde": "Aguardando sua aprovação. Aprovado por {names}.", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 9e0f129145336..33806fa80bc53 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -5247,6 +5247,11 @@ "1906276908851026": "Привязка развёртывания доски отсутствует или больше не действительна.", "8b6d0952fdc89d82": "Репозиторий не зарегистрирован в движке", "bcea9e841c892321": "Зарегистрируйте репозиторий доски в движке, прежде чем привязывать развёртывание.", + "9d9fc700a3511518": "Заменять автоматически", + "1e45ab6154dd542f": "Спрашивать меня", + "2ef682d5c194431e": "Пропускать", + "3d79bb50390a59bd": "Когда место достигло лимита", + "718bee1b985e1e6b": "место, модель которого достигла лимита использования, переходит на первую свободную модель из вашего Избранного, ждёт вашего выбора или пропускает сообщение. Действует со следующего сообщения. Модель, которую вы выбрали для места вручную, никогда не заменяется без вопроса.", "a7ce372eaf721f33": "{count, plural, one {{count} вопрос к вам} few {{count} вопроса к вам} many {{count} вопросов к вам} other {{count} вопроса к вам}}", "e30c38e983fbfbd4": "{count, plural, one {{count} изменение для подтверждения} few {{count} изменения для подтверждения} many {{count} изменений для подтверждения} other {{count} изменения для подтверждения}}", "d12dc4f286a5ebde": "Ждёт вашего согласования. Одобрено: {names}.", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index e5e48d2ba7e36..d583dd0a9b1e7 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -5248,6 +5248,11 @@ "1906276908851026": "Tavlans driftsättningslänk saknas eller är inte längre giltig.", "8b6d0952fdc89d82": "Arkivet är inte registrerat i motorn", "bcea9e841c892321": "Registrera tavlans arkiv i motorn innan du länkar en driftsättning.", + "9d9fc700a3511518": "Byt automatiskt", + "1e45ab6154dd542f": "Fråga mig", + "2ef682d5c194431e": "Utelämna", + "3d79bb50390a59bd": "När en plats är begränsad", + "718bee1b985e1e6b": "en plats vars modell har nått sin användningsgräns går över till den första lediga modellen i dina Favoriter, väntar på ditt val eller står över meddelandet. Det gäller från ditt nästa meddelande. En modell som du själv har valt för en plats byts aldrig utan att fråga.", "a7ce372eaf721f33": "{count, plural, one {En fråga till dig} other {{count} frågor till dig}}", "e30c38e983fbfbd4": "{count, plural, one {En ändring att bekräfta} other {{count} ändringar att bekräfta}}", "d12dc4f286a5ebde": "Väntar på ditt godkännande. Godkänd av {names}.", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 3a81d633db38b..6a572cc2c7cc8 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -5254,6 +5254,11 @@ "1906276908851026": "看板的部署链接缺失或已失效。", "8b6d0952fdc89d82": "仓库未在引擎中注册", "bcea9e841c892321": "链接部署前,请先在引擎中注册看板的仓库。", + "9d9fc700a3511518": "自动切换", + "1e45ab6154dd542f": "询问我", + "2ef682d5c194431e": "将其排除", + "3d79bb50390a59bd": "当席位达到限额时", + "718bee1b985e1e6b": "模型已达使用限额的席位会改用收藏夹中第一个空闲的模型、等待你选择,或不参与这条消息。从你的下一条消息开始生效。你为席位手动选择的模型绝不会未经询问就被替换。", "a7ce372eaf721f33": "{count, plural, other {有 {count} 个问题等你回答}}", "e30c38e983fbfbd4": "{count, plural, other {有 {count} 项更改待确认}}", "d12dc4f286a5ebde": "等待你签批。{names} 已批准。", diff --git a/apps/web/src/lib/delivery.ts b/apps/web/src/lib/delivery.ts index f5b14731a3942..e11268a389c80 100644 --- a/apps/web/src/lib/delivery.ts +++ b/apps/web/src/lib/delivery.ts @@ -7,15 +7,18 @@ import { DELIVERY_DEFAULT_TEAM, DELIVERY_HARNESS_BY_DRIVER, + DeliveryLimitedSeatPolicy, type DeliveryThreadBinding, type BoardDeploymentLink, type MergePermissionView, type TaskDeployment, } from "@t3tools/contracts"; +import * as Schema from "effect/Schema"; import { parseSuggestedBoard, type SuggestedBoard } from "./deliveryMove"; import { parseBoardDeployment, parseMergePermission, parseTaskDeployment } from "./boardDelivery"; type Json = Record; +const isLimitedSeatPolicy = Schema.is(DeliveryLimitedSeatPolicy); const isRecord = (value: unknown): value is Json => typeof value === "object" && value !== null && !Array.isArray(value); const text = (value: unknown, fallback = ""): string => @@ -81,6 +84,8 @@ export interface DeliveryTeam { readonly defined: Readonly>; }; readonly qaGate: { readonly seats: ReadonlyArray; readonly minimum: number } | null; + /** What the team's profile says a new conversation does when a seat is limited, if it says. */ + readonly whenSeatLimited: DeliveryLimitedSeatPolicy | null; } export interface DeliveryRole { @@ -495,6 +500,7 @@ const parseTeam = (team: Json): DeliveryTeam => { }, workload: { build: shares(workload.build), defined: shares(workload.defined) }, qaGate: qa ? { seats: strings(qa.seats), minimum: count(qa.minimumPassingProviders) } : null, + whenSeatLimited: isLimitedSeatPolicy(team.whenSeatLimited) ? team.whenSeatLimited : null, }; }; diff --git a/apps/web/src/lib/orchestratorChat.test.ts b/apps/web/src/lib/orchestratorChat.test.ts index e05427822dea0..d0b2834963c82 100644 --- a/apps/web/src/lib/orchestratorChat.test.ts +++ b/apps/web/src/lib/orchestratorChat.test.ts @@ -506,3 +506,29 @@ it("does not put a held retry back on the roster it failed with once a newer lin }), ).toEqual({ source: "held", orchestration: heldOrchestration }); }); + +it("takes what a limited seat does from the person, then the team's profile, then swaps", () => { + const { team, entries } = setup(); + const resolve = ( + forTeam: typeof team, + limitedSeat?: "swap" | "ask" | "skip", + ): DeliveryOrchestrationConfig | null => + resolveOrchestratorRoster({ team: forTeam, choices: undefined, entries, limitedSeat }) + .configuration; + + // Swap automatically is the default, and the default is not written down. + expect(resolve(team)).not.toHaveProperty("limitedSeat"); + const asks = { ...team, whenSeatLimited: "ask" as const }; + expect(resolve(asks)?.limitedSeat).toBe("ask"); + expect(resolve(asks, "skip")?.limitedSeat).toBe("skip"); + // A person's own "swap" stands against a team that asks. + expect(resolve(asks, "swap")).not.toHaveProperty("limitedSeat"); +}); + +it("reads the team profile's default for a limited seat, and ignores a value it does not know", () => { + const teamOf = (whenSeatLimited: unknown) => + parseTeams([{ team: "research", available: true, seats: [], whenSeatLimited }])[0]!; + expect(teamOf("skip").whenSeatLimited).toBe("skip"); + expect(teamOf("later").whenSeatLimited).toBeNull(); + expect(teamOf(undefined).whenSeatLimited).toBeNull(); +}); diff --git a/apps/web/src/lib/orchestratorChat.ts b/apps/web/src/lib/orchestratorChat.ts index 8b44cc5714044..95cbe98a1f4d5 100644 --- a/apps/web/src/lib/orchestratorChat.ts +++ b/apps/web/src/lib/orchestratorChat.ts @@ -1,5 +1,6 @@ import { DELIVERY_HARNESS_BY_DRIVER, + type DeliveryLimitedSeatPolicy, type DeliveryOrchestrationConfig, type ModelSelection, } from "@t3tools/contracts"; @@ -34,6 +35,7 @@ export interface OrchestratorExtraParticipant { export type OrchestratorCritique = NonNullable; export type OrchestratorAccess = NonNullable; +export type OrchestratorLimitedSeat = DeliveryLimitedSeatPolicy; export function resolveOrchestratorRoster(input: { readonly team: DeliveryTeam | null; @@ -45,6 +47,8 @@ export function resolveOrchestratorRoster(input: { readonly entries: ReadonlyArray; readonly critique?: OrchestratorCritique | undefined; readonly access?: OrchestratorAccess | undefined; + /** What a person chose for a limited seat; absent, the team's profile decides, else swap. */ + readonly limitedSeat?: OrchestratorLimitedSeat | undefined; readonly extras?: ReadonlyArray | undefined; /** The harness and role the orchestrator itself runs as, when known. */ readonly orchestrator?: { @@ -213,10 +217,12 @@ export function resolveOrchestratorRoster(input: { : selected.length < 2 || selected.length > 12 ? "Choose between 2 and 12 participants." : (selected.find((row) => row.problem)?.problem ?? null); + const limitedSeat = input.limitedSeat ?? input.team?.whenSeatLimited ?? "swap"; const configuration: DeliveryOrchestrationConfig | null = problem ? null : { ...(input.critique && input.critique !== "first" ? { critique: input.critique } : {}), + ...(limitedSeat !== "swap" ? { limitedSeat } : {}), ...(input.access ? { access: input.access } : {}), ...(input.callsTeam ? { team: input.callsTeam } : {}), participants: selected.flatMap((row) => @@ -232,7 +238,7 @@ export function resolveOrchestratorRoster(input: { : [], ), }; - return { rows, configuration, problem }; + return { rows, configuration, problem, limitedSeat }; } /** diff --git a/apps/web/src/state/delivery.ts b/apps/web/src/state/delivery.ts index 83c6dbde4c238..ba91ce123fbc7 100644 --- a/apps/web/src/state/delivery.ts +++ b/apps/web/src/state/delivery.ts @@ -23,6 +23,7 @@ import type { OrchestratorAccess, OrchestratorCritique, OrchestratorExtraParticipant, + OrchestratorLimitedSeat, OrchestratorParticipantChoice, } from "../lib/orchestratorChat"; import { boardPreferencesOf, useBoardStore } from "./deliveryBoard"; @@ -347,6 +348,8 @@ export interface OrchestratorDraft { readonly critique?: OrchestratorCritique; /** The access participants run with; absent is the conversation's own. */ readonly access?: OrchestratorAccess | undefined; + /** When a seat is limited; absent is the team profile's default, else swap automatically. */ + readonly limitedSeat?: OrchestratorLimitedSeat | undefined; /** No team behind the conversation: every participant is added by hand. */ readonly teamless?: boolean; readonly started?: boolean; diff --git a/packages/contracts/src/delivery.ts b/packages/contracts/src/delivery.ts index afbc71f7a106a..0e327fec4cfa2 100644 --- a/packages/contracts/src/delivery.ts +++ b/packages/contracts/src/delivery.ts @@ -4,6 +4,10 @@ import * as Schema from "effect/Schema"; import { ThreadId, TrimmedNonEmptyString } from "./baseSchemas.ts"; import { ModelSelection } from "./modelSelection.ts"; +/** What a conversation does when a seat's model has reached its usage limit. */ +export const DeliveryLimitedSeatPolicy = Schema.Literals(["swap", "ask", "skip"]); +export type DeliveryLimitedSeatPolicy = typeof DeliveryLimitedSeatPolicy.Type; + export const DeliveryOrchestrationConfig = Schema.Struct({ participants: Schema.Array( Schema.Struct({ @@ -16,6 +20,8 @@ export const DeliveryOrchestrationConfig = Schema.Struct({ ).check(Schema.isMinLength(2), Schema.isMaxLength(12)), /** When participants critique each other. Absent means the conversation's first message only. */ critique: Schema.optional(Schema.Literals(["first", "always", "never"])), + /** When a seat is limited. Absent means swap automatically. Read at the start of each turn. */ + limitedSeat: Schema.optional(DeliveryLimitedSeatPolicy), /** The access participants run with. Absent means read-only: what would change something is declined. */ access: Schema.optional(Schema.Literals(["approval-required", "full-access"])), /** The team participants take their roles from, when the conversation itself is bound to none. */ @@ -29,6 +35,10 @@ export const deliveryParticipantAccess = ( seat: string, ) => lineup.participants.find((item) => item.seat === seat)?.access ?? lineup.access ?? "read-only"; +export const deliveryLimitedSeatPolicy = ( + lineup: Pick, +): DeliveryLimitedSeatPolicy => lineup.limitedSeat ?? "swap"; + /** * The team a conversation was switched away from, so one click brings it back. * The lead model is what the thread itself ran while the team was on; restoring From d2eb03fb3d19c2935b2772d809f3009068395c1c Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 15:05:09 +0000 Subject: [PATCH 02/12] feat(settings): Favorites can be put in order Provider settings gain a Favorites order list: the starred models across providers, first choice first, moved by drag or by the step buttons, on the pattern of the microphone order list. The order is what a limited seat's swap follows. Only the order is sent (setModelFavoriteOrder), so a favorite another client starred meanwhile is kept and a removed one is not revived. Co-Authored-By: Claude Fable 5.2 --- .../settings/FavoriteModelsOrderList.tsx | 163 ++++++++++++++++++ .../settings/ProviderSettingsPanel.tsx | 26 +++ .../src/components/settings/settingsSearch.ts | 7 + apps/web/src/i18n/translations/de.json | 6 + apps/web/src/i18n/translations/en.json | 6 + apps/web/src/i18n/translations/es.json | 6 + apps/web/src/i18n/translations/fr.json | 6 + apps/web/src/i18n/translations/ja.json | 6 + apps/web/src/i18n/translations/ko.json | 6 + apps/web/src/i18n/translations/pt-BR.json | 6 + apps/web/src/i18n/translations/ru.json | 6 + apps/web/src/i18n/translations/sv.json | 6 + apps/web/src/i18n/translations/zh.json | 6 + packages/contracts/src/settings.ts | 2 + packages/shared/src/serverSettings.test.ts | 16 ++ packages/shared/src/serverSettings.ts | 20 ++- 16 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/components/settings/FavoriteModelsOrderList.tsx diff --git a/apps/web/src/components/settings/FavoriteModelsOrderList.tsx b/apps/web/src/components/settings/FavoriteModelsOrderList.tsx new file mode 100644 index 0000000000000..cb02daa5f4465 --- /dev/null +++ b/apps/web/src/components/settings/FavoriteModelsOrderList.tsx @@ -0,0 +1,163 @@ +import { + DndContext, + type DragEndEvent, + PointerSensor, + closestCenter, + useSensor, + useSensors, +} from "@dnd-kit/core"; +import { restrictToParentElement, restrictToVerticalAxis } from "@dnd-kit/modifiers"; +import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable"; +import { CSS } from "@dnd-kit/utilities"; +import type { ServerProvider, UnifiedSettings } from "@t3tools/contracts"; +import { useGT } from "gt-react"; +import { ArrowDownIcon, ArrowUpIcon, GripVerticalIcon } from "lucide-react"; +import { useState } from "react"; + +import { cn } from "~/lib/utils"; +import { Button } from "../ui/button"; + +type Favorites = UnifiedSettings["favorites"]; + +const favoriteKey = (favorite: Favorites[number]) => `${favorite.provider}\u0000${favorite.model}`; + +function moveFavorite(favorites: Favorites, key: string, steps: number): Favorites { + const from = favorites.findIndex((favorite) => favoriteKey(favorite) === key); + const to = Math.max(0, Math.min(favorites.length - 1, from + steps)); + if (from === -1 || from === to) return favorites; + const next = [...favorites]; + const [entry] = next.splice(from, 1); + if (!entry) return favorites; + next.splice(to, 0, entry); + return next; +} + +/** The starred models across providers, first choice first. Step buttons serve the keyboard. */ +export function FavoriteModelsOrderList(props: { + readonly favorites: Favorites; + readonly providers: ReadonlyArray; + readonly disabled: boolean; + readonly onReorder: (next: Favorites) => Promise; +}) { + const gt = useGT(); + // The order a person just made, shown until the server's own has been read back. + const [saving, setSaving] = useState(null); + const favorites = saving ?? props.favorites; + const keys = favorites.map(favoriteKey); + const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 4 } })); + const move = (key: string, steps: number) => { + const next = moveFavorite(favorites, key, steps); + if (next === favorites) return; + setSaving(next); + void props + .onReorder(next) + .finally(() => setSaving((current) => (current === next ? null : current))); + }; + const handleDragEnd = (event: DragEndEvent) => { + if (event.over === null || event.active.id === event.over.id) return; + const from = keys.indexOf(String(event.active.id)); + const to = keys.indexOf(String(event.over.id)); + if (from !== -1 && to !== -1) move(String(event.active.id), to - from); + }; + + return ( + + +
    + {favorites.map((favorite, index) => { + const provider = props.providers.find( + (candidate) => candidate.instanceId === favorite.provider, + ); + return ( + model.slug === favorite.model)?.name ?? + favorite.model + } + provider={provider?.displayName ?? favorite.provider} + position={index + 1} + count={favorites.length} + disabled={props.disabled} + onMove={(steps) => move(favoriteKey(favorite), steps)} + /> + ); + })} +
+
+
+ ); +} + +function FavoriteRow(props: { + readonly id: string; + readonly name: string; + readonly provider: string; + readonly position: number; + readonly count: number; + readonly disabled: boolean; + readonly onMove: (steps: number) => void; +}) { + const gt = useGT(); + const { name } = props; + const { listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = + useSortable({ id: props.id, disabled: props.disabled }); + return ( +
  • + {props.position} + + {name} + {props.provider} + + + + + + + + +
  • + ); +} diff --git a/apps/web/src/components/settings/ProviderSettingsPanel.tsx b/apps/web/src/components/settings/ProviderSettingsPanel.tsx index 892c9cd219454..65f4a72587cf7 100644 --- a/apps/web/src/components/settings/ProviderSettingsPanel.tsx +++ b/apps/web/src/components/settings/ProviderSettingsPanel.tsx @@ -1,3 +1,4 @@ +import { FavoriteModelsOrderList } from "./FavoriteModelsOrderList"; import { SettingsGroup } from "./SettingsGroup"; import { RefreshIcon } from "~/components/ui/refresh-icon"; import { @@ -1164,6 +1165,31 @@ export function EnvironmentProviderSettings({ /> ) : null} + + +
    + {favorites.length === 0 ? ( +

    + Star a model in a provider's model list to add it here. +

    + ) : ( + updateModelPreferences({ setModelFavoriteOrder: next })} + /> + )} +
    +
    +
    + { ).toEqual([]); }); + it("reorders favorites without dropping one another client added or reviving a removed one", () => { + const favorite = (model: string) => ({ provider, model }); + const three = applyServerSettingsPatch(DEFAULT_SERVER_SETTINGS, { + setModelFavorites: ["sol", "astra", "luna"].map((model) => ({ + provider, + model, + favorite: true, + })), + }); + // This client last saw sol and astra, plus terra, which was unstarred since. + const reordered = applyServerSettingsPatch(three, { + setModelFavoriteOrder: [favorite("astra"), favorite("terra"), favorite("sol")], + }); + expect(reordered.favorites).toEqual([favorite("astra"), favorite("sol"), favorite("luna")]); + }); + it("keeps the same model on different provider instances as separate favorites", () => { const otherProvider = ProviderInstanceId.make("codex_personal"); const first = applyServerSettingsPatch(DEFAULT_SERVER_SETTINGS, { diff --git a/packages/shared/src/serverSettings.ts b/packages/shared/src/serverSettings.ts index 3085c1fd1b9a1..4409ebd3d362b 100644 --- a/packages/shared/src/serverSettings.ts +++ b/packages/shared/src/serverSettings.ts @@ -392,6 +392,7 @@ export function applyServerSettingsPatch( const { migrateModelPreferences, setModelFavorites, + setModelFavoriteOrder, setModelsHidden, setProviderModelOrder, providerModelPreferences, @@ -452,7 +453,7 @@ export function applyServerSettingsPatch( : undefined; const initialFavorites = patch.favorites ?? current.favorites ?? migrateModelPreferences?.favorites ?? null; - const favorites = + const toggledFavorites = setModelFavorites?.reduce( (current, change) => { const exists = current.some( @@ -468,6 +469,23 @@ export function applyServerSettingsPatch( }, [...(initialFavorites ?? [])], ) ?? initialFavorites; + // Only an order is sent, so a favorite another client added meanwhile is kept, not dropped. + const favorites = + setModelFavoriteOrder && toggledFavorites + ? [ + ...setModelFavoriteOrder.flatMap((entry) => + toggledFavorites.filter( + (favorite) => favorite.provider === entry.provider && favorite.model === entry.model, + ), + ), + ...toggledFavorites.filter( + (favorite) => + !setModelFavoriteOrder.some( + (entry) => entry.provider === favorite.provider && entry.model === favorite.model, + ), + ), + ] + : toggledFavorites; const initialModelPreferences = providerModelPreferences ?? current.providerModelPreferences ?? From f4f2dc02718fe7b9ec76750caedbe3fbc7425cf7 Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 15:21:55 +0000 Subject: [PATCH 03/12] feat(server): a limited team seat starts its turn on the first free favorite NativeTeamChat's seat admission now treats a usage-limited model as unavailable. The signal is T3's own: the provider status windows, and the usage_limit failures of the conversation's seats and fork parents. What happens next is the conversation's setting: - Swap automatically: the seat's child thread starts on the first Favorite that is available, not limited, not on the limited model's account or provider family, not run by another seat or the lead, and, for a QA seat, not a builder seat's model. A note on the turn says which model stands in and why, and the seat's record carries substituteFor. - Ask me, or a model chosen by hand: the seat sits out with a notice naming the free favorite; a substitute the person agreed to is used. - Leave it out: the seat sits out. A seat is swapped once a turn: the critique round keeps the stand-in or the seat sits out. With no favorite free the seat waits with a notice. A board task's conversation is left to its team's own setting. Co-Authored-By: Claude Fable 5.2 --- apps/server/src/delivery/LimitedSeats.ts | 103 ++++++++ .../src/delivery/NativeTeamChat.test.ts | 241 ++++++++++++++++++ apps/server/src/delivery/NativeTeamChat.ts | 177 ++++++++++++- .../src/orchestration-v2/runtimeLayer.ts | 3 + .../delivery/OrchestratorLineup.tsx | 3 + .../delivery/OrchestratorParticipants.tsx | 15 +- apps/web/src/lib/orchestratorChat.test.ts | 55 ++++ apps/web/src/lib/orchestratorChat.ts | 25 ++ packages/contracts/src/delivery.ts | 6 + packages/contracts/src/orchestrationV2.ts | 8 + packages/shared/package.json | 4 + packages/shared/src/limitedSeat.test.ts | 220 ++++++++++++++++ packages/shared/src/limitedSeat.ts | 155 +++++++++++ 13 files changed, 999 insertions(+), 16 deletions(-) create mode 100644 apps/server/src/delivery/LimitedSeats.ts create mode 100644 packages/shared/src/limitedSeat.test.ts create mode 100644 packages/shared/src/limitedSeat.ts diff --git a/apps/server/src/delivery/LimitedSeats.ts b/apps/server/src/delivery/LimitedSeats.ts new file mode 100644 index 0000000000000..90d839ac1c398 --- /dev/null +++ b/apps/server/src/delivery/LimitedSeats.ts @@ -0,0 +1,103 @@ +import { type ThreadId } from "@t3tools/contracts"; +import type { LimitedSeatFacts, SeatLimit } from "@t3tools/shared/limitedSeat"; +import * as Context from "effect/Context"; +import * as DateTime from "effect/DateTime"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; + +import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; +import * as ProviderInstanceRegistry from "../provider/ProviderInstanceRegistry.ts"; +import * as ServerSettings from "../serverSettings.ts"; + +/** How far back a conversation's failed seats and fork parents are read for a limit. */ +const MAX_FAILED_SEATS = 24; +const MAX_FORK_PARENTS = 8; + +export class LimitedSeats extends Context.Service< + LimitedSeats, + { + /** + * What decides whether a seat of this conversation is limited and what may stand in: + * Favorites, provider status, and the usage limits its own turns and seats failed on. + */ + readonly facts: (threadId: ThreadId) => Effect.Effect; + } +>()("t3/delivery/LimitedSeats") {} + +const make = Effect.gen(function* () { + const projections = yield* ProjectionStore.ProjectionStoreV2; + const instances = yield* ProviderInstanceRegistry.ProviderInstanceRegistry; + const settings = yield* ServerSettings.ServerSettingsService; + + const facts: LimitedSeats["Service"]["facts"] = Effect.fn("LimitedSeats.facts")( + function* (threadId) { + const now = DateTime.toEpochMillis(yield* DateTime.now); + const { subagents } = yield* projections.getThreadRecords(threadId, ["subagents"]); + const failedSeats = subagents + .filter((task) => task.teamChat !== undefined && task.status === "failed") + .toSorted( + (left, right) => + DateTime.toEpochMillis(right.updatedAt) - DateTime.toEpochMillis(left.updatedAt), + ) + .slice(0, MAX_FAILED_SEATS) + .flatMap((task) => (task.childThreadId === null ? [] : [task.childThreadId])); + const threadLimits: Array = []; + const read = Effect.fn("LimitedSeats.readLimit")(function* (id: ThreadId) { + const shell = yield* projections.getThreadShell(id); + if ( + shell?.lastErrorClass === "usage_limit" && + shell.status === "failed" && + (shell.usageLimitResetAt == null || Date.parse(shell.usageLimitResetAt) > now) + ) { + threadLimits.push({ + instanceId: shell.modelSelection.instanceId, + model: shell.modelSelection.model, + resetAt: shell.usageLimitResetAt ?? null, + }); + } + return shell; + }); + // A conversation handed on from a limited lead must not be handed straight back. + let current: ThreadId | null = threadId; + for (let depth = 0; current !== null && depth <= MAX_FORK_PARENTS; depth += 1) { + const shell: Effect.Success> = yield* read(current); + current = + shell?.lineage.relationshipToParent === "fork" ? shell.lineage.parentThreadId : null; + } + yield* Effect.forEach(failedSeats, read, { discard: true }); + const root = yield* projections.getThreadShell(threadId); + return { + now, + providers: yield* Effect.forEach( + yield* instances.listInstances, + (instance) => instance.snapshot.getSnapshot, + ), + settings: yield* settings.getSettings, + projectId: root?.projectId ?? null, + threadLimits, + }; + }, + // A limit that cannot be read is no limit: the seat starts as it always did. + (effect) => + effect.pipe( + Effect.catchCause((cause) => + Effect.logWarning("limited-seats.facts-failed", cause).pipe( + Effect.andThen( + Effect.gen(function* () { + return { + now: DateTime.toEpochMillis(yield* DateTime.now), + providers: [], + settings: { favorites: [], providerInstances: {}, projectSettingsOverrides: {} }, + projectId: null, + threadLimits: [], + } satisfies LimitedSeatFacts; + }), + ), + ), + ), + ), + ); + return LimitedSeats.of({ facts }); +}); + +export const layer = Layer.effect(LimitedSeats, make); diff --git a/apps/server/src/delivery/NativeTeamChat.test.ts b/apps/server/src/delivery/NativeTeamChat.test.ts index bc98621cb9c85..281109fdba005 100644 --- a/apps/server/src/delivery/NativeTeamChat.test.ts +++ b/apps/server/src/delivery/NativeTeamChat.test.ts @@ -11,6 +11,9 @@ import { type OrchestrationV2TurnItem, type ChatAttachment, type OrchestrationV2ServerCommand, + DEFAULT_SERVER_SETTINGS, + ProviderDriverKind, + type ServerProvider, } from "@t3tools/contracts"; import { expect, it } from "@effect/vitest"; import * as Effect from "effect/Effect"; @@ -19,10 +22,12 @@ import { threadContextRecord, formatComposerContextReference, } from "@t3tools/shared/composerContextReferences"; +import type { LimitedSeatFacts } from "@t3tools/shared/limitedSeat"; import { createModelSelection } from "@t3tools/shared/model"; import { ServerConfig } from "../config.ts"; import * as ProjectStore from "../orchestration-v2/ProjectStore.ts"; import * as DeliveryService from "./DeliveryService.ts"; +import * as LimitedSeats from "./LimitedSeats.ts"; import * as EventSink from "../orchestration-v2/EventSink.ts"; import * as NativeTeamChat from "./NativeTeamChat.ts"; import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; @@ -60,6 +65,9 @@ function setup({ unbound = false, callsTeam = undefined as string | undefined, participantConfiguration = "research@3#abc", + /** What T3 knows about limits and Favorites; absent, no seat is ever treated as limited. */ + limitFacts = undefined as (() => LimitedSeatFacts) | undefined, + boardOwned = false, } = {}) { const participants = [ { @@ -183,6 +191,8 @@ function setup({ worktreePath: null, projectId: ProjectId.make("project"), runtimeMode: threadAccess, + modelSelection: createModelSelection(ProviderInstanceId.make("lead-work"), "lead-model"), + lineage: boardOwned ? { engineIntake: "task-1" } : {}, }, runs: missingRun ? [] : [run], messages: [message], @@ -272,6 +282,11 @@ function setup({ Effect.provideService(ThreadManagementService.ThreadManagementService, threads), Effect.provideService(ProviderAdapterRegistry.ProviderAdapterRegistryV2, adapters), Effect.provideService(ProviderInstanceRegistry.ProviderInstanceRegistry, instances), + limitFacts === undefined + ? (effect) => effect + : Effect.provideService(LimitedSeats.LimitedSeats, { + facts: () => Effect.sync(limitFacts), + }), Effect.provide(IdAllocator.layer), ), }; @@ -849,3 +864,229 @@ it.effect( } }), ); + +const LIMIT_RESET = "2026-11-22T17:00:00.000Z"; +const limitedProvider = (instanceId: string, driver: string, limited = false): ServerProvider => ({ + instanceId: ProviderInstanceId.make(instanceId), + driver: ProviderDriverKind.make(driver), + enabled: true, + installed: true, + version: null, + status: "ready", + auth: { status: "authenticated" }, + checkedAt: "2026-11-22T11:00:00.000Z", + models: [], + slashCommands: [], + skills: [], + ...(limited + ? { + usageLimits: { + checkedAt: "2026-11-22T11:00:00.000Z", + windows: [{ id: "primary", label: "5 hours", usedPercent: 100, resetsAt: LIMIT_RESET }], + } as NonNullable, + } + : {}), +}); + +/** The researcher's Claude is limited; Favorites are Kimi, then DeepSeek. */ +function limitedResearcher( + options: Omit[0]>, "limitFacts"> & { + readonly favorites?: ReadonlyArray; + } = {}, +) { + const limitedInstances = new Set(["claude-work"]); + const providers = [ + ["claude-work", "claudeAgent"], + ["codex-work", "codex"], + ["builder-work", "codex"], + ["kimi-work", "kimi"], + ["deepseek-work", "deepseek"], + ] as const; + const { favorites, ...rest } = options; + const fixture = setup({ + third: true, + ...rest, + limitFacts: () => ({ + now: Date.parse("2026-11-22T12:00:00.000Z"), + projectId: ProjectId.make("project"), + threadLimits: [], + providers: providers.map(([instanceId, driver]) => + limitedProvider(instanceId, driver, limitedInstances.has(instanceId)), + ), + settings: { + ...DEFAULT_SERVER_SETTINGS, + providerInstances: Object.fromEntries( + providers.map(([instanceId, driver]) => [ + ProviderInstanceId.make(instanceId), + { driver: ProviderDriverKind.make(driver), enabled: true }, + ]), + ), + favorites: ( + favorites ?? [ + ["kimi-work", "kimi-k3"], + ["deepseek-work", "deepseek-v4"], + ] + ).map(([provider, model]) => ({ provider: ProviderInstanceId.make(provider), model })), + }, + }), + }); + const seatsOn = () => + Object.fromEntries( + [...fixture.admissions.values()].map((command) => [ + `${command.teamChat.stage}:${command.teamChat.seat}`, + command.modelSelection.model, + ]), + ); + return { ...fixture, limitedInstances, seatsOn }; +} + +it.effect("starts a limited seat on the first free favorite and notes why", () => + Effect.gen(function* () { + const fixture = limitedResearcher(); + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + // Swap automatically is the default: the lineup states no setting. + expect(fixture.lineup.current).not.toHaveProperty("limitedSeat"); + expect(fixture.seatsOn()).toEqual({ + "contribution:researcher": "kimi-k3", + "contribution:critic": "codex-model", + "contribution:builder": "builder-model", + }); + const researcher = [...fixture.admissions.values()].find( + (command) => command.teamChat.seat === "researcher", + )!; + expect(researcher.modelSelection.instanceId).toBe("kimi-work"); + expect(researcher.teamChat.substituteFor).toEqual({ + instanceId: "claude-work", + model: "claude-model", + resetAt: LIMIT_RESET, + }); + expect(fixture.notices).toHaveLength(1); + expect(fixture.notices[0]).toMatchObject({ + status: "completed", + title: "researcher · substitute", + message: `researcher runs on kimi-k3 this turn: claude-model has reached its usage limit until ${LIMIT_RESET}.`, + }); + }), +); + +it.effect( + "swaps a seat once a turn: the critique keeps the stand-in or sits out, never a third model", + () => + Effect.gen(function* () { + const fixture = limitedResearcher({ critique: "always" }); + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + for (const task of fixture.tasks) task.status = "completed"; + // The stand-in reaches its own limit before the critique round. + fixture.limitedInstances.add("kimi-work"); + yield* service.prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()).toEqual({ + "contribution:researcher": "kimi-k3", + "contribution:critic": "codex-model", + "contribution:builder": "builder-model", + "critique:critic": "codex-model", + "critique:builder": "builder-model", + }); + expect(fixture.notices.at(-1)).toMatchObject({ + status: "failed", + message: expect.stringContaining("a seat is swapped once a turn"), + }); + }), +); + +it.effect("keeps the same stand-in for the critique round while it stays free", () => + Effect.gen(function* () { + const fixture = limitedResearcher({ critique: "always" }); + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + for (const task of fixture.tasks) task.status = "completed"; + yield* service.prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()["critique:researcher"]).toBe("kimi-k3"); + }), +); + +it.effect("leaves a limited seat waiting with a notice when no favorite is free", () => + Effect.gen(function* () { + // The only favorites are the limited account's own model and a provider that is not there. + const fixture = limitedResearcher({ + favorites: [ + ["claude-work", "claude-other"], + ["lead-work", "lead-model"], + ], + }); + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + expect(Object.keys(fixture.seatsOn())).toEqual(["contribution:critic", "contribution:builder"]); + expect(fixture.notices).toHaveLength(1); + expect(fixture.notices[0]).toMatchObject({ + status: "failed", + title: "researcher · skipped", + message: expect.stringContaining("No favorite model is free, so researcher waits."), + }); + }), +); + +it.effect("does not swap a model a person chose by hand; the notice still names the free one", () => + Effect.gen(function* () { + const fixture = limitedResearcher(); + Object.assign(fixture.participants[0]!, { picked: true }); + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); + expect(fixture.notices[0]?.type === "system_notice" && fixture.notices[0].message).toBe( + `researcher: claude-model has reached its usage limit until ${LIMIT_RESET}. Its model was chosen by hand, so it is not swapped without asking. kimi-k3 is free: swap to it from the notice to use it from the next message.`, + ); + }), +); + +it.effect("asks before a swap, and uses the model the person agreed to", () => + Effect.gen(function* () { + const fixture = limitedResearcher(); + fixture.lineup.current = { ...fixture.lineup.current!, limitedSeat: "ask" } as never; + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); + expect(fixture.notices[0]).toMatchObject({ + message: expect.stringContaining("kimi-k3 is free: swap to it from the notice"), + }); + + const agreed = limitedResearcher(); + Object.assign(agreed.participants[0]!, { + substitute: createModelSelection(ProviderInstanceId.make("deepseek-work"), "deepseek-v4"), + }); + agreed.lineup.current = { ...agreed.lineup.current!, limitedSeat: "ask" } as never; + yield* (yield* agreed.service).prepareTurn({ threadId, runId }); + expect(agreed.seatsOn()["contribution:researcher"]).toBe("deepseek-v4"); + }), +); + +it.effect( + "reads the setting at the start of each turn, so a change applies from the next message", + () => + Effect.gen(function* () { + const fixture = limitedResearcher(); + const service = yield* fixture.service; + yield* service.prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()["contribution:researcher"]).toBe("kimi-k3"); + // The person chooses Leave it out; the next message is a new turn with nothing recorded. + fixture.lineup.current = { ...fixture.lineup.current!, limitedSeat: "skip" } as never; + fixture.tasks.length = 0; + fixture.notices.length = 0; + fixture.admissions.clear(); + yield* service.prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); + expect(fixture.notices[0]).toMatchObject({ + message: `researcher: claude-model has reached its usage limit until ${LIMIT_RESET}. Left out of this message.`, + }); + }), +); + +it.effect("leaves a board task's conversation to its team's own setting", () => + Effect.gen(function* () { + const fixture = limitedResearcher({ boardOwned: true }); + yield* (yield* fixture.service).prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()["contribution:researcher"]).toBe("claude-model"); + expect(fixture.notices).toHaveLength(0); + }), +); diff --git a/apps/server/src/delivery/NativeTeamChat.ts b/apps/server/src/delivery/NativeTeamChat.ts index a2e72fef870bd..47e1087d344bb 100644 --- a/apps/server/src/delivery/NativeTeamChat.ts +++ b/apps/server/src/delivery/NativeTeamChat.ts @@ -1,13 +1,24 @@ import { CommandId, + deliveryLimitedSeatPolicy, deliveryParticipantAccess, isCompactionCommandMessage, + isServerOwnedThreadLineage, + type ModelSelection, parseGoalCommand, type OrchestrationV2Subagent, RunId, ThreadId, } from "@t3tools/contracts"; import { projectComposerContextForProvider } from "@t3tools/shared/composerContextReferences"; +import { + firstFreeFavorite, + type LimitedSeatFacts, + limitedSeatCandidates, + seatLimit, + seatModelOf, +} from "@t3tools/shared/limitedSeat"; +import { createModelSelection } from "@t3tools/shared/model"; import * as Context from "effect/Context"; import * as DateTime from "effect/DateTime"; import * as EventSink from "../orchestration-v2/EventSink.ts"; @@ -21,6 +32,7 @@ import { resolveAttachmentPath } from "../attachmentStore.ts"; import { ServerConfig } from "../config.ts"; import * as ProjectStore from "../orchestration-v2/ProjectStore.ts"; import * as DeliveryService from "./DeliveryService.ts"; +import * as LimitedSeats from "./LimitedSeats.ts"; import { teamDiscussionContext } from "./teamDiscussionContext.ts"; import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; import * as ThreadManagementService from "../orchestration-v2/ThreadManagementService.ts"; @@ -75,6 +87,7 @@ const contributions = (tasks: ReadonlyArray) => export const make = Effect.gen(function* () { const deliveryOption = yield* Effect.serviceOption(DeliveryService.DeliveryService); + const limitedSeatsOption = yield* Effect.serviceOption(LimitedSeats.LimitedSeats); const projections = yield* ProjectionStore.ProjectionStoreV2; const eventSink = yield* EventSink.EventSinkV2; const threads = yield* ThreadManagementService.ThreadManagementService; @@ -159,10 +172,13 @@ export const make = Effect.gen(function* () { if (notice?.type === "system_notice") skipped.set(seat.seat, notice.message); } // Notices preserve admission failures even when a provider or team changes on a later wake. + let noticesWritten = 0; const recordSkip = Effect.fn("NativeTeamChat.recordSkip")(function* ( seat: string, reason: string, noticeId = skipId(seat), + // A substitute is a note on a seat that joins, not a seat that is left out. + substitute = false, ) { const now = yield* DateTime.now; const written = yield* eventSink.writeIfRunCurrent({ @@ -189,9 +205,11 @@ export const make = Effect.gen(function* () { nativeItemRef: null, parentItemId: null, ordinal: - Math.max(0, ...parent.turnItems.map((item) => item.ordinal)) + skipped.size + 1, - status: "failed", - title: `${seat} · skipped`, + Math.max(0, ...parent.turnItems.map((item) => item.ordinal)) + + skipped.size + + (noticesWritten += 1), + status: substitute ? "completed" : "failed", + title: substitute ? `${seat} · substitute` : `${seat} · skipped`, message: reason, startedAt: now, completedAt: now, @@ -202,7 +220,7 @@ export const make = Effect.gen(function* () { }); if (!written.committed) return yield* new NativeTeamChatError({ runId: input.runId, reason: "state" }); - skipped.set(seat, reason); + if (!substitute) skipped.set(seat, reason); }); const fallback = Effect.fn("NativeTeamChat.fallback")(function* (reason: string) { if (!tasks.every(terminal)) return { ready: false, context: "" }; @@ -247,6 +265,112 @@ export const make = Effect.gen(function* () { ? { readOnly: true, access: "approval-required" as const } : { readOnly: false, access }; }; + const policy = deliveryLimitedSeatPolicy(lineup); + type StandIn = { + readonly selection: ModelSelection; + readonly substituteFor?: NonNullable< + NonNullable["substituteFor"] + >; + }; + /** Seats this call starts on a substitute, by seat. */ + const standIns = new Map(); + const turnStandIn = (seat: string): ModelSelection | undefined => { + const task = tasks.find( + (candidate) => + candidate.teamChat?.seat === seat && candidate.teamChat.substituteFor !== undefined, + ); + if (task === undefined) return undefined; + return ( + task.modelSelection ?? + (task.model === null + ? undefined + : createModelSelection(task.providerInstanceId, task.model)) + ); + }; + const runsOn = (seat: (typeof roster)[number]) => + standIns.get(seat.seat)?.selection ?? turnStandIn(seat.seat) ?? seat.modelSelection; + /** + * What a seat starts on: its own model, or a substitute when that one is limited. Undefined + * once the seat has been left out, with its notice written. + */ + const standIn = Effect.fn("NativeTeamChat.standIn")(function* ( + seat: (typeof roster)[number], + facts: LimitedSeatFacts, + ) { + const own = seatModelOf(seat.modelSelection); + const limit = seatLimit(facts, own); + if (limit === null) return { selection: seat.modelSelection } satisfies StandIn; + const limited = `${seat.seat}: ${own.model} has reached its usage limit${limit.resetAt ? ` until ${limit.resetAt}` : ""}.`; + const substituteFor = { ...own, resetAt: limit.resetAt }; + const earlier = turnStandIn(seat.seat); + if (earlier !== undefined) { + // One swap a turn: the stand-in chosen for this turn is kept, or the seat sits out. + if (seatLimit(facts, seatModelOf(earlier)) === null) + return { selection: earlier, substituteFor } satisfies StandIn; + yield* recordSkip( + seat.seat, + `${limited} Its substitute ${earlier.model} is limited too, and a seat is swapped once a turn.`, + ); + return undefined; + } + if (policy === "skip") { + yield* recordSkip(seat.seat, `${limited} Left out of this message.`); + return undefined; + } + const pool = limitedSeatCandidates({ + facts, + limited: own, + inUse: [ + seatModelOf(parent.thread.modelSelection), + ...roster + .filter((other) => other.seat !== seat.seat) + .map(runsOn) + .map(seatModelOf), + ], + builderModels: + seat.duty === "qa" + ? roster + .flatMap((other) => + other.duty === "build" ? [other.modelSelection, runsOn(other)] : [], + ) + .map(seatModelOf) + : undefined, + }); + const free = firstFreeFavorite(pool); + const none = `${limited} No favorite model is free, so ${seat.seat} waits.`; + if (policy === "ask" || seat.picked === true) { + const agreed = seat.substitute; + if ( + agreed !== undefined && + pool.some( + (candidate) => + candidate.skip === null && + candidate.instanceId === agreed.instanceId && + candidate.model === agreed.model, + ) + ) + return { selection: agreed, substituteFor } satisfies StandIn; + yield* recordSkip( + seat.seat, + free === null + ? none + : `${limited} ${ + policy === "ask" + ? "" + : "Its model was chosen by hand, so it is not swapped without asking. " + }${free.model} is free: swap to it from the notice to use it from the next message.`, + ); + return undefined; + } + if (free === null) { + yield* recordSkip(seat.seat, none); + return undefined; + } + return { + selection: createModelSelection(free.instanceId, free.model), + substituteFor, + } satisfies StandIn; + }); const mode = lineup.critique ?? "first"; const critiqueWanted = mode === "always" || (mode === "first" && !followUp); const stage = done(initial) ? "critique" : "contribution"; @@ -261,13 +385,20 @@ export const make = Effect.gen(function* () { roster.length - skipped.size >= 2 && !(done(initial) && (done(critiques) || !critiqueWanted)) ) { + const facts = + Option.isSome(limitedSeatsOption) && !isServerOwnedThreadLineage(parent.thread.lineage) + ? yield* limitedSeatsOption.value.facts(input.threadId) + : undefined; const available = yield* Effect.forEach( candidates, Effect.fn("NativeTeamChat.preflight")(function* (seat) { - const instance = yield* instances.getInstance(seat.modelSelection.instanceId); + const runsOn = facts === undefined ? undefined : yield* standIn(seat, facts); + if (facts !== undefined && runsOn === undefined) return undefined; + const selection = runsOn?.selection ?? seat.modelSelection; + const instance = yield* instances.getInstance(selection.instanceId); const enabled = yield* threads.isProviderInstanceEnabledForProject({ projectId: parent.thread.projectId, - instanceId: seat.modelSelection.instanceId, + instanceId: selection.instanceId, }); let reason: string | undefined; if (instance === undefined) reason = "provider is unavailable"; @@ -297,13 +428,28 @@ export const make = Effect.gen(function* () { ); return undefined; } - const adapter = yield* adapters.get(seat.modelSelection.instanceId).pipe( + const adapter = yield* adapters.get(selection.instanceId).pipe( Effect.catchTags({ ProviderAdapterRegistryLookupError: () => Effect.undefined, }), ); - if (adapter === undefined) + if (adapter === undefined) { yield* recordSkip(seat.seat, `${seat.seat}: provider is unavailable.`); + return undefined; + } + if (runsOn?.substituteFor !== undefined) { + const { model, resetAt } = runsOn.substituteFor; + yield* recordSkip( + seat.seat, + `${seat.seat} runs on ${selection.model} this turn: ${model} has reached its usage limit${resetAt ? ` until ${resetAt}` : ""}.`, + ids.derive.runSignalTurnItem({ + runId: input.runId, + signal: `team-seat-substitute:${stage}:${seat.seat}`, + }), + true, + ); + standIns.set(seat.seat, runsOn); + } return adapter; }), ); @@ -378,8 +524,8 @@ export const make = Effect.gen(function* () { members: eligible.map((seat) => ({ seat: seat.seat, role: seat.role, - providerInstanceId: seat.modelSelection.instanceId, - model: seat.modelSelection.model, + providerInstanceId: runsOn(seat).instanceId, + model: runsOn(seat).model, access: deliveryParticipantAccess(lineup, seat.seat), })), skipped: roster.flatMap((seat) => { @@ -416,7 +562,14 @@ export const make = Effect.gen(function* () { parentThreadId: input.threadId, parentRunId: input.runId, parentNodeId: run.rootNodeId, - teamChat: { sourceRunId: input.runId, stage, seat: seat.seat }, + teamChat: { + sourceRunId: input.runId, + stage, + seat: seat.seat, + ...(standIns.get(seat.seat)?.substituteFor === undefined + ? {} + : { substituteFor: standIns.get(seat.seat)!.substituteFor! }), + }, title: `${seat.seat} · ${stage}`, task: `Participate as ${seat.role}, seat ${seat.seat}, in ${group}. ${ readOnly @@ -427,7 +580,7 @@ export const make = Effect.gen(function* () { ? "Give your independent assessment of the latest user message, with evidence, assumptions, and objections." : "Critique the independent contributions below. Identify errors, disagreements, overlooked alternatives, and evidence that changes your conclusion. Do not merely repeat the other participants." }\n\nConversation:\n${conversation}${attached}${stage === "critique" ? `\n\nIndependent contributions:\n${contributions(initial)}` : ""}`, - modelSelection: seat.modelSelection, + modelSelection: standIns.get(seat.seat)?.selection ?? seat.modelSelection, runtimeMode: access, // No seat gets plan mode: a harness in it writes a plan and asks for its approval, // which a read-only seat is refused, and then asks the person what to revise. A diff --git a/apps/server/src/orchestration-v2/runtimeLayer.ts b/apps/server/src/orchestration-v2/runtimeLayer.ts index cc827f618fd4c..cb64368bc3113 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.ts @@ -1,6 +1,7 @@ import * as SendFailureNotice from "./SendFailureNotice.ts"; import * as WorktreeBranchSync from "./WorktreeBranchSync.ts"; import * as GuestShareService from "../guest/GuestShareService.ts"; +import * as LimitedSeats from "../delivery/LimitedSeats.ts"; import * as NativeTeamChat from "../delivery/NativeTeamChat.ts"; import * as UsageLimitRecoveryWorker from "./UsageLimitRecoveryWorker.ts"; import * as Scheduler from "../scheduling/Scheduler.ts"; @@ -276,6 +277,7 @@ const layerThreadManagementProvided = ThreadManagementService.layerWithLegacyImp ), ), ); +const layerLimitedSeatsProvided = LimitedSeats.layer.pipe(Layer.provide(ProjectionStore.layer)); const layerNativeTeamChatProvided = NativeTeamChat.layer.pipe( Layer.provide( Layer.mergeAll( @@ -285,6 +287,7 @@ const layerNativeTeamChatProvided = NativeTeamChat.layer.pipe( ProjectStore.layer, IdAllocator.layer, ProviderAdapterRegistry.layerFromProviderInstanceRegistry, + layerLimitedSeatsProvided, ), ), ); diff --git a/apps/web/src/components/delivery/OrchestratorLineup.tsx b/apps/web/src/components/delivery/OrchestratorLineup.tsx index 8db9889279fb4..3857493b86dcb 100644 --- a/apps/web/src/components/delivery/OrchestratorLineup.tsx +++ b/apps/web/src/components/delivery/OrchestratorLineup.tsx @@ -46,6 +46,8 @@ function valueOfLineup( included: true, modelSelection: joined.modelSelection, ...(joined.access ? { access: joined.access } : {}), + ...(joined.picked ? { picked: true } : {}), + ...(joined.substitute ? { substitute: joined.substitute } : {}), } : { included: false }, ]; @@ -58,6 +60,7 @@ function valueOfLineup( role: item.role, modelSelection: item.modelSelection, ...(item.access ? { access: item.access } : {}), + ...(item.substitute ? { substitute: item.substitute } : {}), })), ...(lineup.critique ? { critique: lineup.critique } : {}), ...(lineup.access ? { access: lineup.access } : {}), diff --git a/apps/web/src/components/delivery/OrchestratorParticipants.tsx b/apps/web/src/components/delivery/OrchestratorParticipants.tsx index c357d16edf68e..b255ff4181ebd 100644 --- a/apps/web/src/components/delivery/OrchestratorParticipants.tsx +++ b/apps/web/src/components/delivery/OrchestratorParticipants.tsx @@ -204,14 +204,21 @@ export function OrchestratorParticipants(props: { ? lead({ role: row.role, modelSelection }) : row.extra ? setExtras( - extras.map((extra) => - extra.id === row.seat ? { ...extra, modelSelection } : extra, - ), + extras.map((extra) => { + if (extra.id !== row.seat) return extra; + // A new choice by hand ends whatever stood in for the old one. + const { substitute: _substitute, ...kept } = extra; + return { ...kept, modelSelection }; + }), ) : props.onChange({ participantChoices: { ...value.participantChoices, - [row.seat]: { ...value.participantChoices?.[row.seat], modelSelection }, + [row.seat]: (() => { + const { substitute: _substitute, ...kept } = + value.participantChoices?.[row.seat] ?? {}; + return { ...kept, modelSelection, picked: true }; + })(), }, }); const setAccess = (access: OrchestratorParticipantAccess) => diff --git a/apps/web/src/lib/orchestratorChat.test.ts b/apps/web/src/lib/orchestratorChat.test.ts index d0b2834963c82..8b82d5a1a705f 100644 --- a/apps/web/src/lib/orchestratorChat.test.ts +++ b/apps/web/src/lib/orchestratorChat.test.ts @@ -532,3 +532,58 @@ it("reads the team profile's default for a limited seat, and ignores a value it expect(teamOf("later").whenSeatLimited).toBeNull(); expect(teamOf(undefined).whenSeatLimited).toBeNull(); }); + +it("marks a model chosen by hand, a seat's duty and an agreed substitute for the limited-seat rule", () => { + const { entries } = setup(); + const team = parseTeams([ + { + team: "development", + available: true, + roles: [{ role: "developer" }, { role: "qa" }], + seats: [ + { + seat: "developer", + title: "Developer", + role: "developer", + harness: "claude", + model: "a", + stages: ["plan", "build"], + available: true, + }, + { + seat: "qa", + title: "QA", + role: "qa", + harness: "codex", + model: "b", + stages: ["qa"], + available: true, + }, + ], + }, + ])[0]!; + const chosen = createModelSelection(ProviderInstanceId.make("codex"), "c"); + const first = resolveOrchestratorRoster({ team, choices: undefined, entries }); + expect(first.problem).toBeNull(); + const untouched = first.configuration; + expect(untouched?.participants).toEqual([ + expect.objectContaining({ seat: "developer", duty: "build" }), + expect.objectContaining({ seat: "qa", duty: "qa" }), + ]); + expect(untouched?.participants[1]).not.toHaveProperty("picked"); + + const picked = resolveOrchestratorRoster({ + team, + entries, + // A saved lineup round-trips every seat's model; only a hand pick carries the mark. + choices: { + developer: { included: true, modelSelection: chosen }, + qa: { included: true, modelSelection: chosen, picked: true, substitute: chosen }, + }, + extras: [{ id: "custom-1", role: "qa", modelSelection: chosen }], + }).configuration; + expect(picked?.participants[0]).not.toHaveProperty("picked"); + expect(picked?.participants[1]).toMatchObject({ picked: true, substitute: chosen }); + // An added participant is a person's own choice, and takes the duty of its role. + expect(picked?.participants[2]).toMatchObject({ seat: "custom-1", picked: true, duty: "qa" }); +}); diff --git a/apps/web/src/lib/orchestratorChat.ts b/apps/web/src/lib/orchestratorChat.ts index 95cbe98a1f4d5..2761c72d71a77 100644 --- a/apps/web/src/lib/orchestratorChat.ts +++ b/apps/web/src/lib/orchestratorChat.ts @@ -23,6 +23,10 @@ export interface OrchestratorParticipantChoice { readonly modelSelection?: ModelSelection; /** This seat's access for the conversation, over the team's and the conversation's. */ readonly access?: OrchestratorParticipantAccess; + /** The model was chosen by hand here, so a limit never swaps it without asking. */ + readonly picked?: boolean; + /** What the person agreed the seat runs on while its own model is limited. */ + readonly substitute?: ModelSelection; } /** A participant added for one conversation: any provider and model, in one of the team's roles. */ @@ -31,6 +35,7 @@ export interface OrchestratorExtraParticipant { readonly role: string; readonly modelSelection?: ModelSelection; readonly access?: OrchestratorParticipantAccess; + readonly substitute?: ModelSelection; } export type OrchestratorCritique = NonNullable; @@ -111,6 +116,12 @@ export function resolveOrchestratorRoster(input: { : null; return { problem, providerProblem: null }; }; + const dutyOf = (stages: ReadonlyArray) => + stages.includes("qa") + ? ("qa" as const) + : stages.includes("build") + ? ("build" as const) + : undefined; const teamRow = (seat: DeliveryTeam["seats"][number]) => { const settings = input.team?.settings.find((item) => item.seat === seat.seat); const choice = input.choices?.[seat.seat]; @@ -167,6 +178,9 @@ export function resolveOrchestratorRoster(input: { access, /** Set when the seat's access is its own and not the conversation's. */ ownAccess: own, + picked: choice?.picked === true && choice.modelSelection !== undefined, + substitute: choice?.substitute, + duty: dutyOf(seat.stages), /** The seat the orchestrator itself holds. */ orchestrator: seat.seat === ownSeat, extra: false, @@ -198,6 +212,14 @@ export function resolveOrchestratorRoster(input: { modelSelection: extra.modelSelection ?? null, access: extra.access ?? input.access ?? ("read-only" as const), ownAccess: extra.access, + // An added participant's model is always a person's own choice. + picked: extra.modelSelection !== undefined, + substitute: extra.substitute, + duty: dutyOf( + (input.team?.seats ?? []) + .filter((seat) => seat.role === extra.role) + .flatMap((seat) => seat.stages), + ), orchestrator: false, extra: true, problem, @@ -233,6 +255,9 @@ export function resolveOrchestratorRoster(input: { role: row.role, modelSelection: row.modelSelection, ...(row.ownAccess ? { access: row.ownAccess } : {}), + ...(row.picked ? { picked: true } : {}), + ...(row.duty ? { duty: row.duty } : {}), + ...(row.substitute ? { substitute: row.substitute } : {}), }, ] : [], diff --git a/packages/contracts/src/delivery.ts b/packages/contracts/src/delivery.ts index 0e327fec4cfa2..bb89bf61ff97f 100644 --- a/packages/contracts/src/delivery.ts +++ b/packages/contracts/src/delivery.ts @@ -16,6 +16,12 @@ export const DeliveryOrchestrationConfig = Schema.Struct({ modelSelection: ModelSelection, /** This participant's own access. Absent means the conversation's. */ access: Schema.optional(Schema.Literals(["read-only", "approval-required", "full-access"])), + /** A person chose this seat's model by hand, so it is never swapped without asking. */ + picked: Schema.optional(Schema.Boolean), + /** What the seat does in its team. A QA seat never stands in on a builder seat's model. */ + duty: Schema.optional(Schema.Literals(["build", "qa"])), + /** What a person agreed the seat runs on while its own model is limited. */ + substitute: Schema.optional(ModelSelection), }), ).check(Schema.isMinLength(2), Schema.isMaxLength(12)), /** When participants critique each other. Absent means the conversation's first message only. */ diff --git a/packages/contracts/src/orchestrationV2.ts b/packages/contracts/src/orchestrationV2.ts index 7e96ecb31f199..161522c300b3d 100644 --- a/packages/contracts/src/orchestrationV2.ts +++ b/packages/contracts/src/orchestrationV2.ts @@ -1015,6 +1015,14 @@ const TeamChatParticipation = Schema.Struct({ sourceRunId: RunId, stage: Schema.Literals(["contribution", "critique"]), seat: TrimmedNonEmptyString, + /** The seat's own model, when this turn runs on a substitute because that one was limited. */ + substituteFor: Schema.optional( + Schema.Struct({ + instanceId: ProviderInstanceId, + model: TrimmedNonEmptyString, + resetAt: Schema.NullOr(IsoDateTime), + }), + ), }); export const OrchestrationV2Subagent = Schema.Struct({ diff --git a/packages/shared/package.json b/packages/shared/package.json index a8246ace64855..83c2c179d4e3b 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -419,6 +419,10 @@ "types": "./src/usageFormat.ts", "import": "./src/usageFormat.ts" }, + "./limitedSeat": { + "types": "./src/limitedSeat.ts", + "import": "./src/limitedSeat.ts" + }, "./usageLimits": { "types": "./src/usageLimits.ts", "import": "./src/usageLimits.ts" diff --git a/packages/shared/src/limitedSeat.test.ts b/packages/shared/src/limitedSeat.test.ts new file mode 100644 index 0000000000000..2fc1b5ac76cbc --- /dev/null +++ b/packages/shared/src/limitedSeat.test.ts @@ -0,0 +1,220 @@ +import { + DEFAULT_SERVER_SETTINGS, + ProjectId, + ProviderDriverKind, + ProviderInstanceId, + type ServerProvider, +} from "@t3tools/contracts"; +import { describe, expect, it } from "vite-plus/test"; + +import { + firstFreeFavorite, + type LimitedSeatFacts, + limitedSeatCandidates, + modelAccountFamily, + seatLimit, +} from "./limitedSeat.ts"; + +const now = Date.parse("2026-11-22T12:00:00.000Z"); +const later = "2026-11-22T17:00:00.000Z"; +const id = ProviderInstanceId.make; +const projectId = ProjectId.make("project"); + +function provider( + instanceId: string, + driver: string, + overrides: Partial = {}, +): ServerProvider { + return { + instanceId: id(instanceId), + driver: ProviderDriverKind.make(driver), + enabled: true, + installed: true, + version: null, + status: "ready", + auth: { status: "authenticated" }, + checkedAt: "2026-11-22T11:00:00.000Z", + models: [], + slashCommands: [], + skills: [], + ...overrides, + }; +} + +const exhausted = { + checkedAt: "2026-11-22T11:00:00.000Z", + windows: [{ id: "primary", label: "5 hours", usedPercent: 100, resetsAt: later }], +} as NonNullable; + +const favorite = (instanceId: string, model: string) => ({ provider: id(instanceId), model }); +const seat = (instanceId: string, model: string) => ({ instanceId: id(instanceId), model }); + +function facts( + overrides: Partial> & { + readonly favorites?: LimitedSeatFacts["settings"]["favorites"]; + } = {}, +): LimitedSeatFacts { + const providers = overrides.providers ?? [ + provider("claude", "claudeAgent", { usageLimits: exhausted }), + provider("codex", "codex"), + provider("kimi", "kimi"), + provider("deepseek", "deepseek"), + ]; + return { + now, + projectId, + threadLimits: [], + ...overrides, + providers, + settings: { + ...DEFAULT_SERVER_SETTINGS, + providerInstances: Object.fromEntries( + providers.map((entry) => [entry.instanceId, { driver: entry.driver, enabled: true }]), + ), + favorites: overrides.favorites ?? [ + favorite("claude", "claude-opus"), + favorite("codex", "gpt-astra"), + favorite("kimi", "kimi-k3"), + favorite("deepseek", "deepseek-v4"), + ], + }, + }; +} + +const limited = seat("claude", "claude-fable"); +const pick = (input: Partial[0]> = {}) => + firstFreeFavorite(limitedSeatCandidates({ facts: facts(), limited, inUse: [], ...input })); + +describe("the swap pool for a limited seat", () => { + it("reads a limit from the provider's windows and from a turn that failed on it", () => { + expect(seatLimit(facts(), limited)).toMatchObject({ resetAt: later }); + expect(seatLimit(facts(), seat("codex", "gpt-astra"))).toBeNull(); + const failed = facts({ threadLimits: [{ ...seat("codex", "gpt-astra"), resetAt: later }] }); + expect(seatLimit(failed, seat("codex", "gpt-astra"))).toMatchObject({ resetAt: later }); + // A window that has already reset no longer limits anything. + const reset = facts({ + threadLimits: [{ ...seat("codex", "gpt-astra"), resetAt: "2026-11-22T11:59:00.000Z" }], + }); + expect(seatLimit(reset, seat("codex", "gpt-astra"))).toBeNull(); + }); + + it("takes the first favorite in the person's order, and never a model outside Favorites", () => { + expect(pick()).toEqual(seat("codex", "gpt-astra")); + expect(pick({ facts: facts({ favorites: [] }) })).toBeNull(); + }); + + it.each([ + { + name: "one whose provider is not ready", + providers: { codex: { status: "error" as const } }, + skip: "unavailable", + }, + { + name: "one whose provider is signed out", + providers: { codex: { auth: { status: "unauthenticated" as const } } }, + skip: "unavailable", + }, + { + name: "one that is itself usage-limited", + providers: { codex: { usageLimits: exhausted } }, + skip: "limited", + }, + ])("skips $name", ({ providers, skip }) => { + const base = facts(); + const candidates = limitedSeatCandidates({ + facts: { + ...base, + providers: base.providers.map((entry) => ({ + ...entry, + ...(providers as Record>)[entry.instanceId], + })), + }, + limited, + inUse: [], + }); + expect(candidates.find((entry) => entry.instanceId === "codex")?.skip).toBe(skip); + expect(firstFreeFavorite(candidates)).toEqual(seat("kimi", "kimi-k3")); + }); + + it("skips a favorite turned off for the project", () => { + const base = facts(); + const candidates = limitedSeatCandidates({ + facts: { + ...base, + settings: { + ...base.settings, + projectSettingsOverrides: { + [projectId]: { providerInstances: { [id("codex")]: { enabled: false } } }, + }, + }, + }, + limited, + inUse: [], + }); + expect(candidates[1]?.skip).toBe("unavailable"); + }); + + it("skips the limited model's own account and its provider family", () => { + const candidates = limitedSeatCandidates({ + facts: facts({ + providers: [ + provider("claude", "claudeAgent", { usageLimits: exhausted }), + // Another harness on the same vendor, and a second sign-in to the same harness. + provider("pi", "pi"), + provider("claude-2", "claudeAgent"), + provider("codex", "codex"), + ], + favorites: [ + favorite("claude", "claude-opus"), + favorite("pi", "anthropic/claude-opus"), + favorite("claude-2", "claude-opus"), + favorite("codex", "gpt-astra"), + ], + }), + limited, + inUse: [], + }); + // The limited instance's own window already rules out its other models. + expect(candidates.map((entry) => entry.skip)).toEqual([ + "limited", + "same-account", + "same-account", + null, + ]); + }); + + it("skips a model another seat or the lead already runs", () => { + expect(pick({ inUse: [seat("codex", "gpt-astra")] })).toEqual(seat("kimi", "kimi-k3")); + }); + + it("keeps a QA seat off the builder's model, on any account", () => { + const candidates = limitedSeatCandidates({ + facts: facts(), + limited, + inUse: [], + builderModels: [seat("codex-other", "gpt-astra")], + }); + expect(candidates[1]?.skip).toBe("not-independent"); + expect(firstFreeFavorite(candidates)).toEqual(seat("kimi", "kimi-k3")); + }); + + it("finds none free when every favorite is skipped", () => { + expect( + pick({ + inUse: [ + seat("codex", "gpt-astra"), + seat("kimi", "kimi-k3"), + seat("deepseek", "deepseek-v4"), + ], + }), + ).toBeNull(); + }); + + it("names the family by the model's vendor, then by the harness", () => { + expect(modelAccountFamily("pi", "openai/gpt-6-astra")).toBe("openai"); + expect(modelAccountFamily("codex", "astra")).toBe("openai"); + expect(modelAccountFamily("opencode", "zai-coding-plan/glm-5.3")).toBe("zhipu"); + expect(modelAccountFamily("opencode", "fireworks/llama")).toBe("fireworks"); + expect(modelAccountFamily("hermes", "default")).toBe("driver:hermes"); + }); +}); diff --git a/packages/shared/src/limitedSeat.ts b/packages/shared/src/limitedSeat.ts new file mode 100644 index 0000000000000..813fd2ed40921 --- /dev/null +++ b/packages/shared/src/limitedSeat.ts @@ -0,0 +1,155 @@ +import { + isProviderAvailable, + type ModelSelection, + type ProjectId, + type ProviderInstanceId, + resolveProjectProviderInstanceEnabled, + type ServerProvider, + type ServerSettings, +} from "@t3tools/contracts"; + +import { exhaustedUsageWindow } from "./usageLimits.ts"; + +/** A model as a seat runs it: on one provider instance. */ +export interface SeatModel { + readonly instanceId: ProviderInstanceId; + readonly model: string; +} + +/** A model a thread or one of its seats failed on with a usage limit that has not reset yet. */ +export interface SeatLimit extends SeatModel { + readonly resetAt: string | null; +} + +/** What T3 knows when it decides whether a seat is limited and what could stand in for it. */ +export interface LimitedSeatFacts { + readonly now: number; + readonly providers: ReadonlyArray; + readonly settings: Pick< + ServerSettings, + "favorites" | "providerInstances" | "projectSettingsOverrides" + >; + readonly projectId: ProjectId | null; + /** Limits read from turns that failed, which a provider's own status may not show. */ + readonly threadLimits: ReadonlyArray; +} + +const MODEL_FAMILIES: ReadonlyArray = [ + [/claude|anthropic/i, "anthropic"], + [/gpt|openai|codex|\bo\d\b/i, "openai"], + [/gemini|google/i, "google"], + [/grok|xai/i, "xai"], + [/kimi|moonshot/i, "moonshot"], + [/deepseek/i, "deepseek"], + [/glm|zai|z\.ai|zhipu/i, "zhipu"], +]; +const DRIVER_FAMILIES: Readonly> = { + claudeAgent: "anthropic", + codex: "openai", + grok: "xai", + kimi: "moonshot", + deepseek: "deepseek", +}; + +/** + * Whose usage a model draws on, as far as T3 can tell: the vendor its name shows, else the + * harness's own. T3 holds no account identity across providers, so this errs toward "the same". + */ +export function modelAccountFamily(driver: string | undefined, model: string): string { + const named = MODEL_FAMILIES.find(([pattern]) => pattern.test(model))?.[1]; + if (named) return named; + const vendor = model.includes("/") ? model.split("/")[0]?.toLowerCase() : undefined; + return vendor || (driver ? (DRIVER_FAMILIES[driver] ?? `driver:${driver}`) : "unknown"); +} + +const sameModel = (left: SeatModel, right: SeatModel) => + left.instanceId === right.instanceId && left.model === right.model; + +/** Why a seat's model cannot run now, or null when no limit is known. */ +export function seatLimit(facts: LimitedSeatFacts, seat: SeatModel): SeatLimit | null { + const provider = facts.providers.find((entry) => entry.instanceId === seat.instanceId); + const window = exhaustedUsageWindow(provider, facts.now, seat.model); + if (window) return { ...seat, resetAt: window.resetsAt ?? null }; + return ( + facts.threadLimits.find( + (limit) => + sameModel(limit, seat) && (limit.resetAt === null || Date.parse(limit.resetAt) > facts.now), + ) ?? null + ); +} + +export type LimitedSeatSkipReason = + | "unavailable" + | "limited" + | "same-account" + | "in-use" + | "not-independent"; + +export interface LimitedSeatCandidate extends SeatModel { + /** Null for a favorite that is free to stand in. */ + readonly skip: LimitedSeatSkipReason | null; +} + +/** + * The person's Favorites in their order, each free or skipped with its reason. Nothing outside + * Favorites is ever offered. The first free one is the substitute. + */ +export function limitedSeatCandidates(input: { + readonly facts: LimitedSeatFacts; + /** The model that reached its limit. */ + readonly limited: SeatModel; + /** What the other seats and the lead of the conversation run on. */ + readonly inUse: ReadonlyArray; + /** For a QA seat, what the builder seats run on; QA must not share a model with them. */ + readonly builderModels?: ReadonlyArray | undefined; +}): ReadonlyArray { + const { facts, limited } = input; + const providerOf = (instanceId: ProviderInstanceId) => + facts.providers.find((entry) => entry.instanceId === instanceId); + const limitedProvider = providerOf(limited.instanceId); + const limitedFamily = modelAccountFamily(limitedProvider?.driver, limited.model); + const reason = (candidate: SeatModel): LimitedSeatSkipReason | null => { + const provider = providerOf(candidate.instanceId); + if ( + !provider || + !provider.enabled || + !provider.installed || + provider.status !== "ready" || + provider.auth.status === "unauthenticated" || + provider.supportsSessions === false || + !isProviderAvailable(provider) || + !resolveProjectProviderInstanceEnabled(facts.settings, facts.projectId, candidate.instanceId) + ) + return "unavailable"; + if (seatLimit(facts, candidate)) return "limited"; + const sameAccount = + candidate.instanceId === limited.instanceId || + (provider.driver === limitedProvider?.driver && + provider.auth.email !== undefined && + provider.auth.email === limitedProvider.auth.email) || + modelAccountFamily(provider.driver, candidate.model) === limitedFamily; + if (sameAccount) return "same-account"; + if (input.inUse.some((used) => sameModel(used, candidate))) return "in-use"; + // The same model on another account is still the builder's model. + if (input.builderModels?.some((builder) => builder.model === candidate.model)) + return "not-independent"; + return null; + }; + return (facts.settings.favorites ?? []).map((favorite) => { + const candidate = { instanceId: favorite.provider, model: favorite.model }; + return { ...candidate, skip: reason(candidate) }; + }); +} + +/** The first free favorite, or null when none is free. */ +export const firstFreeFavorite = ( + candidates: ReadonlyArray, +): SeatModel | null => { + const free = candidates.find((candidate) => candidate.skip === null); + return free ? { instanceId: free.instanceId, model: free.model } : null; +}; + +export const seatModelOf = (selection: ModelSelection): SeatModel => ({ + instanceId: selection.instanceId, + model: selection.model, +}); From c38bbbfa845f2b09bcb342bf69d65b4b87ebf5d1 Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 15:33:17 +0000 Subject: [PATCH 04/12] feat(server): a limited lead hands off to a linked thread on a free favorite When a team conversation's lead fails a turn on a usage limit and the conversation swaps automatically, the server hands the work on: the old thread's limit-recovery resume is disarmed, the thread is forked from the failed run through the existing fork path, and the fork's first turn starts on the first free favorite. A fork onto another provider already carries the ContextHandoffService summary under its token budget, so nothing new summarizes. The fork keeps the team binding and the lineup. Every id follows from the failed run, so a repeat makes one thread. delivery.limitedSeats reports which seats and lead are limited and what could stand in; delivery.swapLimitedSeat is the one click, for a seat (it records the substitute the person agreed to) and for the lead (the hand-off). Both are refused for a model that is not a free favorite. An orchestrator test runs the hand-off commands twice against a real failed usage-limit run. Co-Authored-By: Claude Fable 5.2 --- apps/server/src/auth/RpcAuthorization.ts | 2 + .../src/delivery/LimitedSeatSwap.test.ts | 313 ++++++++++++++ apps/server/src/delivery/LimitedSeatSwap.ts | 399 ++++++++++++++++++ .../src/delivery/NativeTeamChat.test.ts | 12 +- apps/server/src/delivery/NativeTeamChat.ts | 35 +- .../src/observability/RpcInstrumentation.ts | 2 + .../src/orchestration-v2/runtimeLayer.test.ts | 119 ++++++ .../src/orchestration-v2/runtimeLayer.ts | 15 + apps/server/src/ws.ts | 16 + packages/contracts/src/delivery.ts | 45 +- packages/contracts/src/rpc.ts | 21 + packages/shared/src/limitedSeat.test.ts | 8 +- packages/shared/src/limitedSeat.ts | 61 +++ 13 files changed, 1015 insertions(+), 33 deletions(-) create mode 100644 apps/server/src/delivery/LimitedSeatSwap.test.ts create mode 100644 apps/server/src/delivery/LimitedSeatSwap.ts diff --git a/apps/server/src/auth/RpcAuthorization.ts b/apps/server/src/auth/RpcAuthorization.ts index 882f486c6610b..8010e9634001b 100644 --- a/apps/server/src/auth/RpcAuthorization.ts +++ b/apps/server/src/auth/RpcAuthorization.ts @@ -136,6 +136,8 @@ export const RPC_REQUIRED_SCOPES = { [WS_METHODS.deliveryThreadBinding]: AuthOrchestrationReadScope, [WS_METHODS.deliveryReleaseThread]: AuthOrchestrationOperateScope, [WS_METHODS.deliverySetThreadLineup]: AuthOrchestrationOperateScope, + [WS_METHODS.deliveryLimitedSeats]: AuthOrchestrationReadScope, + [WS_METHODS.deliverySwapLimitedSeat]: AuthOrchestrationOperateScope, [WS_METHODS.serverReportClientActivity]: AuthOrchestrationReadScope, [WS_METHODS.scheduledTasksSubscribe]: AuthOrchestrationReadScope, [WS_METHODS.secretsAnswerRequest]: AuthOrchestrationOperateScope, diff --git a/apps/server/src/delivery/LimitedSeatSwap.test.ts b/apps/server/src/delivery/LimitedSeatSwap.test.ts new file mode 100644 index 0000000000000..0d33b5f5a5e78 --- /dev/null +++ b/apps/server/src/delivery/LimitedSeatSwap.test.ts @@ -0,0 +1,313 @@ +import { + DEFAULT_SERVER_SETTINGS, + type DeliveryOrchestrationConfig, + type OrchestrationV2ServerCommand, + ProjectId, + ProviderDriverKind, + ProviderInstanceId, + RunId, + type ServerProvider, + ThreadId, +} from "@t3tools/contracts"; +import { expect, it } from "@effect/vitest"; +import type { LimitedSeatFacts } from "@t3tools/shared/limitedSeat"; +import { createModelSelection } from "@t3tools/shared/model"; +import * as DateTime from "effect/DateTime"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; + +import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; +import * as ProviderAdapterRegistry from "../orchestration-v2/ProviderAdapterRegistry.ts"; +import * as ThreadManagementService from "../orchestration-v2/ThreadManagementService.ts"; +import { limitRecoveryCommand } from "../orchestration-v2/UsageLimitRecoveryWorker.ts"; +import * as DeliveryService from "./DeliveryService.ts"; +import * as LimitedSeats from "./LimitedSeats.ts"; +import * as LimitedSeatSwap from "./LimitedSeatSwap.ts"; + +const threadId = ThreadId.make("lead-thread"); +const runId = RunId.make("lead-run"); +const target = LimitedSeatSwap.leadHandoffThreadId(runId); +const NOW = "2026-11-22T12:00:00.000Z"; +const RESET = "2026-11-22T17:00:00.000Z"; +const id = ProviderInstanceId.make; +const model = (instanceId: string, slug: string) => createModelSelection(id(instanceId), slug); + +const provider = (instanceId: string, driver: string): ServerProvider => ({ + instanceId: id(instanceId), + driver: ProviderDriverKind.make(driver), + enabled: true, + installed: true, + version: null, + status: "ready", + auth: { status: "authenticated" }, + checkedAt: NOW, + models: [], + slashCommands: [], + skills: [], +}); + +function setup({ + policy = undefined as DeliveryOrchestrationConfig["limitedSeat"], + favorites = [ + ["kimi", "kimi-k3"], + ["deepseek", "deepseek-v4"], + ] as ReadonlyArray, + bound = true, + lineage = {} as Record, + ordinary = false, + limitedSeat = false, +} = {}) { + const providers = [ + provider("claude", "claudeAgent"), + provider("codex", "codex"), + provider("kimi", "kimi"), + provider("deepseek", "deepseek"), + ]; + const lineups = new Map(); + if (!ordinary) + lineups.set(threadId, { + participants: [ + { seat: "critic", role: "reviewer", modelSelection: model("codex", "gpt-astra") }, + { seat: "scout", role: "researcher", modelSelection: model("deepseek", "deepseek-v4") }, + ], + ...(policy ? { limitedSeat: policy } : {}), + }); + const binding = { team: "research", role: "lead", workspace: "/repo" }; + const bindings = new Map(bound ? [[threadId, binding]] : []); + const shell = { + id: threadId, + title: "Migration plan", + projectId: ProjectId.make("project"), + modelSelection: model("claude", "claude-fable"), + lineage, + status: "failed", + lastErrorClass: "usage_limit", + usageLimitResetAt: RESET, + latestRunId: runId, + latestRunCompletedAt: DateTime.makeUnsafe("2026-11-22T11:59:00.000Z"), + updatedAt: DateTime.makeUnsafe("2026-11-22T11:59:00.000Z"), + archivedAt: null, + settledOverride: null, + pendingRuntimeRequest: null, + snoozedUntil: null, + limitRecovery: null as null | { + runId: RunId; + resetAt: string; + autoResume: boolean; + snooze?: boolean; + }, + }; + const created = new Map(); + const commands: Array = []; + const calls: Array = []; + const facts = (): LimitedSeatFacts => ({ + now: Date.parse(NOW), + projectId: shell.projectId, + providers, + threadLimits: [ + { instanceId: id("claude"), model: "claude-fable", resetAt: RESET }, + ...(limitedSeat ? [{ instanceId: id("codex"), model: "gpt-astra", resetAt: RESET }] : []), + ], + settings: { + ...DEFAULT_SERVER_SETTINGS, + providerInstances: Object.fromEntries( + providers.map((entry) => [entry.instanceId, { driver: entry.driver, enabled: true }]), + ), + favorites: favorites.map(([instanceId, slug]) => ({ provider: id(instanceId), model: slug })), + }, + }); + const delivery = { + threadState: (thread: ThreadId) => + Effect.succeed({ + binding: bindings.get(thread) ?? null, + pending: null, + ...(lineups.has(thread) ? { lineup: lineups.get(thread) } : {}), + }), + bindThread: (input: { threadId: ThreadId; driver: string; orchestration?: unknown }) => + Effect.sync(() => { + calls.push(`bind:${input.threadId}:${input.driver}`); + bindings.set(input.threadId, binding); + lineups.set(input.threadId, input.orchestration as DeliveryOrchestrationConfig); + return binding; + }), + setThreadLineup: (input: { threadId: ThreadId; orchestration: DeliveryOrchestrationConfig }) => + Effect.sync(() => { + calls.push(`lineup:${input.threadId}`); + lineups.set(input.threadId, input.orchestration); + return {}; + }), + } as unknown as DeliveryService.DeliveryService["Service"]; + const projections = { + getThreadShell: (thread: ThreadId) => Effect.succeed(thread === threadId ? shell : null), + findThread: (thread: ThreadId) => Effect.sync(() => created.get(thread) ?? null), + } as unknown as ProjectionStore.ProjectionStoreV2["Service"]; + const threads = { + dispatch: (command: OrchestrationV2ServerCommand) => + Effect.sync(() => { + commands.push(command); + calls.push(command.type); + if (command.type === "thread.fork" && !created.has(command.targetThreadId)) + created.set(command.targetThreadId, { + id: command.targetThreadId, + modelSelection: shell.modelSelection, + }); + if (command.type === "message.dispatch" && command.modelSelection) + created.get(command.threadId)!.modelSelection = command.modelSelection; + if (command.type === "thread.metadata.update" && command.limitRecovery) + shell.limitRecovery = { + runId: command.limitRecovery.runId, + resetAt: command.limitRecovery.resetAt, + autoResume: command.limitRecovery.autoResume ?? false, + }; + return { sequence: commands.length, storedEvents: [] }; + }), + } as unknown as ThreadManagementService.ThreadManagementService["Service"]; + const layer = LimitedSeatSwap.layer.pipe( + Layer.provide( + Layer.mergeAll( + Layer.succeed(DeliveryService.DeliveryService, delivery), + Layer.succeed(LimitedSeats.LimitedSeats, { facts: () => Effect.sync(facts) }), + Layer.succeed(ProjectionStore.ProjectionStoreV2, projections), + Layer.succeed(ThreadManagementService.ThreadManagementService, threads), + Layer.succeed(ProviderAdapterRegistry.ProviderAdapterRegistryV2, { + get: (instanceId: ProviderInstanceId) => Effect.succeed({ driver: instanceId }), + } as unknown as ProviderAdapterRegistry.ProviderAdapterRegistryV2["Service"]), + ), + ), + ); + return { layer, shell, commands, calls, lineups }; +} + +it.effect("hands a limited lead on to a linked thread on the first free favorite", () => { + const fixture = setup(); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + expect(yield* swaps.handOffLimitedLead(threadId)).toBe(target); + // Bound to the team first, disarmed, forked from the failed run, and only then started. + expect(fixture.calls).toEqual([ + `bind:${target}:kimi`, + "thread.metadata.update", + "thread.fork", + "message.dispatch", + ]); + expect(fixture.commands[1]).toMatchObject({ + sourceThreadId: threadId, + targetThreadId: target, + sourcePoint: { type: "run", runId }, + }); + expect(fixture.commands[2]).toMatchObject({ + threadId: target, + text: LimitedSeatSwap.LEAD_HANDOFF_MESSAGE, + // Deepseek is a favorite too, but a seat of the conversation already runs it. + modelSelection: { instanceId: "kimi", model: "kimi-k3" }, + }); + expect(fixture.lineups.get(target)).toEqual(fixture.lineups.get(threadId)); + expect((yield* swaps.status(threadId)).notices).toEqual([ + expect.objectContaining({ seat: null, state: "swapped", continuedIn: target }), + ]); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect( + "disarms the old thread's limit recovery, so the same work is never resumed there", + () => { + const fixture = setup(); + return Effect.gen(function* () { + const resumes = () => + limitRecoveryCommand(fixture.shell as never, true, Date.parse("2026-11-22T18:00:00.000Z")); + // Left alone, the recovery worker arms the thread and later sends its resume. + expect(resumes()).toMatchObject({ type: "thread.metadata.update" }); + yield* (yield* LimitedSeatSwap.LimitedSeatSwap).handOffLimitedLead(threadId); + expect(fixture.commands[0]).toMatchObject({ + type: "thread.metadata.update", + threadId, + limitRecovery: { runId, resetAt: RESET, autoResume: false, snooze: false }, + }); + expect(resumes()).toBeNull(); + }).pipe(Effect.provide(fixture.layer)); + }, +); + +it.effect("makes one thread however often the swap is asked for", () => { + const fixture = setup({ policy: "ask" }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + const [offer] = (yield* swaps.status(threadId)).notices; + expect(offer).toMatchObject({ seat: null, state: "offered", substitute: { model: "kimi-k3" } }); + // Ask me never hands on by itself. + expect(yield* swaps.handOffLimitedLead(threadId)).toBeNull(); + expect(fixture.commands).toHaveLength(0); + const input = { threadId, seat: null, modelSelection: offer!.substitute! }; + expect(yield* swaps.swap(input)).toEqual({ continuedIn: target }); + expect(yield* swaps.swap(input)).toEqual({ continuedIn: target }); + const ids = fixture.commands.map((command) => command.commandId); + // The second click repeats the same commands, which the orchestrator answers from receipts. + expect(ids.slice(3)).toEqual([ids[1], ids[2]]); + expect(new Set(ids).size).toBe(3); + expect(fixture.calls.filter((call) => call.startsWith("bind:"))).toHaveLength(1); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect("leaves the lead as it failed, with a notice, when no favorite is free", () => { + const fixture = setup({ favorites: [["deepseek", "deepseek-v4"]] }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + expect(yield* swaps.handOffLimitedLead(threadId)).toBeNull(); + expect(fixture.calls).toEqual([]); + expect((yield* swaps.status(threadId)).notices).toEqual([ + { seat: null, state: "none-free", substitute: null, limited: expect.anything() }, + ]); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect("refuses a model that is not a free favorite", () => { + const fixture = setup({ policy: "ask" }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + const refusal = yield* Effect.flip( + swaps.swap({ threadId, seat: null, modelSelection: model("codex", "gpt-sol") }), + ); + expect(refusal.detail).toContain("no longer free"); + expect(fixture.calls).toEqual([]); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect("carries the lineup to a conversation bound to no team", () => { + const fixture = setup({ bound: false }); + return Effect.gen(function* () { + yield* (yield* LimitedSeatSwap.LimitedSeatSwap).handOffLimitedLead(threadId); + expect(fixture.calls[0]).toBe(`lineup:${target}`); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect("records the substitute a person agreed to for a seat, once", () => { + const fixture = setup({ policy: "ask", limitedSeat: true }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + const offer = (yield* swaps.status(threadId)).notices.find( + (notice) => notice.seat === "critic", + ); + expect(offer).toMatchObject({ state: "offered", substitute: { model: "kimi-k3" } }); + const input = { threadId, seat: "critic", modelSelection: offer!.substitute! }; + expect(yield* swaps.swap(input)).toEqual({ continuedIn: null }); + expect(yield* swaps.swap(input)).toEqual({ continuedIn: null }); + expect(fixture.calls).toEqual([`lineup:${threadId}`]); + expect(fixture.lineups.get(threadId)?.participants[0]?.substitute).toEqual(offer!.substitute); + expect( + (yield* swaps.status(threadId)).notices.find((notice) => notice.seat === "critic"), + ).toMatchObject({ state: "swapped", substitute: { model: "kimi-k3" } }); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect.each([ + { name: "an ordinary chat", options: { ordinary: true } }, + { name: "a board task's conversation", options: { lineage: { engineIntake: "task-1" } } }, +])("does not govern $name", ({ options }) => { + const fixture = setup(options); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + expect(yield* swaps.status(threadId)).toEqual({ policy: null, notices: [] }); + expect(yield* swaps.handOffLimitedLead(threadId)).toBeNull(); + expect(fixture.calls).toEqual([]); + }).pipe(Effect.provide(fixture.layer)); +}); diff --git a/apps/server/src/delivery/LimitedSeatSwap.ts b/apps/server/src/delivery/LimitedSeatSwap.ts new file mode 100644 index 0000000000000..7cd759c67344c --- /dev/null +++ b/apps/server/src/delivery/LimitedSeatSwap.ts @@ -0,0 +1,399 @@ +import { + CommandId, + DeliveryError, + type DeliveryLimitedSeatNotice, + deliveryLimitedSeatPolicy, + type DeliveryLimitedSeatStatus, + type DeliveryLimitedSeatSwapInput, + type DeliveryLimitedSeatSwapResult, + type DeliveryOrchestrationConfig, + isServerOwnedThreadLineage, + MessageId, + type ModelSelection, + type OrchestrationV2ServerCommand, + type OrchestrationV2ThreadShell, + type RunId, + ThreadId, +} from "@t3tools/contracts"; +import { + firstFreeFavorite, + isFreeCandidate, + limitedLeadPool, + limitedSeatPool, + seatLimit, + seatModelOf, + type SeatModel, +} from "@t3tools/shared/limitedSeat"; +import { createModelSelection } from "@t3tools/shared/model"; +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as Option from "effect/Option"; +import * as Stream from "effect/Stream"; + +import * as Orchestrator from "../orchestration-v2/Orchestrator.ts"; +import * as ProjectionStore from "../orchestration-v2/ProjectionStore.ts"; +import * as ProviderAdapterRegistry from "../orchestration-v2/ProviderAdapterRegistry.ts"; +import * as ThreadManagementService from "../orchestration-v2/ThreadManagementService.ts"; +import { forkParked } from "../serverActivation.ts"; +import * as DeliveryService from "./DeliveryService.ts"; +import * as LimitedSeats from "./LimitedSeats.ts"; + +/** What a lead handed on to a new thread is told, as limit recovery tells a thread it resumes. */ +export const LEAD_HANDOFF_MESSAGE = "Continue where you left off."; + +/** The thread a limited lead's run is handed on to. One per run, however often it is asked for. */ +export const leadHandoffThreadId = (runId: RunId) => ThreadId.make(`limited-lead:${runId}`); + +/** + * What hands a limited lead on, in order. The old thread's resume is disarmed first, so the same + * work is never run twice and a refusal creates nothing; then the fork, then its first turn on + * the substitute, which carries the handoff summary. Every id follows from the failed run. + */ +export function leadHandoffCommands(input: { + readonly threadId: ThreadId; + readonly title: string; + readonly runId: RunId; + /** The reset the old thread would resume at; null when there is none to disarm. */ + readonly resetAt: string | null; + readonly substitute: ModelSelection; +}): ReadonlyArray { + const identity = `limited-lead:${input.threadId}:${input.runId}`; + const target = leadHandoffThreadId(input.runId); + return [ + ...(input.resetAt === null + ? [] + : [ + { + type: "thread.metadata.update" as const, + commandId: CommandId.make(`${identity}:disarm`), + threadId: input.threadId, + limitRecovery: { + runId: input.runId, + resetAt: input.resetAt, + autoResume: false, + snooze: false, + }, + }, + ]), + { + type: "thread.fork", + commandId: CommandId.make(`${identity}:fork`), + sourceThreadId: input.threadId, + targetThreadId: target, + sourcePoint: { type: "run", runId: input.runId }, + title: input.title, + createdBy: "system", + creationSource: "server", + }, + { + type: "message.dispatch", + commandId: CommandId.make(`${identity}:continue`), + messageId: MessageId.make(`${identity}:continue`), + threadId: target, + text: LEAD_HANDOFF_MESSAGE, + attachments: [], + modelSelection: input.substitute, + dispatchMode: { type: "start_immediately" }, + createdBy: "agent", + creationSource: "server", + }, + ]; +} + +export class LimitedSeatSwap extends Context.Service< + LimitedSeatSwap, + { + readonly status: ( + threadId: ThreadId, + ) => Effect.Effect; + /** One click of the notice. Repeating it changes nothing and starts nothing twice. */ + readonly swap: ( + input: DeliveryLimitedSeatSwapInput, + ) => Effect.Effect; + /** + * Hands a limited lead on when its conversation swaps automatically. Null where there is + * nothing to hand on: no limit, another setting, or no free favorite. + */ + readonly handOffLimitedLead: (threadId: ThreadId) => Effect.Effect; + } +>()("t3/delivery/LimitedSeatSwap") {} + +const refused = (detail: string) => new DeliveryError({ reason: "invalid", detail }); +const storage = (cause: unknown) => + new DeliveryError({ + reason: "storage", + detail: + cause instanceof Error + ? cause.message || "Thread state could not be read." + : "Thread state could not be read.", + }); + +/** The usage limit a thread's latest run failed on, while it has not reset. */ +function leadLimit(shell: OrchestrationV2ThreadShell, now: number) { + if ( + shell.status !== "failed" || + shell.lastErrorClass !== "usage_limit" || + shell.latestRunId === null || + shell.archivedAt !== null || + (shell.usageLimitResetAt != null && Date.parse(shell.usageLimitResetAt) <= now) + ) + return null; + return { + runId: shell.latestRunId, + limited: { ...seatModelOf(shell.modelSelection), resetAt: shell.usageLimitResetAt ?? null }, + }; +} + +const selectionOf = (model: SeatModel): ModelSelection => + createModelSelection(model.instanceId, model.model); + +const make = Effect.gen(function* () { + const deliveryOption = yield* Effect.serviceOption(DeliveryService.DeliveryService); + const limitedSeats = yield* LimitedSeats.LimitedSeats; + const projections = yield* ProjectionStore.ProjectionStoreV2; + const threads = yield* ThreadManagementService.ThreadManagementService; + const adapters = yield* ProviderAdapterRegistry.ProviderAdapterRegistryV2; + + /** The conversation as this setting governs it, or null where it does not. */ + const governed = Effect.fn("LimitedSeatSwap.governed")(function* (threadId: ThreadId) { + if (Option.isNone(deliveryOption)) return null; + const shell = yield* projections.getThreadShell(threadId).pipe(Effect.mapError(storage)); + if ( + shell === null || + isServerOwnedThreadLineage(shell.lineage) || + shell.lineage.relationshipToParent === "subagent" || + shell.lineage.sideChat === true + ) + return null; + const state = yield* deliveryOption.value.threadState(threadId); + if (state.lineup === undefined) return null; + return { + delivery: deliveryOption.value, + shell, + state, + lineup: state.lineup, + facts: yield* limitedSeats.facts(threadId), + }; + }); + + const status: LimitedSeatSwap["Service"]["status"] = Effect.fn("LimitedSeatSwap.status")( + function* (threadId) { + const conversation = yield* governed(threadId); + if (conversation === null) return { policy: null, notices: [] }; + const { shell, lineup, facts } = conversation; + const policy = deliveryLimitedSeatPolicy(lineup); + const notices: Array = []; + const lead = leadLimit(shell, facts.now); + if (lead !== null) { + const continued = yield* projections + .findThread(leadHandoffThreadId(lead.runId)) + .pipe(Effect.mapError(storage)); + if (continued !== null) { + notices.push({ + seat: null, + limited: lead.limited, + state: "swapped", + substitute: continued.modelSelection, + continuedIn: continued.id, + }); + } else if (policy !== "skip") { + const free = firstFreeFavorite( + limitedLeadPool({ facts, roster: lineup.participants, lead: shell.modelSelection }), + ); + notices.push({ + seat: null, + limited: lead.limited, + state: free === null ? "none-free" : "offered", + substitute: free === null ? null : selectionOf(free), + }); + } + } + if (policy !== "skip") { + for (const seat of lineup.participants) { + const limit = seatLimit(facts, seatModelOf(seat.modelSelection)); + if (limit === null) continue; + const pool = limitedSeatPool({ + facts, + roster: lineup.participants, + lead: shell.modelSelection, + seat, + }); + const limited = { + instanceId: limit.instanceId, + model: limit.model, + resetAt: limit.resetAt, + }; + const free = firstFreeFavorite(pool); + const asks = policy === "ask" || seat.picked === true; + if (asks && seat.substitute && isFreeCandidate(pool, seatModelOf(seat.substitute))) { + notices.push({ + seat: seat.seat, + limited, + state: "swapped", + substitute: seat.substitute, + }); + } else if (free === null) { + notices.push({ seat: seat.seat, limited, state: "none-free", substitute: null }); + } else if (asks) { + notices.push({ + seat: seat.seat, + limited, + state: "offered", + substitute: selectionOf(free), + }); + } + } + } + return { policy, notices }; + }, + ); + + const handOffLead = Effect.fn("LimitedSeatSwap.handOffLead")(function* ( + conversation: NonNullable>>, + /** The model a person clicked; absent, the first free favorite. */ + chosen: ModelSelection | undefined, + ) { + const { delivery, shell, state, lineup, facts } = conversation; + const lead = leadLimit(shell, facts.now); + if (lead === null) return yield* refused("This conversation's lead is not limited now."); + const target = leadHandoffThreadId(lead.runId); + const existing = yield* projections.findThread(target).pipe(Effect.mapError(storage)); + const pool = limitedLeadPool({ + facts, + roster: lineup.participants, + lead: shell.modelSelection, + }); + const free = firstFreeFavorite(pool); + // A hand-off already made keeps its model: a second click or sweep only finishes it. + const substitute = + existing !== null + ? existing.modelSelection + : chosen !== undefined + ? isFreeCandidate(pool, seatModelOf(chosen)) + ? chosen + : yield* refused(`${chosen.model} is no longer free. Choose again from the notice.`) + : free === null + ? yield* refused("No favorite model is free.") + : selectionOf(free); + const dispatch = (command: Parameters[0]) => + threads + .dispatch(command) + .pipe( + Effect.mapError( + (cause) => + new DeliveryError({ reason: "refused", detail: cause.message || "Refused." }), + ), + ); + // The team's roles and tools are bound to the thread before it exists, as a seat's are. + const targetState = yield* delivery.threadState(target); + if (state.binding !== null && targetState.binding === null) { + const adapter = yield* adapters + .get(substitute.instanceId) + .pipe(Effect.mapError(() => refused(`${substitute.model}'s provider is unavailable.`))); + yield* delivery.bindThread({ + threadId: target, + team: state.binding.team, + role: state.binding.role, + driver: adapter.driver, + cwd: state.binding.workspace, + orchestration: lineup, + }); + } else if (state.binding === null && targetState.lineup === undefined) { + yield* delivery.setThreadLineup({ threadId: target, orchestration: lineup }); + } + for (const command of leadHandoffCommands({ + threadId: shell.id, + title: shell.title, + runId: lead.runId, + // Nothing to disarm when no reset is known, or a person already turned the resume off. + resetAt: + shell.limitRecovery?.runId === lead.runId && shell.limitRecovery.autoResume === false + ? null + : lead.limited.resetAt, + substitute, + })) + yield* dispatch(command); + return target; + }); + + const swap: LimitedSeatSwap["Service"]["swap"] = Effect.fn("LimitedSeatSwap.swap")( + function* (input) { + const conversation = yield* governed(input.threadId); + if (conversation === null) + return yield* refused("This conversation has no setting for a limited seat."); + if (input.seat === null) + return { continuedIn: yield* handOffLead(conversation, input.modelSelection) }; + const { delivery, shell, lineup, facts } = conversation; + const seat = lineup.participants.find((candidate) => candidate.seat === input.seat); + if (seat === undefined) return yield* refused(`${input.seat} is not in this conversation.`); + const chosen = seatModelOf(input.modelSelection); + const agreed = seat.substitute; + if (agreed?.instanceId === chosen.instanceId && agreed.model === chosen.model) + return { continuedIn: null }; + if (seatLimit(facts, seatModelOf(seat.modelSelection)) === null) + return yield* refused(`${input.seat} is not limited now.`); + const pool = limitedSeatPool({ + facts, + roster: lineup.participants, + lead: shell.modelSelection, + seat, + }); + if (!isFreeCandidate(pool, chosen)) + return yield* refused(`${chosen.model} is no longer free. Choose again from the notice.`); + const orchestration: DeliveryOrchestrationConfig = { + ...lineup, + participants: lineup.participants.map((candidate) => + candidate.seat === seat.seat + ? { ...candidate, substitute: input.modelSelection } + : candidate, + ), + }; + yield* delivery.setThreadLineup({ threadId: input.threadId, orchestration }); + return { continuedIn: null }; + }, + ); + + const handOffLimitedLead: LimitedSeatSwap["Service"]["handOffLimitedLead"] = Effect.fn( + "LimitedSeatSwap.handOffLimitedLead", + )( + function* (threadId) { + const conversation = yield* governed(threadId); + if ( + conversation === null || + deliveryLimitedSeatPolicy(conversation.lineup) !== "swap" || + leadLimit(conversation.shell, conversation.facts.now) === null + ) + return null; + return yield* handOffLead(conversation, undefined); + }, + // No free favorite, or a refusal: the thread stays as it failed, with its notice. + (effect, threadId) => + effect.pipe( + Effect.catchCause((cause) => + Effect.logInfo("limited-seats.lead-not-handed-on", { threadId, cause }).pipe( + Effect.as(null), + ), + ), + ), + ); + + return LimitedSeatSwap.of({ status, swap, handOffLimitedLead }); +}); + +export const layer = Layer.effect(LimitedSeatSwap, make); + +/** Hands a limited lead on as soon as its turn fails, where the conversation swaps automatically. */ +export const layerWorker = Layer.effectDiscard( + Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap; + const orchestrator = yield* Orchestrator.OrchestratorV2; + yield* forkParked( + Stream.runForEach(orchestrator.streamDomainEvents, (event) => + event.type === "run.updated" && event.payload.status === "failed" + ? swaps.handOffLimitedLead(event.threadId) + : Effect.void, + ), + ); + }), +); diff --git a/apps/server/src/delivery/NativeTeamChat.test.ts b/apps/server/src/delivery/NativeTeamChat.test.ts index 281109fdba005..efd8e1e6a6433 100644 --- a/apps/server/src/delivery/NativeTeamChat.test.ts +++ b/apps/server/src/delivery/NativeTeamChat.test.ts @@ -882,8 +882,16 @@ const limitedProvider = (instanceId: string, driver: string, limited = false): S ? { usageLimits: { checkedAt: "2026-11-22T11:00:00.000Z", - windows: [{ id: "primary", label: "5 hours", usedPercent: 100, resetsAt: LIMIT_RESET }], - } as NonNullable, + windows: [ + { + id: "primary", + kind: "session", + label: "5 hours", + usedPercent: 100, + resetsAt: LIMIT_RESET, + }, + ], + }, } : {}), }); diff --git a/apps/server/src/delivery/NativeTeamChat.ts b/apps/server/src/delivery/NativeTeamChat.ts index 47e1087d344bb..63f67e093cb39 100644 --- a/apps/server/src/delivery/NativeTeamChat.ts +++ b/apps/server/src/delivery/NativeTeamChat.ts @@ -13,8 +13,9 @@ import { import { projectComposerContextForProvider } from "@t3tools/shared/composerContextReferences"; import { firstFreeFavorite, + isFreeCandidate, type LimitedSeatFacts, - limitedSeatCandidates, + limitedSeatPool, seatLimit, seatModelOf, } from "@t3tools/shared/limitedSeat"; @@ -317,38 +318,18 @@ export const make = Effect.gen(function* () { yield* recordSkip(seat.seat, `${limited} Left out of this message.`); return undefined; } - const pool = limitedSeatCandidates({ + const pool = limitedSeatPool({ facts, - limited: own, - inUse: [ - seatModelOf(parent.thread.modelSelection), - ...roster - .filter((other) => other.seat !== seat.seat) - .map(runsOn) - .map(seatModelOf), - ], - builderModels: - seat.duty === "qa" - ? roster - .flatMap((other) => - other.duty === "build" ? [other.modelSelection, runsOn(other)] : [], - ) - .map(seatModelOf) - : undefined, + roster, + lead: parent.thread.modelSelection, + seat, + runsOn, }); const free = firstFreeFavorite(pool); const none = `${limited} No favorite model is free, so ${seat.seat} waits.`; if (policy === "ask" || seat.picked === true) { const agreed = seat.substitute; - if ( - agreed !== undefined && - pool.some( - (candidate) => - candidate.skip === null && - candidate.instanceId === agreed.instanceId && - candidate.model === agreed.model, - ) - ) + if (agreed !== undefined && isFreeCandidate(pool, seatModelOf(agreed))) return { selection: agreed, substituteFor } satisfies StandIn; yield* recordSkip( seat.seat, diff --git a/apps/server/src/observability/RpcInstrumentation.ts b/apps/server/src/observability/RpcInstrumentation.ts index ddcd3bbd235c7..3d945f56382f2 100644 --- a/apps/server/src/observability/RpcInstrumentation.ts +++ b/apps/server/src/observability/RpcInstrumentation.ts @@ -18,6 +18,8 @@ const RPC_AGGREGATES = { [WS_METHODS.deliveryThreadBinding]: "delivery", [WS_METHODS.deliveryReleaseThread]: "delivery", [WS_METHODS.deliverySetThreadLineup]: "delivery", + [WS_METHODS.deliveryLimitedSeats]: "delivery", + [WS_METHODS.deliverySwapLimitedSeat]: "delivery", [WS_METHODS.serverSubscribeCheckoutUpdate]: "server", [WS_METHODS.serverCheckCheckoutUpdate]: "server", [WS_METHODS.serverStartCheckoutUpdate]: "server", diff --git a/apps/server/src/orchestration-v2/runtimeLayer.test.ts b/apps/server/src/orchestration-v2/runtimeLayer.test.ts index 8e38f5204c970..99b1b36437d17 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.test.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.test.ts @@ -1,6 +1,7 @@ import { PullRequestProviderError } from "@t3tools/source-control-core/server/PullRequestProvider"; import { PullRequestUnavailableError, SourceControlProviderKind } from "@t3tools/contracts"; import { limitRecoveryCommand } from "./UsageLimitRecoveryWorker.ts"; +import { leadHandoffCommands, leadHandoffThreadId } from "../delivery/LimitedSeatSwap.ts"; import { createOrchestrationV2TurnItemVisibility } from "@t3tools/shared/orchestrationV2Timeline"; import * as McpProviderSessions from "@t3tools/provider-core/server/McpProviderSessions"; import * as SourceControlProviderRegistry from "../sourceControl/SourceControlProviderRegistry.ts"; @@ -13353,6 +13354,124 @@ it.layer(layerSharedApplicationDataPlaneTest)("shared application data plane", ( }); it.layer(layerTest)("usage-limit recovery", (it) => { + it.effect("hands a limited lead on to a linked thread once, and stops its own resume", () => + Effect.gen(function* () { + const orchestrator = yield* Orchestrator.OrchestratorV2; + const events = yield* EventSink.EventSinkV2; + const threadId = ThreadId.make("limited-lead"); + const projectId = ProjectId.make("limited-lead:project"); + const now = yield* DateTime.now; + yield* seedProject({ + projectId, + title: "Hand-off project", + workspaceRoot: process.cwd(), + defaultModelSelection: modelSelection, + createdAt: DateTime.formatIso(now), + }); + yield* orchestrator.dispatch({ + type: "thread.create", + commandId: CommandId.make("limited-lead:create"), + threadId, + projectId, + title: "Limited lead", + modelSelection, + runtimeMode: "full-access", + interactionMode: "default", + branch: null, + worktreePath: null, + createdBy: "user", + creationSource: "web", + }); + yield* orchestrator.dispatch({ + type: "message.dispatch", + commandId: CommandId.make("limited-lead:start"), + threadId, + messageId: MessageId.make("limited-lead:start"), + text: "Start work.", + attachments: [], + dispatchMode: { type: "defer_start" }, + createdBy: "user", + creationSource: "web", + }); + const [source] = (yield* orchestrator.getThreadProjection(threadId)).runs as [ + OrchestrationV2Run, + ]; + const resetAt = DateTime.formatIso(DateTime.add(now, { minutes: 1 })); + yield* events.write({ + events: [ + { + id: EventId.make("limited-lead:failed"), + type: "run.updated", + threadId, + occurredAt: now, + payload: { ...source, status: "failed", completedAt: now }, + }, + { + id: EventId.make("limited-lead:error"), + type: "turn-item.updated", + threadId, + occurredAt: now, + payload: { + id: TurnItemId.make("limited-lead:error"), + type: "error", + threadId, + runId: source.id, + nodeId: source.rootNodeId, + providerThreadId: null, + providerTurnId: null, + nativeItemRef: null, + parentItemId: null, + ordinal: 2, + status: "failed", + title: "Usage limit reached", + startedAt: now, + completedAt: now, + updatedAt: now, + failure: { + class: "usage_limit", + message: "Plan limit reached.", + code: "usageLimitExceeded", + retryable: null, + resetAt, + }, + }, + }, + ], + }); + const shellOf = Effect.map(orchestrator.getShellSnapshot(), (snapshot) => + snapshot.threads.find((thread) => thread.id === threadId)!, + ); + // Left alone, the recovery worker would arm this thread and resume it at the reset. + assert.isNotNull(limitRecoveryCommand(yield* shellOf, true, DateTime.toEpochMillis(now))); + + const substitute = { instanceId: alternateInstanceId, model: "gpt-5.4" }; + const handOff = leadHandoffCommands({ + threadId, + title: "Limited lead", + runId: source.id, + resetAt, + substitute, + }); + // The notice's button pressed twice: every command is sent again. + for (const command of [...handOff, ...handOff]) yield* orchestrator.dispatch(command); + + const target = leadHandoffThreadId(source.id); + const continued = yield* orchestrator.getThreadProjection(target); + assert.deepInclude(continued.thread.lineage, { + parentThreadId: threadId, + relationshipToParent: "fork", + }); + assert.deepEqual(continued.thread.forkedFrom, { type: "run", threadId, runId: source.id }); + assert.lengthOf(continued.runs, 1); + assert.equal(continued.runs[0]?.providerInstanceId, alternateInstanceId); + + const old = yield* shellOf; + assert.deepInclude(old.limitRecovery, { runId: source.id, autoResume: false }); + assert.isNull(limitRecoveryCommand(old, true, Date.parse(resetAt))); + assert.lengthOf((yield* orchestrator.getThreadProjection(threadId)).runs, 1); + }), + ); + it.effect.each(["interrupted", "usage_limit"] as const)( "manually resumes an %s run ahead of its queued message only once", (reason) => diff --git a/apps/server/src/orchestration-v2/runtimeLayer.ts b/apps/server/src/orchestration-v2/runtimeLayer.ts index cb64368bc3113..832b52d39016a 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.ts @@ -2,6 +2,7 @@ import * as SendFailureNotice from "./SendFailureNotice.ts"; import * as WorktreeBranchSync from "./WorktreeBranchSync.ts"; import * as GuestShareService from "../guest/GuestShareService.ts"; import * as LimitedSeats from "../delivery/LimitedSeats.ts"; +import * as LimitedSeatSwap from "../delivery/LimitedSeatSwap.ts"; import * as NativeTeamChat from "../delivery/NativeTeamChat.ts"; import * as UsageLimitRecoveryWorker from "./UsageLimitRecoveryWorker.ts"; import * as Scheduler from "../scheduling/Scheduler.ts"; @@ -278,6 +279,16 @@ const layerThreadManagementProvided = ThreadManagementService.layerWithLegacyImp ), ); const layerLimitedSeatsProvided = LimitedSeats.layer.pipe(Layer.provide(ProjectionStore.layer)); +const layerLimitedSeatSwapProvided = LimitedSeatSwap.layer.pipe( + Layer.provide( + Layer.mergeAll( + layerLimitedSeatsProvided, + layerThreadManagementProvided, + ProjectionStore.layer, + ProviderAdapterRegistry.layerFromProviderInstanceRegistry, + ), + ), +); const layerNativeTeamChatProvided = NativeTeamChat.layer.pipe( Layer.provide( Layer.mergeAll( @@ -451,6 +462,10 @@ export const layerProduction = Layer.mergeAll( ), ), ), + layerLimitedSeatSwapProvided, + LimitedSeatSwap.layerWorker.pipe( + Layer.provide(Layer.merge(layerLimitedSeatSwapProvided, layerOrchestratorProvided)), + ), layerProviderContinuationWorkerProvided, layerAgentSessionScannerProvided, layerAgentSessionImporterProvided, diff --git a/apps/server/src/ws.ts b/apps/server/src/ws.ts index a391562d28359..09549172f4a39 100644 --- a/apps/server/src/ws.ts +++ b/apps/server/src/ws.ts @@ -27,6 +27,7 @@ import * as Stream from "effect/Stream"; import { rpcInitialItems } from "./rpcInitialItems.ts"; import { subscribeChatGptHandoff } from "./provider/CodexChatGptHandoff.ts"; import { + DeliveryError, AcpRegistryOperationError, CommandId, authScopeResponse, @@ -258,6 +259,7 @@ import { commandFeatureUsage, featureUsage } from "./telemetry/FeatureUsage.ts"; import type { TelemetryOwner } from "./telemetry/Identify.ts"; import * as UsageService from "./usage/UsageService.ts"; import * as DeliveryService from "./delivery/DeliveryService.ts"; +import * as LimitedSeatSwap from "./delivery/LimitedSeatSwap.ts"; import * as TraceDiagnostics from "./diagnostics/TraceDiagnostics.ts"; import * as TriageService from "./triage/TriageService.ts"; import * as PullRequestService from "./pullRequest/PullRequestService.ts"; @@ -3692,6 +3694,7 @@ const layerForkWsRpc = (currentSession: EnvironmentAuth.AuthenticatedSession) => Effect.gen(function* () { const checkoutUpdate = yield* CheckoutUpdate.CheckoutUpdate; const delivery = yield* DeliveryService.DeliveryService; + const limitedSeatSwap = yield* Effect.serviceOption(LimitedSeatSwap.LimitedSeatSwap); return ForkServerWsRpcGroup.of({ [WS_METHODS.serverSubscribeCheckoutUpdate]: (_input) => checkoutUpdate.states, [WS_METHODS.serverCheckCheckoutUpdate]: (_input) => @@ -3710,6 +3713,19 @@ const layerForkWsRpc = (currentSession: EnvironmentAuth.AuthenticatedSession) => [WS_METHODS.deliveryThreadBinding]: (input) => delivery.threadState(input.threadId), [WS_METHODS.deliveryReleaseThread]: (input) => delivery.releaseThread(input.threadId), [WS_METHODS.deliverySetThreadLineup]: (input) => delivery.setThreadLineup(input), + [WS_METHODS.deliveryLimitedSeats]: (input) => + Option.match(limitedSeatSwap, { + onNone: () => Effect.succeed({ policy: null, notices: [] }), + onSome: (swaps) => swaps.status(input.threadId), + }), + [WS_METHODS.deliverySwapLimitedSeat]: (input) => + Option.match(limitedSeatSwap, { + onNone: () => + Effect.fail( + new DeliveryError({ reason: "disabled", detail: "Delivery is turned off." }), + ), + onSome: (swaps) => swaps.swap(input), + }), }); }), ); diff --git a/packages/contracts/src/delivery.ts b/packages/contracts/src/delivery.ts index bb89bf61ff97f..f4e10449d78a5 100644 --- a/packages/contracts/src/delivery.ts +++ b/packages/contracts/src/delivery.ts @@ -1,7 +1,8 @@ // Relay engine-owned payloads as JSON; type only the state T3 stores or acts on. import * as Schema from "effect/Schema"; -import { ThreadId, TrimmedNonEmptyString } from "./baseSchemas.ts"; +import { IsoDateTime, ThreadId, TrimmedNonEmptyString } from "./baseSchemas.ts"; +import { ProviderInstanceId } from "./providerInstance.ts"; import { ModelSelection } from "./modelSelection.ts"; /** What a conversation does when a seat's model has reached its usage limit. */ @@ -249,6 +250,48 @@ export const DeliverySetThreadLineupInput = Schema.Struct({ export type DeliverySetThreadLineupInput = typeof DeliverySetThreadLineupInput.Type; export const DeliveryThreadBindingInput = Schema.Struct({ threadId: ThreadId }); + +/** A seat, or the lead, whose model has reached its usage limit, and what could stand in. */ +export const DeliveryLimitedSeatNotice = Schema.Struct({ + /** The seat's name; null for the conversation's lead. */ + seat: Schema.NullOr(TrimmedNonEmptyString), + limited: Schema.Struct({ + instanceId: ProviderInstanceId, + model: TrimmedNonEmptyString, + resetAt: Schema.NullOr(IsoDateTime), + }), + /** + * `offered`: one click swaps to `substitute`. `none-free`: no favorite is free, so the seat + * waits. `swapped`: `substitute` stands in, for a lead in the thread `continuedIn`. + */ + state: Schema.Literals(["offered", "none-free", "swapped"]), + /** The first free favorite, or the model that stands in. Null when none is free. */ + substitute: Schema.NullOr(ModelSelection), + /** The thread a limited lead was handed on to. */ + continuedIn: Schema.optional(ThreadId), +}); +export type DeliveryLimitedSeatNotice = typeof DeliveryLimitedSeatNotice.Type; + +export const DeliveryLimitedSeatStatus = Schema.Struct({ + /** Null where this setting does not govern: an ordinary chat, or a board task's conversation. */ + policy: Schema.NullOr(DeliveryLimitedSeatPolicy), + notices: Schema.Array(DeliveryLimitedSeatNotice), +}); +export type DeliveryLimitedSeatStatus = typeof DeliveryLimitedSeatStatus.Type; + +/** Swaps a limited seat, or the lead when `seat` is null, to a favorite the status offered. */ +export const DeliveryLimitedSeatSwapInput = Schema.Struct({ + threadId: ThreadId, + seat: Schema.NullOr(TrimmedNonEmptyString), + modelSelection: ModelSelection, +}); +export type DeliveryLimitedSeatSwapInput = typeof DeliveryLimitedSeatSwapInput.Type; + +export const DeliveryLimitedSeatSwapResult = Schema.Struct({ + /** The thread the conversation continues in, when its lead was handed on. */ + continuedIn: Schema.NullOr(ThreadId), +}); +export type DeliveryLimitedSeatSwapResult = typeof DeliveryLimitedSeatSwapResult.Type; export type DeliveryThreadBindingInput = typeof DeliveryThreadBindingInput.Type; export class DeliveryError extends Schema.TaggedError()("DeliveryError", { diff --git a/packages/contracts/src/rpc.ts b/packages/contracts/src/rpc.ts index a45f1dc296a3b..bc467be44c414 100644 --- a/packages/contracts/src/rpc.ts +++ b/packages/contracts/src/rpc.ts @@ -65,6 +65,9 @@ import { DeliveryActInput, DeliveryBindThreadInput, DeliverySetThreadLineupInput, + DeliveryLimitedSeatStatus, + DeliveryLimitedSeatSwapInput, + DeliveryLimitedSeatSwapResult, DeliveryError, DeliveryReadInput, DeliveryResponse, @@ -638,6 +641,8 @@ export const WS_METHODS = { deliveryThreadBinding: "delivery.threadBinding", deliveryReleaseThread: "delivery.releaseThread", deliverySetThreadLineup: "delivery.setThreadLineup", + deliveryLimitedSeats: "delivery.limitedSeats", + deliverySwapLimitedSeat: "delivery.swapLimitedSeat", scheduledTasksList: "scheduledTasks.list", scheduledTasksSubscribe: "scheduledTasks.subscribe", scheduledTasksUpsert: "scheduledTasks.upsert", @@ -1200,6 +1205,20 @@ const WsDeliverySetThreadLineupRpc = Rpc.make(WS_METHODS.deliverySetThreadLineup error: Schema.Union([EnvironmentAuthorizationError, DeliveryError]), }); +/** Which seats of a conversation are limited now, and what could stand in for each. */ +const WsDeliveryLimitedSeatsRpc = Rpc.make(WS_METHODS.deliveryLimitedSeats, { + payload: DeliveryThreadBindingInput, + success: DeliveryLimitedSeatStatus, + error: Schema.Union([EnvironmentAuthorizationError, DeliveryError]), +}); + +/** Swaps one limited seat, or hands a limited lead on to a linked thread. Safe to repeat. */ +const WsDeliverySwapLimitedSeatRpc = Rpc.make(WS_METHODS.deliverySwapLimitedSeat, { + payload: DeliveryLimitedSeatSwapInput, + success: DeliveryLimitedSeatSwapResult, + error: Schema.Union([EnvironmentAuthorizationError, DeliveryError]), +}); + /** Gives up a team choice whose setup never completed, so the thread can start without a team. */ const WsDeliveryReleaseThreadRpc = Rpc.make(WS_METHODS.deliveryReleaseThread, { payload: DeliveryThreadBindingInput, @@ -2717,6 +2736,8 @@ export const ForkWsRpcGroup = RpcGroup.make( WsDeliveryThreadBindingRpc, WsDeliveryReleaseThreadRpc, WsDeliverySetThreadLineupRpc, + WsDeliveryLimitedSeatsRpc, + WsDeliverySwapLimitedSeatRpc, WsServerSubscribeCheckoutUpdateRpc, WsServerCheckCheckoutUpdateRpc, WsServerStartCheckoutUpdateRpc, diff --git a/packages/shared/src/limitedSeat.test.ts b/packages/shared/src/limitedSeat.test.ts index 2fc1b5ac76cbc..bb13d1592ebe4 100644 --- a/packages/shared/src/limitedSeat.test.ts +++ b/packages/shared/src/limitedSeat.test.ts @@ -41,10 +41,12 @@ function provider( }; } -const exhausted = { +const exhausted: NonNullable = { checkedAt: "2026-11-22T11:00:00.000Z", - windows: [{ id: "primary", label: "5 hours", usedPercent: 100, resetsAt: later }], -} as NonNullable; + windows: [ + { id: "primary", kind: "session", label: "5 hours", usedPercent: 100, resetsAt: later }, + ], +}; const favorite = (instanceId: string, model: string) => ({ provider: id(instanceId), model }); const seat = (instanceId: string, model: string) => ({ instanceId: id(instanceId), model }); diff --git a/packages/shared/src/limitedSeat.ts b/packages/shared/src/limitedSeat.ts index 813fd2ed40921..76d278a92b06e 100644 --- a/packages/shared/src/limitedSeat.ts +++ b/packages/shared/src/limitedSeat.ts @@ -153,3 +153,64 @@ export const seatModelOf = (selection: ModelSelection): SeatModel => ({ instanceId: selection.instanceId, model: selection.model, }); + +/** A seat of a conversation, as the limited-seat rule reads it. */ +export interface LimitedSeatRosterSeat { + readonly seat: string; + readonly modelSelection: ModelSelection; + readonly duty?: "build" | "qa" | undefined; +} + +/** The pool for one seat of a conversation: every other seat's model and the lead's are in use. */ +export function limitedSeatPool(input: { + readonly facts: LimitedSeatFacts; + readonly roster: ReadonlyArray; + readonly lead: ModelSelection; + readonly seat: Seat; + /** What a seat runs on this turn, when a substitute already stands in for it. */ + readonly runsOn?: (seat: Seat) => ModelSelection; +}): ReadonlyArray { + const runsOn = input.runsOn ?? ((seat: Seat) => seat.modelSelection); + return limitedSeatCandidates({ + facts: input.facts, + limited: seatModelOf(input.seat.modelSelection), + inUse: [ + seatModelOf(input.lead), + ...input.roster + .filter((other) => other.seat !== input.seat.seat) + .map((other) => seatModelOf(runsOn(other))), + ], + builderModels: + input.seat.duty === "qa" + ? input.roster + .flatMap((other) => + other.duty === "build" ? [other.modelSelection, runsOn(other)] : [], + ) + .map(seatModelOf) + : undefined, + }); +} + +/** The pool for the lead of a conversation: every seat's model is in use. */ +export const limitedLeadPool = (input: { + readonly facts: LimitedSeatFacts; + readonly roster: ReadonlyArray; + readonly lead: ModelSelection; +}): ReadonlyArray => + limitedSeatCandidates({ + facts: input.facts, + limited: seatModelOf(input.lead), + inUse: input.roster.map((seat) => seatModelOf(seat.modelSelection)), + }); + +/** Whether a model is among the free candidates of a pool. */ +export const isFreeCandidate = ( + pool: ReadonlyArray, + model: SeatModel, +): boolean => + pool.some( + (candidate) => + candidate.skip === null && + candidate.instanceId === model.instanceId && + candidate.model === model.model, + ); From e929322144b03ede04fb230109e0c1e44c880f3c Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 15:49:18 +0000 Subject: [PATCH 05/12] feat(web,mobile): the Ask me and no-free notices for a limited seat Beside the usage limit banner, a team conversation now says which of its seats or its lead has reached a limit and what T3 can do about it. Under Ask me, or for a model chosen by hand, the notice names the first free favorite and swaps to it in one click, built like the provider Fix button: off while it runs, hidden where threads cannot be run, and backed by a command that is safe to repeat, so a second press makes no second thread. With no favorite free the notice says the seat or the conversation waits. A lead that was handed on links to the thread it continues in. Mobile shows the same notices from the same wording and follows the thread's setting; the setting itself is chosen on the desktop or web. A seat's card in the timeline says when a substitute ran in its place. The notices are read from delivery.limitedSeats and follow the thread's latest run through the query's refresh trigger. New strings are in every web and mobile catalog, machine-translated. Co-Authored-By: Claude Fable 5.2 --- .../threads/LimitedSeatNoticeCard.tsx | 170 ++++++++++++++++++ .../features/threads/ThreadDetailScreen.tsx | 8 + apps/mobile/src/i18n/translations/de.json | 12 ++ apps/mobile/src/i18n/translations/en.json | 12 ++ apps/mobile/src/i18n/translations/es.json | 12 ++ apps/mobile/src/i18n/translations/fr.json | 12 ++ apps/mobile/src/i18n/translations/ja.json | 12 ++ apps/mobile/src/i18n/translations/ko.json | 12 ++ apps/mobile/src/i18n/translations/pt-BR.json | 12 ++ apps/mobile/src/i18n/translations/ru.json | 12 ++ apps/mobile/src/i18n/translations/sv.json | 12 ++ apps/mobile/src/i18n/translations/zh.json | 12 ++ apps/mobile/src/state/delivery.ts | 5 +- apps/web/src/components/ChatView.tsx | 20 ++- .../chat/LimitedSeatNotices.browser.test.tsx | 124 +++++++++++++ .../components/chat/LimitedSeatNotices.tsx | 159 ++++++++++++++++ .../chat/SubagentTooltipContent.tsx | 13 ++ .../src/components/chat/V2LifecycleRow.tsx | 3 + apps/web/src/i18n/translations/de.json | 16 ++ apps/web/src/i18n/translations/en.json | 16 ++ apps/web/src/i18n/translations/es.json | 16 ++ apps/web/src/i18n/translations/fr.json | 16 ++ apps/web/src/i18n/translations/ja.json | 16 ++ apps/web/src/i18n/translations/ko.json | 16 ++ apps/web/src/i18n/translations/pt-BR.json | 16 ++ apps/web/src/i18n/translations/ru.json | 16 ++ apps/web/src/i18n/translations/sv.json | 16 ++ apps/web/src/i18n/translations/zh.json | 16 ++ apps/web/src/state/delivery.ts | 5 +- packages/client-runtime/package.json | 4 + .../src/limitedSeatNotices.test.ts | 46 +++++ .../client-runtime/src/limitedSeatNotices.ts | 110 ++++++++++++ packages/client-runtime/src/state/delivery.ts | 43 ++++- 33 files changed, 986 insertions(+), 4 deletions(-) create mode 100644 apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx create mode 100644 apps/web/src/components/chat/LimitedSeatNotices.browser.test.tsx create mode 100644 apps/web/src/components/chat/LimitedSeatNotices.tsx create mode 100644 packages/client-runtime/src/limitedSeatNotices.test.ts create mode 100644 packages/client-runtime/src/limitedSeatNotices.ts diff --git a/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx b/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx new file mode 100644 index 0000000000000..3123e9d3a42f3 --- /dev/null +++ b/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx @@ -0,0 +1,170 @@ +import { errorDisplayMessage } from "@t3tools/client-runtime/errors"; +import { + type LimitedSeatNoticeView, + limitedSeatNoticeViews, +} from "@t3tools/client-runtime/limited-seat-notices"; +import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime"; +import type { EnvironmentThreadShell } from "@t3tools/client-runtime/state/shell"; +import type { EnvironmentId, ThreadId } from "@t3tools/contracts"; +import { StackActions, useNavigation } from "@react-navigation/native"; +import { AsyncResult } from "effect/reactivity"; +import { useGT, useMessages } from "gt-react-native"; +import { useState } from "react"; +import { Pressable, View } from "react-native"; + +import { AppText as Text } from "../../components/ui/AppText"; +import { m } from "../../i18n/messages"; +import { deliveryEnvironment } from "../../state/delivery"; +import { useEnvironmentQuery } from "../../state/query"; +import { useAtomCommand } from "../../state/use-atom-command"; + +/** + * A team conversation's limited lead or seats, following the thread's own setting: the free + * favorite to swap to in one press, the wait when none is free, and where a lead was handed on. + * The setting itself is chosen on the desktop or the web. + */ +export function LimitedSeatNoticeCard(props: { + readonly thread: EnvironmentThreadShell; + readonly environmentId: EnvironmentId; + readonly canOperateThread: boolean; +}) { + const { thread, environmentId } = props; + const gt = useGT(); + const messages = useMessages(); + const navigation = useNavigation(); + const query = useEnvironmentQuery( + deliveryEnvironment.limitedSeats({ environmentId, input: { threadId: thread.id } }), + ); + const { refresh } = query; + const views = limitedSeatNoticeViews( + query.data, + { + modelName: (model) => model.model, + formatReset: (resetAt) => + gt("Resets {date}.", { + date: new Date(resetAt).toLocaleString(undefined, { + month: "short", + day: "numeric", + hour: "numeric", + minute: "2-digit", + }), + }), + }, + messages, + ); + const openThread = (threadId: ThreadId) => + navigation.dispatch( + StackActions.push("Thread", { + environmentId: String(environmentId), + threadId: String(threadId), + }), + ); + return views.map((view) => ( + { + refresh(); + if (next !== null) openThread(next); + }} + onOpenThread={openThread} + /> + )); +} + +function LimitedSeatNotice(props: { + readonly view: LimitedSeatNoticeView; + readonly environmentId: EnvironmentId; + readonly threadId: ThreadId; + readonly canOperateThread: boolean; + readonly onSwapped: (continuedIn: ThreadId | null) => void; + readonly onOpenThread: (threadId: ThreadId) => void; +}) { + const gt = useGT(); + const { view } = props; + const swap = useAtomCommand(deliveryEnvironment.swapLimitedSeat); + const [swapping, setSwapping] = useState(false); + const [error, setError] = useState(null); + const { action } = view; + const { continuedIn } = view.notice; + + async function run() { + if (action?.type !== "swap") return; + setSwapping(true); + setError(null); + const result = await swap({ + environmentId: props.environmentId, + input: { + threadId: props.threadId, + seat: view.notice.seat, + modelSelection: action.substitute, + }, + }); + setSwapping(false); + if (AsyncResult.isFailure(result)) { + setError( + errorDisplayMessage(squashAtomCommandFailure(result), m) ?? + gt("Could not swap the model. Try again."), + ); + return; + } + props.onSwapped(result.value.continuedIn); + } + + return ( + + {view.title} + {view.description} + {action?.type === "swap" && props.canOperateThread ? ( + void run()} /> + ) : action?.type === "open" && continuedIn !== undefined ? ( + props.onOpenThread(continuedIn)} + /> + ) : null} + {error ? ( + + {error} + + ) : null} + + ); +} + +function NoticeAction(props: { + readonly label: string; + readonly disabled: boolean; + readonly onPress: () => void; +}) { + return ( + // The margins cancel the 44pt touch height so the action sits 8pt under the text. + + + + {props.label} + + + + ); +} diff --git a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx index 2a627454b77cd..266d1cd12ac76 100644 --- a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx +++ b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx @@ -16,6 +16,7 @@ import { parseThreadKey, threadKey } from "@t3tools/client-runtime/state/entitie import { createThreadVisitTracker } from "@t3tools/client-runtime/state/thread-visits"; import { useChildThreadInputs, useThreadReportedModelSelection } from "../../state/entities"; import { UsageLimitRecoveryCard } from "./UsageLimitRecoveryCard"; +import { LimitedSeatNoticeCard } from "./LimitedSeatNoticeCard"; import { useFocusEffect, useNavigation } from "@react-navigation/native"; import { effectiveSnoozed, @@ -1728,6 +1729,13 @@ function ThreadDetailBody( thread={props.selectedThread} environmentId={props.environmentId} /> + {props.draftMode ? null : ( + + )} (null); diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 8b1fe2f99dbc2..551f79b56d7e3 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -67,6 +67,7 @@ import { ThreadFind, ThreadFindCanvas } from "./chat/ThreadFindProvider"; import { closeThreadFind, openThreadFind, useThreadFindOpen } from "./chat/threadFindStore"; import { THREAD_FIND_BAR_RESERVED_HEIGHT } from "./chat/ThreadFindBar"; import { useUsageLimitRecoveryBannerItem } from "./chat/UsageLimitRecoveryBanner"; +import { useLimitedSeatBannerItems } from "./chat/LimitedSeatNotices"; import { isThreadEnvironmentLocked, resolveDraftHeroState, @@ -2895,6 +2896,20 @@ export default function ChatView(props: ChatViewProps) { : null, messages, ); + const limitedSeatBannerItems = useLimitedSeatBannerItems( + { + environmentId, + threadId: deliveryEnabled && activeThreadShell !== null ? activeThreadShell.id : null, + providers: providerStatuses, + timestampFormat, + onOpenThread: (next) => + void navigate({ + to: "/$environmentId/$threadId", + params: buildThreadRouteParams(scopeThreadRef(environmentId, next)), + }), + }, + messages, + ); // An archived thread opens to read. The server refuses every message to it, so the composer says // so before one is written, not after a send that goes nowhere. const threadArchived = serverThread !== null && serverThread.archivedAt !== null; @@ -2948,7 +2963,10 @@ export default function ChatView(props: ChatViewProps) { ), ] : []; - const limitRecoveryItems = limitRecoveryBanner === null ? [] : [limitRecoveryBanner]; + const limitRecoveryItems = + limitRecoveryBanner === null + ? limitedSeatBannerItems + : [limitRecoveryBanner, ...limitedSeatBannerItems]; const extensionStatusBanner = extensionStatusBannerItem( deriveProviderExtensionStatuses(serverProjection), ); diff --git a/apps/web/src/components/chat/LimitedSeatNotices.browser.test.tsx b/apps/web/src/components/chat/LimitedSeatNotices.browser.test.tsx new file mode 100644 index 0000000000000..36e661486da8b --- /dev/null +++ b/apps/web/src/components/chat/LimitedSeatNotices.browser.test.tsx @@ -0,0 +1,124 @@ +import { + type DeliveryLimitedSeatStatus, + EnvironmentId, + ProviderInstanceId, + ThreadId, +} from "@t3tools/contracts"; +import { createModelSelection } from "@t3tools/shared/model"; +import { expect, it, vi } from "vite-plus/test"; +import { page } from "vite-plus/test/browser"; + +import "~/index.css"; + +import { render } from "../../../test/render"; +import { ComposerBannerStack } from "./ComposerBannerStack"; +import { useLimitedSeatBannerItems } from "./LimitedSeatNotices"; + +const testState = vi.hoisted(() => ({ + status: null as unknown, + release: null as (() => void) | null, + swap: vi.fn(), +})); + +vi.mock("../../state/query", () => ({ + useEnvironmentQuery: () => ({ data: testState.status, error: null, refresh: () => {} }), +})); +vi.mock("../../state/use-atom-command", () => ({ useAtomCommand: () => testState.swap })); +vi.mock("../../state/session", async (importOriginal) => ({ + ...(await importOriginal()), + useEnvironmentScope: () => true, +})); + +const environmentId = EnvironmentId.make("env-a"); +const threadId = ThreadId.make("lead-thread"); +const limited = { + instanceId: ProviderInstanceId.make("claude"), + model: "claude-fable", + resetAt: null, +}; +const kimi = createModelSelection(ProviderInstanceId.make("kimi"), "kimi-k3"); + +function setup(status: DeliveryLimitedSeatStatus) { + testState.status = status; + testState.release = null; + testState.swap.mockReset(); + // The server takes a moment, as a fork does; the test decides when it answers. + testState.swap.mockImplementation( + () => + new Promise((resolve) => { + testState.release = () => + resolve({ _tag: "Success", value: { continuedIn: ThreadId.make("continued") } }); + }), + ); +} + +function Notices(props: { readonly onOpenThread: (threadId: ThreadId) => void }) { + const items = useLimitedSeatBannerItems({ + environmentId, + threadId, + providers: [], + timestampFormat: "locale", + onOpenThread: props.onOpenThread, + }); + return ; +} + +it("names the free favorite and swaps to it in one click, however often it is pressed", async () => { + setup({ + policy: "ask", + notices: [{ seat: null, limited, state: "offered", substitute: kimi }], + }); + const onOpenThread = vi.fn(); + await using _screen = await render(); + + await expect.element(page.getByText("claude-fable has reached its usage limit")).toBeVisible(); + const swap = page.getByRole("button", { name: "Swap to kimi-k3" }); + await swap.click(); + // The button is off while the swap runs, so a second press sends nothing. + await expect.element(swap).toBeDisabled(); + await swap.click({ force: true }); + expect(testState.swap).toHaveBeenCalledTimes(1); + expect(testState.swap).toHaveBeenCalledWith({ + environmentId, + input: { threadId, seat: null, modelSelection: kimi }, + }); + + testState.release?.(); + await vi.waitFor(() => expect(onOpenThread).toHaveBeenCalledWith("continued")); + expect(onOpenThread).toHaveBeenCalledTimes(1); +}); + +it("says a seat waits when no favorite is free, and offers nothing to press", async () => { + setup({ + policy: "swap", + notices: [{ seat: "critic", limited, state: "none-free", substitute: null }], + }); + await using _screen = await render( {}} />); + + await expect + .element(page.getByText("critic: claude-fable has reached its usage limit")) + .toBeVisible(); + await expect.element(page.getByText("No favorite model is free, so critic waits.")).toBeVisible(); + expect(page.getByRole("button", { name: /Swap/ }).elements()).toHaveLength(0); +}); + +it("links a lead that was handed on to the thread it continues in", async () => { + setup({ + policy: "swap", + notices: [ + { + seat: null, + limited, + state: "swapped", + substitute: kimi, + continuedIn: ThreadId.make("continued"), + }, + ], + }); + const onOpenThread = vi.fn(); + await using _screen = await render(); + + await expect.element(page.getByText("Continued on kimi-k3")).toBeVisible(); + await page.getByRole("button", { name: "Open thread" }).click(); + expect(onOpenThread).toHaveBeenCalledWith("continued"); +}); diff --git a/apps/web/src/components/chat/LimitedSeatNotices.tsx b/apps/web/src/components/chat/LimitedSeatNotices.tsx new file mode 100644 index 0000000000000..f5e79a598f3f5 --- /dev/null +++ b/apps/web/src/components/chat/LimitedSeatNotices.tsx @@ -0,0 +1,159 @@ +import { + AuthOrchestrationOperateScope, + type DeliveryLimitedSeatNotice, + type EnvironmentId, + type ModelSelection, + type ServerProvider, + type ThreadId, +} from "@t3tools/contracts"; +import type { TimestampFormat } from "@t3tools/contracts/settings"; +import { msg } from "gt-react"; +import { ArrowLeftRightIcon, GaugeIcon } from "lucide-react"; +import { useState } from "react"; + +import { m, type MessageResolver } from "~/i18n/messages"; +import { deliveryEnvironment } from "../../state/delivery"; +import { useEnvironmentQuery } from "../../state/query"; +import { useEnvironmentScope } from "../../state/session"; +import { thrownErrorMessage } from "@t3tools/client-runtime/errors"; +import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime"; +import { useAtomCommand } from "../../state/use-atom-command"; +import { formatUpcomingTimestamp } from "../../timestampFormat"; +import { Button } from "../ui/button"; +import { toastManager } from "../ui/toast"; +import type { ComposerBannerStackItem } from "./ComposerBannerStack"; +import { limitedSeatNoticeViews } from "@t3tools/client-runtime/limited-seat-notices"; + +/** + * The notices for a team conversation whose lead or seats have reached a usage limit: the free + * favorite to swap to in one click, the wait when none is free, and where a lead was handed on. + */ +export function useLimitedSeatBannerItems( + input: { + readonly environmentId: EnvironmentId; + /** Null where the conversation has no participants, so nothing is asked of the server. */ + readonly threadId: ThreadId | null; + readonly providers: ReadonlyArray; + readonly timestampFormat: TimestampFormat; + readonly onOpenThread: (threadId: ThreadId) => void; + }, + resolve: MessageResolver = m, +): ReadonlyArray { + const { environmentId, threadId, providers } = input; + const query = useEnvironmentQuery( + threadId === null + ? null + : deliveryEnvironment.limitedSeats({ environmentId, input: { threadId } }), + ); + const { refresh } = query; + if (threadId === null) return []; + return limitedSeatNoticeViews( + query.data, + { + modelName: (model) => + providers + .find((provider) => provider.instanceId === model.instanceId) + ?.models.find((candidate) => candidate.slug === model.model)?.name ?? model.model, + formatReset: (resetAt) => { + const time = formatUpcomingTimestamp( + resetAt, + input.timestampFormat, + undefined, + undefined, + resolve, + ); + return time ? resolve(msg("Resets {time}", { time })) : null; + }, + }, + resolve, + ).map((view) => { + const { continuedIn } = view.notice; + return { + id: view.id, + variant: view.notice.state === "swapped" ? "default" : "warning", + group: "environment", + icon: , + title: view.title, + description: view.description, + actions: + view.action?.type === "swap" ? ( + { + refresh(); + if (next !== null) input.onOpenThread(next); + }} + /> + ) : view.action?.type === "open" && continuedIn !== undefined ? ( + + ) : null, + } satisfies ComposerBannerStackItem; + }); +} + +/** + * Swaps a limited seat, or hands a limited lead on, in one click. Built like the provider Fix + * button: disabled while it works and hidden where threads cannot be run. The command is safe + * to repeat, so a second click makes no second thread. + */ +function LimitedSeatSwapButton(props: { + readonly environmentId: EnvironmentId; + readonly threadId: ThreadId; + readonly notice: DeliveryLimitedSeatNotice; + readonly substitute: ModelSelection; + readonly label: string; + /** Called with the thread a lead continues in, or null for a seat. */ + readonly onSwapped: (continuedIn: ThreadId | null) => void; +}) { + const canOperate = useEnvironmentScope(props.environmentId, AuthOrchestrationOperateScope); + const swap = useAtomCommand(deliveryEnvironment.swapLimitedSeat, { + label: "swap a limited seat", + reportFailure: false, + }); + const [swapping, setSwapping] = useState(false); + if (!canOperate) return null; + + const run = async () => { + setSwapping(true); + const result = await swap({ + environmentId: props.environmentId, + input: { + threadId: props.threadId, + seat: props.notice.seat, + modelSelection: props.substitute, + }, + }); + setSwapping(false); + if (result._tag === "Failure") { + toastManager.add({ + type: "error", + title: m(msg("Could not swap the model")), + description: + thrownErrorMessage(squashAtomCommandFailure(result), m) ?? + m(msg("Try again from the notice.")), + }); + return; + } + if (result.value.continuedIn === null) { + toastManager.add({ + type: "success", + title: m(msg("Swapped")), + description: m(msg("It applies from your next message.")), + }); + } + props.onSwapped(result.value.continuedIn); + }; + + return ( + + ); +} diff --git a/apps/web/src/components/chat/SubagentTooltipContent.tsx b/apps/web/src/components/chat/SubagentTooltipContent.tsx index 722968fb6241a..bd7415c75b168 100644 --- a/apps/web/src/components/chat/SubagentTooltipContent.tsx +++ b/apps/web/src/components/chat/SubagentTooltipContent.tsx @@ -22,6 +22,7 @@ import { CircleDashedIcon, CircleXIcon, FolderIcon, + GaugeIcon, GitBranchIcon, TerminalIcon, } from "lucide-react"; @@ -37,6 +38,8 @@ export function SubagentTooltipContent(props: { providerInstanceId: ProviderInstanceId; origin: OrchestrationV2Subagent["origin"]; modelSelection?: OrchestrationV2Subagent["modelSelection"]; + /** The seat's own model, when a substitute ran this turn because that one was limited. */ + substituteFor?: NonNullable["substituteFor"]; provider?: ServerProvider | undefined; providers?: ReadonlyArray | undefined; driver?: ProviderDriverKind | undefined; @@ -197,6 +200,16 @@ export function SubagentTooltipContent(props: { {props.elapsed} + {props.substituteFor ? ( +
    + + + {gt("Substitute for {model}, which reached its usage limit", { + model: props.substituteFor.model, + })} + +
    + ) : null} {metadata.map(({ label, value }, index) => { const Icon = props.childThread?.branch && !(hasProjectRow && index === 0) ? GitBranchIcon : FolderIcon; diff --git a/apps/web/src/components/chat/V2LifecycleRow.tsx b/apps/web/src/components/chat/V2LifecycleRow.tsx index 964656733193d..2cdbe20486841 100644 --- a/apps/web/src/components/chat/V2LifecycleRow.tsx +++ b/apps/web/src/components/chat/V2LifecycleRow.tsx @@ -584,6 +584,7 @@ function SubagentTimelineLink(props: { elapsed={agent ? : null} model={agent?.model ?? null} modelSelection={agent?.modelSelection} + substituteFor={agent?.teamChat?.substituteFor} status={liveStatus} result={agent?.result ?? props.result} progress={agent?.progress ?? props.progress} @@ -597,6 +598,7 @@ function SubagentTimelineTooltip( props: Parameters[0] & { model: string | null; modelSelection: OrchestrationV2Subagent["modelSelection"]; + substituteFor: NonNullable["substituteFor"]; elapsed: ReactNode; }, ) { @@ -619,6 +621,7 @@ function SubagentTimelineTooltip( providerInstanceId={props.providerInstanceId} origin={props.origin} modelSelection={props.modelSelection} + substituteFor={props.substituteFor} provider={providers.find((provider) => provider.instanceId === props.providerInstanceId)} providers={providers} driver={props.driver} diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 688005e627a64..3f82a63655f77 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -74,6 +74,10 @@ "1861f909464425a6": "hat den Status geändert", "bd672d0adf5e6d9a": "Zum Schreiben in diesen Tracker ist die Schreibberechtigung für die Versionskontrolle nötig.", "bfe81d615f5f8f75": "Dieses Issue liegt außerhalb des Bereichs aller Projekte und ist hier daher schreibgeschützt.", + "167e546b3c02a17f": "{model} hat sein Nutzungslimit erreicht", + "7037860c8460904b": "{seat}: {model} hat sein Nutzungslimit erreicht", + "d4ad47339d670283": "Fortgesetzt mit {substitute}", + "0b95a334090835d6": "{model} hat sein Nutzungslimit erreicht, daher läuft diese Unterhaltung in einem verknüpften Thread weiter. Dieser bleibt lesbar.", "8b876f2953338661": "Noch nicht bekannt, ob er verknüpft ist", "b8c2bbba2243b429": "Bereits verknüpft", "4f1ab8a69f4a85e5": "Diese App ist nicht damit verbunden", @@ -2569,6 +2573,13 @@ "33c7e68fca089036": "Thread, {title}", "b4b98a0287c282e2": "Auf einem anderen Rechner, daher kann der Agent dieses Rechners es nicht lesen. Entferne es oder wechsle zum Senden zurück.", "c6196d99000642b4": "Thread öffnen", + "552649eea02acd9e": "{seat} läuft mit {substitute}", + "9723cacb91446778": "{model} hat sein Nutzungslimit erreicht. {seat} kehrt dorthin zurück, sobald das Limit zurückgesetzt ist.", + "4daef274c8249495": "{substitute} ist frei. Beim Wechsel läuft diese Unterhaltung in einem neuen verknüpften Thread mit einer Zusammenfassung weiter.", + "c8128bb2bd97de3c": "{substitute} ist frei. {seat} nutzt es ab deiner nächsten Nachricht.", + "05985243eafadf37": "Zu {substitute} wechseln", + "540418662b70d3d6": "Kein Lieblingsmodell ist frei, daher wartet diese Unterhaltung.", + "9da06299c78dfeeb": "Kein Lieblingsmodell ist frei, daher wartet {seat}.", "34cc63390ad793cc": "Thread wählen", "8f12309ead62e38a": "Threads oder Projekte durchsuchen...", "2f664754d005d9a7": "Keine aktiven Threads gefunden.", @@ -4061,6 +4072,7 @@ "45cf8a09ce8995f8": "fehlgeschlagen", "7db3cecba8568144": "abgebrochen", "0c5771889f55c1fe": "unterbrochen", + "4810b42e5bbf3e2e": "Ersatz für {model}, das sein Nutzungslimit erreicht hat", "ac7416afe98ba5f8": "Terminal-Auszug, {label}", "bf04d61dc50685dc": "Zeile {lineStart}", "000e3bef072f07c8": "Zeilen {lineStart}–{lineEnd}", @@ -4563,6 +4575,10 @@ "2b07985d23563374": "Wird {time} fortgesetzt", "a4b4e5eb6d313af9": "Wurde {time} zurückgesetzt", "c0c3aa756405c1df": "Wird {time} zurückgesetzt", + "36c5b0f937628c81": "Modell konnte nicht gewechselt werden", + "d9ddfe9e0e5580ac": "Versuche es über den Hinweis erneut.", + "4de04c6480ae979a": "Gewechselt", + "0f5e895d047c45c3": "Das gilt ab deiner nächsten Nachricht.", "a7bfaa71c8b3030b": "Zeitpunkt der Zurücksetzung nicht verfügbar; manuell erneut versuchen", "77a70e5c3fd83ed8": "ChatGPT-Nutzungslimit erreicht", "c6c8d924b76b5a14": "Du hast das Limit deines Workspaces für die Nutzung deines ChatGPT-Abos in anderen Apps erreicht.", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index bee1fbc3f6c26..6adfd2b88b828 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -74,6 +74,10 @@ "1861f909464425a6": "changed the state", "bd672d0adf5e6d9a": "Writing to this tracker needs the source-control write scope.", "bfe81d615f5f8f75": "This issue is outside every project's own scope, so it is read-only here.", + "167e546b3c02a17f": "{model} has reached its usage limit", + "7037860c8460904b": "{seat}: {model} has reached its usage limit", + "d4ad47339d670283": "Continued on {substitute}", + "0b95a334090835d6": "{model} reached its usage limit, so this conversation continues in a linked thread. This one stays readable.", "8b876f2953338661": "Not known yet whether it is linked", "b8c2bbba2243b429": "Already linked", "4f1ab8a69f4a85e5": "This app is not connected to it", @@ -2568,6 +2572,13 @@ "33c7e68fca089036": "Thread, {title}", "b4b98a0287c282e2": "On another machine, so this machine's agent can't read it. Remove it or switch back to send.", "c6196d99000642b4": "Open thread", + "552649eea02acd9e": "{seat} runs on {substitute}", + "9723cacb91446778": "{model} has reached its usage limit. {seat} returns to it once the limit resets.", + "4daef274c8249495": "{substitute} is free. Swapping continues this conversation in a new linked thread with a summary.", + "c8128bb2bd97de3c": "{substitute} is free. {seat} uses it from your next message.", + "05985243eafadf37": "Swap to {substitute}", + "540418662b70d3d6": "No favorite model is free, so this conversation waits.", + "9da06299c78dfeeb": "No favorite model is free, so {seat} waits.", "34cc63390ad793cc": "Choose a thread", "8f12309ead62e38a": "Search threads or projects...", "2f664754d005d9a7": "No active threads found.", @@ -4059,6 +4070,7 @@ "45cf8a09ce8995f8": "failed", "7db3cecba8568144": "cancelled", "0c5771889f55c1fe": "interrupted", + "4810b42e5bbf3e2e": "Substitute for {model}, which reached its usage limit", "ac7416afe98ba5f8": "Terminal excerpt, {label}", "bf04d61dc50685dc": "Line {lineStart}", "000e3bef072f07c8": "Lines {lineStart}–{lineEnd}", @@ -4562,6 +4574,10 @@ "2b07985d23563374": "Resumes {time}", "a4b4e5eb6d313af9": "Reset {time}", "c0c3aa756405c1df": "Resets {time}", + "36c5b0f937628c81": "Could not swap the model", + "d9ddfe9e0e5580ac": "Try again from the notice.", + "4de04c6480ae979a": "Swapped", + "0f5e895d047c45c3": "It applies from your next message.", "a7bfaa71c8b3030b": "Reset time unavailable; retry manually", "77a70e5c3fd83ed8": "ChatGPT usage limit reached", "c6c8d924b76b5a14": "You've reached your workspace's limit for using your ChatGPT plan in other apps.", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 0966b4552ec88..0f550c90ace7c 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -74,6 +74,10 @@ "1861f909464425a6": "cambió el estado", "bd672d0adf5e6d9a": "Para escribir en este gestor de issues se necesita el permiso de escritura de control de versiones.", "bfe81d615f5f8f75": "Esta issue está fuera del ámbito de todos los proyectos, así que aquí es de solo lectura.", + "167e546b3c02a17f": "{model} alcanzó su límite de uso", + "7037860c8460904b": "{seat}: {model} alcanzó su límite de uso", + "d4ad47339d670283": "Continúa con {substitute}", + "0b95a334090835d6": "{model} alcanzó su límite de uso, así que esta conversación continúa en un hilo vinculado. Este sigue siendo legible.", "8b876f2953338661": "Aún no se sabe si está vinculada", "b8c2bbba2243b429": "Ya vinculada", "4f1ab8a69f4a85e5": "Esta app no está conectada a ella", @@ -2568,6 +2572,13 @@ "33c7e68fca089036": "Hilo, {title}", "b4b98a0287c282e2": "Está en otra máquina, así que el agente de esta máquina no puede leerlo. Quítalo o vuelve a cambiar para enviar.", "c6196d99000642b4": "Abrir hilo", + "552649eea02acd9e": "{seat} funciona con {substitute}", + "9723cacb91446778": "{model} alcanzó su límite de uso. {seat} vuelve a él cuando el límite se restablezca.", + "4daef274c8249495": "{substitute} está libre. Al cambiar, esta conversación continúa en un nuevo hilo vinculado con un resumen.", + "c8128bb2bd97de3c": "{substitute} está libre. {seat} lo usa desde tu próximo mensaje.", + "05985243eafadf37": "Cambiar a {substitute}", + "540418662b70d3d6": "Ningún modelo favorito está libre, así que esta conversación espera.", + "9da06299c78dfeeb": "Ningún modelo favorito está libre, así que {seat} espera.", "34cc63390ad793cc": "Elige un hilo", "8f12309ead62e38a": "Buscar hilos o proyectos...", "2f664754d005d9a7": "No se encontraron hilos activos.", @@ -4057,6 +4068,7 @@ "45cf8a09ce8995f8": "fallido", "7db3cecba8568144": "cancelado", "0c5771889f55c1fe": "interrumpido", + "4810b42e5bbf3e2e": "Sustituto de {model}, que alcanzó su límite de uso", "ac7416afe98ba5f8": "Fragmento de terminal, {label}", "bf04d61dc50685dc": "Línea {lineStart}", "000e3bef072f07c8": "Líneas {lineStart}–{lineEnd}", @@ -4560,6 +4572,10 @@ "2b07985d23563374": "Se reanuda {time}", "a4b4e5eb6d313af9": "Se restableció {time}", "c0c3aa756405c1df": "Se restablece {time}", + "36c5b0f937628c81": "No se pudo cambiar el modelo", + "d9ddfe9e0e5580ac": "Vuelve a intentarlo desde el aviso.", + "4de04c6480ae979a": "Cambiado", + "0f5e895d047c45c3": "Se aplica desde tu próximo mensaje.", "a7bfaa71c8b3030b": "Hora de restablecimiento no disponible; vuelve a intentarlo manualmente", "77a70e5c3fd83ed8": "Se alcanzó el límite de uso de ChatGPT", "c6c8d924b76b5a14": "Has alcanzado el límite de tu espacio de trabajo para usar tu plan de ChatGPT en otras apps.", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index e578e8d19a292..6774467b28e5c 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -74,6 +74,10 @@ "1861f909464425a6": "a modifié l’état", "bd672d0adf5e6d9a": "L’écriture dans ce gestionnaire de tickets nécessite l’autorisation d’écriture sur la gestion de versions.", "bfe81d615f5f8f75": "Ce ticket est hors du périmètre de chaque projet ; il est donc en lecture seule ici.", + "167e546b3c02a17f": "{model} a atteint sa limite d'utilisation", + "7037860c8460904b": "{seat} : {model} a atteint sa limite d'utilisation", + "d4ad47339d670283": "Poursuivi sur {substitute}", + "0b95a334090835d6": "{model} a atteint sa limite d'utilisation ; cette conversation se poursuit donc dans un fil lié. Celui-ci reste lisible.", "8b876f2953338661": "On ne sait pas encore si elle est associée", "b8c2bbba2243b429": "Déjà associée", "4f1ab8a69f4a85e5": "Cette app n’y est pas connectée", @@ -2568,6 +2572,13 @@ "33c7e68fca089036": "Fil, {title}", "b4b98a0287c282e2": "Sur une autre machine, l’agent de cette machine ne peut donc pas le lire. Retirez-le ou revenez en arrière pour envoyer.", "c6196d99000642b4": "Ouvrir le fil", + "552649eea02acd9e": "{seat} fonctionne sur {substitute}", + "9723cacb91446778": "{model} a atteint sa limite d'utilisation. {seat} y revient dès que la limite est réinitialisée.", + "4daef274c8249495": "{substitute} est libre. Le remplacement poursuit cette conversation dans un nouveau fil lié, avec un résumé.", + "c8128bb2bd97de3c": "{substitute} est libre. {seat} l'utilise à partir de votre prochain message.", + "05985243eafadf37": "Passer à {substitute}", + "540418662b70d3d6": "Aucun modèle favori n'est libre ; cette conversation attend donc.", + "9da06299c78dfeeb": "Aucun modèle favori n'est libre ; {seat} attend donc.", "34cc63390ad793cc": "Choisir un fil", "8f12309ead62e38a": "Rechercher des fils ou des projets...", "2f664754d005d9a7": "Aucun fil actif trouvé.", @@ -4058,6 +4069,7 @@ "45cf8a09ce8995f8": "en échec", "7db3cecba8568144": "annulé", "0c5771889f55c1fe": "interrompu", + "4810b42e5bbf3e2e": "Substitut de {model}, qui a atteint sa limite d'utilisation", "ac7416afe98ba5f8": "Extrait du terminal, {label}", "bf04d61dc50685dc": "Ligne {lineStart}", "000e3bef072f07c8": "Lignes {lineStart}–{lineEnd}", @@ -4561,6 +4573,10 @@ "2b07985d23563374": "Reprise {time}", "a4b4e5eb6d313af9": "Réinitialisé {time}", "c0c3aa756405c1df": "Réinitialisation {time}", + "36c5b0f937628c81": "Impossible de remplacer le modèle", + "d9ddfe9e0e5580ac": "Réessayez depuis l'avis.", + "4de04c6480ae979a": "Remplacé", + "0f5e895d047c45c3": "Cela s'applique à partir de votre prochain message.", "a7bfaa71c8b3030b": "Heure de réinitialisation indisponible ; réessayez manuellement", "77a70e5c3fd83ed8": "Limite d’utilisation ChatGPT atteinte", "c6c8d924b76b5a14": "Vous avez atteint la limite de votre espace de travail pour l’utilisation de votre forfait ChatGPT dans d’autres apps.", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 8d446504569a1..e3154a8cd2d8f 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -74,6 +74,10 @@ "1861f909464425a6": "状態を変更しました", "bd672d0adf5e6d9a": "このトラッカーに書き込むには、ソース管理の書き込みスコープが必要です。", "bfe81d615f5f8f75": "この Issue はどのプロジェクトのスコープにも含まれないため、ここでは読み取り専用です。", + "167e546b3c02a17f": "{model} は使用制限に達しました", + "7037860c8460904b": "{seat}: {model} は使用制限に達しました", + "d4ad47339d670283": "{substitute} で継続中", + "0b95a334090835d6": "{model} が使用制限に達したため、この会話はリンクされたスレッドで続きます。このスレッドは引き続き閲覧できます。", "8b876f2953338661": "リンク済みかどうかはまだ不明です", "b8c2bbba2243b429": "リンク済み", "4f1ab8a69f4a85e5": "このアプリはこのマシンに接続していません", @@ -2566,6 +2570,13 @@ "33c7e68fca089036": "スレッド、{title}", "b4b98a0287c282e2": "別のマシン上にあるため、このマシンのエージェントは読み取れません。削除するか、元に戻してから送信してください。", "c6196d99000642b4": "スレッドを開く", + "552649eea02acd9e": "{seat} は {substitute} で動作します", + "9723cacb91446778": "{model} は使用制限に達しました。制限がリセットされると {seat} は元のモデルに戻ります。", + "4daef274c8249495": "{substitute} は空いています。切り替えると、この会話は要約付きの新しいリンクされたスレッドで続きます。", + "c8128bb2bd97de3c": "{substitute} は空いています。{seat} は次のメッセージからこれを使用します。", + "05985243eafadf37": "{substitute} に切り替える", + "540418662b70d3d6": "空いているお気に入りのモデルがないため、この会話は待機します。", + "9da06299c78dfeeb": "空いているお気に入りのモデルがないため、{seat} は待機します。", "34cc63390ad793cc": "スレッドを選択", "8f12309ead62e38a": "スレッドまたはプロジェクトを検索...", "2f664754d005d9a7": "アクティブなスレッドが見つかりません。", @@ -4048,6 +4059,7 @@ "45cf8a09ce8995f8": "失敗", "7db3cecba8568144": "キャンセル済み", "0c5771889f55c1fe": "中断", + "4810b42e5bbf3e2e": "使用制限に達した {model} の代替", "ac7416afe98ba5f8": "ターミナルの抜粋、{label}", "bf04d61dc50685dc": "{lineStart} 行目", "000e3bef072f07c8": "{lineStart}–{lineEnd} 行目", @@ -4551,6 +4563,10 @@ "2b07985d23563374": "{time} に再開", "a4b4e5eb6d313af9": "{time} にリセット済み", "c0c3aa756405c1df": "{time} にリセット", + "36c5b0f937628c81": "モデルを切り替えられませんでした", + "d9ddfe9e0e5580ac": "通知からもう一度お試しください。", + "4de04c6480ae979a": "切り替えました", + "0f5e895d047c45c3": "次のメッセージから適用されます。", "a7bfaa71c8b3030b": "リセット時刻が不明です。手動で再試行してください", "77a70e5c3fd83ed8": "ChatGPT の使用量の上限に達しました", "c6c8d924b76b5a14": "ChatGPT プランを他のアプリで使用する際の、ワークスペースの上限に達しました。", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index 53acb99a70972..aa3f9ce42a2a1 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -74,6 +74,10 @@ "1861f909464425a6": "상태 변경함", "bd672d0adf5e6d9a": "이 트래커에 쓰려면 소스 제어 쓰기 범위가 필요합니다.", "bfe81d615f5f8f75": "이 이슈는 어떤 프로젝트의 범위에도 속하지 않으므로 여기서는 읽기 전용입니다.", + "167e546b3c02a17f": "{model}이(가) 사용 한도에 도달했습니다", + "7037860c8460904b": "{seat}: {model}이(가) 사용 한도에 도달했습니다", + "d4ad47339d670283": "{substitute}(으)로 계속됨", + "0b95a334090835d6": "{model}이(가) 사용 한도에 도달하여 이 대화는 연결된 스레드에서 계속됩니다. 이 스레드는 계속 읽을 수 있습니다.", "8b876f2953338661": "연결되어 있는지 아직 알 수 없습니다", "b8c2bbba2243b429": "이미 연결됨", "4f1ab8a69f4a85e5": "이 앱이 해당 머신에 연결되어 있지 않습니다", @@ -2567,6 +2571,13 @@ "33c7e68fca089036": "스레드, {title}", "b4b98a0287c282e2": "다른 머신에 있어 이 머신의 에이전트가 읽을 수 없습니다. 제거하거나 원래대로 전환한 후 보내세요.", "c6196d99000642b4": "스레드 열기", + "552649eea02acd9e": "{seat}은(는) {substitute}(으)로 실행됩니다", + "9723cacb91446778": "{model}이(가) 사용 한도에 도달했습니다. 한도가 재설정되면 {seat}은(는) 원래 모델로 돌아갑니다.", + "4daef274c8249495": "{substitute}을(를) 사용할 수 있습니다. 교체하면 이 대화는 요약과 함께 새 연결 스레드에서 계속됩니다.", + "c8128bb2bd97de3c": "{substitute}을(를) 사용할 수 있습니다. {seat}은(는) 다음 메시지부터 이를 사용합니다.", + "05985243eafadf37": "{substitute}(으)로 교체", + "540418662b70d3d6": "사용 가능한 즐겨찾는 모델이 없어 이 대화는 대기합니다.", + "9da06299c78dfeeb": "사용 가능한 즐겨찾는 모델이 없어 {seat}은(는) 대기합니다.", "34cc63390ad793cc": "스레드 선택", "8f12309ead62e38a": "스레드 또는 프로젝트 검색...", "2f664754d005d9a7": "활성 스레드를 찾을 수 없습니다.", @@ -4046,6 +4057,7 @@ "45cf8a09ce8995f8": "실패", "7db3cecba8568144": "취소됨", "0c5771889f55c1fe": "중단됨", + "4810b42e5bbf3e2e": "사용 한도에 도달한 {model}의 대체 모델", "ac7416afe98ba5f8": "터미널 발췌, {label}", "bf04d61dc50685dc": "{lineStart}행", "000e3bef072f07c8": "{lineStart}–{lineEnd}행", @@ -4548,6 +4560,10 @@ "2b07985d23563374": "{time}에 재개", "a4b4e5eb6d313af9": "{time}에 초기화됨", "c0c3aa756405c1df": "{time}에 초기화", + "36c5b0f937628c81": "모델을 교체하지 못했습니다", + "d9ddfe9e0e5580ac": "알림에서 다시 시도하세요.", + "4de04c6480ae979a": "교체됨", + "0f5e895d047c45c3": "다음 메시지부터 적용됩니다.", "a7bfaa71c8b3030b": "초기화 시간을 알 수 없습니다. 직접 다시 시도하세요", "77a70e5c3fd83ed8": "ChatGPT 사용량 한도에 도달함", "c6c8d924b76b5a14": "다른 앱에서 ChatGPT 요금제를 사용할 수 있는 작업 공간 한도에 도달했습니다.", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 81b46b70db8a9..179ca51e936a8 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -74,6 +74,10 @@ "1861f909464425a6": "alterou o estado", "bd672d0adf5e6d9a": "Escrever neste rastreador exige a permissão de escrita no controle de versão.", "bfe81d615f5f8f75": "Esta issue está fora do escopo de todos os projetos, então aqui ela é somente leitura.", + "167e546b3c02a17f": "{model} atingiu o limite de uso", + "7037860c8460904b": "{seat}: {model} atingiu o limite de uso", + "d4ad47339d670283": "Continuou em {substitute}", + "0b95a334090835d6": "{model} atingiu o limite de uso, então esta conversa continua em uma thread vinculada. Esta continua legível.", "8b876f2953338661": "Ainda não se sabe se está vinculada", "b8c2bbba2243b429": "Já vinculada", "4f1ab8a69f4a85e5": "Este app não está conectado a ela", @@ -2568,6 +2572,13 @@ "33c7e68fca089036": "Thread, {title}", "b4b98a0287c282e2": "Está em outra máquina, então o agente desta máquina não consegue lê-lo. Remova-o ou volte para enviar.", "c6196d99000642b4": "Abrir thread", + "552649eea02acd9e": "{seat} roda em {substitute}", + "9723cacb91446778": "{model} atingiu o limite de uso. {seat} volta a ele quando o limite for redefinido.", + "4daef274c8249495": "{substitute} está livre. Ao trocar, esta conversa continua em uma nova thread vinculada com um resumo.", + "c8128bb2bd97de3c": "{substitute} está livre. {seat} passa a usá-lo a partir da sua próxima mensagem.", + "05985243eafadf37": "Trocar para {substitute}", + "540418662b70d3d6": "Nenhum modelo favorito está livre, então esta conversa aguarda.", + "9da06299c78dfeeb": "Nenhum modelo favorito está livre, então {seat} aguarda.", "34cc63390ad793cc": "Escolha uma thread", "8f12309ead62e38a": "Pesquisar threads ou projetos...", "2f664754d005d9a7": "Nenhuma thread ativa encontrada.", @@ -4058,6 +4069,7 @@ "45cf8a09ce8995f8": "com falha", "7db3cecba8568144": "cancelado", "0c5771889f55c1fe": "interrompido", + "4810b42e5bbf3e2e": "Substituto de {model}, que atingiu o limite de uso", "ac7416afe98ba5f8": "Trecho do terminal, {label}", "bf04d61dc50685dc": "Linha {lineStart}", "000e3bef072f07c8": "Linhas {lineStart}–{lineEnd}", @@ -4560,6 +4572,10 @@ "2b07985d23563374": "Retoma {time}", "a4b4e5eb6d313af9": "Renovado {time}", "c0c3aa756405c1df": "Renova {time}", + "36c5b0f937628c81": "Não foi possível trocar o modelo", + "d9ddfe9e0e5580ac": "Tente novamente pelo aviso.", + "4de04c6480ae979a": "Trocado", + "0f5e895d047c45c3": "Vale a partir da sua próxima mensagem.", "a7bfaa71c8b3030b": "Horário de renovação indisponível; tente novamente manualmente", "77a70e5c3fd83ed8": "Limite de uso do ChatGPT atingido", "c6c8d924b76b5a14": "Você atingiu o limite do seu workspace para usar o plano do ChatGPT em outros apps.", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 828c7e2606573..2cf2cfe084ffc 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -74,6 +74,10 @@ "1861f909464425a6": "изменил(а) состояние", "bd672d0adf5e6d9a": "Для записи в этот трекер нужна область записи в контроль версий.", "bfe81d615f5f8f75": "Этот issue вне области всех проектов, поэтому здесь он доступен только для чтения.", + "167e546b3c02a17f": "{model} достигла лимита использования", + "7037860c8460904b": "{seat}: {model} достигла лимита использования", + "d4ad47339d670283": "Продолжено на {substitute}", + "0b95a334090835d6": "{model} достигла лимита использования, поэтому разговор продолжается в связанном треде. Этот тред остаётся доступным для чтения.", "8b876f2953338661": "Пока неизвестно, привязана ли она", "b8c2bbba2243b429": "Уже привязана", "4f1ab8a69f4a85e5": "Это приложение к ней не подключено", @@ -2568,6 +2572,13 @@ "33c7e68fca089036": "Тред, {title}", "b4b98a0287c282e2": "Находится на другой машине, поэтому агент этой машины не может его прочитать. Удалите его или переключитесь обратно, чтобы отправить.", "c6196d99000642b4": "Открыть тред", + "552649eea02acd9e": "{seat} работает на {substitute}", + "9723cacb91446778": "{model} достигла лимита использования. {seat} вернётся к ней, когда лимит сбросится.", + "4daef274c8249495": "{substitute} свободна. При замене разговор продолжится в новом связанном треде с кратким изложением.", + "c8128bb2bd97de3c": "{substitute} свободна. {seat} будет использовать её со следующего сообщения.", + "05985243eafadf37": "Заменить на {substitute}", + "540418662b70d3d6": "Нет свободной избранной модели, поэтому разговор ждёт.", + "9da06299c78dfeeb": "Нет свободной избранной модели, поэтому {seat} ждёт.", "34cc63390ad793cc": "Выберите тред", "8f12309ead62e38a": "Поиск тредов или проектов...", "2f664754d005d9a7": "Активные треды не найдены.", @@ -4058,6 +4069,7 @@ "45cf8a09ce8995f8": "ошибка", "7db3cecba8568144": "отменён", "0c5771889f55c1fe": "прерван", + "4810b42e5bbf3e2e": "Замена для {model}, достигшей лимита использования", "ac7416afe98ba5f8": "Фрагмент терминала, {label}", "bf04d61dc50685dc": "Строка {lineStart}", "000e3bef072f07c8": "Строки {lineStart}–{lineEnd}", @@ -4560,6 +4572,10 @@ "2b07985d23563374": "Возобновится {time}", "a4b4e5eb6d313af9": "Сброшен {time}", "c0c3aa756405c1df": "Сброс {time}", + "36c5b0f937628c81": "Не удалось заменить модель", + "d9ddfe9e0e5580ac": "Повторите попытку из уведомления.", + "4de04c6480ae979a": "Заменено", + "0f5e895d047c45c3": "Действует со следующего сообщения.", "a7bfaa71c8b3030b": "Время сброса неизвестно; повторите вручную", "77a70e5c3fd83ed8": "Достигнут лимит использования ChatGPT", "c6c8d924b76b5a14": "Вы достигли лимита рабочего пространства на использование тарифа ChatGPT в других приложениях.", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 693ad01ddb66f..d9607e7506047 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -74,6 +74,10 @@ "1861f909464425a6": "ändrade status", "bd672d0adf5e6d9a": "Att skriva till den här ärendehanteraren kräver skrivomfånget för versionshantering.", "bfe81d615f5f8f75": "Det här ärendet ligger utanför alla projekts eget omfång, så det är skrivskyddat här.", + "167e546b3c02a17f": "{model} har nått sin användningsgräns", + "7037860c8460904b": "{seat}: {model} har nått sin användningsgräns", + "d4ad47339d670283": "Fortsätter på {substitute}", + "0b95a334090835d6": "{model} har nått sin användningsgräns, så konversationen fortsätter i en länkad tråd. Den här förblir läsbar.", "8b876f2953338661": "Det är ännu inte känt om den är länkad", "b8c2bbba2243b429": "Redan länkad", "4f1ab8a69f4a85e5": "Den här appen är inte ansluten till den", @@ -2568,6 +2572,13 @@ "33c7e68fca089036": "Tråd, {title}", "b4b98a0287c282e2": "Finns på en annan dator, så den här datorns agent kan inte läsa den. Ta bort den eller byt tillbaka för att skicka.", "c6196d99000642b4": "Öppna tråd", + "552649eea02acd9e": "{seat} körs på {substitute}", + "9723cacb91446778": "{model} har nått sin användningsgräns. {seat} återgår till den när gränsen återställs.", + "4daef274c8249495": "{substitute} är ledig. Vid byte fortsätter konversationen i en ny länkad tråd med en sammanfattning.", + "c8128bb2bd97de3c": "{substitute} är ledig. {seat} använder den från ditt nästa meddelande.", + "05985243eafadf37": "Byt till {substitute}", + "540418662b70d3d6": "Ingen favoritmodell är ledig, så konversationen väntar.", + "9da06299c78dfeeb": "Ingen favoritmodell är ledig, så {seat} väntar.", "34cc63390ad793cc": "Välj en tråd", "8f12309ead62e38a": "Sök trådar eller projekt...", "2f664754d005d9a7": "Inga aktiva trådar hittades.", @@ -4058,6 +4069,7 @@ "45cf8a09ce8995f8": "misslyckad", "7db3cecba8568144": "avbruten", "0c5771889f55c1fe": "avbruten", + "4810b42e5bbf3e2e": "Ersättare för {model}, som har nått sin användningsgräns", "ac7416afe98ba5f8": "Terminalutdrag, {label}", "bf04d61dc50685dc": "Rad {lineStart}", "000e3bef072f07c8": "Rader {lineStart}–{lineEnd}", @@ -4561,6 +4573,10 @@ "2b07985d23563374": "Återupptas {time}", "a4b4e5eb6d313af9": "Återställdes {time}", "c0c3aa756405c1df": "Återställs {time}", + "36c5b0f937628c81": "Det gick inte att byta modell", + "d9ddfe9e0e5580ac": "Försök igen från meddelandet.", + "4de04c6480ae979a": "Bytt", + "0f5e895d047c45c3": "Det gäller från ditt nästa meddelande.", "a7bfaa71c8b3030b": "Återställningstiden är inte tillgänglig; försök igen manuellt", "77a70e5c3fd83ed8": "Användningsgränsen för ChatGPT har nåtts", "c6c8d924b76b5a14": "Du har nått arbetsytans gräns för att använda ditt ChatGPT-abonnemang i andra appar.", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 8688b28c4d00f..156d49542e6f7 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -74,6 +74,10 @@ "1861f909464425a6": "更改了状态", "bd672d0adf5e6d9a": "写入此跟踪器需要版本控制写入权限范围。", "bfe81d615f5f8f75": "此 issue 不在任何项目自身的范围内,因此在这里为只读。", + "167e546b3c02a17f": "{model} 已达使用限额", + "7037860c8460904b": "{seat}:{model} 已达使用限额", + "d4ad47339d670283": "已改用 {substitute} 继续", + "0b95a334090835d6": "{model} 已达使用限额,因此此对话在关联的线程中继续。当前线程仍可阅读。", "8b876f2953338661": "尚不清楚是否已关联", "b8c2bbba2243b429": "已关联", "4f1ab8a69f4a85e5": "此应用未连接到该机器", @@ -2572,6 +2576,13 @@ "33c7e68fca089036": "会话,{title}", "b4b98a0287c282e2": "它在另一台机器上,本机的智能体读不到它。请移除它,或切回那台机器再发送。", "c6196d99000642b4": "打开会话", + "552649eea02acd9e": "{seat} 使用 {substitute} 运行", + "9723cacb91446778": "{model} 已达使用限额。限额重置后,{seat} 会改回该模型。", + "4daef274c8249495": "{substitute} 空闲。切换后,此对话将在带有摘要的新关联线程中继续。", + "c8128bb2bd97de3c": "{substitute} 空闲。{seat} 将从你的下一条消息起使用它。", + "05985243eafadf37": "切换到 {substitute}", + "540418662b70d3d6": "没有空闲的收藏模型,因此此对话将等待。", + "9da06299c78dfeeb": "没有空闲的收藏模型,因此 {seat} 将等待。", "34cc63390ad793cc": "选择会话", "8f12309ead62e38a": "搜索会话或项目…", "2f664754d005d9a7": "未找到活动会话。", @@ -4063,6 +4074,7 @@ "45cf8a09ce8995f8": "失败", "7db3cecba8568144": "已取消", "0c5771889f55c1fe": "已中断", + "4810b42e5bbf3e2e": "替代已达使用限额的 {model}", "ac7416afe98ba5f8": "终端片段,{label}", "bf04d61dc50685dc": "第 {lineStart} 行", "000e3bef072f07c8": "第 {lineStart}–{lineEnd} 行", @@ -4567,6 +4579,10 @@ "2b07985d23563374": "{time} 自动继续", "a4b4e5eb6d313af9": "已于 {time} 重置", "c0c3aa756405c1df": "{time} 重置", + "36c5b0f937628c81": "无法切换模型", + "d9ddfe9e0e5580ac": "请从通知中重试。", + "4de04c6480ae979a": "已切换", + "0f5e895d047c45c3": "从你的下一条消息开始生效。", "a7bfaa71c8b3030b": "重置时间未知,请手动重试", "77a70e5c3fd83ed8": "已达到 ChatGPT 用量上限", "c6c8d924b76b5a14": "你已达到工作区允许在其他应用中使用 ChatGPT 套餐的上限。", diff --git a/apps/web/src/state/delivery.ts b/apps/web/src/state/delivery.ts index ba91ce123fbc7..66c5a1f592915 100644 --- a/apps/web/src/state/delivery.ts +++ b/apps/web/src/state/delivery.ts @@ -29,12 +29,15 @@ import type { import { boardPreferencesOf, useBoardStore } from "./deliveryBoard"; import { useEnvironments, usePrimaryEnvironmentId } from "./environments"; import { useEnvironmentQuery } from "./query"; +import { environmentThreadShells } from "./threads"; import { useAtomCommand } from "./use-atom-command"; export type { SeatChoice }; export { useBoardStore } from "./deliveryBoard"; -export const deliveryEnvironment = createDeliveryEnvironmentAtoms(connectionAtomRuntime); +export const deliveryEnvironment = createDeliveryEnvironmentAtoms(connectionAtomRuntime, { + threadShellAtom: environmentThreadShells.threadShellAtom, +}); /** Whether this environment has a delivery engine turned on. */ export function useDeliveryEnabled(environmentId: EnvironmentId | null): boolean { diff --git a/packages/client-runtime/package.json b/packages/client-runtime/package.json index ab288e3a7b967..2db88ea0392c2 100644 --- a/packages/client-runtime/package.json +++ b/packages/client-runtime/package.json @@ -619,6 +619,10 @@ "types": "./src/pullRequestReply.ts", "default": "./src/pullRequestReply.ts" }, + "./limited-seat-notices": { + "types": "./src/limitedSeatNotices.ts", + "default": "./src/limitedSeatNotices.ts" + }, "./issue-presentation": { "types": "./src/issuePresentation.ts", "default": "./src/issuePresentation.ts" diff --git a/packages/client-runtime/src/limitedSeatNotices.test.ts b/packages/client-runtime/src/limitedSeatNotices.test.ts new file mode 100644 index 0000000000000..10ee7452e0c7f --- /dev/null +++ b/packages/client-runtime/src/limitedSeatNotices.test.ts @@ -0,0 +1,46 @@ +import { type DeliveryLimitedSeatNotice, ProviderInstanceId } from "@t3tools/contracts"; +import { createModelSelection } from "@t3tools/shared/model"; +import { expect, it } from "vite-plus/test"; + +import { limitedSeatNoticeViews } from "./limitedSeatNotices.ts"; + +const limited = { + instanceId: ProviderInstanceId.make("claude"), + model: "claude-fable", + resetAt: "2026-11-22T17:00:00.000Z", +}; +const kimi = createModelSelection(ProviderInstanceId.make("kimi"), "kimi-k3"); +const options = { + modelName: (model: { readonly model: string }) => model.model.toUpperCase(), + formatReset: () => "Resets 5 PM", +}; +const views = (notices: ReadonlyArray, policy: "ask" | null = "ask") => + limitedSeatNoticeViews({ policy, notices }, options); + +it("shows nothing where the setting does not govern or nothing was read yet", () => { + const notice = { seat: null, limited, state: "offered", substitute: kimi } as const; + expect(views([notice], null)).toEqual([]); + expect(limitedSeatNoticeViews(null, options)).toEqual([]); +}); + +it("offers a seat the free favorite by name, from the next message", () => { + const [view] = views([{ seat: "critic", limited, state: "offered", substitute: kimi }]); + expect(view).toMatchObject({ + title: "critic: CLAUDE-FABLE has reached its usage limit", + description: "KIMI-K3 is free. critic uses it from your next message.", + action: { type: "swap", label: "Swap to KIMI-K3", substitute: kimi }, + }); +}); + +it("says when the limit resets where no favorite is free", () => { + const [view] = views([{ seat: null, limited, state: "none-free", substitute: null }]); + expect(view).toMatchObject({ + description: "No favorite model is free, so this conversation waits. Resets 5 PM", + action: null, + }); +}); + +it("says what stands in for a seat a person agreed to swap", () => { + const [view] = views([{ seat: "critic", limited, state: "swapped", substitute: kimi }]); + expect(view).toMatchObject({ title: "critic runs on KIMI-K3", action: null }); +}); diff --git a/packages/client-runtime/src/limitedSeatNotices.ts b/packages/client-runtime/src/limitedSeatNotices.ts new file mode 100644 index 0000000000000..a2a4866eb1918 --- /dev/null +++ b/packages/client-runtime/src/limitedSeatNotices.ts @@ -0,0 +1,110 @@ +import type { + DeliveryLimitedSeatNotice, + DeliveryLimitedSeatStatus, + ModelSelection, +} from "@t3tools/contracts"; +import { mFallback, msg } from "gt-i18n"; +import type { MFunctionType } from "gt-i18n/types"; + +/** One limited-seat notice in words, with what its one action does. */ +export interface LimitedSeatNoticeView { + readonly id: string; + readonly notice: DeliveryLimitedSeatNotice; + readonly title: string; + readonly description: string; + readonly action: + | { readonly type: "swap"; readonly label: string; readonly substitute: ModelSelection } + | { readonly type: "open"; readonly label: string } + | null; +} + +/** The notices of a conversation whose seats or lead are limited, the lead's first. */ +export function limitedSeatNoticeViews( + status: DeliveryLimitedSeatStatus | null, + options: { + /** The name a model is shown by; its slug where the catalog has no name for it. */ + readonly modelName: (model: Pick) => string; + /** A reset time as the banner beside it writes one; null leaves the time out. */ + readonly formatReset: (resetAt: string) => string | null; + }, + resolve: MFunctionType = mFallback, +): ReadonlyArray { + if (status === null || status.policy === null) return []; + return status.notices.map((notice) => { + const model = options.modelName(notice.limited); + const substitute = notice.substitute === null ? null : options.modelName(notice.substitute); + const reset = notice.limited.resetAt ? options.formatReset(notice.limited.resetAt) : null; + const limited = + notice.seat === null + ? resolve(msg("{model} has reached its usage limit", { model })) + : resolve(msg("{seat}: {model} has reached its usage limit", { seat: notice.seat, model })); + const id = `limited-seat:${notice.seat ?? ""}:${notice.limited.instanceId}:${notice.limited.model}:${notice.state}`; + if (notice.state === "swapped" && substitute !== null) { + return notice.seat === null + ? { + id, + notice, + title: resolve(msg("Continued on {substitute}", { substitute })), + description: resolve( + msg( + "{model} reached its usage limit, so this conversation continues in a linked thread. This one stays readable.", + { model }, + ), + ), + action: { type: "open", label: resolve(msg("Open thread")) }, + } + : { + id, + notice, + title: resolve(msg("{seat} runs on {substitute}", { seat: notice.seat, substitute })), + description: resolve( + msg( + "{model} has reached its usage limit. {seat} returns to it once the limit resets.", + { + model, + seat: notice.seat, + }, + ), + ), + action: null, + }; + } + if (notice.state === "offered" && notice.substitute !== null && substitute !== null) { + return { + id, + notice, + title: limited, + description: + notice.seat === null + ? resolve( + msg( + "{substitute} is free. Swapping continues this conversation in a new linked thread with a summary.", + { substitute }, + ), + ) + : resolve( + msg("{substitute} is free. {seat} uses it from your next message.", { + substitute, + seat: notice.seat, + }), + ), + action: { + type: "swap", + label: resolve(msg("Swap to {substitute}", { substitute })), + substitute: notice.substitute, + }, + }; + } + const waits = + notice.seat === null + ? resolve(msg("No favorite model is free, so this conversation waits.")) + : resolve(msg("No favorite model is free, so {seat} waits.", { seat: notice.seat })); + return { + id, + notice, + title: limited, + description: reset === null ? waits : `${waits} ${reset}`, + action: null, + }; + }); +} diff --git a/packages/client-runtime/src/state/delivery.ts b/packages/client-runtime/src/state/delivery.ts index 3b42c784340c5..7c5fa3c556036 100644 --- a/packages/client-runtime/src/state/delivery.ts +++ b/packages/client-runtime/src/state/delivery.ts @@ -1,13 +1,36 @@ -import { WS_METHODS } from "@t3tools/contracts"; +import { + type EnvironmentId, + type ScopedThreadRef, + type ThreadId, + WS_METHODS, +} from "@t3tools/contracts"; import { Atom } from "effect/reactivity"; import { deliveryBindingAtom } from "../deliveryModelLock.ts"; import type { EnvironmentRegistry } from "../connection/registry.ts"; +import { scopeThreadRef } from "../environment/scoped.ts"; +import type { EnvironmentThreadShell } from "./models.ts"; import { createEnvironmentRpcCommand, createEnvironmentRpcQueryAtomFamily } from "./runtime.ts"; export function createDeliveryEnvironmentAtoms( runtime: Atom.AtomRuntime, + options: { + /** A thread as the client holds it, so its limited-seat notices follow its runs. */ + readonly threadShellAtom?: ( + ref: ScopedThreadRef, + ) => Atom.Atom | null>; + } = {}, ) { + const { threadShellAtom } = options; + // Only what can change a limit: the latest run, how it ended, and the reset it reported. + const limitedSeatsRevision = Atom.family((key: string) => + Atom.make((get) => { + if (threadShellAtom === undefined) return ""; + const [environmentId, threadId] = JSON.parse(key) as [EnvironmentId, ThreadId]; + const shell = get(threadShellAtom(scopeThreadRef(environmentId, threadId))); + return `${shell?.latestRun?.runId ?? ""}:${shell?.latestRun?.status ?? ""}:${shell?.runtime?.usageLimitResetAt ?? ""}`; + }), + ); const threadBinding = createEnvironmentRpcQueryAtomFamily(runtime, { label: "environment-data:delivery:thread-binding", tag: WS_METHODS.deliveryThreadBinding, @@ -51,6 +74,24 @@ export function createDeliveryEnvironmentAtoms( key: ({ environmentId, input }) => JSON.stringify([environmentId, input.threadId]), }, }), + /** Which seats of a conversation are limited now, and what could stand in. */ + limitedSeats: createEnvironmentRpcQueryAtomFamily(runtime, { + label: "environment-data:delivery:limited-seats", + tag: WS_METHODS.deliveryLimitedSeats, + staleTimeMs: 2_000, + refreshTrigger: ({ environmentId, input }) => + limitedSeatsRevision(JSON.stringify([environmentId, input.threadId])), + }), + /** One click of a limited-seat notice. A second click while the first runs joins it. */ + swapLimitedSeat: createEnvironmentRpcCommand(runtime, { + label: "environment-data:delivery:swap-limited-seat", + tag: WS_METHODS.deliverySwapLimitedSeat, + concurrency: { + mode: "singleFlight", + key: ({ environmentId, input }) => + JSON.stringify([environmentId, input.threadId, input.seat]), + }, + }), bindThread: createEnvironmentRpcCommand(runtime, { label: "environment-data:delivery:bind-thread", tag: WS_METHODS.deliveryBindThread, From a777e754015c13abc450dd178ed1be4b247bb97a Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 16:01:40 +0000 Subject: [PATCH 06/12] fix(server): the lead hand-off also follows the usage-limit error item; document the setting A run's failure and its usage-limit error are separate events and may land in either order, so the hand-off worker now reacts to both. The hand-off is safe to repeat, so the second event changes nothing. The composer guide gains a paragraph on When a seat is limited and Favorites order. Co-Authored-By: Claude Fable 5.2 --- apps/server/src/delivery/LimitedSeatSwap.ts | 4 +++- docs/user/composer.md | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/server/src/delivery/LimitedSeatSwap.ts b/apps/server/src/delivery/LimitedSeatSwap.ts index 7cd759c67344c..5f54037196fe6 100644 --- a/apps/server/src/delivery/LimitedSeatSwap.ts +++ b/apps/server/src/delivery/LimitedSeatSwap.ts @@ -390,7 +390,9 @@ export const layerWorker = Layer.effectDiscard( const orchestrator = yield* Orchestrator.OrchestratorV2; yield* forkParked( Stream.runForEach(orchestrator.streamDomainEvents, (event) => - event.type === "run.updated" && event.payload.status === "failed" + // The failure and its usage-limit error are separate events, in either order. + (event.type === "run.updated" && event.payload.status === "failed") || + (event.type === "turn-item.updated" && event.payload.type === "error") ? swaps.handOffLimitedLead(event.threadId) : Effect.void, ), diff --git a/docs/user/composer.md b/docs/user/composer.md index 03c66e5bac98f..770ba927afd59 100644 --- a/docs/user/composer.md +++ b/docs/user/composer.md @@ -47,6 +47,18 @@ that cannot be held to read-only says so in the setup: leave it out or use full The lead uses the project's folder and your selected access settings. Use **Use ordinary chat** to leave Orchestrator before starting. +**When a seat is limited** decides what happens when a participant's model, or the +orchestrator's, has reached its usage limit. **Swap automatically**, the default, starts +that seat's next turn on the first free model in your Favorites: one that is available, +not limited itself, not on the limited model's account or provider, and not already used +in the conversation. A limited orchestrator continues in a new linked thread with a +summary, and the old thread stays readable and no longer resumes by itself. **Ask me** +shows a notice naming that model with one button to swap. **Leave it out** has the seat +sit the message out. A model you chose for a seat by hand is never swapped without +asking. With no favorite free, the seat waits and a notice says so. Put your Favorites +in order under Settings, Providers, **Favorites order**. The setting applies from your +next message; a board task's conversation follows its team's own setting instead. + Choose **No team** in the setup to run a conversation with participants of your own only: add two or more, each with any provider and model. They join as themselves, with no team instructions, and nothing is saved. From e3289adb135a19817436527699b837e677f6c8c1 Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 17:15:31 +0000 Subject: [PATCH 07/12] fix(delivery): a handed-on lead cannot be resumed twice, and its notices stay current A limited lead handed on to a linked thread could still be re-armed from the old thread's recovery banner, so the same work would run in two threads. The orchestrator now refuses to arm a resume for a run that continues in a linked thread, records the worker's own arming of one as disarmed, and starts no resume for it. The web banner and the mobile card offer no resume or snooze once the continued thread exists. The limited-seats read now refreshes when the lineup or its setting, Favorites or a provider's status changes, and when the continued thread appears or starts, on web and mobile. After an automatic hand-off the old thread named the limited model, because the fork carries its source's model until its first turn lands. The status now names the model the hand-off started. A retried hand-off also no longer sends its first turn on the limited model, and the old thread drops its seat offers. Co-Authored-By: Claude Fable 5.2 --- .../threads/UsageLimitRecoveryCard.test.tsx | 25 ++ .../threads/UsageLimitRecoveryCard.tsx | 8 + apps/mobile/src/state/delivery.ts | 3 + .../src/delivery/LimitedSeatSwap.test.ts | 56 ++++- apps/server/src/delivery/LimitedSeatSwap.ts | 68 +++-- .../src/orchestration-v2/Orchestrator.ts | 27 +- .../src/orchestration-v2/runtimeLayer.test.ts | 234 +++++++++++------- apps/web/src/components/ChatView.tsx | 11 +- .../chat/UsageLimitRecoveryBanner.test.tsx | 12 +- .../chat/UsageLimitRecoveryBanner.tsx | 12 +- apps/web/src/state/delivery.ts | 3 + .../client-runtime/src/state/delivery.test.ts | 168 ++++++++++++- packages/client-runtime/src/state/delivery.ts | 116 +++++++-- packages/shared/src/limitedSeat.ts | 8 + 14 files changed, 622 insertions(+), 129 deletions(-) diff --git a/apps/mobile/src/features/threads/UsageLimitRecoveryCard.test.tsx b/apps/mobile/src/features/threads/UsageLimitRecoveryCard.test.tsx index c7b9a892a0d39..4e56b3db35fb5 100644 --- a/apps/mobile/src/features/threads/UsageLimitRecoveryCard.test.tsx +++ b/apps/mobile/src/features/threads/UsageLimitRecoveryCard.test.tsx @@ -34,6 +34,11 @@ vi.mock("../../components/ui/Button", () => ({ ), })); vi.mock("../../state/threads", () => ({ threadEnvironment: { updateMetadata: {} } })); +const testState = vi.hoisted(() => ({ handedOn: false })); +vi.mock("../../state/delivery", () => ({ + deliveryEnvironment: { limitedLeadHandedOn: () => ({}) }, +})); +vi.mock("@effect/atom-react", () => ({ useAtomValue: () => testState.handedOn })); vi.mock("../../state/use-atom-command", () => ({ useAtomCommand: () => vi.fn() })); import { UsageLimitRecoveryCard } from "./UsageLimitRecoveryCard"; @@ -88,6 +93,26 @@ describe("UsageLimitRecoveryCard", () => { ); }); + it("offers no resume or snooze once the run continues in a linked thread", () => { + using _timers = { [Symbol.dispose]: () => vi.useRealTimers() }; + vi.useFakeTimers({ now: 0 }); + testState.handedOn = true; + using _handedOn = { [Symbol.dispose]: () => void (testState.handedOn = false) }; + const container = document.createElement("div"); + const root = createRoot(container); + using _root = { [Symbol.dispose]: () => act(() => root.unmount()) }; + act(() => + root.render( + , + ), + ); + expect(container.textContent).toContain("Usage limit reached"); + expect(container.querySelectorAll("button")).toHaveLength(0); + }); + it("drops a failed copy's error once a retry copies the request", async () => { vi.mocked(Clipboard.setStringAsync) .mockRejectedValueOnce(new Error("denied")) diff --git a/apps/mobile/src/features/threads/UsageLimitRecoveryCard.tsx b/apps/mobile/src/features/threads/UsageLimitRecoveryCard.tsx index a70d28dad8527..27e08a542ed76 100644 --- a/apps/mobile/src/features/threads/UsageLimitRecoveryCard.tsx +++ b/apps/mobile/src/features/threads/UsageLimitRecoveryCard.tsx @@ -1,3 +1,5 @@ +import { useAtomValue } from "@effect/atom-react"; +import { scopeThreadRef } from "@t3tools/client-runtime/environment"; import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime"; import { errorDisplayMessage } from "@t3tools/client-runtime/errors"; import { AsyncResult } from "effect/reactivity"; @@ -19,6 +21,7 @@ import { tryOpenExternalUrl } from "../../lib/openExternalUrl"; import { ProviderIcon } from "../../components/ProviderIcon"; import { AppText as Text } from "../../components/ui/AppText"; import { useDeadlinePassed } from "../../lib/clock"; +import { deliveryEnvironment } from "../../state/delivery"; import { threadEnvironment } from "../../state/threads"; import { useAtomCommand } from "../../state/use-atom-command"; @@ -34,7 +37,12 @@ export function UsageLimitRecoveryCard({ const [pending, setPending] = useState(false); const [error, setError] = useState(null); const resetAt = thread.runtime?.usageLimitResetAt ?? null; + // A run handed on to a linked thread must not resume here as well. + const handedOn = useAtomValue( + deliveryEnvironment.limitedLeadHandedOn(scopeThreadRef(environmentId, thread.id)), + ); const canSchedule = + !handedOn && thread.settledOverride !== "settled" && resetAt !== null && Date.parse(resetAt) > Date.parse(thread.latestRun?.completedAt ?? thread.updatedAt); diff --git a/apps/mobile/src/state/delivery.ts b/apps/mobile/src/state/delivery.ts index 5c62950182d86..885bcc52df66a 100644 --- a/apps/mobile/src/state/delivery.ts +++ b/apps/mobile/src/state/delivery.ts @@ -2,9 +2,12 @@ import { createDeliveryEnvironmentAtoms } from "@t3tools/client-runtime/state/de import { Atom } from "effect/reactivity"; import type { DeliveryThreadBinding } from "@t3tools/contracts"; import { connectionAtomRuntime } from "../connection/runtime"; +import { serverEnvironment } from "./server"; import { environmentThreadShells } from "./threads"; export const deliveryEnvironment = createDeliveryEnvironmentAtoms(connectionAtomRuntime, { threadShellAtom: environmentThreadShells.threadShellAtom, + settingsAtom: serverEnvironment.settingsValueAtom, + providersAtom: serverEnvironment.providersValueAtom, }); export const emptyDeliveryBindingAtom = Atom.make(null); diff --git a/apps/server/src/delivery/LimitedSeatSwap.test.ts b/apps/server/src/delivery/LimitedSeatSwap.test.ts index 0d33b5f5a5e78..83b43834d564a 100644 --- a/apps/server/src/delivery/LimitedSeatSwap.test.ts +++ b/apps/server/src/delivery/LimitedSeatSwap.test.ts @@ -56,6 +56,8 @@ function setup({ lineage = {} as Record, ordinary = false, limitedSeat = false, + /** The hand-off's fork lands but its first turn has not: the window a status read can fall in. */ + startsNoTurn = false, } = {}) { const providers = [ provider("claude", "claudeAgent"), @@ -97,7 +99,11 @@ function setup({ snooze?: boolean; }, }; - const created = new Map(); + // A fork keeps its source's model until its first turn lands, so the fake never updates it. + const created = new Map< + string, + { id: ThreadId; modelSelection: unknown; deletedAt: null; runs: Array } + >(); const commands: Array = []; const calls: Array = []; const facts = (): LimitedSeatFacts => ({ @@ -140,6 +146,8 @@ function setup({ const projections = { getThreadShell: (thread: ThreadId) => Effect.succeed(thread === threadId ? shell : null), findThread: (thread: ThreadId) => Effect.sync(() => created.get(thread) ?? null), + getThreadRecords: (thread: ThreadId) => + Effect.sync(() => ({ runs: created.get(thread)?.runs ?? [] })), } as unknown as ProjectionStore.ProjectionStoreV2["Service"]; const threads = { dispatch: (command: OrchestrationV2ServerCommand) => @@ -150,9 +158,13 @@ function setup({ created.set(command.targetThreadId, { id: command.targetThreadId, modelSelection: shell.modelSelection, + deletedAt: null, + runs: [], }); - if (command.type === "message.dispatch" && command.modelSelection) - created.get(command.threadId)!.modelSelection = command.modelSelection; + if (command.type === "message.dispatch" && command.modelSelection && !startsNoTurn) { + const runs = created.get(command.threadId)!.runs; + if (runs.length === 0) runs.push({ modelSelection: command.modelSelection }); + } if (command.type === "thread.metadata.update" && command.limitRecovery) shell.limitRecovery = { runId: command.limitRecovery.runId, @@ -208,6 +220,44 @@ it.effect("hands a limited lead on to a linked thread on the first free favorite }).pipe(Effect.provide(fixture.layer)); }); +it.effect("names the model the hand-off started, not the one the fork inherited", () => { + const fixture = setup({ limitedSeat: true }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + yield* swaps.handOffLimitedLead(threadId); + // The old thread runs no more turns: its limited seat is offered no swap there. + expect((yield* swaps.status(threadId)).notices).toEqual([ + { + seat: null, + state: "swapped", + continuedIn: target, + limited: expect.objectContaining({ model: "claude-fable" }), + substitute: { instanceId: "kimi", model: "kimi-k3" }, + }, + ]); + }).pipe(Effect.provide(fixture.layer)); +}); + +it.effect("names the substitute about to start while the fork has no turn yet", () => { + const fixture = setup({ startsNoTurn: true }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + yield* swaps.handOffLimitedLead(threadId); + expect((yield* swaps.status(threadId)).notices).toEqual([ + expect.objectContaining({ + state: "swapped", + substitute: { instanceId: "kimi", model: "kimi-k3" }, + }), + ]); + // Asked again, the turn that never landed is sent on the substitute, not the limited model. + yield* swaps.handOffLimitedLead(threadId); + expect(fixture.commands.at(-1)).toMatchObject({ + type: "message.dispatch", + modelSelection: { instanceId: "kimi", model: "kimi-k3" }, + }); + }).pipe(Effect.provide(fixture.layer)); +}); + it.effect( "disarms the old thread's limit recovery, so the same work is never resumed there", () => { diff --git a/apps/server/src/delivery/LimitedSeatSwap.ts b/apps/server/src/delivery/LimitedSeatSwap.ts index 5f54037196fe6..f540b90fc6fc0 100644 --- a/apps/server/src/delivery/LimitedSeatSwap.ts +++ b/apps/server/src/delivery/LimitedSeatSwap.ts @@ -18,6 +18,7 @@ import { import { firstFreeFavorite, isFreeCandidate, + limitedLeadHandoffThreadId, limitedLeadPool, limitedSeatPool, seatLimit, @@ -42,8 +43,7 @@ import * as LimitedSeats from "./LimitedSeats.ts"; /** What a lead handed on to a new thread is told, as limit recovery tells a thread it resumes. */ export const LEAD_HANDOFF_MESSAGE = "Continue where you left off."; -/** The thread a limited lead's run is handed on to. One per run, however often it is asked for. */ -export const leadHandoffThreadId = (runId: RunId) => ThreadId.make(`limited-lead:${runId}`); +export const leadHandoffThreadId = limitedLeadHandoffThreadId; /** * What hands a limited lead on, in order. The old thread's resume is disarmed first, so the same @@ -177,6 +177,23 @@ const make = Effect.gen(function* () { }; }); + /** + * The thread a limited run was handed on to, with the model the hand-off started it on. The + * fork carries its source's model until that first turn lands, so the thread's own model is + * not the substitute. Null where the run was not handed on, or the thread was deleted since. + */ + const handedOn = Effect.fn("LimitedSeatSwap.handedOn")(function* (runId: RunId) { + const target = leadHandoffThreadId(runId); + const continued = yield* projections.findThread(target); + if (continued === null) return null; + const { runs } = yield* projections.getThreadRecords(target, ["runs"]); + return { + id: continued.id, + deleted: continued.deletedAt !== null, + dispatched: runs[0]?.modelSelection ?? null, + }; + }, Effect.mapError(storage)); + const status: LimitedSeatSwap["Service"]["status"] = Effect.fn("LimitedSeatSwap.status")( function* (threadId) { const conversation = yield* governed(threadId); @@ -186,21 +203,26 @@ const make = Effect.gen(function* () { const notices: Array = []; const lead = leadLimit(shell, facts.now); if (lead !== null) { - const continued = yield* projections - .findThread(leadHandoffThreadId(lead.runId)) - .pipe(Effect.mapError(storage)); - if (continued !== null) { - notices.push({ - seat: null, - limited: lead.limited, - state: "swapped", - substitute: continued.modelSelection, - continuedIn: continued.id, - }); - } else if (policy !== "skip") { - const free = firstFreeFavorite( - limitedLeadPool({ facts, roster: lineup.participants, lead: shell.modelSelection }), - ); + const continued = yield* handedOn(lead.runId); + const free = firstFreeFavorite( + limitedLeadPool({ facts, roster: lineup.participants, lead: shell.modelSelection }), + ); + if (continued !== null && !continued.deleted) { + // Between the fork and its first turn, the substitute is the one about to be started. + const substitute = continued.dispatched ?? (free === null ? null : selectionOf(free)); + if (substitute !== null) + notices.push({ + seat: null, + limited: lead.limited, + state: "swapped", + substitute, + continuedIn: continued.id, + }); + // This thread runs no more turns, so its seats have nothing left to swap for. + return { policy, notices }; + } + // A deleted continuation cannot be made again; the recovery banner's resume is the way on. + if (continued === null && policy !== "skip") { notices.push({ seat: null, limited: lead.limited, @@ -258,17 +280,21 @@ const make = Effect.gen(function* () { const lead = leadLimit(shell, facts.now); if (lead === null) return yield* refused("This conversation's lead is not limited now."); const target = leadHandoffThreadId(lead.runId); - const existing = yield* projections.findThread(target).pipe(Effect.mapError(storage)); + const existing = yield* handedOn(lead.runId); + if (existing?.deleted === true) + return yield* refused( + "The thread this conversation continued in was deleted. Resume this one at its reset.", + ); const pool = limitedLeadPool({ facts, roster: lineup.participants, lead: shell.modelSelection, }); const free = firstFreeFavorite(pool); - // A hand-off already made keeps its model: a second click or sweep only finishes it. + // A hand-off already started keeps its model: a second click or sweep only finishes it. const substitute = - existing !== null - ? existing.modelSelection + existing !== null && existing.dispatched !== null + ? existing.dispatched : chosen !== undefined ? isFreeCandidate(pool, seatModelOf(chosen)) ? chosen diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 9ca90a5d8f18b..8d877e6871e59 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -84,6 +84,7 @@ import { managedRuntimeModeCeilingMessage, } from "@t3tools/contracts"; import * as KeyedLock from "@t3tools/shared/KeyedLock"; +import { limitedLeadHandoffThreadId } from "@t3tools/shared/limitedSeat"; import { modelSelectionsEqual } from "@t3tools/shared/model"; import { expandAssistantCitationsForProvider } from "@t3tools/shared/assistantCitations"; import { modelSwitchSince } from "./modelSwitch.ts"; @@ -1908,6 +1909,15 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio .findThread(threadId) .pipe(Effect.mapError((cause) => new OrchestratorProjectionError({ threadId, cause }))); + /** + * Whether a limited lead's run was handed on to a linked thread. Resuming it here as well would + * run the same work twice, so nothing arms or resumes it while that thread exists. + */ + const runHandedOn = (runId: RunId) => + findThread(limitedLeadHandoffThreadId(runId)).pipe( + Effect.map((continued) => continued !== null && continued.deletedAt === null), + ); + /** Side chats live inside their parent, so deleting or archiving the parent takes them too. */ const liveSideChatIds = Effect.fn("Orchestrator.liveSideChatIds")( function* (threadId: ThreadId) { @@ -4842,6 +4852,20 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio cause: "The provider limit changed before recovery could be configured.", }); } + const previous = thread.limitRecovery; + const resumes = + command.limitRecovery.autoResume ?? + (previous?.runId === command.limitRecovery.runId && + previous.resetAt === command.limitRecovery.resetAt && + previous.autoResume); + if (resumes && (yield* runHandedOn(command.limitRecovery.runId))) { + return yield* new OrchestratorDispatchError({ + commandId: command.commandId, + commandType: command.type, + cause: + "This conversation continues in a linked thread. Open that thread instead of resuming this one.", + }); + } } let restoredUnsettledAt: DateTime.Utc | null | undefined; if (command.type === "thread.unsettle" && command.restoreUnsettledAt !== undefined) { @@ -7255,6 +7279,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio const now = yield* DateTime.now; if ( run?.id !== command.usageLimitContinuationOfRunId || + (yield* runHandedOn(command.usageLimitContinuationOfRunId)) || failure?.class !== "usage_limit" || threadShellFromProjection(projection).lastErrorClass !== "usage_limit" || !recovery?.autoResume || @@ -17059,7 +17084,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio // A Stop that reached the run before its limit failure landed had nothing to disarm. const stopped = yield* stopReachedRun(command, input.threadId, input.limitRecovery.runId); yield* dispatchWithReceiptEffect( - stopped + stopped || (yield* runHandedOn(input.limitRecovery.runId)) ? { ...command, limitRecovery: { ...input.limitRecovery, autoResume: false, snooze: false }, diff --git a/apps/server/src/orchestration-v2/runtimeLayer.test.ts b/apps/server/src/orchestration-v2/runtimeLayer.test.ts index 99b1b36437d17..68cdfc5c2580a 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.test.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.test.ts @@ -13354,93 +13354,100 @@ it.layer(layerSharedApplicationDataPlaneTest)("shared application data plane", ( }); it.layer(layerTest)("usage-limit recovery", (it) => { - it.effect("hands a limited lead on to a linked thread once, and stops its own resume", () => - Effect.gen(function* () { - const orchestrator = yield* Orchestrator.OrchestratorV2; - const events = yield* EventSink.EventSinkV2; - const threadId = ThreadId.make("limited-lead"); - const projectId = ProjectId.make("limited-lead:project"); - const now = yield* DateTime.now; - yield* seedProject({ - projectId, - title: "Hand-off project", - workspaceRoot: process.cwd(), - defaultModelSelection: modelSelection, - createdAt: DateTime.formatIso(now), - }); - yield* orchestrator.dispatch({ - type: "thread.create", - commandId: CommandId.make("limited-lead:create"), - threadId, - projectId, - title: "Limited lead", - modelSelection, - runtimeMode: "full-access", - interactionMode: "default", - branch: null, - worktreePath: null, - createdBy: "user", - creationSource: "web", - }); - yield* orchestrator.dispatch({ - type: "message.dispatch", - commandId: CommandId.make("limited-lead:start"), - threadId, - messageId: MessageId.make("limited-lead:start"), - text: "Start work.", - attachments: [], - dispatchMode: { type: "defer_start" }, - createdBy: "user", - creationSource: "web", - }); - const [source] = (yield* orchestrator.getThreadProjection(threadId)).runs as [ - OrchestrationV2Run, - ]; - const resetAt = DateTime.formatIso(DateTime.add(now, { minutes: 1 })); - yield* events.write({ - events: [ - { - id: EventId.make("limited-lead:failed"), - type: "run.updated", - threadId, - occurredAt: now, - payload: { ...source, status: "failed", completedAt: now }, - }, - { - id: EventId.make("limited-lead:error"), - type: "turn-item.updated", + /** A thread whose first run failed on a usage limit that resets in a minute. */ + const failLimitedLead = Effect.fn("failLimitedLead")(function* (name: string) { + const orchestrator = yield* Orchestrator.OrchestratorV2; + const events = yield* EventSink.EventSinkV2; + const threadId = ThreadId.make(name); + const projectId = ProjectId.make(`${name}:project`); + const now = yield* DateTime.now; + yield* seedProject({ + projectId, + title: "Hand-off project", + workspaceRoot: process.cwd(), + defaultModelSelection: modelSelection, + createdAt: DateTime.formatIso(now), + }); + yield* orchestrator.dispatch({ + type: "thread.create", + commandId: CommandId.make(`${name}:create`), + threadId, + projectId, + title: "Limited lead", + modelSelection, + runtimeMode: "full-access", + interactionMode: "default", + branch: null, + worktreePath: null, + createdBy: "user", + creationSource: "web", + }); + yield* orchestrator.dispatch({ + type: "message.dispatch", + commandId: CommandId.make(`${name}:start`), + threadId, + messageId: MessageId.make(`${name}:start`), + text: "Start work.", + attachments: [], + dispatchMode: { type: "defer_start" }, + createdBy: "user", + creationSource: "web", + }); + const [source] = (yield* orchestrator.getThreadProjection(threadId)).runs as [ + OrchestrationV2Run, + ]; + const resetAt = DateTime.formatIso(DateTime.add(now, { minutes: 1 })); + yield* events.write({ + events: [ + { + id: EventId.make(`${name}:failed`), + type: "run.updated", + threadId, + occurredAt: now, + payload: { ...source, status: "failed", completedAt: now }, + }, + { + id: EventId.make(`${name}:error`), + type: "turn-item.updated", + threadId, + occurredAt: now, + payload: { + id: TurnItemId.make(`${name}:error`), + type: "error", threadId, - occurredAt: now, - payload: { - id: TurnItemId.make("limited-lead:error"), - type: "error", - threadId, - runId: source.id, - nodeId: source.rootNodeId, - providerThreadId: null, - providerTurnId: null, - nativeItemRef: null, - parentItemId: null, - ordinal: 2, - status: "failed", - title: "Usage limit reached", - startedAt: now, - completedAt: now, - updatedAt: now, - failure: { - class: "usage_limit", - message: "Plan limit reached.", - code: "usageLimitExceeded", - retryable: null, - resetAt, - }, + runId: source.id, + nodeId: source.rootNodeId, + providerThreadId: null, + providerTurnId: null, + nativeItemRef: null, + parentItemId: null, + ordinal: 2, + status: "failed", + title: "Usage limit reached", + startedAt: now, + completedAt: now, + updatedAt: now, + failure: { + class: "usage_limit", + message: "Plan limit reached.", + code: "usageLimitExceeded", + retryable: null, + resetAt, }, }, - ], - }); - const shellOf = Effect.map(orchestrator.getShellSnapshot(), (snapshot) => - snapshot.threads.find((thread) => thread.id === threadId)!, - ); + }, + ], + }); + const shellOf = Effect.map(orchestrator.getShellSnapshot(), (snapshot) => + snapshot.threads.find((thread) => thread.id === threadId)!, + ); + return { orchestrator, threadId, source, resetAt, now, shellOf }; + }); + + it.effect("hands a limited lead on to a linked thread once, and stops its own resume", () => + Effect.gen(function* () { + const { orchestrator, threadId, source, resetAt, now, shellOf } = + yield* failLimitedLead("limited-lead"); // Left alone, the recovery worker would arm this thread and resume it at the reset. assert.isNotNull(limitRecoveryCommand(yield* shellOf, true, DateTime.toEpochMillis(now))); @@ -13469,6 +13476,65 @@ it.layer(layerTest)("usage-limit recovery", (it) => { assert.deepInclude(old.limitRecovery, { runId: source.id, autoResume: false }); assert.isNull(limitRecoveryCommand(old, true, Date.parse(resetAt))); assert.lengthOf((yield* orchestrator.getThreadProjection(threadId)).runs, 1); + + // "Resume at reset" pressed on the old thread: refused, and the recovery stays disarmed. + const rearm = yield* Effect.flip( + orchestrator.dispatch({ + type: "thread.metadata.update", + commandId: CommandId.make("limited-lead:rearm"), + threadId, + limitRecovery: { runId: source.id, resetAt, autoResume: true }, + }), + ); + assert.include(String(rearm.cause), "continues in a linked thread"); + assert.deepInclude((yield* shellOf).limitRecovery, { autoResume: false }); + // Snoozing the old thread until its reset resumes nothing, so it stays allowed. + yield* orchestrator.dispatch({ + type: "thread.metadata.update", + commandId: CommandId.make("limited-lead:snooze"), + threadId, + limitRecovery: { runId: source.id, resetAt, snooze: true }, + }); + assert.deepInclude((yield* shellOf).limitRecovery, { autoResume: false, snooze: true }); + // A resume that still reaches the old thread starts no run there. + yield* orchestrator.dispatch({ + type: "message.dispatch", + commandId: CommandId.make("limited-lead:resume"), + messageId: MessageId.make("limited-lead:resume"), + threadId, + usageLimitContinuationOfRunId: source.id, + text: "Continue where you left off.", + attachments: [], + dispatchMode: { type: "start_immediately" }, + createdBy: "agent", + creationSource: "server", + }); + assert.lengthOf((yield* orchestrator.getThreadProjection(threadId)).runs, 1); + }), + ); + + it.effect("records the worker's arming of a handed-on run as disarmed", () => + Effect.gen(function* () { + const { orchestrator, threadId, source, resetAt, shellOf } = + yield* failLimitedLead("limited-lead-armed"); + // Handed on with nothing to disarm, as when no recovery was on record yet. + for (const command of leadHandoffCommands({ + threadId, + title: "Limited lead", + runId: source.id, + resetAt: null, + substitute: { instanceId: alternateInstanceId, model: "gpt-5.4" }, + })) + yield* orchestrator.dispatch(command); + assert.isUndefined((yield* shellOf).limitRecovery?.autoResume); + yield* orchestrator.autoArmLimitRecovery({ + commandId: CommandId.make("limited-lead-armed:auto-arm"), + threadId, + limitRecovery: { runId: source.id, resetAt, autoResume: true }, + }); + const old = yield* shellOf; + assert.deepInclude(old.limitRecovery, { runId: source.id, autoResume: false }); + assert.isNull(limitRecoveryCommand(old, true, Date.parse(resetAt))); }), ); diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 551f79b56d7e3..1bc10541a146c 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -192,7 +192,7 @@ import { squashAtomCommandFailure, type AtomCommandResult, } from "@t3tools/client-runtime/state/runtime"; -import { AsyncResult } from "effect/reactivity"; +import { AsyncResult, Atom } from "effect/reactivity"; import { isElectron } from "../env"; import { useActiveThreadRef } from "../hooks/useActiveThreadRef"; import { composerRequiresModifier } from "../composer-logic"; @@ -450,6 +450,7 @@ import { } from "./ChatView.logic"; const EMPTY_PROVIDERS: ServerProvider[] = []; +const NOT_HANDED_ON_ATOM = Atom.make(false); const EMPTY_PROVIDER_MODELS: ServerProvider["models"] = []; const EMPTY_USAGE_LIMIT_SOURCES: UsageLimitSourceSnapshots = []; import type { CodexArtifactTemplate } from "@t3tools/shared/codexArtifactTemplates"; @@ -2873,6 +2874,13 @@ export default function ChatView(props: ChatViewProps) { ); return item ? [item] : []; }); + const limitedLeadHandedOn = useAtomValue( + activeThreadShell === null + ? NOT_HANDED_ON_ATOM + : deliveryEnvironment.limitedLeadHandedOn( + scopeThreadRef(environmentId, activeThreadShell.id), + ), + ); const limitRecoveryBanner = useUsageLimitRecoveryBannerItem( limitRecoveryRun !== null && activeThreadShell !== null ? { @@ -2882,6 +2890,7 @@ export default function ChatView(props: ChatViewProps) { stoppedAt: limitRecoveryRun.completedAt ?? activeThreadShell.updatedAt, settled: activeThreadShell.settledOverride === "settled", requestPending: pendingApprovals.length > 0 || pendingUserInputs.length > 0, + handedOn: limitedLeadHandedOn, recovery: activeThreadShell.limitRecovery ?? null, snoozedUntil: activeThreadShell.snoozedUntil, timestampFormat, diff --git a/apps/web/src/components/chat/UsageLimitRecoveryBanner.test.tsx b/apps/web/src/components/chat/UsageLimitRecoveryBanner.test.tsx index ea757f4604128..77263da1018c0 100644 --- a/apps/web/src/components/chat/UsageLimitRecoveryBanner.test.tsx +++ b/apps/web/src/components/chat/UsageLimitRecoveryBanner.test.tsx @@ -6,7 +6,7 @@ import { usageLimitRecoveryBannerItem } from "./UsageLimitRecoveryBanner"; const stoppedAt = new Date(2026, 9, 20, 12, 0); -function bannerItem(resetAt: Date, timestampFormat: TimestampFormat = "24-hour") { +function bannerItem(resetAt: Date, timestampFormat: TimestampFormat = "24-hour", handedOn = false) { return usageLimitRecoveryBannerItem({ runId: RunId.make("run-1"), errorCode: null, @@ -14,6 +14,7 @@ function bannerItem(resetAt: Date, timestampFormat: TimestampFormat = "24-hour") stoppedAt: stoppedAt.toISOString(), settled: false, requestPending: false, + handedOn, snoozedUntil: null, recovery: null, timestampFormat, @@ -30,6 +31,15 @@ describe("usageLimitRecoveryBannerItem", () => { expect(bannerItem(new Date(2026, 9, 20, 17, 30), timestampFormat).description).toBe(expected); }); + it("offers no resume or snooze once the run continues in a linked thread", () => { + using _now = vi.spyOn(Date, "now").mockReturnValue(stoppedAt.getTime()); + const resetAt = new Date(2026, 9, 20, 17, 30); + expect(bannerItem(resetAt).actions).not.toBeNull(); + const handedOn = bannerItem(resetAt, "24-hour", true); + expect(handedOn.actions).toBeNull(); + expect(handedOn.description).toBe("Resets 17:30"); + }); + it("names the day when the reset is tomorrow", () => { using _now = vi.spyOn(Date, "now").mockReturnValue(stoppedAt.getTime()); expect(bannerItem(new Date(2026, 9, 21, 17, 30)).description).toBe("Resets tomorrow at 17:30"); diff --git a/apps/web/src/components/chat/UsageLimitRecoveryBanner.tsx b/apps/web/src/components/chat/UsageLimitRecoveryBanner.tsx index 61774393c445d..2159203e235b2 100644 --- a/apps/web/src/components/chat/UsageLimitRecoveryBanner.tsx +++ b/apps/web/src/components/chat/UsageLimitRecoveryBanner.tsx @@ -31,6 +31,8 @@ type RecoveryProps = { stoppedAt: string; settled: boolean; requestPending: boolean; + /** The run continues in a linked thread, so resuming it here would run the same work twice. */ + handedOn?: boolean; snoozedUntil: string | null; recovery: OrchestrationV2LimitRecovery | null; timestampFormat: TimestampFormat; @@ -48,13 +50,21 @@ function parseEpochMs(isoDate: string | null): number | null { function limitRecoveryScheduleState( props: Pick< RecoveryProps, - "runId" | "resetAt" | "stoppedAt" | "settled" | "requestPending" | "recovery" | "snoozedUntil" + | "runId" + | "resetAt" + | "stoppedAt" + | "settled" + | "requestPending" + | "handedOn" + | "recovery" + | "snoozedUntil" >, ) { // The server refuses recovery changes while a request is pending. const canSchedule = !props.settled && !props.requestPending && + props.handedOn !== true && props.resetAt !== null && Date.parse(props.resetAt) > Date.parse(props.stoppedAt); const resumes = diff --git a/apps/web/src/state/delivery.ts b/apps/web/src/state/delivery.ts index 66c5a1f592915..cd3e3bc20f7a5 100644 --- a/apps/web/src/state/delivery.ts +++ b/apps/web/src/state/delivery.ts @@ -29,6 +29,7 @@ import type { import { boardPreferencesOf, useBoardStore } from "./deliveryBoard"; import { useEnvironments, usePrimaryEnvironmentId } from "./environments"; import { useEnvironmentQuery } from "./query"; +import { serverEnvironment } from "./server"; import { environmentThreadShells } from "./threads"; import { useAtomCommand } from "./use-atom-command"; @@ -37,6 +38,8 @@ export { useBoardStore } from "./deliveryBoard"; export const deliveryEnvironment = createDeliveryEnvironmentAtoms(connectionAtomRuntime, { threadShellAtom: environmentThreadShells.threadShellAtom, + settingsAtom: serverEnvironment.settingsValueAtom, + providersAtom: serverEnvironment.providersValueAtom, }); /** Whether this environment has a delivery engine turned on. */ diff --git a/packages/client-runtime/src/state/delivery.test.ts b/packages/client-runtime/src/state/delivery.test.ts index 836146b243015..5ad86c728fc55 100644 --- a/packages/client-runtime/src/state/delivery.test.ts +++ b/packages/client-runtime/src/state/delivery.test.ts @@ -4,6 +4,7 @@ import { AuthOrchestrationOperateScope, type AuthSessionState, EnvironmentId, + ThreadId, WS_METHODS, type DeliveryActInput, type DeliveryReadInput, @@ -26,7 +27,11 @@ import { import { EnvironmentSupervisor } from "../connection/supervisor.ts"; import type { WsRpcProtocolClient } from "../rpc/protocol.ts"; import type { RpcSession } from "../rpc/session.ts"; -import { createDeliveryEnvironmentAtoms } from "./delivery.ts"; +import { + createDeliveryEnvironmentAtoms, + limitedLeadHandedOn, + limitedSeatsRevision, +} from "./delivery.ts"; vi.mock("./session.ts", () => ({ createEnvironmentSessionAtoms: () => ({ sessionStateAtom: () => grantedSession }), @@ -49,7 +54,11 @@ const MAC = EnvironmentId.make("mac"); const WINDOWS = EnvironmentId.make("windows"); const TASK_PATH = "/api/tasks/1016"; -const makeHarness = Effect.fn("TestDeliveryEnvironments.makeHarness")(function* () { +const makeHarness = Effect.fn("TestDeliveryEnvironments.makeHarness")(function* ( + options: Parameters[1] = {}, + /** The lineup the server holds for a conversation, as its thread-binding read answers. */ + lineup: { current: unknown } = { current: undefined }, +) { const calls: Array<{ environmentId: EnvironmentId; method: string; input: unknown }> = []; const supervisors = new Map(); for (const environmentId of [MAC, WINDOWS]) { @@ -62,6 +71,16 @@ const makeHarness = Effect.fn("TestDeliveryEnvironments.makeHarness")(function* [WS_METHODS.deliveryRead]: (input: DeliveryReadInput) => respond(WS_METHODS.deliveryRead, input), [WS_METHODS.deliveryAct]: (input: DeliveryActInput) => respond(WS_METHODS.deliveryAct, input), + [WS_METHODS.deliveryLimitedSeats]: (input: unknown) => + respond(WS_METHODS.deliveryLimitedSeats, input).pipe( + Effect.as({ policy: "swap", notices: [] }), + ), + [WS_METHODS.deliveryThreadBinding]: () => + Effect.sync(() => ({ + binding: null, + pending: null, + ...(lineup.current === undefined ? {} : { lineup: lineup.current }), + })), } as unknown as WsRpcProtocolClient; const session: RpcSession = { client, @@ -112,6 +131,7 @@ const makeHarness = Effect.fn("TestDeliveryEnvironments.makeHarness")(function* } as unknown as EnvironmentRegistry["Service"]); const atoms = createDeliveryEnvironmentAtoms( Atom.runtime(Layer.succeed(EnvironmentRegistry, service)), + options, ); const registry = AtomRegistry.make(); yield* Effect.addFinalizer(() => Effect.sync(() => registry.dispose())); @@ -226,3 +246,147 @@ describe("delivery environment routing", () => { }), ); }); + +describe("limited-seat notices", () => { + const thread = ThreadId.make("lead-thread"); + const run = (runId: string, status: string) => + ({ latestRun: { runId, status }, runtime: null, modelSelection: fable }) as never; + const fable = { instanceId: "claude", model: "claude-fable" }; + const provider = (overrides: Record = {}) => + ({ + instanceId: "kimi", + enabled: true, + installed: true, + status: "ready", + auth: { status: "authenticated" }, + usageLimits: { windows: [{ id: "weekly", usedPercent: 40 }] }, + ...overrides, + }) as never; + const base = { + shell: run("run-1", "failed"), + continued: null, + lineup: { participants: [], limitedSeat: "ask" } as never, + settings: { favorites: [{ provider: "kimi", model: "kimi-k3" }] } as never, + providers: [provider()], + }; + + it("change with everything a notice is decided from, and with nothing else", () => { + const revision = limitedSeatsRevision(base); + const changes = { + "the setting": { lineup: { participants: [], limitedSeat: "skip" } as never }, + "the lineup's seats": { + lineup: { + participants: [{ seat: "critic", role: "reviewer", modelSelection: fable }], + limitedSeat: "ask", + } as never, + }, + "Favorites and their order": { + settings: { + favorites: [ + { provider: "deepseek", model: "deepseek-v4" }, + { provider: "kimi", model: "kimi-k3" }, + ], + } as never, + }, + "a provider turned off": { providers: [provider({ enabled: false })] }, + "a provider signed out": { providers: [provider({ auth: { status: "unauthenticated" } })] }, + "a provider reaching its limit": { + providers: [provider({ usageLimits: { windows: [{ id: "weekly", usedPercent: 100 }] } })], + }, + "the run": { shell: run("run-2", "running") }, + "the thread the run was handed on to": { + continued: { latestRun: null, runtime: null, modelSelection: fable } as never, + }, + }; + for (const [name, change] of Object.entries(changes)) + expect(limitedSeatsRevision({ ...base, ...change }), name).not.toBe(revision); + // A usage window filling up is not a change until it is full. + expect( + limitedSeatsRevision({ + ...base, + providers: [provider({ usageLimits: { windows: [{ id: "weekly", usedPercent: 41 }] } })], + }), + ).toBe(revision); + // The handed-on thread's first turn changes its model, and the notice names that model. + const forked = { latestRun: null, runtime: null, modelSelection: fable } as never; + const started = { + latestRun: { runId: "run-c", status: "running" }, + runtime: null, + modelSelection: { instanceId: "kimi", model: "kimi-k3" }, + } as never; + expect(limitedSeatsRevision({ ...base, continued: started })).not.toBe( + limitedSeatsRevision({ ...base, continued: forked }), + ); + }); + + it("knows a limited run was handed on by the thread it continues in", () => { + const continued = new Set(["limited-lead:run-1"]); + const has = (threadId: ThreadId) => continued.has(threadId); + expect(limitedLeadHandedOn(run("run-1", "failed"), has)).toBe(true); + expect(limitedLeadHandedOn(run("run-2", "failed"), has)).toBe(false); + expect(limitedLeadHandedOn(null, has)).toBe(false); + }); + + it.effect("are read again when the lineup, Favorites or a provider changes", () => + Effect.gen(function* () { + const settings = Atom.make(base.settings as object).pipe(Atom.keepAlive); + const providers = Atom.make(base.providers as object).pipe(Atom.keepAlive); + const shells = Atom.family((threadId: string) => + Atom.make(threadId === thread ? (base.shell as object) : null).pipe( + Atom.keepAlive, + ), + ); + const lineup = { current: base.lineup as unknown }; + const { atoms, calls, registry } = yield* makeHarness( + { + threadShellAtom: (ref) => shells(ref.threadId) as never, + settingsAtom: () => settings as never, + providersAtom: () => providers as never, + }, + lineup, + ); + const target = { environmentId: MAC, input: { threadId: thread } }; + const query = atoms.limitedSeats(target); + const reads = () => + calls.filter((call) => call.method === WS_METHODS.deliveryLimitedSeats).length; + const read = AtomRegistry.getResult(registry, query, { suspendOnWaiting: true }).pipe( + Effect.tap(() => Effect.yieldNow), + ); + registry.mount(query); + registry.mount(atoms.limitedLeadHandedOn({ environmentId: MAC, threadId: thread })); + yield* read; + yield* AtomRegistry.getResult(registry, atoms.threadBinding(target)); + yield* read; + const settled = reads(); + + registry.set(settings, { favorites: [] }); + yield* read; + expect(reads()).toBe(settled + 1); + + registry.set(providers, [provider({ enabled: false })]); + yield* read; + expect(reads()).toBe(settled + 2); + + // The lineup panel saves a new setting, then reads the conversation's state again. + lineup.current = { participants: [], limitedSeat: "skip" }; + registry.refresh(atoms.threadBinding(target)); + yield* AtomRegistry.getResult(registry, atoms.threadBinding(target), { + suspendOnWaiting: true, + }); + yield* read; + expect(reads()).toBe(settled + 3); + + // The run is handed on: the old thread stops offering its resume, and reads its notice. + const handedOn = atoms.limitedLeadHandedOn({ environmentId: MAC, threadId: thread }); + expect(registry.get(handedOn)).toBe(false); + registry.set(shells("limited-lead:run-1"), { + latestRun: null, + runtime: null, + modelSelection: fable, + }); + expect(registry.get(handedOn)).toBe(true); + yield* read; + expect(reads()).toBe(settled + 4); + }), + ); +}); diff --git a/packages/client-runtime/src/state/delivery.ts b/packages/client-runtime/src/state/delivery.ts index 7c5fa3c556036..1ca9f83da6a1f 100644 --- a/packages/client-runtime/src/state/delivery.ts +++ b/packages/client-runtime/src/state/delivery.ts @@ -1,10 +1,14 @@ import { + type DeliveryThreadState, type EnvironmentId, type ScopedThreadRef, + type ServerProvider, + type ServerSettings, type ThreadId, WS_METHODS, } from "@t3tools/contracts"; -import { Atom } from "effect/reactivity"; +import { limitedLeadHandoffThreadId } from "@t3tools/shared/limitedSeat"; +import { AsyncResult, Atom } from "effect/reactivity"; import { deliveryBindingAtom } from "../deliveryModelLock.ts"; import type { EnvironmentRegistry } from "../connection/registry.ts"; @@ -12,30 +16,109 @@ import { scopeThreadRef } from "../environment/scoped.ts"; import type { EnvironmentThreadShell } from "./models.ts"; import { createEnvironmentRpcCommand, createEnvironmentRpcQueryAtomFamily } from "./runtime.ts"; +type LimitedSeatsShell = Pick; + +/** + * Everything a conversation's limited-seat notices are decided from, as one value that changes + * when any of it does: the lead's latest run and the reset it reported, the thread that run was + * handed on to, the lineup with its setting, Favorites, and what each provider can run now. + */ +export function limitedSeatsRevision(input: { + readonly shell: LimitedSeatsShell | null; + /** The thread the latest run was handed on to, once the client holds it. */ + readonly continued: LimitedSeatsShell | null; + readonly lineup: DeliveryThreadState["lineup"]; + readonly settings: Pick | null; + readonly providers: ReadonlyArray | null; +}): string { + const { shell, continued } = input; + return JSON.stringify([ + shell?.latestRun?.runId ?? null, + shell?.latestRun?.status ?? null, + shell?.runtime?.usageLimitResetAt ?? null, + shell?.modelSelection ?? null, + continued === null ? null : [continued.modelSelection, continued.latestRun?.runId ?? null], + input.lineup ?? null, + input.settings?.favorites ?? null, + input.settings?.projectSettingsOverrides ?? null, + (input.providers ?? []).map((provider) => [ + provider.instanceId, + provider.enabled, + provider.installed, + provider.status, + provider.availability ?? null, + provider.auth.status, + provider.auth.email ?? null, + provider.supportsSessions ?? null, + // A window's fill moves all day; only reaching or leaving its limit changes a notice. + (provider.usageLimits?.windows ?? []) + .filter((window) => (window.usedPercent ?? 0) >= 100) + .map((window) => [window.id, window.resetsAt ?? null]), + ]), + ]); +} + +/** Whether a thread's limited run continues in a linked thread, so it must not resume here too. */ +export function limitedLeadHandedOn( + shell: Pick | null, + hasThread: (threadId: ThreadId) => boolean, +): boolean { + const runId = shell?.latestRun?.runId; + return runId !== undefined && hasThread(limitedLeadHandoffThreadId(runId)); +} + export function createDeliveryEnvironmentAtoms( runtime: Atom.AtomRuntime, options: { /** A thread as the client holds it, so its limited-seat notices follow its runs. */ - readonly threadShellAtom?: ( - ref: ScopedThreadRef, - ) => Atom.Atom | null>; + readonly threadShellAtom?: (ref: ScopedThreadRef) => Atom.Atom; + /** Favorites and provider statuses decide a substitute, so the notices follow them too. */ + readonly settingsAtom?: ( + environmentId: EnvironmentId, + ) => Atom.Atom | null>; + readonly providersAtom?: ( + environmentId: EnvironmentId, + ) => Atom.Atom | null>; } = {}, ) { - const { threadShellAtom } = options; - // Only what can change a limit: the latest run, how it ended, and the reset it reported. - const limitedSeatsRevision = Atom.family((key: string) => - Atom.make((get) => { - if (threadShellAtom === undefined) return ""; - const [environmentId, threadId] = JSON.parse(key) as [EnvironmentId, ThreadId]; - const shell = get(threadShellAtom(scopeThreadRef(environmentId, threadId))); - return `${shell?.latestRun?.runId ?? ""}:${shell?.latestRun?.status ?? ""}:${shell?.runtime?.usageLimitResetAt ?? ""}`; - }), - ); + const { threadShellAtom, settingsAtom, providersAtom } = options; const threadBinding = createEnvironmentRpcQueryAtomFamily(runtime, { label: "environment-data:delivery:thread-binding", tag: WS_METHODS.deliveryThreadBinding, staleTimeMs: 1_000, }); + const limitedSeatsRevisionAtom = Atom.family((key: string) => + Atom.make((get) => { + const [environmentId, threadId] = JSON.parse(key) as [EnvironmentId, ThreadId]; + const shell = threadShellAtom + ? get(threadShellAtom(scopeThreadRef(environmentId, threadId))) + : null; + const runId = shell?.latestRun?.runId; + return limitedSeatsRevision({ + shell, + continued: + threadShellAtom && runId !== undefined + ? get(threadShellAtom(scopeThreadRef(environmentId, limitedLeadHandoffThreadId(runId)))) + : null, + lineup: AsyncResult.getOrElse( + get(threadBinding({ environmentId, input: { threadId } })), + () => null, + )?.lineup, + settings: settingsAtom ? get(settingsAtom(environmentId)) : null, + providers: providersAtom ? get(providersAtom(environmentId)) : null, + }); + }), + ); + const limitedLeadHandedOnAtom = Atom.family((key: string) => + Atom.make((get) => { + if (threadShellAtom === undefined) return false; + const [environmentId, threadId] = JSON.parse(key) as [EnvironmentId, ThreadId]; + return limitedLeadHandedOn( + get(threadShellAtom(scopeThreadRef(environmentId, threadId))), + (continued) => get(threadShellAtom(scopeThreadRef(environmentId, continued))) !== null, + ); + }), + ); const modelBinding = Atom.family((query: ReturnType) => Atom.family((threadId: string) => deliveryBindingAtom(query, threadId)), ); @@ -80,8 +163,11 @@ export function createDeliveryEnvironmentAtoms( tag: WS_METHODS.deliveryLimitedSeats, staleTimeMs: 2_000, refreshTrigger: ({ environmentId, input }) => - limitedSeatsRevision(JSON.stringify([environmentId, input.threadId])), + limitedSeatsRevisionAtom(JSON.stringify([environmentId, input.threadId])), }), + /** Whether a thread's limited run continues in a linked thread; it then offers no resume. */ + limitedLeadHandedOn: (ref: ScopedThreadRef) => + limitedLeadHandedOnAtom(JSON.stringify([ref.environmentId, ref.threadId])), /** One click of a limited-seat notice. A second click while the first runs joins it. */ swapLimitedSeat: createEnvironmentRpcCommand(runtime, { label: "environment-data:delivery:swap-limited-seat", diff --git a/packages/shared/src/limitedSeat.ts b/packages/shared/src/limitedSeat.ts index 76d278a92b06e..43d1e29c72aef 100644 --- a/packages/shared/src/limitedSeat.ts +++ b/packages/shared/src/limitedSeat.ts @@ -3,13 +3,21 @@ import { type ModelSelection, type ProjectId, type ProviderInstanceId, + type RunId, resolveProjectProviderInstanceEnabled, type ServerProvider, type ServerSettings, + ThreadId, } from "@t3tools/contracts"; import { exhaustedUsageWindow } from "./usageLimits.ts"; +/** + * The thread a limited lead's run is handed on to. One per run, however often it is asked for, + * so its existence is how the server and the clients know a run was handed on. + */ +export const limitedLeadHandoffThreadId = (runId: RunId) => ThreadId.make(`limited-lead:${runId}`); + /** A model as a seat runs it: on one provider instance. */ export interface SeatModel { readonly instanceId: ProviderInstanceId; From 7bd2568dd4ee6416a57e975807071d49f1e47c9d Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 17:20:56 +0000 Subject: [PATCH 08/12] test(web): the lineup footer's three selects fit the setup popover's width Co-Authored-By: Claude Fable 5.2 --- .../OrchestratorLineup.browser.test.tsx | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx b/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx index f055651dbf3ed..c60472f76292c 100644 --- a/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx +++ b/apps/web/src/components/delivery/OrchestratorLineup.browser.test.tsx @@ -484,3 +484,43 @@ it("saves what a limited seat does from the footer, and leaves the control off a await expect.element(control).not.toBeInTheDocument(); await expect.element(page.getByRole("combobox", { name: "Critique round" })).toBeInTheDocument(); }); + +// The model picker is 360px wide; its provider rail and border leave the team panel 315px, and a +// classic scrollbar takes 15px more. +it.each([315, 300])( + "fits the footer's three selects in a %ipx panel, with nothing cut off", + async (width) => { + testState.threadState = { + data: { + binding: RESEARCH_BINDING, + lineup: { ...LINEUP_OF_THREE, access: "approval-required", critique: "first" }, + pending: null, + }, + }; + await page.viewport(1024, 768); + await using _screen = await render( +
    + {}} + /> +
    , + ); + const panel = document.querySelector("[data-popover-panel]")!.getBoundingClientRect(); + for (const name of ["Critique round", "Participants' access", "When a seat is limited"]) { + const trigger = page.getByRole("combobox", { name }); + await expect.element(trigger).toBeVisible(); + const element = trigger.element(); + const box = element.getBoundingClientRect(); + expect(box.left, name).toBeGreaterThanOrEqual(panel.left); + expect(box.right, name).toBeLessThanOrEqual(panel.right); + // Neither the trigger nor the value inside it is cut short. + for (const part of [element, element.firstElementChild!]) + expect(part.scrollWidth, name).toBeLessThanOrEqual(part.clientWidth + 1); + } + }, +); From 56a57e041783176259362ab8012bb27a0a8b3525 Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 17:22:10 +0000 Subject: [PATCH 09/12] fix(delivery): limited-seat turn notes name models as the picker does, and say who stood in The notes wrote model ids and raw ISO times. They now use the provider's display names and a readable reset time with its zone. A seat's contribution also says which model it stood in for, so the lead can attribute it. Co-Authored-By: Claude Fable 5.2 --- .../src/delivery/NativeTeamChat.test.ts | 28 +++++++++--- apps/server/src/delivery/NativeTeamChat.ts | 43 ++++++++++++++++--- 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/apps/server/src/delivery/NativeTeamChat.test.ts b/apps/server/src/delivery/NativeTeamChat.test.ts index efd8e1e6a6433..c65403f97bc7d 100644 --- a/apps/server/src/delivery/NativeTeamChat.test.ts +++ b/apps/server/src/delivery/NativeTeamChat.test.ts @@ -866,6 +866,8 @@ it.effect( ); const LIMIT_RESET = "2026-11-22T17:00:00.000Z"; +const RESET_SHOWN = NativeTeamChat.formatLimitReset(LIMIT_RESET); +const MODEL_NAMES = { "claude-model": "Claude Model", "kimi-k3": "Kimi K3" }; const limitedProvider = (instanceId: string, driver: string, limited = false): ServerProvider => ({ instanceId: ProviderInstanceId.make(instanceId), driver: ProviderDriverKind.make(driver), @@ -875,7 +877,13 @@ const limitedProvider = (instanceId: string, driver: string, limited = false): S status: "ready", auth: { status: "authenticated" }, checkedAt: "2026-11-22T11:00:00.000Z", - models: [], + // Named as the model picker names them; the notes use these names, not the ids. + models: Object.entries(MODEL_NAMES).map(([slug, name]) => ({ + slug, + name, + isCustom: false, + capabilities: null, + })), slashCommands: [], skills: [], ...(limited @@ -973,8 +981,18 @@ it.effect("starts a limited seat on the first free favorite and notes why", () = expect(fixture.notices[0]).toMatchObject({ status: "completed", title: "researcher · substitute", - message: `researcher runs on kimi-k3 this turn: claude-model has reached its usage limit until ${LIMIT_RESET}.`, + message: `researcher runs on Kimi K3 this turn: Claude Model has reached its usage limit until ${RESET_SHOWN}.`, }); + // Whoever reads the researcher's contribution is told which model stood in for it. + for (const task of fixture.tasks) + Object.assign(task, { status: "completed", result: "Noted." }); + yield* service.prepareTurn({ threadId, runId }); + const critique = [...fixture.admissions.values()].find( + (command) => command.teamChat.stage === "critique", + )!; + expect(critique.task).toContain( + "kimi-work/kimi-k3, standing in for claude-model, which reached its usage limit, completed", + ); }), ); @@ -1043,7 +1061,7 @@ it.effect("does not swap a model a person chose by hand; the notice still names yield* service.prepareTurn({ threadId, runId }); expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); expect(fixture.notices[0]?.type === "system_notice" && fixture.notices[0].message).toBe( - `researcher: claude-model has reached its usage limit until ${LIMIT_RESET}. Its model was chosen by hand, so it is not swapped without asking. kimi-k3 is free: swap to it from the notice to use it from the next message.`, + `researcher: Claude Model has reached its usage limit until ${RESET_SHOWN}. Its model was chosen by hand, so it is not swapped without asking. Kimi K3 is free: swap to it from the notice to use it from the next message.`, ); }), ); @@ -1056,7 +1074,7 @@ it.effect("asks before a swap, and uses the model the person agreed to", () => yield* service.prepareTurn({ threadId, runId }); expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); expect(fixture.notices[0]).toMatchObject({ - message: expect.stringContaining("kimi-k3 is free: swap to it from the notice"), + message: expect.stringContaining("Kimi K3 is free: swap to it from the notice"), }); const agreed = limitedResearcher(); @@ -1085,7 +1103,7 @@ it.effect( yield* service.prepareTurn({ threadId, runId }); expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); expect(fixture.notices[0]).toMatchObject({ - message: `researcher: claude-model has reached its usage limit until ${LIMIT_RESET}. Left out of this message.`, + message: `researcher: Claude Model has reached its usage limit until ${RESET_SHOWN}. Left out of this message.`, }); }), ); diff --git a/apps/server/src/delivery/NativeTeamChat.ts b/apps/server/src/delivery/NativeTeamChat.ts index 63f67e093cb39..577ca52251863 100644 --- a/apps/server/src/delivery/NativeTeamChat.ts +++ b/apps/server/src/delivery/NativeTeamChat.ts @@ -17,6 +17,7 @@ import { type LimitedSeatFacts, limitedSeatPool, seatLimit, + type SeatModel, seatModelOf, } from "@t3tools/shared/limitedSeat"; import { createModelSelection } from "@t3tools/shared/model"; @@ -72,11 +73,39 @@ export const isNativeTeamChatError = Schema.is(NativeTeamChatError); const terminal = (task: OrchestrationV2Subagent) => ["completed", "failed", "cancelled", "interrupted"].includes(task.status); +/** + * A usage limit's reset as a turn note writes it. The server cannot know each reader's clock, so + * the time is the server's own and names its zone. + */ +export const formatLimitReset = (resetAt: string) => + Option.match(DateTime.make(resetAt), { + onNone: () => resetAt, + onSome: (time) => + DateTime.toDate(time).toLocaleString(undefined, { + month: "short", + day: "numeric", + hour: "numeric", + minute: "2-digit", + timeZoneName: "short", + }), + }); + +/** The name the model picker shows for a model; its id where the provider lists no name. */ +const modelName = (facts: LimitedSeatFacts, model: SeatModel) => + facts.providers + .find((provider) => provider.instanceId === model.instanceId) + ?.models.find((candidate) => candidate.slug === model.model)?.name ?? model.model; + const contributions = (tasks: ReadonlyArray) => tasks .map( (task) => - `${task.teamChat?.seat ?? task.title} (${task.providerInstanceId}/${task.model}, ${task.status}; native child ${task.childThreadId}):\n${ + `${task.teamChat?.seat ?? task.title} (${task.providerInstanceId}/${task.model}${ + // The lead attributes insights to a seat's model, so it is told when another stood in. + task.teamChat?.substituteFor === undefined + ? "" + : `, standing in for ${task.teamChat.substituteFor.model}, which reached its usage limit` + }, ${task.status}; native child ${task.childThreadId}):\n${ task.result === null ? "No contribution was returned." : task.result.length > 6000 @@ -301,7 +330,7 @@ export const make = Effect.gen(function* () { const own = seatModelOf(seat.modelSelection); const limit = seatLimit(facts, own); if (limit === null) return { selection: seat.modelSelection } satisfies StandIn; - const limited = `${seat.seat}: ${own.model} has reached its usage limit${limit.resetAt ? ` until ${limit.resetAt}` : ""}.`; + const limited = `${seat.seat}: ${modelName(facts, own)} has reached its usage limit${limit.resetAt ? ` until ${formatLimitReset(limit.resetAt)}` : ""}.`; const substituteFor = { ...own, resetAt: limit.resetAt }; const earlier = turnStandIn(seat.seat); if (earlier !== undefined) { @@ -310,7 +339,7 @@ export const make = Effect.gen(function* () { return { selection: earlier, substituteFor } satisfies StandIn; yield* recordSkip( seat.seat, - `${limited} Its substitute ${earlier.model} is limited too, and a seat is swapped once a turn.`, + `${limited} Its substitute ${modelName(facts, seatModelOf(earlier))} is limited too, and a seat is swapped once a turn.`, ); return undefined; } @@ -339,7 +368,7 @@ export const make = Effect.gen(function* () { policy === "ask" ? "" : "Its model was chosen by hand, so it is not swapped without asking. " - }${free.model} is free: swap to it from the notice to use it from the next message.`, + }${modelName(facts, free)} is free: swap to it from the notice to use it from the next message.`, ); return undefined; } @@ -418,11 +447,11 @@ export const make = Effect.gen(function* () { yield* recordSkip(seat.seat, `${seat.seat}: provider is unavailable.`); return undefined; } - if (runsOn?.substituteFor !== undefined) { - const { model, resetAt } = runsOn.substituteFor; + if (facts !== undefined && runsOn?.substituteFor !== undefined) { + const { resetAt } = runsOn.substituteFor; yield* recordSkip( seat.seat, - `${seat.seat} runs on ${selection.model} this turn: ${model} has reached its usage limit${resetAt ? ` until ${resetAt}` : ""}.`, + `${seat.seat} runs on ${modelName(facts, seatModelOf(selection))} this turn: ${modelName(facts, runsOn.substituteFor)} has reached its usage limit${resetAt ? ` until ${formatLimitReset(resetAt)}` : ""}.`, ids.derive.runSignalTurnItem({ runId: input.runId, signal: `team-seat-substitute:${stage}:${seat.seat}`, From bd56252fff9376d1bedc4ec0b208025a3ef616e8 Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 18:26:08 +0000 Subject: [PATCH 10/12] fix(delivery): a seat is never offered the model another seat stands in on The notice and the swap built a seat's pool without what other seats run on, so a model one seat already stood in on by agreement was offered to a second seat, the swap was accepted, and the next turn left that seat out. The notice, the swap and the turn now read another limited seat through one helper, agreedStandIn, and count its agreed substitute as in use. Co-Authored-By: Claude Fable 5.2 --- .../src/delivery/LimitedSeatSwap.test.ts | 25 +++++++++++++++++++ apps/server/src/delivery/LimitedSeatSwap.ts | 5 ++++ .../src/delivery/NativeTeamChat.test.ts | 18 +++++++++++++ apps/server/src/delivery/NativeTeamChat.ts | 8 +++++- packages/shared/src/limitedSeat.ts | 20 +++++++++++++++ 5 files changed, 75 insertions(+), 1 deletion(-) diff --git a/apps/server/src/delivery/LimitedSeatSwap.test.ts b/apps/server/src/delivery/LimitedSeatSwap.test.ts index 83b43834d564a..68ca10bbdac8d 100644 --- a/apps/server/src/delivery/LimitedSeatSwap.test.ts +++ b/apps/server/src/delivery/LimitedSeatSwap.test.ts @@ -56,6 +56,7 @@ function setup({ lineage = {} as Record, ordinary = false, limitedSeat = false, + limitedScout = false, /** The hand-off's fork lands but its first turn has not: the window a status read can fall in. */ startsNoTurn = false, } = {}) { @@ -113,6 +114,9 @@ function setup({ threadLimits: [ { instanceId: id("claude"), model: "claude-fable", resetAt: RESET }, ...(limitedSeat ? [{ instanceId: id("codex"), model: "gpt-astra", resetAt: RESET }] : []), + ...(limitedScout + ? [{ instanceId: id("deepseek"), model: "deepseek-v4", resetAt: RESET }] + : []), ], settings: { ...DEFAULT_SERVER_SETTINGS, @@ -349,6 +353,27 @@ it.effect("records the substitute a person agreed to for a seat, once", () => { }).pipe(Effect.provide(fixture.layer)); }); +it.effect("never offers a seat the model another seat stands in on", () => { + const fixture = setup({ policy: "ask", limitedSeat: true, limitedScout: true }); + return Effect.gen(function* () { + const swaps = yield* LimitedSeatSwap.LimitedSeatSwap; + const kimi = model("kimi", "kimi-k3"); + const noticeFor = (seat: string) => + Effect.map(swaps.status(threadId), (status) => + status.notices.find((notice) => notice.seat === seat), + ); + expect(yield* noticeFor("scout")).toMatchObject({ state: "offered", substitute: kimi }); + yield* swaps.swap({ threadId, seat: "critic", modelSelection: kimi }); + expect(yield* noticeFor("critic")).toMatchObject({ state: "swapped", substitute: kimi }); + expect(yield* noticeFor("scout")).toMatchObject({ state: "none-free", substitute: null }); + const refused = yield* Effect.flip( + swaps.swap({ threadId, seat: "scout", modelSelection: kimi }), + ); + expect(refused.detail).toBe("kimi-k3 is no longer free. Choose again from the notice."); + expect(fixture.lineups.get(threadId)?.participants[1]?.substitute).toBeUndefined(); + }).pipe(Effect.provide(fixture.layer)); +}); + it.effect.each([ { name: "an ordinary chat", options: { ordinary: true } }, { name: "a board task's conversation", options: { lineage: { engineIntake: "task-1" } } }, diff --git a/apps/server/src/delivery/LimitedSeatSwap.ts b/apps/server/src/delivery/LimitedSeatSwap.ts index f540b90fc6fc0..1d939ced6677e 100644 --- a/apps/server/src/delivery/LimitedSeatSwap.ts +++ b/apps/server/src/delivery/LimitedSeatSwap.ts @@ -16,6 +16,7 @@ import { ThreadId, } from "@t3tools/contracts"; import { + agreedStandIn, firstFreeFavorite, isFreeCandidate, limitedLeadHandoffThreadId, @@ -240,6 +241,8 @@ const make = Effect.gen(function* () { roster: lineup.participants, lead: shell.modelSelection, seat, + runsOn: (other) => + agreedStandIn({ facts, policy, seat: other }) ?? other.modelSelection, }); const limited = { instanceId: limit.instanceId, @@ -359,11 +362,13 @@ const make = Effect.gen(function* () { return { continuedIn: null }; if (seatLimit(facts, seatModelOf(seat.modelSelection)) === null) return yield* refused(`${input.seat} is not limited now.`); + const policy = deliveryLimitedSeatPolicy(lineup); const pool = limitedSeatPool({ facts, roster: lineup.participants, lead: shell.modelSelection, seat, + runsOn: (other) => agreedStandIn({ facts, policy, seat: other }) ?? other.modelSelection, }); if (!isFreeCandidate(pool, chosen)) return yield* refused(`${chosen.model} is no longer free. Choose again from the notice.`); diff --git a/apps/server/src/delivery/NativeTeamChat.test.ts b/apps/server/src/delivery/NativeTeamChat.test.ts index c65403f97bc7d..235fca847d0e1 100644 --- a/apps/server/src/delivery/NativeTeamChat.test.ts +++ b/apps/server/src/delivery/NativeTeamChat.test.ts @@ -1087,6 +1087,24 @@ it.effect("asks before a swap, and uses the model the person agreed to", () => }), ); +it.effect("leaves another seat's agreed substitute to that seat", () => + Effect.gen(function* () { + const fixture = limitedResearcher(); + fixture.limitedInstances.add("codex-work"); + // The critic comes after the researcher in the roster, and already agreed to Kimi. + Object.assign(fixture.participants[1]!, { + substitute: createModelSelection(ProviderInstanceId.make("kimi-work"), "kimi-k3"), + }); + fixture.lineup.current = { ...fixture.lineup.current!, limitedSeat: "ask" } as never; + yield* (yield* fixture.service).prepareTurn({ threadId, runId }); + expect(fixture.seatsOn()["contribution:critic"]).toBe("kimi-k3"); + expect(fixture.seatsOn()).not.toHaveProperty("contribution:researcher"); + expect(fixture.notices[0]).toMatchObject({ + message: expect.stringContaining("deepseek-v4 is free: swap to it from the notice"), + }); + }), +); + it.effect( "reads the setting at the start of each turn, so a change applies from the next message", () => diff --git a/apps/server/src/delivery/NativeTeamChat.ts b/apps/server/src/delivery/NativeTeamChat.ts index 577ca52251863..883d657f096a1 100644 --- a/apps/server/src/delivery/NativeTeamChat.ts +++ b/apps/server/src/delivery/NativeTeamChat.ts @@ -12,6 +12,7 @@ import { } from "@t3tools/contracts"; import { projectComposerContextForProvider } from "@t3tools/shared/composerContextReferences"; import { + agreedStandIn, firstFreeFavorite, isFreeCandidate, type LimitedSeatFacts, @@ -352,7 +353,12 @@ export const make = Effect.gen(function* () { roster, lead: parent.thread.modelSelection, seat, - runsOn, + // A seat not started yet still holds the substitute a person agreed to for it. + runsOn: (other) => + standIns.get(other.seat)?.selection ?? + turnStandIn(other.seat) ?? + agreedStandIn({ facts, policy, seat: other }) ?? + other.modelSelection, }); const free = firstFreeFavorite(pool); const none = `${limited} No favorite model is free, so ${seat.seat} waits.`; diff --git a/packages/shared/src/limitedSeat.ts b/packages/shared/src/limitedSeat.ts index 43d1e29c72aef..54db7d1602395 100644 --- a/packages/shared/src/limitedSeat.ts +++ b/packages/shared/src/limitedSeat.ts @@ -169,6 +169,26 @@ export interface LimitedSeatRosterSeat { readonly duty?: "build" | "qa" | undefined; } +/** + * What a limited seat stands in on by agreement: the substitute a person agreed to for it, where + * the seat asks before it swaps. Undefined while its own model is free, or where it swaps unasked. + * The notice, the swap and the turn all read another seat through this, so they agree on what is + * in use. + */ +export function agreedStandIn(input: { + readonly facts: LimitedSeatFacts; + readonly policy: "swap" | "ask" | "skip"; + readonly seat: LimitedSeatRosterSeat & { + readonly picked?: boolean | undefined; + readonly substitute?: ModelSelection | undefined; + }; +}): ModelSelection | undefined { + const { facts, policy, seat } = input; + if (seat.substitute === undefined || policy === "skip") return undefined; + if (policy !== "ask" && seat.picked !== true) return undefined; + return seatLimit(facts, seatModelOf(seat.modelSelection)) === null ? undefined : seat.substitute; +} + /** The pool for one seat of a conversation: every other seat's model and the lead's are in use. */ export function limitedSeatPool(input: { readonly facts: LimitedSeatFacts; From 37dfbec07603d7fc83c855e0563306a51b88b11c Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 18:27:06 +0000 Subject: [PATCH 11/12] fix(server,web,mobile): a thread handed on to a linked thread receives no message The composer of a handed-on thread still read Resume thread, and one press ran the limited run again beside its linked thread. The orchestrator now refuses every message sent to a thread whose latest limited run continues in a linked thread, from a person, the CLI or a tool, with one sentence; its own follow-ups settle quietly there and start nothing. Deleting the linked thread reopens it. The web and mobile composers show a notice with a way to the linked thread, disable the send and offer no resume. The notice is translated by the model in the ten catalogs; no native speaker has read it. Co-Authored-By: Claude Fable 5.2 --- .../threads/LimitedSeatNoticeCard.tsx | 40 ++++++++ .../features/threads/ThreadDetailScreen.tsx | 38 +++++--- apps/mobile/src/i18n/translations/de.json | 27 +++--- apps/mobile/src/i18n/translations/en.json | 27 +++--- apps/mobile/src/i18n/translations/es.json | 27 +++--- apps/mobile/src/i18n/translations/fr.json | 27 +++--- apps/mobile/src/i18n/translations/ja.json | 27 +++--- apps/mobile/src/i18n/translations/ko.json | 27 +++--- apps/mobile/src/i18n/translations/pt-BR.json | 27 +++--- apps/mobile/src/i18n/translations/ru.json | 27 +++--- apps/mobile/src/i18n/translations/sv.json | 27 +++--- apps/mobile/src/i18n/translations/zh.json | 27 +++--- .../src/orchestration-v2/Orchestrator.ts | 74 ++++++++++++--- .../orchestration-v2/ThreadMessageIntake.ts | 1 + .../src/orchestration-v2/runtimeLayer.test.ts | 43 +++++++++ .../ChatView.handedOnSend.browser.test.tsx | 95 +++++++++++++++++++ apps/web/src/components/ChatView.tsx | 64 +++++++++---- .../chat/ComposerHandedOnThread.tsx | 30 ++++++ apps/web/src/i18n/translations/de.json | 85 +++++++++-------- apps/web/src/i18n/translations/en.json | 85 +++++++++-------- apps/web/src/i18n/translations/es.json | 85 +++++++++-------- apps/web/src/i18n/translations/fr.json | 85 +++++++++-------- apps/web/src/i18n/translations/ja.json | 85 +++++++++-------- apps/web/src/i18n/translations/ko.json | 85 +++++++++-------- apps/web/src/i18n/translations/pt-BR.json | 85 +++++++++-------- apps/web/src/i18n/translations/ru.json | 85 +++++++++-------- apps/web/src/i18n/translations/sv.json | 85 +++++++++-------- apps/web/src/i18n/translations/zh.json | 85 +++++++++-------- 28 files changed, 913 insertions(+), 592 deletions(-) create mode 100644 apps/web/src/components/ChatView.handedOnSend.browser.test.tsx create mode 100644 apps/web/src/components/chat/ComposerHandedOnThread.tsx diff --git a/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx b/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx index 3123e9d3a42f3..b1fed522831b2 100644 --- a/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx +++ b/apps/mobile/src/features/threads/LimitedSeatNoticeCard.tsx @@ -5,7 +5,10 @@ import { } from "@t3tools/client-runtime/limited-seat-notices"; import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime"; import type { EnvironmentThreadShell } from "@t3tools/client-runtime/state/shell"; +import { scopeThreadRef } from "@t3tools/client-runtime/environment"; import type { EnvironmentId, ThreadId } from "@t3tools/contracts"; +import { limitedLeadHandoffThreadId } from "@t3tools/shared/limitedSeat"; +import { useAtomValue } from "@effect/atom-react"; import { StackActions, useNavigation } from "@react-navigation/native"; import { AsyncResult } from "effect/reactivity"; import { useGT, useMessages } from "gt-react-native"; @@ -139,6 +142,43 @@ function LimitedSeatNotice(props: { ); } +/** + * Above the composer of a thread whose limited run continues in a linked thread. The server + * refuses every message to it, so the composer sends nothing and this card leads to the thread + * that carries the work on. + */ +export function HandedOnThreadCard(props: { + readonly thread: EnvironmentThreadShell; + readonly environmentId: EnvironmentId; +}) { + const gt = useGT(); + const navigation = useNavigation(); + const runId = props.thread.latestRun?.runId; + const handedOn = useAtomValue( + deliveryEnvironment.limitedLeadHandedOn(scopeThreadRef(props.environmentId, props.thread.id)), + ); + if (!handedOn || runId === undefined) return null; + return ( + + + {gt("This conversation continues in a linked thread")} + + + navigation.dispatch( + StackActions.push("Thread", { + environmentId: String(props.environmentId), + threadId: String(limitedLeadHandoffThreadId(runId)), + }), + ) + } + /> + + ); +} + function NoticeAction(props: { readonly label: string; readonly disabled: boolean; diff --git a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx index 266d1cd12ac76..831dab188c6a9 100644 --- a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx +++ b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx @@ -16,7 +16,9 @@ import { parseThreadKey, threadKey } from "@t3tools/client-runtime/state/entitie import { createThreadVisitTracker } from "@t3tools/client-runtime/state/thread-visits"; import { useChildThreadInputs, useThreadReportedModelSelection } from "../../state/entities"; import { UsageLimitRecoveryCard } from "./UsageLimitRecoveryCard"; -import { LimitedSeatNoticeCard } from "./LimitedSeatNoticeCard"; +import { HandedOnThreadCard, LimitedSeatNoticeCard } from "./LimitedSeatNoticeCard"; +import { scopeThreadRef } from "@t3tools/client-runtime/environment"; +import { deliveryEnvironment } from "../../state/delivery"; import { useFocusEffect, useNavigation } from "@react-navigation/native"; import { effectiveSnoozed, @@ -512,6 +514,12 @@ function ThreadDetailBody( threadId: props.selectedThread.id, }); const composerError = useAtomValue(threadComposerErrorsAtom)[selectedThreadKey]?.message ?? null; + // The server refuses every message to a thread whose limited run continues in a linked thread. + const threadHandedOn = useAtomValue( + deliveryEnvironment.limitedLeadHandedOn( + scopeThreadRef(props.environmentId, props.selectedThread.id), + ), + ); const preferences = useAtomValue(mobilePreferencesAtom); const toolCallVisibility = AsyncResult.isSuccess(preferences) ? (preferences.value.toolCallVisibility ?? "showAll") @@ -1730,11 +1738,17 @@ function ThreadDetailBody( environmentId={props.environmentId} /> {props.draftMode ? null : ( - + <> + + + )} ()( + "OrchestratorThreadHandedOnError", + { commandId: CommandId, threadId: ThreadId, continuedIn: ThreadId }, +) { + override get message(): string { + return handedOnThreadRefusal; + } +} + export class OrchestratorThreadAboveModeLimitError extends Schema.TaggedError()( "OrchestratorThreadAboveModeLimitError", { @@ -403,6 +417,7 @@ export const OrchestratorV2Error = Schema.Union([ OrchestratorCommandIdConflictError, OrchestratorSubagentThreadReadOnlyError, OrchestratorThreadArchivedError, + OrchestratorThreadHandedOnError, OrchestratorThreadAboveModeLimitError, OrchestratorProviderSelectionBusyError, OrchestratorRuntimeModeAboveCeilingError, @@ -849,6 +864,19 @@ function metadataUpdateContinuation( }; } +/** The server's own follow-up to a run, as against what a person, the CLI or a tool sends. */ +function isServerFollowUp( + command: Extract, +): boolean { + return ( + command.steerFollowUpOfRunId !== undefined || + command.usageLimitContinuationOfRunId !== undefined || + command.restartContinuationOfRunId !== undefined || + command.notification !== undefined || + command.idleCompaction !== undefined + ); +} + // A later command for the first message would leave the new thread committed with no run, // and every client would show it idle until that command landed. function threadCreateInitialMessage( @@ -4862,8 +4890,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio return yield* new OrchestratorDispatchError({ commandId: command.commandId, commandType: command.type, - cause: - "This conversation continues in a linked thread. Open that thread instead of resuming this one.", + cause: handedOnThreadRefusal, }); } } @@ -7162,14 +7189,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio command: Extract, thread: Pick, ) { - if ( - thread.archivedAt !== null && - command.steerFollowUpOfRunId === undefined && - command.usageLimitContinuationOfRunId === undefined && - command.restartContinuationOfRunId === undefined && - command.notification === undefined && - command.idleCompaction === undefined - ) { + if (thread.archivedAt !== null && !isServerFollowUp(command)) { return yield* new OrchestratorThreadArchivedError({ commandId: command.commandId, threadId: command.threadId, @@ -7177,6 +7197,38 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio } }); + /** + * A thread whose latest limited run continues in a linked thread is read-only while that thread + * exists: a second run here would redo the work. What a person, the CLI or a tool sends is + * refused; the server's own follow-ups settle quietly, starting nothing. + */ + const settleHandedOnThreadMessage = Effect.fnUntraced(function* ( + command: Extract, + projection: Pick, + events: Ref.Ref>, + ) { + const latest = latestExecutedRun(projection.runs); + if (latest?.status !== "failed" || !(yield* runHandedOn(latest.id))) return false; + if (!isServerFollowUp(command)) { + return yield* new OrchestratorThreadHandedOnError({ + commandId: command.commandId, + threadId: command.threadId, + continuedIn: limitedLeadHandoffThreadId(latest.id), + }); + } + // The unchanged row gives the automatic delivery an accepted receipt, so it is not retried. + yield* emit( + events, + command, + )({ + type: "thread.metadata-updated", + threadId: command.threadId, + occurredAt: yield* DateTime.now, + payload: projection.thread, + }); + return true; + }); + const dispatchMessage = Effect.fn("Orchestrator.dispatchMessage")(function* ( command: Extract, events: Ref.Ref>, @@ -7204,6 +7256,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio } : undefined, ); + if (yield* settleHandedOnThreadMessage(command, projection, events)) return; if (command.steerFollowUpOfRunId !== undefined) { const source = projection.runs.find((run) => run.id === command.steerFollowUpOfRunId); if ( @@ -7279,7 +7332,6 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio const now = yield* DateTime.now; if ( run?.id !== command.usageLimitContinuationOfRunId || - (yield* runHandedOn(command.usageLimitContinuationOfRunId)) || failure?.class !== "usage_limit" || threadShellFromProjection(projection).lastErrorClass !== "usage_limit" || !recovery?.autoResume || diff --git a/apps/server/src/orchestration-v2/ThreadMessageIntake.ts b/apps/server/src/orchestration-v2/ThreadMessageIntake.ts index ae47dac361327..0df0ffdf89031 100644 --- a/apps/server/src/orchestration-v2/ThreadMessageIntake.ts +++ b/apps/server/src/orchestration-v2/ThreadMessageIntake.ts @@ -31,6 +31,7 @@ function dispatchWasNotAccepted( case "OrchestratorCommandIdConflictError": case "OrchestratorSubagentThreadReadOnlyError": case "OrchestratorThreadArchivedError": + case "OrchestratorThreadHandedOnError": case "OrchestratorThreadAboveModeLimitError": case "OrchestratorProviderSelectionBusyError": case "OrchestratorRuntimeModeAboveCeilingError": diff --git a/apps/server/src/orchestration-v2/runtimeLayer.test.ts b/apps/server/src/orchestration-v2/runtimeLayer.test.ts index 68cdfc5c2580a..1e07f3dc0bd27 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.test.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.test.ts @@ -13510,6 +13510,49 @@ it.layer(layerTest)("usage-limit recovery", (it) => { creationSource: "server", }); assert.lengthOf((yield* orchestrator.getThreadProjection(threadId)).runs, 1); + + // The composer's "Resume thread", a typed message, and the send the CLI and tools make. + const send = (name: string, extra: { readonly manualContinuationOfRunId?: RunId } = {}) => + orchestrator.dispatch({ + type: "message.dispatch", + commandId: CommandId.make(`limited-lead:${name}`), + messageId: MessageId.make(`limited-lead:${name}`), + threadId, + ...extra, + text: "Continue where you left off.", + attachments: [], + dispatchMode: { type: "start_immediately" }, + ...(name === "cli" + ? { deliveryIntent: "auto" as const, createdBy: "agent", creationSource: "mcp" } + : { createdBy: "user", creationSource: "web" }), + }); + for (const refusedSend of [ + send("manual-resume", { manualContinuationOfRunId: source.id }), + send("typed"), + send("cli"), + ]) { + const refused = yield* Effect.flip(refusedSend); + assert.equal(refused._tag, "OrchestratorThreadHandedOnError"); + assert.equal( + refused.message, + "This conversation continues in a linked thread. Open that thread instead of resuming this one.", + ); + } + const kept = yield* orchestrator.getThreadProjection(threadId); + assert.deepEqual( + kept.runs.map((run) => run.id), + [source.id], + ); + assert.lengthOf(kept.messages, 1); + + // Deleting the linked thread reopens this one. + yield* orchestrator.dispatch({ + type: "thread.delete", + commandId: CommandId.make("limited-lead:delete-continued"), + threadId: target, + }); + yield* send("reopened"); + assert.lengthOf((yield* orchestrator.getThreadProjection(threadId)).runs, 2); }), ); diff --git a/apps/web/src/components/ChatView.handedOnSend.browser.test.tsx b/apps/web/src/components/ChatView.handedOnSend.browser.test.tsx new file mode 100644 index 0000000000000..5a562ace2af30 --- /dev/null +++ b/apps/web/src/components/ChatView.handedOnSend.browser.test.tsx @@ -0,0 +1,95 @@ +import { createMemoryHistory } from "@tanstack/react-router"; +import { DEFAULT_CLIENT_SETTINGS } from "@t3tools/contracts/settings"; +import { limitedLeadHandoffThreadId } from "@t3tools/shared/limitedSeat"; +import type * as Context from "effect/Context"; +import { expect, it, vi } from "vite-plus/test"; +import { page, userEvent } from "vite-plus/test/browser"; + +import { AppRoot } from "~/AppRoot"; +// The route loads ChatView lazily; importing it here keeps its first transform out of the test. +import "~/components/ChatView"; +import { __setClientSettingsForTests } from "~/hooks/useSettings"; +import { getRouter } from "~/router"; +import { + ENVIRONMENT_ID, + dispatchedCommands, + installFakeEnvironment, + threadWithHistory, + type FakeDriver, + type FakeThread, +} from "../../test/fakeEnvironment"; +import { render } from "../../test/render"; + +// The socket is the only fake layer; see test/appScenarios.renders.tsx. +vi.mock("../../../../packages/client-runtime/src/connection/driver.ts", async (importOriginal) => { + const [actual, { fakeDriver }, Layer] = await Promise.all([ + importOriginal<{ readonly ConnectionDriver: Context.Key }>(), + import("../../test/fakeEnvironment"), + import("effect/Layer"), + ]); + return { ...actual, layer: Layer.succeed(actual.ConnectionDriver, fakeDriver) }; +}); + +vi.mock(import("~/rpc/requestLatencyState"), async (original) => ({ + ...(await original()), + trackRpcRequestSent: () => {}, +})); + +const NOTICE = "This conversation continues in a linked thread"; +const sends = () => dispatchedCommands().filter((command) => command.type === "message.dispatch"); + +/** A thread whose only run stopped short, so its composer would offer "Resume thread". */ +function stoppedThread(name: string): FakeThread { + const history = threadWithHistory(name, 1); + return { ...history, runs: [{ ...history.runs[0]!, status: "interrupted" }] }; +} + +async function open(thread: FakeThread) { + __setClientSettingsForTests({ + ...DEFAULT_CLIENT_SETTINGS, + onboardingCompletedAt: "2026-01-01T00:00:00.000Z", + }); + const router = getRouter( + createMemoryHistory({ initialEntries: [`/${ENVIRONMENT_ID}/${thread.id}`] }), + ); + await router.load(); + // AppRoot brings its own router. + const app = await render(, { router: false }); + await expect.element(page.getByText(`${thread.id}: question 0`)).toBeVisible(); + return app; +} + +it("a thread handed on to a linked thread offers no resume and sends nothing", async () => { + const old = stoppedThread("handed-on"); + const continued = threadWithHistory(limitedLeadHandoffThreadId(old.runs[0]!.id), 1); + using _environment = installFakeEnvironment([old, continued], { acceptCommands: true }); + await using _app = await open(old); + + await expect.element(page.getByText(NOTICE)).toBeVisible(); + // With an empty draft the send must not turn into the resume. + expect(page.getByRole("button", { name: "Resume thread" }).query()).toBeNull(); + const editor = page.getByTestId("composer-editor"); + await userEvent.click(editor); + await userEvent.keyboard("{Enter}"); + await userEvent.keyboard("still there?"); + await vi.waitFor(() => expect(editor.element().textContent).toContain("still there?")); + await expect.element(page.getByRole("button", { name: NOTICE })).toBeDisabled(); + await userEvent.keyboard("{Enter}"); + expect(editor.element().textContent).toContain("still there?"); + expect(sends()).toEqual([]); + + await userEvent.click(page.getByRole("button", { name: "Open thread" })); + await expect.element(page.getByText(`${continued.id}: question 0`)).toBeVisible(); +}); + +it("a stopped thread that was not handed on still resumes and sends", async () => { + const thread = stoppedThread("not-handed-on"); + using _environment = installFakeEnvironment([thread], { acceptCommands: true }); + await using _app = await open(thread); + + expect(page.getByText(NOTICE).query()).toBeNull(); + await expect.element(page.getByRole("button", { name: "Resume thread" })).toBeVisible(); + await userEvent.click(page.getByTestId("composer-editor")); + await userEvent.keyboard("still there?{Enter}"); + await vi.waitFor(() => expect(sends()).toHaveLength(1)); +}); diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 1bc10541a146c..30a52ba753d35 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -82,6 +82,7 @@ import { RightPanelSurfaceContent } from "./chat/RightPanelSurfaceContent"; import { usePendingThreadRequests } from "./chat/usePendingThreadRequests"; import { isScratchProject } from "@t3tools/client-runtime/state/projects"; import { resolveWorktreeRepositorySelection } from "@t3tools/client-runtime/state/thread-repositories"; +import { limitedLeadHandoffThreadId } from "@t3tools/shared/limitedSeat"; import { visibleThreadPullRequests } from "@t3tools/shared/threadPullRequests"; import type { UsageLimitSourceSnapshots } from "@t3tools/contracts"; import { feedbackBannerItem } from "./chat/ComposerFeedback"; @@ -89,6 +90,10 @@ import { archivedThreadBannerItem, archivedThreadSendBlockReason, } from "./chat/ComposerArchivedThread"; +import { + handedOnThreadBannerItem, + handedOnThreadSendBlockReason, +} from "./chat/ComposerHandedOnThread"; import { freshSessionBannerItem } from "./chat/ComposerFreshSession"; import { armFreshSession, disarmFreshSession, useFreshSessionArmed } from "./chat/freshSessionArms"; import { useUsageLimitsPanel } from "./chat/useUsageLimitsPanel"; @@ -922,7 +927,16 @@ export default function ChatView(props: ChatViewProps) { !isServerThread || serverProjection === null ? null : deriveResumableRunId(serverProjection, serverRuntime); + // A thread whose limited run continues in a linked thread opens to read. The server refuses + // every message to it, so the composer offers no resume and no send. + const threadHandedOn = useAtomValue( + serverThread === null + ? NOT_HANDED_ON_ATOM + : deliveryEnvironment.limitedLeadHandedOn(scopeThreadRef(environmentId, serverThread.id)), + ); + const handedOnRunId = threadHandedOn ? (serverThread?.latestRun?.runId ?? null) : null; const canResume = + !threadHandedOn && serverProjection !== null && canResumeThread(serverProjection, resumableRunId, hasHeldQueuedRuns); const parentSubagentThreadId = @@ -2874,13 +2888,6 @@ export default function ChatView(props: ChatViewProps) { ); return item ? [item] : []; }); - const limitedLeadHandedOn = useAtomValue( - activeThreadShell === null - ? NOT_HANDED_ON_ATOM - : deliveryEnvironment.limitedLeadHandedOn( - scopeThreadRef(environmentId, activeThreadShell.id), - ), - ); const limitRecoveryBanner = useUsageLimitRecoveryBannerItem( limitRecoveryRun !== null && activeThreadShell !== null ? { @@ -2890,7 +2897,7 @@ export default function ChatView(props: ChatViewProps) { stoppedAt: limitRecoveryRun.completedAt ?? activeThreadShell.updatedAt, settled: activeThreadShell.settledOverride === "settled", requestPending: pendingApprovals.length > 0 || pendingUserInputs.length > 0, - handedOn: limitedLeadHandedOn, + handedOn: threadHandedOn, recovery: activeThreadShell.limitRecovery ?? null, snoozedUntil: activeThreadShell.snoozedUntil, timestampFormat, @@ -2923,7 +2930,22 @@ export default function ChatView(props: ChatViewProps) { // so before one is written, not after a send that goes nowhere. const threadArchived = serverThread !== null && serverThread.archivedAt !== null; const composerBannerItems = (() => { - const archivedItems = threadArchived ? [archivedThreadBannerItem(messages)] : []; + const archivedItems = threadArchived + ? [archivedThreadBannerItem(messages)] + : handedOnRunId !== null + ? [ + handedOnThreadBannerItem( + () => + void navigate({ + to: "/$environmentId/$threadId", + params: buildThreadRouteParams( + scopeThreadRef(environmentId, limitedLeadHandoffThreadId(handedOnRunId)), + ), + }), + messages, + ), + ] + : []; const fallbackSelection = draftFallback?.selection; const defaultSelection = draftDefaultModelSelection ?? @@ -4126,17 +4148,19 @@ export default function ChatView(props: ChatViewProps) { ? gt("This connection cannot change threads.") : threadArchived ? archivedThreadSendBlockReason(messages) - : isEnvironmentChanging - ? gt("Preparing machine") - : isRevertingCheckpoint - ? gt("Rewinding conversation") - : feedbackUploading - ? gt("Sending feedback") - : threadDetailLoading - ? gt("Messages loading") - : worktreeSetupBlocksSend - ? gt("Preparing worktree") - : projectCloneSendBlockReason + : threadHandedOn + ? handedOnThreadSendBlockReason(messages) + : isEnvironmentChanging + ? gt("Preparing machine") + : isRevertingCheckpoint + ? gt("Rewinding conversation") + : feedbackUploading + ? gt("Sending feedback") + : threadDetailLoading + ? gt("Messages loading") + : worktreeSetupBlocksSend + ? gt("Preparing worktree") + : projectCloneSendBlockReason } isPreparingWorktree={isPreparingWorktree && !sendQueuesBehindSetup} bannerItems={ diff --git a/apps/web/src/components/chat/ComposerHandedOnThread.tsx b/apps/web/src/components/chat/ComposerHandedOnThread.tsx new file mode 100644 index 0000000000000..9d6afc4f28a23 --- /dev/null +++ b/apps/web/src/components/chat/ComposerHandedOnThread.tsx @@ -0,0 +1,30 @@ +import { msg } from "gt-react"; +import { GitForkIcon } from "lucide-react"; + +import { m, type MessageResolver } from "../../i18n/messages"; +import { Button } from "../ui/button"; + +import type { ComposerBannerStackItem } from "./ComposerBannerStack"; + +/** Why a handed-on thread's composer sends nothing: the server refuses every message to it. */ +export function handedOnThreadSendBlockReason(resolve: MessageResolver = m) { + return resolve(msg("This conversation continues in a linked thread")); +} + +/** Shown above the composer of a thread whose limited run continues in a linked thread. */ +export function handedOnThreadBannerItem( + onOpenThread: () => void, + resolve: MessageResolver = m, +): ComposerBannerStackItem { + return { + id: "handed-on-thread", + variant: "info", + icon: , + title: handedOnThreadSendBlockReason(resolve), + actions: ( + + ), + }; +} diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 3f82a63655f77..9ab86cb14e58b 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} hat sein Nutzungslimit erreicht", "d4ad47339d670283": "Fortgesetzt mit {substitute}", "0b95a334090835d6": "{model} hat sein Nutzungslimit erreicht, daher läuft diese Unterhaltung in einem verknüpften Thread weiter. Dieser bleibt lesbar.", + "c6196d99000642b4": "Thread öffnen", + "552649eea02acd9e": "{seat} läuft mit {substitute}", + "9723cacb91446778": "{model} hat sein Nutzungslimit erreicht. {seat} kehrt dorthin zurück, sobald das Limit zurückgesetzt ist.", + "4daef274c8249495": "{substitute} ist frei. Beim Wechsel läuft diese Unterhaltung in einem neuen verknüpften Thread mit einer Zusammenfassung weiter.", + "c8128bb2bd97de3c": "{substitute} ist frei. {seat} nutzt es ab deiner nächsten Nachricht.", + "05985243eafadf37": "Zu {substitute} wechseln", + "540418662b70d3d6": "Kein Lieblingsmodell ist frei, daher wartet diese Unterhaltung.", + "9da06299c78dfeeb": "Kein Lieblingsmodell ist frei, daher wartet {seat}.", "8b876f2953338661": "Noch nicht bekannt, ob er verknüpft ist", "b8c2bbba2243b429": "Bereits verknüpft", "4f1ab8a69f4a85e5": "Diese App ist nicht damit verbunden", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Normal", "f42c2a36b3507308": "{label} an", "77cc5f738cb7d459": "{label} aus", - "2159a4897d4a4d73": "{runtime, select, codex {Aktualisiere die Codex CLI auf {version} oder neuer, um {names} zu verwenden.} other {Aktualisiere {providerName} auf {version} oder neuer, um {names} zu verwenden.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {{names} erfordert die Codex CLI {version} oder neuer, aber diese Installation kann höchstens auf {latestVersion} aktualisieren. Installiere die Codex CLI auf anderem Weg oder warte auf ein neueres Release.} other {{names} erfordert {providerName} {version} oder neuer, aber diese Installation kann höchstens auf {latestVersion} aktualisieren. Installiere {providerName} auf anderem Weg oder warte auf ein neueres Release.}}", "aba3bb73ce212f0c": "{names} erfordert {providerName} {version} oder neuer, aber der Homebrew-Cask claude-code hat nur {latestVersion}. Wechsle zum Cask claude-code@latest: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {{names} erfordert die Codex CLI {version} oder neuer, aber diese Installation kann höchstens auf {latestVersion} aktualisieren. Installiere die Codex CLI auf anderem Weg oder warte auf ein neueres Release.} other {{names} erfordert {providerName} {version} oder neuer, aber diese Installation kann höchstens auf {latestVersion} aktualisieren. Installiere {providerName} auf anderem Weg oder warte auf ein neueres Release.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Aktualisiere die Codex CLI auf {version} oder neuer, um {names} zu verwenden.} other {Aktualisiere {providerName} auf {version} oder neuer, um {names} zu verwenden.}}", "d887bea446534de5": "Kein Projekt in dieser Umgebung kann {host}/{repository} lesen.", "4e466d60e2f7736b": "Füge die vollständige Pull-Request-URL ein. Dieser Thread hat kein Repository, in dem die Nummer aufgelöst werden kann.", "302625058bacbe38": "Füge eine vollständige URL ein. Für den Host dieses Projekts ist kein {changeRequest}-URL-Format bekannt.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "Diese Threads und alle archivierten Threads werden aus T3 Code gelöscht. Anbietersitzungen bleiben erhalten.", "1a50cbc984f8fe1c": "Alle archivierten Threads werden aus T3 Code gelöscht. Anbietersitzungen bleiben erhalten.", "361080ce34c8e8ed": "{count, plural, one {{count} von einem Board oder der Engine gestartetes Gespräch wird archiviert, nicht gelöscht.} other {{count} von einem Board oder der Engine gestartete Gespräche werden archiviert, nicht gelöscht.}} Bereits archivierte Board- und Engine-Gespräche bleiben erhalten.", - "fea770db813e04c2": "Dieser Thread ist archiviert und kann keine Nachrichten empfangen.", "4f076ebbf1c8846e": "Dadurch werden nur die Projekteinträge entfernt, nicht die Dateien auf der Festplatte.", "19b8f3ad79efb9e1": "Andere Einträge in diesem gruppierten Projekt sind nicht betroffen.", "2207c69b042b2e37": "Diese Aktion kann nicht rückgängig gemacht werden.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Gerät", "1354df9fb7278843": "Einen iOS-Simulator oder Android-Emulator ansehen.", "fdcd9643e2e63b15": "Stelle eine Nebenfrage, während dieser Thread weiterarbeitet.", - "13087312bc6a0b45": "Pull Requests", + "1944f04b75ddf26d": "Thread auf {label}", "f187680402450374": "Aufgabennachweise", "3a2e919ca921a60c": "Bereitstellungen", - "1944f04b75ddf26d": "Thread auf {label}", "314cfeebf191ba0d": "Genehmigung nötig", "4e5b7363441a3831": "Eingabe nötig", "97af4e74a5f95e5e": "läuft", @@ -2569,17 +2575,9 @@ }, " installieren" ], + "b4b98a0287c282e2": "Auf einem anderen Rechner, daher kann der Agent dieses Rechners es nicht lesen. Entferne es oder wechsle zum Senden zurück.", "5bbac0e5afeec779": "Aktueller Thread", "33c7e68fca089036": "Thread, {title}", - "b4b98a0287c282e2": "Auf einem anderen Rechner, daher kann der Agent dieses Rechners es nicht lesen. Entferne es oder wechsle zum Senden zurück.", - "c6196d99000642b4": "Thread öffnen", - "552649eea02acd9e": "{seat} läuft mit {substitute}", - "9723cacb91446778": "{model} hat sein Nutzungslimit erreicht. {seat} kehrt dorthin zurück, sobald das Limit zurückgesetzt ist.", - "4daef274c8249495": "{substitute} ist frei. Beim Wechsel läuft diese Unterhaltung in einem neuen verknüpften Thread mit einer Zusammenfassung weiter.", - "c8128bb2bd97de3c": "{substitute} ist frei. {seat} nutzt es ab deiner nächsten Nachricht.", - "05985243eafadf37": "Zu {substitute} wechseln", - "540418662b70d3d6": "Kein Lieblingsmodell ist frei, daher wartet diese Unterhaltung.", - "9da06299c78dfeeb": "Kein Lieblingsmodell ist frei, daher wartet {seat}.", "34cc63390ad793cc": "Thread wählen", "8f12309ead62e38a": "Threads oder Projekte durchsuchen...", "2f664754d005d9a7": "Keine aktiven Threads gefunden.", @@ -3299,6 +3297,7 @@ "83915f0968cde2cc": "Läuft", "b90e87f4b7125237": "Details", "16dc67f5429d8bae": "Hintergrundarbeit", + "2188eee8f81b0f51": "Subagent öffnen", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} geänderte Datei} other {{formattedCount} geänderte Dateien}}", "ec9e0be8ec693302": "Alle Ordner einklappen", "b791dd86f7991cc0": "Alle Ordner ausklappen", @@ -3434,6 +3433,7 @@ "890b662798f00182": "Keine Ausgabe.", "346e42415ac6d374": "Frühere Ausgabe nicht angezeigt", "1f096fe18e675975": "Weitere Steuerelemente des Eingabefelds", + "fea770db813e04c2": "Dieser Thread ist archiviert und kann keine Nachrichten empfangen.", "c1faef1435412551": "Bildanhang", "6bf404d068867eba": "Entwurfsanhang wird möglicherweise nicht gespeichert", "d34bfcfec9cf90ef": "Wird vorbereitet", @@ -3457,6 +3457,7 @@ "249192edde7f4932": "Sprachen durchsuchen", "71d8b593668d2106": "Keine passenden Sprachen.", "326bc17df66a7f05": "Dateien und Ordner", + "13087312bc6a0b45": "Pull Requests", "0e83c3bf28f8958e": "Befehle", "75d18dac06f4f037": "Skills", "05340d7dfcc34edf": "App", @@ -3487,6 +3488,7 @@ "e778e4f446fdf873": "Deine nächste Nachricht startet eine neue Sitzung", "0e2f2da4f2d94785": "Der Agent sieht frühere Nachrichten in diesem Thread nicht.", "e1189d2e582b008d": "Aktuelle Sitzung behalten", + "d8bc550497c8992f": "Diese Unterhaltung wird in einem verknüpften Thread fortgesetzt", "461c9f865f2e9b92": "{option} an", "f2aa17b5c620f2a4": "{option} aus", "f59314a884aae1ff": "Standard", @@ -3646,6 +3648,11 @@ }, " kann nicht geladen werden" ], + "c0c3aa756405c1df": "Wird {time} zurückgesetzt", + "36c5b0f937628c81": "Modell konnte nicht gewechselt werden", + "d9ddfe9e0e5580ac": "Versuche es über den Hinweis erneut.", + "4de04c6480ae979a": "Gewechselt", + "0f5e895d047c45c3": "Das gilt ab deiner nächsten Nachricht.", "63fd02d55f0e4417": "Einen Rechner mit dieser Umgebung verknüpfen", "4136b6bb217cc0b8": "{target} mit dieser Umgebung verknüpfen", "0986757d94229f8f": "Rechner wählen…", @@ -3986,6 +3993,8 @@ "2e3999c63ac1c29b": "Modelle wählen", "ea8ddb5bf4b0088e": "{count, plural, one {{models}, {count} weiteres} other {{models}, {count} weitere}}", "9ae42b0f35599fb6": "Modellauswahl ist deaktiviert", + "0148bc0d85adc872": "Thread konnte nicht geöffnet werden", + "983bff24bf6468a5": "Versuche es erneut aus dem Projekt oder öffne zuerst einen Thread.", "0109f6f6c7d80ebf": "Thread zur Behebung geöffnet", "aaf800b30d189e52": "Das Problem steht im Composer. Lies es durch und sende es dann.", "fa63b0bc8215c3ec": "Thread öffnen, um {provider} zu reparieren", @@ -4519,7 +4528,6 @@ } ], "a2aaca7ff8310186": "Chat öffnen", - "2188eee8f81b0f51": "Subagent öffnen", "a3048aaa541b7744": "Aktivität", "4a3cbccb2beedeb0": "Bild", "36fb7b9046d2e288": "Tool-Aufrufe", @@ -4574,11 +4582,6 @@ "275a97b4af3c6482": "Befehl für ein Terminal kopieren", "2b07985d23563374": "Wird {time} fortgesetzt", "a4b4e5eb6d313af9": "Wurde {time} zurückgesetzt", - "c0c3aa756405c1df": "Wird {time} zurückgesetzt", - "36c5b0f937628c81": "Modell konnte nicht gewechselt werden", - "d9ddfe9e0e5580ac": "Versuche es über den Hinweis erneut.", - "4de04c6480ae979a": "Gewechselt", - "0f5e895d047c45c3": "Das gilt ab deiner nächsten Nachricht.", "a7bfaa71c8b3030b": "Zeitpunkt der Zurücksetzung nicht verfügbar; manuell erneut versuchen", "77a70e5c3fd83ed8": "ChatGPT-Nutzungslimit erreicht", "c6c8d924b76b5a14": "Du hast das Limit deines Workspaces für die Nutzung deines ChatGPT-Abos in anderen Apps erreicht.", @@ -5221,6 +5224,23 @@ "c788c4526c6bb5e2": "Neu verknüpfen…", "f073730a8ae2a088": "Bereitstellung verknüpfen…", "60db6fe817814359": "Verknüpfung lösen…", + "a7ce372eaf721f33": "{count, plural, one {Eine Frage an dich} other {{count} Fragen an dich}}", + "e30c38e983fbfbd4": "{count, plural, one {Eine Änderung zu bestätigen} other {{count} Änderungen zu bestätigen}}", + "d12dc4f286a5ebde": "Wartet auf deine Freigabe. Genehmigt von {names}.", + "72ff98954c0bece4": "Wartet auf deine Freigabe", + "367af356d5c293e4": "Ein Plan zum Lesen", + "c6afa6b1d57ca14f": "Ergebnisse zur Abnahme", + "acdb3e0fcf03dcb7": "Wartet auf deine Entscheidung", + "1963c27ab94d5447": "Wartet darauf, dass du es einreichst", + "69cfe0105013678e": "Pausiert, bis du fortsetzt", + "d25661576338fcf0": "Braucht dich", + "e46cc3cd38fe584d": "Noch nicht eingereicht, daher nicht in der Reihe", + "6d88182ddaa764fc": "Platz {place} in der Reihe", + "2e76977cc10f2d80": "{busy} von {cap} Plätzen belegt", + "86452ddb15843ebf": "Belegen die Plätze", + "739d1096a032fd63": "In Nacharbeit", + "4aa8f34b88215991": "Nacharbeit, Runde {rounds}", + "b65966aa76a5cde6": "Diese Engine meldet noch nicht, wie viele Plätze es gibt und wer sie belegt. Die Reihenfolge ist ihre eigene.", "2f8f985531c0c748": "Gemergt", "6161295dbb04b128": "Der Host hat keinen Merge-Commit gemeldet.", "477a176670b421b9": "Bereitgestellt", @@ -5270,23 +5290,6 @@ "2ef682d5c194431e": "Auslassen", "3d79bb50390a59bd": "Wenn ein Platz limitiert ist", "718bee1b985e1e6b": "ein Platz, dessen Modell sein Nutzungslimit erreicht hat, wechselt zum ersten freien Modell in deinen Favoriten, wartet auf deine Entscheidung oder setzt bei der Nachricht aus. Das gilt ab deiner nächsten Nachricht. Ein Modell, das du für einen Platz von Hand gewählt hast, wird nie ohne Rückfrage gewechselt.", - "a7ce372eaf721f33": "{count, plural, one {Eine Frage an dich} other {{count} Fragen an dich}}", - "e30c38e983fbfbd4": "{count, plural, one {Eine Änderung zu bestätigen} other {{count} Änderungen zu bestätigen}}", - "d12dc4f286a5ebde": "Wartet auf deine Freigabe. Genehmigt von {names}.", - "72ff98954c0bece4": "Wartet auf deine Freigabe", - "367af356d5c293e4": "Ein Plan zum Lesen", - "c6afa6b1d57ca14f": "Ergebnisse zur Abnahme", - "acdb3e0fcf03dcb7": "Wartet auf deine Entscheidung", - "1963c27ab94d5447": "Wartet darauf, dass du es einreichst", - "69cfe0105013678e": "Pausiert, bis du fortsetzt", - "d25661576338fcf0": "Braucht dich", - "e46cc3cd38fe584d": "Noch nicht eingereicht, daher nicht in der Reihe", - "6d88182ddaa764fc": "Platz {place} in der Reihe", - "2e76977cc10f2d80": "{busy} von {cap} Plätzen belegt", - "86452ddb15843ebf": "Belegen die Plätze", - "739d1096a032fd63": "In Nacharbeit", - "4aa8f34b88215991": "Nacharbeit, Runde {rounds}", - "b65966aa76a5cde6": "Diese Engine meldet noch nicht, wie viele Plätze es gibt und wer sie belegt. Die Reihenfolge ist ihre eigene.", "36fff6eb0fde020c": "Jeder Sitz speichert sein Modell und seine Reasoning-Stufe. Das Kontextfenster wird vom Modell angezeigt und nicht gespeichert: Die Sitzeinstellungen der Engine haben noch kein Feld für das Kontextfenster. Eine Reasoning-Stufe, die der Harness oder das Modell ablehnt, wird beim Speichern mit der Begründung der Engine abgewiesen.", "49c97fc4187c3cc8": "Das Gespräch des Teams beginnt, sobald diese Aufgabe einen Platz bekommt. Bis dahin gibt es nichts zu beantworten.", "a1238a3f72d5dee8": "Das Gespräch des Teams beginnt, sobald diese Aufgabe gestartet wird. Bis dahin gibt es nichts zu beantworten.", @@ -5294,10 +5297,10 @@ "8c8efe9c6cffdf66": "Zurück zu Aufgabe #{number}", "036a05240c1069e2": "Sitz {seat}", "15dd178ef4fc2eb4": "Gespräch des Sitzes", + "ba2f576086976840": "Gespräch wird geladen …", "3e18ff4c1fe25356": "T3 läuft nicht, daher ist das Gespräch nicht verfügbar. Es wird fortgesetzt, sobald T3 wieder läuft. Die Engine zeichnet weiter auf, und nichts wird abgebrochen.", "5fa1f2d7e6dbf1b1": "Was die Mitte zeigt", "aaff9d0e91559667": "Engine-Protokoll", - "ba2f576086976840": "Gespräch wird geladen …", "f31a60920a4af0ef": "Dieses Gespräch wird geladen oder ist hier nicht verfügbar. Die Fakten der Aufgabe daneben gelten weiter.", "e0504620b693ba09": "Mit dieser Aufgabe ist noch kein Gespräch verknüpft. Bis dahin steht das Protokoll der Engine an dessen Stelle.", "73c89408a5ad1402": "Stand der Dinge", @@ -6889,8 +6892,6 @@ "96ef3535e6352a4a": "Branch gelöscht", "e3b55a78e79e96f0": "Die Frage steht im Eingabefeld. Lies sie durch und sende sie dann.", "672f08c2325b2730": "{term, select, mr {Der Merge Request ist im Eingabefeld. Gib deine Frage ein und sende sie.} cr {Die Änderungsanfrage ist im Eingabefeld. Gib deine Frage ein und sende sie.} other {Der Pull Request ist im Eingabefeld. Gib deine Frage ein und sende sie.}}", - "0148bc0d85adc872": "Thread konnte nicht geöffnet werden", - "983bff24bf6468a5": "Versuche es erneut aus dem Projekt oder öffne zuerst einen Thread.", "702cfd0c7fc3da87": "In einem Thread gefragt", "0e3eede94227c151": "{term, select, mr {Checkout des Merge Requests wird vorbereitet...} cr {Checkout der Änderungsanfrage wird vorbereitet...} other {Checkout des Pull Requests wird vorbereitet...}}", "f5fd3733da6e3556": "Für den Checkout konnte kein Thread geöffnet werden", @@ -8700,6 +8701,8 @@ "e9f7a62ecd609a46": "Zuletzt erreicht", "70bae47e93a2f207": "Vollständigen Fehler anzeigen", "30f7866bbe097337": "Lieblingsmodelle, erste Wahl zuerst", + "8101bb8e3c7427bf": "{name} nach oben verschieben", + "bdedd5c7764a77a0": "{name} nach unten verschieben", "e4099af6d85770ff": "„{font}“ ist keine Monospace-Schrift", "a8448493d83279e2": "Code und Terminal brauchen eine Schrift mit fester Breite, daher wurde die aktuelle Schrift beibehalten.", "e8622c39abe68f9d": "Standard", @@ -9087,8 +9090,6 @@ "e09686bd65886c10": "Neu starten und einschalten", "b8c82ba62b34f0e4": "Mikrofone, bevorzugte zuerst", "9fe08946d6dbd618": "Gespeichertes Mikrofon", - "8101bb8e3c7427bf": "{name} nach oben verschieben", - "bdedd5c7764a77a0": "{name} nach unten verschieben", "acae74b37388b9ba": "{name} vergessen", "e78e2b3c49707388": "Nicht verbunden", "5d06c2a13becb19a": "Mikrofontest ist in diesem Browser nicht verfügbar. Verwende HTTPS oder die Desktop-App.", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 6adfd2b88b828..81d753a8dcb2c 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} has reached its usage limit", "d4ad47339d670283": "Continued on {substitute}", "0b95a334090835d6": "{model} reached its usage limit, so this conversation continues in a linked thread. This one stays readable.", + "c6196d99000642b4": "Open thread", + "552649eea02acd9e": "{seat} runs on {substitute}", + "9723cacb91446778": "{model} has reached its usage limit. {seat} returns to it once the limit resets.", + "4daef274c8249495": "{substitute} is free. Swapping continues this conversation in a new linked thread with a summary.", + "c8128bb2bd97de3c": "{substitute} is free. {seat} uses it from your next message.", + "05985243eafadf37": "Swap to {substitute}", + "540418662b70d3d6": "No favorite model is free, so this conversation waits.", + "9da06299c78dfeeb": "No favorite model is free, so {seat} waits.", "8b876f2953338661": "Not known yet whether it is linked", "b8c2bbba2243b429": "Already linked", "4f1ab8a69f4a85e5": "This app is not connected to it", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Normal", "f42c2a36b3507308": "{label} On", "77cc5f738cb7d459": "{label} Off", - "2159a4897d4a4d73": "{runtime, select, codex {Update the Codex CLI to {version} or newer to use {names}.} other {Update {providerName} to {version} or newer to use {names}.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {Using {names} requires the Codex CLI {version} or newer, but the newest this install can update to is {latestVersion}. Install the Codex CLI another way or wait for a newer release.} other {Using {names} requires {providerName} {version} or newer, but the newest this install can update to is {latestVersion}. Install {providerName} another way or wait for a newer release.}}", "aba3bb73ce212f0c": "Using {names} requires {providerName} {version} or newer, but the claude-code Homebrew cask only has {latestVersion}. Switch to the claude-code@latest cask: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {Using {names} requires the Codex CLI {version} or newer, but the newest this install can update to is {latestVersion}. Install the Codex CLI another way or wait for a newer release.} other {Using {names} requires {providerName} {version} or newer, but the newest this install can update to is {latestVersion}. Install {providerName} another way or wait for a newer release.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Update the Codex CLI to {version} or newer to use {names}.} other {Update {providerName} to {version} or newer to use {names}.}}", "d887bea446534de5": "No project in this environment can read {host}/{repository}.", "4e466d60e2f7736b": "Paste the full pull request URL; this thread has no repository to resolve the number against.", "302625058bacbe38": "Paste a full URL; this project's host has no known {changeRequest} URL.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "Those threads and any archived threads are deleted from T3 Code. Provider sessions are kept.", "1a50cbc984f8fe1c": "Any archived threads are deleted from T3 Code. Provider sessions are kept.", "361080ce34c8e8ed": "{count, plural, one {{count} conversation started by a board or the engine is archived, not deleted.} other {{count} conversations started by a board or the engine are archived, not deleted.}} Board and engine conversations already archived are kept.", - "fea770db813e04c2": "This thread is archived and cannot receive messages.", "4f076ebbf1c8846e": "This removes only the project entries, not the files on disk.", "19b8f3ad79efb9e1": "Other entries in this grouped project are unaffected.", "2207c69b042b2e37": "This action cannot be undone.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Device", "1354df9fb7278843": "Watch an iOS Simulator or Android Emulator.", "fdcd9643e2e63b15": "Ask a side question while this thread keeps working.", - "13087312bc6a0b45": "Pull requests", + "1944f04b75ddf26d": "Thread on {label}", "f187680402450374": "Task evidence", "3a2e919ca921a60c": "Deployments", - "1944f04b75ddf26d": "Thread on {label}", "314cfeebf191ba0d": "needs approval", "4e5b7363441a3831": "needs input", "97af4e74a5f95e5e": "running", @@ -2568,17 +2574,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "On another machine, so this machine's agent can't read it. Remove it or switch back to send.", "5bbac0e5afeec779": "Current thread", "33c7e68fca089036": "Thread, {title}", - "b4b98a0287c282e2": "On another machine, so this machine's agent can't read it. Remove it or switch back to send.", - "c6196d99000642b4": "Open thread", - "552649eea02acd9e": "{seat} runs on {substitute}", - "9723cacb91446778": "{model} has reached its usage limit. {seat} returns to it once the limit resets.", - "4daef274c8249495": "{substitute} is free. Swapping continues this conversation in a new linked thread with a summary.", - "c8128bb2bd97de3c": "{substitute} is free. {seat} uses it from your next message.", - "05985243eafadf37": "Swap to {substitute}", - "540418662b70d3d6": "No favorite model is free, so this conversation waits.", - "9da06299c78dfeeb": "No favorite model is free, so {seat} waits.", "34cc63390ad793cc": "Choose a thread", "8f12309ead62e38a": "Search threads or projects...", "2f664754d005d9a7": "No active threads found.", @@ -3298,6 +3296,7 @@ "83915f0968cde2cc": "Running", "b90e87f4b7125237": "Details", "16dc67f5429d8bae": "Background work", + "2188eee8f81b0f51": "Open subagent", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} changed file} other {{formattedCount} changed files}}", "ec9e0be8ec693302": "Collapse all folders", "b791dd86f7991cc0": "Expand all folders", @@ -3433,6 +3432,7 @@ "890b662798f00182": "No output.", "346e42415ac6d374": "Earlier output not shown", "1f096fe18e675975": "More composer controls", + "fea770db813e04c2": "This thread is archived and cannot receive messages.", "c1faef1435412551": "Image attachment", "6bf404d068867eba": "Draft attachment may not persist", "d34bfcfec9cf90ef": "Preparing", @@ -3456,6 +3456,7 @@ "249192edde7f4932": "Search languages", "71d8b593668d2106": "No matching languages.", "326bc17df66a7f05": "Files and folders", + "13087312bc6a0b45": "Pull requests", "0e83c3bf28f8958e": "Commands", "75d18dac06f4f037": "Skills", "05340d7dfcc34edf": "App", @@ -3486,6 +3487,7 @@ "e778e4f446fdf873": "Your next message starts a fresh session", "0e2f2da4f2d94785": "The agent won't see earlier messages in this thread.", "e1189d2e582b008d": "Keep the current session", + "d8bc550497c8992f": "This conversation continues in a linked thread", "461c9f865f2e9b92": "{option} On", "f2aa17b5c620f2a4": "{option} Off", "f59314a884aae1ff": "Default", @@ -3645,6 +3647,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "Resets {time}", + "36c5b0f937628c81": "Could not swap the model", + "d9ddfe9e0e5580ac": "Try again from the notice.", + "4de04c6480ae979a": "Swapped", + "0f5e895d047c45c3": "It applies from your next message.", "63fd02d55f0e4417": "Link a machine to this environment", "4136b6bb217cc0b8": "Link {target} to this environment", "0986757d94229f8f": "Choose machine…", @@ -3984,6 +3991,8 @@ "2e3999c63ac1c29b": "Choose models", "ea8ddb5bf4b0088e": "{count, plural, one {{models}, {count} more} other {{models}, {count} more}}", "9ae42b0f35599fb6": "Model picker is disabled", + "0148bc0d85adc872": "Could not open a thread", + "983bff24bf6468a5": "Try again from the project, or open a thread first.", "0109f6f6c7d80ebf": "Opened a thread to fix it", "aaf800b30d189e52": "The problem is in the composer. Read it over, then send.", "fa63b0bc8215c3ec": "Open a thread to fix {provider}", @@ -4518,7 +4527,6 @@ } ], "a2aaca7ff8310186": "Open chat", - "2188eee8f81b0f51": "Open subagent", "a3048aaa541b7744": "Activity", "4a3cbccb2beedeb0": "image", "36fb7b9046d2e288": "Tool calls", @@ -4573,11 +4581,6 @@ "275a97b4af3c6482": "Copy command, for a terminal", "2b07985d23563374": "Resumes {time}", "a4b4e5eb6d313af9": "Reset {time}", - "c0c3aa756405c1df": "Resets {time}", - "36c5b0f937628c81": "Could not swap the model", - "d9ddfe9e0e5580ac": "Try again from the notice.", - "4de04c6480ae979a": "Swapped", - "0f5e895d047c45c3": "It applies from your next message.", "a7bfaa71c8b3030b": "Reset time unavailable; retry manually", "77a70e5c3fd83ed8": "ChatGPT usage limit reached", "c6c8d924b76b5a14": "You've reached your workspace's limit for using your ChatGPT plan in other apps.", @@ -5221,6 +5224,23 @@ "c788c4526c6bb5e2": "Relink…", "f073730a8ae2a088": "Link deployment…", "60db6fe817814359": "Unlink…", + "a7ce372eaf721f33": "{count, plural, one {A question for you} other {{count} questions for you}}", + "e30c38e983fbfbd4": "{count, plural, one {A change to confirm} other {{count} changes to confirm}}", + "d12dc4f286a5ebde": "Waiting for your sign-off. {names} approved.", + "72ff98954c0bece4": "Waiting for your sign-off", + "367af356d5c293e4": "A plan to read", + "c6afa6b1d57ca14f": "Deliverables to accept", + "acdb3e0fcf03dcb7": "Stopped for your decision", + "1963c27ab94d5447": "Waiting for you to submit it", + "69cfe0105013678e": "Paused until you resume it", + "d25661576338fcf0": "Needs you", + "e46cc3cd38fe584d": "Not submitted yet, so not in line", + "6d88182ddaa764fc": "{place, selectordinal, one {{place}st in line} two {{place}nd in line} few {{place}rd in line} other {{place}th in line}}", + "2e76977cc10f2d80": "{busy} of {cap} slots busy", + "86452ddb15843ebf": "Holding the slots", + "739d1096a032fd63": "In rework", + "4aa8f34b88215991": "Rework round {rounds}", + "b65966aa76a5cde6": "This engine does not report the slots or who holds them yet. The order is its own.", "2f8f985531c0c748": "Merged", "6161295dbb04b128": "The host has not reported a merge commit.", "477a176670b421b9": "Deployed", @@ -5270,23 +5290,6 @@ "2ef682d5c194431e": "Leave it out", "3d79bb50390a59bd": "When a seat is limited", "718bee1b985e1e6b": "a seat whose model has reached its usage limit moves to the first free model in your Favorites, waits for you to choose, or sits the message out. It applies from your next message. A model you chose for a seat by hand is never swapped without asking.", - "a7ce372eaf721f33": "{count, plural, one {A question for you} other {{count} questions for you}}", - "e30c38e983fbfbd4": "{count, plural, one {A change to confirm} other {{count} changes to confirm}}", - "d12dc4f286a5ebde": "Waiting for your sign-off. {names} approved.", - "72ff98954c0bece4": "Waiting for your sign-off", - "367af356d5c293e4": "A plan to read", - "c6afa6b1d57ca14f": "Deliverables to accept", - "acdb3e0fcf03dcb7": "Stopped for your decision", - "1963c27ab94d5447": "Waiting for you to submit it", - "69cfe0105013678e": "Paused until you resume it", - "d25661576338fcf0": "Needs you", - "e46cc3cd38fe584d": "Not submitted yet, so not in line", - "6d88182ddaa764fc": "{place, selectordinal, one {{place}st in line} two {{place}nd in line} few {{place}rd in line} other {{place}th in line}}", - "2e76977cc10f2d80": "{busy} of {cap} slots busy", - "86452ddb15843ebf": "Holding the slots", - "739d1096a032fd63": "In rework", - "4aa8f34b88215991": "Rework round {rounds}", - "b65966aa76a5cde6": "This engine does not report the slots or who holds them yet. The order is its own.", "36fff6eb0fde020c": "Each seat saves its model and reasoning level. The context window is shown from the model and is not saved: the engine's seat settings have no context-window field yet. A reasoning level the harness or model refuses is rejected when you save, with the engine's reason.", "49c97fc4187c3cc8": "The team's conversation starts when this task gets a slot. There is nothing to answer yet.", "a1238a3f72d5dee8": "The team's conversation starts when this task is started. There is nothing to answer yet.", @@ -5294,10 +5297,10 @@ "8c8efe9c6cffdf66": "Back to task #{number}", "036a05240c1069e2": "Seat {seat}", "15dd178ef4fc2eb4": "Seat conversation", + "ba2f576086976840": "Loading the conversation...", "3e18ff4c1fe25356": "T3 is not running, so the conversation is not available. It resumes when T3 is back. The engine keeps recording and nothing is cancelled.", "5fa1f2d7e6dbf1b1": "What the centre shows", "aaff9d0e91559667": "Engine log", - "ba2f576086976840": "Loading the conversation...", "f31a60920a4af0ef": "This conversation is loading or is not available here. The task's facts beside it stand.", "e0504620b693ba09": "No conversation is linked to this task yet. The engine's log stands in until one is.", "73c89408a5ad1402": "Where it stands", @@ -6896,8 +6899,6 @@ "96ef3535e6352a4a": "Branch deleted", "e3b55a78e79e96f0": "The question is in the composer. Read it over, then send.", "672f08c2325b2730": "The {term, select, mr {merge request} cr {change request} other {pull request}} is in the composer. Type your question, then send.", - "0148bc0d85adc872": "Could not open a thread", - "983bff24bf6468a5": "Try again from the project, or open a thread first.", "702cfd0c7fc3da87": "Asked in a thread", "0e3eede94227c151": "Preparing the {term, select, mr {merge request} cr {change request} other {pull request}} checkout...", "f5fd3733da6e3556": "Could not open a thread for the checkout", @@ -8708,6 +8709,8 @@ "e9f7a62ecd609a46": "Last reached", "70bae47e93a2f207": "Show full error", "30f7866bbe097337": "Favorite models, first choice first", + "8101bb8e3c7427bf": "Move {name} up", + "bdedd5c7764a77a0": "Move {name} down", "e4099af6d85770ff": "\"{font}\" isn't monospace", "a8448493d83279e2": "Code and terminal need a fixed-width font, so the current font was kept.", "e8622c39abe68f9d": "default", @@ -9095,8 +9098,6 @@ "e09686bd65886c10": "Restart and turn on", "b8c82ba62b34f0e4": "Microphones, preferred first", "9fe08946d6dbd618": "Saved microphone", - "8101bb8e3c7427bf": "Move {name} up", - "bdedd5c7764a77a0": "Move {name} down", "acae74b37388b9ba": "Forget {name}", "e78e2b3c49707388": "Not connected", "5d06c2a13becb19a": "Microphone testing is unavailable in this browser. Use HTTPS or the desktop app.", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 0f550c90ace7c..911cc2fd4d67e 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} alcanzó su límite de uso", "d4ad47339d670283": "Continúa con {substitute}", "0b95a334090835d6": "{model} alcanzó su límite de uso, así que esta conversación continúa en un hilo vinculado. Este sigue siendo legible.", + "c6196d99000642b4": "Abrir hilo", + "552649eea02acd9e": "{seat} funciona con {substitute}", + "9723cacb91446778": "{model} alcanzó su límite de uso. {seat} vuelve a él cuando el límite se restablezca.", + "4daef274c8249495": "{substitute} está libre. Al cambiar, esta conversación continúa en un nuevo hilo vinculado con un resumen.", + "c8128bb2bd97de3c": "{substitute} está libre. {seat} lo usa desde tu próximo mensaje.", + "05985243eafadf37": "Cambiar a {substitute}", + "540418662b70d3d6": "Ningún modelo favorito está libre, así que esta conversación espera.", + "9da06299c78dfeeb": "Ningún modelo favorito está libre, así que {seat} espera.", "8b876f2953338661": "Aún no se sabe si está vinculada", "b8c2bbba2243b429": "Ya vinculada", "4f1ab8a69f4a85e5": "Esta app no está conectada a ella", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Normal", "f42c2a36b3507308": "{label} activado", "77cc5f738cb7d459": "{label} desactivado", - "2159a4897d4a4d73": "{runtime, select, codex {Actualiza la CLI de Codex a {version} o posterior para usar {names}.} other {Actualiza {providerName} a {version} o posterior para usar {names}.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {Para usar {names} se necesita la CLI de Codex {version} o posterior, pero esta instalación solo puede actualizarse hasta {latestVersion}. Instala la CLI de Codex de otra forma o espera a una versión más reciente.} other {Para usar {names} se necesita {providerName} {version} o posterior, pero esta instalación solo puede actualizarse hasta {latestVersion}. Instala {providerName} de otra forma o espera a una versión más reciente.}}", "aba3bb73ce212f0c": "Usar {names} requiere {providerName} {version} o posterior, pero el cask de Homebrew claude-code solo tiene {latestVersion}. Cambia al cask claude-code@latest: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {Para usar {names} se necesita la CLI de Codex {version} o posterior, pero esta instalación solo puede actualizarse hasta {latestVersion}. Instala la CLI de Codex de otra forma o espera a una versión más reciente.} other {Para usar {names} se necesita {providerName} {version} o posterior, pero esta instalación solo puede actualizarse hasta {latestVersion}. Instala {providerName} de otra forma o espera a una versión más reciente.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Actualiza la CLI de Codex a {version} o posterior para usar {names}.} other {Actualiza {providerName} a {version} o posterior para usar {names}.}}", "d887bea446534de5": "Ningún proyecto de este entorno puede leer {host}/{repository}.", "4e466d60e2f7736b": "Pega la URL completa de la pull request; este hilo no tiene ningún repositorio con el que resolver el número.", "302625058bacbe38": "Pega una URL completa; el host de este proyecto no tiene una URL de {changeRequest} conocida.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "Esos hilos y los hilos archivados se eliminan de T3 Code. Las sesiones del proveedor se conservan.", "1a50cbc984f8fe1c": "Los hilos archivados se eliminan de T3 Code. Las sesiones del proveedor se conservan.", "361080ce34c8e8ed": "{count, plural, one {{count} conversación iniciada por un tablero o por el motor se archiva, no se elimina.} other {{count} conversaciones iniciadas por un tablero o por el motor se archivan, no se eliminan.}} Las conversaciones de tableros y del motor ya archivadas se conservan.", - "fea770db813e04c2": "Este hilo está archivado y no puede recibir mensajes.", "4f076ebbf1c8846e": "Esto solo quita las entradas del proyecto, no los archivos del disco.", "19b8f3ad79efb9e1": "Las demás entradas de este proyecto agrupado no se ven afectadas.", "2207c69b042b2e37": "Esta acción no se puede deshacer.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Dispositivo", "1354df9fb7278843": "Mira un simulador de iOS o un emulador de Android.", "fdcd9643e2e63b15": "Haz una pregunta aparte mientras este hilo sigue trabajando.", - "13087312bc6a0b45": "Pull requests", + "1944f04b75ddf26d": "Hilo en {label}", "f187680402450374": "Evidencia de la tarea", "3a2e919ca921a60c": "Despliegues", - "1944f04b75ddf26d": "Hilo en {label}", "314cfeebf191ba0d": "necesita aprobación", "4e5b7363441a3831": "necesita respuesta", "97af4e74a5f95e5e": "en curso", @@ -2568,17 +2574,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "Está en otra máquina, así que el agente de esta máquina no puede leerlo. Quítalo o vuelve a cambiar para enviar.", "5bbac0e5afeec779": "Hilo actual", "33c7e68fca089036": "Hilo, {title}", - "b4b98a0287c282e2": "Está en otra máquina, así que el agente de esta máquina no puede leerlo. Quítalo o vuelve a cambiar para enviar.", - "c6196d99000642b4": "Abrir hilo", - "552649eea02acd9e": "{seat} funciona con {substitute}", - "9723cacb91446778": "{model} alcanzó su límite de uso. {seat} vuelve a él cuando el límite se restablezca.", - "4daef274c8249495": "{substitute} está libre. Al cambiar, esta conversación continúa en un nuevo hilo vinculado con un resumen.", - "c8128bb2bd97de3c": "{substitute} está libre. {seat} lo usa desde tu próximo mensaje.", - "05985243eafadf37": "Cambiar a {substitute}", - "540418662b70d3d6": "Ningún modelo favorito está libre, así que esta conversación espera.", - "9da06299c78dfeeb": "Ningún modelo favorito está libre, así que {seat} espera.", "34cc63390ad793cc": "Elige un hilo", "8f12309ead62e38a": "Buscar hilos o proyectos...", "2f664754d005d9a7": "No se encontraron hilos activos.", @@ -3298,6 +3296,7 @@ "83915f0968cde2cc": "En ejecución", "b90e87f4b7125237": "Detalles", "16dc67f5429d8bae": "Trabajo en segundo plano", + "2188eee8f81b0f51": "Abrir subagente", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} archivo cambiado} other {{formattedCount} archivos cambiados}}", "ec9e0be8ec693302": "Contraer todas las carpetas", "b791dd86f7991cc0": "Expandir todas las carpetas", @@ -3433,6 +3432,7 @@ "890b662798f00182": "Sin salida.", "346e42415ac6d374": "No se muestra la salida anterior", "1f096fe18e675975": "Más controles del cuadro de mensaje", + "fea770db813e04c2": "Este hilo está archivado y no puede recibir mensajes.", "c1faef1435412551": "Imagen adjunta", "6bf404d068867eba": "Puede que el adjunto del borrador no se conserve", "d34bfcfec9cf90ef": "Preparando", @@ -3456,6 +3456,7 @@ "249192edde7f4932": "Buscar lenguajes", "71d8b593668d2106": "No hay lenguajes que coincidan.", "326bc17df66a7f05": "Archivos y carpetas", + "13087312bc6a0b45": "Pull requests", "0e83c3bf28f8958e": "Comandos", "75d18dac06f4f037": "Skills", "05340d7dfcc34edf": "App", @@ -3486,6 +3487,7 @@ "e778e4f446fdf873": "Tu próximo mensaje inicia una sesión nueva", "0e2f2da4f2d94785": "El agente no verá los mensajes anteriores de este hilo.", "e1189d2e582b008d": "Mantener la sesión actual", + "d8bc550497c8992f": "Esta conversación continúa en un hilo vinculado", "461c9f865f2e9b92": "{option} activado", "f2aa17b5c620f2a4": "{option} desactivado", "f59314a884aae1ff": "Predeterminado", @@ -3645,6 +3647,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "Se restablece {time}", + "36c5b0f937628c81": "No se pudo cambiar el modelo", + "d9ddfe9e0e5580ac": "Vuelve a intentarlo desde el aviso.", + "4de04c6480ae979a": "Cambiado", + "0f5e895d047c45c3": "Se aplica desde tu próximo mensaje.", "63fd02d55f0e4417": "Vincular una máquina a este entorno", "4136b6bb217cc0b8": "Vincular {target} a este entorno", "0986757d94229f8f": "Elegir máquina…", @@ -3982,6 +3989,8 @@ "2e3999c63ac1c29b": "Elegir modelos", "ea8ddb5bf4b0088e": "{count, plural, one {{models} y {count} más} other {{models} y {count} más}}", "9ae42b0f35599fb6": "El selector de modelos está desactivado", + "0148bc0d85adc872": "No se pudo abrir un hilo", + "983bff24bf6468a5": "Vuelve a intentarlo desde el proyecto o abre primero un hilo.", "0109f6f6c7d80ebf": "Se abrió un hilo para solucionarlo", "aaf800b30d189e52": "El problema está en el compositor. Revísalo y luego envíalo.", "fa63b0bc8215c3ec": "Abrir un hilo para solucionar {provider}", @@ -4516,7 +4525,6 @@ } ], "a2aaca7ff8310186": "Abrir chat", - "2188eee8f81b0f51": "Abrir subagente", "a3048aaa541b7744": "Actividad", "4a3cbccb2beedeb0": "imagen", "36fb7b9046d2e288": "Llamadas a herramientas", @@ -4571,11 +4579,6 @@ "275a97b4af3c6482": "Copiar comando, para una terminal", "2b07985d23563374": "Se reanuda {time}", "a4b4e5eb6d313af9": "Se restableció {time}", - "c0c3aa756405c1df": "Se restablece {time}", - "36c5b0f937628c81": "No se pudo cambiar el modelo", - "d9ddfe9e0e5580ac": "Vuelve a intentarlo desde el aviso.", - "4de04c6480ae979a": "Cambiado", - "0f5e895d047c45c3": "Se aplica desde tu próximo mensaje.", "a7bfaa71c8b3030b": "Hora de restablecimiento no disponible; vuelve a intentarlo manualmente", "77a70e5c3fd83ed8": "Se alcanzó el límite de uso de ChatGPT", "c6c8d924b76b5a14": "Has alcanzado el límite de tu espacio de trabajo para usar tu plan de ChatGPT en otras apps.", @@ -5219,6 +5222,23 @@ "c788c4526c6bb5e2": "Volver a vincular…", "f073730a8ae2a088": "Vincular despliegue…", "60db6fe817814359": "Desvincular…", + "a7ce372eaf721f33": "{count, plural, one {Una pregunta para ti} other {{count} preguntas para ti}}", + "e30c38e983fbfbd4": "{count, plural, one {Un cambio por confirmar} other {{count} cambios por confirmar}}", + "d12dc4f286a5ebde": "Esperando tu aprobación. Aprobado por {names}.", + "72ff98954c0bece4": "Esperando tu aprobación", + "367af356d5c293e4": "Un plan para leer", + "c6afa6b1d57ca14f": "Entregables por aceptar", + "acdb3e0fcf03dcb7": "Detenido, espera tu decisión", + "1963c27ab94d5447": "Esperando a que lo envíes", + "69cfe0105013678e": "En pausa hasta que lo reanudes", + "d25661576338fcf0": "Te necesita", + "e46cc3cd38fe584d": "Aún sin enviar, así que no está en la cola", + "6d88182ddaa764fc": "Puesto {place} en la cola", + "2e76977cc10f2d80": "{busy} de {cap} espacios ocupados", + "86452ddb15843ebf": "Ocupan los espacios", + "739d1096a032fd63": "En retrabajo", + "4aa8f34b88215991": "Retrabajo, ronda {rounds}", + "b65966aa76a5cde6": "Este motor aún no informa de los espacios ni de quién los ocupa. El orden es el suyo.", "2f8f985531c0c748": "Fusionada", "6161295dbb04b128": "El host no ha informado de un commit de fusión.", "477a176670b421b9": "Desplegada", @@ -5268,23 +5288,6 @@ "2ef682d5c194431e": "Dejarlo fuera", "3d79bb50390a59bd": "Cuando un puesto alcanza su límite", "718bee1b985e1e6b": "un puesto cuyo modelo alcanzó su límite de uso pasa al primer modelo libre de tus Favoritos, espera a que elijas o no participa en el mensaje. Se aplica desde tu próximo mensaje. Un modelo que elegiste a mano para un puesto nunca se cambia sin preguntar.", - "a7ce372eaf721f33": "{count, plural, one {Una pregunta para ti} other {{count} preguntas para ti}}", - "e30c38e983fbfbd4": "{count, plural, one {Un cambio por confirmar} other {{count} cambios por confirmar}}", - "d12dc4f286a5ebde": "Esperando tu aprobación. Aprobado por {names}.", - "72ff98954c0bece4": "Esperando tu aprobación", - "367af356d5c293e4": "Un plan para leer", - "c6afa6b1d57ca14f": "Entregables por aceptar", - "acdb3e0fcf03dcb7": "Detenido, espera tu decisión", - "1963c27ab94d5447": "Esperando a que lo envíes", - "69cfe0105013678e": "En pausa hasta que lo reanudes", - "d25661576338fcf0": "Te necesita", - "e46cc3cd38fe584d": "Aún sin enviar, así que no está en la cola", - "6d88182ddaa764fc": "Puesto {place} en la cola", - "2e76977cc10f2d80": "{busy} de {cap} espacios ocupados", - "86452ddb15843ebf": "Ocupan los espacios", - "739d1096a032fd63": "En retrabajo", - "4aa8f34b88215991": "Retrabajo, ronda {rounds}", - "b65966aa76a5cde6": "Este motor aún no informa de los espacios ni de quién los ocupa. El orden es el suyo.", "36fff6eb0fde020c": "Cada puesto guarda su modelo y su nivel de razonamiento. La ventana de contexto se muestra a partir del modelo y no se guarda: la configuración de puestos del motor aún no tiene un campo para la ventana de contexto. Un nivel de razonamiento que el harness o el modelo rechaza se rechaza al guardar, con el motivo del motor.", "49c97fc4187c3cc8": "La conversación del equipo empieza cuando esta tarea obtiene un espacio. Todavía no hay nada que responder.", "a1238a3f72d5dee8": "La conversación del equipo empieza cuando se inicia esta tarea. Todavía no hay nada que responder.", @@ -5292,10 +5295,10 @@ "8c8efe9c6cffdf66": "Volver a la tarea #{number}", "036a05240c1069e2": "Puesto {seat}", "15dd178ef4fc2eb4": "Conversación del puesto", + "ba2f576086976840": "Cargando la conversación...", "3e18ff4c1fe25356": "T3 no se está ejecutando, así que la conversación no está disponible. Se reanuda cuando T3 vuelva. El motor sigue registrando y no se cancela nada.", "5fa1f2d7e6dbf1b1": "Lo que muestra el centro", "aaff9d0e91559667": "Registro del motor", - "ba2f576086976840": "Cargando la conversación...", "f31a60920a4af0ef": "Esta conversación se está cargando o no está disponible aquí. Los datos de la tarea a su lado siguen vigentes.", "e0504620b693ba09": "Todavía no hay una conversación vinculada a esta tarea. Hasta entonces, el registro del motor ocupa su lugar.", "73c89408a5ad1402": "Dónde está", @@ -6889,8 +6892,6 @@ "96ef3535e6352a4a": "Rama eliminada", "e3b55a78e79e96f0": "La pregunta está en el cuadro de mensaje. Revísala y envíala.", "672f08c2325b2730": "La {term, select, mr {merge request} cr {solicitud de cambios} other {pull request}} está en el cuadro de mensaje. Escribe tu pregunta y envíala.", - "0148bc0d85adc872": "No se pudo abrir un hilo", - "983bff24bf6468a5": "Vuelve a intentarlo desde el proyecto o abre primero un hilo.", "702cfd0c7fc3da87": "Preguntado en un hilo", "0e3eede94227c151": "Preparando el checkout de la {term, select, mr {merge request} cr {solicitud de cambios} other {pull request}}...", "f5fd3733da6e3556": "No se pudo abrir un hilo para el checkout", @@ -8698,6 +8699,8 @@ "e9f7a62ecd609a46": "Último contacto", "70bae47e93a2f207": "Mostrar error completo", "30f7866bbe097337": "Modelos favoritos, primera opción primero", + "8101bb8e3c7427bf": "Subir {name}", + "bdedd5c7764a77a0": "Bajar {name}", "e4099af6d85770ff": "\"{font}\" no es monoespaciada", "a8448493d83279e2": "El código y la terminal necesitan una fuente de ancho fijo, así que se mantuvo la fuente actual.", "e8622c39abe68f9d": "predeterminada", @@ -9085,8 +9088,6 @@ "e09686bd65886c10": "Reiniciar y activar", "b8c82ba62b34f0e4": "Micrófonos, el preferido primero", "9fe08946d6dbd618": "Micrófono guardado", - "8101bb8e3c7427bf": "Subir {name}", - "bdedd5c7764a77a0": "Bajar {name}", "acae74b37388b9ba": "Olvidar {name}", "e78e2b3c49707388": "Sin conexión", "5d06c2a13becb19a": "La prueba del micrófono no está disponible en este navegador. Usa HTTPS o la app de escritorio.", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 6774467b28e5c..fc5af78d82441 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat} : {model} a atteint sa limite d'utilisation", "d4ad47339d670283": "Poursuivi sur {substitute}", "0b95a334090835d6": "{model} a atteint sa limite d'utilisation ; cette conversation se poursuit donc dans un fil lié. Celui-ci reste lisible.", + "c6196d99000642b4": "Ouvrir le fil", + "552649eea02acd9e": "{seat} fonctionne sur {substitute}", + "9723cacb91446778": "{model} a atteint sa limite d'utilisation. {seat} y revient dès que la limite est réinitialisée.", + "4daef274c8249495": "{substitute} est libre. Le remplacement poursuit cette conversation dans un nouveau fil lié, avec un résumé.", + "c8128bb2bd97de3c": "{substitute} est libre. {seat} l'utilise à partir de votre prochain message.", + "05985243eafadf37": "Passer à {substitute}", + "540418662b70d3d6": "Aucun modèle favori n'est libre ; cette conversation attend donc.", + "9da06299c78dfeeb": "Aucun modèle favori n'est libre ; {seat} attend donc.", "8b876f2953338661": "On ne sait pas encore si elle est associée", "b8c2bbba2243b429": "Déjà associée", "4f1ab8a69f4a85e5": "Cette app n’y est pas connectée", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Normal", "f42c2a36b3507308": "{label} activé", "77cc5f738cb7d459": "{label} désactivé", - "2159a4897d4a4d73": "{runtime, select, codex {Mettez à jour la CLI Codex vers la version {version} ou ultérieure pour utiliser {names}.} other {Mettez à jour {providerName} vers la version {version} ou ultérieure pour utiliser {names}.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {{names} nécessite la CLI Codex {version} ou une version ultérieure, mais cette installation ne peut pas dépasser {latestVersion}. Installez la CLI Codex autrement ou attendez une nouvelle version.} other {{names} nécessite {providerName} {version} ou une version ultérieure, mais cette installation ne peut pas dépasser {latestVersion}. Installez {providerName} autrement ou attendez une nouvelle version.}}", "aba3bb73ce212f0c": "{names} nécessite {providerName} {version} ou une version plus récente, mais le cask Homebrew claude-code ne propose que {latestVersion}. Passe au cask claude-code@latest : {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {{names} nécessite la CLI Codex {version} ou une version ultérieure, mais cette installation ne peut pas dépasser {latestVersion}. Installez la CLI Codex autrement ou attendez une nouvelle version.} other {{names} nécessite {providerName} {version} ou une version ultérieure, mais cette installation ne peut pas dépasser {latestVersion}. Installez {providerName} autrement ou attendez une nouvelle version.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Mettez à jour la CLI Codex vers la version {version} ou ultérieure pour utiliser {names}.} other {Mettez à jour {providerName} vers la version {version} ou ultérieure pour utiliser {names}.}}", "d887bea446534de5": "Aucun projet de cet environnement ne peut lire {host}/{repository}.", "4e466d60e2f7736b": "Collez l’URL complète de la pull request ; ce fil n’a pas de dépôt auquel rattacher le numéro.", "302625058bacbe38": "Collez une URL complète ; l’hôte de ce projet n’a pas de format d’URL connu pour {changeRequest}.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "Ces fils et tous les fils archivés sont supprimés de T3 Code. Les sessions du fournisseur sont conservées.", "1a50cbc984f8fe1c": "Tous les fils archivés sont supprimés de T3 Code. Les sessions du fournisseur sont conservées.", "361080ce34c8e8ed": "{count, plural, one {{count} conversation lancée par un tableau ou par le moteur est archivée, pas supprimée.} other {{count} conversations lancées par un tableau ou par le moteur sont archivées, pas supprimées.}} Les conversations de tableaux et du moteur déjà archivées sont conservées.", - "fea770db813e04c2": "Ce fil est archivé et ne peut pas recevoir de messages.", "4f076ebbf1c8846e": "Cela retire uniquement les entrées de projet, pas les fichiers sur le disque.", "19b8f3ad79efb9e1": "Les autres entrées de ce projet regroupé ne sont pas affectées.", "2207c69b042b2e37": "Cette action est irréversible.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Appareil", "1354df9fb7278843": "Regardez un simulateur iOS ou un émulateur Android.", "fdcd9643e2e63b15": "Posez une question annexe pendant que ce fil continue de travailler.", - "13087312bc6a0b45": "Pull requests", + "1944f04b75ddf26d": "Fil sur {label}", "f187680402450374": "Preuves de la tâche", "3a2e919ca921a60c": "Déploiements", - "1944f04b75ddf26d": "Fil sur {label}", "314cfeebf191ba0d": "approbation requise", "4e5b7363441a3831": "réponse requise", "97af4e74a5f95e5e": "en cours", @@ -2568,17 +2574,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "Sur une autre machine, l’agent de cette machine ne peut donc pas le lire. Retirez-le ou revenez en arrière pour envoyer.", "5bbac0e5afeec779": "Fil actuel", "33c7e68fca089036": "Fil, {title}", - "b4b98a0287c282e2": "Sur une autre machine, l’agent de cette machine ne peut donc pas le lire. Retirez-le ou revenez en arrière pour envoyer.", - "c6196d99000642b4": "Ouvrir le fil", - "552649eea02acd9e": "{seat} fonctionne sur {substitute}", - "9723cacb91446778": "{model} a atteint sa limite d'utilisation. {seat} y revient dès que la limite est réinitialisée.", - "4daef274c8249495": "{substitute} est libre. Le remplacement poursuit cette conversation dans un nouveau fil lié, avec un résumé.", - "c8128bb2bd97de3c": "{substitute} est libre. {seat} l'utilise à partir de votre prochain message.", - "05985243eafadf37": "Passer à {substitute}", - "540418662b70d3d6": "Aucun modèle favori n'est libre ; cette conversation attend donc.", - "9da06299c78dfeeb": "Aucun modèle favori n'est libre ; {seat} attend donc.", "34cc63390ad793cc": "Choisir un fil", "8f12309ead62e38a": "Rechercher des fils ou des projets...", "2f664754d005d9a7": "Aucun fil actif trouvé.", @@ -3298,6 +3296,7 @@ "83915f0968cde2cc": "En cours", "b90e87f4b7125237": "Détails", "16dc67f5429d8bae": "Travail en arrière-plan", + "2188eee8f81b0f51": "Ouvrir le sous-agent", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} fichier modifié} other {{formattedCount} fichiers modifiés}}", "ec9e0be8ec693302": "Réduire tous les dossiers", "b791dd86f7991cc0": "Développer tous les dossiers", @@ -3433,6 +3432,7 @@ "890b662798f00182": "Aucune sortie.", "346e42415ac6d374": "Sortie antérieure non affichée", "1f096fe18e675975": "Plus de commandes de la zone de saisie", + "fea770db813e04c2": "Ce fil est archivé et ne peut pas recevoir de messages.", "c1faef1435412551": "Image jointe", "6bf404d068867eba": "La pièce jointe du brouillon risque de ne pas être conservée", "d34bfcfec9cf90ef": "Préparation", @@ -3456,6 +3456,7 @@ "249192edde7f4932": "Rechercher un langage", "71d8b593668d2106": "Aucun langage correspondant.", "326bc17df66a7f05": "Fichiers et dossiers", + "13087312bc6a0b45": "Pull requests", "0e83c3bf28f8958e": "Commandes", "75d18dac06f4f037": "Skills", "05340d7dfcc34edf": "App", @@ -3486,6 +3487,7 @@ "e778e4f446fdf873": "Votre prochain message démarre une nouvelle session", "0e2f2da4f2d94785": "L’agent ne verra pas les messages précédents de ce fil.", "e1189d2e582b008d": "Garder la session actuelle", + "d8bc550497c8992f": "Cette conversation se poursuit dans un fil lié", "461c9f865f2e9b92": "{option} activé", "f2aa17b5c620f2a4": "{option} désactivé", "f59314a884aae1ff": "Par défaut", @@ -3645,6 +3647,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "Réinitialisation {time}", + "36c5b0f937628c81": "Impossible de remplacer le modèle", + "d9ddfe9e0e5580ac": "Réessayez depuis l'avis.", + "4de04c6480ae979a": "Remplacé", + "0f5e895d047c45c3": "Cela s'applique à partir de votre prochain message.", "63fd02d55f0e4417": "Associer une machine à cet environnement", "4136b6bb217cc0b8": "Associer {target} à cet environnement", "0986757d94229f8f": "Choisir une machine…", @@ -3983,6 +3990,8 @@ "2e3999c63ac1c29b": "Choisir des modèles", "ea8ddb5bf4b0088e": "{count, plural, one {{models}, {count} autre} other {{models}, {count} autres}}", "9ae42b0f35599fb6": "Le sélecteur de modèle est désactivé", + "0148bc0d85adc872": "Impossible d’ouvrir un fil", + "983bff24bf6468a5": "Réessayez depuis le projet, ou ouvrez d’abord un fil.", "0109f6f6c7d80ebf": "Fil ouvert pour le corriger", "aaf800b30d189e52": "Le problème est dans le compositeur. Relisez-le, puis envoyez-le.", "fa63b0bc8215c3ec": "Ouvrir un fil pour corriger {provider}", @@ -4517,7 +4526,6 @@ } ], "a2aaca7ff8310186": "Ouvrir la discussion", - "2188eee8f81b0f51": "Ouvrir le sous-agent", "a3048aaa541b7744": "Activité", "4a3cbccb2beedeb0": "image", "36fb7b9046d2e288": "Appels d’outils", @@ -4572,11 +4580,6 @@ "275a97b4af3c6482": "Copier la commande, pour un terminal", "2b07985d23563374": "Reprise {time}", "a4b4e5eb6d313af9": "Réinitialisé {time}", - "c0c3aa756405c1df": "Réinitialisation {time}", - "36c5b0f937628c81": "Impossible de remplacer le modèle", - "d9ddfe9e0e5580ac": "Réessayez depuis l'avis.", - "4de04c6480ae979a": "Remplacé", - "0f5e895d047c45c3": "Cela s'applique à partir de votre prochain message.", "a7bfaa71c8b3030b": "Heure de réinitialisation indisponible ; réessayez manuellement", "77a70e5c3fd83ed8": "Limite d’utilisation ChatGPT atteinte", "c6c8d924b76b5a14": "Vous avez atteint la limite de votre espace de travail pour l’utilisation de votre forfait ChatGPT dans d’autres apps.", @@ -5220,6 +5223,23 @@ "c788c4526c6bb5e2": "Relier à nouveau…", "f073730a8ae2a088": "Lier un déploiement…", "60db6fe817814359": "Délier…", + "a7ce372eaf721f33": "{count, plural, one {Une question pour vous} other {{count} questions pour vous}}", + "e30c38e983fbfbd4": "{count, plural, one {Une modification à confirmer} other {{count} modifications à confirmer}}", + "d12dc4f286a5ebde": "En attente de votre validation. Approuvé par {names}.", + "72ff98954c0bece4": "En attente de votre validation", + "367af356d5c293e4": "Un plan à lire", + "c6afa6b1d57ca14f": "Livrables à accepter", + "acdb3e0fcf03dcb7": "Arrêtée, en attente de votre décision", + "1963c27ab94d5447": "En attente de votre envoi", + "69cfe0105013678e": "En pause jusqu'à votre reprise", + "d25661576338fcf0": "A besoin de vous", + "e46cc3cd38fe584d": "Pas encore envoyée, donc pas dans la file", + "6d88182ddaa764fc": "{place, selectordinal, one {{place}er dans la file} other {{place}e dans la file}}", + "2e76977cc10f2d80": "{busy} sur {cap} emplacements occupés", + "86452ddb15843ebf": "Occupent les emplacements", + "739d1096a032fd63": "En reprise", + "4aa8f34b88215991": "Reprise, tour {rounds}", + "b65966aa76a5cde6": "Ce moteur n'indique pas encore les emplacements ni qui les occupe. L'ordre est le sien.", "2f8f985531c0c748": "Fusionnée", "6161295dbb04b128": "L'hôte n'a pas signalé de commit de fusion.", "477a176670b421b9": "Déployée", @@ -5269,23 +5289,6 @@ "2ef682d5c194431e": "Le laisser de côté", "3d79bb50390a59bd": "Quand un siège est limité", "718bee1b985e1e6b": "un siège dont le modèle a atteint sa limite d'utilisation passe au premier modèle libre de vos Favoris, attend votre choix ou ne participe pas au message. Cela s'applique à partir de votre prochain message. Un modèle que vous avez choisi à la main pour un siège n'est jamais remplacé sans demander.", - "a7ce372eaf721f33": "{count, plural, one {Une question pour vous} other {{count} questions pour vous}}", - "e30c38e983fbfbd4": "{count, plural, one {Une modification à confirmer} other {{count} modifications à confirmer}}", - "d12dc4f286a5ebde": "En attente de votre validation. Approuvé par {names}.", - "72ff98954c0bece4": "En attente de votre validation", - "367af356d5c293e4": "Un plan à lire", - "c6afa6b1d57ca14f": "Livrables à accepter", - "acdb3e0fcf03dcb7": "Arrêtée, en attente de votre décision", - "1963c27ab94d5447": "En attente de votre envoi", - "69cfe0105013678e": "En pause jusqu'à votre reprise", - "d25661576338fcf0": "A besoin de vous", - "e46cc3cd38fe584d": "Pas encore envoyée, donc pas dans la file", - "6d88182ddaa764fc": "{place, selectordinal, one {{place}er dans la file} other {{place}e dans la file}}", - "2e76977cc10f2d80": "{busy} sur {cap} emplacements occupés", - "86452ddb15843ebf": "Occupent les emplacements", - "739d1096a032fd63": "En reprise", - "4aa8f34b88215991": "Reprise, tour {rounds}", - "b65966aa76a5cde6": "Ce moteur n'indique pas encore les emplacements ni qui les occupe. L'ordre est le sien.", "36fff6eb0fde020c": "Chaque siège enregistre son modèle et son niveau de raisonnement. La fenêtre de contexte est affichée à partir du modèle et n'est pas enregistrée : les réglages de siège du moteur n'ont pas encore de champ pour la fenêtre de contexte. Un niveau de raisonnement que le harness ou le modèle refuse est rejeté à l'enregistrement, avec la raison donnée par le moteur.", "49c97fc4187c3cc8": "La conversation de l'équipe commence quand cette tâche obtient un emplacement. Il n'y a encore rien à répondre.", "a1238a3f72d5dee8": "La conversation de l'équipe commence quand cette tâche est démarrée. Il n'y a encore rien à répondre.", @@ -5293,10 +5296,10 @@ "8c8efe9c6cffdf66": "Retour à la tâche n° {number}", "036a05240c1069e2": "Siège {seat}", "15dd178ef4fc2eb4": "Conversation du siège", + "ba2f576086976840": "Chargement de la conversation...", "3e18ff4c1fe25356": "T3 n'est pas en cours d'exécution, la conversation n'est donc pas disponible. Elle reprend quand T3 revient. Le moteur continue d'enregistrer et rien n'est annulé.", "5fa1f2d7e6dbf1b1": "Ce qu'affiche le centre", "aaff9d0e91559667": "Journal du moteur", - "ba2f576086976840": "Chargement de la conversation...", "f31a60920a4af0ef": "Cette conversation est en cours de chargement ou n'est pas disponible ici. Les faits de la tâche à côté restent valables.", "e0504620b693ba09": "Aucune conversation n'est encore liée à cette tâche. Le journal du moteur en tient lieu jusque-là.", "73c89408a5ad1402": "Où elle en est", @@ -6890,8 +6893,6 @@ "96ef3535e6352a4a": "Branche supprimée", "e3b55a78e79e96f0": "La question est dans la zone de saisie. Relisez-la, puis envoyez.", "672f08c2325b2730": "La {term, select, mr {merge request} cr {demande de modification} other {pull request}} est dans la zone de saisie. Tapez votre question, puis envoyez.", - "0148bc0d85adc872": "Impossible d’ouvrir un fil", - "983bff24bf6468a5": "Réessayez depuis le projet, ou ouvrez d’abord un fil.", "702cfd0c7fc3da87": "Question posée dans un fil", "0e3eede94227c151": "Préparation de l’extraction de la {term, select, mr {merge request} cr {demande de modification} other {pull request}}...", "f5fd3733da6e3556": "Impossible d’ouvrir un fil pour le checkout", @@ -8699,6 +8700,8 @@ "e9f7a62ecd609a46": "Dernier contact", "70bae47e93a2f207": "Afficher l’erreur complète", "30f7866bbe097337": "Modèles favoris, premier choix en premier", + "8101bb8e3c7427bf": "Monter {name}", + "bdedd5c7764a77a0": "Descendre {name}", "e4099af6d85770ff": "« {font} » n’est pas à chasse fixe", "a8448493d83279e2": "Le code et le terminal nécessitent une police à chasse fixe, la police actuelle a donc été conservée.", "e8622c39abe68f9d": "par défaut", @@ -9087,8 +9090,6 @@ "e09686bd65886c10": "Redémarrer et activer", "b8c82ba62b34f0e4": "Microphones, par ordre de préférence", "9fe08946d6dbd618": "Microphone enregistré", - "8101bb8e3c7427bf": "Monter {name}", - "bdedd5c7764a77a0": "Descendre {name}", "acae74b37388b9ba": "Oublier {name}", "e78e2b3c49707388": "Non connecté", "5d06c2a13becb19a": "Le test du microphone n’est pas disponible dans ce navigateur. Utilisez HTTPS ou l’app de bureau.", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index e3154a8cd2d8f..3db8946937392 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} は使用制限に達しました", "d4ad47339d670283": "{substitute} で継続中", "0b95a334090835d6": "{model} が使用制限に達したため、この会話はリンクされたスレッドで続きます。このスレッドは引き続き閲覧できます。", + "c6196d99000642b4": "スレッドを開く", + "552649eea02acd9e": "{seat} は {substitute} で動作します", + "9723cacb91446778": "{model} は使用制限に達しました。制限がリセットされると {seat} は元のモデルに戻ります。", + "4daef274c8249495": "{substitute} は空いています。切り替えると、この会話は要約付きの新しいリンクされたスレッドで続きます。", + "c8128bb2bd97de3c": "{substitute} は空いています。{seat} は次のメッセージからこれを使用します。", + "05985243eafadf37": "{substitute} に切り替える", + "540418662b70d3d6": "空いているお気に入りのモデルがないため、この会話は待機します。", + "9da06299c78dfeeb": "空いているお気に入りのモデルがないため、{seat} は待機します。", "8b876f2953338661": "リンク済みかどうかはまだ不明です", "b8c2bbba2243b429": "リンク済み", "4f1ab8a69f4a85e5": "このアプリはこのマシンに接続していません", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "標準", "f42c2a36b3507308": "{label} オン", "77cc5f738cb7d459": "{label} オフ", - "2159a4897d4a4d73": "{runtime, select, codex {{names} を使用するには、Codex CLI を {version} 以降に更新してください。} other {{names} を使用するには、{providerName} を {version} 以降に更新してください。}}", - "a0854b0f9604fc7b": "{runtime, select, codex {{names} を使用するには Codex CLI {version} 以降が必要ですが、このインストールで更新できる最新バージョンは {latestVersion} です。別の方法で Codex CLI をインストールするか、新しいリリースをお待ちください。} other {{names} を使用するには {providerName} {version} 以降が必要ですが、このインストールで更新できる最新バージョンは {latestVersion} です。別の方法で {providerName} をインストールするか、新しいリリースをお待ちください。}}", "aba3bb73ce212f0c": "{names} を使うには {providerName} {version} 以降が必要ですが、Homebrew の claude-code cask には {latestVersion} までしかありません。claude-code@latest cask に切り替えてください: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {{names} を使用するには Codex CLI {version} 以降が必要ですが、このインストールで更新できる最新バージョンは {latestVersion} です。別の方法で Codex CLI をインストールするか、新しいリリースをお待ちください。} other {{names} を使用するには {providerName} {version} 以降が必要ですが、このインストールで更新できる最新バージョンは {latestVersion} です。別の方法で {providerName} をインストールするか、新しいリリースをお待ちください。}}", + "2159a4897d4a4d73": "{runtime, select, codex {{names} を使用するには、Codex CLI を {version} 以降に更新してください。} other {{names} を使用するには、{providerName} を {version} 以降に更新してください。}}", "d887bea446534de5": "この環境には {host}/{repository} を読み取れるプロジェクトがありません。", "4e466d60e2f7736b": "プルリクエストの完全な URL を貼り付けてください。このスレッドには番号を解決するためのリポジトリがありません。", "302625058bacbe38": "完全な URL を貼り付けてください。このプロジェクトのホストには既知の {changeRequest} URL がありません。", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "それらのスレッドとアーカイブ済みのスレッドは T3 Code から削除されます。プロバイダーのセッションは保持されます。", "1a50cbc984f8fe1c": "アーカイブ済みのスレッドは T3 Code から削除されます。プロバイダーのセッションは保持されます。", "361080ce34c8e8ed": "{count, plural, other {ボードまたはエンジンが開始した会話 {count} 件はアーカイブされ、削除されません。}}すでにアーカイブ済みのボードおよびエンジンの会話は保持されます。", - "fea770db813e04c2": "このスレッドはアーカイブ済みのため、メッセージを受信できません。", "4f076ebbf1c8846e": "削除されるのはプロジェクトのエントリだけで、ディスク上のファイルは削除されません。", "19b8f3ad79efb9e1": "このグループ化されたプロジェクト内の他のエントリには影響しません。", "2207c69b042b2e37": "この操作は元に戻せません。", @@ -2385,10 +2392,9 @@ "ac0de2a59d9c8860": "デバイス", "1354df9fb7278843": "iOS シミュレーターまたは Android エミュレーターを表示します。", "fdcd9643e2e63b15": "このスレッドの作業を続けたまま、別の質問をします。", - "13087312bc6a0b45": "プルリクエスト", + "1944f04b75ddf26d": "{label} のスレッド", "f187680402450374": "タスクのエビデンス", "3a2e919ca921a60c": "デプロイ", - "1944f04b75ddf26d": "{label} のスレッド", "314cfeebf191ba0d": "承認が必要", "4e5b7363441a3831": "入力が必要", "97af4e74a5f95e5e": "実行中", @@ -2566,17 +2572,9 @@ }, " にインストール" ], + "b4b98a0287c282e2": "別のマシン上にあるため、このマシンのエージェントは読み取れません。削除するか、元に戻してから送信してください。", "5bbac0e5afeec779": "現在のスレッド", "33c7e68fca089036": "スレッド、{title}", - "b4b98a0287c282e2": "別のマシン上にあるため、このマシンのエージェントは読み取れません。削除するか、元に戻してから送信してください。", - "c6196d99000642b4": "スレッドを開く", - "552649eea02acd9e": "{seat} は {substitute} で動作します", - "9723cacb91446778": "{model} は使用制限に達しました。制限がリセットされると {seat} は元のモデルに戻ります。", - "4daef274c8249495": "{substitute} は空いています。切り替えると、この会話は要約付きの新しいリンクされたスレッドで続きます。", - "c8128bb2bd97de3c": "{substitute} は空いています。{seat} は次のメッセージからこれを使用します。", - "05985243eafadf37": "{substitute} に切り替える", - "540418662b70d3d6": "空いているお気に入りのモデルがないため、この会話は待機します。", - "9da06299c78dfeeb": "空いているお気に入りのモデルがないため、{seat} は待機します。", "34cc63390ad793cc": "スレッドを選択", "8f12309ead62e38a": "スレッドまたはプロジェクトを検索...", "2f664754d005d9a7": "アクティブなスレッドが見つかりません。", @@ -3296,6 +3294,7 @@ "83915f0968cde2cc": "実行中", "b90e87f4b7125237": "詳細", "16dc67f5429d8bae": "バックグラウンドの作業", + "2188eee8f81b0f51": "サブエージェントを開く", "3b03fc47eba632b4": "{count, plural, other {{formattedCount} 個の変更されたファイル}}", "ec9e0be8ec693302": "すべてのフォルダーを折りたたむ", "b791dd86f7991cc0": "すべてのフォルダーを展開", @@ -3429,6 +3428,7 @@ "890b662798f00182": "出力はありません。", "346e42415ac6d374": "以前の出力は表示されていません", "1f096fe18e675975": "その他の入力欄のコントロール", + "fea770db813e04c2": "このスレッドはアーカイブ済みのため、メッセージを受信できません。", "c1faef1435412551": "画像の添付ファイル", "6bf404d068867eba": "下書きの添付ファイルは保持されない可能性があります", "d34bfcfec9cf90ef": "準備中", @@ -3452,6 +3452,7 @@ "249192edde7f4932": "言語を検索", "71d8b593668d2106": "一致する言語はありません。", "326bc17df66a7f05": "ファイルとフォルダー", + "13087312bc6a0b45": "プルリクエスト", "0e83c3bf28f8958e": "コマンド", "75d18dac06f4f037": "スキル", "05340d7dfcc34edf": "アプリ", @@ -3482,6 +3483,7 @@ "e778e4f446fdf873": "次のメッセージで新しいセッションが始まります", "0e2f2da4f2d94785": "エージェントはこのスレッドの以前のメッセージを参照できません。", "e1189d2e582b008d": "現在のセッションを維持", + "d8bc550497c8992f": "この会話はリンクされたスレッドで続いています", "461c9f865f2e9b92": "{option} オン", "f2aa17b5c620f2a4": "{option} オフ", "f59314a884aae1ff": "デフォルト", @@ -3641,6 +3643,11 @@ }, " を読み込めません" ], + "c0c3aa756405c1df": "{time} にリセット", + "36c5b0f937628c81": "モデルを切り替えられませんでした", + "d9ddfe9e0e5580ac": "通知からもう一度お試しください。", + "4de04c6480ae979a": "切り替えました", + "0f5e895d047c45c3": "次のメッセージから適用されます。", "63fd02d55f0e4417": "この環境にマシンをリンク", "4136b6bb217cc0b8": "この環境に {target} をリンク", "0986757d94229f8f": "マシンを選択…", @@ -3973,6 +3980,8 @@ "2e3999c63ac1c29b": "モデルを選択", "ea8ddb5bf4b0088e": "{count, plural, other {{models}、他 {count} 件}}", "9ae42b0f35599fb6": "モデルの選択は無効になっています", + "0148bc0d85adc872": "スレッドを開けませんでした", + "983bff24bf6468a5": "プロジェクトからもう一度試すか、先にスレッドを開いてください。", "0109f6f6c7d80ebf": "修正用のスレッドを開きました", "aaf800b30d189e52": "問題がコンポーザーに入っています。確認してから送信してください。", "fa63b0bc8215c3ec": "{provider} を修正するスレッドを開く", @@ -4507,7 +4516,6 @@ } ], "a2aaca7ff8310186": "チャットを開く", - "2188eee8f81b0f51": "サブエージェントを開く", "a3048aaa541b7744": "アクティビティ", "4a3cbccb2beedeb0": "画像", "36fb7b9046d2e288": "ツール呼び出し", @@ -4562,11 +4570,6 @@ "275a97b4af3c6482": "ターミナル用のコマンドをコピー", "2b07985d23563374": "{time} に再開", "a4b4e5eb6d313af9": "{time} にリセット済み", - "c0c3aa756405c1df": "{time} にリセット", - "36c5b0f937628c81": "モデルを切り替えられませんでした", - "d9ddfe9e0e5580ac": "通知からもう一度お試しください。", - "4de04c6480ae979a": "切り替えました", - "0f5e895d047c45c3": "次のメッセージから適用されます。", "a7bfaa71c8b3030b": "リセット時刻が不明です。手動で再試行してください", "77a70e5c3fd83ed8": "ChatGPT の使用量の上限に達しました", "c6c8d924b76b5a14": "ChatGPT プランを他のアプリで使用する際の、ワークスペースの上限に達しました。", @@ -5206,6 +5209,23 @@ "c788c4526c6bb5e2": "再リンク…", "f073730a8ae2a088": "デプロイをリンク…", "60db6fe817814359": "リンク解除…", + "a7ce372eaf721f33": "{count, plural, other {あなたへの質問が{count}件}}", + "e30c38e983fbfbd4": "{count, plural, other {確認待ちの変更が{count}件}}", + "d12dc4f286a5ebde": "あなたの承認待ちです。{names} が承認済みです。", + "72ff98954c0bece4": "あなたの承認待ち", + "367af356d5c293e4": "読むべき計画", + "c6afa6b1d57ca14f": "受け入れ待ちの成果物", + "acdb3e0fcf03dcb7": "あなたの判断待ちで停止中", + "1963c27ab94d5447": "あなたの送信待ち", + "69cfe0105013678e": "再開するまで一時停止中", + "d25661576338fcf0": "対応が必要です", + "e46cc3cd38fe584d": "未送信のため、順番待ちには入っていません", + "6d88182ddaa764fc": "順番待ちの{place}番目", + "2e76977cc10f2d80": "{cap} 枠中 {busy} 枠が使用中", + "86452ddb15843ebf": "枠を使用中", + "739d1096a032fd63": "手直し中", + "4aa8f34b88215991": "手直し {rounds} 回目", + "b65966aa76a5cde6": "このエンジンは、まだ枠数や使用中のタスクを報告しません。順序はエンジンのものです。", "2f8f985531c0c748": "マージ済み", "6161295dbb04b128": "ホストはマージコミットを報告していません。", "477a176670b421b9": "デプロイ済み", @@ -5255,23 +5275,6 @@ "2ef682d5c194431e": "参加させない", "3d79bb50390a59bd": "席が制限に達したとき", "718bee1b985e1e6b": "モデルが使用制限に達した席は、お気に入りの中で最初に空いているモデルに切り替わるか、あなたの選択を待つか、そのメッセージには参加しません。次のメッセージから適用されます。あなたが手動で選んだ席のモデルは、確認なしに切り替わることはありません。", - "a7ce372eaf721f33": "{count, plural, other {あなたへの質問が{count}件}}", - "e30c38e983fbfbd4": "{count, plural, other {確認待ちの変更が{count}件}}", - "d12dc4f286a5ebde": "あなたの承認待ちです。{names} が承認済みです。", - "72ff98954c0bece4": "あなたの承認待ち", - "367af356d5c293e4": "読むべき計画", - "c6afa6b1d57ca14f": "受け入れ待ちの成果物", - "acdb3e0fcf03dcb7": "あなたの判断待ちで停止中", - "1963c27ab94d5447": "あなたの送信待ち", - "69cfe0105013678e": "再開するまで一時停止中", - "d25661576338fcf0": "対応が必要です", - "e46cc3cd38fe584d": "未送信のため、順番待ちには入っていません", - "6d88182ddaa764fc": "順番待ちの{place}番目", - "2e76977cc10f2d80": "{cap} 枠中 {busy} 枠が使用中", - "86452ddb15843ebf": "枠を使用中", - "739d1096a032fd63": "手直し中", - "4aa8f34b88215991": "手直し {rounds} 回目", - "b65966aa76a5cde6": "このエンジンは、まだ枠数や使用中のタスクを報告しません。順序はエンジンのものです。", "36fff6eb0fde020c": "各シートはモデルと推論レベルを保存します。コンテキストウィンドウはモデルから表示されるだけで保存されません。エンジンのシート設定にはまだコンテキストウィンドウの項目がありません。ハーネスまたはモデルが受け付けない推論レベルは、保存時にエンジンの理由とともに拒否されます。", "49c97fc4187c3cc8": "このタスクに枠が割り当てられると、チームの会話が始まります。今はまだ返信するものはありません。", "a1238a3f72d5dee8": "このタスクが開始されると、チームの会話が始まります。今はまだ返信するものはありません。", @@ -5279,10 +5282,10 @@ "8c8efe9c6cffdf66": "タスク #{number} に戻る", "036a05240c1069e2": "シート {seat}", "15dd178ef4fc2eb4": "シートの会話", + "ba2f576086976840": "会話を読み込み中...", "3e18ff4c1fe25356": "T3 が実行されていないため、会話は利用できません。T3 が戻ると再開します。エンジンは記録を続け、何もキャンセルされません。", "5fa1f2d7e6dbf1b1": "中央に表示する内容", "aaff9d0e91559667": "エンジンログ", - "ba2f576086976840": "会話を読み込み中...", "f31a60920a4af0ef": "この会話は読み込み中か、ここでは利用できません。隣のタスクの事実は引き続き有効です。", "e0504620b693ba09": "このタスクにはまだ会話が紐づいていません。紐づくまではエンジンのログが代わりを務めます。", "73c89408a5ad1402": "現在の状況", @@ -6859,8 +6862,6 @@ "96ef3535e6352a4a": "ブランチを削除しました", "e3b55a78e79e96f0": "質問は入力欄にあります。内容を確認してから送信してください。", "672f08c2325b2730": "{term, select, mr {マージリクエストが入力欄に追加されました。質問を入力して送信してください。} cr {変更リクエストが入力欄に追加されました。質問を入力して送信してください。} other {プルリクエストが入力欄に追加されました。質問を入力して送信してください。}}", - "0148bc0d85adc872": "スレッドを開けませんでした", - "983bff24bf6468a5": "プロジェクトからもう一度試すか、先にスレッドを開いてください。", "702cfd0c7fc3da87": "スレッドで質問しました", "0e3eede94227c151": "{term, select, mr {マージリクエストのチェックアウトを準備しています...} cr {変更リクエストのチェックアウトを準備しています...} other {プルリクエストのチェックアウトを準備しています...}}", "f5fd3733da6e3556": "チェックアウト用のスレッドを開けませんでした", @@ -8656,6 +8657,8 @@ "e9f7a62ecd609a46": "最終到達", "70bae47e93a2f207": "エラー全体を表示", "30f7866bbe097337": "お気に入りのモデル(優先順)", + "8101bb8e3c7427bf": "{name} を上へ移動", + "bdedd5c7764a77a0": "{name} を下へ移動", "e4099af6d85770ff": "「{font}」は等幅フォントではありません", "a8448493d83279e2": "コードとターミナルには固定幅フォントが必要なため、現在のフォントを維持しました。", "e8622c39abe68f9d": "デフォルト", @@ -9043,8 +9046,6 @@ "e09686bd65886c10": "再起動してオンにする", "b8c82ba62b34f0e4": "マイク (優先順)", "9fe08946d6dbd618": "保存済みのマイク", - "8101bb8e3c7427bf": "{name} を上へ移動", - "bdedd5c7764a77a0": "{name} を下へ移動", "acae74b37388b9ba": "{name} を削除", "e78e2b3c49707388": "未接続", "5d06c2a13becb19a": "このブラウザーではマイクのテストを利用できません。HTTPS またはデスクトップアプリを使用してください。", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index aa3f9ce42a2a1..775c54ac8aaa8 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model}이(가) 사용 한도에 도달했습니다", "d4ad47339d670283": "{substitute}(으)로 계속됨", "0b95a334090835d6": "{model}이(가) 사용 한도에 도달하여 이 대화는 연결된 스레드에서 계속됩니다. 이 스레드는 계속 읽을 수 있습니다.", + "c6196d99000642b4": "스레드 열기", + "552649eea02acd9e": "{seat}은(는) {substitute}(으)로 실행됩니다", + "9723cacb91446778": "{model}이(가) 사용 한도에 도달했습니다. 한도가 재설정되면 {seat}은(는) 원래 모델로 돌아갑니다.", + "4daef274c8249495": "{substitute}을(를) 사용할 수 있습니다. 교체하면 이 대화는 요약과 함께 새 연결 스레드에서 계속됩니다.", + "c8128bb2bd97de3c": "{substitute}을(를) 사용할 수 있습니다. {seat}은(는) 다음 메시지부터 이를 사용합니다.", + "05985243eafadf37": "{substitute}(으)로 교체", + "540418662b70d3d6": "사용 가능한 즐겨찾는 모델이 없어 이 대화는 대기합니다.", + "9da06299c78dfeeb": "사용 가능한 즐겨찾는 모델이 없어 {seat}은(는) 대기합니다.", "8b876f2953338661": "연결되어 있는지 아직 알 수 없습니다", "b8c2bbba2243b429": "이미 연결됨", "4f1ab8a69f4a85e5": "이 앱이 해당 머신에 연결되어 있지 않습니다", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "보통", "f42c2a36b3507308": "{label} 켜짐", "77cc5f738cb7d459": "{label} 꺼짐", - "2159a4897d4a4d73": "{runtime, select, codex {{names}을(를) 사용하려면 Codex CLI를 {version} 이상으로 업데이트하세요.} other {{names}을(를) 사용하려면 {providerName}을(를) {version} 이상으로 업데이트하세요.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {{names}을(를) 사용하려면 Codex CLI {version} 이상이 필요하지만, 이 설치에서 업데이트할 수 있는 최신 버전은 {latestVersion}입니다. 다른 방법으로 Codex CLI를 설치하거나 새 릴리스를 기다리세요.} other {{names}을(를) 사용하려면 {providerName} {version} 이상이 필요하지만, 이 설치에서 업데이트할 수 있는 최신 버전은 {latestVersion}입니다. 다른 방법으로 {providerName}을(를) 설치하거나 새 릴리스를 기다리세요.}}", "aba3bb73ce212f0c": "{names}을(를) 사용하려면 {providerName} {version} 이상이 필요하지만 Homebrew claude-code cask에는 {latestVersion}까지만 있습니다. claude-code@latest cask로 전환하세요: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {{names}을(를) 사용하려면 Codex CLI {version} 이상이 필요하지만, 이 설치에서 업데이트할 수 있는 최신 버전은 {latestVersion}입니다. 다른 방법으로 Codex CLI를 설치하거나 새 릴리스를 기다리세요.} other {{names}을(를) 사용하려면 {providerName} {version} 이상이 필요하지만, 이 설치에서 업데이트할 수 있는 최신 버전은 {latestVersion}입니다. 다른 방법으로 {providerName}을(를) 설치하거나 새 릴리스를 기다리세요.}}", + "2159a4897d4a4d73": "{runtime, select, codex {{names}을(를) 사용하려면 Codex CLI를 {version} 이상으로 업데이트하세요.} other {{names}을(를) 사용하려면 {providerName}을(를) {version} 이상으로 업데이트하세요.}}", "d887bea446534de5": "이 환경에는 {host}/{repository}을(를) 읽을 수 있는 프로젝트가 없습니다.", "4e466d60e2f7736b": "전체 풀 리퀘스트 URL을 붙여 넣으세요. 이 스레드에는 번호를 확인할 저장소가 없습니다.", "302625058bacbe38": "전체 URL을 붙여 넣으세요. 이 프로젝트의 호스트에는 알려진 {changeRequest} URL이 없습니다.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "해당 스레드와 보관된 스레드는 T3 Code에서 삭제됩니다. 제공자 세션은 유지됩니다.", "1a50cbc984f8fe1c": "보관된 스레드는 T3 Code에서 삭제됩니다. 제공자 세션은 유지됩니다.", "361080ce34c8e8ed": "{count, plural, other {보드 또는 엔진이 시작한 대화 {count}개는 삭제되지 않고 보관됩니다.}} 이미 보관된 보드 및 엔진 대화는 그대로 유지됩니다.", - "fea770db813e04c2": "이 스레드는 보관되어 메시지를 받을 수 없습니다.", "4f076ebbf1c8846e": "디스크의 파일이 아닌 프로젝트 항목만 제거합니다.", "19b8f3ad79efb9e1": "이 그룹화된 프로젝트의 다른 항목은 영향을 받지 않습니다.", "2207c69b042b2e37": "이 작업은 되돌릴 수 없습니다.", @@ -2386,10 +2393,9 @@ "ac0de2a59d9c8860": "기기", "1354df9fb7278843": "iOS 시뮬레이터나 Android 에뮬레이터를 봅니다.", "fdcd9643e2e63b15": "이 스레드가 계속 작업하는 동안 곁가지 질문을 하세요.", - "13087312bc6a0b45": "풀 리퀘스트", + "1944f04b75ddf26d": "{label}의 스레드", "f187680402450374": "작업 증거", "3a2e919ca921a60c": "배포", - "1944f04b75ddf26d": "{label}의 스레드", "314cfeebf191ba0d": "승인 필요", "4e5b7363441a3831": "입력 필요", "97af4e74a5f95e5e": "실행 중", @@ -2567,17 +2573,9 @@ }, "에 설치" ], + "b4b98a0287c282e2": "다른 머신에 있어 이 머신의 에이전트가 읽을 수 없습니다. 제거하거나 원래대로 전환한 후 보내세요.", "5bbac0e5afeec779": "현재 스레드", "33c7e68fca089036": "스레드, {title}", - "b4b98a0287c282e2": "다른 머신에 있어 이 머신의 에이전트가 읽을 수 없습니다. 제거하거나 원래대로 전환한 후 보내세요.", - "c6196d99000642b4": "스레드 열기", - "552649eea02acd9e": "{seat}은(는) {substitute}(으)로 실행됩니다", - "9723cacb91446778": "{model}이(가) 사용 한도에 도달했습니다. 한도가 재설정되면 {seat}은(는) 원래 모델로 돌아갑니다.", - "4daef274c8249495": "{substitute}을(를) 사용할 수 있습니다. 교체하면 이 대화는 요약과 함께 새 연결 스레드에서 계속됩니다.", - "c8128bb2bd97de3c": "{substitute}을(를) 사용할 수 있습니다. {seat}은(는) 다음 메시지부터 이를 사용합니다.", - "05985243eafadf37": "{substitute}(으)로 교체", - "540418662b70d3d6": "사용 가능한 즐겨찾는 모델이 없어 이 대화는 대기합니다.", - "9da06299c78dfeeb": "사용 가능한 즐겨찾는 모델이 없어 {seat}은(는) 대기합니다.", "34cc63390ad793cc": "스레드 선택", "8f12309ead62e38a": "스레드 또는 프로젝트 검색...", "2f664754d005d9a7": "활성 스레드를 찾을 수 없습니다.", @@ -3297,6 +3295,7 @@ "83915f0968cde2cc": "실행 중", "b90e87f4b7125237": "세부 정보", "16dc67f5429d8bae": "백그라운드 작업", + "2188eee8f81b0f51": "서브에이전트 열기", "3b03fc47eba632b4": "{count, plural, other {변경된 파일 {formattedCount}개}}", "ec9e0be8ec693302": "모든 폴더 접기", "b791dd86f7991cc0": "모든 폴더 펼치기", @@ -3429,6 +3428,7 @@ "890b662798f00182": "출력이 없습니다.", "346e42415ac6d374": "이전 출력은 표시되지 않음", "1f096fe18e675975": "입력창 컨트롤 더 보기", + "fea770db813e04c2": "이 스레드는 보관되어 메시지를 받을 수 없습니다.", "c1faef1435412551": "이미지 첨부 파일", "6bf404d068867eba": "초안 첨부 파일이 유지되지 않을 수 있음", "d34bfcfec9cf90ef": "준비 중", @@ -3452,6 +3452,7 @@ "249192edde7f4932": "언어 검색", "71d8b593668d2106": "일치하는 언어가 없습니다.", "326bc17df66a7f05": "파일 및 폴더", + "13087312bc6a0b45": "풀 리퀘스트", "0e83c3bf28f8958e": "명령", "75d18dac06f4f037": "스킬", "05340d7dfcc34edf": "앱", @@ -3482,6 +3483,7 @@ "e778e4f446fdf873": "다음 메시지부터 새 세션이 시작됩니다", "0e2f2da4f2d94785": "에이전트는 이 스레드의 이전 메시지를 볼 수 없습니다.", "e1189d2e582b008d": "현재 세션 유지", + "d8bc550497c8992f": "이 대화는 연결된 스레드에서 계속됩니다", "461c9f865f2e9b92": "{option} 켜짐", "f2aa17b5c620f2a4": "{option} 꺼짐", "f59314a884aae1ff": "기본값", @@ -3641,6 +3643,11 @@ }, "을(를) 불러올 수 없습니다" ], + "c0c3aa756405c1df": "{time}에 초기화", + "36c5b0f937628c81": "모델을 교체하지 못했습니다", + "d9ddfe9e0e5580ac": "알림에서 다시 시도하세요.", + "4de04c6480ae979a": "교체됨", + "0f5e895d047c45c3": "다음 메시지부터 적용됩니다.", "63fd02d55f0e4417": "이 환경에 머신 연결", "4136b6bb217cc0b8": "이 환경에 {target} 연결", "0986757d94229f8f": "머신 선택…", @@ -3971,6 +3978,8 @@ "2e3999c63ac1c29b": "모델 선택", "ea8ddb5bf4b0088e": "{count, plural, other {{models} 외 {count}개}}", "9ae42b0f35599fb6": "모델 선택기가 비활성화되어 있습니다", + "0148bc0d85adc872": "스레드를 열 수 없습니다", + "983bff24bf6468a5": "프로젝트에서 다시 시도하거나 먼저 스레드를 여세요.", "0109f6f6c7d80ebf": "해결할 스레드를 열었습니다", "aaf800b30d189e52": "문제가 작성기에 들어 있습니다. 확인한 뒤 보내세요.", "fa63b0bc8215c3ec": "{provider} 문제를 해결할 스레드 열기", @@ -4504,7 +4513,6 @@ } ], "a2aaca7ff8310186": "채팅 열기", - "2188eee8f81b0f51": "서브에이전트 열기", "a3048aaa541b7744": "활동", "4a3cbccb2beedeb0": "이미지", "36fb7b9046d2e288": "도구 호출", @@ -4559,11 +4567,6 @@ "275a97b4af3c6482": "터미널용 명령 복사", "2b07985d23563374": "{time}에 재개", "a4b4e5eb6d313af9": "{time}에 초기화됨", - "c0c3aa756405c1df": "{time}에 초기화", - "36c5b0f937628c81": "모델을 교체하지 못했습니다", - "d9ddfe9e0e5580ac": "알림에서 다시 시도하세요.", - "4de04c6480ae979a": "교체됨", - "0f5e895d047c45c3": "다음 메시지부터 적용됩니다.", "a7bfaa71c8b3030b": "초기화 시간을 알 수 없습니다. 직접 다시 시도하세요", "77a70e5c3fd83ed8": "ChatGPT 사용량 한도에 도달함", "c6c8d924b76b5a14": "다른 앱에서 ChatGPT 요금제를 사용할 수 있는 작업 공간 한도에 도달했습니다.", @@ -5203,6 +5206,23 @@ "c788c4526c6bb5e2": "다시 연결…", "f073730a8ae2a088": "배포 연결…", "60db6fe817814359": "연결 해제…", + "a7ce372eaf721f33": "{count, plural, other {질문 {count}개가 답변을 기다리고 있습니다}}", + "e30c38e983fbfbd4": "{count, plural, other {확인할 변경 사항 {count}개}}", + "d12dc4f286a5ebde": "내 승인을 기다리는 중입니다. {names} 님이 승인했습니다.", + "72ff98954c0bece4": "내 승인 대기 중", + "367af356d5c293e4": "읽어야 할 계획", + "c6afa6b1d57ca14f": "수락할 산출물", + "acdb3e0fcf03dcb7": "내 결정을 기다리며 중단됨", + "1963c27ab94d5447": "내가 제출하기를 기다리는 중", + "69cfe0105013678e": "다시 시작할 때까지 일시 중지됨", + "d25661576338fcf0": "확인이 필요합니다", + "e46cc3cd38fe584d": "아직 제출되지 않아 대기열에 없습니다", + "6d88182ddaa764fc": "대기열 {place}번째", + "2e76977cc10f2d80": "{cap}개 중 {busy}개 슬롯 사용 중", + "86452ddb15843ebf": "슬롯을 사용 중인 작업", + "739d1096a032fd63": "재작업 중", + "4aa8f34b88215991": "재작업 {rounds}회차", + "b65966aa76a5cde6": "이 엔진은 아직 슬롯과 이를 사용 중인 작업을 보고하지 않습니다. 순서는 엔진이 정한 것입니다.", "2f8f985531c0c748": "병합됨", "6161295dbb04b128": "호스트가 병합 커밋을 보고하지 않았습니다.", "477a176670b421b9": "배포됨", @@ -5252,23 +5272,6 @@ "2ef682d5c194431e": "제외하기", "3d79bb50390a59bd": "자리가 한도에 도달했을 때", "718bee1b985e1e6b": "모델이 사용 한도에 도달한 자리는 즐겨찾기에서 처음으로 사용 가능한 모델로 옮기거나, 선택을 기다리거나, 해당 메시지에서 빠집니다. 다음 메시지부터 적용됩니다. 자리에 직접 고른 모델은 묻지 않고 교체되지 않습니다.", - "a7ce372eaf721f33": "{count, plural, other {질문 {count}개가 답변을 기다리고 있습니다}}", - "e30c38e983fbfbd4": "{count, plural, other {확인할 변경 사항 {count}개}}", - "d12dc4f286a5ebde": "내 승인을 기다리는 중입니다. {names} 님이 승인했습니다.", - "72ff98954c0bece4": "내 승인 대기 중", - "367af356d5c293e4": "읽어야 할 계획", - "c6afa6b1d57ca14f": "수락할 산출물", - "acdb3e0fcf03dcb7": "내 결정을 기다리며 중단됨", - "1963c27ab94d5447": "내가 제출하기를 기다리는 중", - "69cfe0105013678e": "다시 시작할 때까지 일시 중지됨", - "d25661576338fcf0": "확인이 필요합니다", - "e46cc3cd38fe584d": "아직 제출되지 않아 대기열에 없습니다", - "6d88182ddaa764fc": "대기열 {place}번째", - "2e76977cc10f2d80": "{cap}개 중 {busy}개 슬롯 사용 중", - "86452ddb15843ebf": "슬롯을 사용 중인 작업", - "739d1096a032fd63": "재작업 중", - "4aa8f34b88215991": "재작업 {rounds}회차", - "b65966aa76a5cde6": "이 엔진은 아직 슬롯과 이를 사용 중인 작업을 보고하지 않습니다. 순서는 엔진이 정한 것입니다.", "36fff6eb0fde020c": "각 좌석은 모델과 추론 수준을 저장합니다. 컨텍스트 창은 모델에서 표시될 뿐 저장되지 않습니다. 엔진의 좌석 설정에는 아직 컨텍스트 창 항목이 없습니다. 하네스나 모델이 거부하는 추론 수준은 저장할 때 엔진의 사유와 함께 거부됩니다.", "49c97fc4187c3cc8": "이 작업이 슬롯을 받으면 팀 대화가 시작됩니다. 아직 답할 내용이 없습니다.", "a1238a3f72d5dee8": "이 작업이 시작되면 팀 대화가 시작됩니다. 아직 답할 내용이 없습니다.", @@ -5276,10 +5279,10 @@ "8c8efe9c6cffdf66": "작업 #{number}(으)로 돌아가기", "036a05240c1069e2": "좌석 {seat}", "15dd178ef4fc2eb4": "좌석 대화", + "ba2f576086976840": "대화를 불러오는 중...", "3e18ff4c1fe25356": "T3가 실행 중이 아니므로 대화를 사용할 수 없습니다. T3가 돌아오면 다시 이어집니다. 엔진은 계속 기록하며 취소되는 것은 없습니다.", "5fa1f2d7e6dbf1b1": "가운데에 표시되는 내용", "aaff9d0e91559667": "엔진 로그", - "ba2f576086976840": "대화를 불러오는 중...", "f31a60920a4af0ef": "이 대화를 불러오는 중이거나 여기서는 사용할 수 없습니다. 옆에 있는 작업의 사실 정보는 그대로 유효합니다.", "e0504620b693ba09": "이 작업에 연결된 대화가 아직 없습니다. 연결될 때까지는 엔진 로그가 대신합니다.", "73c89408a5ad1402": "현재 상태", @@ -6863,8 +6866,6 @@ "96ef3535e6352a4a": "브랜치 삭제됨", "e3b55a78e79e96f0": "질문이 입력창에 들어 있습니다. 검토한 후 보내세요.", "672f08c2325b2730": "{term, select, mr {병합 요청이} cr {변경 요청이} other {풀 리퀘스트가}} 입력창에 들어 있습니다. 질문을 입력한 후 보내세요.", - "0148bc0d85adc872": "스레드를 열 수 없습니다", - "983bff24bf6468a5": "프로젝트에서 다시 시도하거나 먼저 스레드를 여세요.", "702cfd0c7fc3da87": "스레드에서 질문함", "0e3eede94227c151": "{term, select, mr {병합 요청} cr {변경 요청} other {풀 리퀘스트}} 체크아웃 준비 중...", "f5fd3733da6e3556": "체크아웃용 스레드를 열 수 없습니다", @@ -8659,6 +8660,8 @@ "e9f7a62ecd609a46": "마지막 연결", "70bae47e93a2f207": "전체 오류 표시", "30f7866bbe097337": "즐겨찾는 모델, 우선순위 순", + "8101bb8e3c7427bf": "{name} 위로 이동", + "bdedd5c7764a77a0": "{name} 아래로 이동", "e4099af6d85770ff": "\"{font}\"은(는) 고정폭 글꼴이 아닙니다", "a8448493d83279e2": "코드와 터미널에는 고정폭 글꼴이 필요하므로 현재 글꼴을 유지했습니다.", "e8622c39abe68f9d": "기본값", @@ -9046,8 +9049,6 @@ "e09686bd65886c10": "다시 시작하고 켜기", "b8c82ba62b34f0e4": "마이크, 우선순위 순", "9fe08946d6dbd618": "저장된 마이크", - "8101bb8e3c7427bf": "{name} 위로 이동", - "bdedd5c7764a77a0": "{name} 아래로 이동", "acae74b37388b9ba": "{name} 삭제", "e78e2b3c49707388": "연결되지 않음", "5d06c2a13becb19a": "이 브라우저에서는 마이크 테스트를 사용할 수 없습니다. HTTPS 또는 데스크톱 앱을 사용하세요.", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 179ca51e936a8..eebbcaf8f533e 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} atingiu o limite de uso", "d4ad47339d670283": "Continuou em {substitute}", "0b95a334090835d6": "{model} atingiu o limite de uso, então esta conversa continua em uma thread vinculada. Esta continua legível.", + "c6196d99000642b4": "Abrir thread", + "552649eea02acd9e": "{seat} roda em {substitute}", + "9723cacb91446778": "{model} atingiu o limite de uso. {seat} volta a ele quando o limite for redefinido.", + "4daef274c8249495": "{substitute} está livre. Ao trocar, esta conversa continua em uma nova thread vinculada com um resumo.", + "c8128bb2bd97de3c": "{substitute} está livre. {seat} passa a usá-lo a partir da sua próxima mensagem.", + "05985243eafadf37": "Trocar para {substitute}", + "540418662b70d3d6": "Nenhum modelo favorito está livre, então esta conversa aguarda.", + "9da06299c78dfeeb": "Nenhum modelo favorito está livre, então {seat} aguarda.", "8b876f2953338661": "Ainda não se sabe se está vinculada", "b8c2bbba2243b429": "Já vinculada", "4f1ab8a69f4a85e5": "Este app não está conectado a ela", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Normal", "f42c2a36b3507308": "{label} ativado", "77cc5f738cb7d459": "{label} desativado", - "2159a4897d4a4d73": "{runtime, select, codex {Atualize a CLI do Codex para {version} ou mais recente para usar {names}.} other {Atualize o {providerName} para {version} ou mais recente para usar {names}.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {Usar {names} requer a CLI do Codex {version} ou mais recente, mas esta instalação só pode ser atualizada até {latestVersion}. Instale a CLI do Codex de outra forma ou aguarde uma versão mais recente.} other {Usar {names} requer {providerName} {version} ou mais recente, mas esta instalação só pode ser atualizada até {latestVersion}. Instale {providerName} de outra forma ou aguarde uma versão mais recente.}}", "aba3bb73ce212f0c": "Usar {names} requer {providerName} {version} ou mais recente, mas o cask claude-code do Homebrew só tem {latestVersion}. Mude para o cask claude-code@latest: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {Usar {names} requer a CLI do Codex {version} ou mais recente, mas esta instalação só pode ser atualizada até {latestVersion}. Instale a CLI do Codex de outra forma ou aguarde uma versão mais recente.} other {Usar {names} requer {providerName} {version} ou mais recente, mas esta instalação só pode ser atualizada até {latestVersion}. Instale {providerName} de outra forma ou aguarde uma versão mais recente.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Atualize a CLI do Codex para {version} ou mais recente para usar {names}.} other {Atualize o {providerName} para {version} ou mais recente para usar {names}.}}", "d887bea446534de5": "Nenhum projeto neste ambiente consegue ler {host}/{repository}.", "4e466d60e2f7736b": "Cole a URL completa do pull request; esta thread não tem repositório para resolver o número.", "302625058bacbe38": "Cole uma URL completa; o host deste projeto não tem uma URL de {changeRequest} conhecida.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "Essas threads e as threads arquivadas são excluídas do T3 Code. As sessões do provedor são mantidas.", "1a50cbc984f8fe1c": "As threads arquivadas são excluídas do T3 Code. As sessões do provedor são mantidas.", "361080ce34c8e8ed": "{count, plural, one {{count} conversa iniciada por um quadro ou pelo motor é arquivada, não excluída.} other {{count} conversas iniciadas por um quadro ou pelo motor são arquivadas, não excluídas.}} As conversas de quadros e do motor já arquivadas são mantidas.", - "fea770db813e04c2": "Esta thread está arquivada e não pode receber mensagens.", "4f076ebbf1c8846e": "Isto remove apenas as entradas do projeto, não os arquivos no disco.", "19b8f3ad79efb9e1": "As outras entradas deste projeto agrupado não são afetadas.", "2207c69b042b2e37": "Esta ação não pode ser desfeita.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Dispositivo", "1354df9fb7278843": "Acompanhe um iOS Simulator ou Android Emulator.", "fdcd9643e2e63b15": "Faça uma pergunta paralela enquanto esta thread continua trabalhando.", - "13087312bc6a0b45": "Pull requests", + "1944f04b75ddf26d": "Thread em {label}", "f187680402450374": "Evidências da tarefa", "3a2e919ca921a60c": "Implantações", - "1944f04b75ddf26d": "Thread em {label}", "314cfeebf191ba0d": "precisa de aprovação", "4e5b7363441a3831": "precisa de resposta", "97af4e74a5f95e5e": "em execução", @@ -2568,17 +2574,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "Está em outra máquina, então o agente desta máquina não consegue lê-lo. Remova-o ou volte para enviar.", "5bbac0e5afeec779": "Thread atual", "33c7e68fca089036": "Thread, {title}", - "b4b98a0287c282e2": "Está em outra máquina, então o agente desta máquina não consegue lê-lo. Remova-o ou volte para enviar.", - "c6196d99000642b4": "Abrir thread", - "552649eea02acd9e": "{seat} roda em {substitute}", - "9723cacb91446778": "{model} atingiu o limite de uso. {seat} volta a ele quando o limite for redefinido.", - "4daef274c8249495": "{substitute} está livre. Ao trocar, esta conversa continua em uma nova thread vinculada com um resumo.", - "c8128bb2bd97de3c": "{substitute} está livre. {seat} passa a usá-lo a partir da sua próxima mensagem.", - "05985243eafadf37": "Trocar para {substitute}", - "540418662b70d3d6": "Nenhum modelo favorito está livre, então esta conversa aguarda.", - "9da06299c78dfeeb": "Nenhum modelo favorito está livre, então {seat} aguarda.", "34cc63390ad793cc": "Escolha uma thread", "8f12309ead62e38a": "Pesquisar threads ou projetos...", "2f664754d005d9a7": "Nenhuma thread ativa encontrada.", @@ -3298,6 +3296,7 @@ "83915f0968cde2cc": "Executando", "b90e87f4b7125237": "Detalhes", "16dc67f5429d8bae": "Trabalho em segundo plano", + "2188eee8f81b0f51": "Abrir subagente", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} arquivo alterado} other {{formattedCount} arquivos alterados}}", "ec9e0be8ec693302": "Recolher todas as pastas", "b791dd86f7991cc0": "Expandir todas as pastas", @@ -3433,6 +3432,7 @@ "890b662798f00182": "Sem saída.", "346e42415ac6d374": "Saída anterior não mostrada", "1f096fe18e675975": "Mais controles do editor de mensagens", + "fea770db813e04c2": "Esta thread está arquivada e não pode receber mensagens.", "c1faef1435412551": "Imagem anexada", "6bf404d068867eba": "O anexo do rascunho pode não ser mantido", "d34bfcfec9cf90ef": "Preparando", @@ -3456,6 +3456,7 @@ "249192edde7f4932": "Pesquisar linguagens", "71d8b593668d2106": "Nenhuma linguagem correspondente.", "326bc17df66a7f05": "Arquivos e pastas", + "13087312bc6a0b45": "Pull requests", "0e83c3bf28f8958e": "Comandos", "75d18dac06f4f037": "Skills", "05340d7dfcc34edf": "App", @@ -3486,6 +3487,7 @@ "e778e4f446fdf873": "Sua próxima mensagem inicia uma nova sessão", "0e2f2da4f2d94785": "O agente não verá as mensagens anteriores desta thread.", "e1189d2e582b008d": "Manter a sessão atual", + "d8bc550497c8992f": "Esta conversa continua em uma thread vinculada", "461c9f865f2e9b92": "{option} ativado", "f2aa17b5c620f2a4": "{option} desativado", "f59314a884aae1ff": "Padrão", @@ -3645,6 +3647,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "Renova {time}", + "36c5b0f937628c81": "Não foi possível trocar o modelo", + "d9ddfe9e0e5580ac": "Tente novamente pelo aviso.", + "4de04c6480ae979a": "Trocado", + "0f5e895d047c45c3": "Vale a partir da sua próxima mensagem.", "63fd02d55f0e4417": "Vincular uma máquina a este ambiente", "4136b6bb217cc0b8": "Vincular {target} a este ambiente", "0986757d94229f8f": "Escolher máquina…", @@ -3983,6 +3990,8 @@ "2e3999c63ac1c29b": "Escolher modelos", "ea8ddb5bf4b0088e": "{count, plural, one {{models} e mais {count}} other {{models} e mais {count}}}", "9ae42b0f35599fb6": "O seletor de modelos está desativado", + "0148bc0d85adc872": "Não foi possível abrir uma thread", + "983bff24bf6468a5": "Tente novamente a partir do projeto ou abra uma thread primeiro.", "0109f6f6c7d80ebf": "Thread aberta para corrigir", "aaf800b30d189e52": "O problema está no compositor. Revise e depois envie.", "fa63b0bc8215c3ec": "Abrir uma thread para corrigir {provider}", @@ -4516,7 +4525,6 @@ } ], "a2aaca7ff8310186": "Abrir chat", - "2188eee8f81b0f51": "Abrir subagente", "a3048aaa541b7744": "Atividade", "4a3cbccb2beedeb0": "imagem", "36fb7b9046d2e288": "Chamadas de ferramenta", @@ -4571,11 +4579,6 @@ "275a97b4af3c6482": "Copiar comando para um terminal", "2b07985d23563374": "Retoma {time}", "a4b4e5eb6d313af9": "Renovado {time}", - "c0c3aa756405c1df": "Renova {time}", - "36c5b0f937628c81": "Não foi possível trocar o modelo", - "d9ddfe9e0e5580ac": "Tente novamente pelo aviso.", - "4de04c6480ae979a": "Trocado", - "0f5e895d047c45c3": "Vale a partir da sua próxima mensagem.", "a7bfaa71c8b3030b": "Horário de renovação indisponível; tente novamente manualmente", "77a70e5c3fd83ed8": "Limite de uso do ChatGPT atingido", "c6c8d924b76b5a14": "Você atingiu o limite do seu workspace para usar o plano do ChatGPT em outros apps.", @@ -5219,6 +5222,23 @@ "c788c4526c6bb5e2": "Vincular novamente…", "f073730a8ae2a088": "Vincular implantação…", "60db6fe817814359": "Desvincular…", + "a7ce372eaf721f33": "{count, plural, one {Uma pergunta para você} other {{count} perguntas para você}}", + "e30c38e983fbfbd4": "{count, plural, one {Uma alteração para confirmar} other {{count} alterações para confirmar}}", + "d12dc4f286a5ebde": "Aguardando sua aprovação. Aprovado por {names}.", + "72ff98954c0bece4": "Aguardando sua aprovação", + "367af356d5c293e4": "Um plano para ler", + "c6afa6b1d57ca14f": "Entregáveis para aceitar", + "acdb3e0fcf03dcb7": "Parado aguardando sua decisão", + "1963c27ab94d5447": "Aguardando você enviar", + "69cfe0105013678e": "Pausado até você retomar", + "d25661576338fcf0": "Precisa de você", + "e46cc3cd38fe584d": "Ainda não enviada, então não está na fila", + "6d88182ddaa764fc": "{place}º na fila", + "2e76977cc10f2d80": "{busy} de {cap} vagas ocupadas", + "86452ddb15843ebf": "Ocupando as vagas", + "739d1096a032fd63": "Em retrabalho", + "4aa8f34b88215991": "Retrabalho, rodada {rounds}", + "b65966aa76a5cde6": "Este motor ainda não informa as vagas nem quem as ocupa. A ordem é a dele.", "2f8f985531c0c748": "Mesclada", "6161295dbb04b128": "O host não informou um commit de mesclagem.", "477a176670b421b9": "Implantada", @@ -5268,23 +5288,6 @@ "2ef682d5c194431e": "Deixar de fora", "3d79bb50390a59bd": "Quando um assento atinge o limite", "718bee1b985e1e6b": "um assento cujo modelo atingiu o limite de uso passa para o primeiro modelo livre dos seus Favoritos, espera você escolher ou fica fora da mensagem. Vale a partir da sua próxima mensagem. Um modelo que você escolheu à mão para um assento nunca é trocado sem perguntar.", - "a7ce372eaf721f33": "{count, plural, one {Uma pergunta para você} other {{count} perguntas para você}}", - "e30c38e983fbfbd4": "{count, plural, one {Uma alteração para confirmar} other {{count} alterações para confirmar}}", - "d12dc4f286a5ebde": "Aguardando sua aprovação. Aprovado por {names}.", - "72ff98954c0bece4": "Aguardando sua aprovação", - "367af356d5c293e4": "Um plano para ler", - "c6afa6b1d57ca14f": "Entregáveis para aceitar", - "acdb3e0fcf03dcb7": "Parado aguardando sua decisão", - "1963c27ab94d5447": "Aguardando você enviar", - "69cfe0105013678e": "Pausado até você retomar", - "d25661576338fcf0": "Precisa de você", - "e46cc3cd38fe584d": "Ainda não enviada, então não está na fila", - "6d88182ddaa764fc": "{place}º na fila", - "2e76977cc10f2d80": "{busy} de {cap} vagas ocupadas", - "86452ddb15843ebf": "Ocupando as vagas", - "739d1096a032fd63": "Em retrabalho", - "4aa8f34b88215991": "Retrabalho, rodada {rounds}", - "b65966aa76a5cde6": "Este motor ainda não informa as vagas nem quem as ocupa. A ordem é a dele.", "36fff6eb0fde020c": "Cada assento salva seu modelo e seu nível de raciocínio. A janela de contexto é mostrada a partir do modelo e não é salva: as configurações de assento do motor ainda não têm um campo para a janela de contexto. Um nível de raciocínio que o harness ou o modelo recusa é rejeitado ao salvar, com o motivo do motor.", "49c97fc4187c3cc8": "A conversa da equipe começa quando esta tarefa recebe uma vaga. Ainda não há nada a responder.", "a1238a3f72d5dee8": "A conversa da equipe começa quando esta tarefa é iniciada. Ainda não há nada a responder.", @@ -5292,10 +5295,10 @@ "8c8efe9c6cffdf66": "Voltar para a tarefa #{number}", "036a05240c1069e2": "Assento {seat}", "15dd178ef4fc2eb4": "Conversa do assento", + "ba2f576086976840": "Carregando a conversa...", "3e18ff4c1fe25356": "O T3 não está em execução, então a conversa não está disponível. Ela retoma quando o T3 voltar. O motor continua registrando e nada é cancelado.", "5fa1f2d7e6dbf1b1": "O que o centro mostra", "aaff9d0e91559667": "Registro do motor", - "ba2f576086976840": "Carregando a conversa...", "f31a60920a4af0ef": "Esta conversa está carregando ou não está disponível aqui. Os fatos da tarefa ao lado continuam valendo.", "e0504620b693ba09": "Ainda não há uma conversa vinculada a esta tarefa. Até lá, o registro do motor faz as vezes dela.", "73c89408a5ad1402": "Onde está", @@ -6889,8 +6892,6 @@ "96ef3535e6352a4a": "Branch excluído", "e3b55a78e79e96f0": "A pergunta está no editor de mensagens. Revise e envie.", "672f08c2325b2730": "{term, select, mr {O merge request está} cr {A solicitação de alteração está} other {O pull request está}} no editor de mensagens. Digite sua pergunta e envie.", - "0148bc0d85adc872": "Não foi possível abrir uma thread", - "983bff24bf6468a5": "Tente novamente a partir do projeto ou abra uma thread primeiro.", "702cfd0c7fc3da87": "Perguntado em uma thread", "0e3eede94227c151": "Preparando o checkout {term, select, mr {do merge request} cr {da solicitação de alteração} other {do pull request}}...", "f5fd3733da6e3556": "Não foi possível abrir uma thread para o checkout", @@ -8698,6 +8699,8 @@ "e9f7a62ecd609a46": "Último contato", "70bae47e93a2f207": "Mostrar erro completo", "30f7866bbe097337": "Modelos favoritos, primeira opção primeiro", + "8101bb8e3c7427bf": "Mover {name} para cima", + "bdedd5c7764a77a0": "Mover {name} para baixo", "e4099af6d85770ff": "\"{font}\" não é monoespaçada", "a8448493d83279e2": "O código e o terminal precisam de uma fonte de largura fixa, então a fonte atual foi mantida.", "e8622c39abe68f9d": "padrão", @@ -9086,8 +9089,6 @@ "e09686bd65886c10": "Reiniciar e ativar", "b8c82ba62b34f0e4": "Microfones, preferido primeiro", "9fe08946d6dbd618": "Microfone salvo", - "8101bb8e3c7427bf": "Mover {name} para cima", - "bdedd5c7764a77a0": "Mover {name} para baixo", "acae74b37388b9ba": "Esquecer {name}", "e78e2b3c49707388": "Não conectado", "5d06c2a13becb19a": "O teste de microfone não está disponível neste navegador. Use HTTPS ou o app desktop.", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 2cf2cfe084ffc..f87dd7b7113c6 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} достигла лимита использования", "d4ad47339d670283": "Продолжено на {substitute}", "0b95a334090835d6": "{model} достигла лимита использования, поэтому разговор продолжается в связанном треде. Этот тред остаётся доступным для чтения.", + "c6196d99000642b4": "Открыть тред", + "552649eea02acd9e": "{seat} работает на {substitute}", + "9723cacb91446778": "{model} достигла лимита использования. {seat} вернётся к ней, когда лимит сбросится.", + "4daef274c8249495": "{substitute} свободна. При замене разговор продолжится в новом связанном треде с кратким изложением.", + "c8128bb2bd97de3c": "{substitute} свободна. {seat} будет использовать её со следующего сообщения.", + "05985243eafadf37": "Заменить на {substitute}", + "540418662b70d3d6": "Нет свободной избранной модели, поэтому разговор ждёт.", + "9da06299c78dfeeb": "Нет свободной избранной модели, поэтому {seat} ждёт.", "8b876f2953338661": "Пока неизвестно, привязана ли она", "b8c2bbba2243b429": "Уже привязана", "4f1ab8a69f4a85e5": "Это приложение к ней не подключено", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Обычная", "f42c2a36b3507308": "{label}: вкл.", "77cc5f738cb7d459": "{label}: выкл.", - "2159a4897d4a4d73": "{runtime, select, codex {Обновите Codex CLI до {version} или новее, чтобы использовать {names}.} other {Обновите {providerName} до {version} или новее, чтобы использовать {names}.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {Для {names} нужна Codex CLI {version} или новее, но эта установка может обновиться максимум до {latestVersion}. Установите Codex CLI другим способом или дождитесь нового релиза.} other {Для {names} нужен {providerName} {version} или новее, но эта установка может обновиться максимум до {latestVersion}. Установите {providerName} другим способом или дождитесь нового релиза.}}", "aba3bb73ce212f0c": "Для {names} нужен {providerName} {version} или новее, но в Homebrew cask claude-code есть только {latestVersion}. Перейдите на cask claude-code@latest: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {Для {names} нужна Codex CLI {version} или новее, но эта установка может обновиться максимум до {latestVersion}. Установите Codex CLI другим способом или дождитесь нового релиза.} other {Для {names} нужен {providerName} {version} или новее, но эта установка может обновиться максимум до {latestVersion}. Установите {providerName} другим способом или дождитесь нового релиза.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Обновите Codex CLI до {version} или новее, чтобы использовать {names}.} other {Обновите {providerName} до {version} или новее, чтобы использовать {names}.}}", "d887bea446534de5": "Ни один проект в этом окружении не может прочитать {host}/{repository}.", "4e466d60e2f7736b": "Вставьте полный URL пул-реквеста: у этого треда нет репозитория, по которому можно найти номер.", "302625058bacbe38": "Вставьте полный URL: для хоста этого проекта неизвестен формат URL {changeRequest}.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "Эти треды и все архивные треды будут удалены из T3 Code. Сеансы провайдера сохранятся.", "1a50cbc984f8fe1c": "Все архивные треды будут удалены из T3 Code. Сеансы провайдера сохранятся.", "361080ce34c8e8ed": "{count, plural, one {{count} разговор, начатый доской или движком, будет архивирован, а не удалён.} few {{count} разговора, начатых доской или движком, будут архивированы, а не удалены.} many {{count} разговоров, начатых доской или движком, будут архивированы, а не удалены.} other {{count} разговора, начатых доской или движком, будут архивированы, а не удалены.}} Уже архивированные разговоры досок и движка сохранятся.", - "fea770db813e04c2": "Этот тред в архиве и не может получать сообщения.", "4f076ebbf1c8846e": "Удаляются только записи проекта, а не файлы на диске.", "19b8f3ad79efb9e1": "Другие записи в этом сгруппированном проекте не затрагиваются.", "2207c69b042b2e37": "Это действие нельзя отменить.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Устройство", "1354df9fb7278843": "Смотрите на iOS Simulator или Android Emulator.", "fdcd9643e2e63b15": "Задайте побочный вопрос, пока тред продолжает работу.", - "13087312bc6a0b45": "Пул-реквесты", + "1944f04b75ddf26d": "Тред на {label}", "f187680402450374": "Подтверждения задачи", "3a2e919ca921a60c": "Развертывания", - "1944f04b75ddf26d": "Тред на {label}", "314cfeebf191ba0d": "нужно подтверждение", "4e5b7363441a3831": "нужен ввод", "97af4e74a5f95e5e": "выполняется", @@ -2568,17 +2574,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "Находится на другой машине, поэтому агент этой машины не может его прочитать. Удалите его или переключитесь обратно, чтобы отправить.", "5bbac0e5afeec779": "Текущий тред", "33c7e68fca089036": "Тред, {title}", - "b4b98a0287c282e2": "Находится на другой машине, поэтому агент этой машины не может его прочитать. Удалите его или переключитесь обратно, чтобы отправить.", - "c6196d99000642b4": "Открыть тред", - "552649eea02acd9e": "{seat} работает на {substitute}", - "9723cacb91446778": "{model} достигла лимита использования. {seat} вернётся к ней, когда лимит сбросится.", - "4daef274c8249495": "{substitute} свободна. При замене разговор продолжится в новом связанном треде с кратким изложением.", - "c8128bb2bd97de3c": "{substitute} свободна. {seat} будет использовать её со следующего сообщения.", - "05985243eafadf37": "Заменить на {substitute}", - "540418662b70d3d6": "Нет свободной избранной модели, поэтому разговор ждёт.", - "9da06299c78dfeeb": "Нет свободной избранной модели, поэтому {seat} ждёт.", "34cc63390ad793cc": "Выберите тред", "8f12309ead62e38a": "Поиск тредов или проектов...", "2f664754d005d9a7": "Активные треды не найдены.", @@ -3298,6 +3296,7 @@ "83915f0968cde2cc": "Выполняется", "b90e87f4b7125237": "Подробности", "16dc67f5429d8bae": "Фоновая работа", + "2188eee8f81b0f51": "Открыть субагента", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} изменённый файл} few {{formattedCount} изменённых файла} many {{formattedCount} изменённых файлов} other {{formattedCount} изменённого файла}}", "ec9e0be8ec693302": "Свернуть все папки", "b791dd86f7991cc0": "Развернуть все папки", @@ -3433,6 +3432,7 @@ "890b662798f00182": "Нет вывода.", "346e42415ac6d374": "Более ранний вывод не показан", "1f096fe18e675975": "Другие элементы поля ввода", + "fea770db813e04c2": "Этот тред в архиве и не может получать сообщения.", "c1faef1435412551": "Вложенное изображение", "6bf404d068867eba": "Вложение черновика может не сохраниться", "d34bfcfec9cf90ef": "Подготовка", @@ -3456,6 +3456,7 @@ "249192edde7f4932": "Поиск языков", "71d8b593668d2106": "Нет подходящих языков.", "326bc17df66a7f05": "Файлы и папки", + "13087312bc6a0b45": "Пул-реквесты", "0e83c3bf28f8958e": "Команды", "75d18dac06f4f037": "Навыки", "05340d7dfcc34edf": "Приложение", @@ -3486,6 +3487,7 @@ "e778e4f446fdf873": "Следующее сообщение начнёт новый сеанс", "0e2f2da4f2d94785": "Агент не увидит предыдущие сообщения этого треда.", "e1189d2e582b008d": "Оставить текущий сеанс", + "d8bc550497c8992f": "Этот разговор продолжается в связанном треде", "461c9f865f2e9b92": "{option}: вкл.", "f2aa17b5c620f2a4": "{option}: выкл.", "f59314a884aae1ff": "По умолчанию", @@ -3645,6 +3647,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "Сброс {time}", + "36c5b0f937628c81": "Не удалось заменить модель", + "d9ddfe9e0e5580ac": "Повторите попытку из уведомления.", + "4de04c6480ae979a": "Заменено", + "0f5e895d047c45c3": "Действует со следующего сообщения.", "63fd02d55f0e4417": "Привязать машину к этому окружению", "4136b6bb217cc0b8": "Привязать {target} к этому окружению", "0986757d94229f8f": "Выберите машину…", @@ -3983,6 +3990,8 @@ "2e3999c63ac1c29b": "Выберите модели", "ea8ddb5bf4b0088e": "{count, plural, one {{models} и ещё {count}} few {{models} и ещё {count}} many {{models} и ещё {count}} other {{models} и ещё {count}}}", "9ae42b0f35599fb6": "Выбор модели отключён", + "0148bc0d85adc872": "Не удалось открыть тред", + "983bff24bf6468a5": "Повторите из проекта или сначала откройте тред.", "0109f6f6c7d80ebf": "Открыт тред для исправления", "aaf800b30d189e52": "Проблема уже в поле ввода. Проверьте её и отправьте.", "fa63b0bc8215c3ec": "Открыть тред, чтобы исправить {provider}", @@ -4516,7 +4525,6 @@ } ], "a2aaca7ff8310186": "Открыть чат", - "2188eee8f81b0f51": "Открыть субагента", "a3048aaa541b7744": "Активность", "4a3cbccb2beedeb0": "изображение", "36fb7b9046d2e288": "Вызовы инструментов", @@ -4571,11 +4579,6 @@ "275a97b4af3c6482": "Копировать команду для терминала", "2b07985d23563374": "Возобновится {time}", "a4b4e5eb6d313af9": "Сброшен {time}", - "c0c3aa756405c1df": "Сброс {time}", - "36c5b0f937628c81": "Не удалось заменить модель", - "d9ddfe9e0e5580ac": "Повторите попытку из уведомления.", - "4de04c6480ae979a": "Заменено", - "0f5e895d047c45c3": "Действует со следующего сообщения.", "a7bfaa71c8b3030b": "Время сброса неизвестно; повторите вручную", "77a70e5c3fd83ed8": "Достигнут лимит использования ChatGPT", "c6c8d924b76b5a14": "Вы достигли лимита рабочего пространства на использование тарифа ChatGPT в других приложениях.", @@ -5219,6 +5222,23 @@ "c788c4526c6bb5e2": "Перепривязать…", "f073730a8ae2a088": "Привязать развёртывание…", "60db6fe817814359": "Отвязать…", + "a7ce372eaf721f33": "{count, plural, one {{count} вопрос к вам} few {{count} вопроса к вам} many {{count} вопросов к вам} other {{count} вопроса к вам}}", + "e30c38e983fbfbd4": "{count, plural, one {{count} изменение для подтверждения} few {{count} изменения для подтверждения} many {{count} изменений для подтверждения} other {{count} изменения для подтверждения}}", + "d12dc4f286a5ebde": "Ждёт вашего согласования. Одобрено: {names}.", + "72ff98954c0bece4": "Ждёт вашего согласования", + "367af356d5c293e4": "План для прочтения", + "c6afa6b1d57ca14f": "Результаты для приёмки", + "acdb3e0fcf03dcb7": "Остановлено до вашего решения", + "1963c27ab94d5447": "Ждёт, пока вы его отправите", + "69cfe0105013678e": "На паузе, пока вы не возобновите", + "d25661576338fcf0": "Нужно ваше участие", + "e46cc3cd38fe584d": "Ещё не отправлена, поэтому не в очереди", + "6d88182ddaa764fc": "{place}-й в очереди", + "2e76977cc10f2d80": "Занято {busy} из {cap} слотов", + "86452ddb15843ebf": "Занимают слоты", + "739d1096a032fd63": "На доработке", + "4aa8f34b88215991": "Доработка, раунд {rounds}", + "b65966aa76a5cde6": "Этот движок пока не сообщает о слотах и о том, кто их занимает. Порядок задаёт он сам.", "2f8f985531c0c748": "Слито", "6161295dbb04b128": "Хост не сообщил коммит слияния.", "477a176670b421b9": "Развёрнуто", @@ -5268,23 +5288,6 @@ "2ef682d5c194431e": "Пропускать", "3d79bb50390a59bd": "Когда место достигло лимита", "718bee1b985e1e6b": "место, модель которого достигла лимита использования, переходит на первую свободную модель из вашего Избранного, ждёт вашего выбора или пропускает сообщение. Действует со следующего сообщения. Модель, которую вы выбрали для места вручную, никогда не заменяется без вопроса.", - "a7ce372eaf721f33": "{count, plural, one {{count} вопрос к вам} few {{count} вопроса к вам} many {{count} вопросов к вам} other {{count} вопроса к вам}}", - "e30c38e983fbfbd4": "{count, plural, one {{count} изменение для подтверждения} few {{count} изменения для подтверждения} many {{count} изменений для подтверждения} other {{count} изменения для подтверждения}}", - "d12dc4f286a5ebde": "Ждёт вашего согласования. Одобрено: {names}.", - "72ff98954c0bece4": "Ждёт вашего согласования", - "367af356d5c293e4": "План для прочтения", - "c6afa6b1d57ca14f": "Результаты для приёмки", - "acdb3e0fcf03dcb7": "Остановлено до вашего решения", - "1963c27ab94d5447": "Ждёт, пока вы его отправите", - "69cfe0105013678e": "На паузе, пока вы не возобновите", - "d25661576338fcf0": "Нужно ваше участие", - "e46cc3cd38fe584d": "Ещё не отправлена, поэтому не в очереди", - "6d88182ddaa764fc": "{place}-й в очереди", - "2e76977cc10f2d80": "Занято {busy} из {cap} слотов", - "86452ddb15843ebf": "Занимают слоты", - "739d1096a032fd63": "На доработке", - "4aa8f34b88215991": "Доработка, раунд {rounds}", - "b65966aa76a5cde6": "Этот движок пока не сообщает о слотах и о том, кто их занимает. Порядок задаёт он сам.", "36fff6eb0fde020c": "Каждое место сохраняет свою модель и уровень рассуждения. Контекстное окно показывается по модели и не сохраняется: в настройках мест движка пока нет поля для контекстного окна. Уровень рассуждения, который отклоняет харнесс или модель, отклоняется при сохранении с причиной от движка.", "49c97fc4187c3cc8": "Разговор команды начнется, когда эта задача получит слот. Отвечать пока не на что.", "a1238a3f72d5dee8": "Разговор команды начнется, когда эта задача будет запущена. Отвечать пока не на что.", @@ -5292,10 +5295,10 @@ "8c8efe9c6cffdf66": "Назад к задаче #{number}", "036a05240c1069e2": "Место {seat}", "15dd178ef4fc2eb4": "Разговор места", + "ba2f576086976840": "Загрузка разговора...", "3e18ff4c1fe25356": "T3 не запущен, поэтому разговор недоступен. Он возобновится, когда T3 вернется. Движок продолжает записывать, ничего не отменяется.", "5fa1f2d7e6dbf1b1": "Что показывает центр", "aaff9d0e91559667": "Журнал движка", - "ba2f576086976840": "Загрузка разговора...", "f31a60920a4af0ef": "Этот разговор загружается или здесь недоступен. Факты задачи рядом остаются в силе.", "e0504620b693ba09": "С этой задачей пока не связан ни один разговор. До тех пор его заменяет журнал движка.", "73c89408a5ad1402": "Где она сейчас", @@ -6889,8 +6892,6 @@ "96ef3535e6352a4a": "Ветка удалена", "e3b55a78e79e96f0": "Вопрос в поле ввода. Прочитайте его и отправьте.", "672f08c2325b2730": "{term, select, mr {Мерж-реквест в поле ввода. Введите вопрос и отправьте.} cr {Запрос на изменение в поле ввода. Введите вопрос и отправьте.} other {Пул-реквест в поле ввода. Введите вопрос и отправьте.}}", - "0148bc0d85adc872": "Не удалось открыть тред", - "983bff24bf6468a5": "Повторите из проекта или сначала откройте тред.", "702cfd0c7fc3da87": "Задано в треде", "0e3eede94227c151": "{term, select, mr {Подготовка checkout мерж-реквеста...} cr {Подготовка checkout запроса на изменение...} other {Подготовка checkout пул-реквеста...}}", "f5fd3733da6e3556": "Не удалось открыть тред для checkout", @@ -8700,6 +8701,8 @@ "e9f7a62ecd609a46": "Последняя связь", "70bae47e93a2f207": "Показать ошибку полностью", "30f7866bbe097337": "Избранные модели, сначала предпочтительные", + "8101bb8e3c7427bf": "Переместить {name} вверх", + "bdedd5c7764a77a0": "Переместить {name} вниз", "e4099af6d85770ff": "«{font}» не моноширинный", "a8448493d83279e2": "Коду и терминалу нужен моноширинный шрифт, поэтому текущий шрифт сохранён.", "e8622c39abe68f9d": "по умолчанию", @@ -9087,8 +9090,6 @@ "e09686bd65886c10": "Перезапустить и включить", "b8c82ba62b34f0e4": "Микрофоны, предпочтительные первыми", "9fe08946d6dbd618": "Сохранённый микрофон", - "8101bb8e3c7427bf": "Переместить {name} вверх", - "bdedd5c7764a77a0": "Переместить {name} вниз", "acae74b37388b9ba": "Забыть {name}", "e78e2b3c49707388": "Не подключено", "5d06c2a13becb19a": "Проверка микрофона недоступна в этом браузере. Используйте HTTPS или десктопное приложение.", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index d9607e7506047..4a7f41d7c11f5 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}: {model} har nått sin användningsgräns", "d4ad47339d670283": "Fortsätter på {substitute}", "0b95a334090835d6": "{model} har nått sin användningsgräns, så konversationen fortsätter i en länkad tråd. Den här förblir läsbar.", + "c6196d99000642b4": "Öppna tråd", + "552649eea02acd9e": "{seat} körs på {substitute}", + "9723cacb91446778": "{model} har nått sin användningsgräns. {seat} återgår till den när gränsen återställs.", + "4daef274c8249495": "{substitute} är ledig. Vid byte fortsätter konversationen i en ny länkad tråd med en sammanfattning.", + "c8128bb2bd97de3c": "{substitute} är ledig. {seat} använder den från ditt nästa meddelande.", + "05985243eafadf37": "Byt till {substitute}", + "540418662b70d3d6": "Ingen favoritmodell är ledig, så konversationen väntar.", + "9da06299c78dfeeb": "Ingen favoritmodell är ledig, så {seat} väntar.", "8b876f2953338661": "Det är ännu inte känt om den är länkad", "b8c2bbba2243b429": "Redan länkad", "4f1ab8a69f4a85e5": "Den här appen är inte ansluten till den", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "Normal", "f42c2a36b3507308": "{label} på", "77cc5f738cb7d459": "{label} av", - "2159a4897d4a4d73": "{runtime, select, codex {Uppdatera Codex CLI till {version} eller senare för att använda {names}.} other {Uppdatera {providerName} till {version} eller senare för att använda {names}.}}", - "a0854b0f9604fc7b": "{runtime, select, codex {{names} kräver Codex CLI {version} eller senare, men den här installationen kan bara uppdateras till {latestVersion}. Installera Codex CLI på ett annat sätt eller vänta på en nyare version.} other {{names} kräver {providerName} {version} eller senare, men den här installationen kan bara uppdateras till {latestVersion}. Installera {providerName} på ett annat sätt eller vänta på en nyare version.}}", "aba3bb73ce212f0c": "{names} kräver {providerName} {version} eller senare, men Homebrew-casken claude-code har bara {latestVersion}. Byt till casken claude-code@latest: {command}", + "a0854b0f9604fc7b": "{runtime, select, codex {{names} kräver Codex CLI {version} eller senare, men den här installationen kan bara uppdateras till {latestVersion}. Installera Codex CLI på ett annat sätt eller vänta på en nyare version.} other {{names} kräver {providerName} {version} eller senare, men den här installationen kan bara uppdateras till {latestVersion}. Installera {providerName} på ett annat sätt eller vänta på en nyare version.}}", + "2159a4897d4a4d73": "{runtime, select, codex {Uppdatera Codex CLI till {version} eller senare för att använda {names}.} other {Uppdatera {providerName} till {version} eller senare för att använda {names}.}}", "d887bea446534de5": "Inget projekt i den här miljön kan läsa {host}/{repository}.", "4e466d60e2f7736b": "Klistra in hela pull request-URL:en; den här tråden har inget repo att slå upp numret i.", "302625058bacbe38": "Klistra in en fullständig URL; det här projektets värd har ingen känd URL för {changeRequest}.", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "De trådarna och eventuella arkiverade trådar tas bort från T3 Code. Leverantörssessioner behålls.", "1a50cbc984f8fe1c": "Eventuella arkiverade trådar tas bort från T3 Code. Leverantörssessioner behålls.", "361080ce34c8e8ed": "{count, plural, one {{count} konversation som startats av en tavla eller motorn arkiveras, den tas inte bort.} other {{count} konversationer som startats av en tavla eller motorn arkiveras, de tas inte bort.}} Redan arkiverade konversationer från tavlor och motorn behålls.", - "fea770db813e04c2": "Den här tråden är arkiverad och kan inte ta emot meddelanden.", "4f076ebbf1c8846e": "Det här tar bara bort projektposterna, inte filerna på disken.", "19b8f3ad79efb9e1": "Andra poster i det här grupperade projektet påverkas inte.", "2207c69b042b2e37": "Den här åtgärden kan inte ångras.", @@ -2387,10 +2394,9 @@ "ac0de2a59d9c8860": "Enhet", "1354df9fb7278843": "Titta på en iOS-simulator eller Android-emulator.", "fdcd9643e2e63b15": "Ställ en sidofråga medan tråden fortsätter arbeta.", - "13087312bc6a0b45": "Pull requests", + "1944f04b75ddf26d": "Tråd på {label}", "f187680402450374": "Underlag för uppgiften", "3a2e919ca921a60c": "Driftsättningar", - "1944f04b75ddf26d": "Tråd på {label}", "314cfeebf191ba0d": "behöver godkännande", "4e5b7363441a3831": "behöver input", "97af4e74a5f95e5e": "körs", @@ -2568,17 +2574,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "Finns på en annan dator, så den här datorns agent kan inte läsa den. Ta bort den eller byt tillbaka för att skicka.", "5bbac0e5afeec779": "Aktuell tråd", "33c7e68fca089036": "Tråd, {title}", - "b4b98a0287c282e2": "Finns på en annan dator, så den här datorns agent kan inte läsa den. Ta bort den eller byt tillbaka för att skicka.", - "c6196d99000642b4": "Öppna tråd", - "552649eea02acd9e": "{seat} körs på {substitute}", - "9723cacb91446778": "{model} har nått sin användningsgräns. {seat} återgår till den när gränsen återställs.", - "4daef274c8249495": "{substitute} är ledig. Vid byte fortsätter konversationen i en ny länkad tråd med en sammanfattning.", - "c8128bb2bd97de3c": "{substitute} är ledig. {seat} använder den från ditt nästa meddelande.", - "05985243eafadf37": "Byt till {substitute}", - "540418662b70d3d6": "Ingen favoritmodell är ledig, så konversationen väntar.", - "9da06299c78dfeeb": "Ingen favoritmodell är ledig, så {seat} väntar.", "34cc63390ad793cc": "Välj en tråd", "8f12309ead62e38a": "Sök trådar eller projekt...", "2f664754d005d9a7": "Inga aktiva trådar hittades.", @@ -3298,6 +3296,7 @@ "83915f0968cde2cc": "Körs", "b90e87f4b7125237": "Detaljer", "16dc67f5429d8bae": "Bakgrundsarbete", + "2188eee8f81b0f51": "Öppna subagent", "3b03fc47eba632b4": "{count, plural, one {{formattedCount} ändrad fil} other {{formattedCount} ändrade filer}}", "ec9e0be8ec693302": "Fäll ihop alla mappar", "b791dd86f7991cc0": "Fäll ut alla mappar", @@ -3433,6 +3432,7 @@ "890b662798f00182": "Inga utdata.", "346e42415ac6d374": "Tidigare utdata visas inte", "1f096fe18e675975": "Fler kontroller för inmatningsfältet", + "fea770db813e04c2": "Den här tråden är arkiverad och kan inte ta emot meddelanden.", "c1faef1435412551": "Bildbilaga", "6bf404d068867eba": "Utkastets bilaga kanske inte sparas", "d34bfcfec9cf90ef": "Förbereder", @@ -3456,6 +3456,7 @@ "249192edde7f4932": "Sök språk", "71d8b593668d2106": "Inga matchande språk.", "326bc17df66a7f05": "Filer och mappar", + "13087312bc6a0b45": "Pull requests", "0e83c3bf28f8958e": "Kommandon", "75d18dac06f4f037": "Färdigheter", "05340d7dfcc34edf": "App", @@ -3486,6 +3487,7 @@ "e778e4f446fdf873": "Ditt nästa meddelande startar en ny session", "0e2f2da4f2d94785": "Agenten ser inte tidigare meddelanden i den här tråden.", "e1189d2e582b008d": "Behåll den aktuella sessionen", + "d8bc550497c8992f": "Den här konversationen fortsätter i en länkad tråd", "461c9f865f2e9b92": "{option} på", "f2aa17b5c620f2a4": "{option} av", "f59314a884aae1ff": "Standard", @@ -3645,6 +3647,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "Återställs {time}", + "36c5b0f937628c81": "Det gick inte att byta modell", + "d9ddfe9e0e5580ac": "Försök igen från meddelandet.", + "4de04c6480ae979a": "Bytt", + "0f5e895d047c45c3": "Det gäller från ditt nästa meddelande.", "63fd02d55f0e4417": "Länka en dator till den här miljön", "4136b6bb217cc0b8": "Länka {target} till den här miljön", "0986757d94229f8f": "Välj dator…", @@ -3983,6 +3990,8 @@ "2e3999c63ac1c29b": "Välj modeller", "ea8ddb5bf4b0088e": "{count, plural, one {{models}, {count} till} other {{models}, {count} till}}", "9ae42b0f35599fb6": "Modellväljaren är inaktiverad", + "0148bc0d85adc872": "Kunde inte öppna en tråd", + "983bff24bf6468a5": "Försök igen från projektet eller öppna en tråd först.", "0109f6f6c7d80ebf": "Öppnade en tråd för att åtgärda det", "aaf800b30d189e52": "Problemet finns i kompositören. Läs igenom det och skicka sedan.", "fa63b0bc8215c3ec": "Öppna en tråd för att åtgärda {provider}", @@ -4517,7 +4526,6 @@ } ], "a2aaca7ff8310186": "Öppna chatt", - "2188eee8f81b0f51": "Öppna subagent", "a3048aaa541b7744": "Aktivitet", "4a3cbccb2beedeb0": "bild", "36fb7b9046d2e288": "Verktygsanrop", @@ -4572,11 +4580,6 @@ "275a97b4af3c6482": "Kopiera kommando, för en terminal", "2b07985d23563374": "Återupptas {time}", "a4b4e5eb6d313af9": "Återställdes {time}", - "c0c3aa756405c1df": "Återställs {time}", - "36c5b0f937628c81": "Det gick inte att byta modell", - "d9ddfe9e0e5580ac": "Försök igen från meddelandet.", - "4de04c6480ae979a": "Bytt", - "0f5e895d047c45c3": "Det gäller från ditt nästa meddelande.", "a7bfaa71c8b3030b": "Återställningstiden är inte tillgänglig; försök igen manuellt", "77a70e5c3fd83ed8": "Användningsgränsen för ChatGPT har nåtts", "c6c8d924b76b5a14": "Du har nått arbetsytans gräns för att använda ditt ChatGPT-abonnemang i andra appar.", @@ -5220,6 +5223,23 @@ "c788c4526c6bb5e2": "Länka om…", "f073730a8ae2a088": "Länka driftsättning…", "60db6fe817814359": "Ta bort länk…", + "a7ce372eaf721f33": "{count, plural, one {En fråga till dig} other {{count} frågor till dig}}", + "e30c38e983fbfbd4": "{count, plural, one {En ändring att bekräfta} other {{count} ändringar att bekräfta}}", + "d12dc4f286a5ebde": "Väntar på ditt godkännande. Godkänd av {names}.", + "72ff98954c0bece4": "Väntar på ditt godkännande", + "367af356d5c293e4": "En plan att läsa", + "c6afa6b1d57ca14f": "Leveranser att godkänna", + "acdb3e0fcf03dcb7": "Stoppad i väntan på ditt beslut", + "1963c27ab94d5447": "Väntar på att du skickar in den", + "69cfe0105013678e": "Pausad tills du återupptar den", + "d25661576338fcf0": "Behöver dig", + "e46cc3cd38fe584d": "Inte inskickad än, så den står inte i kön", + "6d88182ddaa764fc": "{place, selectordinal, one {{place}:a i kön} other {{place}:e i kön}}", + "2e76977cc10f2d80": "{busy} av {cap} platser upptagna", + "86452ddb15843ebf": "Upptar platserna", + "739d1096a032fd63": "I omarbetning", + "4aa8f34b88215991": "Omarbetning, runda {rounds}", + "b65966aa76a5cde6": "Den här motorn rapporterar inte platserna eller vem som upptar dem ännu. Ordningen är dess egen.", "2f8f985531c0c748": "Sammanslagen", "6161295dbb04b128": "Värden har inte rapporterat någon sammanslagningscommit.", "477a176670b421b9": "Driftsatt", @@ -5269,23 +5289,6 @@ "2ef682d5c194431e": "Utelämna", "3d79bb50390a59bd": "När en plats är begränsad", "718bee1b985e1e6b": "en plats vars modell har nått sin användningsgräns går över till den första lediga modellen i dina Favoriter, väntar på ditt val eller står över meddelandet. Det gäller från ditt nästa meddelande. En modell som du själv har valt för en plats byts aldrig utan att fråga.", - "a7ce372eaf721f33": "{count, plural, one {En fråga till dig} other {{count} frågor till dig}}", - "e30c38e983fbfbd4": "{count, plural, one {En ändring att bekräfta} other {{count} ändringar att bekräfta}}", - "d12dc4f286a5ebde": "Väntar på ditt godkännande. Godkänd av {names}.", - "72ff98954c0bece4": "Väntar på ditt godkännande", - "367af356d5c293e4": "En plan att läsa", - "c6afa6b1d57ca14f": "Leveranser att godkänna", - "acdb3e0fcf03dcb7": "Stoppad i väntan på ditt beslut", - "1963c27ab94d5447": "Väntar på att du skickar in den", - "69cfe0105013678e": "Pausad tills du återupptar den", - "d25661576338fcf0": "Behöver dig", - "e46cc3cd38fe584d": "Inte inskickad än, så den står inte i kön", - "6d88182ddaa764fc": "{place, selectordinal, one {{place}:a i kön} other {{place}:e i kön}}", - "2e76977cc10f2d80": "{busy} av {cap} platser upptagna", - "86452ddb15843ebf": "Upptar platserna", - "739d1096a032fd63": "I omarbetning", - "4aa8f34b88215991": "Omarbetning, runda {rounds}", - "b65966aa76a5cde6": "Den här motorn rapporterar inte platserna eller vem som upptar dem ännu. Ordningen är dess egen.", "36fff6eb0fde020c": "Varje plats sparar sin modell och sin resonemangsnivå. Kontextfönstret visas från modellen och sparas inte: motorns platsinställningar har ännu inget fält för kontextfönstret. En resonemangsnivå som harnessen eller modellen vägrar avvisas när du sparar, med motorns skäl.", "49c97fc4187c3cc8": "Teamets konversation börjar när den här uppgiften får en plats. Det finns inget att svara på ännu.", "a1238a3f72d5dee8": "Teamets konversation börjar när den här uppgiften startas. Det finns inget att svara på ännu.", @@ -5293,10 +5296,10 @@ "8c8efe9c6cffdf66": "Tillbaka till uppgift #{number}", "036a05240c1069e2": "Plats {seat}", "15dd178ef4fc2eb4": "Platsens konversation", + "ba2f576086976840": "Läser in konversationen...", "3e18ff4c1fe25356": "T3 körs inte, så konversationen är inte tillgänglig. Den återupptas när T3 är tillbaka. Motorn fortsätter att registrera och inget avbryts.", "5fa1f2d7e6dbf1b1": "Vad mitten visar", "aaff9d0e91559667": "Motorlogg", - "ba2f576086976840": "Läser in konversationen...", "f31a60920a4af0ef": "Den här konversationen läses in eller är inte tillgänglig här. Uppgiftens fakta bredvid gäller fortfarande.", "e0504620b693ba09": "Ingen konversation är kopplad till den här uppgiften ännu. Tills dess står motorns logg i dess ställe.", "73c89408a5ad1402": "Hur det ligger till", @@ -6895,8 +6898,6 @@ "96ef3535e6352a4a": "Grenen togs bort", "e3b55a78e79e96f0": "Frågan finns i inmatningsfältet. Läs igenom den och skicka sedan.", "672f08c2325b2730": "{term, select, mr {Merge requesten} cr {Ändringsbegäran} other {Pull requesten}} finns i inmatningsfältet. Skriv din fråga och skicka.", - "0148bc0d85adc872": "Kunde inte öppna en tråd", - "983bff24bf6468a5": "Försök igen från projektet eller öppna en tråd först.", "702cfd0c7fc3da87": "Frågade i en tråd", "0e3eede94227c151": "Förbereder utcheckning av {term, select, mr {merge requesten} cr {ändringsbegäran} other {pull requesten}}...", "f5fd3733da6e3556": "Kunde inte öppna en tråd för utcheckningen", @@ -8706,6 +8707,8 @@ "e9f7a62ecd609a46": "Senast nådd", "70bae47e93a2f207": "Visa hela felet", "30f7866bbe097337": "Favoritmodeller, förstahandsvalet först", + "8101bb8e3c7427bf": "Flytta upp {name}", + "bdedd5c7764a77a0": "Flytta ned {name}", "e4099af6d85770ff": "”{font}” är inte ett teckensnitt med fast bredd", "a8448493d83279e2": "Kod och terminal kräver ett teckensnitt med fast bredd, så det aktuella teckensnittet behölls.", "e8622c39abe68f9d": "standard", @@ -9093,8 +9096,6 @@ "e09686bd65886c10": "Starta om och aktivera", "b8c82ba62b34f0e4": "Mikrofoner, föredragen först", "9fe08946d6dbd618": "Sparad mikrofon", - "8101bb8e3c7427bf": "Flytta upp {name}", - "bdedd5c7764a77a0": "Flytta ned {name}", "acae74b37388b9ba": "Glöm {name}", "e78e2b3c49707388": "Inte ansluten", "5d06c2a13becb19a": "Mikrofontest är inte tillgängligt i den här webbläsaren. Använd HTTPS eller skrivbordsappen.", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 156d49542e6f7..631381cb3426a 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -78,6 +78,14 @@ "7037860c8460904b": "{seat}:{model} 已达使用限额", "d4ad47339d670283": "已改用 {substitute} 继续", "0b95a334090835d6": "{model} 已达使用限额,因此此对话在关联的线程中继续。当前线程仍可阅读。", + "c6196d99000642b4": "打开会话", + "552649eea02acd9e": "{seat} 使用 {substitute} 运行", + "9723cacb91446778": "{model} 已达使用限额。限额重置后,{seat} 会改回该模型。", + "4daef274c8249495": "{substitute} 空闲。切换后,此对话将在带有摘要的新关联线程中继续。", + "c8128bb2bd97de3c": "{substitute} 空闲。{seat} 将从你的下一条消息起使用它。", + "05985243eafadf37": "切换到 {substitute}", + "540418662b70d3d6": "没有空闲的收藏模型,因此此对话将等待。", + "9da06299c78dfeeb": "没有空闲的收藏模型,因此 {seat} 将等待。", "8b876f2953338661": "尚不清楚是否已关联", "b8c2bbba2243b429": "已关联", "4f1ab8a69f4a85e5": "此应用未连接到该机器", @@ -122,9 +130,9 @@ "c4eb2b21c8c58a54": "普通", "f42c2a36b3507308": "{label} 开启", "77cc5f738cb7d459": "{label} 关闭", - "2159a4897d4a4d73": "{runtime, select, codex {请将 Codex CLI 更新到 {version} 或更高版本以使用 {names}。} other {请将 {providerName} 更新到 {version} 或更高版本以使用 {names}。}}", - "a0854b0f9604fc7b": "{runtime, select, codex {使用 {names} 需要 Codex CLI {version} 或更高版本,但此安装最多只能更新到 {latestVersion}。请通过其他方式安装 Codex CLI,或等待更新的版本发布。} other {使用 {names} 需要 {providerName} {version} 或更高版本,但此安装最多只能更新到 {latestVersion}。请通过其他方式安装 {providerName},或等待更新的版本发布。}}", "aba3bb73ce212f0c": "使用 {names} 需要 {providerName} {version} 或更高版本,但 Homebrew 的 claude-code cask 只有 {latestVersion}。请切换到 claude-code@latest cask:{command}", + "a0854b0f9604fc7b": "{runtime, select, codex {使用 {names} 需要 Codex CLI {version} 或更高版本,但此安装最多只能更新到 {latestVersion}。请通过其他方式安装 Codex CLI,或等待更新的版本发布。} other {使用 {names} 需要 {providerName} {version} 或更高版本,但此安装最多只能更新到 {latestVersion}。请通过其他方式安装 {providerName},或等待更新的版本发布。}}", + "2159a4897d4a4d73": "{runtime, select, codex {请将 Codex CLI 更新到 {version} 或更高版本以使用 {names}。} other {请将 {providerName} 更新到 {version} 或更高版本以使用 {names}。}}", "d887bea446534de5": "此环境中没有项目能读取 {host}/{repository}。", "4e466d60e2f7736b": "请粘贴完整的 pull request URL;此会话没有可用于解析编号的仓库。", "302625058bacbe38": "请粘贴完整 URL;此项目的托管平台没有已知的 {changeRequest} URL。", @@ -728,7 +736,6 @@ "3e46fbf3eadf0745": "这些会话及所有已归档会话将从 T3 Code 中删除。提供方自身保存的对话记录会保留。", "1a50cbc984f8fe1c": "所有已归档会话将从 T3 Code 中删除。提供方自身保存的对话记录会保留。", "361080ce34c8e8ed": "{count, plural, other {由看板或引擎发起的 {count} 个对话将被归档,不会删除。}}已归档的看板和引擎对话会保留。", - "fea770db813e04c2": "此会话已归档,无法接收消息。", "4f076ebbf1c8846e": "仅移除项目条目,磁盘上的文件会保留。", "19b8f3ad79efb9e1": "此项目组中的其他条目不受影响。", "2207c69b042b2e37": "此操作无法撤销。", @@ -2391,10 +2398,9 @@ "ac0de2a59d9c8860": "设备", "1354df9fb7278843": "查看 iOS 模拟器或 Android 模拟器。", "fdcd9643e2e63b15": "在会话继续运行的同时追问一个旁支问题。", - "13087312bc6a0b45": "PR", + "1944f04b75ddf26d": "{label} 上的会话", "f187680402450374": "任务证据", "3a2e919ca921a60c": "部署", - "1944f04b75ddf26d": "{label} 上的会话", "314cfeebf191ba0d": "待批准", "4e5b7363441a3831": "待输入", "97af4e74a5f95e5e": "运行中", @@ -2572,17 +2578,9 @@ "v": "v" } ], + "b4b98a0287c282e2": "它在另一台机器上,本机的智能体读不到它。请移除它,或切回那台机器再发送。", "5bbac0e5afeec779": "当前会话", "33c7e68fca089036": "会话,{title}", - "b4b98a0287c282e2": "它在另一台机器上,本机的智能体读不到它。请移除它,或切回那台机器再发送。", - "c6196d99000642b4": "打开会话", - "552649eea02acd9e": "{seat} 使用 {substitute} 运行", - "9723cacb91446778": "{model} 已达使用限额。限额重置后,{seat} 会改回该模型。", - "4daef274c8249495": "{substitute} 空闲。切换后,此对话将在带有摘要的新关联线程中继续。", - "c8128bb2bd97de3c": "{substitute} 空闲。{seat} 将从你的下一条消息起使用它。", - "05985243eafadf37": "切换到 {substitute}", - "540418662b70d3d6": "没有空闲的收藏模型,因此此对话将等待。", - "9da06299c78dfeeb": "没有空闲的收藏模型,因此 {seat} 将等待。", "34cc63390ad793cc": "选择会话", "8f12309ead62e38a": "搜索会话或项目…", "2f664754d005d9a7": "未找到活动会话。", @@ -3302,6 +3300,7 @@ "83915f0968cde2cc": "运行中", "b90e87f4b7125237": "详情", "16dc67f5429d8bae": "后台任务", + "2188eee8f81b0f51": "打开子智能体", "3b03fc47eba632b4": "{count, plural, other {{formattedCount} 个已更改的文件}}", "ec9e0be8ec693302": "折叠全部文件夹", "b791dd86f7991cc0": "展开全部文件夹", @@ -3438,6 +3437,7 @@ "890b662798f00182": "没有输出。", "346e42415ac6d374": "更早的输出未显示", "1f096fe18e675975": "更多输入框控件", + "fea770db813e04c2": "此会话已归档,无法接收消息。", "c1faef1435412551": "图片附件", "6bf404d068867eba": "草稿附件可能无法保留", "d34bfcfec9cf90ef": "正在准备", @@ -3461,6 +3461,7 @@ "249192edde7f4932": "搜索语言", "71d8b593668d2106": "没有匹配的语言。", "326bc17df66a7f05": "文件和文件夹", + "13087312bc6a0b45": "PR", "0e83c3bf28f8958e": "命令", "75d18dac06f4f037": "技能", "05340d7dfcc34edf": "应用", @@ -3491,6 +3492,7 @@ "e778e4f446fdf873": "你的下一条消息将以全新上下文开始", "0e2f2da4f2d94785": "智能体将看不到这个会话里之前的消息。", "e1189d2e582b008d": "保留当前上下文", + "d8bc550497c8992f": "此对话在关联的线程中继续", "461c9f865f2e9b92": "{option} 开启", "f2aa17b5c620f2a4": "{option} 关闭", "f59314a884aae1ff": "默认", @@ -3650,6 +3652,11 @@ "v": "v" } ], + "c0c3aa756405c1df": "{time} 重置", + "36c5b0f937628c81": "无法切换模型", + "d9ddfe9e0e5580ac": "请从通知中重试。", + "4de04c6480ae979a": "已切换", + "0f5e895d047c45c3": "从你的下一条消息开始生效。", "63fd02d55f0e4417": "将一台机器关联到此环境", "4136b6bb217cc0b8": "将 {target} 关联到此环境", "0986757d94229f8f": "选择机器…", @@ -3988,6 +3995,8 @@ "2e3999c63ac1c29b": "选择模型", "ea8ddb5bf4b0088e": "{count, plural, other {{models},另有 {count} 个}}", "9ae42b0f35599fb6": "模型选择器已停用", + "0148bc0d85adc872": "无法打开会话", + "983bff24bf6468a5": "请从项目中重试,或先打开一个会话。", "0109f6f6c7d80ebf": "已打开一个线程来修复", "aaf800b30d189e52": "问题已放入输入框。检查后再发送。", "fa63b0bc8215c3ec": "打开一个线程来修复 {provider}", @@ -4523,7 +4532,6 @@ } ], "a2aaca7ff8310186": "打开对话", - "2188eee8f81b0f51": "打开子智能体", "a3048aaa541b7744": "活动", "4a3cbccb2beedeb0": "图片", "36fb7b9046d2e288": "工具调用", @@ -4578,11 +4586,6 @@ "275a97b4af3c6482": "复制命令,在终端中运行", "2b07985d23563374": "{time} 自动继续", "a4b4e5eb6d313af9": "已于 {time} 重置", - "c0c3aa756405c1df": "{time} 重置", - "36c5b0f937628c81": "无法切换模型", - "d9ddfe9e0e5580ac": "请从通知中重试。", - "4de04c6480ae979a": "已切换", - "0f5e895d047c45c3": "从你的下一条消息开始生效。", "a7bfaa71c8b3030b": "重置时间未知,请手动重试", "77a70e5c3fd83ed8": "已达到 ChatGPT 用量上限", "c6c8d924b76b5a14": "你已达到工作区允许在其他应用中使用 ChatGPT 套餐的上限。", @@ -5226,6 +5229,23 @@ "c788c4526c6bb5e2": "重新链接…", "f073730a8ae2a088": "链接部署…", "60db6fe817814359": "取消链接…", + "a7ce372eaf721f33": "{count, plural, other {有 {count} 个问题等你回答}}", + "e30c38e983fbfbd4": "{count, plural, other {有 {count} 项更改待确认}}", + "d12dc4f286a5ebde": "等待你签批。{names} 已批准。", + "72ff98954c0bece4": "等待你签批", + "367af356d5c293e4": "有一份计划待阅读", + "c6afa6b1d57ca14f": "待接受的交付物", + "acdb3e0fcf03dcb7": "已停止,等待你的决定", + "1963c27ab94d5447": "等待你提交", + "69cfe0105013678e": "已暂停,等你恢复", + "d25661576338fcf0": "需要你处理", + "e46cc3cd38fe584d": "尚未提交,因此不在队列中", + "6d88182ddaa764fc": "排在第 {place} 位", + "2e76977cc10f2d80": "{cap} 个位置中已占用 {busy} 个", + "86452ddb15843ebf": "占用位置的任务", + "739d1096a032fd63": "返工中", + "4aa8f34b88215991": "第 {rounds} 轮返工", + "b65966aa76a5cde6": "此引擎暂未报告位置数量及占用者。顺序由它自己决定。", "2f8f985531c0c748": "已合并", "6161295dbb04b128": "主机尚未报告合并提交。", "477a176670b421b9": "已部署", @@ -5275,23 +5295,6 @@ "2ef682d5c194431e": "将其排除", "3d79bb50390a59bd": "当席位达到限额时", "718bee1b985e1e6b": "模型已达使用限额的席位会改用收藏夹中第一个空闲的模型、等待你选择,或不参与这条消息。从你的下一条消息开始生效。你为席位手动选择的模型绝不会未经询问就被替换。", - "a7ce372eaf721f33": "{count, plural, other {有 {count} 个问题等你回答}}", - "e30c38e983fbfbd4": "{count, plural, other {有 {count} 项更改待确认}}", - "d12dc4f286a5ebde": "等待你签批。{names} 已批准。", - "72ff98954c0bece4": "等待你签批", - "367af356d5c293e4": "有一份计划待阅读", - "c6afa6b1d57ca14f": "待接受的交付物", - "acdb3e0fcf03dcb7": "已停止,等待你的决定", - "1963c27ab94d5447": "等待你提交", - "69cfe0105013678e": "已暂停,等你恢复", - "d25661576338fcf0": "需要你处理", - "e46cc3cd38fe584d": "尚未提交,因此不在队列中", - "6d88182ddaa764fc": "排在第 {place} 位", - "2e76977cc10f2d80": "{cap} 个位置中已占用 {busy} 个", - "86452ddb15843ebf": "占用位置的任务", - "739d1096a032fd63": "返工中", - "4aa8f34b88215991": "第 {rounds} 轮返工", - "b65966aa76a5cde6": "此引擎暂未报告位置数量及占用者。顺序由它自己决定。", "36fff6eb0fde020c": "每个席位会保存其模型和推理级别。上下文窗口仅按模型显示,不会保存:引擎的席位设置还没有上下文窗口字段。harness 或模型拒绝的推理级别会在保存时被拒绝,并显示引擎给出的原因。", "49c97fc4187c3cc8": "这个任务获得名额后,团队的对话才会开始。目前还没有需要回复的内容。", "a1238a3f72d5dee8": "这个任务启动后,团队的对话才会开始。目前还没有需要回复的内容。", @@ -5299,10 +5302,10 @@ "8c8efe9c6cffdf66": "返回任务 #{number}", "036a05240c1069e2": "席位 {seat}", "15dd178ef4fc2eb4": "席位对话", + "ba2f576086976840": "正在加载对话...", "3e18ff4c1fe25356": "T3 没有运行,因此对话不可用。T3 恢复后对话会继续。引擎仍在记录,不会取消任何内容。", "5fa1f2d7e6dbf1b1": "中间显示的内容", "aaff9d0e91559667": "引擎日志", - "ba2f576086976840": "正在加载对话...", "f31a60920a4af0ef": "这个对话正在加载,或在此处不可用。旁边的任务事实仍然有效。", "e0504620b693ba09": "这个任务还没有关联对话。在此之前由引擎日志代替。", "73c89408a5ad1402": "目前进展", @@ -6902,8 +6905,6 @@ "96ef3535e6352a4a": "已删除分支", "e3b55a78e79e96f0": "问题已在输入框中。请检查后发送。", "672f08c2325b2730": "该 {term, select, mr {merge request} cr {change request} other {pull request}} 已在输入框中。输入你的问题后发送。", - "0148bc0d85adc872": "无法打开会话", - "983bff24bf6468a5": "请从项目中重试,或先打开一个会话。", "702cfd0c7fc3da87": "已在会话中提问", "0e3eede94227c151": "正在准备 {term, select, mr {merge request} cr {change request} other {pull request}} 工作副本...", "f5fd3733da6e3556": "无法为工作副本打开会话", @@ -8716,6 +8717,8 @@ "e9f7a62ecd609a46": "上次连通", "70bae47e93a2f207": "显示完整错误", "30f7866bbe097337": "收藏的模型,首选在前", + "8101bb8e3c7427bf": "上移 {name}", + "bdedd5c7764a77a0": "下移 {name}", "e4099af6d85770ff": "“{font}”不是等宽字体", "a8448493d83279e2": "代码和终端需要等宽字体,已保留当前字体。", "e8622c39abe68f9d": "默认", @@ -9103,8 +9106,6 @@ "e09686bd65886c10": "重启并开启", "b8c82ba62b34f0e4": "麦克风,优先使用排在前面的设备", "9fe08946d6dbd618": "已保存的麦克风", - "8101bb8e3c7427bf": "上移 {name}", - "bdedd5c7764a77a0": "下移 {name}", "acae74b37388b9ba": "忘记 {name}", "e78e2b3c49707388": "未连接", "5d06c2a13becb19a": "此浏览器无法测试麦克风。请使用 HTTPS 或桌面应用。", From b503edd0789692ff789ccfcb7d4dcaf1b1ae77dc Mon Sep 17 00:00:00 2001 From: Tevin2119 Date: Sun, 22 Nov 2026 19:01:18 +0000 Subject: [PATCH 12/12] fix(server): a thread handed on to a linked thread starts nothing from its queue A queued run starts through startNextQueuedRunOnce, which the message guard never saw. It now starts none while the thread's latest limited run continues in a linked thread, for every caller: queue.resume, queued-run.start, a runtime mode change, recovery, wakes and run-end handlers. The two explicit commands are refused with the sentence the message refusal uses. A delegated task's result for a run that was handed on is disposed, as on an archived parent: no wake, no run, no error on the delivery. Co-Authored-By: Claude Fable 5.2 --- .../src/orchestration-v2/Orchestrator.ts | 46 ++- .../RemoteDelegatedTask.test.ts | 74 +++++ .../src/orchestration-v2/runtimeLayer.test.ts | 302 +++++++++++++----- 3 files changed, 337 insertions(+), 85 deletions(-) diff --git a/apps/server/src/orchestration-v2/Orchestrator.ts b/apps/server/src/orchestration-v2/Orchestrator.ts index 02dc5848001d4..b5fd9a455898f 100644 --- a/apps/server/src/orchestration-v2/Orchestrator.ts +++ b/apps/server/src/orchestration-v2/Orchestrator.ts @@ -1946,6 +1946,24 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio Effect.map((continued) => continued !== null && continued.deletedAt === null), ); + /** + * The linked thread these runs' work continues in, when the latest executed one is a limited run + * that was handed on. Such a thread is read-only while that thread exists: a second run here + * would redo the work, so it takes no message and starts nothing from its queue. + */ + const handedOnTo = Effect.fnUntraced(function* (runs: ReadonlyArray) { + const latest = latestExecutedRun(runs); + if (latest?.status !== "failed" || !(yield* runHandedOn(latest.id))) return null; + return limitedLeadHandoffThreadId(latest.id); + }); + + /** + * `handedOnTo` for a delegated task's result, read from the run that spawned the task alone so a + * long parent costs nothing more. A task of an earlier run is caught where its wake would start. + */ + const spawningRunHandedOn = (run: OrchestrationV2Run) => + run.status === "failed" ? runHandedOn(run.id) : Effect.succeed(false); + /** Side chats live inside their parent, so deleting or archiving the parent takes them too. */ const liveSideChatIds = Effect.fn("Orchestrator.liveSideChatIds")( function* (threadId: ThreadId) { @@ -2137,6 +2155,8 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio controls.thread.deletedAt !== null ) return; + // A handed-on parent takes no result, as an archived one takes none. + if (yield* spawningRunHandedOn(parentRun)) return; const messages = yield* projectionStore.getThreadRecords(threadId, ["messages"], { messageIds: [delivery.messageId], }); @@ -2556,6 +2576,9 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio ) { return; } + // Every start of a queued run passes here: a resume, a mode change, recovery, a wake, a run's + // end. None starts one on a thread whose work continues in a linked thread. + if ((yield* handedOnTo(projection.runs)) !== null) return; if (yield* cancelStaleQuestionWakes(projection)) { projection = yield* readCommandProjection(threadId); @@ -7200,20 +7223,21 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio /** * A thread whose latest limited run continues in a linked thread is read-only while that thread * exists: a second run here would redo the work. What a person, the CLI or a tool sends is - * refused; the server's own follow-ups settle quietly, starting nothing. + * refused; the server's own follow-ups and a delegated task's result settle quietly, starting + * nothing. */ const settleHandedOnThreadMessage = Effect.fnUntraced(function* ( command: Extract, projection: Pick, events: Ref.Ref>, ) { - const latest = latestExecutedRun(projection.runs); - if (latest?.status !== "failed" || !(yield* runHandedOn(latest.id))) return false; - if (!isServerFollowUp(command)) { + const continuedIn = yield* handedOnTo(projection.runs); + if (continuedIn === null) return false; + if (!isServerFollowUp(command) && command.delegatedCompletion === undefined) { return yield* new OrchestratorThreadHandedOnError({ commandId: command.commandId, threadId: command.threadId, - continuedIn: limitedLeadHandoffThreadId(latest.id), + continuedIn, }); } // The unchanged row gives the automatic delivery an accepted receipt, so it is not retried. @@ -14860,7 +14884,9 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio input.parentRun === undefined || input.parentProjection.thread.archivedAt !== null || input.parentProjection.thread.deletedAt !== null || - (cohort !== undefined && cohort.disposition !== "open") + (cohort !== undefined && cohort.disposition !== "open") || + // A handed-on parent takes no result, as an archived one takes none. + (yield* spawningRunHandedOn(input.parentRun)) ) { return { task: { @@ -16051,6 +16077,14 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio cause: `Thread ${command.threadId} is not active.`, }); } + const continuedIn = yield* handedOnTo(projection.runs); + if (continuedIn !== null) { + return yield* new OrchestratorThreadHandedOnError({ + commandId: command.commandId, + threadId: command.threadId, + continuedIn, + }); + } const selectedRunId = command.type === "queued-run.start" ? command.runId : undefined; const selectedRun = selectedRunId === undefined diff --git a/apps/server/src/orchestration-v2/RemoteDelegatedTask.test.ts b/apps/server/src/orchestration-v2/RemoteDelegatedTask.test.ts index 292882d0f894b..79daa99ff9d87 100644 --- a/apps/server/src/orchestration-v2/RemoteDelegatedTask.test.ts +++ b/apps/server/src/orchestration-v2/RemoteDelegatedTask.test.ts @@ -12,6 +12,7 @@ import { RunId, ThreadId, } from "@t3tools/contracts"; +import { limitedLeadHandoffThreadId } from "@t3tools/shared/limitedSeat"; import * as Context from "effect/Context"; import * as DateTime from "effect/DateTime"; import * as Effect from "effect/Effect"; @@ -420,4 +421,77 @@ it.layer(layerTest)("a delegated task in a linked environment", (it) => { assert.equal(offered[0]?.threadId, parent.threadId); }), ); + + it.effect("settles its result quietly on a parent whose work continues in a linked thread", () => + Effect.gen(function* () { + const orchestrator = yield* Orchestrator.OrchestratorV2; + const sink = yield* EventSink.EventSinkV2; + const parent = yield* seedLiveParent("handed-on"); + yield* orchestrator.dispatch({ + type: "delegated_task.remote.request", + commandId: CommandId.make("command:remote-delegate:handed-on"), + parentThreadId: parent.threadId, + parentRunId: parent.runId, + parentNodeId: parent.rootNodeId, + task: "Run the suite there.", + driver: ProviderDriverKind.make("remote"), + modelSelection, + remoteChild, + completionWake: "always", + }); + // The parent's run fails on its limit and the work is handed on to a linked thread. + const now = yield* DateTime.now; + const before = yield* orchestrator.getThreadProjection(parent.threadId); + yield* sink.write({ + events: [ + { + id: EventId.make("event:handed-on:failed"), + type: "run.updated", + threadId: parent.threadId, + runId: parent.runId, + occurredAt: now, + payload: { ...before.runs[0]!, status: "failed", completedAt: now }, + }, + ], + }); + const continuedIn = limitedLeadHandoffThreadId(parent.runId); + yield* orchestrator.dispatch({ + type: "thread.create", + createdBy: "agent", + creationSource: "server", + commandId: CommandId.make("command:create:handed-on-continued"), + threadId: continuedIn, + projectId: ProjectId.make("project:remote-delegated-task"), + title: "Parent, continued", + modelSelection, + runtimeMode: "full-access", + interactionMode: "default", + branch: null, + worktreePath: null, + }); + const offers = yield* Offers; + yield* Ref.set(offers, []); + const taskId = before.subagents[0]!.id; + // The result is recorded and disposed, as on an archived parent: no error, no wake, no run. + yield* orchestrator.dispatch({ + type: "delegated_task.remote.complete", + commandId: CommandId.make("command:remote-complete:handed-on"), + parentThreadId: parent.threadId, + taskId, + status: "completed", + result: "All 412 tests pass on the box.", + stoppedThere: "ran-out", + }); + const after = yield* orchestrator.getThreadProjection(parent.threadId); + const task = after.subagents.find((candidate) => candidate.id === taskId); + assert.equal(task?.result, "All 412 tests pass on the box."); + assert.equal(task?.completionDelivery?.state, "disposed"); + assert.deepEqual( + after.runs.map((run) => [run.id, run.status]), + [[parent.runId, "failed"]], + ); + assert.lengthOf(after.messages, before.messages.length); + assert.deepEqual(yield* Ref.get(offers), []); + }), + ); }); diff --git a/apps/server/src/orchestration-v2/runtimeLayer.test.ts b/apps/server/src/orchestration-v2/runtimeLayer.test.ts index 1e07f3dc0bd27..fba6eac258d64 100644 --- a/apps/server/src/orchestration-v2/runtimeLayer.test.ts +++ b/apps/server/src/orchestration-v2/runtimeLayer.test.ts @@ -13353,97 +13353,117 @@ it.layer(layerSharedApplicationDataPlaneTest)("shared application data plane", ( ); }); -it.layer(layerTest)("usage-limit recovery", (it) => { - /** A thread whose first run failed on a usage limit that resets in a minute. */ - const failLimitedLead = Effect.fn("failLimitedLead")(function* (name: string) { - const orchestrator = yield* Orchestrator.OrchestratorV2; - const events = yield* EventSink.EventSinkV2; - const threadId = ThreadId.make(name); - const projectId = ProjectId.make(`${name}:project`); - const now = yield* DateTime.now; - yield* seedProject({ - projectId, - title: "Hand-off project", - workspaceRoot: process.cwd(), - defaultModelSelection: modelSelection, - createdAt: DateTime.formatIso(now), - }); - yield* orchestrator.dispatch({ - type: "thread.create", - commandId: CommandId.make(`${name}:create`), - threadId, - projectId, - title: "Limited lead", - modelSelection, - runtimeMode: "full-access", - interactionMode: "default", - branch: null, - worktreePath: null, - createdBy: "user", - creationSource: "web", - }); +/** + * A thread whose first run failed on a usage limit that resets in a minute. `queueBehind` leaves a + * message queued behind that run, which the limit holds without writing a hold on it. + */ +const failLimitedLead = Effect.fn("failLimitedLead")(function* ( + name: string, + options?: { readonly queueBehind?: boolean }, +) { + const orchestrator = yield* Orchestrator.OrchestratorV2; + const events = yield* EventSink.EventSinkV2; + const threadId = ThreadId.make(name); + const projectId = ProjectId.make(`${name}:project`); + const now = yield* DateTime.now; + yield* seedProject({ + projectId, + title: "Hand-off project", + workspaceRoot: process.cwd(), + defaultModelSelection: modelSelection, + createdAt: DateTime.formatIso(now), + }); + yield* orchestrator.dispatch({ + type: "thread.create", + commandId: CommandId.make(`${name}:create`), + threadId, + projectId, + title: "Limited lead", + modelSelection, + runtimeMode: "full-access", + interactionMode: "default", + branch: null, + worktreePath: null, + createdBy: "user", + creationSource: "web", + }); + yield* orchestrator.dispatch({ + type: "message.dispatch", + commandId: CommandId.make(`${name}:start`), + threadId, + messageId: MessageId.make(`${name}:start`), + text: "Start work.", + attachments: [], + dispatchMode: { type: "defer_start" }, + createdBy: "user", + creationSource: "web", + }); + if (options?.queueBehind === true) { yield* orchestrator.dispatch({ type: "message.dispatch", - commandId: CommandId.make(`${name}:start`), + commandId: CommandId.make(`${name}:queue`), threadId, - messageId: MessageId.make(`${name}:start`), - text: "Start work.", + messageId: MessageId.make(`${name}:queue`), + text: "Follow up.", attachments: [], - dispatchMode: { type: "defer_start" }, + dispatchMode: { type: "queue_after_active" }, createdBy: "user", creationSource: "web", }); - const [source] = (yield* orchestrator.getThreadProjection(threadId)).runs as [ - OrchestrationV2Run, - ]; - const resetAt = DateTime.formatIso(DateTime.add(now, { minutes: 1 })); - yield* events.write({ - events: [ - { - id: EventId.make(`${name}:failed`), - type: "run.updated", - threadId, - occurredAt: now, - payload: { ...source, status: "failed", completedAt: now }, - }, - { - id: EventId.make(`${name}:error`), - type: "turn-item.updated", + } + const [source] = (yield* orchestrator.getThreadProjection(threadId)).runs as [ + OrchestrationV2Run, + ...Array, + ]; + const resetAt = DateTime.formatIso(DateTime.add(now, { minutes: 1 })); + yield* events.write({ + events: [ + { + id: EventId.make(`${name}:failed`), + type: "run.updated", + threadId, + occurredAt: now, + payload: { ...source, status: "failed", completedAt: now }, + }, + { + id: EventId.make(`${name}:error`), + type: "turn-item.updated", + threadId, + occurredAt: now, + payload: { + id: TurnItemId.make(`${name}:error`), + type: "error", threadId, - occurredAt: now, - payload: { - id: TurnItemId.make(`${name}:error`), - type: "error", - threadId, - runId: source.id, - nodeId: source.rootNodeId, - providerThreadId: null, - providerTurnId: null, - nativeItemRef: null, - parentItemId: null, - ordinal: 2, - status: "failed", - title: "Usage limit reached", - startedAt: now, - completedAt: now, - updatedAt: now, - failure: { - class: "usage_limit", - message: "Plan limit reached.", - code: "usageLimitExceeded", - retryable: null, - resetAt, - }, + runId: source.id, + nodeId: source.rootNodeId, + providerThreadId: null, + providerTurnId: null, + nativeItemRef: null, + parentItemId: null, + ordinal: 2, + status: "failed", + title: "Usage limit reached", + startedAt: now, + completedAt: now, + updatedAt: now, + failure: { + class: "usage_limit", + message: "Plan limit reached.", + code: "usageLimitExceeded", + retryable: null, + resetAt, }, }, - ], - }); - const shellOf = Effect.map(orchestrator.getShellSnapshot(), (snapshot) => - snapshot.threads.find((thread) => thread.id === threadId)!, - ); - return { orchestrator, threadId, source, resetAt, now, shellOf }; + }, + ], }); + const shellOf = Effect.map(orchestrator.getShellSnapshot(), (snapshot) => + snapshot.threads.find((thread) => thread.id === threadId)!, + ); + return { orchestrator, threadId, source, resetAt, now, shellOf }; +}); +it.layer(layerTest)("usage-limit recovery", (it) => { it.effect("hands a limited lead on to a linked thread once, and stops its own resume", () => Effect.gen(function* () { const { orchestrator, threadId, source, resetAt, now, shellOf } = @@ -14457,6 +14477,130 @@ it.layer(layerTest)("usage-limit recovery", (it) => { ); }); +// The orchestrator starts a thread's queue on a runtime mode change only under a managed ceiling. +const layerRuntimeModeCeilingTest = Layer.mergeAll( + RuntimeLayer.layer, + RuntimeLayer.layerEventSink, + ProjectStore.layer, + ProjectionStore.layer, + EffectOutbox.layer, + ThreadCommandExecutor.layer, +).pipe( + Layer.provide(McpSessionRegistryTestkit.layer), + Layer.provide(McpProviderSessions.layer), + Layer.provide(SqlitePersistence.layerMemory), + Layer.provide(layerCheckpointStoreTest), + Layer.provide(layerServerConfig), + Layer.provide( + ServerSettings.layerTest( + {}, + { + organization: "Example Corp", + lockedSettings: [], + limits: { maxRuntimeMode: "full-access" }, + }, + ), + ), + Layer.provide(layerTestProviderInstanceRegistry), + Layer.provide(layerGitWorkflowTest), + Layer.provide(layerProjectServiceTest), + Layer.provide(layerPlatformTest), +); + +it.layer(layerRuntimeModeCeilingTest)("the queue of a handed-on thread", (it) => { + it.effect("starts no queued run while the work continues in a linked thread", () => + Effect.gen(function* () { + const { orchestrator, threadId, source, resetAt } = yield* failLimitedLead( + "limited-lead-queue", + { queueBehind: true }, + ); + const runsOf = Effect.map(orchestrator.getThreadProjection(threadId), ({ runs }) => + runs.map((run) => [run.id, run.status]), + ); + const queued = (yield* orchestrator.getThreadProjection(threadId)).runs.find( + (run) => run.status === "queued", + )!; + assert.notEqual(queued.queueHeld, true); + for (const command of leadHandoffCommands({ + threadId, + title: "Limited lead", + runId: source.id, + resetAt, + substitute: { instanceId: alternateInstanceId, model: "gpt-5.4" }, + })) + yield* orchestrator.dispatch(command); + // The queued message is for a provider with no limit, so the limit does not hold it: only + // the hand-off stands between it and a second run here. + const events = yield* EventSink.EventSinkV2; + const substitute = { instanceId: alternateInstanceId, model: "gpt-5.4" }; + yield* events.write({ + events: [ + { + id: EventId.make("limited-lead-queue:other-provider"), + type: "run.updated", + threadId, + occurredAt: yield* DateTime.now, + payload: { + ...queued, + modelSelection: substitute, + providerInstanceId: alternateInstanceId, + }, + }, + ], + }); + + // The CLI's, a tool's or another client's resume learns why nothing starts. + for (const resume of [ + orchestrator.dispatch({ + type: "queue.resume", + commandId: CommandId.make("limited-lead-queue:resume"), + threadId, + }), + orchestrator.dispatch({ + type: "queued-run.start", + commandId: CommandId.make("limited-lead-queue:start-queued"), + threadId, + runId: queued.id, + }), + ]) { + const refused = yield* Effect.flip(resume); + assert.equal(refused._tag, "OrchestratorThreadHandedOnError"); + assert.equal( + refused.message, + "This conversation continues in a linked thread. Open that thread instead of resuming this one.", + ); + } + // What starts a queue with no one asking settles quietly: a mode change, and recovery. + yield* orchestrator.dispatch({ + type: "thread.runtime-mode.set", + commandId: CommandId.make("limited-lead-queue:mode"), + threadId, + runtimeMode: "approval-required", + }); + yield* orchestrator.resumeQueuedRuns; + assert.deepEqual(yield* runsOf, [ + [source.id, "failed"], + [queued.id, "queued"], + ]); + + // Deleting the linked thread gives the queue back. + yield* orchestrator.dispatch({ + type: "thread.delete", + commandId: CommandId.make("limited-lead-queue:delete-continued"), + threadId: leadHandoffThreadId(source.id), + }); + yield* orchestrator.dispatch({ + type: "queue.resume", + commandId: CommandId.make("limited-lead-queue:resume-reopened"), + threadId, + }); + const reopened = yield* runsOf; + assert.lengthOf(reopened, 2); + assert.notEqual(reopened[1]?.[1], "queued"); + }), + ); +}); + const queueResumeDisabledInstanceProjectId = ProjectId.make( "project:queue-resume-disabled-instance", );