chat-js 1.0.0-alpha.7 → 1.0.0-alpha.8

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 (232) hide show
  1. package/README.md +4 -4
  2. package/dist/index.js +433 -658
  3. package/package.json +1 -1
  4. package/templates/chat-app/AGENTS.md +1 -1
  5. package/templates/chat-app/agent/hooks/followup-suggestions.ts +1 -1
  6. package/templates/chat-app/agent/hooks/projects.ts +1 -1
  7. package/templates/chat-app/agent/hooks/search.ts +1 -1
  8. package/templates/chat-app/agent/instructions/projects.ts +1 -1
  9. package/templates/chat-app/agent/tools/mcp.ts +1 -1
  10. package/templates/chat-app/app/(auth)/device-login/page.tsx +1 -1
  11. package/templates/chat-app/app/(chat)/api/files/upload/route.ts +1 -1
  12. package/templates/chat-app/app/(chat)/chat/{[id] → [chatId]}/page.tsx +4 -4
  13. package/templates/chat-app/app/(chat)/project/[projectId]/chat/[chatId]/page.tsx +1 -1
  14. package/templates/chat-app/app/(chat)/project/[projectId]/page.tsx +1 -1
  15. package/templates/chat-app/app/(chat)/settings/connectors/[connectorId]/page.tsx +1 -1
  16. package/templates/chat-app/app/(chat)/settings/connectors/page.tsx +1 -1
  17. package/templates/chat-app/app/(chat)/settings/models/page.tsx +1 -1
  18. package/templates/chat-app/app/(chat)/share/[id]/page.tsx +1 -1
  19. package/templates/chat-app/app/api/agent-conversations/route.test.ts +5 -5
  20. package/templates/chat-app/app/api/agent-conversations/route.ts +2 -2
  21. package/templates/chat-app/app/api/agent-response-groups/route.test.ts +5 -5
  22. package/templates/chat-app/app/api/agent-response-groups/route.ts +1 -1
  23. package/templates/chat-app/app/api/eve/[...path]/route.test.ts +133 -4
  24. package/templates/chat-app/app/api/eve/[...path]/route.ts +175 -49
  25. package/templates/chat-app/app/api/eve-guest/route.ts +1 -1
  26. package/templates/chat-app/app/api/mcp/oauth/callback/route.ts +1 -1
  27. package/templates/chat-app/chatjs/core/chat/compose.ts +4 -4
  28. package/templates/chat-app/chatjs/core/chat/contracts.ts +6 -6
  29. package/templates/chat-app/chatjs/core/installation/contracts.ts +0 -7
  30. package/templates/chat-app/chatjs/generated/installed-auth-ui.ts +2 -2
  31. package/templates/chat-app/chatjs/generated/installed-auth.ts +4 -2
  32. package/templates/chat-app/chatjs/generated/installed-billing.ts +2 -2
  33. package/templates/chat-app/chatjs/generated/installed-chat-ui.ts +24 -24
  34. package/templates/chat-app/chatjs/generated/installed-chat.ts +12 -12
  35. package/templates/chat-app/chatjs/generated/installed-cleanup.ts +4 -4
  36. package/templates/chat-app/chatjs/generated/installed-instrumentation.ts +8 -2
  37. package/templates/chat-app/chatjs/generated/installed-layout.ts +2 -2
  38. package/templates/chat-app/chatjs/generated/installed-model-visibility.ts +2 -2
  39. package/templates/chat-app/chatjs/generated/installed-navigation.ts +2 -2
  40. package/templates/chat-app/chatjs/generated/installed-routers.ts +18 -19
  41. package/templates/chat-app/chatjs/generated/installed-session-profiles.ts +5 -3
  42. package/templates/chat-app/chatjs/generated/installed-sign-out.ts +2 -2
  43. package/templates/chat-app/chatjs/generated/installed-signed-out.ts +2 -2
  44. package/templates/chat-app/chatjs/generated/installed-uploads.ts +2 -2
  45. package/templates/chat-app/chatjs/plugins/ai-titles/{chat.ts → chat-server.ts} +3 -1
  46. package/templates/chat-app/chatjs/plugins/ai-titles/generate-title.ts +7 -9
  47. package/templates/chat-app/chatjs/plugins/ai-titles/{chatjs.json → plugin.json} +3 -4
  48. package/templates/chat-app/chatjs/plugins/ai-titles/title-queries.ts +4 -4
  49. package/templates/chat-app/chatjs/plugins/attachment-uploads/{client-plugin.ts → chat-ui.ts} +1 -3
  50. package/templates/chat-app/chatjs/plugins/attachment-uploads/plugin.json +16 -0
  51. package/templates/chat-app/chatjs/plugins/credits/billing.ts +3 -1
  52. package/templates/chat-app/chatjs/plugins/credits/{client-plugin.ts → chat-ui.ts} +1 -1
  53. package/templates/chat-app/chatjs/plugins/credits/{chatjs.json → plugin.json} +4 -13
  54. package/templates/chat-app/chatjs/plugins/credits/router.ts +4 -2
  55. package/templates/chat-app/chatjs/plugins/desktop/auth-form.tsx +3 -1
  56. package/templates/chat-app/chatjs/plugins/desktop/auth-server.ts +3 -1
  57. package/templates/chat-app/chatjs/plugins/desktop/{client-plugin.ts → layout-ui.ts} +1 -1
  58. package/templates/chat-app/chatjs/plugins/desktop/navigation.ts +3 -1
  59. package/templates/chat-app/chatjs/plugins/desktop/{chatjs.json → plugin.json} +4 -16
  60. package/templates/chat-app/chatjs/plugins/desktop/sign-out.ts +3 -1
  61. package/templates/chat-app/chatjs/plugins/feedback/chat-server.ts +13 -0
  62. package/templates/chat-app/chatjs/plugins/feedback/{client-plugin.ts → chat-ui.ts} +1 -1
  63. package/templates/chat-app/chatjs/plugins/feedback/feedback-actions.tsx +4 -4
  64. package/templates/chat-app/chatjs/plugins/feedback/feedback-queries.ts +11 -11
  65. package/templates/chat-app/chatjs/plugins/feedback/feedback-schema.ts +2 -2
  66. package/templates/chat-app/chatjs/plugins/feedback/{chatjs.json → plugin.json} +5 -14
  67. package/templates/chat-app/chatjs/plugins/feedback/router.ts +9 -7
  68. package/templates/chat-app/chatjs/plugins/feedback/vote-message.ts +3 -6
  69. package/templates/chat-app/chatjs/plugins/followup-suggestions/{chat.ts → chat-server.ts} +3 -1
  70. package/templates/chat-app/chatjs/plugins/followup-suggestions/{client-plugin.ts → chat-ui.ts} +1 -1
  71. package/templates/chat-app/chatjs/plugins/followup-suggestions/followup-queries.ts +2 -2
  72. package/templates/chat-app/chatjs/plugins/followup-suggestions/{chatjs.json → plugin.json} +5 -17
  73. package/templates/chat-app/chatjs/plugins/followup-suggestions/router.ts +8 -9
  74. package/templates/chat-app/chatjs/plugins/followup-suggestions/suggestions.tsx +2 -7
  75. package/templates/chat-app/chatjs/plugins/followup-suggestions/use-followups.ts +2 -2
  76. package/templates/chat-app/chatjs/plugins/guest-chat/cleanup.ts +1 -7
  77. package/templates/chat-app/chatjs/plugins/guest-chat/guest-auth.ts +1 -0
  78. package/templates/chat-app/chatjs/plugins/guest-chat/instrumentation.ts +6 -0
  79. package/templates/chat-app/chatjs/plugins/guest-chat/{chatjs.json → plugin.json} +6 -12
  80. package/templates/chat-app/chatjs/plugins/guest-chat/session-profile.ts +3 -1
  81. package/templates/chat-app/chatjs/plugins/guest-chat/signed-out.tsx +46 -20
  82. package/templates/chat-app/chatjs/plugins/image-viewer/{client-plugin.ts → chat-ui.ts} +1 -1
  83. package/templates/chat-app/chatjs/plugins/image-viewer/plugin.json +11 -0
  84. package/templates/chat-app/chatjs/plugins/mcp/{client-plugin.ts → chat-ui.ts} +1 -1
  85. package/templates/chat-app/chatjs/plugins/mcp/db/encrypted-text.ts +1 -1
  86. package/templates/chat-app/chatjs/plugins/mcp/{chatjs.json → plugin.json} +5 -13
  87. package/templates/chat-app/chatjs/plugins/mcp/router.ts +4 -2
  88. package/templates/chat-app/chatjs/plugins/mcp/setup.ts +2 -2
  89. package/templates/chat-app/chatjs/plugins/mcp/{mcp-env.ts → validate-env.ts} +2 -1
  90. package/templates/chat-app/chatjs/plugins/model-preferences/{client-plugin.ts → chat-ui.ts} +1 -3
  91. package/templates/chat-app/chatjs/plugins/model-preferences/{use-model-preferences.ts → model-visibility.ts} +1 -1
  92. package/templates/chat-app/chatjs/plugins/model-preferences/{chatjs.json → plugin.json} +5 -13
  93. package/templates/chat-app/chatjs/plugins/model-preferences/router.ts +5 -1
  94. package/templates/chat-app/chatjs/plugins/projects/{chat.ts → chat-server.ts} +3 -1
  95. package/templates/chat-app/chatjs/plugins/projects/{client-plugin.ts → chat-ui.ts} +1 -1
  96. package/templates/chat-app/chatjs/plugins/projects/conversation-hook.ts +1 -1
  97. package/templates/chat-app/chatjs/plugins/projects/db/project-queries.ts +2 -2
  98. package/templates/chat-app/chatjs/plugins/projects/{chatjs.json → plugin.json} +5 -14
  99. package/templates/chat-app/chatjs/plugins/projects/router.ts +7 -7
  100. package/templates/chat-app/chatjs/plugins/projects/ui/chat-contributions.tsx +3 -3
  101. package/templates/chat-app/chatjs/plugins/projects/ui/eve-move-project-dialog.tsx +1 -1
  102. package/templates/chat-app/chatjs/plugins/projects/ui/sidebar-projects.tsx +12 -11
  103. package/templates/chat-app/chatjs/plugins/search/{chat.ts → chat-server.ts} +8 -6
  104. package/templates/chat-app/chatjs/plugins/search/{client-plugin.ts → chat-ui.ts} +1 -1
  105. package/templates/chat-app/chatjs/plugins/search/{chatjs.json → plugin.json} +5 -14
  106. package/templates/chat-app/chatjs/plugins/search/router.ts +4 -2
  107. package/templates/chat-app/chatjs/plugins/search/search-backfill.ts +4 -4
  108. package/templates/chat-app/chatjs/plugins/search/search-chats.tsx +1 -1
  109. package/templates/chat-app/chatjs/plugins/search/search-hook.ts +2 -2
  110. package/templates/chat-app/chatjs/plugins/search/search-queries.ts +13 -13
  111. package/templates/chat-app/chatjs/plugins/search/search-results-view.tsx +2 -2
  112. package/templates/chat-app/chatjs/plugins/search/search-schema.ts +3 -3
  113. package/templates/chat-app/chatjs/plugins/sharing/{chat.ts → chat-server.ts} +3 -1
  114. package/templates/chat-app/chatjs/plugins/sharing/{client-plugin.ts → chat-ui.ts} +1 -1
  115. package/templates/chat-app/chatjs/plugins/sharing/{chatjs.json → plugin.json} +5 -14
  116. package/templates/chat-app/chatjs/plugins/sharing/router.ts +4 -2
  117. package/templates/chat-app/chatjs/plugins/sharing/ui/chat-contributions.tsx +9 -11
  118. package/templates/chat-app/chatjs/plugins/sharing/ui/share-button.tsx +6 -6
  119. package/templates/chat-app/chatjs/plugins/sharing/ui/share-dialog.tsx +9 -9
  120. package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/{client-plugin.ts → chat-ui.ts} +1 -1
  121. package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/plugin.json +12 -0
  122. package/templates/chat-app/chatjs/plugins/video-viewer/{client-plugin.ts → chat-ui.ts} +1 -1
  123. package/templates/chat-app/chatjs/plugins/video-viewer/plugin.json +10 -0
  124. package/templates/chat-app/chatjs/tools/attach-workspace-file/tool.ts +2 -2
  125. package/templates/chat-app/components/chat/chat-composer.tsx +35 -7
  126. package/templates/chat-app/components/chat/chat-conversation-screen.tsx +3 -3
  127. package/templates/chat-app/components/chat/chat-navigation.tsx +11 -1
  128. package/templates/chat-app/components/chat/chat-sidebar.tsx +3 -6
  129. package/templates/chat-app/components/chat/chat-transcript.tsx +52 -23
  130. package/templates/chat-app/components/chat-slots.tsx +1 -1
  131. package/templates/chat-app/components/composer/composer-menu.tsx +5 -4
  132. package/templates/chat-app/components/eve/eve-chat-header.tsx +5 -7
  133. package/templates/chat-app/components/eve/eve-chat-page.tsx +9 -9
  134. package/templates/chat-app/components/eve/eve-composer.tsx +16 -5
  135. package/templates/chat-app/components/eve/eve-conversation.tsx +160 -96
  136. package/templates/chat-app/components/eve/eve-creation-recovery.tsx +21 -2
  137. package/templates/chat-app/components/eve/eve-deletion-provider.tsx +10 -12
  138. package/templates/chat-app/components/eve/eve-history-list.tsx +3 -8
  139. package/templates/chat-app/components/eve/eve-logical-context.tsx +1 -0
  140. package/templates/chat-app/components/eve/eve-logical-navigation.tsx +3 -3
  141. package/templates/chat-app/components/eve/eve-message-content.tsx +252 -0
  142. package/templates/chat-app/components/eve/eve-message-part.tsx +13 -58
  143. package/templates/chat-app/components/eve/eve-pending-input.tsx +82 -5
  144. package/templates/chat-app/components/eve/eve-runtime-provider.tsx +74 -15
  145. package/templates/chat-app/components/eve/use-eve-composer-draft.ts +64 -26
  146. package/templates/chat-app/components/eve/use-eve-fork.ts +14 -16
  147. package/templates/chat-app/components/eve/use-logical-commands.ts +3 -3
  148. package/templates/chat-app/components/eve/use-new-eve-conversation.tsx +42 -7
  149. package/templates/chat-app/components/parallel-responses/model-picker.tsx +5 -1
  150. package/templates/chat-app/components/parallel-responses/responses.tsx +2 -2
  151. package/templates/chat-app/integrations/routers.ts +1 -1
  152. package/templates/chat-app/lib/chat-after-create.test.ts +1 -1
  153. package/templates/chat-app/lib/chat-after-create.ts +1 -1
  154. package/templates/chat-app/lib/db/eve-creation-failure.ts +3 -3
  155. package/templates/chat-app/lib/db/eve-current-copy.ts +11 -11
  156. package/templates/chat-app/lib/db/eve-deletion.ts +19 -19
  157. package/templates/chat-app/lib/db/eve-dispatch.ts +115 -18
  158. package/templates/chat-app/lib/db/eve-file-purge.ts +4 -4
  159. package/templates/chat-app/lib/db/eve-files.ts +13 -13
  160. package/templates/chat-app/lib/db/eve-queries.ts +28 -43
  161. package/templates/chat-app/lib/db/eve-response-groups.ts +30 -112
  162. package/templates/chat-app/lib/db/eve-subagents.ts +8 -8
  163. package/templates/chat-app/lib/db/eve-title.ts +2 -2
  164. package/templates/chat-app/lib/db/eve-workspace-deletion.ts +3 -3
  165. package/templates/chat-app/lib/db/eve-workspace-turns.ts +37 -5
  166. package/templates/chat-app/lib/db/eve-workspaces.ts +3 -3
  167. package/templates/chat-app/lib/db/migrations/0029_branch_identifiers.sql +23 -0
  168. package/templates/chat-app/lib/db/migrations/meta/0029_snapshot.json +2547 -0
  169. package/templates/chat-app/lib/db/migrations/meta/_journal.json +7 -0
  170. package/templates/chat-app/lib/db/schema.ts +19 -25
  171. package/templates/chat-app/lib/eve/completed-copy-source.test.ts +12 -2
  172. package/templates/chat-app/lib/eve/completed-copy-source.ts +5 -2
  173. package/templates/chat-app/lib/eve/contracts.test.ts +5 -5
  174. package/templates/chat-app/lib/eve/contracts.ts +1 -1
  175. package/templates/chat-app/lib/eve/conversation-scope.test.ts +2 -2
  176. package/templates/chat-app/lib/eve/conversation-scope.ts +4 -4
  177. package/templates/chat-app/lib/eve/create-conversation-operation.test.ts +1 -1
  178. package/templates/chat-app/lib/eve/create-response-group.test.ts +3 -3
  179. package/templates/chat-app/lib/eve/delete-local-conversation.ts +3 -3
  180. package/templates/chat-app/lib/eve/generated-files.test.ts +1 -1
  181. package/templates/chat-app/lib/eve/generated-files.ts +2 -2
  182. package/templates/chat-app/lib/eve/logical-chat.test.ts +17 -17
  183. package/templates/chat-app/lib/eve/logical-chat.ts +27 -31
  184. package/templates/chat-app/lib/eve/logical-response-slots.ts +4 -7
  185. package/templates/chat-app/lib/eve/message-delivery.ts +1 -0
  186. package/templates/chat-app/lib/eve/pending-create.test.ts +46 -7
  187. package/templates/chat-app/lib/eve/pending-create.ts +36 -4
  188. package/templates/chat-app/lib/eve/persisted-wire-order.test.ts +2 -2
  189. package/templates/chat-app/lib/eve/prepare-deletion.ts +3 -3
  190. package/templates/chat-app/lib/eve/purge-local-resources.ts +3 -3
  191. package/templates/chat-app/lib/eve/reconcile-workspace-turn.ts +2 -2
  192. package/templates/chat-app/lib/eve/request-policy.ts +1 -0
  193. package/templates/chat-app/lib/eve/resolve-creation-request.ts +1 -1
  194. package/templates/chat-app/lib/eve/response-group-contracts.ts +1 -1
  195. package/templates/chat-app/lib/eve/response-group-lineage.test.ts +12 -12
  196. package/templates/chat-app/lib/eve/response-group-lineage.ts +21 -24
  197. package/templates/chat-app/lib/eve/response-group.test.ts +2 -2
  198. package/templates/chat-app/lib/eve/response-group.ts +1 -1
  199. package/templates/chat-app/lib/eve/response-model.ts +11 -1
  200. package/templates/chat-app/lib/eve/restore-message-attachments.test.ts +1 -1
  201. package/templates/chat-app/lib/eve/restore-message-attachments.ts +3 -3
  202. package/templates/chat-app/lib/eve/retire-session.ts +3 -3
  203. package/templates/chat-app/lib/eve/steer-rejected.ts +7 -0
  204. package/templates/chat-app/lib/eve/workspace-turn-evidence.test.ts +27 -0
  205. package/templates/chat-app/lib/eve/workspace-turn-evidence.ts +20 -13
  206. package/templates/chat-app/playwright.config.ts +5 -1
  207. package/templates/chat-app/scripts/agent-status.ts +6 -19
  208. package/templates/chat-app/scripts/check-env.ts +75 -56
  209. package/templates/chat-app/scripts/installed-environment-validation.ts +14 -15
  210. package/templates/chat-app/trpc/init.ts +2 -0
  211. package/templates/chat-app/trpc/routers/_app.test.ts +56 -0
  212. package/templates/chat-app/trpc/routers/_app.ts +12 -11
  213. package/templates/chat-app/trpc/routers/eve.router.ts +2 -2
  214. package/templates/chat-app/chatjs/core/installation/plugin.ts +0 -13
  215. package/templates/chat-app/chatjs/plugins/attachment-uploads/chatjs.json +0 -22
  216. package/templates/chat-app/chatjs/plugins/credits/server-plugin.ts +0 -5
  217. package/templates/chat-app/chatjs/plugins/feedback/chat.ts +0 -13
  218. package/templates/chat-app/chatjs/plugins/feedback/server-plugin.ts +0 -8
  219. package/templates/chat-app/chatjs/plugins/followup-suggestions/server-plugin.ts +0 -8
  220. package/templates/chat-app/chatjs/plugins/guest-chat/server-plugin.ts +0 -12
  221. package/templates/chat-app/chatjs/plugins/image-viewer/chatjs.json +0 -17
  222. package/templates/chat-app/chatjs/plugins/mcp/server-plugin.ts +0 -5
  223. package/templates/chat-app/chatjs/plugins/model-preferences/server-plugin.ts +0 -8
  224. package/templates/chat-app/chatjs/plugins/projects/server-plugin.ts +0 -8
  225. package/templates/chat-app/chatjs/plugins/search/server-plugin.ts +0 -5
  226. package/templates/chat-app/chatjs/plugins/sharing/server-plugin.ts +0 -5
  227. package/templates/chat-app/chatjs/plugins/spreadsheet-viewer/chatjs.json +0 -18
  228. package/templates/chat-app/chatjs/plugins/video-viewer/chatjs.json +0 -16
  229. package/templates/chat-app/lib/chat-route.ts +0 -18
  230. package/templates/chat-app/providers/parse-chat-id-from-pathname.test.ts +0 -126
  231. package/templates/chat-app/providers/parse-chat-id-from-pathname.ts +0 -51
  232. /package/templates/chat-app/chatjs/plugins/attachment-uploads/{integration.tsx → uploads.ts} +0 -0
