@lukeashford/aurelius 2.15.0 → 2.16.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.
package/dist/index.mjs CHANGED
@@ -3594,6 +3594,7 @@ import React53, { useEffect as useEffect6, useRef as useRef5, useState as useSta
3594
3594
  // src/components/MarkdownContent.tsx
3595
3595
  import React52, { useMemo } from "react";
3596
3596
  import DOMPurify from "dompurify";
3597
+ import { marked } from "marked";
3597
3598
  var DEFAULT_SANITIZE_CONFIG = {
3598
3599
  ALLOWED_TAGS: [
3599
3600
  "h1",
@@ -3706,7 +3707,14 @@ var MarkdownContent = React52.forwardRef(
3706
3707
  return "";
3707
3708
  }
3708
3709
  const config = sanitizeConfig ?? DEFAULT_SANITIZE_CONFIG;
3709
- const sanitized = content ? DOMPurify.sanitize(content, config) : "";
3710
+ let htmlContent;
3711
+ try {
3712
+ htmlContent = marked.parse(content);
3713
+ } catch (e) {
3714
+ console.error("Error parsing markdown:", e);
3715
+ htmlContent = content;
3716
+ }
3717
+ const sanitized = htmlContent ? DOMPurify.sanitize(htmlContent, config) : "";
3710
3718
  if (isStreaming) {
3711
3719
  return injectStreamingCursor(sanitized, cursorClassName);
3712
3720
  }
@@ -4081,7 +4089,7 @@ var StreamingCursor = React54.forwardRef(
4081
4089
  StreamingCursor.displayName = "StreamingCursor";
4082
4090
 
4083
4091
  // src/components/chat/ChatInterface.tsx
4084
- import React65, { useCallback as useCallback17, useMemo as useMemo3, useState as useState17 } from "react";
4092
+ import React66, { useCallback as useCallback17, useMemo as useMemo3, useState as useState17 } from "react";
4085
4093
 
4086
4094
  // src/components/chat/ChatView.tsx
4087
4095
  import React56, { useEffect as useEffect9 } from "react";
@@ -4993,7 +5001,7 @@ var CollapsedSidebarToggle = React58.forwardRef(({ onExpand, className, ...rest
4993
5001
  CollapsedSidebarToggle.displayName = "CollapsedSidebarToggle";
4994
5002
 
4995
5003
  // src/components/chat/ArtifactsPanel.tsx
4996
- import React63, { useCallback as useCallback14, useEffect as useEffect11, useState as useState14 } from "react";
5004
+ import React64, { useCallback as useCallback14, useEffect as useEffect11, useState as useState14 } from "react";
4997
5005
 
4998
5006
  // src/components/ImageCard.tsx
4999
5007
  import React59 from "react";
@@ -5149,6 +5157,7 @@ var AudioCard = React61.forwardRef(
5149
5157
  className,
5150
5158
  children,
5151
5159
  playerProps,
5160
+ height = "40px",
5152
5161
  ...props
5153
5162
  }, ref) => {
5154
5163
  return /* @__PURE__ */ React61.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ React61.createElement(
@@ -5170,13 +5179,13 @@ var AudioCard = React61.forwardRef(
5170
5179
  muted,
5171
5180
  loop,
5172
5181
  width: "100%",
5173
- height: "40px",
5182
+ height,
5174
5183
  style: { backgroundColor: "transparent" },
5175
5184
  config: {
5176
5185
  file: {
5177
5186
  forceAudio: true,
5178
5187
  attributes: {
5179
- style: { width: "100%", height: "40px" }
5188
+ style: { width: "100%", height }
5180
5189
  }
5181
5190
  }
5182
5191
  },
@@ -5250,22 +5259,56 @@ var ScriptCard = React62.forwardRef(
5250
5259
  );
5251
5260
  ScriptCard.displayName = "ScriptCard";
5252
5261
 
5262
+ // src/components/PdfCard.tsx
5263
+ import React63 from "react";
5264
+ import { FileText as FileText2 } from "lucide-react";
5265
+ var PdfCard = React63.forwardRef(
5266
+ ({
5267
+ url,
5268
+ title,
5269
+ subtitle,
5270
+ height = "400px",
5271
+ mediaClassName,
5272
+ contentClassName,
5273
+ className,
5274
+ children,
5275
+ ...props
5276
+ }, ref) => {
5277
+ return /* @__PURE__ */ React63.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ React63.createElement(
5278
+ "div",
5279
+ {
5280
+ className: cx("relative w-full bg-obsidian", mediaClassName),
5281
+ style: { height }
5282
+ },
5283
+ /* @__PURE__ */ React63.createElement(
5284
+ "iframe",
5285
+ {
5286
+ src: `${url}#view=FitH`,
5287
+ title: typeof title === "string" ? title : "PDF Document",
5288
+ className: "w-full h-full border-0"
5289
+ }
5290
+ )
5291
+ ), (title || subtitle || children) && /* @__PURE__ */ React63.createElement("div", { className: cx("px-4 py-4 border-t border-ash", contentClassName) }, /* @__PURE__ */ React63.createElement("div", { className: "flex items-start gap-3" }, /* @__PURE__ */ React63.createElement("div", { className: "p-2 bg-ash/20 text-gold shrink-0" }, /* @__PURE__ */ React63.createElement(FileText2, { size: 20 })), /* @__PURE__ */ React63.createElement("div", { className: "min-w-0 flex-1" }, title && /* @__PURE__ */ React63.createElement("h4", { className: "text-sm font-semibold text-white truncate leading-tight" }, title), subtitle && /* @__PURE__ */ React63.createElement("p", { className: "text-xs text-silver truncate mt-1 leading-normal" }, subtitle), children))));
5292
+ }
5293
+ );
5294
+ PdfCard.displayName = "PdfCard";
5295
+
5253
5296
  // src/components/chat/ArtifactsPanel.tsx
5254
5297
  function ArtifactSkeleton({ type, fullWidth }) {
5255
5298
  const wrapperClass = fullWidth ? "col-span-full" : "";
5256
- if (type === "image") {
5257
- return /* @__PURE__ */ React63.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "w-full h-48" }), /* @__PURE__ */ React63.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-1/2" })));
5299
+ if (type === "IMAGE") {
5300
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "w-full h-48" }), /* @__PURE__ */ React64.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-4 w-1/2" })));
5258
5301
  }
5259
- if (type === "video") {
5260
- return /* @__PURE__ */ React63.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "w-full aspect-video" }), /* @__PURE__ */ React63.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-1/2" })));
5302
+ if (type === "VIDEO") {
5303
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "w-full aspect-video" }), /* @__PURE__ */ React64.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-4 w-1/2" })));
5261
5304
  }
5262
- if (type === "audio") {
5263
- return /* @__PURE__ */ React63.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "w-full h-32" }), /* @__PURE__ */ React63.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-1/2" })));
5305
+ if (type === "AUDIO" || type === "PDF") {
5306
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "w-full h-32" }), /* @__PURE__ */ React64.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-4 w-1/2" })));
5264
5307
  }
