@agentiffai/design 1.3.13 → 1.3.15
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/copilotkit/index.cjs +7 -2
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.js +7 -2
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +14 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5460,6 +5460,7 @@ var Input2 = ({
|
|
|
5460
5460
|
};
|
|
5461
5461
|
function parseMarkdown(text) {
|
|
5462
5462
|
if (!text) return [];
|
|
5463
|
+
text = text.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "").replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "").replace(/<!--TOOL_CALL:[\s\S]*$/g, "").replace(/__TOOL_CALL__:[\s\S]*$/g, "");
|
|
5463
5464
|
const elements = [];
|
|
5464
5465
|
let key = 0;
|
|
5465
5466
|
const paragraphs = text.split(/\n\n+/);
|
|
@@ -9228,9 +9229,15 @@ function getSubredditColor(subreddit) {
|
|
|
9228
9229
|
return SUBREDDIT_COLORS[lower] || REDDIT_COLORS.orange;
|
|
9229
9230
|
}
|
|
9230
9231
|
function formatRelativeTime(timestamp) {
|
|
9231
|
-
if (!timestamp) return "unknown";
|
|
9232
|
+
if (!timestamp && timestamp !== 0) return "unknown";
|
|
9232
9233
|
const now = /* @__PURE__ */ new Date();
|
|
9233
|
-
|
|
9234
|
+
let date;
|
|
9235
|
+
const numericVal = typeof timestamp === "number" ? timestamp : Number(timestamp);
|
|
9236
|
+
if (!Number.isNaN(numericVal) && numericVal > 0) {
|
|
9237
|
+
date = new Date(numericVal < 1e12 ? numericVal * 1e3 : numericVal);
|
|
9238
|
+
} else {
|
|
9239
|
+
date = new Date(timestamp);
|
|
9240
|
+
}
|
|
9234
9241
|
if (Number.isNaN(date.getTime())) return "unknown";
|
|
9235
9242
|
const diffMs = now.getTime() - date.getTime();
|
|
9236
9243
|
const diffMins = Math.floor(diffMs / 6e4);
|
|
@@ -9323,10 +9330,7 @@ var RedditOpportunityCard = ({
|
|
|
9323
9330
|
() => getRedditCharPercentage(charCount, REDDIT_LIMITS.comment),
|
|
9324
9331
|
[charCount]
|
|
9325
9332
|
);
|
|
9326
|
-
const charLimitColor = useMemo(
|
|
9327
|
-
() => getRedditCharLimitColor(charPercentage),
|
|
9328
|
-
[charPercentage]
|
|
9329
|
-
);
|
|
9333
|
+
const charLimitColor = useMemo(() => getRedditCharLimitColor(charPercentage), [charPercentage]);
|
|
9330
9334
|
const handleContentChange = (e) => {
|
|
9331
9335
|
onContentChange?.(e.target.value);
|
|
9332
9336
|
};
|
|
@@ -9367,7 +9371,7 @@ var RedditOpportunityCard = ({
|
|
|
9367
9371
|
!condensed && opportunity.postContent && /* @__PURE__ */ jsx(PostContent2, { children: truncateText(opportunity.postContent, 300) }),
|
|
9368
9372
|
/* @__PURE__ */ jsxs(PostAuthor, { children: [
|
|
9369
9373
|
"Posted by u/",
|
|
9370
|
-
opportunity.postAuthor,
|
|
9374
|
+
opportunity.postAuthor || "unknown",
|
|
9371
9375
|
opportunity.flair && /* @__PURE__ */ jsx(PostFlair, { children: opportunity.flair })
|
|
9372
9376
|
] })
|
|
9373
9377
|
] }),
|
|
@@ -9393,20 +9397,14 @@ var RedditOpportunityCard = ({
|
|
|
9393
9397
|
autoFocus: true
|
|
9394
9398
|
}
|
|
9395
9399
|
) : /* @__PURE__ */ jsx(ReplyContent, { children: displayContent }),
|
|
9396
|
-
/* @__PURE__ */ jsxs(StrategyHint, { children: [
|
|
9400
|
+
opportunity.strategy ? /* @__PURE__ */ jsxs(StrategyHint, { children: [
|
|
9397
9401
|
/* @__PURE__ */ jsx(StrategyIconImg, { src: "/assets/icon-set/Icon-lightbulb-fill.svg", alt: "" }),
|
|
9398
9402
|
/* @__PURE__ */ jsxs(StrategyText, { children: [
|
|
9399
9403
|
"Strategy: ",
|
|
9400
9404
|
opportunity.strategy
|
|
9401
9405
|
] })
|
|
9402
|
-
] }),
|
|
9403
|
-
/* @__PURE__ */ jsx(ProgressBarContainer2, { children: /* @__PURE__ */ jsx(ProgressBarTrack2, { children: /* @__PURE__ */ jsx(
|
|
9404
|
-
ProgressBarFill3,
|
|
9405
|
-
{
|
|
9406
|
-
$percentage: Math.min(charPercentage, 100),
|
|
9407
|
-
$color: charLimitColor
|
|
9408
|
-
}
|
|
9409
|
-
) }) })
|
|
9406
|
+
] }) : null,
|
|
9407
|
+
/* @__PURE__ */ jsx(ProgressBarContainer2, { children: /* @__PURE__ */ jsx(ProgressBarTrack2, { children: /* @__PURE__ */ jsx(ProgressBarFill3, { $percentage: Math.min(charPercentage, 100), $color: charLimitColor }) }) })
|
|
9410
9408
|
] })
|
|
9411
9409
|
]
|
|
9412
9410
|
}
|