Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): native subagent threads show status instead of a composer #13624

Mergedjuliusmarmingemerged 8 commits intot3code/codex-turn-mapping fromrefs/pull/13624/headmerged by juliusmarminge View on GitHub

Showing 19 changed files with 80 additions and 0 deletions (loading 18).

x
0 of 19 viewed, 19 left
80 additions and 0 deletionsapps/mobile/src/features/threads/ProviderSubagentBar.tsxAdded
View file
@@ -0,0 +1,80 @@
+import {
+ formatProviderSubagentStatus,
+ type ProviderSubagentStatus,
+} from "@t3tools/client-runtime/state/thread-execution";
+import { isOrchestrationV2WorkActive } from "@t3tools/contracts";
+import { useEffect, useState } from "react";
+import { View } from "react-native";
+​
+import { AppText as Text } from "../../components/AppText";
+import { ProviderIcon } from "../../components/ProviderIcon";
+import { RequestActionButton } from "./RequestActionButton";
+​
+/**
+ * Replaces the composer on a provider-native subagent thread. The provider
+ * runs that conversation, so there is nothing to send; the bar says which
+ * model is working, for how long, and leads back to the parent.
+ */
+export function ProviderSubagentBar(props: {
+ /** Driver and catalog icon of the provider running the subagent. */
+ readonly provider: { readonly driver: string; readonly iconUrl?: string | undefined } | null;
+ readonly modelLabel: string;
+ /** Reasoning effort as the composer names it, when the subagent has one. */
+ readonly effortLabel: string | null;
+ /** Null until the subagent's root turn arrives. */
+ readonly status: ProviderSubagentStatus | null;
+ readonly onOpenParent: (() => void) | null;
+}) {
+ const live = props.status !== null && isOrchestrationV2WorkActive(props.status.status);
+ const [nowMs, setNowMs] = useState(() => Date.now());
+ useEffect(() => {