@tangle-network/agent-app 0.57.2 → 0.57.7

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 (46) hide show
  1. package/dist/{DesignCanvasEditor-JSEDIQWF.js → DesignCanvasEditor-HB7HTZUT.js} +3 -3
  2. package/dist/agent-profiles/d1.d.ts +16 -3
  3. package/dist/agent-profiles/d1.js +37 -10
  4. package/dist/agent-profiles/d1.js.map +1 -1
  5. package/dist/agent-profiles/drizzle.d.ts +36 -0
  6. package/dist/agent-profiles/drizzle.js +6 -1
  7. package/dist/agent-profiles/drizzle.js.map +1 -1
  8. package/dist/agent-profiles/index.d.ts +17 -9
  9. package/dist/agent-profiles/index.js +1 -1
  10. package/dist/assistant/index.js +1 -1
  11. package/dist/chat-routes/index.js +4 -4
  12. package/dist/{chunk-HNVWTWU5.js → chunk-6KZ4ZTLG.js} +2 -2
  13. package/dist/{chunk-APZ4W7HJ.js → chunk-6ZFXAW6J.js} +51 -9
  14. package/dist/chunk-6ZFXAW6J.js.map +1 -0
  15. package/dist/{chunk-2BD7VZKN.js → chunk-GDATBYU4.js} +2 -2
  16. package/dist/{chunk-J5EBGZTD.js → chunk-KELJZHID.js} +2 -2
  17. package/dist/{chunk-M63EUBSH.js → chunk-OP6Y4DWQ.js} +5 -5
  18. package/dist/{chunk-M63EUBSH.js.map → chunk-OP6Y4DWQ.js.map} +1 -1
  19. package/dist/{chunk-OMMK6OLE.js → chunk-RWMGUVW7.js} +7 -3
  20. package/dist/chunk-RWMGUVW7.js.map +1 -0
  21. package/dist/{chunk-IVE3T73T.js → chunk-WQLC6IOD.js} +4 -4
  22. package/dist/{chunk-GPRTXOBI.js → chunk-YPP6OJGC.js} +2 -2
  23. package/dist/{chunk-GDB3YCNS.js → chunk-ZBZA7KSL.js} +28 -28
  24. package/dist/chunk-ZBZA7KSL.js.map +1 -0
  25. package/dist/design-canvas-react/index.js +3 -3
  26. package/dist/design-canvas-react/lazy.js +1 -1
  27. package/dist/preset-cloudflare/index.js +2 -2
  28. package/dist/sandbox/index.js +4 -4
  29. package/dist/stories/chat/fixtures.d.ts +20 -0
  30. package/dist/theme/brand.generated.d.ts +28 -28
  31. package/dist/theme/index.js +1 -1
  32. package/dist/theme/tokens.css +150 -110
  33. package/dist/tools/index.js +4 -4
  34. package/dist/web-react/index.d.ts +14 -2
  35. package/dist/web-react/index.js +1 -1
  36. package/dist/work-product/index.js +2 -2
  37. package/package.json +4 -4
  38. package/dist/chunk-APZ4W7HJ.js.map +0 -1
  39. package/dist/chunk-GDB3YCNS.js.map +0 -1
  40. package/dist/chunk-OMMK6OLE.js.map +0 -1
  41. /package/dist/{DesignCanvasEditor-JSEDIQWF.js.map → DesignCanvasEditor-HB7HTZUT.js.map} +0 -0
  42. /package/dist/{chunk-HNVWTWU5.js.map → chunk-6KZ4ZTLG.js.map} +0 -0
  43. /package/dist/{chunk-2BD7VZKN.js.map → chunk-GDATBYU4.js.map} +0 -0
  44. /package/dist/{chunk-J5EBGZTD.js.map → chunk-KELJZHID.js.map} +0 -0
  45. /package/dist/{chunk-IVE3T73T.js.map → chunk-WQLC6IOD.js.map} +0 -0
  46. /package/dist/{chunk-GPRTXOBI.js.map → chunk-YPP6OJGC.js.map} +0 -0
