Skip to content

Commit 95250d0

Browse files
fix(web): limit lineage parent detail to native subagents
1 parent 03c956b commit 95250d0

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎apps/web/src/components/chat/ThreadRelationshipsControl.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
resolveLatestMergeBackRun,
2929
} from "@t3tools/client-runtime/state/thread-workflows";
3030
import {
31+
isProviderNativeSubagentThread,
3132
NodeId,
3233
type EnvironmentId,
3334
type OrchestrationV2Subagent,
@@ -226,7 +227,14 @@ export function ThreadRelationshipsPanel(props: {
226227
currentThread?.forkedFrom?.type === "run"
227228
? currentThread.forkedFrom.threadId
228229
: currentThread?.lineage.parentThreadId;
229-
const parentRef = parentThreadId ? scopeThreadRef(props.environmentId, parentThreadId) : null;
230+
const parentShell = parentThreadId
231+
? (relationshipShells.find((thread) => thread.id === parentThreadId) ??
232+
archivedShells?.find((thread) => thread.id === parentThreadId))
233+
: undefined;
234+
const parentRef =
235+
parentShell && isProviderNativeSubagentThread(parentShell)
236+
? scopeThreadRef(props.environmentId, parentShell.id)
237+
: null;
230238
const parentProjection = useThreadProjection(parentRef)?.projection;
231239
const navigate = useNavigate();
232240
const mergeBack = useAtomCommand(threadEnvironment.mergeBack);

0 commit comments

Comments
 (0)