@agent-native/toolkit 0.209.1 → 0.209.2-nightly-20261016005836
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-native.eject.json +3 -0
- package/dist/app/chat/AgentPanel.d.ts.map +1 -1
- package/dist/app/chat/AgentPanel.js +8 -3
- package/dist/app/chat/AgentPanel.js.map +1 -1
- package/dist/app/chat/AgentSidebar.d.ts.map +1 -1
- package/dist/app/chat/AgentSidebar.js +2 -0
- package/dist/app/chat/AgentSidebar.js.map +1 -1
- package/dist/app/chat/FileStorageSetupPopover.d.ts.map +1 -1
- package/dist/app/chat/FileStorageSetupPopover.js +11 -2
- package/dist/app/chat/FileStorageSetupPopover.js.map +1 -1
- package/dist/app/chat/agent-chat-presence.d.ts +3 -0
- package/dist/app/chat/agent-chat-presence.d.ts.map +1 -0
- package/dist/app/chat/agent-chat-presence.js +24 -0
- package/dist/app/chat/agent-chat-presence.js.map +1 -0
- package/dist/app/chat/chat/run-recovery.d.ts.map +1 -1
- package/dist/app/chat/chat/run-recovery.js +15 -3
- package/dist/app/chat/chat/run-recovery.js.map +1 -1
- package/dist/app/feedback/ReportProblemButton.d.ts +6 -0
- package/dist/app/feedback/ReportProblemButton.d.ts.map +1 -0
- package/dist/app/feedback/ReportProblemButton.js +17 -0
- package/dist/app/feedback/ReportProblemButton.js.map +1 -0
- package/dist/app/feedback/ReportProblemDialog.d.ts +6 -0
- package/dist/app/feedback/ReportProblemDialog.d.ts.map +1 -0
- package/dist/app/feedback/ReportProblemDialog.js +90 -0
- package/dist/app/feedback/ReportProblemDialog.js.map +1 -0
- package/dist/app/feedback/index.d.ts +1 -0
- package/dist/app/feedback/index.d.ts.map +1 -1
- package/dist/app/feedback/index.js +1 -0
- package/dist/app/feedback/index.js.map +1 -1
- package/dist/app/i18n/catalogs/ar-SA.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/ar-SA.js +13 -0
- package/dist/app/i18n/catalogs/ar-SA.js.map +1 -1
- package/dist/app/i18n/catalogs/de-DE.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/de-DE.js +9 -0
- package/dist/app/i18n/catalogs/de-DE.js.map +1 -1
- package/dist/app/i18n/catalogs/en-US.d.ts +9 -0
- package/dist/app/i18n/catalogs/en-US.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/en-US.js +9 -0
- package/dist/app/i18n/catalogs/en-US.js.map +1 -1
- package/dist/app/i18n/catalogs/es-ES.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/es-ES.js +10 -0
- package/dist/app/i18n/catalogs/es-ES.js.map +1 -1
- package/dist/app/i18n/catalogs/fr-FR.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/fr-FR.js +10 -0
- package/dist/app/i18n/catalogs/fr-FR.js.map +1 -1
- package/dist/app/i18n/catalogs/hi-IN.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/hi-IN.js +9 -0
- package/dist/app/i18n/catalogs/hi-IN.js.map +1 -1
- package/dist/app/i18n/catalogs/ja-JP.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/ja-JP.js +8 -0
- package/dist/app/i18n/catalogs/ja-JP.js.map +1 -1
- package/dist/app/i18n/catalogs/ko-KR.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/ko-KR.js +8 -0
- package/dist/app/i18n/catalogs/ko-KR.js.map +1 -1
- package/dist/app/i18n/catalogs/pt-BR.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/pt-BR.js +10 -0
- package/dist/app/i18n/catalogs/pt-BR.js.map +1 -1
- package/dist/app/i18n/catalogs/zh-CN.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/zh-CN.js +8 -0
- package/dist/app/i18n/catalogs/zh-CN.js.map +1 -1
- package/dist/app/i18n/catalogs/zh-TW.d.ts.map +1 -1
- package/dist/app/i18n/catalogs/zh-TW.js +8 -0
- package/dist/app/i18n/catalogs/zh-TW.js.map +1 -1
- package/dist/app/settings/BuilderConnectPopover.d.ts.map +1 -1
- package/dist/app/settings/BuilderConnectPopover.js +13 -7
- package/dist/app/settings/BuilderConnectPopover.js.map +1 -1
- package/dist/app/shared/AppSidebar.d.ts.map +1 -1
- package/dist/app/shared/AppSidebar.js +11 -3
- package/dist/app/shared/AppSidebar.js.map +1 -1
- package/dist/app/shared/CommandMenu.d.ts.map +1 -1
- package/dist/app/shared/CommandMenu.js +21 -4
- package/dist/app/shared/CommandMenu.js.map +1 -1
- package/dist/design-tweaks/scrub-input.d.ts +6 -0
- package/dist/design-tweaks/scrub-input.d.ts.map +1 -1
- package/dist/design-tweaks/scrub-input.js +12 -0
- package/dist/design-tweaks/scrub-input.js.map +1 -1
- package/dist/design-tweaks/visual-style-controls.d.ts +1 -1
- package/dist/design-tweaks/visual-style-controls.d.ts.map +1 -1
- package/dist/design-tweaks/visual-style-controls.js +1 -1
- package/dist/design-tweaks/visual-style-controls.js.map +1 -1
- package/package.json +4 -4
- package/src/app/chat/AgentPanel.header.spec.ts +1 -1
- package/src/app/chat/AgentPanel.tsx +23 -0
- package/src/app/chat/AgentSidebar.tsx +2 -0
- package/src/app/chat/FileStorageSetupPopover.spec.tsx +66 -5
- package/src/app/chat/FileStorageSetupPopover.tsx +15 -6
- package/src/app/chat/agent-chat-presence.ts +30 -0
- package/src/app/chat/chat/run-recovery.spec.tsx +60 -0
- package/src/app/chat/chat/run-recovery.tsx +28 -2
- package/src/app/feedback/ReportProblemButton.tsx +59 -0
- package/src/app/feedback/ReportProblemDialog.spec.tsx +190 -0
- package/src/app/feedback/ReportProblemDialog.tsx +212 -0
- package/src/app/feedback/index.ts +4 -0
- package/src/app/i18n/catalogs/ar-SA.ts +20 -0
- package/src/app/i18n/catalogs/de-DE.ts +12 -0
- package/src/app/i18n/catalogs/en-US.ts +12 -0
- package/src/app/i18n/catalogs/es-ES.ts +14 -0
- package/src/app/i18n/catalogs/fr-FR.ts +14 -0
- package/src/app/i18n/catalogs/hi-IN.ts +12 -0
- package/src/app/i18n/catalogs/ja-JP.ts +10 -0
- package/src/app/i18n/catalogs/ko-KR.ts +10 -0
- package/src/app/i18n/catalogs/pt-BR.ts +14 -0
- package/src/app/i18n/catalogs/zh-CN.ts +9 -0
- package/src/app/i18n/catalogs/zh-TW.ts +10 -0
- package/src/app/settings/BuilderConnectPopover.spec.tsx +19 -14
- package/src/app/settings/BuilderConnectPopover.tsx +80 -64
- package/src/app/shared/AppSidebar.spec.tsx +22 -1
- package/src/app/shared/AppSidebar.tsx +24 -3
- package/src/app/shared/CommandMenu.tsx +41 -1
- package/src/design-tweaks/scrub-input.tsx +19 -0
- package/src/design-tweaks/visual-style-controls.spec.tsx +31 -0
- package/src/design-tweaks/visual-style-controls.tsx +2 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
|
|
2
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
+
import {
|
|
4
|
+
countRecorderEventsByType,
|
|
5
|
+
formatProblemReportSummary,
|
|
6
|
+
formatRecorderEvent,
|
|
7
|
+
isFailedRecorderEvent,
|
|
8
|
+
uploadProblemReport,
|
|
9
|
+
} from "@agent-native/core/client/problem-report";
|
|
10
|
+
import {
|
|
11
|
+
recorder,
|
|
12
|
+
type RecorderEvent,
|
|
13
|
+
type RecorderReport,
|
|
14
|
+
} from "@agent-native/core/client/recorder";
|
|
15
|
+
import { writeClipboardText } from "@agent-native/toolkit/clipboard";
|
|
16
|
+
import { Button } from "@agent-native/toolkit/ui/button";
|
|
17
|
+
import {
|
|
18
|
+
Dialog,
|
|
19
|
+
DialogContent,
|
|
20
|
+
DialogFooter,
|
|
21
|
+
DialogTitle,
|
|
22
|
+
} from "@agent-native/toolkit/ui/dialog";
|
|
23
|
+
import { Spinner } from "@agent-native/toolkit/ui/spinner";
|
|
24
|
+
import { cn } from "@agent-native/toolkit/utils";
|
|
25
|
+
import { useRef, useState } from "react";
|
|
26
|
+
|
|
27
|
+
import { useHasAgentChat } from "../chat/agent-chat-presence.js";
|
|
28
|
+
|
|
29
|
+
const PREVIEW_FAILURES = 3;
|
|
30
|
+
const PREVIEW_EVENTS = 5;
|
|
31
|
+
const PREVIEW_DATA_CHARS = 80;
|
|
32
|
+
|
|
33
|
+
type Step =
|
|
34
|
+
| { kind: "preview" }
|
|
35
|
+
| { kind: "attaching" }
|
|
36
|
+
| { kind: "notAttached"; message?: string }
|
|
37
|
+
| { kind: "copy"; summary: string; copied: boolean };
|
|
38
|
+
|
|
39
|
+
export interface ReportProblemDialogProps {
|
|
40
|
+
open: boolean;
|
|
41
|
+
onOpenChange: (open: boolean) => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ReportProblemDialog({
|
|
45
|
+
open,
|
|
46
|
+
onOpenChange,
|
|
47
|
+
}: ReportProblemDialogProps) {
|
|
48
|
+
const [attaching, setAttaching] = useState(false);
|
|
49
|
+
return (
|
|
50
|
+
<Dialog
|
|
51
|
+
open={open}
|
|
52
|
+
onOpenChange={(next) => {
|
|
53
|
+
if (!attaching) onOpenChange(next);
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<DialogContent aria-describedby={undefined} className="max-w-md gap-4">
|
|
57
|
+
<ReportProblemBody
|
|
58
|
+
onAttachingChange={setAttaching}
|
|
59
|
+
onClose={() => onOpenChange(false)}
|
|
60
|
+
/>
|
|
61
|
+
</DialogContent>
|
|
62
|
+
</Dialog>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function ReportProblemBody({
|
|
67
|
+
onAttachingChange,
|
|
68
|
+
onClose,
|
|
69
|
+
}: {
|
|
70
|
+
onAttachingChange: (attaching: boolean) => void;
|
|
71
|
+
onClose: () => void;
|
|
72
|
+
}) {
|
|
73
|
+
const t = useT();
|
|
74
|
+
const hasAgentChat = useHasAgentChat();
|
|
75
|
+
const [preview] = useState(() => recorder.report());
|
|
76
|
+
const [step, setStep] = useState<Step>({ kind: "preview" });
|
|
77
|
+
// Built once on consent: a retry re-sends this report instead of firing the
|
|
78
|
+
// recorder's onReport destinations a second time.
|
|
79
|
+
const consentedReport = useRef<RecorderReport | null>(null);
|
|
80
|
+
|
|
81
|
+
const copySummary = async (summary: string) => {
|
|
82
|
+
const copied = await writeClipboardText(summary);
|
|
83
|
+
setStep({ kind: "copy", summary, copied });
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const attach = async () => {
|
|
87
|
+
setStep({ kind: "attaching" });
|
|
88
|
+
onAttachingChange(true);
|
|
89
|
+
const report = (consentedReport.current ??= recorder.report({
|
|
90
|
+
reason: "user",
|
|
91
|
+
}));
|
|
92
|
+
const upload = await uploadProblemReport(report);
|
|
93
|
+
onAttachingChange(false);
|
|
94
|
+
if (upload.status === "failed") {
|
|
95
|
+
setStep({ kind: "notAttached", message: upload.message });
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const summary = formatProblemReportSummary(report, upload.ref);
|
|
99
|
+
if (!hasAgentChat) {
|
|
100
|
+
await copySummary(summary);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
sendToAgentChat({
|
|
104
|
+
message: t("agentChat.reportProblem.agentMessage"),
|
|
105
|
+
context: summary,
|
|
106
|
+
submit: true,
|
|
107
|
+
openSidebar: true,
|
|
108
|
+
});
|
|
109
|
+
onClose();
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const attaching = step.kind === "attaching";
|
|
113
|
+
const primaryLabel =
|
|
114
|
+
step.kind === "attaching"
|
|
115
|
+
? t("agentChat.reportProblem.attaching")
|
|
116
|
+
: step.kind === "notAttached"
|
|
117
|
+
? t("agentChat.common.retry")
|
|
118
|
+
: step.kind === "copy"
|
|
119
|
+
? step.copied
|
|
120
|
+
? t("agentChat.common.copied")
|
|
121
|
+
: t("agentChat.recovery.copyFailed")
|
|
122
|
+
: hasAgentChat
|
|
123
|
+
? t("agentChat.reportProblem.send")
|
|
124
|
+
: t("agentChat.reportProblem.copy");
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<>
|
|
128
|
+
<DialogTitle className="text-base">
|
|
129
|
+
{t("agentChat.reportProblem.title", { count: preview.windowSeconds })}
|
|
130
|
+
</DialogTitle>
|
|
131
|
+
<ReportPreview report={preview} />
|
|
132
|
+
{step.kind === "notAttached" ? (
|
|
133
|
+
<p role="alert" className="text-sm text-destructive">
|
|
134
|
+
{t("agentChat.reportProblem.notAttached")}
|
|
135
|
+
{step.message ? ` ${step.message}` : null}
|
|
136
|
+
</p>
|
|
137
|
+
) : null}
|
|
138
|
+
<DialogFooter>
|
|
139
|
+
<Button
|
|
140
|
+
type="button"
|
|
141
|
+
variant="outline"
|
|
142
|
+
disabled={attaching}
|
|
143
|
+
onClick={onClose}
|
|
144
|
+
>
|
|
145
|
+
{t("agentChat.common.cancel")}
|
|
146
|
+
</Button>
|
|
147
|
+
<Button
|
|
148
|
+
type="button"
|
|
149
|
+
disabled={attaching}
|
|
150
|
+
onClick={() =>
|
|
151
|
+
void (step.kind === "copy" ? copySummary(step.summary) : attach())
|
|
152
|
+
}
|
|
153
|
+
>
|
|
154
|
+
{attaching ? <Spinner aria-hidden /> : null}
|
|
155
|
+
{primaryLabel}
|
|
156
|
+
</Button>
|
|
157
|
+
</DialogFooter>
|
|
158
|
+
</>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function ReportPreview({ report }: { report: RecorderReport }) {
|
|
163
|
+
const t = useT();
|
|
164
|
+
if (report.events.length === 0) {
|
|
165
|
+
return (
|
|
166
|
+
<p className="rounded-md border border-border px-3 py-2 text-xs text-muted-foreground">
|
|
167
|
+
{t("agentChat.reportProblem.noEvents")}
|
|
168
|
+
</p>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
const counts = Object.entries(countRecorderEventsByType(report.events))
|
|
172
|
+
.map(([type, count]) => `${type} ${count}`)
|
|
173
|
+
.join(" · ");
|
|
174
|
+
const failures = report.events
|
|
175
|
+
.filter(isFailedRecorderEvent)
|
|
176
|
+
.slice(0, PREVIEW_FAILURES);
|
|
177
|
+
return (
|
|
178
|
+
<div className="overflow-hidden rounded-md border border-border font-mono text-xs">
|
|
179
|
+
<p className="border-b border-border px-3 py-2 text-foreground">
|
|
180
|
+
{counts}
|
|
181
|
+
</p>
|
|
182
|
+
{failures.length > 0 ? (
|
|
183
|
+
<EventLines
|
|
184
|
+
events={failures}
|
|
185
|
+
className="border-b border-border text-destructive"
|
|
186
|
+
/>
|
|
187
|
+
) : null}
|
|
188
|
+
<EventLines
|
|
189
|
+
events={report.events.slice(0, PREVIEW_EVENTS)}
|
|
190
|
+
className="text-muted-foreground"
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function EventLines({
|
|
197
|
+
events,
|
|
198
|
+
className,
|
|
199
|
+
}: {
|
|
200
|
+
events: RecorderEvent[];
|
|
201
|
+
className: string;
|
|
202
|
+
}) {
|
|
203
|
+
return (
|
|
204
|
+
<ul className={cn("space-y-1 px-3 py-2", className)}>
|
|
205
|
+
{events.map((event, index) => (
|
|
206
|
+
<li key={index} className="truncate">
|
|
207
|
+
{formatRecorderEvent(event, PREVIEW_DATA_CHARS)}
|
|
208
|
+
</li>
|
|
209
|
+
))}
|
|
210
|
+
</ul>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
@@ -3243,6 +3243,26 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3243
3243
|
"settingsSubAgents.close": "إغلاق",
|
|
3244
3244
|
"observability.insights.rawTrace":
|
|
3245
3245
|
"التتبع الخام (كل الخطوات مع المدخلات والمخرجات)",
|
|
3246
|
+
"reportProblem.menuItem": "الإبلاغ عن مشكلة",
|
|
3247
|
+
"reportProblem.title_zero":
|
|
3248
|
+
"هل تريد إرفاق ما فعله التطبيق خلال آخر {{count}} ثانية؟",
|
|
3249
|
+
"reportProblem.title_one":
|
|
3250
|
+
"هل تريد إرفاق ما فعله التطبيق خلال آخر {{count}} ثانية؟",
|
|
3251
|
+
"reportProblem.title_two":
|
|
3252
|
+
"هل تريد إرفاق ما فعله التطبيق خلال آخر {{count}} ثانيتين؟",
|
|
3253
|
+
"reportProblem.title_few":
|
|
3254
|
+
"هل تريد إرفاق ما فعله التطبيق خلال آخر {{count}} ثوانٍ؟",
|
|
3255
|
+
"reportProblem.title_many":
|
|
3256
|
+
"هل تريد إرفاق ما فعله التطبيق خلال آخر {{count}} ثانيةً؟",
|
|
3257
|
+
"reportProblem.title_other":
|
|
3258
|
+
"هل تريد إرفاق ما فعله التطبيق خلال آخر {{count}} ثانية؟",
|
|
3259
|
+
"reportProblem.noEvents": "لم يُسجَّل شيء بعد.",
|
|
3260
|
+
"reportProblem.send": "إرسال إلى الوكيل",
|
|
3261
|
+
"reportProblem.copy": "نسخ تقرير المشكلة",
|
|
3262
|
+
"reportProblem.attaching": "جارٍ الإرفاق…",
|
|
3263
|
+
"reportProblem.notAttached": "لم يتم إرفاق التقرير.",
|
|
3264
|
+
"reportProblem.agentMessage":
|
|
3265
|
+
"حدث خطأ ما في التطبيق. استخدم تقرير المشكلة المرفق لشرح ما حدث.",
|
|
3246
3266
|
};
|
|
3247
3267
|
|
|
3248
3268
|
export default messages;
|
|
@@ -3261,6 +3261,18 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3261
3261
|
"settingsSubAgents.close": "Schließen",
|
|
3262
3262
|
"observability.insights.rawTrace":
|
|
3263
3263
|
"Rohdaten-Trace (alle Spans mit Ein- und Ausgaben)",
|
|
3264
|
+
"reportProblem.menuItem": "Problem melden",
|
|
3265
|
+
"reportProblem.title_one":
|
|
3266
|
+
"Anhängen, was die App in der letzten {{count}} Sekunde getan hat?",
|
|
3267
|
+
"reportProblem.title_other":
|
|
3268
|
+
"Anhängen, was die App in den letzten {{count}} Sekunden getan hat?",
|
|
3269
|
+
"reportProblem.noEvents": "Noch nichts aufgezeichnet.",
|
|
3270
|
+
"reportProblem.send": "An Agent senden",
|
|
3271
|
+
"reportProblem.copy": "Problembericht kopieren",
|
|
3272
|
+
"reportProblem.attaching": "Wird angehängt…",
|
|
3273
|
+
"reportProblem.notAttached": "Der Bericht wurde nicht angehängt.",
|
|
3274
|
+
"reportProblem.agentMessage":
|
|
3275
|
+
"In der App ist etwas schiefgelaufen. Erkläre anhand des angehängten Problemberichts, was passiert ist.",
|
|
3264
3276
|
};
|
|
3265
3277
|
|
|
3266
3278
|
export default messages;
|
|
@@ -3113,6 +3113,18 @@ const messages = {
|
|
|
3113
3113
|
"settingsSubAgents.close": "Close",
|
|
3114
3114
|
"observability.insights.rawTrace":
|
|
3115
3115
|
"Raw trace (every span, with inputs and outputs)",
|
|
3116
|
+
"reportProblem.menuItem": "Report a problem",
|
|
3117
|
+
"reportProblem.title_one":
|
|
3118
|
+
"Attach what the app did in the last {{count}} second?",
|
|
3119
|
+
"reportProblem.title_other":
|
|
3120
|
+
"Attach what the app did in the last {{count}} seconds?",
|
|
3121
|
+
"reportProblem.noEvents": "Nothing recorded yet.",
|
|
3122
|
+
"reportProblem.send": "Send to agent",
|
|
3123
|
+
"reportProblem.copy": "Copy problem report",
|
|
3124
|
+
"reportProblem.attaching": "Attaching…",
|
|
3125
|
+
"reportProblem.notAttached": "The report was not attached.",
|
|
3126
|
+
"reportProblem.agentMessage":
|
|
3127
|
+
"Something went wrong in the app. Use the attached problem report to explain what happened.",
|
|
3116
3128
|
} as const;
|
|
3117
3129
|
|
|
3118
3130
|
export default messages;
|
|
@@ -3283,6 +3283,20 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3283
3283
|
"settingsSubAgents.close": "Cerrar",
|
|
3284
3284
|
"observability.insights.rawTrace":
|
|
3285
3285
|
"Traza completa (todos los spans, con entradas y salidas)",
|
|
3286
|
+
"reportProblem.menuItem": "Informar de un problema",
|
|
3287
|
+
"reportProblem.title_one":
|
|
3288
|
+
"¿Adjuntar lo que hizo la app en el último {{count}} segundo?",
|
|
3289
|
+
"reportProblem.title_many":
|
|
3290
|
+
"¿Adjuntar lo que hizo la app en los últimos {{count}} segundos?",
|
|
3291
|
+
"reportProblem.title_other":
|
|
3292
|
+
"¿Adjuntar lo que hizo la app en los últimos {{count}} segundos?",
|
|
3293
|
+
"reportProblem.noEvents": "Todavía no hay nada registrado.",
|
|
3294
|
+
"reportProblem.send": "Enviar al agente",
|
|
3295
|
+
"reportProblem.copy": "Copiar informe del problema",
|
|
3296
|
+
"reportProblem.attaching": "Adjuntando…",
|
|
3297
|
+
"reportProblem.notAttached": "El informe no se adjuntó.",
|
|
3298
|
+
"reportProblem.agentMessage":
|
|
3299
|
+
"Algo salió mal en la app. Usa el informe del problema adjunto para explicar qué pasó.",
|
|
3286
3300
|
};
|
|
3287
3301
|
|
|
3288
3302
|
export default messages;
|
|
@@ -3316,6 +3316,20 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3316
3316
|
"settingsSubAgents.close": "Fermer",
|
|
3317
3317
|
"observability.insights.rawTrace":
|
|
3318
3318
|
"Trace brute (tous les spans, avec entrées et sorties)",
|
|
3319
|
+
"reportProblem.menuItem": "Signaler un problème",
|
|
3320
|
+
"reportProblem.title_one":
|
|
3321
|
+
"Joindre ce que l'app a fait au cours de la dernière {{count}} seconde ?",
|
|
3322
|
+
"reportProblem.title_many":
|
|
3323
|
+
"Joindre ce que l'app a fait au cours des {{count}} dernières secondes ?",
|
|
3324
|
+
"reportProblem.title_other":
|
|
3325
|
+
"Joindre ce que l'app a fait au cours des {{count}} dernières secondes ?",
|
|
3326
|
+
"reportProblem.noEvents": "Rien n'a encore été enregistré.",
|
|
3327
|
+
"reportProblem.send": "Envoyer à l'agent",
|
|
3328
|
+
"reportProblem.copy": "Copier le rapport de problème",
|
|
3329
|
+
"reportProblem.attaching": "Ajout en cours…",
|
|
3330
|
+
"reportProblem.notAttached": "Le rapport n'a pas été joint.",
|
|
3331
|
+
"reportProblem.agentMessage":
|
|
3332
|
+
"Un problème est survenu dans l'app. Utilisez le rapport de problème joint pour expliquer ce qui s'est passé.",
|
|
3319
3333
|
};
|
|
3320
3334
|
|
|
3321
3335
|
export default messages;
|
|
@@ -3044,6 +3044,18 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3044
3044
|
"settingsSubAgents.connectTitle": "{{name}} कनेक्ट करें",
|
|
3045
3045
|
"settingsSubAgents.close": "बंद करें",
|
|
3046
3046
|
"observability.insights.rawTrace": "रॉ ट्रेस (हर स्पैन, इनपुट और आउटपुट के साथ)",
|
|
3047
|
+
"reportProblem.menuItem": "समस्या की रिपोर्ट करें",
|
|
3048
|
+
"reportProblem.title_one":
|
|
3049
|
+
"पिछले {{count}} सेकंड में ऐप ने जो किया, क्या उसे संलग्न करें?",
|
|
3050
|
+
"reportProblem.title_other":
|
|
3051
|
+
"पिछले {{count}} सेकंड में ऐप ने जो किया, क्या उसे संलग्न करें?",
|
|
3052
|
+
"reportProblem.noEvents": "अभी तक कुछ रिकॉर्ड नहीं हुआ।",
|
|
3053
|
+
"reportProblem.send": "एजेंट को भेजें",
|
|
3054
|
+
"reportProblem.copy": "समस्या रिपोर्ट कॉपी करें",
|
|
3055
|
+
"reportProblem.attaching": "संलग्न किया जा रहा है…",
|
|
3056
|
+
"reportProblem.notAttached": "रिपोर्ट संलग्न नहीं हुई।",
|
|
3057
|
+
"reportProblem.agentMessage":
|
|
3058
|
+
"ऐप में कुछ गड़बड़ हो गई। संलग्न समस्या रिपोर्ट से बताइए कि क्या हुआ।",
|
|
3047
3059
|
};
|
|
3048
3060
|
|
|
3049
3061
|
export default messages;
|
|
@@ -3111,6 +3111,16 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3111
3111
|
"settingsSubAgents.connectTitle": "{{name}} を接続",
|
|
3112
3112
|
"settingsSubAgents.close": "閉じる",
|
|
3113
3113
|
"observability.insights.rawTrace": "生のトレース(すべてのスパンと入出力)",
|
|
3114
|
+
"reportProblem.menuItem": "問題を報告",
|
|
3115
|
+
"reportProblem.title_other":
|
|
3116
|
+
"過去 {{count}} 秒間のアプリの動作を添付しますか?",
|
|
3117
|
+
"reportProblem.noEvents": "まだ記録はありません。",
|
|
3118
|
+
"reportProblem.send": "エージェントに送信",
|
|
3119
|
+
"reportProblem.copy": "問題レポートをコピー",
|
|
3120
|
+
"reportProblem.attaching": "添付中…",
|
|
3121
|
+
"reportProblem.notAttached": "レポートは添付されませんでした。",
|
|
3122
|
+
"reportProblem.agentMessage":
|
|
3123
|
+
"アプリで問題が発生しました。添付の問題レポートをもとに、何が起きたのか説明してください。",
|
|
3114
3124
|
};
|
|
3115
3125
|
|
|
3116
3126
|
export default messages;
|
|
@@ -3060,6 +3060,16 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3060
3060
|
"settingsSubAgents.connectTitle": "{{name}} 연결",
|
|
3061
3061
|
"settingsSubAgents.close": "닫기",
|
|
3062
3062
|
"observability.insights.rawTrace": "원시 트레이스 (모든 스팬과 입력/출력)",
|
|
3063
|
+
"reportProblem.menuItem": "문제 신고",
|
|
3064
|
+
"reportProblem.title_other":
|
|
3065
|
+
"최근 {{count}}초 동안 앱이 한 작업을 첨부할까요?",
|
|
3066
|
+
"reportProblem.noEvents": "아직 기록된 내용이 없습니다.",
|
|
3067
|
+
"reportProblem.send": "에이전트에게 보내기",
|
|
3068
|
+
"reportProblem.copy": "문제 보고서 복사",
|
|
3069
|
+
"reportProblem.attaching": "첨부하는 중…",
|
|
3070
|
+
"reportProblem.notAttached": "보고서가 첨부되지 않았습니다.",
|
|
3071
|
+
"reportProblem.agentMessage":
|
|
3072
|
+
"앱에 문제가 생겼습니다. 첨부된 문제 보고서를 바탕으로 무슨 일이 있었는지 설명해 주세요.",
|
|
3063
3073
|
};
|
|
3064
3074
|
|
|
3065
3075
|
export default messages;
|
|
@@ -3275,6 +3275,20 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
3275
3275
|
"settingsSubAgents.close": "Fechar",
|
|
3276
3276
|
"observability.insights.rawTrace":
|
|
3277
3277
|
"Trace bruto (todos os spans, com entradas e saídas)",
|
|
3278
|
+
"reportProblem.menuItem": "Relatar um problema",
|
|
3279
|
+
"reportProblem.title_one":
|
|
3280
|
+
"Anexar o que o app fez no último {{count}} segundo?",
|
|
3281
|
+
"reportProblem.title_many":
|
|
3282
|
+
"Anexar o que o app fez nos últimos {{count}} segundos?",
|
|
3283
|
+
"reportProblem.title_other":
|
|
3284
|
+
"Anexar o que o app fez nos últimos {{count}} segundos?",
|
|
3285
|
+
"reportProblem.noEvents": "Nada registrado ainda.",
|
|
3286
|
+
"reportProblem.send": "Enviar ao agente",
|
|
3287
|
+
"reportProblem.copy": "Copiar relatório do problema",
|
|
3288
|
+
"reportProblem.attaching": "Anexando…",
|
|
3289
|
+
"reportProblem.notAttached": "O relatório não foi anexado.",
|
|
3290
|
+
"reportProblem.agentMessage":
|
|
3291
|
+
"Algo deu errado no app. Use o relatório do problema anexado para explicar o que aconteceu.",
|
|
3278
3292
|
};
|
|
3279
3293
|
|
|
3280
3294
|
export default messages;
|
|
@@ -2825,6 +2825,15 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
2825
2825
|
"settingsSubAgents.connectTitle": "连接 {{name}}",
|
|
2826
2826
|
"settingsSubAgents.close": "关闭",
|
|
2827
2827
|
"observability.insights.rawTrace": "原始追踪(所有 span 及其输入和输出)",
|
|
2828
|
+
"reportProblem.menuItem": "报告问题",
|
|
2829
|
+
"reportProblem.title_other": "要附上应用在过去 {{count}} 秒内的操作记录吗?",
|
|
2830
|
+
"reportProblem.noEvents": "暂时还没有记录。",
|
|
2831
|
+
"reportProblem.send": "发送给智能体",
|
|
2832
|
+
"reportProblem.copy": "复制问题报告",
|
|
2833
|
+
"reportProblem.attaching": "正在附加…",
|
|
2834
|
+
"reportProblem.notAttached": "报告未能附加。",
|
|
2835
|
+
"reportProblem.agentMessage":
|
|
2836
|
+
"应用出了问题。请根据附带的问题报告解释发生了什么。",
|
|
2828
2837
|
};
|
|
2829
2838
|
|
|
2830
2839
|
export default messages;
|
|
@@ -2838,6 +2838,16 @@ const messages: ToolkitAgentChatTranslation = {
|
|
|
2838
2838
|
"settingsSubAgents.connectTitle": "連接 {{name}}",
|
|
2839
2839
|
"settingsSubAgents.close": "關閉",
|
|
2840
2840
|
"observability.insights.rawTrace": "原始追蹤(所有 span 及其輸入與輸出)",
|
|
2841
|
+
"reportProblem.menuItem": "回報問題",
|
|
2842
|
+
"reportProblem.title_other":
|
|
2843
|
+
"要附上應用程式在過去 {{count}} 秒內的操作記錄嗎?",
|
|
2844
|
+
"reportProblem.noEvents": "目前還沒有記錄。",
|
|
2845
|
+
"reportProblem.send": "傳送給代理",
|
|
2846
|
+
"reportProblem.copy": "複製問題回報",
|
|
2847
|
+
"reportProblem.attaching": "正在附加…",
|
|
2848
|
+
"reportProblem.notAttached": "回報未能附加。",
|
|
2849
|
+
"reportProblem.agentMessage":
|
|
2850
|
+
"應用程式出了問題。請根據附上的問題回報說明發生了什麼事。",
|
|
2841
2851
|
};
|
|
2842
2852
|
|
|
2843
2853
|
export default messages;
|
|
@@ -381,7 +381,7 @@ describe("BuilderConnectPopover", () => {
|
|
|
381
381
|
expect(open).not.toHaveBeenCalled();
|
|
382
382
|
});
|
|
383
383
|
|
|
384
|
-
it("keeps the chooser busy during activation and
|
|
384
|
+
it("keeps the chooser busy during activation and closes after it succeeds", () => {
|
|
385
385
|
const onConnect = vi.fn();
|
|
386
386
|
const flow = {
|
|
387
387
|
connecting: false,
|
|
@@ -390,7 +390,7 @@ describe("BuilderConnectPopover", () => {
|
|
|
390
390
|
start: vi.fn(),
|
|
391
391
|
statusResolved: true,
|
|
392
392
|
agentNativeProvisioningEnabled: true,
|
|
393
|
-
accountExists:
|
|
393
|
+
accountExists: false,
|
|
394
394
|
};
|
|
395
395
|
const renderPopover = () =>
|
|
396
396
|
render(
|
|
@@ -414,7 +414,7 @@ describe("BuilderConnectPopover", () => {
|
|
|
414
414
|
expect(consent?.textContent).toContain(
|
|
415
415
|
"Create a new account to activate free credits, or continue with an existing account.",
|
|
416
416
|
);
|
|
417
|
-
expect(consent?.textContent).toContain(
|
|
417
|
+
expect(consent?.textContent).not.toContain(
|
|
418
418
|
"You already have a Builder.io account",
|
|
419
419
|
);
|
|
420
420
|
expect(consent?.querySelector("[data-testid='create']")?.textContent).toBe(
|
|
@@ -440,15 +440,10 @@ describe("BuilderConnectPopover", () => {
|
|
|
440
440
|
flow.connecting = false;
|
|
441
441
|
flow.configured = true;
|
|
442
442
|
renderPopover();
|
|
443
|
-
|
|
444
|
-
document.querySelector(
|
|
445
|
-
"[data-testid='consent'] [data-testid='sign-in']",
|
|
446
|
-
) as HTMLElement,
|
|
447
|
-
);
|
|
448
|
-
expect(onConnect).toHaveBeenLastCalledWith(false);
|
|
443
|
+
expect(document.querySelector("[data-testid='consent']")).toBeNull();
|
|
449
444
|
});
|
|
450
445
|
|
|
451
|
-
it("
|
|
446
|
+
it("offers only sign-in after activation finds an existing account", () => {
|
|
452
447
|
const flow = {
|
|
453
448
|
connecting: false,
|
|
454
449
|
start: vi.fn(),
|
|
@@ -481,10 +476,20 @@ describe("BuilderConnectPopover", () => {
|
|
|
481
476
|
);
|
|
482
477
|
|
|
483
478
|
const consent = document.querySelector("[data-testid='consent']");
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
expect(
|
|
479
|
+
const existingAccount = consent?.querySelector<HTMLButtonElement>(
|
|
480
|
+
"[data-testid='create']",
|
|
481
|
+
);
|
|
482
|
+
expect(existingAccount?.textContent).toBe("I have a Builder.io account");
|
|
483
|
+
expect(consent?.textContent).not.toContain("Create and activate");
|
|
484
|
+
expect(consent?.querySelector("[data-testid='sign-in']")).toBeNull();
|
|
485
|
+
expect(existingAccount?.getAttribute("aria-describedby")).toBe(
|
|
486
|
+
"builder-connect-popover-account-exists",
|
|
487
|
+
);
|
|
488
|
+
expect(
|
|
489
|
+
document.getElementById("builder-connect-popover-description"),
|
|
490
|
+
).toBeNull();
|
|
491
|
+
click(existingAccount!);
|
|
492
|
+
expect(flow.start).toHaveBeenLastCalledWith({ provisionAccount: false });
|
|
488
493
|
});
|
|
489
494
|
|
|
490
495
|
it("shows included services collapsed and stacks both choices above the terms", () => {
|