5265
- if (type === "html") {
5266
- return /* @__PURE__ */ React63.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-1/3 mb-4" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-2/3" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-3/4" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-1/2" }));
5308
+ if (type === "SCRIPT") {
5309
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-5 w-1/3 mb-4" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-3 w-2/3" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-3 w-3/4" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-3 w-1/2" }));
5267
5310
  }
5268
- return /* @__PURE__ */ React63.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-1/2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-3/4" }));
5311
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-5 w-1/2" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React64.createElement(Skeleton, { className: "h-4 w-3/4" }));
5269
5312
  }
5270
5313
  function ArtifactModal({
5271
5314
  artifact,
@@ -5285,62 +5328,72 @@ function ArtifactModal({
5285
5328
  onClose();
5286
5329
  }
5287
5330
  }, [onClose]);
5288
- return /* @__PURE__ */ React63.createElement(
5331
+ return /* @__PURE__ */ React64.createElement(
5289
5332
  "div",
5290
5333
  {
5291
5334
  className: "fixed inset-0 z-50 flex items-center justify-center bg-void/90 backdrop-blur-sm animate-fade-in",
5292
5335
  onClick: handleBackdropClick
5293
5336
  },
5294
- /* @__PURE__ */ React63.createElement(
5337
+ /* @__PURE__ */ React64.createElement(
5295
5338
  "div",
5296
5339
  {
5297
5340
  className: "relative w-11/12 h-5/6 max-w-6xl bg-charcoal border border-ash/40 flex flex-col overflow-hidden"
5298
5341
  },
5299
- /* @__PURE__ */ React63.createElement(
5342
+ /* @__PURE__ */ React64.createElement(
5300
5343
  "div",
5301
5344
  {
5302
5345
  className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
5303
5346
  },
5304
- /* @__PURE__ */ React63.createElement("div", null, artifact.title && /* @__PURE__ */ React63.createElement("h3", { className: "text-sm font-semibold text-white" }, artifact.title), artifact.subtitle && /* @__PURE__ */ React63.createElement("p", { className: "text-xs text-silver" }, artifact.subtitle)),
5305
- /* @__PURE__ */ React63.createElement(
5347
+ /* @__PURE__ */ React64.createElement("div", null, artifact.title && /* @__PURE__ */ React64.createElement("h3", { className: "text-sm font-semibold text-white" }, artifact.title), artifact.subtitle && /* @__PURE__ */ React64.createElement("p", { className: "text-xs text-silver" }, artifact.subtitle)),
5348
+ /* @__PURE__ */ React64.createElement(
5306
5349
  "button",
5307
5350
  {
5308
5351
  onClick: onClose,
5309
5352
  className: "p-2 text-silver hover:text-white hover:bg-ash/20 transition-colors",
5310
5353
  "aria-label": "Close modal"
5311
5354
  },
5312
- /* @__PURE__ */ React63.createElement(CloseIcon, { className: "w-5 h-5" })
5355
+ /* @__PURE__ */ React64.createElement(CloseIcon, { className: "w-5 h-5" })
5313
5356
  )
5314
5357
  ),
5315
- /* @__PURE__ */ React63.createElement("div", { className: "flex-1 overflow-auto p-4" }, artifact.type === "image" && /* @__PURE__ */ React63.createElement(
5358
+ /* @__PURE__ */ React64.createElement("div", { className: "flex-1 overflow-auto p-4" }, artifact.type === "IMAGE" && /* @__PURE__ */ React64.createElement(
5316
5359
  "img",
5317
5360
  {
5318
- src: artifact.src,
5361
+ src: artifact.url,
5319
5362
  alt: artifact.alt || "Artifact image",
5320
5363
  className: "max-w-full max-h-full object-contain mx-auto"
5321
5364
  }
5322
- ), artifact.type === "video" && /* @__PURE__ */ React63.createElement(
5365
+ ), artifact.type === "VIDEO" && /* @__PURE__ */ React64.createElement(
5323
5366
  VideoCard,
5324
5367
  {
5325
- src: artifact.src || "",
5368
+ src: artifact.url || "",
5326
5369
  aspectRatio: "video",
5327
5370
  controls: true,
5328
5371
  className: "max-w-full max-h-full mx-auto"
5329
5372
  }
5330
- ), artifact.type === "audio" && /* @__PURE__ */ React63.createElement(
5373
+ ), artifact.type === "AUDIO" && /* @__PURE__ */ React64.createElement(
5331
5374
  AudioCard,
5332
5375
  {
5333
- src: artifact.src || "",
5376
+ src: artifact.url || "",
5334
5377
  controls: true,
5335
5378
  className: "max-w-xl mx-auto"
5336
5379
  }
5337
- ), artifact.type === "text" && /* @__PURE__ */ React63.createElement(
5380
+ ), artifact.type === "PDF" && /* @__PURE__ */ React64.createElement(
5381
+ PdfCard,
5382
+ {
5383
+ url: artifact.url || "",
5384
+ className: "h-full border-0"
5385
+ }
5386
+ ), artifact.type === "TEXT" && /* @__PURE__ */ React64.createElement(
5338
5387
  MarkdownContent,
5339
5388
  {
5340
- content: artifact.content || "",
5341
- className: "prose-sm prose-invert max-w-none"
5389
+ content: artifact.inlineContent || "",
5390
+ isMarkdown: artifact.mimeType === "text/markdown",
5391
+ className: cx(
5392
+ "prose prose-invert max-w-none",
5393
+ artifact.mimeType === "text/plain" && "whitespace-pre-wrap"
5394
+ )
5342
5395
  }
5343
- ), artifact.type === "html" && artifact.scriptElements && /* @__PURE__ */ React63.createElement(
5396
+ ), artifact.type === "SCRIPT" && artifact.scriptElements && /* @__PURE__ */ React64.createElement(
5344
5397
  ScriptCard,
5345
5398
  {
5346
5399
  elements: artifact.scriptElements,
@@ -5365,13 +5418,13 @@ function ArtifactRenderer({
5365
5418
  setMinDelayPassed(true);
5366
5419
  }, 800);
5367
5420
  return () => clearTimeout(timer);
5368
- }, [artifact.src, artifact.id]);
5421
+ }, [artifact.url, artifact.id]);
5369
5422
  const fullWidthClass = artifact.fullWidth ? "col-span-full" : "";
5370
5423
  if (isLoading || artifact.isPending) {
5371
- return /* @__PURE__ */ React63.createElement(ArtifactSkeleton, { type: artifact.type, fullWidth: artifact.fullWidth });
5424
+ return /* @__PURE__ */ React64.createElement(ArtifactSkeleton, { type: artifact.type, fullWidth: artifact.fullWidth });
5372
5425
  }
5373
- const showContent = artifact.type !== "image" || imageLoaded && minDelayPassed;
5374
- const expandButton = onExpand && /* @__PURE__ */ React63.createElement(
5426
+ const showContent = artifact.type !== "IMAGE" || imageLoaded && minDelayPassed;
5427
+ const expandButton = onExpand && /* @__PURE__ */ React64.createElement(
5375
5428
  "button",
5376
5429
  {
5377
5430
  onClick: (e) => {
@@ -5385,22 +5438,22 @@ function ArtifactRenderer({
5385
5438
  ),
5386
5439
  "aria-label": "Expand artifact"
5387
5440
  },
5388
- /* @__PURE__ */ React63.createElement(ExpandIcon, { className: "w-4 h-4" })
5441
+ /* @__PURE__ */ React64.createElement(ExpandIcon, { className: "w-4 h-4" })
5389
5442
  );
5390
5443
  switch (artifact.type) {
5391
- case "image":
5392
- return /* @__PURE__ */ React63.createElement(
5444
+ case "IMAGE":
5445
+ return /* @__PURE__ */ React64.createElement(
5393
5446
  "div",
5394
5447
  {
5395
5448
  className: cx("relative group cursor-pointer", fullWidthClass),
5396
5449
  onClick: onExpand
5397
5450
  },
5398
- !showContent && /* @__PURE__ */ React63.createElement(ArtifactSkeleton, { type: "image" }),
5451
+ !showContent && /* @__PURE__ */ React64.createElement(ArtifactSkeleton, { type: "IMAGE" }),
5399
5452
  expandButton,
5400
- /* @__PURE__ */ React63.createElement(
5453
+ /* @__PURE__ */ React64.createElement(
5401
5454
  ImageCard,
5402
5455
  {
5403
- src: artifact.src || "",
5456
+ src: artifact.url || "",
5404
5457
  alt: artifact.alt || "Artifact image",
5405
5458
  title: artifact.title,
5406
5459
  subtitle: artifact.subtitle,
@@ -5413,11 +5466,11 @@ function ArtifactRenderer({
5413
5466
  }
5414
5467
  )
5415
5468
  );
5416
- case "video":
5417
- return /* @__PURE__ */ React63.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ React63.createElement(
5469
+ case "VIDEO":
5470
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ React64.createElement(
5418
5471
  VideoCard,
5419
5472
  {
5420
- src: artifact.src || "",
5473
+ src: artifact.url || "",
5421
5474
  title: artifact.title,
5422
5475
  subtitle: artifact.subtitle,
5423
5476
  aspectRatio: "video",
@@ -5425,26 +5478,44 @@ function ArtifactRenderer({
5425
5478
  className: "w-full"
5426
5479
  }
5427
5480
  ));
5428
- case "audio":
5429
- return /* @__PURE__ */ React63.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ React63.createElement(
5481
+ case "AUDIO":
5482
+ return /* @__PURE__ */ React64.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ React64.createElement(
5430
5483
  AudioCard,
5431
5484
  {
5432
- src: artifact.src || "",
5485
+ src: artifact.url || "",
5433
5486
  title: artifact.title,
5434
5487
  subtitle: artifact.subtitle,
5435
5488
  controls: true,
5436
5489
  className: "w-full"
5437
5490
  }
5438
5491
  ));
5439
- case "html":
5440
- return /* @__PURE__ */ React63.createElement(
5492
+ case "PDF":
5493
+ return /* @__PURE__ */ React64.createElement(
5494
+ "div",
5495
+ {
5496
+ className: cx("relative group cursor-pointer", fullWidthClass),
5497
+ onClick: onExpand
5498
+ },
5499
+ expandButton,
5500
+ /* @__PURE__ */ React64.createElement(
5501
+ PdfCard,
5502
+ {
5503
+ url: artifact.url || "",
5504
+ title: artifact.title,
5505
+ subtitle: artifact.subtitle,
5506
+ className: "w-full"
5507
+ }
5508
+ )
5509
+ );
5510
+ case "SCRIPT":
5511
+ return /* @__PURE__ */ React64.createElement(
5441
5512
  "div",
5442
5513
  {
5443
5514
  className: cx("relative group cursor-pointer", fullWidthClass),
5444
5515
  onClick: onExpand
5445
5516
  },
5446
5517
  expandButton,
5447
- /* @__PURE__ */ React63.createElement(
5518
+ /* @__PURE__ */ React64.createElement(
5448
5519
  ScriptCard,
5449
5520
  {
5450
5521
  title: artifact.title,
@@ -5455,8 +5526,8 @@ function ArtifactRenderer({
5455
5526
  }
5456
5527
  )
5457
5528
  );
5458
- case "text":
5459
- return /* @__PURE__ */ React63.createElement(
5529
+ case "TEXT":
5530
+ return /* @__PURE__ */ React64.createElement(
5460
5531
  "div",
5461
5532
  {
5462
5533
  className: cx(
@@ -5466,12 +5537,16 @@ function ArtifactRenderer({
5466
5537
  onClick: onExpand
5467
5538
  },
5468
5539
  expandButton,
5469
- artifact.title && /* @__PURE__ */ React63.createElement("h4", { className: "text-sm font-semibold text-white mb-2" }, artifact.title),
5470
- /* @__PURE__ */ React63.createElement(
5540
+ artifact.title && /* @__PURE__ */ React64.createElement("h4", { className: "text-sm font-semibold text-white mb-2" }, artifact.title),
5541
+ /* @__PURE__ */ React64.createElement(
5471
5542
  MarkdownContent,
5472
5543
  {
5473
- content: artifact.content || "",
5474
- className: "prose-sm prose-invert max-h-48 overflow-y-auto"
5544
+ content: artifact.inlineContent || "",
5545
+ isMarkdown: artifact.mimeType === "text/markdown",
5546
+ className: cx(
5547
+ "prose-sm prose-invert max-h-48 overflow-y-auto",
5548
+ artifact.mimeType === "text/plain" && "whitespace-pre-wrap"
5549
+ )
5475
5550
  }
5476
5551
  )
5477
5552
  );
@@ -5479,7 +5554,7 @@ function ArtifactRenderer({
5479
5554
  return null;
5480
5555
  }
5481
5556
  }
5482
- var ArtifactsPanel = React63.forwardRef(
5557
+ var ArtifactsPanel = React64.forwardRef(
5483
5558
  ({
5484
5559
  artifacts,
5485
5560
  isOpen = false,
@@ -5494,7 +5569,7 @@ var ArtifactsPanel = React63.forwardRef(
5494
5569
  const [expandedArtifact, setExpandedArtifact] = useState14(null);
5495
5570
  const columns = widthPercent && widthPercent > 55 ? 3 : widthPercent && widthPercent > 35 ? 2 : 1;
5496
5571
  if (!isOpen) {
5497
- return /* @__PURE__ */ React63.createElement(
5572
+ return /* @__PURE__ */ React64.createElement(
5498
5573
  "div",
5499
5574
  {
5500
5575
  ref,
@@ -5505,7 +5580,7 @@ var ArtifactsPanel = React63.forwardRef(
5505
5580
  ),
5506
5581
  ...rest
5507
5582
  },
5508
- /* @__PURE__ */ React63.createElement(
5583
+ /* @__PURE__ */ React64.createElement(
5509
5584
  "button",
5510
5585
  {
5511
5586
  onClick: onClose,
@@ -5517,8 +5592,8 @@ var ArtifactsPanel = React63.forwardRef(
5517
5592
  ),
5518
5593
  "aria-label": "Expand artifacts panel"
5519
5594
  },
5520
- /* @__PURE__ */ React63.createElement(LayersIcon, { className: "w-5 h-5" }),
5521
- artifacts.length > 0 && /* @__PURE__ */ React63.createElement(
5595
+ /* @__PURE__ */ React64.createElement(LayersIcon, { className: "w-5 h-5" }),
5596
+ artifacts.length > 0 && /* @__PURE__ */ React64.createElement(
5522
5597
  "span",
5523
5598
  {
5524
5599
  className: "absolute -top-1 -right-1 w-4 h-4 bg-gold text-obsidian text-xs font-medium flex items-center justify-center rounded-full"
@@ -5528,7 +5603,7 @@ var ArtifactsPanel = React63.forwardRef(
5528
5603
  )
5529
5604
  );
5530
5605
  }
5531
- return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
5606
+ return /* @__PURE__ */ React64.createElement(React64.Fragment, null, /* @__PURE__ */ React64.createElement(
5532
5607
  "div",
5533
5608
  {
5534
5609
  ref,
@@ -5542,7 +5617,7 @@ var ArtifactsPanel = React63.forwardRef(
5542
5617
  style: width ? { width } : void 0,
5543
5618
  ...rest
5544
5619
  },
5545
- /* @__PURE__ */ React63.createElement(
5620
+ /* @__PURE__ */ React64.createElement(
5546
5621
  "div",
5547
5622
  {
5548
5623
  onMouseDown: onResizeStart,
@@ -5555,13 +5630,13 @@ var ArtifactsPanel = React63.forwardRef(
5555
5630
  )
5556
5631
  }
5557
5632
  ),
5558
- /* @__PURE__ */ React63.createElement(
5633
+ /* @__PURE__ */ React64.createElement(
5559
5634
  "div",
5560
5635
  {
5561
5636
  className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
5562
5637
  },
5563
- /* @__PURE__ */ React63.createElement("h3", { className: "text-sm font-semibold text-white" }, "Artifacts"),
5564
- /* @__PURE__ */ React63.createElement(
5638
+ /* @__PURE__ */ React64.createElement("h3", { className: "text-sm font-semibold text-white" }, "Artifacts"),
5639
+ /* @__PURE__ */ React64.createElement(
5565
5640
  "button",
5566
5641
  {
5567
5642
  onClick: onClose,
@@ -5572,10 +5647,10 @@ var ArtifactsPanel = React63.forwardRef(
5572
5647
  ),
5573
5648
  "aria-label": "Collapse artifacts panel"
5574
5649
  },
5575
- /* @__PURE__ */ React63.createElement(ChevronRightIcon, { className: "w-5 h-5" })
5650
+ /* @__PURE__ */ React64.createElement(ChevronRightIcon, { className: "w-5 h-5" })
5576
5651
  )
5577
5652
  ),
5578
- /* @__PURE__ */ React63.createElement(
5653
+ /* @__PURE__ */ React64.createElement(
5579
5654
  "div",
5580
5655
  {
5581
5656
  "data-testid": "artifacts-grid",
@@ -5586,7 +5661,7 @@ var ArtifactsPanel = React63.forwardRef(
5586
5661
  columns === 3 && "grid-cols-3"
5587
5662
  )
5588
5663
  },
5589
- artifacts.length === 0 && !isLoading ? /* @__PURE__ */ React63.createElement("p", { className: "text-xs text-silver/60 text-center py-8" }, "No artifacts to display") : artifacts.map((artifact) => /* @__PURE__ */ React63.createElement(
5664
+ artifacts.length === 0 && !isLoading ? /* @__PURE__ */ React64.createElement("p", { className: "text-xs text-silver/60 text-center py-8" }, "No artifacts to display") : artifacts.map((artifact) => /* @__PURE__ */ React64.createElement(
5590
5665
  ArtifactRenderer,
5591
5666
  {
5592
5667
  key: artifact.id,
@@ -5596,7 +5671,7 @@ var ArtifactsPanel = React63.forwardRef(
5596
5671
  }
5597
5672
  ))
5598
5673
  )
5599
- ), expandedArtifact && /* @__PURE__ */ React63.createElement(
5674
+ ), expandedArtifact && /* @__PURE__ */ React64.createElement(
5600
5675
  ArtifactModal,
5601
5676
  {
5602
5677
  artifact: expandedArtifact,
@@ -5606,8 +5681,8 @@ var ArtifactsPanel = React63.forwardRef(
5606
5681
  }
5607
5682
  );
5608
5683
  ArtifactsPanel.displayName = "ArtifactsPanel";
5609
- var ArtifactsPanelToggle = React63.forwardRef(({ artifactCount = 0, onExpand, className, ...rest }, ref) => {
5610
- return /* @__PURE__ */ React63.createElement(
5684
+ var ArtifactsPanelToggle = React64.forwardRef(({ artifactCount = 0, onExpand, className, ...rest }, ref) => {
5685
+ return /* @__PURE__ */ React64.createElement(
5611
5686
  "button",
5612
5687
  {
5613
5688
  ref,
@@ -5624,8 +5699,8 @@ var ArtifactsPanelToggle = React63.forwardRef(({ artifactCount = 0, onExpand, cl
5624
5699
  "aria-label": "Expand artifacts panel",
5625
5700
  ...rest
5626
5701
  },
5627
- /* @__PURE__ */ React63.createElement(LayersIcon, { className: "w-5 h-5" }),
5628
- artifactCount > 0 && /* @__PURE__ */ React63.createElement(
5702
+ /* @__PURE__ */ React64.createElement(LayersIcon, { className: "w-5 h-5" }),
5703
+ artifactCount > 0 && /* @__PURE__ */ React64.createElement(
5629
5704
  "span",
5630
5705
  {
5631
5706
  className: "absolute -top-1 -right-1 w-4 h-4 bg-gold text-obsidian text-xs font-medium flex items-center justify-center rounded-full"
@@ -5637,20 +5712,20 @@ var ArtifactsPanelToggle = React63.forwardRef(({ artifactCount = 0, onExpand, cl
5637
5712
  ArtifactsPanelToggle.displayName = "ArtifactsPanelToggle";
5638
5713
 
5639
5714
  // src/components/chat/TodosList.tsx
5640
- import React64, { useMemo as useMemo2 } from "react";
5715
+ import React65, { useMemo as useMemo2 } from "react";
5641
5716
  function TaskIcon({ status }) {
5642
5717
  switch (status) {
5643
5718
  case "done":
5644
- return /* @__PURE__ */ React64.createElement(CheckSquareIcon, null);
5719
+ return /* @__PURE__ */ React65.createElement(CheckSquareIcon, null);
5645
5720
  case "in_progress":
5646
- return /* @__PURE__ */ React64.createElement(SquareLoaderIcon, null);
5721
+ return /* @__PURE__ */ React65.createElement(SquareLoaderIcon, null);
5647
5722
  case "cancelled":
5648
- return /* @__PURE__ */ React64.createElement(CrossSquareIcon, { variant: "cancelled" });
5723
+ return /* @__PURE__ */ React65.createElement(CrossSquareIcon, { variant: "cancelled" });
5649
5724
  case "failed":
5650
- return /* @__PURE__ */ React64.createElement(CrossSquareIcon, { variant: "failed" });
5725
+ return /* @__PURE__ */ React65.createElement(CrossSquareIcon, { variant: "failed" });
5651
5726
  case "pending":
5652
5727
  default:
5653
- return /* @__PURE__ */ React64.createElement(EmptySquareIcon, null);
5728
+ return /* @__PURE__ */ React65.createElement(EmptySquareIcon, null);
5654
5729
  }
5655
5730
  }
5656
5731
  function sortTasks(tasks) {
@@ -5670,7 +5745,7 @@ function TaskItem({ task, depth = 0 }) {
5670
5745
  const isSubtle = task.status === "cancelled" || task.status === "failed";
5671
5746
  const showSubtasks = (task.status === "in_progress" || task.status === "done") && task.subtasks && task.subtasks.length > 0;
5672
5747
  const sortedSubtasks = showSubtasks ? sortTasks(task.subtasks) : [];
5673
- return /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React64.createElement(
5748
+ return /* @__PURE__ */ React65.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React65.createElement(
5674
5749
  "div",
5675
5750
  {
5676
5751
  className: cx(
@@ -5678,8 +5753,8 @@ function TaskItem({ task, depth = 0 }) {
5678
5753
  depth > 0 && "pl-6"
5679
5754
  )
5680
5755
  },
5681
- /* @__PURE__ */ React64.createElement(TaskIcon, { status: task.status }),
5682
- /* @__PURE__ */ React64.createElement(
5756
+ /* @__PURE__ */ React65.createElement(TaskIcon, { status: task.status }),
5757
+ /* @__PURE__ */ React65.createElement(
5683
5758
  "span",
5684
5759
  {
5685
5760
  className: cx(
@@ -5691,12 +5766,12 @@ function TaskItem({ task, depth = 0 }) {
5691
5766
  )
5692
5767
  },
5693
5768
  task.label,
5694
- task.status === "cancelled" && /* @__PURE__ */ React64.createElement("span", { className: "text-silver/40 ml-1" }, "(cancelled)"),
5695
- task.status === "failed" && /* @__PURE__ */ React64.createElement("span", { className: "text-error/60 ml-1" }, "(failed)")
5769
+ task.status === "cancelled" && /* @__PURE__ */ React65.createElement("span", { className: "text-silver/40 ml-1" }, "(cancelled)"),
5770
+ task.status === "failed" && /* @__PURE__ */ React65.createElement("span", { className: "text-error/60 ml-1" }, "(failed)")
5696
5771
  )
5697
- ), showSubtasks && /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col" }, sortedSubtasks.map((subtask) => /* @__PURE__ */ React64.createElement(TaskItem, { key: subtask.id, task: subtask, depth: depth + 1 }))));
5772
+ ), showSubtasks && /* @__PURE__ */ React65.createElement("div", { className: "flex flex-col" }, sortedSubtasks.map((subtask) => /* @__PURE__ */ React65.createElement(TaskItem, { key: subtask.id, task: subtask, depth: depth + 1 }))));
5698
5773
  }
5699
- var TodosList = React64.forwardRef(
5774
+ var TodosList = React65.forwardRef(
5700
5775
  ({ tasks, title = "Tasks", className, ...rest }, ref) => {
5701
5776
  const sortedTasks = useMemo2(() => sortTasks(tasks), [tasks]);
5702
5777
  const countCompleted = (taskList) => {
@@ -5717,7 +5792,7 @@ var TodosList = React64.forwardRef(
5717
5792
  if (tasks.length === 0) {
5718
5793
  return null;
5719
5794
  }
5720
- return /* @__PURE__ */ React64.createElement(
5795
+ return /* @__PURE__ */ React65.createElement(
5721
5796
  "div",
5722
5797
  {
5723
5798
  ref,
@@ -5729,8 +5804,8 @@ var TodosList = React64.forwardRef(
5729
5804
  style: { maxHeight: "25vh" },
5730
5805
  ...rest
5731
5806
  },
5732
- /* @__PURE__ */ React64.createElement("div", { className: "flex items-center justify-between px-4 py-2 border-b border-ash/40 flex-shrink-0" }, /* @__PURE__ */ React64.createElement("h4", { className: "text-xs font-medium text-white" }, title), /* @__PURE__ */ React64.createElement("span", { className: "text-xs text-silver/60" }, countCompleted(tasks), "/", countTotal(tasks))),
5733
- /* @__PURE__ */ React64.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-2" }, sortedTasks.map((task) => /* @__PURE__ */ React64.createElement(TaskItem, { key: task.id, task })))
5807
+ /* @__PURE__ */ React65.createElement("div", { className: "flex items-center justify-between px-4 py-2 border-b border-ash/40 flex-shrink-0" }, /* @__PURE__ */ React65.createElement("h4", { className: "text-xs font-medium text-white" }, title), /* @__PURE__ */ React65.createElement("span", { className: "text-xs text-silver/60" }, countCompleted(tasks), "/", countTotal(tasks))),
5808
+ /* @__PURE__ */ React65.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-2" }, sortedTasks.map((task) => /* @__PURE__ */ React65.createElement(TaskItem, { key: task.id, task })))
5734
5809
  );
5735
5810
  }
5736
5811
  );
@@ -5827,7 +5902,7 @@ function useResizable({
5827
5902
  }
5828
5903
 
5829
5904
  // src/components/chat/ChatInterface.tsx
5830
- var ChatInterface = React65.forwardRef(
5905
+ var ChatInterface = React66.forwardRef(
5831
5906
  ({
5832
5907
  messages = [],
5833
5908
  conversationTree,
@@ -5904,7 +5979,7 @@ var ChatInterface = React65.forwardRef(
5904
5979
  const hasPendingArtifact = useMemo3(() => {
5905
5980
  return artifacts.some((a) => a.isPending);
5906
5981
  }, [artifacts]);
5907
- React65.useEffect(() => {
5982
+ React66.useEffect(() => {
5908
5983
  if (!isPanelControlled && artifacts.length > 0) {
5909
5984
  setInternalPanelOpen(true);
5910
5985
  }
@@ -5970,14 +6045,14 @@ var ChatInterface = React65.forwardRef(
5970
6045
  }
5971
6046
  }, [isPanelControlled, artifactsPanelOpen, onArtifactsPanelOpenChange]);
5972
6047
  const isEmpty = effectiveMessages.length === 0;
5973
- return /* @__PURE__ */ React65.createElement(
6048
+ return /* @__PURE__ */ React66.createElement(
5974
6049
  "div",
5975
6050
  {
5976
6051
  ref,
5977
6052
  className: cx("flex h-full w-full bg-obsidian overflow-hidden", className),
5978
6053
  ...rest
5979
6054
  },
5980
- /* @__PURE__ */ React65.createElement(
6055
+ /* @__PURE__ */ React66.createElement(
5981
6056
  ConversationSidebar,
5982
6057
  {
5983
6058
  conversations,
@@ -5989,16 +6064,16 @@ var ChatInterface = React65.forwardRef(
5989
6064
  onResizeStart: startResizingSidebar
5990
6065
  }
5991
6066
  ),
5992
- /* @__PURE__ */ React65.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ React65.createElement("div", { className: cx(
6067
+ /* @__PURE__ */ React66.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ React66.createElement("div", { className: cx(
5993
6068
  "flex-1 flex flex-col min-h-0 relative",
5994
6069
  isEmpty ? "justify-center" : "justify-start"
5995
- ) }, /* @__PURE__ */ React65.createElement("div", { className: cx(
6070
+ ) }, /* @__PURE__ */ React66.createElement("div", { className: cx(
5996
6071
  "transition-all duration-500 ease-in-out",
5997
6072
  isEmpty ? "flex-1" : "flex-zero"
5998
- ) }), /* @__PURE__ */ React65.createElement("div", { className: cx(
6073
+ ) }), /* @__PURE__ */ React66.createElement("div", { className: cx(
5999
6074
  "transition-all duration-500 ease-in-out overflow-hidden flex flex-col",
6000
6075
  isEmpty ? "flex-zero opacity-0" : "flex-1 opacity-100"
6001
- ) }, /* @__PURE__ */ React65.createElement(
6076
+ ) }, /* @__PURE__ */ React66.createElement(
6002
6077
  ChatView,
6003
6078
  {
6004
6079
  messages: displayMessages,
@@ -6007,10 +6082,10 @@ var ChatInterface = React65.forwardRef(
6007
6082
  isThinking,
6008
6083
  className: "flex-1"
6009
6084
  }
6010
- )), /* @__PURE__ */ React65.createElement("div", { className: cx(
6085
+ )), /* @__PURE__ */ React66.createElement("div", { className: cx(
6011
6086
  "transition-all duration-500 ease-in-out z-10 w-full flex flex-col items-center",
6012
6087
  isEmpty ? "p-4" : "shrink-0 p-4 border-t border-ash/40 bg-obsidian"
6013
- ) }, isEmpty && /* @__PURE__ */ React65.createElement("div", { className: "mb-8 text-center animate-fade-in duration-500" }, emptyState ? emptyState : /* @__PURE__ */ React65.createElement("h1", { className: "text-4xl md:text-5xl font-heading text-gold mb-2 tracking-tight" }, "Welcome!")), /* @__PURE__ */ React65.createElement(
6088
+ ) }, isEmpty && /* @__PURE__ */ React66.createElement("div", { className: "mb-8 text-center animate-fade-in duration-500" }, emptyState ? emptyState : /* @__PURE__ */ React66.createElement("h1", { className: "text-4xl md:text-5xl font-heading text-gold mb-2 tracking-tight" }, "Welcome!")), /* @__PURE__ */ React66.createElement(
6014
6089
  ChatInput,
6015
6090
  {
6016
6091
  position: isEmpty ? "centered" : "bottom",
@@ -6024,11 +6099,11 @@ var ChatInterface = React65.forwardRef(
6024
6099
  attachments: propsAttachments,
6025
6100
  onAttachmentsChange
6026
6101
  }
6027
- )), /* @__PURE__ */ React65.createElement("div", { className: cx(
6102
+ )), /* @__PURE__ */ React66.createElement("div", { className: cx(
6028
6103
  "transition-all duration-500 ease-in-out",
6029
6104
  isEmpty ? "flex-1" : "flex-zero"
6030
6105
  ) }))),
6031
- /* @__PURE__ */ React65.createElement("div", { className: "h-full flex flex-col shrink-0" }, /* @__PURE__ */ React65.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React65.createElement(
6106
+ /* @__PURE__ */ React66.createElement("div", { className: "h-full flex flex-col shrink-0" }, /* @__PURE__ */ React66.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React66.createElement(
6032
6107
  ArtifactsPanel,
6033
6108
  {
6034
6109
  artifacts,
@@ -6040,7 +6115,7 @@ var ChatInterface = React65.forwardRef(
6040
6115
  onResizeStart: startResizingArtifacts,
6041
6116
  className: "h-full"
6042
6117
  }
6043
- )), tasks.length > 0 && artifactsPanelOpen && /* @__PURE__ */ React65.createElement(
6118
+ )), tasks.length > 0 && artifactsPanelOpen && /* @__PURE__ */ React66.createElement(
6044
6119
  TodosList,
6045
6120
  {
6046
6121
  tasks,
@@ -6054,9 +6129,9 @@ var ChatInterface = React65.forwardRef(
6054
6129
  ChatInterface.displayName = "ChatInterface";
6055
6130
 
6056
6131
  // src/components/chat/MessageActions.tsx
6057
- import React66, { useCallback as useCallback18, useState as useState18 } from "react";
6132
+ import React67, { useCallback as useCallback18, useState as useState18 } from "react";
6058
6133
  import { Check as Check3, Copy, Pencil, RotateCcw, Send as Send2, X as X5 } from "lucide-react";
6059
- var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React66.createElement(
6134
+ var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React67.createElement(
6060
6135
  "button",
6061
6136
  {
6062
6137
  type: "button",
@@ -6072,7 +6147,7 @@ var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @_
6072
6147
  },
6073
6148
  children
6074
6149
  );
6075
- var MessageActions = React66.forwardRef(
6150
+ var MessageActions = React67.forwardRef(
6076
6151
  ({
6077
6152
  variant,
6078
6153
  content,
@@ -6146,19 +6221,19 @@ var MessageActions = React66.forwardRef(
6146
6221
  );
6147
6222
  const isUser = variant === "user";
6148
6223
  if (isUser && isEditing) {
6149
- return /* @__PURE__ */ React66.createElement(
6224
+ return /* @__PURE__ */ React67.createElement(
6150
6225
  "div",
6151
6226
  {
6152
6227
  ref,
6153
6228
  className: cx("mt-2", className),
6154
6229
  ...rest
6155
6230
  },
6156
- /* @__PURE__ */ React66.createElement(
6231
+ /* @__PURE__ */ React67.createElement(
6157
6232
  "div",
6158
6233
  {
6159
6234
  className: "relative bg-charcoal border border-ash/60 focus-within:border-gold/60 focus-within:ring-1 focus-within:ring-gold/20"
6160
6235
  },
6161
- /* @__PURE__ */ React66.createElement(
6236
+ /* @__PURE__ */ React67.createElement(
6162
6237
  "textarea",
6163
6238
  {
6164
6239
  value: editValue,
@@ -6169,15 +6244,15 @@ var MessageActions = React66.forwardRef(
6169
6244
  rows: 2
6170
6245
  }
6171
6246
  ),
6172
- /* @__PURE__ */ React66.createElement("div", { className: "absolute right-2 bottom-2 flex gap-1" }, /* @__PURE__ */ React66.createElement(
6247
+ /* @__PURE__ */ React67.createElement("div", { className: "absolute right-2 bottom-2 flex gap-1" }, /* @__PURE__ */ React67.createElement(
6173
6248
  ActionButton2,
6174
6249
  {
6175
6250
  onClick: handleCancelEdit,
6176
6251
  label: "Cancel edit",
6177
6252
  className: "text-silver/60 hover:text-error"
6178
6253
  },
6179
- /* @__PURE__ */ React66.createElement(X5, { className: "w-4 h-4" })
6180
- ), /* @__PURE__ */ React66.createElement(
6254
+ /* @__PURE__ */ React67.createElement(X5, { className: "w-4 h-4" })
6255
+ ), /* @__PURE__ */ React67.createElement(
6181
6256
  ActionButton2,
6182
6257
  {
6183
6258
  onClick: handleSubmitEdit,
@@ -6185,13 +6260,13 @@ var MessageActions = React66.forwardRef(
6185
6260
  className: "text-silver/60 hover:text-gold",
6186
6261
  disabled: !editValue.trim() || editValue.trim() === content
6187
6262
  },
6188
- /* @__PURE__ */ React66.createElement(Send2, { className: "w-4 h-4" })
6263
+ /* @__PURE__ */ React67.createElement(Send2, { className: "w-4 h-4" })
6189
6264
  ))
6190
6265
  ),
6191
- /* @__PURE__ */ React66.createElement("p", { className: "text-xs text-silver/50 mt-1" }, "Press Enter to submit, Esc to cancel. This will create a new branch.")
6266
+ /* @__PURE__ */ React67.createElement("p", { className: "text-xs text-silver/50 mt-1" }, "Press Enter to submit, Esc to cancel. This will create a new branch.")
6192
6267
  );
6193
6268
  }
6194
- return /* @__PURE__ */ React66.createElement(
6269
+ return /* @__PURE__ */ React67.createElement(
6195
6270
  "div",
6196
6271
  {
6197
6272
  ref,
@@ -6202,18 +6277,18 @@ var MessageActions = React66.forwardRef(
6202
6277
  ),
6203
6278
  ...rest
6204
6279
  },
6205
- /* @__PURE__ */ React66.createElement(ActionButton2, { onClick: handleCopy, label: copied ? "Copied!" : "Copy message" }, copied ? /* @__PURE__ */ React66.createElement(Check3, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ React66.createElement(Copy, { className: "w-3.5 h-3.5" })),
6206
- isUser && onEdit && /* @__PURE__ */ React66.createElement(ActionButton2, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React66.createElement(Pencil, { className: "w-3.5 h-3.5" })),
6207
- !isUser && onRetry && /* @__PURE__ */ React66.createElement(ActionButton2, { onClick: onRetry, label: "Regenerate response" }, /* @__PURE__ */ React66.createElement(RotateCcw, { className: "w-3.5 h-3.5" }))
6280
+ /* @__PURE__ */ React67.createElement(ActionButton2, { onClick: handleCopy, label: copied ? "Copied!" : "Copy message" }, copied ? /* @__PURE__ */ React67.createElement(Check3, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ React67.createElement(Copy, { className: "w-3.5 h-3.5" })),
6281
+ isUser && onEdit && /* @__PURE__ */ React67.createElement(ActionButton2, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React67.createElement(Pencil, { className: "w-3.5 h-3.5" })),
6282
+ !isUser && onRetry && /* @__PURE__ */ React67.createElement(ActionButton2, { onClick: onRetry, label: "Regenerate response" }, /* @__PURE__ */ React67.createElement(RotateCcw, { className: "w-3.5 h-3.5" }))
6208
6283
  );
6209
6284
  }
6210
6285
  );
6211
6286
  MessageActions.displayName = "MessageActions";
6212
6287
 
6213
6288
  // src/components/chat/BranchNavigator.tsx
6214
- import React67 from "react";
6289
+ import React68 from "react";
6215
6290
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3, GitBranch } from "lucide-react";
6216
- var BranchNavigator = React67.forwardRef(
6291
+ var BranchNavigator = React68.forwardRef(
6217
6292
  ({
6218
6293
  current,
6219
6294
  total,
@@ -6232,7 +6307,7 @@ var BranchNavigator = React67.forwardRef(
6232
6307
  const buttonSize = size === "sm" ? "p-0.5" : "p-1";
6233
6308
  const iconSize = size === "sm" ? "w-3 h-3" : "w-4 h-4";
6234
6309
  const textSize = size === "sm" ? "text-xs" : "text-sm";
6235
- return /* @__PURE__ */ React67.createElement(
6310
+ return /* @__PURE__ */ React68.createElement(
6236
6311
  "div",
6237
6312
  {
6238
6313
  ref,
@@ -6244,8 +6319,8 @@ var BranchNavigator = React67.forwardRef(
6244
6319
  "aria-label": "Branch navigation",
6245
6320
  ...rest
6246
6321
  },
6247
- showIcon && /* @__PURE__ */ React67.createElement(GitBranch, { className: cx(iconSize, "mr-0.5 text-silver/50"), "aria-hidden": "true" }),
6248
- /* @__PURE__ */ React67.createElement(
6322
+ showIcon && /* @__PURE__ */ React68.createElement(GitBranch, { className: cx(iconSize, "mr-0.5 text-silver/50"), "aria-hidden": "true" }),
6323
+ /* @__PURE__ */ React68.createElement(
6249
6324
  "button",
6250
6325
  {
6251
6326
  type: "button",
@@ -6258,10 +6333,10 @@ var BranchNavigator = React67.forwardRef(
6258
6333
  ),
6259
6334
  "aria-label": "Previous branch"
6260
6335
  },
6261
- /* @__PURE__ */ React67.createElement(ChevronLeft2, { className: iconSize })
6336
+ /* @__PURE__ */ React68.createElement(ChevronLeft2, { className: iconSize })
6262
6337
  ),
6263
- /* @__PURE__ */ React67.createElement("span", { className: cx(textSize, "tabular-nums min-w-6 text-center") }, current, "/", total),
6264
- /* @__PURE__ */ React67.createElement(
6338
+ /* @__PURE__ */ React68.createElement("span", { className: cx(textSize, "tabular-nums min-w-6 text-center") }, current, "/", total),
6339
+ /* @__PURE__ */ React68.createElement(
6265
6340
  "button",
6266
6341
  {
6267
6342
  type: "button",
@@ -6274,7 +6349,7 @@ var BranchNavigator = React67.forwardRef(
6274
6349
  ),
6275
6350
  "aria-label": "Next branch"
6276
6351
  },
6277
- /* @__PURE__ */ React67.createElement(ChevronRight3, { className: iconSize })
6352
+ /* @__PURE__ */ React68.createElement(ChevronRight3, { className: iconSize })
6278
6353
  )
6279
6354
  );
6280
6355
  }
@@ -6282,16 +6357,16 @@ var BranchNavigator = React67.forwardRef(
6282
6357
  BranchNavigator.displayName = "BranchNavigator";
6283
6358
 
6284
6359
  // src/components/BrandIcon.tsx
6285
- import React68 from "react";
6360
+ import React69 from "react";
6286
6361
  var sizeMap2 = {
6287
6362
  sm: "h-8 w-8 text-sm",
6288
6363
  md: "h-12 w-12 text-base",
6289
6364
  lg: "h-16 w-16 text-lg"
6290
6365
  };
6291
- var BrandIcon = React68.forwardRef(
6366
+ var BrandIcon = React69.forwardRef(
6292
6367
  ({ size = "md", variant = "solid", children, className, ...rest }, ref) => {
6293
6368
  const variantClasses = variant === "solid" ? "bg-gold text-obsidian border-2 border-gold" : "bg-transparent text-gold border-2 border-gold";
6294
- return /* @__PURE__ */ React68.createElement(
6369
+ return /* @__PURE__ */ React69.createElement(
6295
6370
  "div",
6296
6371
  {
6297
6372
  ref,
@@ -6310,17 +6385,17 @@ var BrandIcon = React68.forwardRef(
6310
6385
  BrandIcon.displayName = "BrandIcon";
6311
6386
 
6312
6387
  // src/components/ColorSwatch.tsx
6313
- import React69 from "react";
6314
- var ColorSwatch = React69.forwardRef(
6388
+ import React70 from "react";
6389
+ var ColorSwatch = React70.forwardRef(
6315
6390
  ({ color, label, className, ...rest }, ref) => {
6316
- return /* @__PURE__ */ React69.createElement(
6391
+ return /* @__PURE__ */ React70.createElement(
6317
6392
  "div",
6318
6393
  {
6319
6394
  ref,
6320
6395
  className: cx("flex flex-col items-center gap-2", className),
6321
6396
  ...rest
6322
6397
  },
6323
- /* @__PURE__ */ React69.createElement(
6398
+ /* @__PURE__ */ React70.createElement(
6324
6399
  "div",
6325
6400
  {
6326
6401
  className: "h-16 w-16 border-2 border-ash rounded-none shadow-sm",
@@ -6328,22 +6403,22 @@ var ColorSwatch = React69.forwardRef(
6328
6403
  "aria-label": label || color
6329
6404
  }
6330
6405
  ),
6331
- label && /* @__PURE__ */ React69.createElement("span", { className: "text-xs text-silver font-medium" }, label)
6406
+ label && /* @__PURE__ */ React70.createElement("span", { className: "text-xs text-silver font-medium" }, label)
6332
6407
  );
6333
6408
  }
6334
6409
  );
6335
6410
  ColorSwatch.displayName = "ColorSwatch";
6336
6411
 
6337
6412
  // src/components/SectionHeading.tsx
6338
- import React70 from "react";
6413
+ import React71 from "react";
6339
6414
  var levelStyles = {
6340
6415
  h2: "text-2xl mb-4",
6341
6416
  h3: "text-xl mb-3"
6342
6417
  };
6343
- var SectionHeading = React70.forwardRef(
6418
+ var SectionHeading = React71.forwardRef(
6344
6419
  ({ level = "h2", children, className, ...rest }, ref) => {
6345
6420
  const Component = level;
6346
- return /* @__PURE__ */ React70.createElement(
6421
+ return /* @__PURE__ */ React71.createElement(
6347
6422
  Component,
6348
6423
  {
6349
6424
  ref,
@@ -6435,6 +6510,7 @@ export {
6435
6510
  NavbarItem,
6436
6511
  NavbarLink,
6437
6512
  Pagination,
6513
+ PdfCard,
6438
6514
  PlusIcon,
6439
6515
  Popover,
6440
6516
  Progress,