camox 0.56.0 → 0.58.0

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 (38) hide show
  1. package/dist/core/createApp.d.ts +2 -2
  2. package/dist/core/createBlock.js +6 -2
  3. package/dist/core/createLayout.d.ts +1 -1
  4. package/dist/core/editing/createEditableBlock.d.ts +1 -1
  5. package/dist/core/lib/artifact.d.ts +14 -4
  6. package/dist/core/lib/artifact.js +57 -16
  7. package/dist/core/lib/artifactRuntime.js +4 -2
  8. package/dist/features/canvas/CanvasPageHeader.js +1 -1
  9. package/dist/features/canvas/canvasFrameDocument.js +13 -6
  10. package/dist/features/preview/components/Frame.js +1 -18
  11. package/dist/features/preview/components/SidebarStack.js +193 -106
  12. package/dist/features/preview/components/previewStyles.js +25 -1
  13. package/dist/features/renderer/RendererApp.js +55 -37
  14. package/dist/features/runtime/artifactDocuments.js +58 -0
  15. package/dist/features/runtime/artifactSources.js +36 -2
  16. package/dist/features/runtime/runtime.js +30 -12
  17. package/dist/features/runtime/runtimeRoutes.d.ts +6 -5
  18. package/dist/features/runtime/runtimeRoutes.js +12 -5
  19. package/dist/features/studio/components/AgentSidebar.js +4 -4
  20. package/dist/features/studio/components/ChatWidget.js +62 -80
  21. package/dist/features/studio/components/DraftsControl.js +60 -134
  22. package/dist/features/studio/components/Patrol.js +676 -0
  23. package/dist/features/studio/components/ReviewDraftSheet.js +52 -4
  24. package/dist/features/studio/components/Squareling.js +169 -84
  25. package/dist/features/studio/components/ThreadMessages.js +155 -58
  26. package/dist/features/studio/localeOptions.js +7 -3
  27. package/dist/features/studio/reportSentence.js +75 -0
  28. package/dist/features/studio/routes.js +2 -1
  29. package/dist/features/studio/showInCanvas.js +9 -2
  30. package/dist/features/studio/workingSentence.js +55 -0
  31. package/dist/lib/studio-reads.d.ts +1 -0
  32. package/dist/lib/studio-reads.js +5 -0
  33. package/dist/lib/use-thread.js +156 -190
  34. package/dist/package.js +1 -1
  35. package/dist/studio.css +1 -1
  36. package/package.json +4 -4
  37. package/dist/features/studio/components/RenameDraftDialog.js +0 -206
  38. package/dist/features/studio/components/WorkersWidget.js +0 -52
@@ -3,7 +3,7 @@ import { createRequestContext } from "../../core/requestContext.js";
3
3
  import { buildClearServerAuthCookieHeader, getServerAuthCookieHeader } from "../../lib/server-auth-cookie.js";
4
4
  import { UNNAMED_DEFAULT_LOCALE, localizedPath, parseLocalePath } from "../../lib/locale-path.js";
5
5
  import { draftNamedBy } from "../../lib/draft-scope.js";
6
- import { RUNTIME_ROUTE_PATHS, matchRuntimeOwnedRoute } from "./runtimeRoutes.js";
6
+ import { ARTIFACTS_PATH_PREFIX, RUNTIME_ROUTE_PATHS, matchRuntimeOwnedRoute } from "./runtimeRoutes.js";
7
7
  import { reads } from "../../lib/studio-reads.js";
8
8
  import { asCollectionItem, recordMarkdownTemplate, recordPageValues } from "../../core/recordItem.js";
9
9
  import { PLATFORM_SCRIPT } from "../../lib/platform.js";
@@ -17,7 +17,8 @@ import { assetPrefix } from "./assetPrefix.js";
17
17
  import { documentGoogleFonts } from "../og/documentFonts.js";
18
18
  import { alternatesByPage, findAlternates, hreflangLinks } from "./alternates.js";
19
19
  import { configuredProviders, renderAnalyticsScripts } from "./analytics.js";
20
- import { omitArtifactSources } from "./artifactSources.js";
20
+ import { createArtifactDocumentResponse, readArtifactShell } from "./artifactDocuments.js";
21
+ import { omitArtifactSources, referenceArtifactSources } from "./artifactSources.js";
21
22
  import { readBreadcrumb } from "./breadcrumbs.js";
