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

main
ts 19 lines 722 Bytes
Raw
1 import type { EnvironmentId } from "@t3tools/contracts";
2 import Constants from "expo-constants";
3
4 import { authClientMetadata } from "../../lib/authClientMetadata";
5 import { serverEnvironment } from "../../state/server";
6 import { useAtomCommand } from "../../state/use-atom-command";
7
8 /**
9 * Asks a machine to prepare a triage session. The result carries the prompt
10 * that links its playbook; the caller reports a failure.
11 */
12 export function usePrepareTriage() {
13 const prepare = useAtomCommand(serverEnvironment.prepareTriage, { reportFailure: false });
14 return (environmentId: EnvironmentId) =>
15 prepare({
16 environmentId,
17 input: { client: authClientMetadata(Constants.expoConfig?.version) },
18 });
19 }