@adminide-stack/yantra-mobile 12.0.95 → 12.0.96-alpha.1

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.
Files changed (169) hide show
  1. package/lib/compute.js +113 -1
  2. package/lib/compute.js.map +1 -1
  3. package/lib/features/agent-chat/NativeAgentChat.js +38 -29
  4. package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
  5. package/lib/features/apps/AppsCatalog.js +20 -0
  6. package/lib/features/apps/AppsCatalog.js.map +1 -1
  7. package/lib/features/apps/mobileAppCatalog.js +19 -0
  8. package/lib/features/apps/mobileAppCatalog.js.map +1 -1
  9. package/lib/features/apps/nativeAppHandoff.js +45 -0
  10. package/lib/features/apps/nativeAppHandoff.js.map +1 -0
  11. package/lib/features/apps/nativeAppNavigation.js +66 -0
  12. package/lib/features/apps/nativeAppNavigation.js.map +1 -0
  13. package/lib/features/canvas/CanvasExperience.js +3 -3
  14. package/lib/features/canvas/CanvasExperience.js.map +1 -1
  15. package/lib/features/canvas/nativeViewerRegistry.js.map +1 -1
  16. package/lib/features/canvas/useCanvasSession.js +10 -6
  17. package/lib/features/canvas/useCanvasSession.js.map +1 -1
  18. package/lib/features/job-search/JobSearchExperience.js +46 -17
  19. package/lib/features/job-search/JobSearchExperience.js.map +1 -1
  20. package/lib/features/local-services/LocalServicesAgentChatPane.js +146 -0
  21. package/lib/features/local-services/LocalServicesAgentChatPane.js.map +1 -0
  22. package/lib/features/local-services/LocalServicesExperience.js +740 -0
  23. package/lib/features/local-services/LocalServicesExperience.js.map +1 -0
  24. package/lib/features/local-services/categories.js +290 -0
  25. package/lib/features/local-services/categories.js.map +1 -0
  26. package/lib/features/local-services/chat/widgetOpening.js +139 -0
  27. package/lib/features/local-services/chat/widgetOpening.js.map +1 -0
  28. package/lib/features/local-services/components/BusinessCard.js +269 -0
  29. package/lib/features/local-services/components/BusinessCard.js.map +1 -0
  30. package/lib/features/local-services/components/BusinessDetail.js +441 -0
  31. package/lib/features/local-services/components/BusinessDetail.js.map +1 -0
  32. package/lib/features/local-services/components/CategoryGrid.js +101 -0
  33. package/lib/features/local-services/components/CategoryGrid.js.map +1 -0
  34. package/lib/features/local-services/components/FiltersSheet.js +162 -0
  35. package/lib/features/local-services/components/FiltersSheet.js.map +1 -0
  36. package/lib/features/local-services/components/ProAvatar.js +38 -0
  37. package/lib/features/local-services/components/ProAvatar.js.map +1 -0
  38. package/lib/features/local-services/components/ResultsMap.js +139 -0
  39. package/lib/features/local-services/components/ResultsMap.js.map +1 -0
  40. package/lib/features/local-services/components/SearchForm.js +230 -0
  41. package/lib/features/local-services/components/SearchForm.js.map +1 -0
  42. package/lib/features/local-services/components/Sheet.js +65 -0
  43. package/lib/features/local-services/components/Sheet.js.map +1 -0
  44. package/lib/features/local-services/components/States.js +147 -0
  45. package/lib/features/local-services/components/States.js.map +1 -0
  46. package/lib/features/local-services/deviceLocation.js +50 -0
  47. package/lib/features/local-services/deviceLocation.js.map +1 -0
  48. package/lib/features/local-services/filters.js +75 -0
  49. package/lib/features/local-services/filters.js.map +1 -0
  50. package/lib/features/local-services/format.js +125 -0
  51. package/lib/features/local-services/format.js.map +1 -0
  52. package/lib/features/local-services/localServicesClient.js +178 -0
  53. package/lib/features/local-services/localServicesClient.js.map +1 -0
  54. package/lib/features/local-services/localServicesContext.js +48 -0
  55. package/lib/features/local-services/localServicesContext.js.map +1 -0
  56. package/lib/features/local-services/localServicesMemory.js +202 -0
  57. package/lib/features/local-services/localServicesMemory.js.map +1 -0
  58. package/lib/features/local-services/localServicesNormalize.js +204 -0
  59. package/lib/features/local-services/localServicesNormalize.js.map +1 -0
  60. package/lib/features/local-services/localServicesTheme.js +50 -0
  61. package/lib/features/local-services/localServicesTheme.js.map +1 -0
  62. package/lib/features/local-services/nativeLocalServicesRegistry.js +15 -0
  63. package/lib/features/local-services/nativeLocalServicesRegistry.js.map +1 -0
  64. package/lib/features/local-services/openingHours.js +153 -0
  65. package/lib/features/local-services/openingHours.js.map +1 -0
  66. package/lib/features/local-services/searchDraft.js +80 -0
  67. package/lib/features/local-services/searchDraft.js.map +1 -0
  68. package/lib/features/local-services/useLocalServicesSearch.js +181 -0
  69. package/lib/features/local-services/useLocalServicesSearch.js.map +1 -0
  70. package/lib/features/movies/MoviesAgentChatPane.js +49 -0
  71. package/lib/features/movies/MoviesAgentChatPane.js.map +1 -0
  72. package/lib/features/movies/MoviesExperience.js +316 -0
  73. package/lib/features/movies/MoviesExperience.js.map +1 -0
  74. package/lib/features/movies/components/DiscoverHero.js +256 -0
  75. package/lib/features/movies/components/DiscoverHero.js.map +1 -0
  76. package/lib/features/movies/components/LocationSheet.js +259 -0
  77. package/lib/features/movies/components/LocationSheet.js.map +1 -0
  78. package/lib/features/movies/components/MovieDetail.js +527 -0
  79. package/lib/features/movies/components/MovieDetail.js.map +1 -0
  80. package/lib/features/movies/components/MovieRail.js +188 -0
  81. package/lib/features/movies/components/MovieRail.js.map +1 -0
  82. package/lib/features/movies/components/MovieRow.js +119 -0
  83. package/lib/features/movies/components/MovieRow.js.map +1 -0
  84. package/lib/features/movies/components/MoviesStates.js +191 -0
  85. package/lib/features/movies/components/MoviesStates.js.map +1 -0
  86. package/lib/features/movies/components/MoviesTabBar.js +82 -0
  87. package/lib/features/movies/components/MoviesTabBar.js.map +1 -0
  88. package/lib/features/movies/components/PosterImage.js +40 -0
  89. package/lib/features/movies/components/PosterImage.js.map +1 -0
  90. package/lib/features/movies/components/Scrim.js +14 -0
  91. package/lib/features/movies/components/Scrim.js.map +1 -0
  92. package/lib/features/movies/components/SearchPanel.js +208 -0
  93. package/lib/features/movies/components/SearchPanel.js.map +1 -0
  94. package/lib/features/movies/components/ShowtimesPanel.js +279 -0
  95. package/lib/features/movies/components/ShowtimesPanel.js.map +1 -0
  96. package/lib/features/movies/components/TrailerPlayer.js +89 -0
  97. package/lib/features/movies/components/TrailerPlayer.js.map +1 -0
  98. package/lib/features/movies/components/TrailerStill.js +12 -0
  99. package/lib/features/movies/components/TrailerStill.js.map +1 -0
  100. package/lib/features/movies/components/WatchPanel.js +206 -0
  101. package/lib/features/movies/components/WatchPanel.js.map +1 -0
  102. package/lib/features/movies/components/WatchlistPanel.js +45 -0
  103. package/lib/features/movies/components/WatchlistPanel.js.map +1 -0
  104. package/lib/features/movies/deviceLocation.js +35 -0
  105. package/lib/features/movies/deviceLocation.js.map +1 -0
  106. package/lib/features/movies/movieFormats.js +52 -0
  107. package/lib/features/movies/movieFormats.js.map +1 -0
  108. package/lib/features/movies/movieMeta.js +38 -0
  109. package/lib/features/movies/movieMeta.js.map +1 -0
  110. package/lib/features/movies/moviesClient.js +245 -0
  111. package/lib/features/movies/moviesClient.js.map +1 -0
  112. package/lib/features/movies/moviesContext.js +30 -0
  113. package/lib/features/movies/moviesContext.js.map +1 -0
  114. package/lib/features/movies/moviesNormalize.js +427 -0
  115. package/lib/features/movies/moviesNormalize.js.map +1 -0
  116. package/lib/features/movies/moviesPrompts.js +38 -0
  117. package/lib/features/movies/moviesPrompts.js.map +1 -0
  118. package/lib/features/movies/moviesStorage.js +101 -0
  119. package/lib/features/movies/moviesStorage.js.map +1 -0
  120. package/lib/features/movies/moviesTheme.js +54 -0
  121. package/lib/features/movies/moviesTheme.js.map +1 -0
  122. package/lib/features/movies/nativeMoviesRegistry.js +15 -0
  123. package/lib/features/movies/nativeMoviesRegistry.js.map +1 -0
  124. package/lib/features/movies/showtimeDates.js +114 -0
  125. package/lib/features/movies/showtimeDates.js.map +1 -0
  126. package/lib/features/movies/useDiscoverRails.js +77 -0
  127. package/lib/features/movies/useDiscoverRails.js.map +1 -0
  128. package/lib/features/movies/useMoviesPrefs.js +40 -0
  129. package/lib/features/movies/useMoviesPrefs.js.map +1 -0
  130. package/lib/features/resume/ResumeExperience.js +54 -17
  131. package/lib/features/resume/ResumeExperience.js.map +1 -1
  132. package/lib/features/shopping/chat/homeShoppingIntent.js +8 -6
  133. package/lib/features/shopping/chat/homeShoppingIntent.js.map +1 -1
  134. package/lib/hooks/mintScope.js +28 -0
  135. package/lib/hooks/mintScope.js.map +1 -0
  136. package/lib/hooks/mintSurfaceSystemToken.js +29 -149
  137. package/lib/hooks/mintSurfaceSystemToken.js.map +1 -1
  138. package/lib/hooks/surfaceHandoffScript.js +79 -0
  139. package/lib/hooks/surfaceHandoffScript.js.map +1 -0
  140. package/lib/hooks/useCdecliAutoConnect.js +6 -1
  141. package/lib/hooks/useCdecliAutoConnect.js.map +1 -1
  142. package/lib/hooks/useObtainSystemToken.js +14 -16
  143. package/lib/hooks/useObtainSystemToken.js.map +1 -1
  144. package/lib/index.js +1 -1
  145. package/lib/index.js.map +1 -1
  146. package/lib/routes.json +108 -0
  147. package/lib/screens/CanvasBoard/index.js +4 -2
  148. package/lib/screens/CanvasBoard/index.js.map +1 -1
  149. package/lib/screens/Chat/index.js +113 -46
  150. package/lib/screens/Chat/index.js.map +1 -1
  151. package/lib/screens/Home/HomeScreen.js +15 -2
  152. package/lib/screens/Home/HomeScreen.js.map +1 -1
  153. package/lib/screens/Home/components/CanvasPrewarm.js +5 -4
  154. package/lib/screens/Home/components/CanvasPrewarm.js.map +1 -1
  155. package/lib/screens/JobSearchNative/index.js +7 -4
  156. package/lib/screens/JobSearchNative/index.js.map +1 -1
  157. package/lib/screens/LocalServicesNative/index.js +99 -0
  158. package/lib/screens/LocalServicesNative/index.js.map +1 -0
  159. package/lib/screens/LocalServicesNative/useLocalServicesHostChat.js +65 -0
  160. package/lib/screens/LocalServicesNative/useLocalServicesHostChat.js.map +1 -0
  161. package/lib/screens/MoviesNative/index.js +82 -0
  162. package/lib/screens/MoviesNative/index.js.map +1 -0
  163. package/lib/screens/MoviesNative/useMoviesHostChat.js +63 -0
  164. package/lib/screens/MoviesNative/useMoviesHostChat.js.map +1 -0
  165. package/lib/screens/ResumeNative/index.js +7 -4
  166. package/lib/screens/ResumeNative/index.js.map +1 -1
  167. package/lib/screens/WebBuilder/index.js +31 -31
  168. package/lib/screens/WebBuilder/index.js.map +1 -1
  169. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useMemo,useLayoutEffect,useCallback,useState,useRef,useEffect}from'react';import {useWindowDimensions,Keyboard,View,StyleSheet,Pressable}from'react-native';import {getDefaultLeftItems,Box,Text,InputToolBar}from'@admin-layout/gluestack-ui-mobile';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {MessageActionBar}from'../../features/chat/MessageActionBar.js';import {ChatTranscript}from'../../features/chat/ChatTranscript.js';import {AskUserCard}from'../../features/chat/AskUserCard.js';import {pendingAskUser}from'../../features/chat/askUser.js';import {PendingConnectorConnectCard}from'../../features/chat/ConnectorConnectPrompt.js';import {QueuedFollowUps}from'../../features/chat/QueuedFollowUps.js';import {displayConnectorConnectMessages,displayConnectorConnectText}from'common';import {splitPreResponse}from'../../features/chat/preResponse.js';import {useCdecliConnection}from'../../contexts/CdecliConnectionContext.js';import {useChatLiveStream}from'../../contexts/ChatLiveStreamContext.js';import {KeyboardAwareScreen,KeyboardComposerDock}from'../../components/KeyboardComposerDock.js';import {YantraBrandLoader,YANTRA_LOADER_SIZE_COMPACT}from'../../components/YantraBrandLoader.js';import ThinkingIndicator from'../../components/ThinkingIndicator.js';import {mobileTokens}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import DeepSearchModal from'../Home/components/DeepSearchModal.js';import {normalizeSummaryText,extractDeepSearchSources}from'../Home/deepSearchUtils.js';import {AudioRecorderPanel}from'../../features/audio-input/AudioRecorderPanel.js';import {NativeDictationBar}from'../../features/audio-input/NativeDictationBar.js';import {isNativeDictationAvailable}from'../../features/audio-input/nativeDictation.js';import {useImageAttachments}from'../../features/attachments/useImageAttachments.js';import {ComposerAttachmentBar}from'../../features/attachments/ComposerAttachmentBar.js';import {useComposerAttachMenu}from'../../features/attachments/ComposerAttachMenu.js';import {hasComposerAttachments,takeComposerAttachments}from'../../features/attachments/composerAttachmentHandoff.js';import {MicErrorBoundary}from'../../features/audio-input/MicErrorBoundary.js';import {requestMicPermission}from'../../features/audio-input/useAudioPermission.js';import {shouldRedirectToShop}from'../../features/shopping/chat/homeShoppingIntent.js';import {replaceWithShopNative,shopHandoffParams,pushShopNative}from'../../features/shopping/chat/openShopNative.js';var __defProp = Object.defineProperty;
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useMemo,useLayoutEffect,useCallback,useState,useRef,useEffect}from'react';import {useWindowDimensions,Keyboard,StyleSheet,View,Pressable}from'react-native';import {getDefaultLeftItems,Box,Text,InputToolBar}from'@admin-layout/gluestack-ui-mobile';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {MessageActionBar}from'../../features/chat/MessageActionBar.js';import {ChatTranscript}from'../../features/chat/ChatTranscript.js';import {AskUserCard}from'../../features/chat/AskUserCard.js';import {pendingAskUser}from'../../features/chat/askUser.js';import {PendingConnectorConnectCard}from'../../features/chat/ConnectorConnectPrompt.js';import {QueuedFollowUps}from'../../features/chat/QueuedFollowUps.js';import {displayConnectorConnectMessages,displayConnectorConnectText}from'common';import {splitPreResponse}from'../../features/chat/preResponse.js';import {useCdecliConnection}from'../../contexts/CdecliConnectionContext.js';import {useChatLiveStream}from'../../contexts/ChatLiveStreamContext.js';import {KeyboardAwareScreen,KeyboardComposerDock}from'../../components/KeyboardComposerDock.js';import {YantraBrandLoader,YANTRA_LOADER_SIZE_COMPACT}from'../../components/YantraBrandLoader.js';import ThinkingIndicator from'../../components/ThinkingIndicator.js';import {mobileTokens}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import DeepSearchModal from'../Home/components/DeepSearchModal.js';import {normalizeSummaryText,extractDeepSearchSources}from'../Home/deepSearchUtils.js';import {AudioRecorderPanel}from'../../features/audio-input/AudioRecorderPanel.js';import {NativeDictationBar}from'../../features/audio-input/NativeDictationBar.js';import {isNativeDictationAvailable}from'../../features/audio-input/nativeDictation.js';import {useImageAttachments}from'../../features/attachments/useImageAttachments.js';import {ComposerAttachmentBar}from'../../features/attachments/ComposerAttachmentBar.js';import {useComposerAttachMenu}from'../../features/attachments/ComposerAttachMenu.js';import {hasComposerAttachments,takeComposerAttachments}from'../../features/attachments/composerAttachmentHandoff.js';import {MicErrorBoundary}from'../../features/audio-input/MicErrorBoundary.js';import {requestMicPermission}from'../../features/audio-input/useAudioPermission.js';import {shouldRedirectToShop}from'../../features/shopping/chat/homeShoppingIntent.js';import {replaceWithShopNative,shopHandoffParams,pushShopNative}from'../../features/shopping/chat/openShopNative.js';import {resolveNativeHandoff}from'../../features/apps/nativeAppHandoff.js';import {replaceWithNativeApp,nativeHandoffParams,pushNativeApp}from'../../features/apps/nativeAppNavigation.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -17,6 +17,20 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ function routingModeOf(value) {
21
+ if (value === "deep-search" || value === "build") return value;
22
+ return "chat";
23
+ }
24
+ function modeOf(isDeepSearchMode, isBuildMode) {
25
+ if (isDeepSearchMode) return "deep-search";
26
+ if (isBuildMode) return "build";
27
+ return "chat";
28
+ }
29
+ const PLACEHOLDER = {
30
+ "deep-search": "Research anything...",
31
+ build: "Describe an app to build...",
32
+ chat: "Ask anything..."
33
+ };
20
34
  function ChatScreen() {
21
35
  var _a;
22
36
  const navigation = useNavigation();
@@ -30,7 +44,9 @@ function ChatScreen() {
30
44
  const raw = typeof params.initialQuery === "string" ? params.initialQuery.trim() : "";
31
45
  return raw.length > 0 ? raw : null;
32
46
  }, [params.initialQuery]);