22
23
  import { RouteDiscoveryError, listLivePages } from "./livePages.js";
23
24
  import { formatLlmsTxt } from "./llmsTxt.js";
@@ -519,8 +520,9 @@ function preparePreviewDocument(input, options, document) {
519
520
  input.previewDocument = `<!doctype html><html${siteHead.htmlAttrs}><head><base href="${escapeXml(href)}">${siteHead.headTags}</head><body${siteHead.bodyAttrs}>${siteHead.bodyTagsOpen}<div id="root" data-camox-preview-root></div>${siteHead.bodyTags}</body></html>`;
520
521
  }
521
522
  /**
522
- * The render input a page's HTML embeds for hydration. Visitors load public pages, whose HTML
523
- * already holds each rendered artifact source in its frame, so their copy leaves those out.
523
+ * The render input a page's HTML embeds for hydration. Outside the studio, a page whose HTML
524
+ * inlines its artifacts (in dev mode) already holds each rendered source in its frame, so their
525
+ * copy leaves those out. Public pages load artifacts by URL and hold no source at all.
524
526
  */
525
527
  function hydrationInputFor(input, html) {
526
528
  if (input.presentation === "studio") return input;
@@ -529,6 +531,21 @@ function hydrationInputFor(input, html) {
529
531
  dehydratedState: omitArtifactSources(input.dehydratedState, html)
530
532
  };
531
533
  }
534
+ /**
535
+ * The render input with its artifacts loaded by URL, where a visitor reads Live: each artifact
536
+ * source becomes a reference to the document the website serves, so neither the page's HTML nor
537
+ * its data carries a source, and the client renders the frames the server did. The studio, drafts
538
+ * and dev mode keep inlined sources, so an agent's change shows at once.
539
+ */
540
+ async function withArtifactsByUrl(input, options) {
541
+ if (input.presentation !== "public" || input.draftId || options.developmentDraft) return input;
542
+ const shell = await readArtifactShell(options);
543
+ const artifactsPath = `${input.runtimeBasePath}${ARTIFACTS_PATH_PREFIX}${shell.hash}/`;
544
+ return {
545
+ ...input,
546
+ dehydratedState: referenceArtifactSources(input.dehydratedState, artifactsPath)
547
+ };
548
+ }
532
549
  function renderStudioThemeScript(enabled) {
533
550
  return enabled ? `<script data-camox-studio>${STUDIO_THEME_SCRIPT}${PLATFORM_SCRIPT}<\/script>` : "";
534
551
  }
@@ -841,7 +858,7 @@ async function createPageHtmlResponse({ options, pathname, located, request, pag
841
858
  studio,
842
859
  draftId: result.draftId
843
860
  }, result.data.page.project);
