Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: agents ask the user for a secret through a private card #15907

Mergedjuliusmarmingemerged 22 commits intomain fromrefs/pull/15907/headmerged by juliusmarminge View on GitHub

Showing 49 changed files with 202 additions and 1 deletion (loading 46).

x
0 of 49 viewed, 49 left
170 additions and 0 deletionsapps/mobile/src/features/threads/SecretRequestCard.tsxAdded
View file
@@ -0,0 +1,170 @@
+import {
+ SECRET_REQUEST_DEFAULT_PLACEHOLDER,
+ SECRET_REQUEST_PRIVACY_NOTE,
+ secretRequestAnswerInput,
+ secretRequestDisplay,
+ secretRequestFailureMessage,
+ type SecretRequestItem,
+} from "@t3tools/client-runtime/secret-request";
+import {
+ isAtomCommandInterrupted,
+ squashAtomCommandFailure,
+} from "@t3tools/client-runtime/state/runtime";
+import type { EnvironmentId, OrchestrationV2ProjectedTurnItem } from "@t3tools/contracts";
+import { useRef, useState } from "react";
+import { Pressable, View, type ColorValue } from "react-native";
+​
+import { SymbolView, type AppSymbolName } from "../../components/AppSymbol";
+import { AppText as Text, AppTextInput as TextInput } from "../../components/AppText";
+import { serverEnvironment } from "../../state/server";
+import { useAtomCommand } from "../../state/use-atom-command";
+import { RequestActionButton } from "./RequestActionButton";
+​
+/**
+ * Feed card for a secret an agent asked the user for. The typed value lives
+ * only in this component's state and the RPC payload: it is never logged,
+ * alerted, or persisted, and the field clears once the answer is sent.
+ */
+const LOCK_SYMBOL: AppSymbolName = { ios: "lock", android: "lock" };
+const PRIVATE_SYMBOL: AppSymbolName = { ios: "checkmark.shield", android: "lock" };
+​