33
- const initialAttachments = params.initialAttachments;
47
+ const {
48
+ initialAttachments
49
+ } = params;
34
50
  const shopRouteChecked = params.shopRouteChecked === true;
35
51
  const {
36
52
  isDark
@@ -43,10 +59,13 @@ function ChatScreen() {
43
59
  const secondaryTextColor = isDark ? "#94a3b8" : mobileTokens.color.textMuted;
44
60
  const insets = useSafeAreaInsets();
45
61
  const cdecli = useCdecliConnection();
62
+ const {
63
+ setActiveChannelId
64
+ } = cdecli;
46
65
  useLayoutEffect(() => {
47
66
  if (!channelId) return;
48
- cdecli.setActiveChannelId(channelId);
49
- }, [channelId, cdecli.setActiveChannelId]);
67
+ setActiveChannelId(channelId);
68
+ }, [channelId, setActiveChannelId]);
50
69
  const chat = useChatLiveStream();
51
70
  const transcriptRows = useMemo(() => {
52
71
  var _a2;
@@ -124,7 +143,7 @@ function ChatScreen() {
124
143
  const hasQuery = trimmed.length > 0;
125
144
  const hasAttachments = imageAttachments.pending.length > 0;
126
145
  const canSubmit = (hasQuery || hasAttachments) && Boolean(channelId);
127
- const [activeMode, setActiveMode] = useState(() => params.initialMode === "deep-search" ? "deep-search" : params.initialMode === "build" ? "build" : "chat");
146
+ const [activeMode, setActiveMode] = useState(() => routingModeOf(params.initialMode));
128
147
  const handleModeSwitch = useCallback((mode) => {
129
148
  setActiveMode(mode);
130
149
  }, []);
@@ -162,7 +181,7 @@ function ChatScreen() {
162
181
  }
163
182
  void (async () => {
164
183
  var _a2;
165
- const mode = isDeepSearchMode ? "deep-search" : isBuildMode ? "build" : "chat";
184
+ const mode = modeOf(isDeepSearchMode, isBuildMode);
166
185
  let openShop = false;
167
186
  try {
168
187
  openShop = !shopRouteChecked && await shouldRedirectToShop(initialQuery != null ? initialQuery : "", (_a2 = attachments == null ? void 0 : attachments.length) != null ? _a2 : 0, mode);
@@ -179,6 +198,18 @@ function ChatScreen() {
179
198
  }));
180
199
  return;
181
200
  }
201
+ const nativeRoute = shopRouteChecked ? null : await resolveNativeHandoff(initialQuery != null ? initialQuery : "", {
202
+ mode
203
+ });
204
+ if (nativeRoute) {
205
+ replaceWithNativeApp(navigation, nativeRoute, nativeHandoffParams({
206
+ orgName: params.orgName,
207
+ query: initialQuery != null ? initialQuery : "",
208
+ files: attachments,
209
+ channelId
210
+ }));
211
+ return;
212
+ }
182
213
  void sendMessage(initialQuery != null ? initialQuery : "", attachments, channelId);
183
214
  })();
184
215
  try {
@@ -206,6 +237,7 @@ function ChatScreen() {
206
237
  }, [sendMessage, channelId]);
207
238
  const transcriptDisplayRows = useMemo(() => displayConnectorConnectMessages(transcriptRows), [transcriptRows]);
208
239
  const transcriptStreaming = useMemo(() => response ? displayConnectorConnectText(response, true) : response, [response]);
240
+ const hasAssistantReply = useMemo(() => messages.some((m) => m.role === "assistant"), [messages]);
209
241
  const handleSend = useCallback((text) => {
210
242
  var _a2;
211
243
  const pending = imageAttachments.forSend();
@@ -253,10 +285,31 @@ function ChatScreen() {
253
285
  }
254
286
  return;
255
287
  }
288
+ const nativeRoute = await resolveNativeHandoff(t, {
289
+ mode: isDeepSearchMode ? "deep-search" : "chat",
290
+ followUp: hasAssistantReply
291
+ });
292
+ if (nativeRoute) {
293
+ if (messages.length === 0) {
294
+ replaceWithNativeApp(navigation, nativeRoute, nativeHandoffParams({
295
+ orgName: params.orgName,
296
+ query: t,
297
+ files: pending,
298
+ channelId
299
+ }));
300
+ } else {
301
+ pushNativeApp(navigation, nativeRoute, nativeHandoffParams({
302
+ orgName: params.orgName,
303
+ query: t,
304
+ files: pending
305
+ }));
306
+ }
307
+ return;
308
+ }
256
309
  void sendMessage(t, pending, channelId);
257
310
  })();
