@devries-cameron20 / t3code-1 / commits / bb1a66a3a4
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

feat(web): reference a side chat from its main thread with Add to chat and @ (#38323)

Co-authored-by: Yash Singh <saiansh2525@gmail.com>

Bilal Bakr committed Nov 20, 2026 at 03:58 UTC bb1a66a3a45f258da139a2a68f074b9fbc0f4b24
26 files changed +115 -142
apps/mobile/src/i18n/translations/de.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Nebenchat",
3 "23be753133ae6950": "Thread",
4 "0001ae5846061bb6": "Thread auf {machine}",
5 "eef7f4dacbc3c3f2": "Rechner",
@@ -4801,7 +4802,6 @@
4802 "13eb3e529a3e9bff": "Aus dem Thread entfernen",
4803 "986951276ab5723d": "Verknüpfung mit Thread lösen",
4804 "a9c188a91c93fdb4": "Beobachten konnte nicht geändert werden",
4804 - "4bcfa3b976a421cf": "Nebenchat",
4805 "afd7cfeb929fcdbd": "Der Nebenchat wurde erstellt, hat dieses Gerät aber nicht erreicht.",
4806 "0efeaa8d0ca3a757": "Der Nebenchat ist nicht mehr verfügbar.",
4807 "61fc2531d076d396": "Der Berechtigungsmodus des Nebenchats konnte nicht festgelegt werden.",
apps/mobile/src/i18n/translations/en.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Side chat",
3 "23be753133ae6950": "Thread",
4 "0001ae5846061bb6": "Thread on {machine}",
5 "eef7f4dacbc3c3f2": "Machine",
@@ -4802,7 +4803,6 @@
4803 "13eb3e529a3e9bff": "Dismiss from thread",
4804 "986951276ab5723d": "Unlink from thread",
4805 "a9c188a91c93fdb4": "Couldn't change watching",
4805 - "4bcfa3b976a421cf": "Side chat",
4806 "afd7cfeb929fcdbd": "The side chat was created, but it did not reach this device.",
4807 "0efeaa8d0ca3a757": "The side chat is no longer available.",
4808 "61fc2531d076d396": "Could not set the side chat's permission mode.",
apps/mobile/src/i18n/translations/es.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Chat lateral",
3 "23be753133ae6950": "Hilo",
4 "0001ae5846061bb6": "Hilo en {machine}",
5 "eef7f4dacbc3c3f2": "Máquina",
@@ -4794,7 +4795,6 @@
4795 "13eb3e529a3e9bff": "Descartar del hilo",
4796 "986951276ab5723d": "Desvincular del hilo",
4797 "a9c188a91c93fdb4": "No se pudo cambiar el seguimiento",
4797 - "4bcfa3b976a421cf": "Chat lateral",
4798 "afd7cfeb929fcdbd": "Se creó el chat lateral, pero no llegó a este dispositivo.",
4799 "0efeaa8d0ca3a757": "El chat lateral ya no está disponible.",
4800 "61fc2531d076d396": "No se pudo definir el modo de permisos del chat lateral.",
apps/mobile/src/i18n/translations/fr.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Discussion annexe",
3 "23be753133ae6950": "Fil",
4 "0001ae5846061bb6": "Fil sur {machine}",
5 "eef7f4dacbc3c3f2": "Machine",
@@ -4795,7 +4796,6 @@
4796 "13eb3e529a3e9bff": "Écarter du fil",
4797 "986951276ab5723d": "Dissocier du fil",
4798 "a9c188a91c93fdb4": "Impossible de modifier le suivi",
4798 - "4bcfa3b976a421cf": "Discussion annexe",
4799 "afd7cfeb929fcdbd": "La discussion annexe a été créée, mais elle n’est pas parvenue sur cet appareil.",
4800 "0efeaa8d0ca3a757": "La discussion annexe n’est plus disponible.",
4801 "61fc2531d076d396": "Impossible de définir le mode d’autorisation de la discussion annexe.",
apps/mobile/src/i18n/translations/ja.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "サイドチャット",
3 "23be753133ae6950": "スレッド",
4 "0001ae5846061bb6": "{machine} 上のスレッド",
5 "eef7f4dacbc3c3f2": "マシン",
@@ -4776,7 +4777,6 @@
4777 "13eb3e529a3e9bff": "スレッドから除外",
4778 "986951276ab5723d": "スレッドからリンクを解除",
4779 "a9c188a91c93fdb4": "監視を変更できませんでした",
4779 - "4bcfa3b976a421cf": "サイドチャット",
4780 "afd7cfeb929fcdbd": "サイドチャットは作成されましたが、このデバイスに届きませんでした。",
4781 "0efeaa8d0ca3a757": "サイドチャットは利用できなくなりました。",
4782 "61fc2531d076d396": "サイドチャットの権限モードを設定できませんでした。",
apps/mobile/src/i18n/translations/ko.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "사이드 채팅",
3 "23be753133ae6950": "스레드",
4 "0001ae5846061bb6": "{machine}의 스레드",
5 "eef7f4dacbc3c3f2": "머신",
@@ -4781,7 +4782,6 @@
4782 "13eb3e529a3e9bff": "스레드에서 제외",
4783 "986951276ab5723d": "스레드에서 연결 해제",
4784 "a9c188a91c93fdb4": "지켜보기를 변경할 수 없습니다",
4784 - "4bcfa3b976a421cf": "사이드 채팅",
4785 "afd7cfeb929fcdbd": "사이드 채팅이 생성되었지만 이 기기에 도착하지 않았습니다.",
4786 "0efeaa8d0ca3a757": "사이드 채팅을 더 이상 사용할 수 없습니다.",
4787 "61fc2531d076d396": "사이드 채팅의 권한 모드를 설정할 수 없습니다.",
apps/mobile/src/i18n/translations/pt-BR.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Chat paralelo",
3 "23be753133ae6950": "Thread",
4 "0001ae5846061bb6": "Thread em {machine}",
5 "eef7f4dacbc3c3f2": "Máquina",
@@ -4795,7 +4796,6 @@
4796 "13eb3e529a3e9bff": "Dispensar da thread",
4797 "986951276ab5723d": "Desvincular da thread",
4798 "a9c188a91c93fdb4": "Não foi possível alterar o acompanhamento",
4798 - "4bcfa3b976a421cf": "Chat paralelo",
4799 "afd7cfeb929fcdbd": "O chat paralelo foi criado, mas não chegou a este dispositivo.",
4800 "0efeaa8d0ca3a757": "O chat paralelo não está mais disponível.",
4801 "61fc2531d076d396": "Não foi possível definir o modo de permissão do chat paralelo.",
apps/mobile/src/i18n/translations/ru.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Боковой чат",
3 "23be753133ae6950": "Тред",
4 "0001ae5846061bb6": "Тред на {machine}",
5 "eef7f4dacbc3c3f2": "Машина",
@@ -4873,7 +4874,6 @@
4874 "13eb3e529a3e9bff": "Убрать из треда",
4875 "986951276ab5723d": "Отвязать от треда",
4876 "a9c188a91c93fdb4": "Не удалось изменить отслеживание",
4876 - "4bcfa3b976a421cf": "Боковой чат",
4877 "afd7cfeb929fcdbd": "Боковой чат создан, но не дошёл до этого устройства.",
4878 "0efeaa8d0ca3a757": "Боковой чат больше недоступен.",
4879 "61fc2531d076d396": "Не удалось задать режим разрешений бокового чата.",
apps/mobile/src/i18n/translations/sv.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Sidochatt",
3 "23be753133ae6950": "Tråd",
4 "0001ae5846061bb6": "Tråd på {machine}",
5 "eef7f4dacbc3c3f2": "Dator",
@@ -4801,7 +4802,6 @@
4802 "13eb3e529a3e9bff": "Avfärda från tråden",
4803 "986951276ab5723d": "Ta bort länk från tråd",
4804 "a9c188a91c93fdb4": "Kunde inte ändra bevakningen",
4804 - "4bcfa3b976a421cf": "Sidochatt",
4805 "afd7cfeb929fcdbd": "Sidochatten skapades, men den nådde inte den här enheten.",
4806 "0efeaa8d0ca3a757": "Sidochatten är inte längre tillgänglig.",
4807 "61fc2531d076d396": "Kunde inte ange sidochattens behörighetsläge.",
apps/mobile/src/i18n/translations/zh.json
+1 -1
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "侧聊",
3 "23be753133ae6950": "会话",
4 "0001ae5846061bb6": "{machine} 上的会话",
5 "eef7f4dacbc3c3f2": "机器",
@@ -4784,7 +4785,6 @@
4785 "13eb3e529a3e9bff": "从会话中忽略",
4786 "986951276ab5723d": "取消与会话的关联",
4787 "a9c188a91c93fdb4": "无法更改关注状态",
4787 - "4bcfa3b976a421cf": "侧聊",
4788 "afd7cfeb929fcdbd": "侧聊已创建,但未同步到此设备。",
4789 "0efeaa8d0ca3a757": "这段侧聊已不可用。",
4790 "61fc2531d076d396": "无法设置侧聊的权限模式。",
apps/web/src/components/ThreadContextChip.tsx
+16 -1
@@ -1,9 +1,11 @@
1 import { scopeProjectRef } from "@t3tools/client-runtime/environment";
2 import type { ThreadContextRecord, ProjectId } from "@t3tools/contracts";
3 -import { Link } from "@tanstack/react-router";
3 +import { Link, useNavigate } from "@tanstack/react-router";
4 import { MessagesSquareIcon } from "lucide-react";
5 import { useGT } from "gt-react";
6
7 +import { resolveThreadOpenRoute } from "~/lib/sideChatPane";
8 +import { buildThreadRouteParams } from "~/threadRoutes";
9 import { useProject, useThreadShell } from "~/state/entities";
10 import { orchestrationEnvironment } from "~/state/orchestration";
11 import { useEnvironmentQuery } from "~/state/query";
@@ -32,6 +34,7 @@ export function ThreadContextChip(props: {
34 const projectId = shell?.projectId ?? props.projectId ?? metadata?.projectId;
35 const project = useProject(projectId ? scopeProjectRef(environmentId, projectId) : null);
36 const title = shell?.title?.trim() || metadata?.title.trim() || props.record.title;
37 + const navigate = useNavigate();
38 return (
39 <Tooltip>
40 <TooltipTrigger
@@ -43,6 +46,18 @@ export function ThreadContextChip(props: {
46 <Link
47 to="/$environmentId/$threadId"
48 params={{ environmentId, threadId }}
49 + onClick={(event) => {
50 + if (shell?.lineage.sideChat !== true || event.button !== 0) return;
51 + if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
52 + // A side chat opens as a tab beside its parent, not as its own page.
53 + event.preventDefault();
54 + void navigate({
55 + to: "/$environmentId/$threadId",
56 + params: buildThreadRouteParams(
57 + resolveThreadOpenRoute({ environmentId, threadId }, shell),
58 + ),
59 + });
60 + }}
61 draggable={false}
62 />
63 }
apps/web/src/components/chat/MarkdownThreadLink.browser.test.tsx
+5
@@ -51,6 +51,11 @@ function setup() {
51 id: ThreadId.make("older-thread"),
52 title: "Remote thread",
53 projectId: ProjectId.make("essay-project"),
54 + lineage: {
55 + rootThreadId: ThreadId.make("older-thread"),
56 + parentThreadId: null,
57 + relationshipToParent: null,
58 + },
59 };
60 return { reply, registry: AtomRegistry.make() };
61 }
apps/web/src/components/chat/SideChatPane.tsx
+17 -43
@@ -1,6 +1,4 @@
1 import { scopeThreadRef } from "@t3tools/client-runtime/environment";
2 -import { threadRuntimeIsActive } from "@t3tools/client-runtime/state/shell";
3 -import { resolveLatestMergeBackRun } from "@t3tools/client-runtime/state/thread-workflows";
2 import {
3 isAtomCommandInterrupted,
4 settlePromise,
@@ -11,6 +9,7 @@ import {
9 type ScopedThreadRef,
10 type ThreadId,
11 } from "@t3tools/contracts";
12 +import { threadContextRecord } from "@t3tools/shared/composerContextReferences";
13 import { T, useGT } from "gt-react";
14 import { Trash2Icon, XIcon } from "lucide-react";
15 import { useEffect, useState } from "react";
@@ -22,7 +21,7 @@ import { releaseComposerDraftUploads } from "../../lib/composerDraftUploads";
21 import type { SideChatParentPanel } from "../../lib/sideChatPane";
22 import { readLocalApi } from "../../localApi";
23 import { hostRightPanel, useRightPanelStore } from "../../rightPanelStore";
25 -import { useQuietThreadProjection, useQuietThreadShell } from "../../state/entities";
24 +import { useQuietThreadShell } from "../../state/entities";
25 import { useEnvironmentScope } from "../../state/session";
26 import { useEnvironmentShellHasSnapshot } from "../../state/shell";
27 import { threadEnvironment } from "../../state/threads";
@@ -33,7 +32,7 @@ import { toastManager } from "../ui/toast";
32 import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
33 import { BackgroundThreadContext } from "./backgroundThread";
34
36 -/** A side chat tab: its title, Bring back, Delete and Close, over the side chat's own chat. */
35 +/** A side chat tab: its title, Add to chat, Delete and Close, over the side chat's own chat. */
36 export default function SideChatPane(props: {
37 readonly parentRef: ScopedThreadRef;
38 readonly threadId: ThreadId;
@@ -49,47 +48,20 @@ export default function SideChatPane(props: {
48 [parentRef, threadId],
49 );
50 const shell = useQuietThreadShell(threadRef);
52 - const parent = useQuietThreadShell(parentRef);
51 const snapshotLoaded = useEnvironmentShellHasSnapshot(parentRef.environmentId);
54 - const projection = useQuietThreadProjection(shell === null ? null : threadRef)?.projection;
52 const canOperate = useEnvironmentScope(parentRef.environmentId, AuthOrchestrationOperateScope);
56 - const mergeBack = useAtomCommand(threadEnvironment.mergeBack, { reportFailure: false });
53 const deleteThread = useAtomCommand(threadEnvironment.delete, { reportFailure: false });
54 const confirmThreadDelete = useClientSettings((settings) => settings.confirmThreadDelete);
59 - const [bringingBack, setBringingBack] = useState(false);
55 const [deleting, setDeleting] = useState(false);
61 - const mergeRun = projection ? resolveLatestMergeBackRun(projection) : null;
62 - // A pending merge-back would fail the main thread's queued message, so the server refuses it.
63 - const bringBackBlockedReason = !canOperate
64 - ? gt("This connection cannot change threads.")
65 - : threadRuntimeIsActive(parent?.runtime)
66 - ? gt("Available when the main thread is idle.")
67 - : mergeRun === null
68 - ? gt("Available after a finished reply.")
69 - : null;
70 -
71 - const bringBack = async () => {
72 - if (bringBackBlockedReason !== null || mergeRun === null || bringingBack) return;
73 - setBringingBack(true);
74 - const result = await mergeBack({
75 - environmentId: parentRef.environmentId,
76 - input: { sourceThreadId: threadId, targetThreadId: parentRef.threadId, runId: mergeRun.id },
77 - });
78 - setBringingBack(false);
79 - if (result._tag === "Success") {
80 - toastManager.add({
81 - type: "success",
82 - title: gt("Brought back"),
83 - description: gt("The main thread gets this side chat with your next message there."),
84 - });
85 - } else if (!isAtomCommandInterrupted(result)) {
86 - const error = squashAtomCommandFailure(result);
87 - toastManager.add({
88 - type: "error",
89 - title: gt("Could not bring back the side chat"),
90 - ...(error instanceof Error ? { description: error.message } : {}),
56 + // Closing an unused side chat deletes it, which would leave the link unreadable.
57 + const canAddToChat = shell !== null && shell.latestUserMessageAt !== null;
58 + const addToChat = () => {
59 + if (!canAddToChat) return;
60 + useComposerDraftStore
61 + .getState()
62 + .addThreadContexts(parentRef, [threadContextRecord(threadRef, shell.title)], {
63 + insertAtCaret: false,
64 });
92 - }
65 };
66
67 const deleteSideChat = async () => {
@@ -140,15 +112,17 @@ export default function SideChatPane(props: {
112 <Button
113 variant="ghost"
114 size="xs"
143 - aria-disabled={bringBackBlockedReason !== null || bringingBack || undefined}
144 - onClick={() => void bringBack()}
115 + aria-disabled={!canAddToChat || undefined}
116 + onClick={addToChat}
117 >
146 - <T>Bring back</T>
118 + <T>Add to chat</T>
119 </Button>
120 }
121 />
122 <TooltipPopup side="bottom">
151 - {bringBackBlockedReason ?? gt("Adds this side chat to the main thread's next message.")}
123 + {canAddToChat
124 + ? gt("Adds this side chat to the main thread's next message.")
125 + : gt("Available after the first message.")}
126 </TooltipPopup>
127 </Tooltip>
128 <Button
apps/web/src/i18n/translations/de.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Nebenchat",
3 "23be753133ae6950": "Thread",
4 "0001ae5846061bb6": "Thread auf {machine}",
5 "eef7f4dacbc3c3f2": "Rechner",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Verknüpfte Elemente",
2331 "ac0de2a59d9c8860": "Gerät",
2332 "1354df9fb7278843": "Einen iOS-Simulator oder Android-Emulator ansehen.",
2332 - "4bcfa3b976a421cf": "Nebenchat",
2333 "fdcd9643e2e63b15": "Stelle eine Nebenfrage, während dieser Thread weiterarbeitet.",
2334 "314cfeebf191ba0d": "Genehmigung nötig",
2335 "4e5b7363441a3831": "Eingabe nötig",
@@ -3911,18 +3911,13 @@
3911 "5e7157db126f1641": "Issues nicht verfügbar",
3912 "42ade0e14ff6af94": "Aktualisiere den T3-Code-Server dieser Umgebung, um Issues zu durchsuchen.",
3913 "993dcd04611f9571": "Sicher speichern",
3914 - "55390eede35b4c5b": "Verfügbar, wenn der Haupt-Thread inaktiv ist.",
3915 - "adb7e02a95cde08e": "Verfügbar nach einer abgeschlossenen Antwort.",
3916 - "528a915a5a8da499": "Zurückgeholt",
3917 - "cadee16eb4a6a398": "Der Haupt-Thread erhält diesen Nebenchat mit deiner nächsten Nachricht dort.",
3918 - "46e115f4d73fdaad": "Der Nebenchat konnte nicht zurückgeholt werden",
3914 "ccbe48efc8e30c52": "Nebenchat „{title}“ löschen?",
3915 "3a859b690f41e899": "Dadurch wird sein Gesprächsverlauf dauerhaft gelöscht.",
3916 "980f2db81b9eb4b5": "Der Nebenchat konnte nicht gelöscht werden",
3917 "c1844a6d9443df20": "Fügt diesen Nebenchat der nächsten Nachricht des Haupt-Threads hinzu.",
3918 "e42d6bd2de470521": "Nebenchat löschen",
3919 "6a116665c8d9ad75": "Nebenchat schließen",
3925 - "9bd31b8911a11607": "Zurückholen",
3920 + "a5e57fdfde50aade": "Zum Chat hinzufügen",
3921 "492a438bf9dbd45d": "Dieser Nebenchat wurde gelöscht.",
3922 "7350aa3df15b9802": "Skill {label}",
3923 "9ff9f24d1568fbaf": "Für diesen Skill ist keine Beschreibung verfügbar.",
@@ -6808,7 +6803,6 @@
6803 "3f9bc820dffd099f": "Antwort",
6804 "7975bd47236d8207": "Auf diese Unterhaltung antworten",
6805 "8fa405d27bb3180a": "Ausstehend. Wird gesendet, wenn du das Review abschickst",
6811 - "a5e57fdfde50aade": "Zum Chat hinzufügen",
6806 "9dde74668b73ad29": "Antworten",
6807 "904e8e33ad31d233": "Kommentieren",
6808 "7e0db7bc417222c3": "Review abgeschickt",
apps/web/src/i18n/translations/en.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Side chat",
3 "23be753133ae6950": "Thread",
4 "0001ae5846061bb6": "Thread on {machine}",
5 "eef7f4dacbc3c3f2": "Machine",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Linked items",
2331 "ac0de2a59d9c8860": "Device",
2332 "1354df9fb7278843": "Watch an iOS Simulator or Android Emulator.",
2332 - "4bcfa3b976a421cf": "Side chat",
2333 "fdcd9643e2e63b15": "Ask a side question while this thread keeps working.",
2334 "314cfeebf191ba0d": "needs approval",
2335 "4e5b7363441a3831": "needs input",
@@ -3909,18 +3909,13 @@
3909 "5e7157db126f1641": "Issues unavailable",
3910 "42ade0e14ff6af94": "Update this environment's T3 Code server to browse issues.",
3911 "993dcd04611f9571": "Save securely",
3912 - "55390eede35b4c5b": "Available when the main thread is idle.",
3913 - "adb7e02a95cde08e": "Available after a finished reply.",
3914 - "528a915a5a8da499": "Brought back",
3915 - "cadee16eb4a6a398": "The main thread gets this side chat with your next message there.",
3916 - "46e115f4d73fdaad": "Could not bring back the side chat",
3912 "ccbe48efc8e30c52": "Delete side chat \"{title}\"?",
3913 "3a859b690f41e899": "This permanently clears its conversation history.",
3914 "980f2db81b9eb4b5": "Could not delete the side chat",
3915 "c1844a6d9443df20": "Adds this side chat to the main thread's next message.",
3916 "e42d6bd2de470521": "Delete side chat",
3917 "6a116665c8d9ad75": "Close side chat",
3923 - "9bd31b8911a11607": "Bring back",
3918 + "a5e57fdfde50aade": "Add to chat",
3919 "492a438bf9dbd45d": "This side chat was deleted.",
3920 "7350aa3df15b9802": "Skill {label}",
3921 "9ff9f24d1568fbaf": "No description is available for this skill.",
@@ -6814,7 +6809,6 @@
6809 "3f9bc820dffd099f": "Reply",
6810 "7975bd47236d8207": "Reply to this conversation",
6811 "8fa405d27bb3180a": "Pending. Sent when you submit the review",
6817 - "a5e57fdfde50aade": "Add to chat",
6812 "9dde74668b73ad29": "Reply",
6813 "904e8e33ad31d233": "Comment",
6814 "7e0db7bc417222c3": "Review submitted",
apps/web/src/i18n/translations/es.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Chat lateral",
3 "23be753133ae6950": "Hilo",
4 "0001ae5846061bb6": "Hilo en {machine}",
5 "eef7f4dacbc3c3f2": "Máquina",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Elementos vinculados",
2331 "ac0de2a59d9c8860": "Dispositivo",
2332 "1354df9fb7278843": "Mira un simulador de iOS o un emulador de Android.",
2332 - "4bcfa3b976a421cf": "Chat lateral",
2333 "fdcd9643e2e63b15": "Haz una pregunta aparte mientras este hilo sigue trabajando.",
2334 "314cfeebf191ba0d": "necesita aprobación",
2335 "4e5b7363441a3831": "necesita respuesta",
@@ -3907,18 +3907,13 @@
3907 "5e7157db126f1641": "Issues no disponibles",
3908 "42ade0e14ff6af94": "Actualiza el servidor de T3 Code de este entorno para explorar issues.",
3909 "993dcd04611f9571": "Guardar de forma segura",
3910 - "55390eede35b4c5b": "Disponible cuando el hilo principal está inactivo.",
3911 - "adb7e02a95cde08e": "Disponible después de una respuesta terminada.",
3912 - "528a915a5a8da499": "Recuperado",
3913 - "cadee16eb4a6a398": "El hilo principal recibe este chat lateral con tu próximo mensaje allí.",
3914 - "46e115f4d73fdaad": "No se pudo recuperar el chat lateral",
3910 "ccbe48efc8e30c52": "¿Eliminar el chat lateral \"{title}\"?",
3911 "3a859b690f41e899": "Esto borra de forma permanente su historial de conversación.",
3912 "980f2db81b9eb4b5": "No se pudo eliminar el chat lateral",
3913 "c1844a6d9443df20": "Añade este chat lateral al próximo mensaje del hilo principal.",
3914 "e42d6bd2de470521": "Eliminar chat lateral",
3915 "6a116665c8d9ad75": "Cerrar chat lateral",
3921 - "9bd31b8911a11607": "Recuperar",
3916 + "a5e57fdfde50aade": "Añadir al chat",
3917 "492a438bf9dbd45d": "Este chat lateral se eliminó.",
3918 "7350aa3df15b9802": "Skill {label}",
3919 "9ff9f24d1568fbaf": "No hay descripción disponible para esta skill.",
@@ -6807,7 +6802,6 @@
6802 "3f9bc820dffd099f": "Responder",
6803 "7975bd47236d8207": "Responder a esta conversación",
6804 "8fa405d27bb3180a": "Pendiente. Se envía cuando envíes la revisión",
6810 - "a5e57fdfde50aade": "Añadir al chat",
6805 "9dde74668b73ad29": "Responder",
6806 "904e8e33ad31d233": "Comentar",
6807 "7e0db7bc417222c3": "Revisión enviada",
apps/web/src/i18n/translations/fr.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Discussion annexe",
3 "23be753133ae6950": "Fil",
4 "0001ae5846061bb6": "Fil sur {machine}",
5 "eef7f4dacbc3c3f2": "Machine",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Éléments associés",
2331 "ac0de2a59d9c8860": "Appareil",
2332 "1354df9fb7278843": "Regardez un simulateur iOS ou un émulateur Android.",
2332 - "4bcfa3b976a421cf": "Discussion annexe",
2333 "fdcd9643e2e63b15": "Posez une question annexe pendant que ce fil continue de travailler.",
2334 "314cfeebf191ba0d": "approbation requise",
2335 "4e5b7363441a3831": "réponse requise",
@@ -3908,18 +3908,13 @@
3908 "5e7157db126f1641": "Tickets indisponibles",
3909 "42ade0e14ff6af94": "Mettez à jour le serveur T3 Code de cet environnement pour parcourir les tickets.",
3910 "993dcd04611f9571": "Enregistrer de façon sécurisée",
3911 - "55390eede35b4c5b": "Disponible quand le fil principal est inactif.",
3912 - "adb7e02a95cde08e": "Disponible après une réponse terminée.",
3913 - "528a915a5a8da499": "Ramenée",
3914 - "cadee16eb4a6a398": "Le fil principal recevra cette discussion annexe avec votre prochain message dans ce fil.",
3915 - "46e115f4d73fdaad": "Impossible de ramener la discussion annexe",
3911 "ccbe48efc8e30c52": "Supprimer la discussion annexe « {title} » ?",
3912 "3a859b690f41e899": "Cela efface définitivement son historique de conversation.",
3913 "980f2db81b9eb4b5": "Impossible de supprimer la discussion annexe",
3914 "c1844a6d9443df20": "Ajoute cette discussion annexe au prochain message du fil principal.",
3915 "e42d6bd2de470521": "Supprimer la discussion annexe",
3916 "6a116665c8d9ad75": "Fermer la discussion annexe",
3922 - "9bd31b8911a11607": "Ramener",
3917 + "a5e57fdfde50aade": "Ajouter à la discussion",
3918 "492a438bf9dbd45d": "Cette discussion annexe a été supprimée.",
3919 "7350aa3df15b9802": "Skill {label}",
3920 "9ff9f24d1568fbaf": "Aucune description n’est disponible pour ce skill.",
@@ -6808,7 +6803,6 @@
6803 "3f9bc820dffd099f": "Répondre",
6804 "7975bd47236d8207": "Répondre à cette conversation",
6805 "8fa405d27bb3180a": "En attente. Envoyé quand vous soumettez la revue",
6811 - "a5e57fdfde50aade": "Ajouter à la discussion",
6806 "9dde74668b73ad29": "Répondre",
6807 "904e8e33ad31d233": "Commenter",
6808 "7e0db7bc417222c3": "Revue soumise",
apps/web/src/i18n/translations/ja.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "サイドチャット",
3 "23be753133ae6950": "スレッド",
4 "0001ae5846061bb6": "{machine} 上のスレッド",
5 "eef7f4dacbc3c3f2": "マシン",
@@ -2327,7 +2328,6 @@
2328 "ad3929f0103925d7": "リンクされた項目",
2329 "ac0de2a59d9c8860": "デバイス",
2330 "1354df9fb7278843": "iOS シミュレーターまたは Android エミュレーターを表示します。",
2330 - "4bcfa3b976a421cf": "サイドチャット",
2331 "fdcd9643e2e63b15": "このスレッドの作業を続けたまま、別の質問をします。",
2332 "314cfeebf191ba0d": "承認が必要",
2333 "4e5b7363441a3831": "入力が必要",
@@ -3898,18 +3898,13 @@
3898 "5e7157db126f1641": "Issue を利用できません",
3899 "42ade0e14ff6af94": "Issue を参照するには、この環境の T3 Code サーバーを更新してください。",
3900 "993dcd04611f9571": "安全に保存",
3901 - "55390eede35b4c5b": "メインスレッドがアイドル状態のときに利用できます。",
3902 - "adb7e02a95cde08e": "返信が完了した後に利用できます。",
3903 - "528a915a5a8da499": "戻しました",
3904 - "cadee16eb4a6a398": "メインスレッドで次にメッセージを送信すると、このサイドチャットが渡されます。",
3905 - "46e115f4d73fdaad": "サイドチャットを戻せませんでした",
3901 "ccbe48efc8e30c52": "サイドチャット「{title}」を削除しますか?",
3902 "3a859b690f41e899": "会話履歴が完全に消去されます。",
3903 "980f2db81b9eb4b5": "サイドチャットを削除できませんでした",
3904 "c1844a6d9443df20": "このサイドチャットをメインスレッドの次のメッセージに追加します。",
3905 "e42d6bd2de470521": "サイドチャットを削除",
3906 "6a116665c8d9ad75": "サイドチャットを閉じる",
3912 - "9bd31b8911a11607": "戻す",
3907 + "a5e57fdfde50aade": "チャットに追加",
3908 "492a438bf9dbd45d": "このサイドチャットは削除されました。",
3909 "7350aa3df15b9802": "スキル {label}",
3910 "9ff9f24d1568fbaf": "このスキルには説明がありません。",
@@ -6776,7 +6771,6 @@
6771 "3f9bc820dffd099f": "返信",
6772 "7975bd47236d8207": "この会話に返信",
6773 "8fa405d27bb3180a": "保留中。レビューの送信時に送られます",
6779 - "a5e57fdfde50aade": "チャットに追加",
6774 "9dde74668b73ad29": "返信",
6775 "904e8e33ad31d233": "コメント",
6776 "7e0db7bc417222c3": "レビューを送信しました",
apps/web/src/i18n/translations/ko.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "사이드 채팅",
3 "23be753133ae6950": "스레드",
4 "0001ae5846061bb6": "{machine}의 스레드",
5 "eef7f4dacbc3c3f2": "머신",
@@ -2328,7 +2329,6 @@
2329 "ad3929f0103925d7": "연결된 항목",
2330 "ac0de2a59d9c8860": "기기",
2331 "1354df9fb7278843": "iOS 시뮬레이터나 Android 에뮬레이터를 봅니다.",
2331 - "4bcfa3b976a421cf": "사이드 채팅",
2332 "fdcd9643e2e63b15": "이 스레드가 계속 작업하는 동안 곁가지 질문을 하세요.",
2333 "314cfeebf191ba0d": "승인 필요",
2334 "4e5b7363441a3831": "입력 필요",
@@ -3896,18 +3896,13 @@
3896 "5e7157db126f1641": "이슈를 사용할 수 없음",
3897 "42ade0e14ff6af94": "이슈를 탐색하려면 이 환경의 T3 Code 서버를 업데이트하세요.",
3898 "993dcd04611f9571": "안전하게 저장",
3899 - "55390eede35b4c5b": "기본 스레드가 유휴 상태일 때 사용할 수 있습니다.",
3900 - "adb7e02a95cde08e": "답변이 끝난 후 사용할 수 있습니다.",
3901 - "528a915a5a8da499": "다시 가져옴",
3902 - "cadee16eb4a6a398": "기본 스레드에서 다음 메시지를 보낼 때 이 사이드 채팅이 함께 전달됩니다.",
3903 - "46e115f4d73fdaad": "사이드 채팅을 다시 가져올 수 없습니다",
3899 "ccbe48efc8e30c52": "사이드 채팅 \"{title}\"을(를) 삭제할까요?",
3900 "3a859b690f41e899": "대화 기록이 영구적으로 삭제됩니다.",
3901 "980f2db81b9eb4b5": "사이드 채팅을 삭제할 수 없습니다",
3902 "c1844a6d9443df20": "이 사이드 채팅을 기본 스레드의 다음 메시지에 추가합니다.",
3903 "e42d6bd2de470521": "사이드 채팅 삭제",
3904 "6a116665c8d9ad75": "사이드 채팅 닫기",
3910 - "9bd31b8911a11607": "다시 가져오기",
3905 + "a5e57fdfde50aade": "채팅에 추가",
3906 "492a438bf9dbd45d": "이 사이드 채팅은 삭제되었습니다.",
3907 "7350aa3df15b9802": "스킬 {label}",
3908 "9ff9f24d1568fbaf": "이 스킬에 대한 설명이 없습니다.",
@@ -6780,7 +6775,6 @@
6775 "3f9bc820dffd099f": "답글",
6776 "7975bd47236d8207": "이 대화에 답글 달기",
6777 "8fa405d27bb3180a": "대기 중. 검토를 제출할 때 전송됨",
6783 - "a5e57fdfde50aade": "채팅에 추가",
6778 "9dde74668b73ad29": "답글",
6779 "904e8e33ad31d233": "댓글",
6780 "7e0db7bc417222c3": "검토 제출됨",
apps/web/src/i18n/translations/pt-BR.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Chat paralelo",
3 "23be753133ae6950": "Thread",
4 "0001ae5846061bb6": "Thread em {machine}",
5 "eef7f4dacbc3c3f2": "Máquina",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Itens vinculados",
2331 "ac0de2a59d9c8860": "Dispositivo",
2332 "1354df9fb7278843": "Acompanhe um iOS Simulator ou Android Emulator.",
2332 - "4bcfa3b976a421cf": "Chat paralelo",
2333 "fdcd9643e2e63b15": "Faça uma pergunta paralela enquanto esta thread continua trabalhando.",
2334 "314cfeebf191ba0d": "precisa de aprovação",
2335 "4e5b7363441a3831": "precisa de resposta",
@@ -3908,18 +3908,13 @@
3908 "5e7157db126f1641": "Issues indisponíveis",
3909 "42ade0e14ff6af94": "Atualize o servidor do T3 Code deste ambiente para navegar pelas issues.",
3910 "993dcd04611f9571": "Salvar com segurança",
3911 - "55390eede35b4c5b": "Disponível quando a thread principal estiver ociosa.",
3912 - "adb7e02a95cde08e": "Disponível após uma resposta concluída.",
3913 - "528a915a5a8da499": "Trazido de volta",
3914 - "cadee16eb4a6a398": "A thread principal recebe este chat paralelo junto com sua próxima mensagem lá.",
3915 - "46e115f4d73fdaad": "Não foi possível trazer de volta o chat paralelo",
3911 "ccbe48efc8e30c52": "Excluir o chat paralelo \"{title}\"?",
3912 "3a859b690f41e899": "Isso apaga permanentemente o histórico dele.",
3913 "980f2db81b9eb4b5": "Não foi possível excluir o chat paralelo",
3914 "c1844a6d9443df20": "Adiciona este chat paralelo à próxima mensagem da thread principal.",
3915 "e42d6bd2de470521": "Excluir chat paralelo",
3916 "6a116665c8d9ad75": "Fechar chat paralelo",
3922 - "9bd31b8911a11607": "Trazer de volta",
3917 + "a5e57fdfde50aade": "Adicionar ao chat",
3918 "492a438bf9dbd45d": "Este chat paralelo foi excluído.",
3919 "7350aa3df15b9802": "Skill {label}",
3920 "9ff9f24d1568fbaf": "Não há descrição disponível para esta skill.",
@@ -6807,7 +6802,6 @@
6802 "3f9bc820dffd099f": "Resposta",
6803 "7975bd47236d8207": "Responder a esta discussão",
6804 "8fa405d27bb3180a": "Pendente. Enviado quando você enviar a revisão",
6810 - "a5e57fdfde50aade": "Adicionar ao chat",
6805 "9dde74668b73ad29": "Responder",
6806 "904e8e33ad31d233": "Comentar",
6807 "7e0db7bc417222c3": "Revisão enviada",
apps/web/src/i18n/translations/ru.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Боковой чат",
3 "23be753133ae6950": "Тред",
4 "0001ae5846061bb6": "Тред на {machine}",
5 "eef7f4dacbc3c3f2": "Машина",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Привязанные элементы",
2331 "ac0de2a59d9c8860": "Устройство",
2332 "1354df9fb7278843": "Смотрите на iOS Simulator или Android Emulator.",
2332 - "4bcfa3b976a421cf": "Боковой чат",
2333 "fdcd9643e2e63b15": "Задайте побочный вопрос, пока тред продолжает работу.",
2334 "314cfeebf191ba0d": "нужно подтверждение",
2335 "4e5b7363441a3831": "нужен ввод",
@@ -3908,18 +3908,13 @@
3908 "5e7157db126f1641": "Issue недоступны",
3909 "42ade0e14ff6af94": "Обновите сервер T3 Code в этом окружении, чтобы просматривать issue.",
3910 "993dcd04611f9571": "Сохранить безопасно",
3911 - "55390eede35b4c5b": "Доступно, когда основной тред простаивает.",
3912 - "adb7e02a95cde08e": "Доступно после завершённого ответа.",
3913 - "528a915a5a8da499": "Возвращено",
3914 - "cadee16eb4a6a398": "Основной тред получит этот боковой чат вместе с вашим следующим сообщением там.",
3915 - "46e115f4d73fdaad": "Не удалось вернуть боковой чат",
3911 "ccbe48efc8e30c52": "Удалить боковой чат «{title}»?",
3912 "3a859b690f41e899": "Его история беседы будет удалена безвозвратно.",
3913 "980f2db81b9eb4b5": "Не удалось удалить боковой чат",
3914 "c1844a6d9443df20": "Добавляет этот боковой чат к следующему сообщению основного треда.",
3915 "e42d6bd2de470521": "Удалить боковой чат",
3916 "6a116665c8d9ad75": "Закрыть боковой чат",
3922 - "9bd31b8911a11607": "Вернуть",
3917 + "a5e57fdfde50aade": "Добавить в чат",
3918 "492a438bf9dbd45d": "Этот боковой чат удалён.",
3919 "7350aa3df15b9802": "Навык {label}",
3920 "9ff9f24d1568fbaf": "У этого навыка нет описания.",
@@ -6807,7 +6802,6 @@
6802 "3f9bc820dffd099f": "Ответ",
6803 "7975bd47236d8207": "Ответить в этом обсуждении",
6804 "8fa405d27bb3180a": "Ожидает. Будет отправлен вместе с ревью",
6810 - "a5e57fdfde50aade": "Добавить в чат",
6805 "9dde74668b73ad29": "Ответить",
6806 "904e8e33ad31d233": "Комментарий",
6807 "7e0db7bc417222c3": "Ревью отправлено",
apps/web/src/i18n/translations/sv.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "Sidochatt",
3 "23be753133ae6950": "Tråd",
4 "0001ae5846061bb6": "Tråd på {machine}",
5 "eef7f4dacbc3c3f2": "Dator",
@@ -2329,7 +2330,6 @@
2330 "ad3929f0103925d7": "Länkade objekt",
2331 "ac0de2a59d9c8860": "Enhet",
2332 "1354df9fb7278843": "Titta på en iOS-simulator eller Android-emulator.",
2332 - "4bcfa3b976a421cf": "Sidochatt",
2333 "fdcd9643e2e63b15": "Ställ en sidofråga medan tråden fortsätter arbeta.",
2334 "314cfeebf191ba0d": "behöver godkännande",
2335 "4e5b7363441a3831": "behöver input",
@@ -3908,18 +3908,13 @@
3908 "5e7157db126f1641": "Ärenden är inte tillgängliga",
3909 "42ade0e14ff6af94": "Uppdatera T3 Code-servern i den här miljön för att bläddra bland ärenden.",
3910 "993dcd04611f9571": "Spara säkert",
3911 - "55390eede35b4c5b": "Tillgängligt när huvudtråden är inaktiv.",
3912 - "adb7e02a95cde08e": "Tillgängligt efter ett färdigt svar.",
3913 - "528a915a5a8da499": "Hämtad tillbaka",
3914 - "cadee16eb4a6a398": "Huvudtråden får den här sidochatten med ditt nästa meddelande där.",
3915 - "46e115f4d73fdaad": "Kunde inte hämta tillbaka sidochatten",
3911 "ccbe48efc8e30c52": "Ta bort sidochatten ”{title}”?",
3912 "3a859b690f41e899": "Det här rensar dess konversationshistorik permanent.",
3913 "980f2db81b9eb4b5": "Kunde inte ta bort sidochatten",
3914 "c1844a6d9443df20": "Lägger till den här sidochatten i huvudtrådens nästa meddelande.",
3915 "e42d6bd2de470521": "Ta bort sidochatt",
3916 "6a116665c8d9ad75": "Stäng sidochatt",
3922 - "9bd31b8911a11607": "Hämta tillbaka",
3917 + "a5e57fdfde50aade": "Lägg till i chatten",
3918 "492a438bf9dbd45d": "Den här sidochatten togs bort.",
3919 "7350aa3df15b9802": "Färdighet {label}",
3920 "9ff9f24d1568fbaf": "Ingen beskrivning finns för den här färdigheten.",
@@ -6813,7 +6808,6 @@
6808 "3f9bc820dffd099f": "Svar",
6809 "7975bd47236d8207": "Svara i den här konversationen",
6810 "8fa405d27bb3180a": "Väntande. Skickas när du skickar granskningen",
6816 - "a5e57fdfde50aade": "Lägg till i chatten",
6811 "9dde74668b73ad29": "Svara",
6812 "904e8e33ad31d233": "Kommentar",
6813 "7e0db7bc417222c3": "Granskningen skickades",
apps/web/src/i18n/translations/zh.json
+2 -8
@@ -1,4 +1,5 @@
1 {
2 + "4bcfa3b976a421cf": "侧聊",
3 "23be753133ae6950": "会话",
4 "0001ae5846061bb6": "{machine} 上的会话",
5 "eef7f4dacbc3c3f2": "机器",
@@ -2333,7 +2334,6 @@
2334 "ad3929f0103925d7": "已关联项",
2335 "ac0de2a59d9c8860": "设备",
2336 "1354df9fb7278843": "查看 iOS 模拟器或 Android 模拟器。",
2336 - "4bcfa3b976a421cf": "侧聊",
2337 "fdcd9643e2e63b15": "在会话继续运行的同时追问一个旁支问题。",
2338 "314cfeebf191ba0d": "待批准",
2339 "4e5b7363441a3831": "待输入",
@@ -3913,18 +3913,13 @@
3913 "5e7157db126f1641": "issue 不可用",
3914 "42ade0e14ff6af94": "请更新此环境的 T3 Code 服务器以浏览 issue。",
3915 "993dcd04611f9571": "安全保存",
3916 - "55390eede35b4c5b": "主会话空闲时可用。",
3917 - "adb7e02a95cde08e": "有完整回复后可用。",
3918 - "528a915a5a8da499": "已带回",
3919 - "cadee16eb4a6a398": "你下次在主会话发消息时,会附带这段侧聊。",
3920 - "46e115f4d73fdaad": "无法带回侧聊",
3916 "ccbe48efc8e30c52": "删除侧聊“{title}”?",
3917 "3a859b690f41e899": "这会永久清除它的对话记录。",
3918 "980f2db81b9eb4b5": "无法删除侧聊",
3919 "c1844a6d9443df20": "把这段侧聊附加到主会话的下一条消息中。",
3920 "e42d6bd2de470521": "删除侧聊",
3921 "6a116665c8d9ad75": "关闭侧聊",
3927 - "9bd31b8911a11607": "带回主会话",
3922 + "a5e57fdfde50aade": "添加到对话",
3923 "492a438bf9dbd45d": "这段侧聊已删除。",
3924 "7350aa3df15b9802": "技能 {label}",
3925 "9ff9f24d1568fbaf": "这个技能没有描述。",
@@ -6821,7 +6816,6 @@
6816 "3f9bc820dffd099f": "回复",
6817 "7975bd47236d8207": "回复此对话",
6818 "8fa405d27bb3180a": "待提交。提交审查时会一并发送",
6824 - "a5e57fdfde50aade": "添加到对话",
6819 "9dde74668b73ad29": "回复",
6820 "904e8e33ad31d233": "评论",
6821 "7e0db7bc417222c3": "已提交审查",
docs/user/thread-sidebar.md
+6 -2
@@ -312,8 +312,12 @@ model, and reasoning level shown in the thread's composer, including for its fir
312 reply. Change them for an individual side chat in its composer. Later changes to the
313 parent do not change existing side chats.
314
315 -To use what you learned, choose **Bring back**. The thread gets the side chat with
316 -your next message there. Bring back is available while the thread is idle.
315 +To use what you learned, choose **Add to chat** at the top of the side chat, or type
316 +`@` and a word from its title in the thread's composer. The thread's message gets a
317 +link to the side chat, and the agent reads as much of it as it needs. This works
318 +while the thread is busy, once you have sent a message in the side chat. An agent on
319 +an external OpenCode server cannot read the link, so put the details in your message
320 +instead.
321
322 Closing a side chat you never sent a message in deletes it. To delete one you used,
323 choose **Delete** at the top of the side chat. Deleting a thread also deletes its
packages/client-runtime/src/composerThreadItems.test.ts
+28
@@ -54,6 +54,34 @@ it("ranks thread mentions like the palette and leaves out subagent threads", ()
54 expect(items.map((item) => item.thread.threadId)).toEqual(["word", "newer-mid-word"]);
55 });
56
57 +it("offers the composer thread's own used side chats, but not other threads' side chats", () => {
58 + const sideChatOf = (parent: string) => ({
59 + rootThreadId: ThreadId.make(parent),
60 + parentThreadId: ThreadId.make(parent),
61 + relationshipToParent: "fork" as const,
62 + sideChat: true,
63 + });
64 + const latestUserMessageAt = "2026-10-22T00:00:00.000Z";
65 + const items = matchComposerThreadItems({
66 + shells: [
67 + shell("mine", "Why is the build slow?", { lineage: sideChatOf("main"), latestUserMessageAt }),
68 + shell("unused", "Slow side chat", { lineage: sideChatOf("main") }),
69 + shell("theirs", "Why is the test slow?", {
70 + lineage: sideChatOf("other"),
71 + latestUserMessageAt,
72 + }),
73 + ],
74 + environmentId,
75 + linkedEnvironments: new Map(),
76 + excludeThreadId: ThreadId.make("main"),
77 + query: "slow",
78 + now: Date.parse("2026-10-23T00:00:00.000Z"),
79 + });
80 + expect(items.map(({ thread, description }) => ({ id: thread.threadId, description }))).toEqual([
81 + { id: "mine", description: "Side chat" },
82 + ]);
83 +});
84 +
85 it("also offers threads on linked machines, naming the machine, but no other machine's", () => {
86 const vps = EnvironmentId.make("env-vps");
87 const items = matchComposerThreadItems({
packages/client-runtime/src/composerThreadItems.ts
+13 -6
@@ -27,9 +27,9 @@ export interface ComposerThreadItem {
27
28 /**
29 * Threads to reference from the composer, matched and ranked like the command
30 - * palette, without subagent or side chat threads. The agent reads threads on its own server
31 - * and on the machines it links to, so candidates stay within those, and a linked
32 - * machine's threads say which machine they are on.
30 + * palette, without subagent threads or other threads' side chats. The agent reads threads
31 + * on its own server and on the machines it links to, so candidates stay within those, and a
32 + * linked machine's threads say which machine they are on.
33 */
34 export function matchComposerThreadItems(
35 input: {
@@ -46,13 +46,19 @@ export function matchComposerThreadItems(
46 ): ComposerThreadItem[] {
47 const query = foldSearchQuery(input.query);
48 if (query.length === 0) return [];
49 + // Closing an unused side chat deletes it, so only one with a message is offered.
50 + const isOwnSideChat = (shell: ComposerThreadCandidate) =>
51 + shell.lineage.sideChat === true &&
52 + shell.environmentId === input.environmentId &&
53 + shell.lineage.parentThreadId === input.excludeThreadId &&
54 + shell.latestUserMessageAt !== null;
55 const candidates = input.shells.filter(
56 (shell) =>
57 (shell.environmentId === input.environmentId ||
58 input.linkedEnvironments.has(shell.environmentId)) &&
59 shell.id !== input.excludeThreadId &&
60 shell.archivedAt === null &&
55 - isListedThreadLineage(shell.lineage),
61 + (isListedThreadLineage(shell.lineage) || isOwnSideChat(shell)),
62 );
63 return rankSearchItems(candidates, (shell, options) =>
64 scoreThreadSearch(query, threadSearchSubject(shell, null), input.now, {
@@ -71,8 +77,9 @@ export function matchComposerThreadItems(
77 type: "thread",
78 thread: { environmentId: shell.environmentId, threadId: shell.id },
79 label: shell.title,
74 - description:
75 - machine === undefined
80 + description: isOwnSideChat(shell)
81 + ? resolve(msg("Side chat"))
82 + : machine === undefined
83 ? resolve(msg("Thread", { $context: "noun, search result type" }))
84 : resolve(msg("Thread on {machine}", { machine })),
85 };