@frontera-sdk/chat-ui 1.52.19 → 1.52.21

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/dist/chat.js CHANGED
@@ -1,21 +1,21 @@
1
1
  'use client';
2
2
  import { offset, flip, autoUpdate, computePosition } from './chunk-I7SXWUAN.js';
3
3
  import { isFullscreenHotkey, DeckNotesCard, deckOwnsArrowKeys } from './chunk-4FRTPVJT.js';
4
- import { ArtifactSkeleton, resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb } from './chunk-LP5MVCRH.js';
5
- import { NewSessionPrompt, keepCaretOnTap } from './chunk-I3YAF6PS.js';
4
+ import { ArtifactSkeleton, resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb } from './chunk-R46XIQLR.js';
5
+ import { NewSessionPrompt, keepCaretOnTap } from './chunk-67FRU3RR.js';
6
6
  import { PendingCards } from './chunk-UZ6RDWCT.js';
7
7
  import { themeToStyle } from './chunk-6HYPVNVA.js';
8
8
  import { useChatAgents } from './chunk-FLOAEPRU.js';
9
9
  import { subjectOfChatToken, capabilitiesOfChatToken } from './chunk-CCVPZVFK.js';
10
10
  import { useChatCredential } from './chunk-37G6MHWS.js';
11
11
  import './chunk-WDYCLC4F.js';
12
- import { chatSidePanelSessionKey, Chart1Icon, useTemplatePreviewStore, useHasTemplatePreviewHost, useChatSidePanelStore, ChatHeader, ChatHeaderActions, useRightPane, getChatOverviewAgentStatus, useChatOverviewVisible, useConversationArtifacts, PENDING_CHART_TAB_PREFIX, CHART_TAB_PREFIX, AGENT_WORK_TAB_ID, AGENT_ROUTINES_TAB_ID, SOURCES_TAB_ID, TEMPLATE_TAB_ID, OutputsSection, ChainLink1Icon, ChatOverviewContent, COMPUTER_TAB_PREFIX, SourceRow, motion, MAX_CHAT_SIDE_PANEL_SESSIONS, DEFAULT_CHAT_SIDE_PANEL_SIZE, TableIcon } from './chunk-ZFTMGEV5.js';
12
+ import { chatSidePanelSessionKey, Chart1Icon, useTemplatePreviewStore, useHasTemplatePreviewHost, useChatSidePanelStore, ChatHeader, ChatHeaderActions, useRightPane, getChatOverviewAgentStatus, useChatOverviewVisible, useConversationArtifacts, PENDING_CHART_TAB_PREFIX, CHART_TAB_PREFIX, AGENT_WORK_TAB_ID, AGENT_ROUTINES_TAB_ID, SOURCES_TAB_ID, TEMPLATE_TAB_ID, OutputsSection, ChainLink1Icon, ChatOverviewContent, COMPUTER_TAB_PREFIX, SourceRow, motion, MAX_CHAT_SIDE_PANEL_SESSIONS, DEFAULT_CHAT_SIDE_PANEL_SIZE, TableIcon } from './chunk-3OPTTDTZ.js';
13
13
  import './chunk-X3QVICX7.js';
14
- import { dynamic, useChatStreamStore, useComposerStore, Message, Thinking, setPendingFiles, useLivePreviewUrl, ArrowRotateClockwiseIcon, useComputerFiles, useUploadComputerFile, CanvasWidget, isPlainTextLanguage, useUploadFile, COMPOSER_ID_MAIN, useContextWindowInfo, useIsCompacting, useQueuedMessages, VolumeFullIcon, WarningSignIcon, useComputer, csvTextToWorkbookJson, CSV_PREVIEW_MAX_ROWS, CopyButton, COMPOSER_ID_COPILOT, ModelIcon, modeToBrandRow, useBackDismiss, PdfViewer, brandLabel, Spinner } from './chunk-QABN6WBZ.js';
15
- import { Textarea, artifactFormatIcon, BookIcon, useAgentRoster, ShieldCheckIcon, useArtifactStore, useCanvasStore, useChatOverviewStore, setSdkConversationPath, setSdkDarkMode, AgentsProvider, PluginProvider, WorkspaceProvider, TooltipProvider, isToolPart, getToolState, getToolName, getToolInput, sourceKind, extractDomain, CitationViewerContext, MarkdownRenderer, ConnectRunnerContext, usePathname, usePaneFocusStore, useAgentPanelStore, Tooltip, TooltipTrigger, TooltipContent, StudioDisplayIcon, WorldIcon, SlidesWideIcon, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, ArrowsShowIcon, useKeyboardInset, ExclamationCircleIcon, getToolOutput, useArtifact, useUpdateArtifact, useArtifactFileObjectUrl, resolveArtifactIconFormat, useSourcesEnrichment, LoaderIcon, FileDownloadIcon, Label, Input, renderPluginBlock, useArtifactVersion, useChatCapabilities, useChatOptInEnabled, useSessionPendingApprovals, tableToCsv, tableToXlsx, tableToMarkdown, DropdownMenu, DropdownMenuTrigger, StyledDropdownMenuContent, StyledDropdownMenuItem, useArtifactVersions, useClient, unwrapData, authFetch, getBearerHeadersForApi, EyeOpenIcon, EyeSlashIcon, useRestoreArtifactVersion, ZoomableImage, ChatImageLightbox, useDownloadArtifact, useArtifactFileBytes, useArtifactPreviewFileObjectUrl, useArtifactVersionPreviewFileObjectUrl, SpreadsheetIcon, FilePdfIcon, useOptionalWorkspaceContext, useAgentConnectionStatus, useArtifacts, useConversationDesktopStatus, isRequestHumanTool, appsKeys, useSession, useWorkspaceContext, errorText, unwrapDataDeep, useRouter, Images1Icon, ArrowUpIcon, VideoIcon, AudioIcon, useBrand, resolveBearerHeaders, subscribeSdkDarkMode, getSdkDarkMode, unwrap, useConnectRunner, useStartUserConnect, useUpsertGrant, useRevokeGrant, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, LayoutGrid1Icon, useCatalog, useInstalls, useWorkspaceSlug, buildTenantUrlAbsolute } from './chunk-QFVBVBUR.js';
14
+ import { dynamic, useChatStreamStore, useComposerStore, Message, Thinking, setPendingFiles, usePersonConfirmations, unshownPendingConfirmations, ConversationConfirmationCard, useLivePreviewUrl, ArrowRotateClockwiseIcon, useComputerFiles, useUploadComputerFile, CanvasWidget, isPlainTextLanguage, useUploadFile, COMPOSER_ID_MAIN, useContextWindowInfo, useIsCompacting, useQueuedMessages, VolumeFullIcon, WarningSignIcon, useComputer, csvTextToWorkbookJson, CSV_PREVIEW_MAX_ROWS, CopyButton, COMPOSER_ID_COPILOT, ModelIcon, modeToBrandRow, useBackDismiss, PdfViewer, brandLabel, Spinner } from './chunk-AJSYWTRU.js';
15
+ import { Textarea, artifactFormatIcon, BookIcon, useAgentRoster, ShieldCheckIcon, useArtifactStore, useCanvasStore, useChatOverviewStore, setSdkConversationPath, setSdkDarkMode, AgentsProvider, PluginProvider, WorkspaceProvider, TooltipProvider, getPersonConfirmation, isToolPart, getToolState, getToolName, getToolInput, sourceKind, extractDomain, CitationViewerContext, MarkdownRenderer, ConnectRunnerContext, usePathname, usePaneFocusStore, useAgentPanelStore, Tooltip, TooltipTrigger, TooltipContent, StudioDisplayIcon, WorldIcon, SlidesWideIcon, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, ArrowsShowIcon, useKeyboardInset, ExclamationCircleIcon, getToolOutput, useArtifact, useUpdateArtifact, useArtifactFileObjectUrl, resolveArtifactIconFormat, useSourcesEnrichment, LoaderIcon, FileDownloadIcon, Label, Input, renderPluginBlock, useArtifactVersion, useChatCapabilities, useChatCapabilityEnabled, useChatOptInEnabled, useSessionPendingApprovals, tableToCsv, tableToXlsx, tableToMarkdown, DropdownMenu, DropdownMenuTrigger, StyledDropdownMenuContent, StyledDropdownMenuItem, useArtifactVersions, useClient, unwrapData, authFetch, getBearerHeadersForApi, EyeOpenIcon, EyeSlashIcon, useRestoreArtifactVersion, ZoomableImage, ChatImageLightbox, useDownloadArtifact, useArtifactFileBytes, useArtifactPreviewFileObjectUrl, useArtifactVersionPreviewFileObjectUrl, errorText, SpreadsheetIcon, FilePdfIcon, useOptionalWorkspaceContext, useAgentConnectionStatus, useArtifacts, useSession, useWorkspaceContext, useConversationDesktopStatus, isRequestHumanTool, appsKeys, unwrapDataDeep, useRouter, Images1Icon, ArrowUpIcon, VideoIcon, AudioIcon, useBrand, resolveBearerHeaders, subscribeSdkDarkMode, getSdkDarkMode, unwrap, useConnectRunner, useStartUserConnect, useUpsertGrant, useRevokeGrant, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, LayoutGrid1Icon, useCatalog, useInstalls, useWorkspaceSlug, buildTenantUrlAbsolute } from './chunk-DCYKWIKY.js';
16
16
  import { ChevronLeftIcon } from './chunk-CWAOLMFS.js';