844
- const pageRenderInput = {
861
+ const pageRenderInput = await withArtifactsByUrl({
845
862
  alternates,
846
863
  project,
847
864
  presentation: studio ? "studio" : "public",
@@ -860,7 +877,7 @@ async function createPageHtmlResponse({ options, pathname, located, request, pag
860
877
  runtimeBasePath: normalizeRuntimeBasePath(options.runtimeBasePath),
861
878
  locale: located.locale,
862
879
  locales: located.locales
863
- };
880
+ }, options);
864
881
  preparePreviewDocument(pageRenderInput, options, document);
865
882
  const appHtml = await options.renderPage(pageRenderInput);
866
883
  const renderedHead = renderHead(studio ? {} : document, createPageHeadInput(head), studio ? void 0 : options.stylesheetUrl, studio ? options.studioStylesheetUrl : void 0, studio ? void 0 : located.locale);
@@ -1170,7 +1187,7 @@ async function createDerivedResponse(options, pathname, located, request, { data
1170
1187
  studio,
1171
1188
  draftId: read.draftId
1172
1189
  }, shared.project);
1173
- const input = {
1190
+ const input = await withArtifactsByUrl({
1174
1191
  alternates,
1175
1192
  project,
1176
1193
  presentation: studio ? "studio" : "public",
@@ -1199,7 +1216,7 @@ async function createDerivedResponse(options, pathname, located, request, { data
1199
1216
  result: serializedResult,
1200
1217
  layout: shared.layout
1201
1218
  }
1202
- };
1219
+ }, options);
1203
1220
  const document = await options.getDocument?.() ?? {};
1204
1221
  preparePreviewDocument(input, options, document);
1205
1222
  if (dataOnly) return Response.json(input, { headers: {
@@ -1350,7 +1367,7 @@ async function createPageDataResponse({ options, pathname, located, request, pag
1350
1367
  localeReads: localeReads(result.draftId)
1351
1368
  });
1352
1369
  const dehydratedState = dehydrate(queryClient);
1353
- const input = {
1370
+ const navigationInput = await withArtifactsByUrl({
1354
1371
  alternates,
1355
1372
  apiUrl: options.apiUrl,
1356
1373
  authenticationUrl: options.authenticationUrl ?? "",
@@ -1368,9 +1385,9 @@ async function createPageDataResponse({ options, pathname, located, request, pag
1368
1385
  loaderData: result.data,
1369
1386
  head,
1370
1387
  dehydratedState
1371
- };
1372
- preparePreviewDocument(input, options, await options.getDocument?.() ?? {});
1373
- return Response.json(input, { headers });
1388
+ }, options);
1389
+ preparePreviewDocument(navigationInput, options, await options.getDocument?.() ?? {});
1390
+ return Response.json(navigationInput, { headers });
1374
1391
  } catch (error) {
1375
1392
  if (isNotFoundError(error)) {
1376
1393
  const derived = await createDerivedResponse(options, pathname, located, request, { dataOnly: true });
@@ -1397,6 +1414,7 @@ async function handleCamoxRequest(request, options = {}) {
1397
1414
  layouts: camoxApp.getLayouts().map((layout) => layout._internal.id)
1398
1415
  });
1399
1416
  }
1417
+ if (match.kind === "artifact") return createArtifactDocumentResponse(pathname, options);
1400
1418
  if (match.kind === "og") return createOgResponse(request, options);
1401
1419
  if (match.kind === "renderer") return createRendererDocumentResponse(options);
1402
1420
  if (match.kind === "logo") return createProjectLogoResponse(request, options);
@@ -1,9 +1,10 @@
1
1
  //#region src/features/runtime/runtimeRoutes.d.ts
2
2
  /**
3
- * The URLs the runtime answers that aren't pages or the Studio. Worker request filtering, runtime
4
- * route matching and client navigation all read this list, so a new one can't be forgotten in any
5
- * of them. Prefix rules stay with their readers: the Worker also answers every `/camox/` Studio
6
- * path, and client navigation also skips any other `/_camox/` path.
3
+ * The URLs the runtime answers that aren't pages or the Studio, besides artifact documents
4
+ * (`ARTIFACTS_PATH_PREFIX`). Worker request filtering, runtime route matching and client
5
+ * navigation all match them through `matchRuntimeOwnedRoute`, so a new one can't be forgotten in
6
+ * any of them. Other prefix rules stay with their readers: the Worker also answers every
7
+ * `/camox/` Studio path, and client navigation also skips any other `/_camox/` path.
7
8
  * No imports: client navigation ships this module in the browser bundle.
8
9
  */
9
10
  export declare const RUNTIME_ROUTE_PATHS: {
@@ -18,5 +19,5 @@ export declare const RUNTIME_ROUTE_PATHS: {
18
19
  readonly sitemap: "/sitemap.xml";
19
20
  readonly "llms-txt": "/llms.txt";
20
21
  };
21
- export type RuntimeOwnedRouteKind = keyof typeof RUNTIME_ROUTE_PATHS;
22
+ export type RuntimeOwnedRouteKind = keyof typeof RUNTIME_ROUTE_PATHS | "artifact";
22
23
  //#endregion
@@ -1,9 +1,10 @@
1
1
  //#region src/features/runtime/runtimeRoutes.ts
2
2
  /**
3
- * The URLs the runtime answers that aren't pages or the Studio. Worker request filtering, runtime
4
- * route matching and client navigation all read this list, so a new one can't be forgotten in any
5
- * of them. Prefix rules stay with their readers: the Worker also answers every `/camox/` Studio
6
- * path, and client navigation also skips any other `/_camox/` path.
3
+ * The URLs the runtime answers that aren't pages or the Studio, besides artifact documents
4
+ * (`ARTIFACTS_PATH_PREFIX`). Worker request filtering, runtime route matching and client
5
+ * navigation all match them through `matchRuntimeOwnedRoute`, so a new one can't be forgotten in
6
+ * any of them. Other prefix rules stay with their readers: the Worker also answers every
7
+ * `/camox/` Studio path, and client navigation also skips any other `/_camox/` path.
7
8
  * No imports: client navigation ships this module in the browser bundle.
8
9
  */
9
10
  const RUNTIME_ROUTE_PATHS = {
@@ -18,11 +19,17 @@ const RUNTIME_ROUTE_PATHS = {
18
19
  sitemap: "/sitemap.xml",
19
20
  "llms-txt": "/llms.txt"
20
21
  };
22
+ /**
23
+ * Where public pages load artifacts from: `<prefix><shellHash>/<sourceHash>`. Each document is
24
+ * cached by its own URL, never as a page.
25
+ */
26
+ const ARTIFACTS_PATH_PREFIX = "/_camox/artifacts/";
21
27
  /** Which runtime-owned route a path inside the runtime (base path removed) is, if any. */
22
28
  function matchRuntimeOwnedRoute(pathname) {
23
29
  for (const [kind, path] of Object.entries(RUNTIME_ROUTE_PATHS)) if (pathname === path) return kind;
30
+ if (pathname.startsWith("/_camox/artifacts/")) return "artifact";
24
31
  return null;
25
32
  }
26
33
 
27
34
  //#endregion
28
- export { RUNTIME_ROUTE_PATHS, matchRuntimeOwnedRoute };
35
+ export { ARTIFACTS_PATH_PREFIX, RUNTIME_ROUTE_PATHS, matchRuntimeOwnedRoute };
@@ -1,14 +1,14 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { SIDEBAR_GUTTER } from "../../preview/components/SidebarStack.js";
3
3
  import { ChatWidget } from "./ChatWidget.js";
4
- import { WorkersWidget } from "./WorkersWidget.js";
4
+ import { Patrol } from "./Patrol.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/features/studio/components/AgentSidebar.tsx
9
9
  /**
10
- * The sidebar on the Canvas's right side, where editors work with Camox's agent: the Workers
11
- * widget over the Chat widget, which gets the larger share of the height. Laid over the Canvas,
10
+ * The sidebar on the Canvas's right side, where editors work with Camox's agent: the Patrol
11
+ * over the Chat widget, which gets the larger share of the height. Laid over the Canvas,
12
12
  * as the Content Sidebar is over its left: only the cards have a background, and the Canvas shows
13
13
  * around them. Elsewhere in the studio it is only hidden, so the chat keeps its thread and the
14
14
  * Preview and Studio pages follow the editor's runs too.
@@ -24,7 +24,7 @@ function AgentSidebar(t0) {
24
24
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
25
25
  t2 = cn("absolute inset-y-0 right-0 z-10 flex flex-col gap-2 py-2 max-md:hidden", SIDEBAR_GUTTER);
26
26
  t3 = { width: 265 };
27
- t4 = /* @__PURE__ */ jsx(WorkersWidget, { className: "min-h-0 flex-[3_1_0]" });
27
+ t4 = /* @__PURE__ */ jsx(Patrol, { className: "min-h-0 flex-[3_1_0]" });
28
28
  t5 = /* @__PURE__ */ jsx(ChatWidget, { className: "min-h-0 flex-[7_1_0]" });
29
29
  $[0] = t2;
30
30
  $[1] = t3;
@@ -1,5 +1,6 @@
1
1
  import { AuthContext } from "../../../lib/auth.js";
2
2
  import { useCurrentDraftId, useDraftScope } from "../../../lib/draft-scope.js";
3
+ import { useNavigate } from "../../navigation/navigation.js";
3
4
  import { reads, useReadQuery } from "../../../lib/studio-reads.js";
4
5
  import { cn } from "../../../lib/utils.js";
5
6
  import { BOTTOM_CARD_EDGES, CARD_BODY_EDGES } from "../../preview/components/SidebarStack.js";
@@ -17,7 +18,8 @@ import { EMPTY_THREAD_VIEW } from "@camox/api-contract/threads";
17
18
  * The Agent Sidebar's Chat widget, where an editor works with Camox's agent in a thread. Elsewhere in the
18
19
  * studio it is only hidden: the studio keeps following the editor's runs there. It follows
19
20
  * where the studio is: the editor's own Live thread on Live, and the draft's thread in a draft.
20
- * When the Live thread starts a draft, the studio enters it with the thread.
21
+ * When the agent on Live hands the editor's request off to a draft, the studio that asked enters
22
+ * it, if it still shows Live; the card the Live turn ends on opens it too.
21
23
  */
22
24
  function ChatWidget(t0) {
23
25
  const $ = c(6);
@@ -62,7 +64,7 @@ function ChatWidget(t0) {
62
64
  return t4;
63
65
  }
64
66
  function CurrentThread() {
65
- const $ = c(15);
67
+ const $ = c(14);
66
68
  const { apiUrl, projectUuid } = React.useContext(AuthContext);
67
69
  let t0;
68
70
  if ($[0] !== projectUuid) {
@@ -73,125 +75,105 @@ function CurrentThread() {
73
75
  const { data: project } = useReadQuery(t0);
74
76
  const draftId = useCurrentDraftId();
75
77
  const draftScope = useDraftScope();
76
- const [carried, setCarried] = React.useState();
78
+ const navigate = useNavigate();
77
79
  let t1;
78
80
  if ($[2] !== draftScope) {
79
- t1 = (started, thread) => {
80
- if (draftScope.current() !== null) return;
81
- const { startedDraft: _, continuedIn: __, ...state } = thread.state;
82
- setCarried({
83
- draftId: started,
84
- thread: {
85
- ...thread,
86
- state
87
- }
88
- });
89
- draftScope.enterStarted(started);
90
- };
81
+ t1 = (started) => draftScope.enterStarted(started);
91
82
  $[2] = draftScope;
92
83
  $[3] = t1;
93
84
  } else t1 = $[3];
94
85
  const enterDraft = t1;
95
86
  let t2;
96
- let t3;
97
- if ($[4] !== draftScope) {
98
- t2 = () => draftScope.subscribe((t4) => {
99
- const { move } = t4;
100
- if (move !== "started") setCarried(void 0);
87
+ if ($[4] !== navigate) {
88
+ t2 = (next) => void navigate({
89
+ to: window.location.href,
90
+ draft: next
101
91
  });
102
- t3 = [draftScope];
103
- $[4] = draftScope;
92
+ $[4] = navigate;
104
93
  $[5] = t2;
105
- $[6] = t3;
106
- } else {
107
- t2 = $[5];
108
- t3 = $[6];
109
- }
110
- React.useEffect(t2, t3);
94
+ } else t2 = $[5];
95
+ const openDraft = t2;
111
96
  if (!project) {
112
- let t4;
113
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
114
- t4 = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThreadMessages, { view: EMPTY_THREAD_VIEW }), /* @__PURE__ */ jsx(ThreadComposer, { disabled: true })] });
115
- $[7] = t4;
116
- } else t4 = $[7];
117
- return t4;
97
+ let t3;
98
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
99
+ t3 = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThreadMessages, { view: EMPTY_THREAD_VIEW }), /* @__PURE__ */ jsx(ThreadComposer, { disabled: true })] });
100
+ $[6] = t3;
101
+ } else t3 = $[6];
102
+ return t3;
118
103
  }
119
- const t4 = `${project.id}:${draftId ?? "live"}`;
120
- const t5 = carried?.draftId === draftId ? carried.thread : void 0;
121
- let t6;
122
- if ($[8] !== apiUrl || $[9] !== draftId || $[10] !== enterDraft || $[11] !== project.id || $[12] !== t4 || $[13] !== t5) {
123
- t6 = /* @__PURE__ */ jsx(Thread, {
104
+ const t3 = `${project.id}:${draftId ?? "live"}`;
105
+ let t4;
106
+ if ($[7] !== apiUrl || $[8] !== draftId || $[9] !== enterDraft || $[10] !== openDraft || $[11] !== project.id || $[12] !== t3) {
107
+ t4 = /* @__PURE__ */ jsx(Thread, {
124
108
  apiUrl,
125
109
  projectId: project.id,
126
110
  draftId,
127
- carried: t5,
128
- onEnterDraft: enterDraft
129
- }, t4);
130
- $[8] = apiUrl;
131
- $[9] = draftId;
132
- $[10] = enterDraft;
111
+ onEnterDraft: enterDraft,
112
+ onOpenDraft: openDraft
113
+ }, t3);
114
+ $[7] = apiUrl;
115
+ $[8] = draftId;
116
+ $[9] = enterDraft;
117
+ $[10] = openDraft;
133
118
  $[11] = project.id;
134
- $[12] = t4;
135
- $[13] = t5;
136
- $[14] = t6;
137
- } else t6 = $[14];
138
- return t6;
119
+ $[12] = t3;
120
+ $[13] = t4;
121
+ } else t4 = $[13];
122
+ return t4;
139
123
  }
140
124
  function Thread(t0) {
141
125
  const $ = c(26);
142
- const { apiUrl, projectId, draftId, carried, onEnterDraft } = t0;
126
+ const { apiUrl, projectId, draftId, onEnterDraft, onOpenDraft } = t0;
143
127
  let t1;
144
- if ($[0] !== carried || $[1] !== onEnterDraft) {
145
- t1 = {
146
- carried,
147
- onEnterDraft
148
- };
149
- $[0] = carried;
150
- $[1] = onEnterDraft;
151
- $[2] = t1;
152
- } else t1 = $[2];
128
+ if ($[0] !== onEnterDraft) {
129
+ t1 = { onEnterDraft };
130
+ $[0] = onEnterDraft;
131
+ $[1] = t1;
132
+ } else t1 = $[1];
153
133
  const { view, sending, send, stop, error, touched } = useThread(apiUrl, projectId, draftId, t1);
154
134
  const follow = React.use(FollowAgentContext);
155
135
  let t2;
156
- if ($[3] !== follow) {
136
+ if ($[2] !== follow) {
157
137
  t2 = (batch) => follow?.receive(batch);
158
- $[3] = follow;
159
- $[4] = t2;
160
- } else t2 = $[4];
138
+ $[2] = follow;
139
+ $[3] = t2;
140
+ } else t2 = $[3];
161
141
  const followTouched = React.useEffectEvent(t2);
162
142
  let t3;
163
- if ($[5] !== followTouched || $[6] !== touched) {
143
+ if ($[4] !== followTouched || $[5] !== touched) {
164
144
  t3 = () => {
165
145
  if (touched) followTouched(touched.batch);
166
146
  };
167
- $[5] = followTouched;
168
- $[6] = touched;
169
- $[7] = t3;
170
- } else t3 = $[7];
147
+ $[4] = followTouched;
148
+ $[5] = touched;
149
+ $[6] = t3;
150
+ } else t3 = $[6];
171
151
  let t4;
172
- if ($[8] !== touched) {
152
+ if ($[7] !== touched) {
173
153
  t4 = [touched];
174
- $[8] = touched;
175
- $[9] = t4;
176
- } else t4 = $[9];
154
+ $[7] = touched;
155
+ $[8] = t4;
156
+ } else t4 = $[8];
177
157
  React.useEffect(t3, t4);
178
158
  let t5;
179
- if ($[10] !== follow || $[11] !== send) {
159
+ if ($[9] !== follow || $[10] !== send) {
180
160
  t5 = (text) => {
181
161
  follow?.resume();
182
162
  send(text);
183
163
  };
184
- $[10] = follow;
185
- $[11] = send;
186
- $[12] = t5;
187
- } else t5 = $[12];
164
+ $[9] = follow;
165
+ $[10] = send;
166
+ $[11] = t5;
167
+ } else t5 = $[11];
188
168
  const sendFollowing = t5;
189
169
  let t6;
190
- if ($[13] !== sending || $[14] !== view) {
170
+ if ($[12] !== onOpenDraft || $[13] !== sending || $[14] !== view) {
191
171
  t6 = /* @__PURE__ */ jsx(ThreadMessages, {
192
172
  view,
193
- sending
173
+ sending,
174
+ onOpenDraft
194
175
  });
176
+ $[12] = onOpenDraft;
195
177
  $[13] = sending;
196
178
  $[14] = view;
197
179
  $[15] = t6;