Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(chat): fold question answers into tool activity #11014

Mergedmaria-rcksmerged 13 commits intomain fromrefs/pull/11014/headmerged by maria-rcks View on GitHub

Showing 10 changed files with 52 additions and 21 deletions (loading 7).

x
0 of 10 viewed, 10 left
7 additions and 6 deletionsapps/mobile/src/features/threads/QuestionAnswerHistory.tsxModified
View file
@@ -4,6 +4,7 @@
UserInputAttachments,
} from "@t3tools/contracts";
import { Image, Linking, Pressable, View } from "react-native";
+import { getQuestionAnswerText } from "@t3tools/client-runtime/work-log/user-input";
import { AppText as Text } from "../../components/AppText";
import { useAssetUrl } from "../../state/assets";
​
@@ -41,6 +42,7 @@
<View className="gap-2">
{[
...new Set([
+ ...Object.keys(props.answer.questionTextById ?? {}),
...Object.keys(props.answer.answers),
...Object.keys(props.answer.attachmentsByQuestionId),
]),
@@ -51,12 +53,11 @@
{props.answer.questionTextById[questionId]}
</Text>
) : null}
- <Text className="text-sm text-foreground">
- {[props.answer.answers[questionId]]
- .flat()
- .filter((value): value is string => typeof value === "string")
- .join(", ")}
- </Text>
+ {getQuestionAnswerText(props.answer.answers[questionId]) ? (
+ <Text className="ml-3 text-sm text-foreground-muted">