17
17
  import { Popover, PopoverTrigger, PopoverContent, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from './chunk-T5SANYSX.js';
18
- import { MOBILE_BREAKPOINT, useIsMobile, I18nProvider, useTranslation } from './chunk-I5NAI7HP.js';
18
+ import { MOBILE_BREAKPOINT, useIsMobile, I18nProvider, useTranslation } from './chunk-6VYLZSJV.js';
19
19
  import './chunk-QBV7MAFV.js';
20
20
  import { AppIcon, frontera_icon_default, PhotoIcon, Folder1Icon, FileTextIcon, describeToolRow, SquareArrowTopRightIcon, ClipboardIcon, getToolMeta, useStreamdownPlugins, AppIconFrame, MessageResponse } from './chunk-PKNEC4LJ.js';
21
21
  import { Skeleton, Button, ScrollArea, ChevronDownMediumIcon, buttonVariants } from './chunk-UWKO24VT.js';
@@ -42449,7 +42449,7 @@ function SheetEditor({ content, onSave, readOnly = false }) {
42449
42449
  );
42450
42450
  }
42451
42451
  var PdfDocumentViewInner = dynamic(
42452
- () => import('./pdf-document-view-inner-SBYZZQ6H.js'),
42452
+ () => import('./pdf-document-view-inner-IUW7UU7T.js'),
42453
42453
  {
42454
42454
  ssr: false,
42455
42455
  loading: () => /* @__PURE__ */ jsx(ArtifactSkeleton, { format: "pdf" })
@@ -43266,7 +43266,7 @@ function HtmlDeckView({ content, inChat = false, versionSlot }) {
43266
43266
  !present && inChat && /* @__PURE__ */ jsx(DeckEditPanel, { currentIndex: sel, currentHtml: slides[sel]?.html ?? "" })
43267
43267
  ] });
43268
43268
  }
43269
- var Inner = dynamic(() => import('./pdf-deck-view-inner-ZINOYZOK.js'), {
43269
+ var Inner = dynamic(() => import('./pdf-deck-view-inner-BOA2GXRG.js'), {
43270
43270
  ssr: false,
43271
43271
  loading: () => /* @__PURE__ */ jsx(ArtifactSkeleton, { format: "htmldeck" })
43272
43272
  });
@@ -55153,7 +55153,7 @@ function useManifest(surface) {
55153
55153
  const scopeId = wsCtx?.workspaceId ?? null;
55154
55154
  const isChatSurface = surface === "chat";
55155
55155
  return useQuery({
55156
- queryKey: [...metaKeys.manifest(), surface, scopeId],
55156
+ queryKey: [...metaKeys.manifest(), surface ?? "default", scopeId],
55157
55157
  queryFn: async ({ signal }) => {
55158
55158
  const requestController = new AbortController();
55159
55159
  const abortRequest = () => requestController.abort(signal.reason);
@@ -55185,12 +55185,12 @@ function useManifest(surface) {
55185
55185
  }
55186
55186
  },
55187
55187
  staleTime: Infinity,
55188
- ...{
55188
+ ...isChatSurface ? {
55189
55189
  retry: 1,
55190
55190
  refetchOnMount: false,
55191
55191
  refetchOnWindowFocus: false,
55192
55192
  refetchOnReconnect: false
55193
- }
55193
+ } : {}
55194
55194
  });
55195
55195
  }
55196
55196
 
@@ -55667,6 +55667,17 @@ function useBlueprintConfigured() {
55667
55667
  }, [hasSession, settled, state.configured]);
55668
55668
  return state;
55669
55669
  }