@@ -25,18 +25,18 @@ type ShareStep = "info" | "shared";
25
25
 
26
26
  /** Runtime-owned link destination; the dialog and visibility controller stay shared. */
27
27
  export const SharingEnvironmentContext = createContext<{
28
- readonly getUrl: (chatId: string) => string;
28
+ readonly getUrl: (branchId: string) => string;
29
29
  readonly notice?: string;
30
- }>({ getUrl: (chatId) => `${globalThis.location.origin}/share/${chatId}` });
30
+ }>({ getUrl: (branchId) => `${globalThis.location.origin}/share/${branchId}` });
31
31
 
32
32
  const ShareDialogView = ({
33
- chatId,
33
+ branchId,
34
34
  isPublic,
35
35
  isPending,
36
36
  onClose,
37
37
  setVisibility,
38
38
  }: {
39
- readonly chatId: string;
39
+ readonly branchId: string;
40
40
  readonly isPublic: boolean;
41
41
  readonly isPending: boolean;
42
42
  readonly onClose: () => void;
@@ -67,7 +67,7 @@ const ShareDialogView = ({
67
67
  }
68
68
  };
69
69
  const handleCopyLink = async (): Promise<void> => {
70
- const shareUrl = environment.getUrl(chatId);
70
+ const shareUrl = environment.getUrl(branchId);
71
71
  try {
72
72
  await navigator.clipboard.writeText(shareUrl);
73
73
  toast.success("Share link copied to clipboard");
@@ -192,7 +192,7 @@ const ShareDialogView = ({
192
192
  </label>
193
193
  <input
194
194
  className="border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50"
195
- value={environment.getUrl(chatId)}
195
+ value={environment.getUrl(branchId)}
196
196
  id="link"
197
197
  readOnly
198
198
  />
@@ -11,27 +11,27 @@ import {
11
11
  import { useTRPC } from "@/trpc/react";
12
12
 
13
13
  const EveShareDialogContent = ({
14
- chatId,
14
+ branchId,
15
15
  onClose,
16
16
  }: {
17
- readonly chatId: string;
17
+ readonly branchId: string;
18
18
  readonly onClose: () => void;
19
19
  }): ReactJSX.Element => {
20
20
  const trpc = useTRPC();
21
21
  const cache = useQueryClient();
22
- const query = useQuery(trpc.sharing.get.queryOptions({ id: chatId }));
22
+ const query = useQuery(trpc.sharing.get.queryOptions({ id: branchId }));
23
23
  const mutation = useMutation(trpc.sharing.setVisibility.mutationOptions());
24
24
  return (
25
25
  <>
26
26
  <ShareDialogView
27
- chatId={chatId}
27
+ branchId={branchId}
28
28
  isPending={query.isPending || mutation.isPending || query.isError}
29
29
  isPublic={query.data?.visibility === "public"}
30
30
  onClose={onClose}
31
31
  setVisibility={async (visibility) => {
32
- await mutation.mutateAsync({ id: chatId, visibility });
32
+ await mutation.mutateAsync({ id: branchId, visibility });
33
33
  await cache.invalidateQueries({
34
- queryKey: trpc.sharing.get.queryKey({ id: chatId }),
34
+ queryKey: trpc.sharing.get.queryKey({ id: branchId }),
35
35
  });
36
36
  }}
37
37
  />
@@ -41,16 +41,16 @@ const EveShareDialogContent = ({
41
41
  };
42
42
 
43
43
  const EveShareButton = ({
44
- chatId,
44
+ branchId,
45
45
  className,
46
46
  }: {
47
- readonly chatId: string;
47
+ readonly branchId: string;
48
48
  readonly className?: string;
49
49
  }): React.JSX.Element => (
50
50
  <ShareButton
51
51
  className={className}
52
52
  renderContent={(onClose): React.JSX.Element => (
53
- <EveShareDialogContent chatId={chatId} onClose={onClose} />
53
+ <EveShareDialogContent branchId={branchId} onClose={onClose} />
54
54
  )}
55
55
  />
56
56
  );
@@ -3,7 +3,7 @@ import { definePlugin, slot } from "@/chatjs/core/ui/slots";
3
3
  import { ArtifactViewerActions } from "@/components/artifact-actions";
4
4
  import { SpreadsheetViewerAction } from "./viewer-action";
5
5
 
6
- export const spreadsheetViewerClient = definePlugin({
6
+ export const chatUi = definePlugin({
7
7
  id: "spreadsheet-viewer",
8
8
  slots: [slot(ArtifactViewerActions, SpreadsheetViewerAction)],
9
9
  });
@@ -0,0 +1,12 @@
1
+ {
2
+ "contractVersion": 3,
3
+ "uiBase": "base",
4
+ "id": "spreadsheet-viewer",
5
+ "kind": "plugin",
6
+ "files": [
7
+ "chatjs/plugins/spreadsheet-viewer/chat-ui.ts",
8
+ "chatjs/plugins/spreadsheet-viewer/viewer-action.tsx",
9
+ "chatjs/plugins/spreadsheet-viewer/load.ts",
10
+ "chatjs/plugins/spreadsheet-viewer/preview.tsx"
11
+ ]
12
+ }
@@ -3,7 +3,7 @@ import { definePlugin, slot } from "@/chatjs/core/ui/slots";
3
3
  import { ArtifactViewerActions } from "@/components/artifact-actions";
4
4
  import { VideoViewerAction } from "./viewer-action";
5
5
 
6
- export const videoViewerClient = definePlugin({
6
+ export const chatUi = definePlugin({
7
7
  id: "video-viewer",
8
8
  slots: [slot(ArtifactViewerActions, VideoViewerAction)],
9
9
  });
@@ -0,0 +1,10 @@
1
+ {
2
+ "contractVersion": 3,
3
+ "uiBase": "base",
4
+ "id": "video-viewer",
5
+ "kind": "plugin",
6
+ "files": [
7
+ "chatjs/plugins/video-viewer/chat-ui.ts",
8
+ "chatjs/plugins/video-viewer/viewer-action.tsx"
9
+ ]
10
+ }
@@ -40,14 +40,14 @@ export const import_file = defineTool({
40
40
  "File import requires the current ChatJS conversation owner's authority."
41
41
  );
42
42
  }
43
- const { ownerId, conversationId } = await resolveEveConversationScope(
43
+ const { ownerId, branchId } = await resolveEveConversationScope(
44
44
  current.principalId,
45
45
  context.session.id,
46
46
  context.abortSignal
47
47
  );
48
48
  return await withEveConversationFile(
49
49
  ownerId,
50
- conversationId,
50
+ branchId,
51
51
  input.fileId,
52
52
  async () =>
53
53
  await importStoredFile(input, {
@@ -70,13 +70,31 @@ const ComposerAction = ({
70
70
  );
71
71
  };
72
72
 
73
+ const composerActionStatus = (
74
+ status: ChatStatus,
75
+ allowFollowUp: boolean | undefined,
76
+ hasDraft: boolean
77
+ ): ChatStatus =>
78
+ status === "streaming" && allowFollowUp === true && hasDraft
79
+ ? "ready"
80
+ : status;
81
+
82
+ const canSubmitDraft = (
83
+ status: ChatStatus,
84
+ hasDraft: boolean,
85
+ draftLength: number
86
+ ): boolean =>
87
+ (status === "ready" || status === "error") &&
88
+ hasDraft &&
89
+ draftLength <= MAX_DRAFT_LENGTH;
90
+
73
91
  /**
74
92
  * A controlled composer for runtimes that own their own submission lifecycle.
75
93
  *
76
94
  * @param {string} draft Current text controlled by the runtime.
77
95
  * @param {(draft: string) => void} onDraftChange Writes text changes back to the runtime.
78
96
  * @param {() => void} onSubmit Submits the current draft.
79
- * @param {boolean} disabled Disables editing and submission.
97
+ * @param {boolean} disabled Disables submission.
80
98
  * @param {ChatStatus | undefined} status Runtime-owned status value.
81
99
  * @param {(() => void) | undefined} onStop Cancels the active submission.
82
100
  * @param {boolean | undefined} stopDisabled Runtime-owned stopDisabled value.
@@ -85,6 +103,8 @@ const ComposerAction = ({
85
103
  * @param {ReadonlyReactNode | undefined} attachments Current attached files.
86
104
  * @param {boolean | undefined} hasAttachments Runtime-owned hasAttachments value.
87
105
  * @param {boolean | undefined} readOnly Runtime-owned readOnly value.
106
+ * @param {boolean | undefined} allowDraftWhileBusy Allows typing during a submission without a Stop action.
107
+ * @param {boolean | undefined} allowSendWhileStreaming Switches Stop to Send when the draft contains text or files.
88
108
  * @param {ComponentProps<typeof LexicalChatInput>["onPaste"] | undefined} onPaste Runtime-owned onPaste value.
89
109
  * @returns {React.JSX.Element} The composed message interface.
90
110
  */
@@ -101,6 +121,8 @@ export const ChatComposer = ({
101
121
  attachments,
102
122
  hasAttachments = false,
103
123
  readOnly = false,
124
+ allowDraftWhileBusy = false,
125
+ allowSendWhileStreaming,
104
126
  onPaste,
105
127
  primitives = defaultPrimitives,
106
128
  sendIcon,
@@ -110,6 +132,8 @@ export const ChatComposer = ({
110
132
  readonly attachments?: ReadonlyReactNode;
111
133
  readonly hasAttachments?: boolean;
112
134
  readonly readOnly?: boolean;
135
+ readonly allowDraftWhileBusy?: boolean;
136
+ readonly allowSendWhileStreaming?: boolean;
113
137
  readonly onPaste?: ComponentProps<typeof LexicalChatInput>["onPaste"];
114
138
  readonly draft: string;
115
139
  readonly onDraftChange: (draft: string) => void;
@@ -123,13 +147,17 @@ export const ChatComposer = ({
123
147
  }): ReactJSX.Element => {
124
148
  const isMobile = useIsMobile();
125
149
  const busy = status === "submitted" || status === "streaming";
126
- const editorReadOnly = readOnly || (busy && !onStop);
150
+ const hasDraft = Boolean(draft.trim()) || hasAttachments;
151
+ const actionStatus = composerActionStatus(
152
+ status,
153
+ allowSendWhileStreaming,
154
+ hasDraft
155
+ );
156
+ const editorReadOnly = readOnly || (busy && !onStop && !allowDraftWhileBusy);
127
157
  const canSend =
128
158
  !disabled &&
129
159
  !editorReadOnly &&
130
- !busy &&
131
- (Boolean(draft.trim()) || hasAttachments) &&
132
- draft.length <= MAX_DRAFT_LENGTH;
160
+ canSubmitDraft(actionStatus, hasDraft, draft.length);
133
161
  const submit = (): void => {
134
162
  if (canSend) {
135
163
  onSubmit();
@@ -138,7 +166,7 @@ export const ChatComposer = ({
138
166
  return (
139
167
  <PromptForm
140
168
  primitives={primitives}
141
- editable={!disabled && !editorReadOnly}
169
+ editable={!editorReadOnly}
142
170
  onSubmit={(event) => {
143
171
  event.preventDefault();
144
172
  submit();
@@ -149,7 +177,7 @@ export const ChatComposer = ({
149
177
  <ComposerAction
150
178
  primitives={primitives}
151
179
  sendIcon={sendIcon}
152
- status={status}
180
+ status={canSend ? actionStatus : status}
153
181
  onStop={onStop}
154
182
  stopDisabled={stopDisabled}
155
183
  canSend={canSend}
@@ -20,7 +20,7 @@ import {
20
20
  /** One transcript and placement contract. Runtime-owned recovery and composer
21
21
  * controllers occupy fixed slots; callers cannot replace message rendering. */
22
22
  export const ChatConversationScreen = ({
23
- conversationId,
23
+ branchId,
24
24
  welcome = false,
25
25
  header,
26
26
  transcript,
@@ -30,7 +30,7 @@ export const ChatConversationScreen = ({
30
30
  leading,
31
31
  trailing,
32
32
  }: {
33
- readonly conversationId: string;
33
+ readonly branchId: string;
34
34
  readonly welcome?: boolean;
35
35
  readonly header?: ReactNode;
36
36
  readonly transcript: ComponentProps<typeof ChatTranscript>;
@@ -49,7 +49,7 @@ export const ChatConversationScreen = ({
49
49
  </ChatWelcomeView>
50
50
  ) : (
51
51
  <ChatConversationBody>
52
- <MessageScrollerProvider autoScroll key={conversationId}>
52
+ <MessageScrollerProvider autoScroll key={branchId}>
53
53
  <MessageScroller className="flex-1">
54
54
  <MessageScrollerViewport preserveScrollOnPrepend>
55
55
  <MessageScrollerContent className="mx-auto w-full max-w-3xl p-4">
@@ -1,11 +1,21 @@
1
1
  "use client";
2
2
 
3
+ import { useParams } from "next/navigation";
3
4
  import { createContext, useContext } from "react";
4
5
 
5
6
  /** Embed the application without replacing its links or navigation controls. */
6
7
  export const ChatNavigationContext = createContext<{
7
- readonly pathname: string;
8
+ readonly chatId: string | null;
8
9
  readonly navigate: (href: string) => void;
9
10
  } | null>(null);
10
11
 
11
12
  export const useChatNavigation = () => useContext(ChatNavigationContext);
13
+
14
+ export const useActiveChatId = (): string | null => {
15
+ const embedded = useChatNavigation();
16
+ const params = useParams();
17
+ if (embedded) {
18
+ return embedded.chatId;
19
+ }
20
+ return typeof params?.chatId === "string" ? params.chatId : null;
21
+ };
@@ -78,7 +78,7 @@ export const ChatSidebar = ({
78
78
  ownerId,
79
79
  history,
80
80
  account,
81
- conversationId,
81
+ chatId,
82
82
  onProjectSelect,
83
83
  onChatSelect,
84
84
  }: {
@@ -87,7 +87,7 @@ export const ChatSidebar = ({
87
87
  readonly history: SidebarData | Promise<SidebarData>;
88
88
  readonly account: ComponentProps<typeof ChatAccount>;
89
89
  readonly onChatSelect?: (id: string) => void;
90
- readonly conversationId?: string;
90
+ readonly chatId?: string;
91
91
  readonly onProjectSelect?: (id: string) => void;
92
92
  }) => (
93
93
  <Sidebar
@@ -117,10 +117,7 @@ export const ChatSidebar = ({
117
117
  <SidebarSeparator />
118
118
  <ScrollArea className="relative flex-1 overflow-y-auto">
119
119
  <SidebarContent className="max-w-(--sidebar-width) pr-2 group-data-[collapsible=icon]:hidden">
120
- <SidebarSections
121
- conversationId={conversationId}
122
- onProjectSelect={onProjectSelect}
123
- />
120
+ <SidebarSections chatId={chatId} onProjectSelect={onProjectSelect} />
124
121
  <Suspense fallback={<HistorySkeleton />}>
125
122
  <History data={history} />
126
123
  </Suspense>
@@ -2,8 +2,9 @@
2
2
 
3
3
  import { hasText } from "@/components/text-value";
4
4
 
5
- import type { Answer } from "eve/events";
6
- import React from "react";
5
+ import { interactions } from "eve/events";
6
+ import type { Answer, Interaction, SessionView } from "eve/events";
7
+ import React, { useMemo } from "react";
7
8
  import type { JSX as ReactJSX, ReactNode } from "react";
8
9
  import { toast } from "sonner";
9
10
 
@@ -21,7 +22,7 @@ import type {
21
22
  import type { ReadonlyReactNode } from "@/lib/readonly-react-node";
22
23
 
23
24
  import { EveAttachment } from "../eve/eve-attachment";
24
- import { EveMessagePart } from "../eve/eve-message-part";
25
+ import { EveMessageContent } from "../eve/eve-message-content";
25
26
  import { MessageActions } from "@/components/chat-slots";
26
27
 
27
28
  const messagePartIdentity = (part: ReadonlyEveMessagePart): string => {
@@ -50,7 +51,7 @@ const messagePartIdentity = (part: ReadonlyEveMessagePart): string => {
50
51
  };
51
52
 
52
53
  interface ChatTranscriptProps {
53
- readonly conversationId?: string;
54
+ readonly branchId?: string;
54
55
  readonly messageKey?: (message: ReadonlyEveMessage) => string;
55
56
  readonly messages: readonly ReadonlyEveMessage[];
56
57
  readonly isReadonly: boolean;
@@ -77,6 +78,7 @@ interface ChatTranscriptProps {
77
78
  ) => string | undefined;
78
79
  readonly disabled: boolean;
79
80
  readonly inputDisabled?: boolean;
81
+ readonly view?: SessionView;
80
82
  readonly respond: (response: Answer) => void;
81
83
  }
82
84
 
@@ -88,12 +90,13 @@ interface MessageRowProps extends Omit<
88
90
  readonly userMessage: ReadonlyEveMessage | undefined;
89
91
  readonly isLast: boolean;
90
92
  readonly actionsDisabled: boolean;
93
+ readonly interactionsByCall: ReadonlyMap<string, readonly Interaction[]>;
91
94
  }
92
95
 
93
96
  const AssistantFeedback = ({
94
97
  message,
95
98
  userMessage,
96
- conversationId,
99
+ branchId,
97
100
  disabled,
98
101
  actionsDisabled,
99
102
  editor,
@@ -103,16 +106,16 @@ const AssistantFeedback = ({
103
106
  MessageRowProps,
104
107
  | "message"
105
108
  | "userMessage"
106
- | "conversationId"
109
+ | "branchId"
107
110
  | "disabled"
108
111
  | "actionsDisabled"
109
112
  | "editor"
110
113
  | "onRegenerate"
111
114
  > & { readonly modelId: string | undefined }): ReactJSX.Element => (
112
115
  <>
113
- {hasText(conversationId) && (
116
+ {hasText(branchId) && (
114
117
  <MessageActions
115
- conversationId={conversationId}
118
+ branchId={branchId}
116
119
  disabled={disabled}
117
120
  messageId={message.id}
118
121
  />
@@ -146,7 +149,7 @@ const AssistantFeedback = ({
146
149
  const EveMessageActions = ({
147
150
  message,
148
151
  userMessage,
149
- conversationId,
152
+ branchId,
150
153
  isReadonly,
151
154
  disabled,
152
155
  actionsDisabled,
@@ -161,7 +164,7 @@ const EveMessageActions = ({
161
164
  MessageRowProps,
162
165
  | "message"
163
166
  | "userMessage"
164
- | "conversationId"
167
+ | "branchId"
165
168
  | "isReadonly"
166
169
  | "disabled"
167
170
  | "actionsDisabled"
@@ -214,7 +217,7 @@ const EveMessageActions = ({
214
217
  <AssistantFeedback
215
218
  message={message}
216
219
  userMessage={userMessage}
217
- conversationId={conversationId}
220
+ branchId={branchId}
218
221
  disabled={disabled}
219
222
  actionsDisabled={actionsDisabled}
220
223
  editor={editor}
@@ -237,11 +240,13 @@ const EveMessageRow = ({
237
240
  message,
238
241
  userMessage,
239
242
  isLast,
240
- conversationId,
243
+ branchId,
241
244
  isReadonly,
242
245
  disabled,
243
246
  actionsDisabled,
244
247
  inputDisabled,
248
+ view,
249
+ interactionsByCall,
245
250
  respond,
246
251
  onEdit,
247
252
  onRegenerate,
@@ -274,7 +279,7 @@ const EveMessageRow = ({
274
279
  <EveMessageActions
275
280
  message={message}
276
281
  userMessage={userMessage}
277
- conversationId={conversationId}
282
+ branchId={branchId}
278
283
  isReadonly={isReadonly}
279
284
  disabled={disabled}
280
285
  actionsDisabled={actionsDisabled}
@@ -319,16 +324,15 @@ const EveMessageRow = ({
319
324
  actions={actions}
320
325
  followUp={isLast && !isReadonly && !actionsDisabled && suggestions}
321
326
  >
322
- {message.parts.map((part): React.JSX.Element => (
323
- <EveMessagePart
324
- inputDisabled={responseDisabled(isReadonly, disabled, inputDisabled)}
325
- isReadonly={isReadonly}
326
- key={nextPartKey(part)}
327
- messageId={message.id}
328
- part={part}
329
- respond={respond}
330
- />
331
- ))}
327
+ <EveMessageContent
328
+ inputDisabled={responseDisabled(isReadonly, disabled, inputDisabled)}
329
+ interactionsByCall={interactionsByCall}
330
+ isReadonly={isReadonly}
331
+ messageId={message.id}
332
+ parts={message.parts.map((part) => ({ key: nextPartKey(part), part }))}
333
+ respond={respond}
334
+ view={view}
335
+ />
332
336
  </ChatMessageView>
333
337
  );
334
338
  };
@@ -339,8 +343,31 @@ export const ChatTranscript = ({
339
343
  messageKey,
340
344
  disabled,
341
345
  actionsDisabled = disabled,
346
+ view,
342
347
  ...props
343
348
  }: ChatTranscriptProps): ReactJSX.Element[] => {
349
+ const interactionsByCall = useMemo(() => {
350
+ const byCall = new Map<string, Interaction[]>();
351
+ if (view !== undefined) {
352
+ for (const interaction of interactions(view)) {
353
+ const callId = interaction.call?.callId;
354
+ const { kind } = interaction.request;
355
+ if (
356
+ callId === undefined ||
357
+ (kind !== "question" && kind !== "approval")
358
+ ) {
359
+ continue;
360
+ }
361
+ const entries = byCall.get(callId);
362
+ if (entries) {
363
+ entries.push(interaction);
364
+ } else {
365
+ byCall.set(callId, [interaction]);
366
+ }
367
+ }
368
+ }
369
+ return byCall;
370
+ }, [view]);
344
371
  const precedingUsers: (ReadonlyEveMessage | undefined)[] = [];
345
372
  let precedingUser: ReadonlyEveMessage | undefined;
346
373
  for (const message of messages) {
@@ -362,6 +389,8 @@ export const ChatTranscript = ({
362
389
  isLast={message.id === messages.at(-1)?.id}
363
390
  disabled={disabled}
364
391
  actionsDisabled={actionsDisabled}
392
+ interactionsByCall={interactionsByCall}
393
+ view={view}
365
394
  />
366
395
  </MessageScrollerItem>
367
396
  ));
@@ -8,7 +8,7 @@ import type {
8
8
  import type { ComposerControlProps } from "@/components/composer/control";
9
9
 
10
10
  export const SidebarSections = defineSlot<{
11
- readonly conversationId?: string;
11
+ readonly chatId?: string;
12
12
  readonly allowManagement?: boolean;
13
13
  readonly onProjectSelect?: (id: string) => void;
14
14
  }>();
@@ -27,7 +27,7 @@ import { getToolDisplay } from "./tool-display";
27
27
  import { useIsMobile } from "@/hooks/use-mobile";
28
28
 
29
29
  export const ComposerMenu = (
30
- props: ComposerControlProps
30
+ props: ComposerControlProps & { readonly toolsDisabled?: boolean }
31
31
  ): ReactJSX.Element | null => {
32
32
  const mobile = useIsMobile();
33
33
  const available = useAvailableTools();
@@ -43,6 +43,7 @@ export const ComposerMenu = (
43
43
  }) => Component.isAvailable?.(mobile, available) ?? true
44
44
  );
45
45
  const hasControls = controls.length > 0 || hasAttachments || hasExtensions;
46
+ const toolsDisabled = props.disabled === true || props.toolsDisabled === true;
46
47
  if (!hasControls && props.selectedTool === null) {
47
48
  return null;
48
49
  }
@@ -68,15 +69,15 @@ export const ComposerMenu = (
68
69
  }: Readonly<Pick<(typeof composerControls)[number], "id">> & {
69
70
  readonly Component: React.JSXElementConstructor<ComposerControlProps>;
70
71
  }): React.JSX.Element => (
71
- <Component key={id} {...props} />
72
+ <Component key={id} {...props} disabled={toolsDisabled} />
72
73
  )
73
74
  )}
74
- <ComposerExtensions {...props} />
75
+ <ComposerExtensions {...props} disabled={toolsDisabled} />
75
76
  {props.selectedTool !== null && (
76
77
  <>
77
78
  {hasControls && <DropdownMenuSeparator />}
78
79
  <DropdownMenuItem
79
- disabled={props.disabled}
80
+ disabled={toolsDisabled}
80
81
  onClick={() => {
81
82
  props.onToolChange(null);
82
83
  }}
@@ -33,12 +33,12 @@ import { useEveMetadataMutations } from "./use-eve-metadata-mutations";
33
33
 
34
34
  const EveChatHeader = ({
35
35
  chatId,
36
- conversationId,
36
+ branchId,
37
37
  fallbackTitle,
38
38
  hasMessages,
39
39
  }: {
40
40
  readonly chatId: string;
41
- readonly conversationId: string;
41
+ readonly branchId: string;
42
42
  readonly fallbackTitle: string;
43
43
  readonly hasMessages: boolean;
44
44
  }): ReactJSX.Element => {
@@ -70,7 +70,7 @@ const EveChatHeader = ({
70
70
  actions={
71
71
  hasMessages && (
72
72
  <ChatHeaderActions
73
- chat={{ id: chatId, title, conversationId, state: "bound" }}
73
+ chat={{ id: chatId, title, branchId, state: "bound" }}
74
74
  />
75
75
  )
76
76
  }
@@ -100,9 +100,7 @@ const EveChatHeader = ({
100
100
  chat={{
101
101
  id: chatId,
102
102
  title,
103
- conversationId: hasMessages
104
- ? conversationId
105
- : undefined,
103
+ branchId: hasMessages ? branchId : undefined,
106
104
  state: "bound",
107
105
  }}
108
106
  />
@@ -119,7 +117,7 @@ const EveChatHeader = ({
119
117
  }}
120
118
  onDelete={() => {
121
119
  openDeletion({
122
- id: conversationId,
120
+ id: branchId,
123
121
  scope: "conversation",
124
122
  parentHref: identity.data?.parentHref,
125
123
  state: "bound",
@@ -18,8 +18,8 @@ import { NewEveConversation } from "./new-eve-conversation";
18
18
  const creationRecoveryScope = (
19
19
  selected: Awaited<ReturnType<typeof getEveChatPageConversation>> | undefined
20
20
  ): CreationScope | undefined => {
21
- if (hasText(selected?.parentConversationId)) {
22
- return { conversationId: selected.parentConversationId };
21
+ if (hasText(selected?.parentBranchId)) {
22
+ return { branchId: selected.parentBranchId };
23
23
  }
24
24
  const context = projectCreationScope(selected?.initialRequest);
25
25
  if (context) {
@@ -29,13 +29,13 @@ const creationRecoveryScope = (
29
29
  };
30
30
 
31
31
  export const EveChatPage = async ({
32
- conversationId,
32
+ chatId,
33
33
  }: {
34
- readonly conversationId?: string;
34
+ readonly chatId?: string;
35
35
  }): Promise<ReactJSX.Element> => {
36
36
  const principal = await resolveEvePrincipal(await headers());
37
37
  if (!principal) {
38
- if (hasText(conversationId)) {
38
+ if (hasText(chatId)) {
39
39
  redirect("/");
40
40
  }
41
41
  if (!SignedOutScreen) {
@@ -43,13 +43,13 @@ export const EveChatPage = async ({
43
43
  }
44
44
  return <SignedOutScreen />;
45
45
  }
46
- if (hasText(conversationId) && !z.uuid().safeParse(conversationId).success) {
46
+ if (hasText(chatId) && !z.uuid().safeParse(chatId).success) {
47
47
  notFound();
48
48
  }
49
- const selected = hasText(conversationId)
50
- ? await getEveChatPageConversation(principal.ownerId, conversationId)
49
+ const selected = hasText(chatId)
50
+ ? await getEveChatPageConversation(principal.ownerId, chatId)
51
51
  : undefined;
52
- if (hasText(conversationId) && !selected) {
52
+ if (hasText(chatId) && !selected) {
53
53
  notFound();
54
54
  }
55
55
  const recoveryScope = creationRecoveryScope(selected);