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

main
tsx 21 lines 856 Bytes
Raw
1 import { EnvironmentId, ThreadId } from "@t3tools/contracts";
2 import { createFileRoute } from "@tanstack/react-router";
3
4 import { LinkedThreadPage } from "../components/chat/LinkedThreadPage";
5
6 // A thread on a linked environment this client is not connected to, read through `viaEnvironmentId`.
7 // Its params are not named `environmentId` and `threadId`: those mean a thread this client can open.
8 export const Route = createFileRoute(
9 "/_chat/linked/$viaEnvironmentId/$linkedEnvironmentId/$linkedThreadId",
10 )({
11 component: function LinkedThreadRoute() {
12 const params = Route.useParams();
13 return (
14 <LinkedThreadPage
15 viaEnvironmentId={EnvironmentId.make(params.viaEnvironmentId)}
16 environmentId={EnvironmentId.make(params.linkedEnvironmentId)}
17 threadId={ThreadId.make(params.linkedThreadId)}
18 />
19 );
20 },
21 });