55670
+ var ChatAppContext = createContext(null);
55671
+ ChatAppContext.Provider;
55672
+ function useOptionalChatApp() {
55673
+ return useContext(ChatAppContext);
55674
+ }
55675
+
55676
+ // ../chat/src/ui/chat-apps/hooks/use-chat-app-agents.ts
55677
+ function useChatAppAgents() {
55678
+ return useOptionalChatApp()?.runtime.agents ?? null;
55679
+ }
55680
+ var ComposerManifestSurface = createContext("chat");
55670
55681
  function NotesIcon(props) {
55671
55682
  return /* @__PURE__ */ jsx(
55672
55683
  "svg",
@@ -55747,8 +55758,9 @@ var COMPOSER_OUTPUT_MODES = [
55747
55758
 
55748
55759
  // ../chat/src/ui/chat/chat-input-bar/hooks/use-composer-output-modes.ts
55749
55760
  function useComposerOutputModes(agentId) {
55750
- const manifestQuery = useManifest("chat");
55751
- const raw = manifestQuery.data?.data?.agents;
55761
+ const appAgents = useChatAppAgents();
55762
+ const manifestQuery = useManifest(useContext(ComposerManifestSurface));
55763
+ const raw = appAgents ?? manifestQuery.data?.data?.agents;
55752
55764
  const agents = Array.isArray(raw) ? raw : [];
55753
55765
  return useMemo(() => {
55754
55766
  if (!agentId) return [];
@@ -60393,6 +60405,7 @@ function ComposerOptionsSheet({
60393
60405
  }) {
60394
60406
  const [open, setOpen] = useState(false);
60395
60407
  const [view, setView] = useState("root");
60408
+ const pluginsEnabled = useChatCapabilityEnabled("plugins");
60396
60409
  const router = useRouter();
60397
60410
  const { t: t2 } = useTranslation();
60398
60411
  const close2 = () => {
@@ -60503,7 +60516,7 @@ function ComposerOptionsSheet({
60503
60516
  ]
60504
60517
  }
60505
60518
  ),
60506
- /* @__PURE__ */ jsxs(
60519
+ pluginsEnabled && /* @__PURE__ */ jsxs(
60507
60520
  "button",
60508
60521
  {
60509
60522
  type: "button",
@@ -61712,10 +61725,11 @@ var NOTE_FAILED = "Couldn\u2019t send your note. Try again.";
61712
61725
  var NOTE_SENT_DENY_FAILED = "Your note was sent, but the denial wasn\u2019t saved. Choose Deny to try again.";
61713
61726
  function useComposerApprovalPrompt({
61714
61727
  conversationId,
61715
- onDecision
61728
+ onDecision,
61729
+ running
61716
61730
  }) {
61717
61731
  const queryClient = useQueryClient();
61718
- const { data } = useSessionPendingApprovals(conversationId);
61732
+ const { data } = useSessionPendingApprovals(conversationId, { pollInBackground: !!running });
61719
61733
  const desktop = useConversationDesktopStatus(conversationId ?? null);
61720
61734
  const [decided, setDecided] = useState(() => /* @__PURE__ */ new Set());
61721
61735
  const [selectedId, setSelectedId] = useState(null);
@@ -61838,7 +61852,7 @@ function ChatInputBar({
61838
61852
  onToolApproval,
61839
61853
  placeholderTyping,
61840
61854
  placeholder,
61841
- enableFileUpload = true,
61855
+ enableFileUpload: enableFileUploadProp = true,
61842
61856
  optionsSlot,
61843
61857
  compact,
61844
61858
  sessionKey = "__new__",
@@ -61855,6 +61869,11 @@ function ChatInputBar({
61855
61869
  const subscriptionGovernance = chatGptSubscriptionGovernance ?? (isCopilotComposer ? "fde" : "session");
61856
61870
  const isCopilotPanel = isCopilotComposer && !isMobile && !compact;
61857
61871
  const capabilities = useChatCapabilities();
61872
+ const pluginsEnabled = useChatCapabilityEnabled("plugins");
61873
+ const approvalModesEnabled = useChatCapabilityEnabled("approvalModes");
61874
+ const modelChoiceEnabled = useChatCapabilityEnabled("modelChoice");
61875
+ const attachmentsEnabled = useChatCapabilityEnabled("attachments");
61876
+ const enableFileUpload = enableFileUploadProp && attachmentsEnabled;
61858
61877
  const [fileAttachments, setFileAttachments] = useState([]);
61859
61878
  const [uploadingFiles, setUploadingFiles] = useState(/* @__PURE__ */ new Map());
61860
61879
  const [fileError, setFileError] = useState(null);
@@ -62082,7 +62101,7 @@ function ChatInputBar({
62082
62101
  const { data: orgFlags } = useOrgFeatureFlags();
62083
62102
  const chatgptSubscriptionEnabled = orgFlags?.[subscriptionGovernance === "fde" ? "chatgptSubscription.enabled" : "chatgptSubscription.sessionsEnabled"] === true;
62084
62103
  const xaiSubscriptionEnabled = orgFlags?.[subscriptionGovernance === "fde" ? "xaiSubscription.enabled" : "xaiSubscription.sessionsEnabled"] === true;
62085
- const modeEntries = useMemo(() => {
62104
+ const manifestModeEntries = useMemo(() => {
62086
62105
  if (!modes) return void 0;
62087
62106
  const entries = Array.isArray(modes) ? modes : Object.entries(modes).map(([key2, config2]) => ({
62088
62107
  key: key2,
@@ -62100,13 +62119,45 @@ function ChatInputBar({
62100
62119
  (entry) => (entry.provider !== "openai-codex" || chatgptSubscriptionEnabled) && (entry.provider !== "xai" || xaiSubscriptionEnabled)
62101
62120
  );
62102
62121
  }, [modes, chatgptSubscriptionEnabled, xaiSubscriptionEnabled]);
62122
+ const hasSubscriptionMode = Boolean(
62123
+ manifestModeEntries?.some((m) => m.provider === "openai-codex")
62124
+ );
62125
+ const { data: subscriptionStatus } = useChatGptSubscriptionStatus(hasSubscriptionMode);
62126
+ const { data: subscriptionModels, isError: subscriptionModelsError } = useChatGptSubscriptionModels(
62127
+ hasSubscriptionMode && !!subscriptionStatus?.connected
62128
+ );
62129
+ const modeEntries = useMemo(() => {
62130
+ if (!manifestModeEntries || !subscriptionStatus?.connected || !subscriptionModels) {
62131
+ return manifestModeEntries;
62132
+ }
62133
+ const index = manifestModeEntries.findIndex(
62134
+ (entry) => entry.provider === "openai-codex"
62135
+ );
62136
+ if (index === -1) return manifestModeEntries;
62137
+ const live = subscriptionModels.map((model) => ({
62138
+ key: model.modeKey,
62139
+ name: model.name,
62140
+ style: "default",
62141
+ thinking: false,
62142
+ provider: "openai-codex",
62143
+ modelId: model.id,
62144
+ model: model.id,
62145
+ reasoning: model.reasoningConfig
62146
+ }));
62147
+ return [
62148
+ ...manifestModeEntries.slice(0, index),
62149
+ ...live,
62150
+ ...manifestModeEntries.slice(index).filter((entry) => entry.provider !== "openai-codex")
62151
+ ];
62152
+ }, [manifestModeEntries, subscriptionStatus?.connected, subscriptionModels]);
62103
62153
  const defaultPlaceholder = placeholder ?? t2("chat.input.placeholder");
62104
62154
  const typingEnabled = Boolean(
62105
62155
  placeholderTyping && composerModes.length === 0
62106
62156
  );
62107
62157
  const approvalPrompt = useComposerApprovalPrompt({
62108
62158
  conversationId: isNewConversation ? null : sessionKey,
62109
- onDecision: onToolApproval
62159
+ onDecision: onToolApproval,
62160
+ running: status === "submitted" || status === "streaming"
62110
62161
  });
62111
62162
  const askingApproval = approvalPrompt.current !== null;
62112
62163
  const composerPlaceholder = askingApproval ? "Or tell the agent what to do instead\u2026" : composerModes.length > 0 ? t2("shell.modePlaceholder") : defaultPlaceholder;
@@ -62126,16 +62177,9 @@ function ChatInputBar({
62126
62177
  const codexConnected = Boolean(
62127
62178
  codexStatusData?.connected
62128
62179
  );
62129
- const hasSubscriptionMode = Boolean(
62130
- modeEntries?.some((m) => m.provider === "openai-codex")
62131
- );
62132
- const { data: subscriptionStatus } = useChatGptSubscriptionStatus(hasSubscriptionMode);
62133
62180
  const hasXaiMode = Boolean(modeEntries?.some((m) => m.provider === "xai"));
62134
62181
  const { data: xaiSubscriptionStatus } = useXaiSubscriptionStatus(hasXaiMode);
62135
62182
  const [xaiDialogOpen, setXaiDialogOpen] = useState(false);
62136
- const { data: subscriptionModels, isError: subscriptionModelsError } = useChatGptSubscriptionModels(
62137
- hasSubscriptionMode && !!subscriptionStatus?.connected
62138
- );
62139
62183
  const eligibleSubscriptionModels = subscriptionStatus?.connected ? subscriptionModelsError ? null : subscriptionModels ? new Set(subscriptionModels.map((model) => model.id)) : void 0 : void 0;
62140
62184
  useEffect(() => {
62141
62185
  if (!orgFlags) return;
@@ -62178,7 +62222,7 @@ function ChatInputBar({
62178
62222
  },
62179
62223
  [isCopilotComposer, rememberComposerModel]
62180
62224
  );
62181
- const modelSelectorNode = showModelSelector && modeEntries ? /* @__PURE__ */ jsxs(Fragment, { children: [
62225
+ const modelSelectorNode = showModelSelector && modelChoiceEnabled && modeEntries ? /* @__PURE__ */ jsxs(Fragment, { children: [
62182
62226
  /* @__PURE__ */ jsx(
62183
62227
  ModelSelector,
62184
62228
  {
@@ -62398,7 +62442,7 @@ function ChatInputBar({
62398
62442
  const approvalOptions = modeOptions ?? capabilities.approvalModes?.options ?? DEFAULT_APPROVAL_MODE_OPTIONS;
62399
62443
  const approvalValue = capabilities.approvalModes?.value ?? approvalMode;
62400
62444
  const approvalChange = capabilities.approvalModes?.onChange ?? onApprovalModeChange;
62401
- const showApprovalSelector = Boolean(approvalChange);
62445
+ const showApprovalSelector = Boolean(approvalChange) && approvalModesEnabled;
62402
62446
  const readingHistory = useComposerStore((s) => s.readingHistory);
62403
62447
  const [editorFocused, setEditorFocused] = useState(false);
62404
62448
  const { data: pendingApprovalData } = useSessionPendingApprovals(
@@ -62558,7 +62602,7 @@ function ChatInputBar({
62558
62602
  ] }) : null;
62559
62603
  const desktopRailControls = /* @__PURE__ */ jsxs(Fragment, { children: [
62560
62604
  attachmentButton,
62561
- /* @__PURE__ */ jsx(AppsButton, { agentId, disabled: isDisabled })
62605
+ pluginsEnabled && /* @__PURE__ */ jsx(AppsButton, { agentId, disabled: isDisabled })
62562
62606
  ] });
62563
62607
  const compactRailControls = /* @__PURE__ */ jsxs("div", { className: "flex w-52 flex-col gap-0.5", children: [
62564
62608
  enableFileUpload && /* @__PURE__ */ jsxs(
@@ -62574,7 +62618,7 @@ function ChatInputBar({
62574
62618
  ]
62575
62619
  }
62576
62620
  ),
62577
- /* @__PURE__ */ jsx(
62621
+ pluginsEnabled && /* @__PURE__ */ jsx(
62578
62622
  AppsButton,
62579
62623
  {
62580
62624
  agentId,
@@ -63220,6 +63264,28 @@ function providerKeyMissingMessage(error2) {
63220
63264
  return raw.match(SENTENCE)?.[0] ?? null;
63221
63265
  }
63222
63266
 
63267
+ // ../chat/src/ui/chat/chat-refusal.ts
63268
+ var REFUSALS = /* @__PURE__ */ new Set([
63269
+ "This Agent is set up for customers and is not available in Chat",
63270
+ "This Agent is set up for customers and has no Agent mode",
63271
+ "This Agent is not assigned to you",
63272
+ "You do not have access to Chat in this workspace",
63273
+ "You need permission to run Agents to test the live version"
63274
+ ]);
63275
+ function chatRefusalMessage(error2) {
63276
+ const raw = errorText(error2, "").trim();
63277
+ if (!raw) return null;
63278
+ let message = raw;
63279
+ if (raw.startsWith("{")) {
63280
+ try {
63281
+ message = JSON.parse(raw).message;
63282
+ } catch {
63283
+ return null;
63284
+ }
63285
+ }
63286
+ return typeof message === "string" && REFUSALS.has(message) ? message : null;
63287
+ }
63288
+
63223
63289
  // ../chat/src/ui/chat/composer-column.ts
63224
63290
  var COPILOT_GUTTER = "in-data-[copilot-panel]:pl-1 in-data-[copilot-panel]:pr-1";
63225
63291
  function composerColumnClass(compact) {
@@ -63230,6 +63296,8 @@ function getErrorMessage(error2) {
63230
63296
  if (consultation) return consultation;
63231
63297
  const missingKey = providerKeyMissingMessage(error2);
63232
63298
  if (missingKey) return missingKey;
63299
+ const refusal = chatRefusalMessage(error2);
63300
+ if (refusal) return refusal;
63233
63301
  const msg = (error2.message ?? "").toLowerCase();
63234
63302
  if (msg.includes("timed out") || msg.includes("timeout"))
63235
63303
  return "The request timed out. Try a simpler question or switch to a faster model.";
@@ -63480,6 +63548,10 @@ function agentProcessingState(messages, status) {
63480
63548
  if (message.role !== "assistant") break;
63481
63549
  for (let p = message.parts.length - 1; p >= 0; p--) {
63482
63550
  const part = message.parts[p];
63551
+ if (part.type === "data-person-confirmation") {
63552
+ if (getPersonConfirmation(part)?.status === "pending") return "waiting";
63553
+ continue;
63554
+ }
63483
63555
  if (isToolPart(part)) {
63484
63556
  const state = getToolState(part);
63485
63557
  const name = getToolName(part);
@@ -63538,6 +63610,26 @@ function currentToolActivity(messages) {
63538
63610
  }
63539
63611
  return null;
63540
63612
  }
63613
+ function ThreadPendingConfirmations({
63614
+ conversationId,
63615
+ messages
63616
+ }) {
63617
+ const confirmations = usePersonConfirmations(conversationId, {
63618
+ poll: (all) => Object.values(all).some((confirmation) => confirmation.status === "pending")
63619
+ });
63620
+ const [kept, setKept] = useState(() => /* @__PURE__ */ new Set());
63621
+ const unshown = unshownPendingConfirmations(confirmations.data, messages, kept);
63622
+ const ids = unshown.map((c) => c.id).join(",");
63623
+ useEffect(() => {
63624
+ if (!ids) return;
63625
+ setKept((current) => {
63626
+ const missing = ids.split(",").filter((id) => !current.has(id));
63627
+ return missing.length === 0 ? current : /* @__PURE__ */ new Set([...current, ...missing]);
63628
+ });
63629
+ }, [ids]);
63630
+ if (unshown.length === 0) return null;
63631
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: unshown.map((confirmation) => /* @__PURE__ */ jsx(ConversationConfirmationCard, { confirmation, conversationId }, confirmation.id)) });
63632
+ }
63541
63633
  var REASONING_EFFORTS = ["max", "xhigh", "high", "medium", "low", "minimal", "none"];
63542
63634
  function isReasoningEffort(value) {
63543
63635
  return !!value && REASONING_EFFORTS.includes(value);
@@ -64121,6 +64213,7 @@ function FronteraChat({
64121
64213
  }
64122
64214
  ) }, message.id)
64123
64215
  )),
64216
+ /* @__PURE__ */ jsx(ThreadPendingConfirmations, { conversationId, messages }),
64124
64217
  showWaiting && /* @__PURE__ */ jsx(
64125
64218
  Thinking,
64126
64219
  {
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { MagnifyingGlassIcon } from './chunk-X3QVICX7.js';
3
- import { requestPaneFocus, useArtifacts, usePlugins, useCanvasStore, useArtifactStore, useChatOverviewStore, useSourcesEnrichment, sourceKind, useCitationViewer, resolveSourceDisplay, extractDomain, canvasId, StudioDisplayIcon, LayoutDashboardIcon, useAgentPanelStore, SourceFavicon, dedup, useArtifactFileObjectUrl, resolveArtifactIconFormat, artifactFormatIcon, avatarMotionForStream, AGENT_AVATAR_SIZE, getFileCategory, FileThumbnail, formatFileSize, usePathname, artifactFormatSubtitle, artifactCategory, Input, MobileScreenSheet, TooltipTrigger, Tooltip, useChatCapabilities, TooltipContent, processMessageParts, GridSpinner, PanelEdgeRing, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, extractCitationsFromSteps, resolvePluginLanguage, getMessageDisplayTimestampValue } from './chunk-QFVBVBUR.js';
3
+ import { requestPaneFocus, useArtifacts, usePlugins, useCanvasStore, useArtifactStore, useChatOverviewStore, useSourcesEnrichment, sourceKind, useCitationViewer, resolveSourceDisplay, extractDomain, canvasId, StudioDisplayIcon, LayoutDashboardIcon, useAgentPanelStore, SourceFavicon, dedup, useArtifactFileObjectUrl, resolveArtifactIconFormat, artifactFormatIcon, avatarMotionForStream, AGENT_AVATAR_SIZE, getFileCategory, FileThumbnail, formatFileSize, usePathname, artifactFormatSubtitle, artifactCategory, Input, MobileScreenSheet, TooltipTrigger, Tooltip, useChatCapabilities, TooltipContent, processMessageParts, GridSpinner, PanelEdgeRing, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, extractCitationsFromSteps, resolvePluginLanguage, getMessageDisplayTimestampValue } from './chunk-DCYKWIKY.js';
4
4
  import { Popover, PopoverTrigger, PopoverContent, Sheet, SheetContent, SheetHeader, SheetTitle } from './chunk-T5SANYSX.js';
5
- import { useTranslation, useIsMobile } from './chunk-I5NAI7HP.js';
5
+ import { useTranslation, useIsMobile } from './chunk-6VYLZSJV.js';
6
6
  import { Collapsible, CollapsibleTrigger, CollapsibleContent, Shimmer, HoverCard, HoverCardTrigger, HoverCardContent } from './chunk-PKNEC4LJ.js';
7
7
  import { ChevronDownMediumIcon, ScrollArea, Skeleton, Button } from './chunk-UWKO24VT.js';
8
8
  import { Dialog, DialogContent, DialogHeader, DialogTitle, CrossMediumIcon } from './chunk-2P4IEVOQ.js';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { MagnifyingGlassIcon } from './chunk-X3QVICX7.js';
3
3
  import { Sheet, SheetContent, SheetHeader, SheetTitle, Popover, PopoverTrigger, PopoverContent } from './chunk-T5SANYSX.js';
4
- import { useIsMobile, useTranslation } from './chunk-I5NAI7HP.js';
4
+ import { useIsMobile, useTranslation } from './chunk-6VYLZSJV.js';
5
5
  import { CrossMediumIcon } from './chunk-2P4IEVOQ.js';
6
6
  import { AgentAvatar } from './chunk-PUMRNN3R.js';
7
7
  import { cn, Checkmark1Icon } from './chunk-LGVMMBL3.js';
@@ -41,8 +41,13 @@ var en_default = {
41
41
  "console.agents.counts.plugins.many": "{count} plugins",
42
42
  "console.agents.counts.knowledge.one": "1 knowledge base",
43
43
  "console.agents.counts.knowledge.many": "{count} knowledge bases",
44
- "agents.detail.navigation.capabilities": "Identity & Capabilities",
45
- "agents.detail.navigation.settings": "Settings",
44
+ "agents.detail.navigation.overview": "Overview",
45
+ "agents.detail.navigation.configure": "Configure",
46
+ "agents.detail.navigation.knowledge": "Knowledge",
47
+ "agents.detail.navigation.evaluations": "Evaluations",
48
+ "agents.detail.navigation.sessions": "Sessions",
49
+ "agents.detail.navigation.monitor": "Monitor",
50
+ "agents.detail.navigation.analysis": "Analysis",
46
51
  "agents.detail.navigation.test": "Test chat",
47
52
  "agents.detail.sidebar.back": "Back to all Agents",
48
53
  "console.agents.installedFromPacks.title": "Installed {noun}",
@@ -1160,6 +1165,10 @@ var en_default = {
1160
1165
  "shell.empty.contactAdmin": "Contact your workspace admin",
1161
1166
  "shell.empty.noAssignedAgentsTitle": "No Agents are assigned to you in Chat.",
1162
1167
  "shell.empty.noAssignedAgentsAsk": "Ask your administrator.",
1168
+ "shell.empty.customerFacingTitle": "Agents set up for customers aren't in Chat",
1169
+ "shell.empty.customerFacingPreview": "An Agent with a behavior setup serves customers, so Chat doesn't offer it. Test it with Preview on its Agent page.",
1170
+ "shell.empty.customerFacingAsk": "An Agent with a behavior setup serves customers, so Chat doesn't offer it. Ask your administrator for an Agent you can use in Chat.",
1171
+ "shell.empty.goToAgents": "Go to Agents",
1163
1172
  "shell.modePlaceholder": "Add details and send\u2026",
1164
1173
  "shell.shortcutDesc.spreadsheet": "Organize data in tables",
1165
1174
  "shell.shortcutDesc.document": "Turn rough ideas into a polished document",
@@ -2078,6 +2087,7 @@ var en_default = {
2078
2087
  "admin.auditLog.verb.disabled": "Disabled",
2079
2088
  "admin.auditLog.verb.rotated": "Rotated",
2080
2089
  "admin.auditLog.verb.skipped": "Skipped",
2090
+ "admin.auditLog.verb.revealed": "Revealed",
2081
2091
  "admin.auditLog.verb.detected": "Detected",
2082
2092
  "admin.auditLog.outcome.success": "Success",
2083
2093
  "admin.auditLog.outcome.failure": "Failure",
@@ -2474,6 +2484,8 @@ var en_default = {
2474
2484
  "eval.datasetItems.loadingMore": "Loading\u2026",
2475
2485
  "eval.datasetItems.subjectAuthored": "authored",
2476
2486
  "eval.datasetItems.subjectAuthoredHint": "written by hand, imported from CSV",
2487
+ "eval.datasetItems.subjectScenario": "Scenario",
2488
+ "eval.datasetItems.subjectScenarioHint": "a whole conversation with a simulated customer",
2477
2489
  "eval.datasetItems.expectationsTitle": "Expectations",
2478
2490
  "eval.datasetItems.expectationsHint": "What the answer has to do, beyond matching the expected output. Each line is graded on its own, with evidence.",
2479
2491
  "eval.datasetItems.expectationsEmpty": "No expectations yet.",
@@ -3193,6 +3205,7 @@ var en_default = {
3193
3205
  "eval.runs.nameLabel": "Run name",
3194
3206
  "eval.runs.namePlaceholder": "Optional \u2014 a timestamp is used if left blank",
3195
3207
  "eval.runs.judgesLabel": "Judges",
3208
+ "eval.runs.judgeAddedForReference": "added: items have a reference answer",
3196
3209
  "eval.runs.judgesHint": "An item passes only when every selected judge passes it.",
3197
3210
  "eval.runs.startedToast": 'Run "{runName}" started',
3198
3211
  "eval.runs.startFailed": "Could not start the run",
@@ -3201,6 +3214,19 @@ var en_default = {
3201
3214
  "eval.runs.running": "Running {done}/{total}",
3202
3215
  "eval.runs.passCount": "{count} pass",
3203
3216
  "eval.runs.failCount": "{count} fail",
3217
+ "eval.runs.reliability": "All attempts passed: {passed} of {items} items",
3218
+ "eval.runs.reliabilityHint": "An item counts only when every one of its attempts passed.",
3219
+ "eval.runs.falseCompletions": "Ended resolved without the required action: {count} of {attempts} conversations",
3220
+ "eval.runs.deduplicated": "Repeated requests run once: {count}",
3221
+ "eval.runs.silentTurns": "A customer message got no reply: {count} of {attempts} conversations",
3222
+ "eval.runs.repeatedRequests": "The customer had to repeat a request: {count} of {attempts} conversations",
3223
+ "eval.runs.offTopicDeclined": "Declined off-topic messages: {count}",
3224
+ "eval.runs.endingsTitle": "How conversations ended",
3225
+ "eval.runs.ending.resolved": "Resolved",
3226
+ "eval.runs.ending.handed_off": "Handed off",
3227
+ "eval.runs.ending.unresolved": "Unresolved",
3228
+ "eval.runs.ending.abandoned": "Abandoned",
3229
+ "eval.runs.ending.none": "No outcome",
3204
3230
  "eval.runs.errorCount": "{count} error",
3205
3231
  "eval.runs.produced": "What the agent answered",
3206
3232
  "eval.runs.itemError": "Error",
@@ -3261,6 +3287,11 @@ var en_default = {
3261
3287
  "eval.runs.configHideCandidate": "Hide candidate",
3262
3288
  "eval.runs.trajectoryTitle": "What the agent did",
3263
3289
  "eval.runs.trajectorySkill": "skill: {name}",
3290
+ "eval.runs.trajectoryKnowledge": "knowledge: {count}",
3291
+ "eval.runs.knowledgeTitle": "Knowledge retrieved",
3292
+ "eval.runs.knowledgeQuery": "Searched for \u201C{query}\u201D",
3293
+ "eval.runs.knowledgeNothing": "Nothing relevant was found.",
3294
+ "eval.runs.knowledgeScore": "score {score}",
3264
3295
  "eval.runs.trajectoryViewRaw": "View raw",
3265
3296
  "eval.runs.trajectoryHideRaw": "Hide raw",
3266
3297
  "eval.runs.expectationsTitle": "Expectations",
@@ -3320,6 +3351,7 @@ var en_default = {
3320
3351
  "eval.datasetItems.detailQuestion": "Question",
3321
3352
  "eval.datasetItems.detailQuestionUnknown": "(no title recorded for this conversation)",
3322
3353
  "eval.datasetItems.detailExpectedMissing": "No expected answer. This item can check whether the reply reads well, but it cannot fail a wrong one \u2014 add a correction on the review it came from.",
3354
+ "eval.datasetItems.scenarioChecksHint": "This scenario's checks come from its definition and are not edited here.",
3323
3355
  "console.skillTest.rowResult": "Result",
3324
3356
  "console.skillTest.rowSkillLoaded": "Skill loaded",
3325
3357
  "blueprint.sidebar.media": "Media Sets",
@@ -3557,6 +3589,15 @@ var en_default = {
3557
3589
  "desktopAccess.approval.allowedOnceAt": "Allowed once \xB7 {time}",
3558
3590
  "desktopAccess.approval.deny": "Deny",
3559
3591
  "desktopAccess.approval.deniedShort": "Denied",
3592
+ "chat.personConfirmation.kind": "Confirmation",
3593
+ "chat.personConfirmation.confirm": "Confirm",
3594
+ "chat.personConfirmation.cancel": "Cancel",
3595
+ "chat.personConfirmation.sending": "Sending your answer\u2026",
3596
+ "chat.personConfirmation.expires": "Expires {when}",
3597
+ "chat.personConfirmation.chose": "Chose \u201C{label}\u201D",
3598
+ "chat.personConfirmation.choseAt": "Chose \u201C{label}\u201D at {time}",
3599
+ "chat.personConfirmation.expired": "Expired without an answer",
3600
+ "chat.personConfirmation.failed": "Your answer couldn\u2019t be sent. Try again.",
3560
3601
  "desktopAccess.waiting.kind": "Waiting for your desktop",
3561
3602
  "desktopAccess.waiting.failed": "Local operation failed",
3562
3603
  "desktopAccess.conflict.kind": "Changed since it was read",
@@ -5282,8 +5323,13 @@ var id_default = {
5282
5323
  "console.agents.counts.plugins.many": "{count} plugin",
5283
5324
  "console.agents.counts.knowledge.one": "1 basis pengetahuan",
5284
5325
  "console.agents.counts.knowledge.many": "{count} basis pengetahuan",
5285
- "agents.detail.navigation.capabilities": "Identitas & kapabilitas",
5286
- "agents.detail.navigation.settings": "Pengaturan",
5326
+ "agents.detail.navigation.overview": "Ikhtisar",
5327
+ "agents.detail.navigation.configure": "Konfigurasi",
5328
+ "agents.detail.navigation.knowledge": "Pengetahuan",
5329
+ "agents.detail.navigation.evaluations": "Evaluasi",
5330
+ "agents.detail.navigation.sessions": "Sesi",
5331
+ "agents.detail.navigation.monitor": "Pemantauan",
5332
+ "agents.detail.navigation.analysis": "Analisis",
5287
5333
  "agents.detail.navigation.test": "Chat pengujian",
5288
5334
  "agents.detail.sidebar.back": "Kembali ke semua Agen",
5289
5335
  "console.agents.installedFromPacks.title": "{noun} Terpasang",
@@ -6373,6 +6419,10 @@ var id_default = {
6373
6419
  "shell.selectAgent": "Pilih agen",
6374
6420
  "shell.empty.noAssignedAgentsTitle": "Belum ada Agent yang ditetapkan untuk Anda di Chat.",
6375
6421
  "shell.empty.noAssignedAgentsAsk": "Hubungi administrator Anda.",
6422
+ "shell.empty.customerFacingTitle": "Agent yang disiapkan untuk pelanggan tidak ada di Chat",
6423
+ "shell.empty.customerFacingPreview": "Agent dengan pengaturan perilaku melayani pelanggan, jadi Chat tidak menawarkannya. Uji dengan Preview di halaman Agent-nya.",
6424
+ "shell.empty.customerFacingAsk": "Agent dengan pengaturan perilaku melayani pelanggan, jadi Chat tidak menawarkannya. Minta administrator Anda menyediakan Agent yang dapat Anda gunakan di Chat.",
6425
+ "shell.empty.goToAgents": "Buka Agents",
6376
6426
  "shell.selectAgentDescription": "Pilih agen untuk memulai sesi baru.",
6377
6427
  "shell.greeting.morning": "Selamat pagi",
6378
6428
  "shell.greeting.afternoon": "Selamat siang",
@@ -7302,6 +7352,7 @@ var id_default = {
7302
7352
  "admin.auditLog.verb.disabled": "Dinonaktifkan",
7303
7353
  "admin.auditLog.verb.rotated": "Dirotasi",
7304
7354
  "admin.auditLog.verb.skipped": "Dilewati",
7355
+ "admin.auditLog.verb.revealed": "Ditampilkan",
7305
7356
  "admin.auditLog.verb.detected": "Terdeteksi",
7306
7357
  "admin.auditLog.outcome.success": "Berhasil",
7307
7358
  "admin.auditLog.outcome.failure": "Gagal",
@@ -7675,6 +7726,8 @@ var id_default = {
7675
7726
  "eval.datasetItems.loadingMore": "Memuat\u2026",
7676
7727
  "eval.datasetItems.subjectAuthored": "ditulis manual",
7677
7728
  "eval.datasetItems.subjectAuthoredHint": "ditulis manual, diimpor dari CSV",
7729
+ "eval.datasetItems.subjectScenario": "Skenario",
7730
+ "eval.datasetItems.subjectScenarioHint": "seluruh percakapan dengan pelanggan simulasi",
7678
7731
  "eval.datasetItems.expectationsTitle": "Ekspektasi",
7679
7732
  "eval.datasetItems.expectationsHint": "Hal yang harus dilakukan jawaban, di luar kecocokan dengan jawaban yang diharapkan. Tiap baris dinilai sendiri, disertai bukti.",
7680
7733
  "eval.datasetItems.expectationsEmpty": "Belum ada ekspektasi.",
@@ -8394,6 +8447,7 @@ var id_default = {
8394
8447
  "eval.runs.nameLabel": "Nama run",
8395
8448
  "eval.runs.namePlaceholder": "Opsional \u2014 memakai stempel waktu bila dikosongkan",
8396
8449
  "eval.runs.judgesLabel": "Penilai",
8450
+ "eval.runs.judgeAddedForReference": "ditambahkan: item memiliki jawaban acuan",
8397
8451
  "eval.runs.judgesHint": "Item lulus hanya bila semua penilai yang dipilih meluluskannya.",
8398
8452
  "eval.runs.startedToast": 'Run "{runName}" dimulai',
8399
8453
  "eval.runs.startFailed": "Tidak dapat memulai run",
@@ -8402,6 +8456,19 @@ var id_default = {
8402
8456
  "eval.runs.running": "Berjalan {done}/{total}",
8403
8457
  "eval.runs.passCount": "{count} lulus",
8404
8458
  "eval.runs.failCount": "{count} gagal",
8459
+ "eval.runs.reliability": "Semua percobaan lulus: {passed} dari {items} item",
8460
+ "eval.runs.reliabilityHint": "Item dihitung hanya jika setiap percobaannya lulus.",
8461
+ "eval.runs.falseCompletions": "Berakhir terselesaikan tanpa tindakan yang diwajibkan: {count} dari {attempts} percakapan",
8462
+ "eval.runs.deduplicated": "Permintaan berulang dijalankan sekali: {count}",
8463
+ "eval.runs.silentTurns": "Pesan pelanggan tidak dibalas: {count} dari {attempts} percakapan",
8464
+ "eval.runs.repeatedRequests": "Pelanggan harus mengulang permintaan: {count} dari {attempts} percakapan",
8465
+ "eval.runs.offTopicDeclined": "Pesan di luar topik yang ditolak: {count}",
8466
+ "eval.runs.endingsTitle": "Cara percakapan berakhir",
8467
+ "eval.runs.ending.resolved": "Terselesaikan",
8468
+ "eval.runs.ending.handed_off": "Dialihkan ke petugas",
8469
+ "eval.runs.ending.unresolved": "Tidak terselesaikan",
8470
+ "eval.runs.ending.abandoned": "Ditinggalkan",
8471
+ "eval.runs.ending.none": "Tanpa hasil",
8405
8472
  "eval.runs.errorCount": "{count} galat",
8406
8473
  "eval.runs.produced": "Jawaban agen",
8407
8474
  "eval.runs.itemError": "Galat",
@@ -8462,6 +8529,11 @@ var id_default = {
8462
8529
  "eval.runs.configHideCandidate": "Sembunyikan kandidat",
8463
8530
  "eval.runs.trajectoryTitle": "Yang dilakukan agen",
8464
8531
  "eval.runs.trajectorySkill": "skill: {name}",
8532
+ "eval.runs.trajectoryKnowledge": "pengetahuan: {count}",
8533
+ "eval.runs.knowledgeTitle": "Pengetahuan yang diambil",
8534
+ "eval.runs.knowledgeQuery": "Mencari \u201C{query}\u201D",
8535
+ "eval.runs.knowledgeNothing": "Tidak ada yang relevan.",
8536
+ "eval.runs.knowledgeScore": "skor {score}",
8465
8537
  "eval.runs.trajectoryViewRaw": "Lihat data mentah",
8466
8538
  "eval.runs.trajectoryHideRaw": "Sembunyikan data mentah",
8467
8539
  "eval.runs.expectationsTitle": "Ekspektasi",
@@ -8525,6 +8597,7 @@ var id_default = {
8525
8597
  "eval.datasetItems.detailQuestion": "Pertanyaan",
8526
8598
  "eval.datasetItems.detailQuestionUnknown": "(tidak ada judul untuk percakapan ini)",
8527
8599
  "eval.datasetItems.detailExpectedMissing": "Tidak ada jawaban yang diharapkan. Item ini bisa memeriksa apakah balasan enak dibaca, tetapi tidak bisa menggagalkan jawaban yang salah \u2014 tambahkan koreksi pada ulasan asalnya.",
8600
+ "eval.datasetItems.scenarioChecksHint": "Pemeriksaan skenario ini berasal dari definisinya dan tidak diubah di sini.",
8528
8601
  "console.skillTest.rowResult": "Hasil",
8529
8602
  "console.skillTest.rowSkillLoaded": "Skill dimuat",
8530
8603
  "blueprint.sidebar.media": "Set Media",
@@ -8762,6 +8835,15 @@ var id_default = {
8762
8835
  "desktopAccess.approval.allowedOnceAt": "Diizinkan sekali \xB7 {time}",
8763
8836
  "desktopAccess.approval.deny": "Tolak",
8764
8837
  "desktopAccess.approval.deniedShort": "Ditolak",
8838
+ "chat.personConfirmation.kind": "Konfirmasi",
8839
+ "chat.personConfirmation.confirm": "Konfirmasi",
8840
+ "chat.personConfirmation.cancel": "Batal",
8841
+ "chat.personConfirmation.sending": "Mengirim jawaban Anda\u2026",
8842
+ "chat.personConfirmation.expires": "Kedaluwarsa {when}",
8843
+ "chat.personConfirmation.chose": "Memilih \u201C{label}\u201D",
8844
+ "chat.personConfirmation.choseAt": "Memilih \u201C{label}\u201D pukul {time}",
8845
+ "chat.personConfirmation.expired": "Kedaluwarsa tanpa jawaban",
8846
+ "chat.personConfirmation.failed": "Jawaban Anda tidak terkirim. Coba lagi.",
8765
8847
  "desktopAccess.waiting.kind": "Menunggu desktop Anda",
8766
8848
  "desktopAccess.waiting.failed": "Operasi lokal gagal",
8767
8849
  "desktopAccess.conflict.kind": "Berubah sejak dibaca",
@@ -10451,6 +10533,13 @@ function getStoredLocale() {
10451
10533
  const stored = localStorage.getItem(STORAGE_KEY);
10452
10534
  return stored === "id" ? "id" : "en";
10453
10535
  }
10536
+ function interpolate(str, vars) {
10537
+ if (!vars) return str;
10538
+ for (const [k, v] of Object.entries(vars)) {
10539
+ str = str.replace(new RegExp(`\\{${k}\\}`, "g"), () => String(v));
10540
+ }
10541
+ return str;
10542
+ }
10454
10543
  var I18nContext = createContext(null);
10455
10544
  function I18nProvider({ children }) {
10456
10545
  const [locale, setLocaleState] = useState("en");
@@ -10463,13 +10552,7 @@ function I18nProvider({ children }) {
10463
10552
  }, []);
10464
10553
  const t = useCallback(
10465
10554
  (key, vars) => {
10466
- let str = locales[locale]?.[key] ?? locales.en[key] ?? key;
10467
- if (vars) {
10468
- for (const [k, v] of Object.entries(vars)) {
10469
- str = str.replace(new RegExp(`\\{${k}\\}`, "g"), String(v));
10470
- }
10471
- }
10472
- return str;
10555
+ return interpolate(locales[locale]?.[key] ?? locales.en[key] ?? key, vars);
10473
10556
  },
10474
10557
  [locale]
10475
10558
  );
@@ -10483,15 +10566,7 @@ function useTranslation() {
10483
10566
  locale: "en",
10484
10567
  setLocale: () => {
10485
10568
  },
10486
- t: (key, vars) => {
10487
- let str = locales.en[key] ?? key;
10488
- if (vars) {
10489
- for (const [k, v] of Object.entries(vars)) {
10490
- str = str.replace(new RegExp(`\\{${k}\\}`, "g"), String(v));
10491
- }
10492
- }
10493
- return str;
10494
- }
10569
+ t: (key, vars) => interpolate(locales.en[key] ?? key, vars)
10495
10570
  };
10496
10571
  }
10497
10572
  return ctx;