fix(mobile): back from an agent's thread returns to its parent (#15068)
This commit is contained in:
1 parent
ad5178a31a
commit
01f894e23e
1 file changed
+9
-5
@@ -1,5 +1,5 @@
|
||||
import { useAtomValue } from "@effect/atom-react";
|
||||
import { useIsFocused, useNavigation } from "@react-navigation/native";
|
||||
import { StackActions, useIsFocused, useNavigation } from "@react-navigation/native";
|
||||
import { scopeThreadRef } from "@t3tools/client-runtime/environment";
|
||||
import { summarizeSubagentStatuses } from "@t3tools/client-runtime/state/subagent-display";
|
||||
import { isActiveSubagentStatus } from "@t3tools/client-runtime/state/subagentRuntime";
|
||||
@@ -158,11 +158,15 @@ export function ThreadSubagentGroup(props: {
|
||||
}
|
||||
disabled={threadId === null}
|
||||
onPress={() => {
|
||||
// Push, not navigate: navigate reuses this Thread route, so back
|
||||
// would skip the parent thread.
|
||||
if (threadId !== null)
|
||||
navigation.navigate("Thread", {
|
||||
environmentId: String(props.environmentId),
|
||||
threadId: String(threadId),
|
||||
});
|
||||
navigation.dispatch(
|
||||
StackActions.push("Thread", {
|
||||
environmentId: String(props.environmentId),
|
||||
threadId: String(threadId),
|
||||
}),
|
||||
);
|
||||
}}
|
||||
className="rounded-lg px-3 py-3 active:bg-subtle"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user