Open History to see the last commit
1import { msg, T, useGT, useMessages } from "gt-react";
2import type { MessageResolver } from "~/i18n/messages";
3import { useNativeFileDrag } from "../../useNativeFileDrag";
4import { resolvePathLinkTarget } from "@t3tools/shared/fileLinks";
5import { documentChipKindForFileName } from "~/pierre-icons";
6import { isSvgAttachment } from "@t3tools/shared/image";
7import { useRenderedAppearance } from "../../hooks/useTheme";
8import { PullRequestGlyph } from "../pullRequest/pullRequestIcons";
9import { ReadOnlySourcePreview } from "../files/AttachmentFilePreview";
10import { useRightPanelStore } from "~/rightPanelStore";
11import { COMPOSER_CONTEXT_KINDS } from "@t3tools/contracts";
12import { formatAttachmentSize } from "@t3tools/client-runtime/state/attachments";
13import { use, type ReactNode } from "react";
14import { FileDiff } from "@pierre/diffs/react";
15import { DiffWorkerPoolProvider } from "../DiffWorkerPoolProvider";
16import {
17 type ChatFileAttachment,
18 type ChatImageAttachment,
19 isImageAttachment,
20 isVideoAttachment,
21} from "../../types";
22import { getRenderablePatch, useDiffThemeName, resolveFileDiffPath } from "../../lib/diffRendering";
23import { PREFERRED_HIGHLIGHTER } from "../../lib/syntaxHighlighting";
24import ChatMarkdown from "../ChatMarkdown";
25import { EnvironmentContextChip } from "../EnvironmentContextChip";
26import { ThreadContextChip } from "../ThreadContextChip";
27import { ResponseReplyCard } from "./AssistantCitationChip";
28import { MessageCircleIcon, MousePointerClickIcon, PaintbrushIcon } from "lucide-react";
29import type { ComposerContextId, KnownComposerContextRecord } from "@t3tools/contracts";
30import { buildExpandedImagePreview } from "./ExpandedImagePreview";
31import { WorkspaceEntryIcon, WorkspaceEntryTooltip } from "./WorkspaceEntryIcon";
32import { TerminalContextInlineChip } from "./TerminalContextInlineChip";
33import {
34 ContextChipPopover as UserMessageContextPopover,
35 FileChip,
36 ImageChipButton,
37 PULL_REQUEST_CHIP_KINDS,
38 PullRequestChip,
39 UnresolvedChip,
40} from "../contextChipParts";
41import {
42 isPullRequestSummaryContext,
43 previewAnnotationTargetText,
44 pullRequestContextDisplayState,
45 pullRequestContextKindLabel,
46 reviewCommentContextLabel,
47 reviewCommentRangeText,
48 reviewCommentSectionText,
49} from "~/lib/composerContextRecords";
50import { formatComposerContextReference } from "@t3tools/shared/composerContextReferences";
51import { ContextChip, ContextChipLabel, type ContextChipKind } from "../ContextChip";
52import { createContextPresentationRegistry } from "../contextPresentationRegistry";
53import type { ChatMarkdownContextReference } from "../ChatMarkdown";
54import {
55 SkillChipPopover,
56 skillInstructionsOpener,
57 skillPopoverDescription,
58} from "./SkillInlineText";
59import { formatWorkspaceRelativePath } from "../../filePathDisplay";
60import {
61 buildReviewCommentRenderablePatch,
62 formatReviewCommentFence,
63 type ReviewCommentContext,
64} from "../../reviewCommentContext";
65import { TimelineRowCtx } from "./timelineRowContext";
66import { userMessageFileLabel } from "./TimelineUserMessageRow.logic";
67import { SharedTooltipTrigger } from "../ui/shared-tooltip";
68
69function UserMessageMentionChip(props: {
70 record: Extract<KnownComposerContextRecord, { kind: "mention" }>;
71 copyMarkdown: string;
72}) {
73 const gt = useGT();
74 const ctx = use(TimelineRowCtx);
75 const nativeDrag = useNativeFileDrag(ctx.activeThreadEnvironmentId, () =>
76 resolvePathLinkTarget(props.record.path, ctx.workspaceRoot ?? ""),
77 );
78 return (
79 <SharedTooltipTrigger
80 render={
81 <ContextChip
82 {...nativeDrag}
83 kind={documentChipKindForFileName(props.record.path) ?? "mention"}
84 render={<button type="button" />}
85 aria-label={gt`Preview ${{ name: props.record.path }}`}
86 data-markdown-copy={props.copyMarkdown}
87 onClick={() => {
88 if (ctx.threadRef)
89 useRightPanelStore.getState().openFile(ctx.threadRef, props.record.path);
90 }}
91 >
92 <WorkspaceEntryIcon
93 path={props.record.path}
94 environmentId={ctx.activeThreadEnvironmentId}
95 cwd={ctx.workspaceRoot}
96 theme={ctx.resolvedTheme}
97 />
98 <ContextChipLabel>{props.record.label}</ContextChipLabel>
99 </ContextChip>
100 }
101 label={
102 <>
103 <WorkspaceEntryTooltip
104 path={props.record.path}
105 environmentId={ctx.activeThreadEnvironmentId}
106 cwd={ctx.workspaceRoot}
107 />
108 </>
109 }
110 className="pointer-events-auto"
111 />
112 );
113}
114
115function UserMessageSkillChip(props: {
116 record: Extract<KnownComposerContextRecord, { kind: "skill" }>;
117 copyMarkdown: string;
118}) {
119 const { skills, threadRef } = use(TimelineRowCtx);
120 const skill = skills.find((candidate) => candidate.name === props.record.name);
121 return (
122 <SkillChipPopover
123 label={props.record.label || props.record.name}
124 description={skill ? skillPopoverDescription(skill) : null}
125 copyMarkdown={props.copyMarkdown}
126 onViewInstructions={skillInstructionsOpener(threadRef, skill)}
127 />
128 );
129}
130
131function UserMessagePullRequestContextChip(props: {
132 record: Extract<KnownComposerContextRecord, { kind: "review-comment" }>;
133 copyMarkdown: string;
134 kind: ContextChipKind;
135}) {
136 const { activeThreadEnvironmentId, openPullRequest } = use(TimelineRowCtx);
137 const messages = useMessages();
138 const metadata = props.record.pullRequest;
139 if (metadata === undefined) return null;
140 return (
141 <PullRequestChip
142 metadata={metadata}
143 environmentId={activeThreadEnvironmentId}
144 label={reviewCommentContextLabel(props.record, messages)}
145 kindLabel={pullRequestContextKindLabel(props.record, messages)}
146 kind={props.kind}
147 copyMarkdown={props.copyMarkdown}
148 onOpen={openPullRequest}
149 />
150 );
151}
152
153function UserMessagePreviewAnnotationDetails(props: {
154 record: Extract<KnownComposerContextRecord, { kind: "preview-annotation" }>;
155 image: ChatImageAttachment | null;
156}) {
157 const ctx = use(TimelineRowCtx);
158 const gt = useGT();
159 const messages = useMessages();
160 const visibleElements = props.record.elements ?? [];
161 const targetText = previewAnnotationTargetText(props.record, messages);
162 return (
163 <div className="max-w-full overflow-hidden rounded-lg border border-border/70 bg-background/70">
164 {props.image?.previewUrl ? (
165 <button
166 type="button"
167 className="block max-h-64 w-full cursor-zoom-in overflow-hidden border-b border-border/70 bg-muted"
168 aria-label={gt`Preview ${{ name: props.image.name }}`}
169 onClick={() => {
170 if (!props.image) return;
171 const preview = buildExpandedImagePreview([props.image], props.image.id);
172 if (preview) ctx.onImageExpand(preview);
173 }}
174 >
175 <img
176 src={props.image.previewUrl}
177 alt={gt`Annotated preview crop`}
178 className="max-h-64 w-full object-contain"
179 />
180 </button>
181 ) : (
182 <div className="border-b border-border/70 bg-muted/40 px-3 py-2 text-secondary-label text-xs">
183 <T>Screenshot unavailable</T>
184 </div>
185 )}
186 <div className="min-w-0 px-3 py-2.5">
187 <div className="text-message-foreground text-xs font-medium">
188 {props.record.pageTitle?.trim() || props.record.pageUrl || gt`Preview annotation`}
189 </div>
190 {props.record.comment ? (
191 <div className="mt-1 whitespace-pre-wrap wrap-break-word text-sm">
192 {props.record.comment}
193 </div>
194 ) : null}
195 <div className="mt-1 flex items-center gap-2 text-secondary-label text-3xs">
196 {targetText ? <span className="truncate">{targetText}</span> : null}
197 {(props.record.styleChanges?.length ?? 0) > 0 ? (
198 <span className="inline-flex shrink-0 items-center gap-1">
199 <PaintbrushIcon className="size-3" />
200 {props.record.styleChanges?.length ?? 0}
201 </span>
202 ) : null}
203 </div>
204 {visibleElements.length > 0 ? (
205 <div className="mt-2 space-y-2 border-t border-border/60 pt-2">
206 {visibleElements.map((element) => {
207 const source = element.source;
208 const sourceLabel = source?.fileName
209 ? `${source.fileName}${source.lineNumber === null ? "" : `:${source.lineNumber}`}`
210 : null;
211 return (
212 <div
213 key={`${element.selector}\u0000${element.tagName}\u0000${sourceLabel ?? ""}\u0000${element.htmlPreview}`}
214 className="min-w-0"
215 >
216 <div className="flex min-w-0 items-center gap-2 text-xs">
217 <code className="truncate text-message-foreground">
218 {element.selector || `<${element.tagName}>`}
219 </code>
220 {sourceLabel ? (
221 <span className="ml-auto shrink-0 text-secondary-label">{sourceLabel}</span>
222 ) : null}
223 </div>
224 {element.htmlPreview?.trim() ? (
225 <pre className="mt-1 max-h-24 overflow-auto whitespace-pre-wrap rounded bg-muted/60 px-2 py-1.5 text-3xs leading-relaxed">
226 {element.htmlPreview.trim()}
227 </pre>
228 ) : null}
229 </div>
230 );
231 })}
232 </div>
233 ) : null}
234 </div>
235 </div>
236 );
237}
238
239function UserMessageElementDetails({
240 record,
241}: {
242 record: Extract<KnownComposerContextRecord, { kind: "element" }>;
243}) {
244 const sourceLabel = record.source?.fileName
245 ? `${record.source.fileName}${record.source.lineNumber === null ? "" : `:${record.source.lineNumber}`}`
246 : null;
247 return (
248 <div className="max-w-full overflow-hidden rounded-lg border border-border/70 bg-background/70">
249 <div className="border-b border-border/70 px-3 py-2.5">
250 <div className="truncate text-message-foreground text-xs font-medium">
251 {record.pageTitle?.trim() || record.pageUrl}
252 </div>
253 <div className="mt-0.5 truncate text-secondary-label text-3xs">{record.pageUrl}</div>
254 </div>
255 <div className="space-y-2 px-3 py-2.5">
256 <div className="flex min-w-0 items-center gap-2 text-xs">
257 <code className="truncate text-message-foreground">
258 {record.selector || `<${record.tagName}>`}
259 </code>
260 {sourceLabel ? (
261 <span className="ml-auto shrink-0 text-secondary-label">{sourceLabel}</span>
262 ) : null}
263 </div>
264 {record.htmlPreview?.trim() ? (
265 <div className="flex h-40 flex-col overflow-hidden rounded border border-border">
266 <ReadOnlySourcePreview name="element.html" text={record.htmlPreview} />
267 </div>
268 ) : null}
269 {record.styles?.trim() ? (
270 <div className="flex h-32 flex-col overflow-hidden rounded border border-border">
271 <ReadOnlySourcePreview name="styles.css" text={record.styles} />
272 </div>
273 ) : null}
274 </div>
275 </div>
276 );
277}
278
279interface UserMessageContextRenderContext {
280 environmentId: import("@t3tools/contracts").EnvironmentId;
281 reference: ChatMarkdownContextReference;
282 annotationImage: ChatImageAttachment | null;
283 attachment: ChatImageAttachment | ChatFileAttachment | null;
284 resolvedTheme: "light" | "dark";
285 copyMarkdown: string;
286 onExpandImage: (image: ChatImageAttachment) => void;
287 onExpandVideo: (file: ChatFileAttachment) => void;
288 onOpenFile: (file: ChatFileAttachment) => void;
289 m: MessageResolver;
290}
291
292function UnavailableUserMessageContextChip(props: UserMessageContextRenderContext) {
293 return (
294 <UnresolvedChip
295 label={props.reference.label}
296 copyMarkdown={props.copyMarkdown}
297 tooltip={props.m(msg("This context is no longer available."))}
298 />
299 );
300}
301
302const userMessageContextPresentationRegistry = createContextPresentationRegistry<
303 KnownComposerContextRecord,
304 UserMessageContextRenderContext,
305 ReactNode
306>({
307 requiredKinds: COMPOSER_CONTEXT_KINDS,
308 handlers: [
309 {
310 kind: "mention",
311 canRender: (record) => record.kind === "mention",
312 render: (record, context) =>
313 record.kind === "mention" ? (
314 <UserMessageMentionChip record={record} copyMarkdown={context.copyMarkdown} />
315 ) : (
316 <UnavailableUserMessageContextChip {...context} />
317 ),
318 },
319 {
320 kind: "skill",
321 canRender: (record) => record.kind === "skill",
322 render: (record, context) =>
323 record.kind === "skill" ? (
324 <UserMessageSkillChip record={record} copyMarkdown={context.copyMarkdown} />
325 ) : (
326 <UnavailableUserMessageContextChip {...context} />
327 ),
328 },
329 {
330 kind: "thread",
331 canRender: (record) => record.kind === "thread",
332 render: (record, context) =>
333 record.kind === "thread" ? (
334 <ThreadContextChip record={record} copyMarkdown={context.copyMarkdown} />
335 ) : (
336 <UnavailableUserMessageContextChip {...context} />
337 ),
338 },
339 {
340 kind: "response",
341 canRender: (record) => record.kind === "response",
342 render: (record, context) =>
343 record.kind === "response" ? (
344 <ResponseReplyCard
345 record={record}
346 copyMarkdown={context.copyMarkdown}
347 leading={context.reference.leading ?? false}
348 trailing={context.reference.trailing ?? false}
349 />
350 ) : (
351 <UnavailableUserMessageContextChip {...context} />
352 ),
353 },
354 {
355 kind: "environment",
356 canRender: (record) => record.kind === "environment",
357 render: (record, context) =>
358 record.kind === "environment" ? (
359 <EnvironmentContextChip record={record} copyMarkdown={context.copyMarkdown} />
360 ) : (
361 <UnavailableUserMessageContextChip {...context} />
362 ),
363 },
364 {
365 kind: "image",
366 canRender: (record, context) =>
367 record.kind === "image" &&
368 context.attachment !== null &&
369 isImageAttachment(context.attachment),
370 render: (record, context) => {
371 if (
372 record.kind !== "image" ||
373 context.attachment === null ||
374 !isImageAttachment(context.attachment)
375 ) {
376 return <UnavailableUserMessageContextChip {...context} />;
377 }
378 const attachment = context.attachment;
379 return (
380 <ImageChipButton
381 name={record.name}
382 previewUrl={attachment.previewUrl}
383 size={formatAttachmentSize(record.sizeBytes, context.m)}
384 data-markdown-copy={context.copyMarkdown}
385 onClick={() => context.onExpandImage(attachment)}
386 />
387 );
388 },
389 },
390 {
391 kind: "file",
392 canRender: (record, context) =>
393 record.kind === "file" && context.attachment !== null && context.attachment.type === "file",
394 render: (record, context) => {
395 if (
396 record.kind !== "file" ||
397 context.attachment === null ||
398 context.attachment.type !== "file"
399 ) {
400 return <UnavailableUserMessageContextChip {...context} />;
401 }
402 const attachment = context.attachment;
403 const isVideo = isVideoAttachment(attachment);
404 const label = userMessageFileLabel(attachment, context.m);
405 const disabled =
406 attachment.downloadable === false && (!isVideo || attachment.previewUrl === undefined);
407 const size =
408 attachment.downloadable === false
409 ? context.m(msg("Sending…"))
410 : formatAttachmentSize(record.sizeBytes, context.m);
411 return (
412 <FileChip
413 name={label}
414 svgPreview={
415 isSvgAttachment(attachment)
416 ? { environmentId: context.environmentId, attachmentId: attachment.id }
417 : undefined
418 }
419 size={size}
420 isVideo={isVideo}
421 theme={context.resolvedTheme}
422 disabled={disabled}
423 accessibleLabel={
424 isVideo
425 ? context.m(msg`Video attachment, ${{ label }}, ${{ size }}`)
426 : context.m(msg`File attachment, ${{ label }}, ${{ size }}`)
427 }
428 copyMarkdown={context.copyMarkdown}
429 onOpen={() =>
430 isVideo ? context.onExpandVideo(attachment) : context.onOpenFile(attachment)
431 }
432 tooltip={`${label}\n${size}`}
433 />
434 );
435 },
436 },
437 {
438 kind: "terminal",
439 canRender: (record) => record.kind === "terminal",
440 render: (record, context, definition) =>
441 record.kind === "terminal" ? (
442 <span data-markdown-copy={context.copyMarkdown}>
443 <TerminalContextInlineChip
444 terminalLabel={record.terminalLabel}
445 lineStart={record.lineStart}
446 lineEnd={record.lineEnd}
447 text={record.text}
448 detailsMode={definition.capabilities.details}
449 />
450 </span>
451 ) : (
452 <UnavailableUserMessageContextChip {...context} />
453 ),
454 },
455 {
456 kind: "element",
457 canRender: (record) => record.kind === "element",
458 render: (record, context) =>
459 record.kind === "element" ? (
460 <UserMessageContextPopover
461 copyMarkdown={context.copyMarkdown}
462 accessibleLabel={context.m(msg`Browser element, ${{ label: record.label }}`)}
463 kind="element"
464 icon={<MousePointerClickIcon />}
465 label={record.label}
466 >
467 <UserMessageElementDetails record={record} />
468 </UserMessageContextPopover>
469 ) : (
470 <UnavailableUserMessageContextChip {...context} />
471 ),
472 },
473 {
474 kind: "review-comment",
475 canRender: (record) => record.kind === "review-comment",
476 render: (record, context) => {
477 if (record.kind !== "review-comment") {
478 return <UnavailableUserMessageContextChip {...context} />;
479 }
480 const isPullRequest = isPullRequestSummaryContext(record);
481 const label = reviewCommentContextLabel(record, context.m);
482 const kindLabel = isPullRequest
483 ? pullRequestContextKindLabel(record, context.m)
484 : context.m(msg("Review comment"));
485 const pullRequestState = pullRequestContextDisplayState(record) ?? "unknown";
486 if (isPullRequest && record.pullRequest !== undefined) {
487 return (
488 <UserMessagePullRequestContextChip
489 record={record}
490 copyMarkdown={context.copyMarkdown}
491 kind={PULL_REQUEST_CHIP_KINDS[pullRequestState]}
492 />
493 );
494 }
495 return (
496 <UserMessageContextPopover
497 copyMarkdown={context.copyMarkdown}
498 accessibleLabel={
499 record.pullRequest
500 ? context.m(
501 msg`${{ kind: kindLabel }}, ${{ label }}, ${{ title: record.pullRequest.title }}`,
502 )
503 : context.m(msg`${{ kind: kindLabel }}, ${{ label }}`)
504 }
505 kind={isPullRequest ? PULL_REQUEST_CHIP_KINDS[pullRequestState] : "review-comment"}
506 icon={isPullRequest ? <PullRequestGlyph.pullRequest /> : <MessageCircleIcon />}
507 label={label}
508 >
509 <UserMessageReviewCommentCard
510 comment={{
511 id: record.contextId,
512 sectionId: record.sectionId,
513 sectionTitle: record.sectionTitle,
514 filePath: record.filePath,
515 startIndex: record.startIndex,
516 endIndex: record.endIndex,
517 rangeLabel: record.rangeLabel,
518 text: record.text,
519 diff: record.diff,
520 ...(record.fenceLanguage !== undefined
521 ? { fenceLanguage: record.fenceLanguage }
522 : {}),
523 ...(record.pullRequest !== undefined ? { pullRequest: record.pullRequest } : {}),
524 }}
525 />
526 </UserMessageContextPopover>
527 );
528 },
529 },
530 {
531 kind: "preview-annotation",
532 canRender: (record) => record.kind === "preview-annotation",
533 render: (record, context) =>
534 record.kind === "preview-annotation" ? (
535 <UserMessageContextPopover
536 copyMarkdown={context.copyMarkdown}
537 accessibleLabel={context.m(msg`Preview annotation, ${{ label: record.label }}`)}
538 kind="preview-annotation"
539 icon={<MousePointerClickIcon />}
540 label={record.label}
541 >
542 <UserMessagePreviewAnnotationDetails record={record} image={context.annotationImage} />
543 </UserMessageContextPopover>
544 ) : (
545 <UnavailableUserMessageContextChip {...context} />
546 ),
547 },
548 ],
549 fallback: (_kind, _record, context) => <UnavailableUserMessageContextChip {...context} />,
550});
551
552export function UserMessageContextReferenceChip(props: {
553 reference: ChatMarkdownContextReference;
554 record: KnownComposerContextRecord | undefined;
555 annotationImage: ChatImageAttachment | null;
556 attachment: ChatImageAttachment | ChatFileAttachment | null;
557 onExpandImage: (image: ChatImageAttachment) => void;
558 onExpandVideo: (file: ChatFileAttachment) => void;
559 onOpenFile: (file: ChatFileAttachment) => void;
560}) {
561 const { resolvedTheme, activeThreadEnvironmentId } = use(TimelineRowCtx);
562 const m = useMessages();
563 const copyMarkdown = formatComposerContextReference({
564 kind: props.reference.kind,
565 contextId: props.reference.contextId as ComposerContextId,
566 label: props.reference.label,
567 });
568 return userMessageContextPresentationRegistry.render(props.reference.kind, props.record, {
569 environmentId: activeThreadEnvironmentId,
570 reference: props.reference,
571 annotationImage: props.annotationImage,
572 attachment: props.attachment,
573 resolvedTheme,
574 copyMarkdown,
575 onExpandImage: props.onExpandImage,
576 onExpandVideo: props.onExpandVideo,
577 onOpenFile: props.onOpenFile,
578 m,
579 });
580}
581
582function UserMessageReviewCommentCard({ comment }: { comment: ReviewCommentContext }) {
583 const m = useMessages();
584 const renderedAppearance = useRenderedAppearance();
585 const diffThemeName = useDiffThemeName(renderedAppearance);
586 const ctx = use(TimelineRowCtx);
587 const fenceLanguage = comment.fenceLanguage ?? "diff";
588 const renderablePatch = getRenderablePatch(
589 buildReviewCommentRenderablePatch(comment),
590 `review-comment:${comment.id}`,
591 undefined,
592 m,
593 );
594
595 return (
596 <div className="space-y-2 rounded-lg border border-border/70 bg-background/70 p-3">
597 <div className="space-y-1">
598 <div className="text-xs font-medium text-foreground">
599 {formatWorkspaceRelativePath(comment.filePath, ctx.workspaceRoot)}
600 </div>
601 <div className="text-2xs text-muted-foreground">
602 {reviewCommentSectionText(comment.sectionTitle, m)} ·{" "}
603 {reviewCommentRangeText(comment.rangeLabel, m)}
604 </div>
605 </div>
606 {comment.text.length > 0 && (
607 <div className="wrap-break-word text-sm">
608 <ChatMarkdown
609 text={comment.text}
610 cwd={ctx.markdownCwd}
611 threadRef={ctx.threadRef ?? undefined}
612 skills={ctx.skills}
613 parseRawHtml={false}
614 lineBreaks
615 />
616 </div>
617 )}
618 {fenceLanguage !== "diff" && comment.diff.trim().length > 0 && (
619 <ChatMarkdown
620 text={formatReviewCommentFence(fenceLanguage, comment.diff)}
621 cwd={ctx.markdownCwd}
622 threadRef={ctx.threadRef ?? undefined}
623 skills={ctx.skills}
624 className="text-foreground"
625 />
626 )}
627 {renderablePatch?.kind === "files" && (
628 <DiffWorkerPoolProvider>
629 {renderablePatch.files.map((fileDiff) => (
630 <FileDiff
631 key={resolveFileDiffPath(fileDiff)}
632 fileDiff={fileDiff}
633 options={{
634 collapsed: false,
635 diffStyle: "unified",
636 theme: diffThemeName,
637 preferredHighlighter: PREFERRED_HIGHLIGHTER,
638 }}
639 />
640 ))}
641 </DiffWorkerPoolProvider>
642 )}
643 {renderablePatch?.kind === "raw" && (
644 <pre className="overflow-x-auto rounded-md bg-muted/40 p-2 text-xs">
645 {renderablePatch.text}
646 </pre>
647 )}
648 </div>
649 );
650}