@@ -51,6 +51,7 @@ import {
51
51
 
52
52
  // src/web-react/index.tsx
53
53
  import { useEffect as useEffect13, useMemo as useMemo7, useRef as useRef13, useState as useState18, memo } from "react";
54
+ import { isViewerMessage, MessageAuthor } from "@tangle-network/ui/chat";
54
55
  import { InlineToolItem, RunRowShell } from "@tangle-network/ui/run";
55
56
 
56
57
  // src/web-react/smooth-text.ts
@@ -7099,12 +7100,19 @@ function AssistantMessageImpl({
7099
7100
  const reasoningOpen = reasoningToggled ?? !hasAnswerText;
7100
7101
  const quiet = chrome === "quiet";
7101
7102
  return /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
7102
- !quiet && /* @__PURE__ */ jsxs17("div", { className: "mb-1 flex items-baseline gap-2 text-xs tabular-nums text-muted-foreground", children: [
7103
- /* @__PURE__ */ jsx20("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
7104
- msg.modelUsed && /* @__PURE__ */ jsx20("span", { className: "font-mono normal-case", children: msg.modelUsed }),
7105
- formatTokensPerSecond(msg) && /* @__PURE__ */ jsx20("span", { children: formatTokensPerSecond(msg) }),
7106
- formatModelCost(msg, models) && /* @__PURE__ */ jsx20("span", { children: formatModelCost(msg, models) })
7107
- ] }),
7103
+ quiet && msg.author && /* @__PURE__ */ jsx20(MessageAuthor, { author: msg.author, className: "mb-1.5" }),
7104
+ !quiet && /* @__PURE__ */ jsxs17(
7105
+ "div",
7106
+ {
7107
+ className: `mb-1 flex ${msg.author ? "items-center" : "items-baseline"} gap-2 text-xs tabular-nums text-muted-foreground`,
7108
+ children: [
7109
+ msg.author ? /* @__PURE__ */ jsx20(MessageAuthor, { author: msg.author }) : /* @__PURE__ */ jsx20("span", { className: "font-semibold uppercase tracking-[0.05em]", children: agentLabel }),
7110
+ msg.modelUsed && /* @__PURE__ */ jsx20("span", { className: "font-mono normal-case", children: msg.modelUsed }),
7111
+ formatTokensPerSecond(msg) && /* @__PURE__ */ jsx20("span", { children: formatTokensPerSecond(msg) }),
7112
+ formatModelCost(msg, models) && /* @__PURE__ */ jsx20("span", { children: formatModelCost(msg, models) })
7113
+ ]
7114
+ }
7115
+ ),
7108
7116
  reasoning && // The canonical run-row grammar (RunRowShell — the same shell the tool
7109
7117
  // rows compose): one family of rows instead of a bespoke disclosure per
7110
7118
  // kind. The shimmer title is a NODE (ui widened `title` to ReactNode for
@@ -7268,6 +7276,29 @@ function StreamErrorRow({ message, onRetry }) {
7268
7276
  )
7269
7277
  ] }) });
7270
7278
  }
7279
+ function OtherPersonMessage({
7280
+ msg,
7281
+ author,
7282
+ quiet,
7283
+ messageClassName,
7284
+ resolveAttachmentUrl
7285
+ }) {
7286
+ const attachments = resolveAttachmentUrl ? attachmentPartsFromMessageParts(msg.parts) : [];
7287
+ return /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
7288
+ /* @__PURE__ */ jsxs17("div", { className: `w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
7289
+ /* @__PURE__ */ jsx20(MessageAuthor, { author, className: "mb-1.5" }),
7290
+ /* @__PURE__ */ jsx20(
7291
+ "div",
7292
+ {
7293
+ className: `w-fit max-w-full rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4 py-2.5 text-[hsl(var(--foreground))] ${quiet ? "" : "rounded-tl-md "}${messageClassName}`,
7294
+ children: /* @__PURE__ */ jsx20("p", { className: "whitespace-pre-wrap", children: msg.content })
7295
+ }
7296
+ ),
7297
+ resolveAttachmentUrl && attachments.length > 0 && /* @__PURE__ */ jsx20("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx20(MessageAttachments, { parts: attachments, resolveFileUrl: resolveAttachmentUrl, justify: "start" }) })
7298
+ ] }),
7299
+ quiet && /* @__PURE__ */ jsx20("div", { "data-testid": "message-meta-lane", className: `${QUIET_META_LANE_CLASS} justify-start`, children: /* @__PURE__ */ jsx20(CopyMessageButton, { text: msg.content }) })
7300
+ ] });
7301
+ }
7271
7302
  function ChatMessages({
7272
7303
  messages,
7273
7304
  messageSize = "default",
@@ -7288,7 +7319,8 @@ function ChatMessages({
7288
7319
  emptyState,
7289
7320
  header,
7290
7321
  resolveAttachmentUrl,
7291
- workProductCards
7322
+ workProductCards,
7323
+ viewerId
7292
7324
  }) {
7293
7325
  const messageClassName = messageSize === "large" ? "agent-app-message-copy text-[17px] leading-[1.6]" : "agent-app-message-copy text-base leading-[1.6]";
7294
7326
  const assistantMessageClassName = `${messageClassName} bg-transparent text-[hsl(var(--foreground))]`;
@@ -7308,7 +7340,17 @@ function ChatMessages({
7308
7340
  return /* @__PURE__ */ jsxs17(Fragment9, { children: [
7309
7341
  header,
7310
7342
  messages.map(
7311
- (msg) => msg.role === "user" ? /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
7343
+ (msg) => msg.role === "user" && msg.author && !isViewerMessage(msg.author, viewerId) ? /* @__PURE__ */ jsx20(
7344
+ OtherPersonMessage,
7345
+ {
7346
+ msg,
7347
+ author: msg.author,
7348
+ quiet,
7349
+ messageClassName,
7350
+ resolveAttachmentUrl
7351
+ },
7352
+ msg.id
7353
+ ) : msg.role === "user" ? /* @__PURE__ */ jsxs17("div", { className: `mx-auto w-full max-w-3xl px-6 ${quiet ? "group pb-1 pt-3" : "py-3"}`, children: [
7312
7354
  /* @__PURE__ */ jsxs17("div", { className: `ml-auto w-fit ${quiet ? "max-w-[72%]" : "max-w-[85%]"}`, children: [
7313
7355
  !quiet && /* @__PURE__ */ jsx20("p", { className: "mb-1 text-right text-xs font-semibold uppercase tracking-[0.05em] text-muted-foreground", children: userLabel }),
7314
7356
  /* @__PURE__ */ jsx20(
@@ -7491,4 +7533,4 @@ export {
7491
7533
  useThinkingSeconds,
7492
7534
  ChatMessages
7493
7535
  };
7494
- //# sourceMappingURL=chunk-APZ4W7HJ.js.map
7536
+ //# sourceMappingURL=chunk-6ZFXAW6J.js.map