258
311
  imageAttachments.clear();
259
- }, [channelId, sendMessage, isDeepSearchMode, isBuildMode, navigation, params.orgName, imageAttachments, messages.length]);
312
+ }, [channelId, sendMessage, isDeepSearchMode, isBuildMode, navigation, params.orgName, imageAttachments, messages.length, hasAssistantReply]);
260
313
  const handleValueChange = useCallback((e) => {
261
314
  var _a2, _b;
262
315
  setValue((_b = (_a2 = e == null ? void 0 : e.nativeEvent) == null ? void 0 : _a2.text) != null ? _b : "");
@@ -378,7 +431,7 @@ function ChatScreen() {
378
431
  onClick: () => handleModeSwitch("build")
379
432
  }
380
433
  }), [activeMode, handleModeSwitch]);
381
- const inputPlaceholder = isDeepSearchMode ? "Research anything..." : isBuildMode ? "Describe an app to build..." : "Ask anything...";
434
+ const inputPlaceholder = PLACEHOLDER[modeOf(isDeepSearchMode, isBuildMode)];
382
435
  const inputConfig = useMemo(() => ({
383
436
  value,
384
437
  onChange: handleValueChange,
@@ -408,6 +461,56 @@ function ChatScreen() {
408
461
  const isWaitingForGateway = !autoFiredRef.current && !!channelId && (!!initialQuery || hasComposerAttachments(channelId)) && cdecli.status !== "connected" && cdecli.status !== "error";
409
462
  const showSendingLoader = waitingForAssistant;
410
463
  const pinSendingLoaderNearComposer = messages.length > 0 || Boolean((response != null ? response : "").trim());
464
+ let transcriptArea;
465
+ if (!channelId) {
466
+ transcriptArea = /* @__PURE__ */ jsxs(Box, { flex: 1, alignItems: "center", justifyContent: "center", children: [
467
+ /* @__PURE__ */ jsx(YantraBrandLoader, { size: YANTRA_LOADER_SIZE_COMPACT }),
468
+ /* @__PURE__ */ jsx(Text, { style: [styles.statusText, {
469
+ color: secondaryTextColor
470
+ }], children: "No channel selected" })
471
+ ] });
472
+ } else if (isHydrating) {
473
+ transcriptArea = /* @__PURE__ */ jsx(Box, { flex: 1, px: "$4", pt: "$8", children: /* @__PURE__ */ jsx(ThinkingIndicator, { variant: "awaiting", color: secondaryTextColor, isDark, label: "Opening conversation\u2026" }) });
474
+ } else if (isWaitingForGateway) {
475
+ transcriptArea = /* @__PURE__ */ jsxs(Box, { flex: 1, alignItems: "center", justifyContent: "center", children: [
476
+ /* @__PURE__ */ jsx(YantraBrandLoader, { size: YANTRA_LOADER_SIZE_COMPACT }),
477
+ /* @__PURE__ */ jsx(Text, { style: [styles.statusText, {
478
+ color: secondaryTextColor
479
+ }], children: "Connecting gateway\u2026" })
480
+ ] });
481
+ } else {
482
+ transcriptArea = /* @__PURE__ */ jsx(View, { style: styles.transcriptPane, children: /* @__PURE__ */ jsx(ChatTranscript, { messages: transcriptDisplayRows, streamingContent: transcriptStreaming, quickReply, listFooter: showSendingLoader && pinSendingLoaderNearComposer ? /* @__PURE__ */ jsx(View, { style: styles.thinkingInThread, children: /* @__PURE__ */ jsx(ThinkingIndicator, { variant: "awaiting", color: secondaryTextColor, isDark }) }) : null, renderMessageActions, isDark, listContentStyle: {
483
+ paddingTop: 12,
484
+ paddingBottom: 8,
485
+ margin: 0,
486
+ width: contentMaxWidth,
487
+ alignSelf: "center"
488
+ } }) });
489
+ }
490
+ let composerBody;
491
+ if (showNativeDictation) {
492
+ composerBody = // A throw inside the native recognizer degrades to
493
+ // the Whisper recorder rather than killing the JS
494
+ // thread (same guard rationale as the recorder).
495
+ /* @__PURE__ */ jsx(MicErrorBoundary, { onCancel: handleDictationFallback, onError: handleDictationFallback, children: /* @__PURE__ */ jsx(NativeDictationBar, { isDark, onInterim: () => void 0, onTranscriptionComplete: handleDictationComplete, onCancel: handleDictationCancel, onFallback: handleDictationFallback }) });
496
+ } else if (showAudioRecorder) {
497
+ composerBody = /*
498
+ * Render-time JS errors thrown by `useAudioRecorder`
499
+ * (e.g. expo-audio native module missing, recorder
500
+ * constructor throws in a release build) are caught
501
+ * by the boundary and converted into a soft cancel
502
+ * via the same handlers the panel itself uses on
503
+ * runtime errors. Without this, a throw during the
504
+ * panel's render phase kills the JS thread in
505
+ * release / TestFlight.
506
+ */
507
+ /* @__PURE__ */ jsx(MicErrorBoundary, { onCancel: handleRecorderCancel, onError: handleRecorderError, children: /* @__PURE__ */ jsx(AudioRecorderPanel, { isDark, onTranscriptionComplete: handleTranscriptionComplete, onCancel: handleRecorderCancel, onError: handleRecorderError }) });
508
+ } else {
509
+ composerBody = /* @__PURE__ */ jsxs(Fragment, { children: [
510
+ /* @__PURE__ */ jsx(ComposerAttachmentBar, { attachments: imageAttachments.pending, onRemove: imageAttachments.remove, isDark }),
511
+ /* @__PURE__ */ jsx(InputToolBar, { inputConfig, leftItems, rightItems, templateButton: null, templateModalConfig: null, micSendButton })
512
+ ] });
513
+ }
411
514
  return /* @__PURE__ */ jsxs(SafeAreaView, { edges: ["left", "right"], style: {
412
515
  flex: 1,
413
516
  backgroundColor: surfaceColor
@@ -442,23 +545,7 @@ function ChatScreen() {
442
545
  }, children: /* @__PURE__ */ jsx(Text, { fontSize: "$sm", style: {
443
546
  color: isDark ? "#fecaca" : "#991b1b"
444
547
  }, children: chatError || cdecli.error }) }),
445
- !channelId ? /* @__PURE__ */ jsxs(Box, { flex: 1, alignItems: "center", justifyContent: "center", children: [
446
- /* @__PURE__ */ jsx(YantraBrandLoader, { size: YANTRA_LOADER_SIZE_COMPACT }),
447
- /* @__PURE__ */ jsx(Text, { style: [styles.statusText, {
448
- color: secondaryTextColor
449
- }], children: "No channel selected" })
450
- ] }) : isHydrating ? /* @__PURE__ */ jsx(Box, { flex: 1, px: "$4", pt: "$8", children: /* @__PURE__ */ jsx(ThinkingIndicator, { variant: "awaiting", color: secondaryTextColor, isDark, label: "Opening conversation\u2026" }) }) : isWaitingForGateway ? /* @__PURE__ */ jsxs(Box, { flex: 1, alignItems: "center", justifyContent: "center", children: [
451
- /* @__PURE__ */ jsx(YantraBrandLoader, { size: YANTRA_LOADER_SIZE_COMPACT }),
452
- /* @__PURE__ */ jsx(Text, { style: [styles.statusText, {
453
- color: secondaryTextColor
454
- }], children: "Connecting gateway\u2026" })
455
- ] }) : /* @__PURE__ */ jsx(View, { style: styles.transcriptPane, children: /* @__PURE__ */ jsx(ChatTranscript, { messages: transcriptDisplayRows, streamingContent: transcriptStreaming, quickReply, listFooter: showSendingLoader && pinSendingLoaderNearComposer ? /* @__PURE__ */ jsx(View, { style: styles.thinkingInThread, children: /* @__PURE__ */ jsx(ThinkingIndicator, { variant: "awaiting", color: secondaryTextColor, isDark }) }) : null, renderMessageActions, isDark, listContentStyle: {
456
- paddingTop: 12,
457
- paddingBottom: 8,
458
- margin: 0,
459
- width: contentMaxWidth,
460
- alignSelf: "center"
461
- } }) }),
548
+ transcriptArea,
462
549
  showSendingLoader && !pinSendingLoaderNearComposer ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles.sendingLoaderEmptyState, children: /* @__PURE__ */ jsx(ThinkingIndicator, { variant: "awaiting", color: secondaryTextColor, isDark }) }) : null,
463
550
  /* @__PURE__ */ jsxs(KeyboardComposerDock, { closedInset: insets.bottom, onSwipeUp: () => {
464
551
  var _a2;
@@ -491,27 +578,7 @@ function ChatScreen() {
491
578
  }], children: /* @__PURE__ */ jsx(Text, { style: [styles.voiceErrorText, {
492
579
  color: isDark ? "#fecaca" : "#991b1b"
493
580
  }], children: voiceError || imageAttachments.error }) }) : null,
494
- showNativeDictation ? (
495
- // A throw inside the native recognizer degrades to
496
- // the Whisper recorder rather than killing the JS
497
- // thread (same guard rationale as the recorder).
498
- /* @__PURE__ */ jsx(MicErrorBoundary, { onCancel: handleDictationFallback, onError: handleDictationFallback, children: /* @__PURE__ */ jsx(NativeDictationBar, { isDark, onInterim: () => void 0, onTranscriptionComplete: handleDictationComplete, onCancel: handleDictationCancel, onFallback: handleDictationFallback }) })
499
- ) : showAudioRecorder ? (
500
- /*
501
- * Render-time JS errors thrown by `useAudioRecorder`
502
- * (e.g. expo-audio native module missing, recorder
503
- * constructor throws in a release build) are caught
504
- * by the boundary and converted into a soft cancel
505
- * via the same handlers the panel itself uses on
506
- * runtime errors. Without this, a throw during the
507
- * panel's render phase kills the JS thread in
508
- * release / TestFlight.
509
- */
510
- /* @__PURE__ */ jsx(MicErrorBoundary, { onCancel: handleRecorderCancel, onError: handleRecorderError, children: /* @__PURE__ */ jsx(AudioRecorderPanel, { isDark, onTranscriptionComplete: handleTranscriptionComplete, onCancel: handleRecorderCancel, onError: handleRecorderError }) })
511
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
512
- /* @__PURE__ */ jsx(ComposerAttachmentBar, { attachments: imageAttachments.pending, onRemove: imageAttachments.remove, isDark }),
513
- /* @__PURE__ */ jsx(InputToolBar, { inputConfig, leftItems, rightItems, templateButton: null, templateModalConfig: null, micSendButton })
514
- ] })
581
+ composerBody
515
582
  ] })
516
583
  ] })
517
584
  ] }) }),