@ai-matrx/chat 0.7.7 → 0.7.9
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/CHANGELOG.md +12 -0
- package/dist/agents/components/chat/chat-quick-actions.config.d.ts +0 -8
- package/dist/agents/components/chat/chat-quick-actions.config.js +2 -1
- package/dist/agents/components/inputs/smart-input/InputActionButtons.d.ts +2 -2
- package/dist/agents/components/inputs/smart-input/InputActionButtons.js +3 -1
- package/dist/agents/components/inputs/smart-input/SmartAgentInputStacked.js +8 -3
- package/dist/agents/components/messages-display/AgentConversationDisplay.js +1 -1
- package/dist/agents/components/messages-display/assistant/AgentEmptyMessageDisplay.js +4 -4
- package/dist/agents/components/messages-display/assistant/AssistantMessageFooter.js +4 -2
- package/dist/agents/components/messages-display/assistant/AssistantNoAnswer.js +1 -1
- package/dist/agents/components/messages-display/assistant/BreathingOrb.js +1 -1
- package/dist/agents/components/messages-display/assistant/InPlaceAnswerEditor.js +1 -1
- package/dist/agents/components/messages-display/citations/MessageSourcesRow.js +1 -1
- package/dist/agents/components/messages-display/conversation-tools/ConversationFindBar.js +4 -4
- package/dist/agents/components/messages-display/message-options/EditHistoryDialog.js +7 -7
- package/dist/agents/components/messages-display/user/AgentUserMessage.js +4 -4
- package/dist/agents/components/messages-display/user/CollabNoteMessage.js +2 -2
- package/dist/agents/components/messages-display/user/FirstTurnVariables.js +3 -3
- package/dist/agents/components/messages-display/user/PendingSendMessage.js +4 -4
- package/dist/agents/components/messages-display/user/RemarksTranscriptView.js +7 -7
- package/dist/agents/components/messages-display/user/ResourceAttachmentTile.js +9 -9
- package/dist/agents/components/messages-display/user/ResourceEditableToggleSamples.js +4 -4
- package/dist/agents/components/messages-display/user/UserActionBar.js +3 -3
- package/dist/agents/components/messages-display/user/UserMessageAttachmentStyleComparison.js +12 -12
- package/dist/agents/components/messages-display/user/UserMessageChipsDemo.js +19 -19
- package/dist/agents/components/messages-display/user/UserMessageHybridTileSamples.js +22 -22
- package/dist/agents/components/run/AgentRunnerPage.js +4 -4
- package/dist/agents/components/run/AssistantError.js +1 -1
- package/dist/agents/components/run/AssistantWarning.js +1 -1
- package/dist/agents/components/run/GenerationJobCard.js +5 -5
- package/dist/agents/components/run/IncompleteNote.js +1 -1
- package/dist/agents/components/run/RunJobWorkingLine.js +1 -1
- package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
- package/dist/agents/components/shared/AgentHeaderMobile.js +6 -6
- package/dist/agents/components/shared/AgentModeController.js +1 -1
- package/dist/agents/components/shared/AutoInjectionSwitch.js +6 -6
- package/dist/agents/components/shared/DesktopFilterPanel.js +8 -8
- package/dist/agents/components/shared/transcript-layout.d.ts +9 -8
- package/dist/agents/components/shared/transcript-layout.js +2 -2
- package/dist/agents/components/smart/AgentRunner.js +1 -1
- package/dist/agents/components/smart/CreateWithAiTabs.js +1 -1
- package/dist/cx-chat/components/agent/agents.d.ts +0 -5
- package/dist/cx-chat/components/agent/agents.js +4 -3
- package/dist/cx-chat/components/agent/local-agents.d.ts +0 -6
- package/dist/cx-chat/components/agent/local-agents.js +3 -2
- package/dist/host/request-headers.js +3 -1
- package/dist/surfaces/manifests/agent-builder.manifest.d.ts +8 -0
- package/dist/surfaces/manifests/agent-builder.manifest.js +62 -2
- package/dist/tool-call-visualization/components/ArtifactResultBar.js +4 -4
- package/dist/tool-call-visualization/components/ChatResultColumn.d.ts +1 -1
- package/dist/tool-call-visualization/components/ToolCallBatch.js +2 -2
- package/dist/tool-call-visualization/components/ToolCallVisualization.js +5 -5
- package/dist/tool-call-visualization/components/ToolTabBodies.js +12 -12
- package/dist/tool-call-visualization/components/ToolUpdatesOverlay.js +4 -4
- package/dist/tool-call-visualization/configured-rows/ConfiguredToolRow.js +8 -8
- package/dist/tool-call-visualization/configured-rows/CopyToolButton.js +1 -1
- package/dist/tool-call-visualization/configured-rows/ToolProgressView.js +7 -7
- package/dist/tool-call-visualization/configured-rows/field-components.js +6 -6
- package/dist/tool-call-visualization/registry/GenericRenderer.js +4 -4
- package/dist/tool-call-visualization/renderers/_shared-entity/EmptyResultCard.js +1 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/EntityCard.js +5 -5
- package/dist/tool-call-visualization/renderers/_shared-entity/PartPeekPopover.js +2 -2
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolGlyph.js +1 -1
- package/dist/tool-call-visualization/renderers/_shared-entity/ToolResultCard.js +6 -6
- package/dist/tool-call-visualization/renderers/agent-call/AgentCallInline.js +5 -5
- package/dist/tool-call-visualization/renderers/agent-call/CollabCallCard.js +4 -4
- package/dist/tool-call-visualization/renderers/agent-call/ImageGenerationResult.js +1 -1
- package/dist/tool-call-visualization/renderers/ask/AskInline.js +3 -3
- package/dist/tool-call-visualization/renderers/ask-person/AskPersonInline.js +2 -2
- package/dist/tool-call-visualization/renderers/cloud-browser/CloudBrowserRunCard.js +5 -5
- package/dist/tool-call-visualization/renderers/ctx/CtxBatchInline.js +3 -3
- package/dist/tool-call-visualization/renderers/ctx/CtxGetInline.js +2 -2
- package/dist/tool-call-visualization/renderers/ctx/CtxItemCard.js +3 -3
- package/dist/tool-call-visualization/renderers/ctx/CtxPatchInline.js +6 -6
- package/dist/tool-call-visualization/renderers/dictionary/DictEntryList.js +12 -12
- package/dist/tool-call-visualization/renderers/dictionary/DictionaryOverlay.js +5 -5
- package/dist/tool-call-visualization/renderers/fs/FsInline.js +7 -7
- package/dist/tool-call-visualization/renderers/news-api/NewsInline.js +17 -17
- package/dist/tool-call-visualization/renderers/news-api/NewsOverlay.js +12 -12
- package/dist/tool-call-visualization/renderers/random-wheel/RandomWheelInline.js +34 -34
- package/dist/tool-call-visualization/renderers/records/RecordsInline.js +1 -1
- package/dist/tool-call-visualization/renderers/research/ResearchInline.js +10 -10
- package/dist/tool-call-visualization/renderers/research/ResearchOverlay.js +19 -19
- package/dist/tool-call-visualization/renderers/research/SubagentReportBlock.js +11 -11
- package/dist/tool-call-visualization/renderers/scrape/ScrapeInline.js +18 -18
- package/dist/tool-call-visualization/renderers/scrape/ScrapeOverlay.js +17 -17
- package/dist/tool-call-visualization/renderers/search/SearchInline.js +30 -30
- package/dist/tool-call-visualization/renderers/search/SearchOverlay.js +40 -40
- package/dist/tool-call-visualization/renderers/shell/ShellInline.js +3 -3
- package/dist/tool-call-visualization/renderers/skill/SkillInline.js +5 -5
- package/dist/tool-call-visualization/renderers/sql/DbSchemaInline.js +7 -7
- package/dist/tool-call-visualization/renderers/sql/SqlInline.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookGrid.js +4 -4
- package/dist/tool-call-visualization/renderers/workbook/WorkbookInline.js +2 -2
- package/dist/tool-call-visualization/renderers/workbook/WorkbookOverlay.js +7 -7
- package/dist/tool-call-visualization/renderers/working-document/PatchDiffInline.js +3 -3
- package/dist/tool-call-visualization/result-fields/EmptyResult.js +1 -1
- package/dist/tool-call-visualization/result-fields/KeyValueGrid.js +9 -9
- package/dist/tool-call-visualization/result-fields/ResultFile.js +4 -4
- package/dist/tool-call-visualization/result-fields/ResultJson.js +1 -1
- package/dist/tool-call-visualization/result-fields/ResultMedia.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultScalar.js +2 -2
- package/dist/tool-call-visualization/result-fields/ResultTable.js +10 -10
- package/dist/tool-call-visualization/result-fields/ResultValue.js +7 -7
- package/dist/tool-call-visualization/result-fields/ShortId.js +3 -3
- package/dist/tool-call-visualization/result-fields/ToolErrorCard.js +4 -4
- package/dist/tool-call-visualization/result-fields/UrlChips.js +3 -3
- package/dist/tool-call-visualization/surface-write/SurfaceWriteDiff.js +2 -2
- package/dist/tool-call-visualization/surface-write/SurfaceWriteStress.js +1 -1
- package/dist/tool-call-visualization/window-panel/ToolCallWindowPanel.js +9 -9
- package/dist/ui/mandates-storage/mandateStorage.d.ts +420 -0
- package/dist/ui/mandates-storage/shortcutStorage.d.ts +105 -0
- package/dist/ui/projectCreateAiDebug.d.ts +0 -5
- package/dist/ui/projectCreateAiDebug.js +2 -1
- package/package.json +23 -13
|
@@ -7,23 +7,23 @@ import { DictEntryList } from "./DictEntryList.js";
|
|
|
7
7
|
function DictionaryOverlay({ entry }) {
|
|
8
8
|
const { entries, level } = useMemo(() => parseDictionary(entry), [entry]);
|
|
9
9
|
if (!entries.length) {
|
|
10
|
-
return /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-muted-foreground", children: "No dictionary entries to display" });
|
|
11
11
|
}
|
|
12
12
|
return /* @__PURE__ */ jsxs("div", { className: "h-full overflow-y-auto bg-muted/30 p-4", children: [
|
|
13
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center gap-2 text-sm font-medium text-
|
|
14
|
-
/* @__PURE__ */ jsx(BookText, { className: "h-4 w-4 text-
|
|
13
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center gap-2 text-sm font-medium text-foreground", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(BookText, { className: "h-4 w-4 text-primary" }),
|
|
15
15
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
16
16
|
entries.length,
|
|
17
17
|
" ",
|
|
18
18
|
entries.length === 1 ? "term" : "terms"
|
|
19
19
|
] }),
|
|
20
|
-
level ? /* @__PURE__ */ jsxs("span", { className: "text-xs capitalize text-
|
|
20
|
+
level ? /* @__PURE__ */ jsxs("span", { className: "text-xs capitalize text-muted-foreground", children: [
|
|
21
21
|
"\xB7 ",
|
|
22
22
|
level.replace(/_/g, " "),
|
|
23
23
|
" dictionary"
|
|
24
24
|
] }) : null
|
|
25
25
|
] }),
|
|
26
|
-
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: /* @__PURE__ */ jsx(DictEntryList, { entries }) })
|
|
27
27
|
] });
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
@@ -62,9 +62,9 @@ const FsEntryRow = ({
|
|
|
62
62
|
withTopBorder && (indent ? "border-t border-border/20" : "border-t border-border/30")
|
|
63
63
|
),
|
|
64
64
|
children: [
|
|
65
|
-
e.isDir ? /* @__PURE__ */ jsx(Folder, { className: "size-3.5 shrink-0 text-sky-600/70 dark:text-sky-400/70" }) : /* @__PURE__ */ jsx(File, { className: "size-3.5 shrink-0 text-
|
|
66
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[13px] text-
|
|
67
|
-
!e.isDir && e.size !== null && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs tabular-nums text-
|
|
65
|
+
e.isDir ? /* @__PURE__ */ jsx(Folder, { className: "size-3.5 shrink-0 text-sky-600/70 dark:text-sky-400/70" }) : /* @__PURE__ */ jsx(File, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
66
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children: e.name }),
|
|
67
|
+
!e.isDir && e.size !== null && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: formatFileSize(e.size) })
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
);
|
|
@@ -157,16 +157,16 @@ const FsBatchCard = ({ listings, className }) => {
|
|
|
157
157
|
),
|
|
158
158
|
children: [
|
|
159
159
|
/* @__PURE__ */ jsx(Folder, { className: "size-3.5 shrink-0 text-sky-600/70 dark:text-sky-400/70" }),
|
|
160
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate text-[13px] text-
|
|
160
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate text-[13px] text-foreground", children: [
|
|
161
161
|
basename(l.path),
|
|
162
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: l.path })
|
|
163
163
|
] }),
|
|
164
|
-
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-
|
|
164
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: countsLabel(l.entries) }),
|
|
165
165
|
/* @__PURE__ */ jsx(
|
|
166
166
|
ChevronRight,
|
|
167
167
|
{
|
|
168
168
|
className: cn(
|
|
169
|
-
"size-3 shrink-0 text-
|
|
169
|
+
"size-3 shrink-0 text-muted-foreground transition-transform",
|
|
170
170
|
open[i] && "rotate-90"
|
|
171
171
|
)
|
|
172
172
|
}
|
|
@@ -47,21 +47,21 @@ const NewsInline = ({
|
|
|
47
47
|
const data = useMemo(() => parseNewsData(entry), [entry]);
|
|
48
48
|
if (data.isLoading) {
|
|
49
49
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3 animate-in fade-in", children: [
|
|
50
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-
|
|
51
|
-
/* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-
|
|
50
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-primary" }),
|
|
52
52
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
53
53
|
"Fetching news",
|
|
54
54
|
data.query ? ` for "${data.query}"` : "",
|
|
55
55
|
"..."
|
|
56
56
|
] })
|
|
57
57
|
] }),
|
|
58
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-
|
|
59
|
-
/* @__PURE__ */ jsx("div", { className: "w-full aspect-video bg-
|
|
58
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card border border-border overflow-hidden", children: [
|
|
59
|
+
/* @__PURE__ */ jsx("div", { className: "w-full aspect-video bg-muted animate-pulse" }),
|
|
60
60
|
/* @__PURE__ */ jsxs("div", { className: "p-3 space-y-2", children: [
|
|
61
|
-
/* @__PURE__ */ jsx("div", { className: "h-3 bg-
|
|
62
|
-
/* @__PURE__ */ jsx("div", { className: "h-4 bg-
|
|
63
|
-
/* @__PURE__ */ jsx("div", { className: "h-4 bg-
|
|
64
|
-
/* @__PURE__ */ jsx("div", { className: "h-3 bg-
|
|
61
|
+
/* @__PURE__ */ jsx("div", { className: "h-3 bg-muted animate-pulse rounded w-24" }),
|
|
62
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 bg-muted animate-pulse rounded w-full" }),
|
|
63
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 bg-muted animate-pulse rounded w-3/4" }),
|
|
64
|
+
/* @__PURE__ */ jsx("div", { className: "h-3 bg-muted animate-pulse rounded w-20" })
|
|
65
65
|
] })
|
|
66
66
|
] }, i)) })
|
|
67
67
|
] });
|
|
@@ -74,7 +74,7 @@ const NewsInline = ({
|
|
|
74
74
|
] });
|
|
75
75
|
}
|
|
76
76
|
if (data.isComplete && data.articles.length === 0) {
|
|
77
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-
|
|
77
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground py-3", children: [
|
|
78
78
|
/* @__PURE__ */ jsx(Newspaper, { className: "w-4 h-4 flex-shrink-0" }),
|
|
79
79
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
80
80
|
"No articles found",
|
|
@@ -92,14 +92,14 @@ const NewsInline = ({
|
|
|
92
92
|
href: article.url,
|
|
93
93
|
target: "_blank",
|
|
94
94
|
rel: "noopener noreferrer",
|
|
95
|
-
className: "group block bg-
|
|
95
|
+
className: "group block bg-card rounded-lg border border-border overflow-hidden hover:border-primary/30 hover:shadow-md transition-all duration-200 animate-in fade-in zoom-in-95",
|
|
96
96
|
style: {
|
|
97
97
|
animationDelay: `${index * 80}ms`,
|
|
98
98
|
animationDuration: "300ms",
|
|
99
99
|
animationFillMode: "backwards"
|
|
100
100
|
},
|
|
101
101
|
children: [
|
|
102
|
-
article.url_to_image ? /* @__PURE__ */ jsxs("div", { className: "relative w-full aspect-video bg-
|
|
102
|
+
article.url_to_image ? /* @__PURE__ */ jsxs("div", { className: "relative w-full aspect-video bg-muted overflow-hidden", children: [
|
|
103
103
|
/* @__PURE__ */ jsx(
|
|
104
104
|
"img",
|
|
105
105
|
{
|
|
@@ -112,15 +112,15 @@ const NewsInline = ({
|
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
114
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
115
|
-
] }) : /* @__PURE__ */ jsx("div", { className: "w-full aspect-video bg-
|
|
115
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "w-full aspect-video bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx(Newspaper, { className: "w-10 h-10 text-muted-foreground/30" }) }),
|
|
116
116
|
/* @__PURE__ */ jsxs("div", { className: "p-3 space-y-1.5", children: [
|
|
117
117
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
118
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-
|
|
119
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 text-
|
|
118
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-primary truncate", children: article.source?.name }),
|
|
119
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 text-muted-foreground flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
120
120
|
] }),
|
|
121
|
-
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-
|
|
122
|
-
article.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-
|
|
123
|
-
article.published_at && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-
|
|
121
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground line-clamp-2 group-hover:text-primary transition-colors leading-snug", children: article.title }),
|
|
122
|
+
article.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground line-clamp-2", children: article.description }),
|
|
123
|
+
article.published_at && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
124
124
|
/* @__PURE__ */ jsx(Calendar, { className: "w-3 h-3 flex-shrink-0" }),
|
|
125
125
|
/* @__PURE__ */ jsx("span", { children: new Date(article.published_at).toLocaleDateString("en-US", {
|
|
126
126
|
month: "short",
|
|
@@ -51,7 +51,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
51
51
|
] });
|
|
52
52
|
}
|
|
53
53
|
if (allArticles.length === 0) {
|
|
54
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 gap-3 text-
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-16 gap-3 text-muted-foreground", children: [
|
|
55
55
|
/* @__PURE__ */ jsx(Newspaper, { className: "w-10 h-10 opacity-40" }),
|
|
56
56
|
/* @__PURE__ */ jsxs("p", { className: "text-sm", children: [
|
|
57
57
|
"No news data available",
|
|
@@ -61,8 +61,8 @@ const NewsOverlay = ({ entry }) => {
|
|
|
61
61
|
] });
|
|
62
62
|
}
|
|
63
63
|
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full overflow-y-auto bg-background p-4 space-y-4", children: [
|
|
64
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 bg-
|
|
65
|
-
/* @__PURE__ */ jsx(Filter, { className: "w-4 h-4 text-
|
|
64
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 bg-card rounded-lg p-3 border border-border", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Filter, { className: "w-4 h-4 text-muted-foreground flex-shrink-0" }),
|
|
66
66
|
/* @__PURE__ */ jsxs(
|
|
67
67
|
Button,
|
|
68
68
|
{
|
|
@@ -95,7 +95,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
95
95
|
);
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
98
|
-
/* @__PURE__ */ jsx(SortAsc, { className: "w-4 h-4 text-
|
|
98
|
+
/* @__PURE__ */ jsx(SortAsc, { className: "w-4 h-4 text-muted-foreground flex-shrink-0" }),
|
|
99
99
|
/* @__PURE__ */ jsx(
|
|
100
100
|
Button,
|
|
101
101
|
{
|
|
@@ -116,7 +116,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
116
116
|
)
|
|
117
117
|
] })
|
|
118
118
|
] }),
|
|
119
|
-
query && /* @__PURE__ */ jsxs("p", { className: "text-xs text-
|
|
119
|
+
query && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground px-1", children: [
|
|
120
120
|
totalResults,
|
|
121
121
|
" result",
|
|
122
122
|
totalResults !== 1 ? "s" : "",
|
|
@@ -130,7 +130,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
130
130
|
/* @__PURE__ */ jsx("div", { className: "space-y-3", children: filteredArticles.map((article, index) => /* @__PURE__ */ jsx(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
|
-
className: "bg-
|
|
133
|
+
className: "bg-card rounded-lg border border-border overflow-hidden hover:border-primary/30 hover:shadow-md transition-all duration-200",
|
|
134
134
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row gap-0 md:gap-4", children: [
|
|
135
135
|
article.url_to_image && /* @__PURE__ */ jsx("div", { className: "w-full md:w-56 flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
136
136
|
"img",
|
|
@@ -146,7 +146,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
146
146
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 p-4 space-y-2", children: [
|
|
147
147
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 flex-wrap", children: [
|
|
148
148
|
/* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: article.source.name }),
|
|
149
|
-
article.published_at && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-
|
|
149
|
+
article.published_at && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
150
150
|
/* @__PURE__ */ jsx(Calendar, { className: "w-3 h-3" }),
|
|
151
151
|
/* @__PURE__ */ jsx("span", { children: new Date(article.published_at).toLocaleDateString("en-US", {
|
|
152
152
|
month: "long",
|
|
@@ -164,25 +164,25 @@ const NewsOverlay = ({ entry }) => {
|
|
|
164
164
|
target: "_blank",
|
|
165
165
|
rel: "noopener noreferrer",
|
|
166
166
|
className: "group block",
|
|
167
|
-
children: /* @__PURE__ */ jsxs("h2", { className: "text-base font-semibold text-
|
|
167
|
+
children: /* @__PURE__ */ jsxs("h2", { className: "text-base font-semibold text-foreground group-hover:text-primary transition-colors flex items-start gap-2", children: [
|
|
168
168
|
/* @__PURE__ */ jsx("span", { children: article.title }),
|
|
169
169
|
/* @__PURE__ */ jsx(ExternalLink, { className: "w-4 h-4 flex-shrink-0 mt-0.5 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
170
170
|
] })
|
|
171
171
|
}
|
|
172
172
|
),
|
|
173
|
-
article.author && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-
|
|
173
|
+
article.author && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
174
174
|
/* @__PURE__ */ jsx(User, { className: "w-3 h-3" }),
|
|
175
175
|
/* @__PURE__ */ jsx("span", { children: article.author })
|
|
176
176
|
] }),
|
|
177
177
|
article.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80", children: article.description }),
|
|
178
|
-
article.content && /* @__PURE__ */ jsx("p", { className: "text-sm text-
|
|
178
|
+
article.content && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground line-clamp-3", children: article.content }),
|
|
179
179
|
/* @__PURE__ */ jsxs(
|
|
180
180
|
"a",
|
|
181
181
|
{
|
|
182
182
|
href: article.url,
|
|
183
183
|
target: "_blank",
|
|
184
184
|
rel: "noopener noreferrer",
|
|
185
|
-
className: "inline-flex items-center gap-1 text-sm font-medium text-
|
|
185
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:text-primary/80 transition-colors",
|
|
186
186
|
children: [
|
|
187
187
|
"Read full article",
|
|
188
188
|
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3" })
|
|
@@ -194,7 +194,7 @@ const NewsOverlay = ({ entry }) => {
|
|
|
194
194
|
},
|
|
195
195
|
index
|
|
196
196
|
)) }),
|
|
197
|
-
filteredArticles.length === 0 && allArticles.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3 text-
|
|
197
|
+
filteredArticles.length === 0 && allArticles.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3 text-muted-foreground", children: [
|
|
198
198
|
/* @__PURE__ */ jsx(Newspaper, { className: "w-10 h-10 opacity-40" }),
|
|
199
199
|
/* @__PURE__ */ jsx("p", { className: "text-sm", children: "No articles match the selected source filter." }),
|
|
200
200
|
/* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: () => setSelectedSource("all"), children: "Clear filter" })
|
|
@@ -447,10 +447,10 @@ const ListResult = ({ result }) => {
|
|
|
447
447
|
const hasValue = text.trim().length > 0;
|
|
448
448
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
449
449
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
450
|
-
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-
|
|
451
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-
|
|
450
|
+
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
451
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-foreground break-words", children: result.chosen.label || "(no label)" })
|
|
452
452
|
] }),
|
|
453
|
-
hasValue && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-
|
|
453
|
+
hasValue && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-muted/30 p-3", children: isJson ? /* @__PURE__ */ jsx("pre", { className: "text-xs text-foreground/90 whitespace-pre-wrap break-words font-mono overflow-x-auto", children: text }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-foreground/90 break-words", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "ai", content: text, showCopyButton: false }) }) })
|
|
454
454
|
] });
|
|
455
455
|
};
|
|
456
456
|
const WebResult = ({ result }) => {
|
|
@@ -458,12 +458,12 @@ const WebResult = ({ result }) => {
|
|
|
458
458
|
const sources = result.sources ?? [];
|
|
459
459
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
460
460
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
461
|
-
/* @__PURE__ */ jsx(Globe, { className: "w-4 h-4 text-
|
|
462
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-
|
|
461
|
+
/* @__PURE__ */ jsx(Globe, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
462
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-foreground break-words", children: result.chosen.label || result.seed || "(no seed)" })
|
|
463
463
|
] }),
|
|
464
|
-
text.trim().length > 0 && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-
|
|
464
|
+
text.trim().length > 0 && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-card p-3 text-sm text-foreground/90 break-words max-h-72 overflow-y-auto", children: /* @__PURE__ */ jsx(BasicMarkdownContent, { imagePolicy: "other", content: text, showCopyButton: false }) }),
|
|
465
465
|
sources.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
466
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs font-medium text-
|
|
466
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs font-medium text-muted-foreground", children: [
|
|
467
467
|
sources.length,
|
|
468
468
|
" ",
|
|
469
469
|
sources.length === 1 ? "source" : "sources"
|
|
@@ -475,11 +475,11 @@ const WebResult = ({ result }) => {
|
|
|
475
475
|
target: "_blank",
|
|
476
476
|
rel: "noopener noreferrer",
|
|
477
477
|
onClick: (e) => e.stopPropagation(),
|
|
478
|
-
className: "flex items-center gap-2 p-2 rounded-md border border-
|
|
478
|
+
className: "flex items-center gap-2 p-2 rounded-md border border-border bg-card hover:border-primary/30 transition-colors group",
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */ jsx(Globe, { className: "w-3.5 h-3.5 text-
|
|
481
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 text-xs text-
|
|
482
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 text-
|
|
480
|
+
/* @__PURE__ */ jsx(Globe, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
|
|
481
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 text-xs text-foreground truncate group-hover:text-primary", children: src.title || src.url }),
|
|
482
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 text-muted-foreground flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
483
483
|
]
|
|
484
484
|
},
|
|
485
485
|
`${src.url}-${i}`
|
|
@@ -493,10 +493,10 @@ const ImageResult = ({ result }) => {
|
|
|
493
493
|
const [imgFailed, setImgFailed] = useState(false);
|
|
494
494
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
495
495
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
496
|
-
/* @__PURE__ */ jsx(ImageIcon, { className: "w-4 h-4 text-
|
|
497
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-
|
|
496
|
+
/* @__PURE__ */ jsx(ImageIcon, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
497
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-foreground break-words", children: result.chosen.label || result.seed || "(no keyword)" })
|
|
498
498
|
] }),
|
|
499
|
-
image && !imgFailed ? /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-
|
|
499
|
+
image && !imgFailed ? /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-border bg-muted/30", children: /* @__PURE__ */ jsx(
|
|
500
500
|
"img",
|
|
501
501
|
{
|
|
502
502
|
src: image.url,
|
|
@@ -504,7 +504,7 @@ const ImageResult = ({ result }) => {
|
|
|
504
504
|
className: "w-full max-h-80 object-cover",
|
|
505
505
|
onError: () => setImgFailed(true)
|
|
506
506
|
}
|
|
507
|
-
) }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-
|
|
507
|
+
) }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-muted/30 p-4 text-sm text-muted-foreground", children: [
|
|
508
508
|
/* @__PURE__ */ jsx(ImageIcon, { className: "w-4 h-4" }),
|
|
509
509
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
510
510
|
imgFailed ? "Image failed to load." : "No image returned.",
|
|
@@ -512,7 +512,7 @@ const ImageResult = ({ result }) => {
|
|
|
512
512
|
] })
|
|
513
513
|
] }),
|
|
514
514
|
caption && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 break-words", children: caption }),
|
|
515
|
-
image?.photographer_name && /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-1 text-xs text-
|
|
515
|
+
image?.photographer_name && /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
516
516
|
/* @__PURE__ */ jsx(Camera, { className: "w-3 h-3 flex-shrink-0" }),
|
|
517
517
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
518
518
|
"Photo by",
|
|
@@ -524,7 +524,7 @@ const ImageResult = ({ result }) => {
|
|
|
524
524
|
target: "_blank",
|
|
525
525
|
rel: "noopener noreferrer",
|
|
526
526
|
onClick: (e) => e.stopPropagation(),
|
|
527
|
-
className: "text-
|
|
527
|
+
className: "text-primary hover:underline",
|
|
528
528
|
children: image.photographer_name
|
|
529
529
|
}
|
|
530
530
|
) : /* @__PURE__ */ jsx("span", { className: "text-foreground/80", children: image.photographer_name }),
|
|
@@ -538,7 +538,7 @@ const ImageResult = ({ result }) => {
|
|
|
538
538
|
target: "_blank",
|
|
539
539
|
rel: "noopener noreferrer",
|
|
540
540
|
onClick: (e) => e.stopPropagation(),
|
|
541
|
-
className: "text-
|
|
541
|
+
className: "text-primary hover:underline",
|
|
542
542
|
children: "Unsplash"
|
|
543
543
|
}
|
|
544
544
|
)
|
|
@@ -613,16 +613,16 @@ const RandomWheelInline = ({
|
|
|
613
613
|
"Wheel spin failed",
|
|
614
614
|
/* @__PURE__ */ jsx(ErrorAlchemyMenu, {})
|
|
615
615
|
] }),
|
|
616
|
-
entry.errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-
|
|
616
|
+
entry.errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground break-words mt-0.5", children: entry.errorMessage })
|
|
617
617
|
] })
|
|
618
618
|
] });
|
|
619
619
|
}
|
|
620
620
|
if (!wheel) {
|
|
621
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-
|
|
622
|
-
/* @__PURE__ */ jsx(Dices, { className: "w-5 h-5 text-
|
|
621
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-border bg-card p-4", children: [
|
|
622
|
+
/* @__PURE__ */ jsx(Dices, { className: "w-5 h-5 text-primary animate-pulse flex-shrink-0" }),
|
|
623
623
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
624
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-
|
|
625
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 h-2 w-2/3 rounded-full bg-
|
|
624
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: "Spinning up\u2026" }),
|
|
625
|
+
/* @__PURE__ */ jsx("div", { className: "mt-2 h-2 w-2/3 rounded-full bg-muted animate-pulse" })
|
|
626
626
|
] })
|
|
627
627
|
] });
|
|
628
628
|
}
|
|
@@ -632,8 +632,8 @@ const RandomWheelInline = ({
|
|
|
632
632
|
const seedLabel = wheel.candidates[wheel.winnerIndex] ?? result?.seed ?? "";
|
|
633
633
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
634
634
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
635
|
-
/* @__PURE__ */ jsx(ModeIcon, { className: "w-4 h-4 text-
|
|
636
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-
|
|
635
|
+
/* @__PURE__ */ jsx(ModeIcon, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
636
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
637
637
|
/* @__PURE__ */ jsx("span", { className: "ml-auto inline-flex items-center gap-1 rounded-full bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: modeLabel })
|
|
638
638
|
] }),
|
|
639
639
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
|
|
@@ -651,15 +651,15 @@ const RandomWheelInline = ({
|
|
|
651
651
|
onUserPick: handleUserPick
|
|
652
652
|
}
|
|
653
653
|
),
|
|
654
|
-
settled && wheel.candidates.length > 1 && !isPersisted && /* @__PURE__ */ jsx("p", { className: "text-xs text-
|
|
655
|
-
userPickLabel && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-
|
|
656
|
-
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-
|
|
657
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
654
|
+
settled && wheel.candidates.length > 1 && !isPersisted && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground text-center", children: "Drag to explore options \u2014 your pick goes to the agent." }),
|
|
655
|
+
userPickLabel && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2 text-sm", children: [
|
|
656
|
+
/* @__PURE__ */ jsx(Trophy, { className: "w-4 h-4 text-primary flex-shrink-0" }),
|
|
657
|
+
/* @__PURE__ */ jsxs("span", { className: "text-foreground break-words", children: [
|
|
658
658
|
"Your pick: ",
|
|
659
659
|
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: userPickLabel })
|
|
660
660
|
] })
|
|
661
661
|
] }),
|
|
662
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-
|
|
662
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
663
663
|
wheel.candidates.length,
|
|
664
664
|
" ",
|
|
665
665
|
wheel.candidates.length === 1 ? "option" : "options",
|
|
@@ -668,19 +668,19 @@ const RandomWheelInline = ({
|
|
|
668
668
|
wheel.poolSize
|
|
669
669
|
] })
|
|
670
670
|
] }),
|
|
671
|
-
!settled && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs font-medium text-
|
|
671
|
+
!settled && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs font-medium text-primary", children: [
|
|
672
672
|
/* @__PURE__ */ jsx(RefreshCw, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
673
673
|
/* @__PURE__ */ jsx("span", { children: "Spinning\u2026" })
|
|
674
674
|
] })
|
|
675
675
|
] }),
|
|
676
|
-
awaitingFetch && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-
|
|
677
|
-
/* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-
|
|
676
|
+
awaitingFetch && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-muted/20 p-3 text-sm text-muted-foreground", children: [
|
|
677
|
+
/* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin text-primary flex-shrink-0" }),
|
|
678
678
|
/* @__PURE__ */ jsxs("span", { className: "break-words", children: [
|
|
679
679
|
"Fetching fresh ",
|
|
680
680
|
mode === "image" ? "image" : "content",
|
|
681
681
|
" for",
|
|
682
682
|
" ",
|
|
683
|
-
/* @__PURE__ */ jsxs("span", { className: "font-medium text-
|
|
683
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium text-foreground", children: [
|
|
684
684
|
"\u201C",
|
|
685
685
|
seedLabel,
|
|
686
686
|
"\u201D"
|
|
@@ -34,7 +34,7 @@ function RecordsInline({ entry }) {
|
|
|
34
34
|
if (!result) return null;
|
|
35
35
|
const sentence = sentenceFor(result);
|
|
36
36
|
if (!sentence) return null;
|
|
37
|
-
return /* @__PURE__ */ jsx("p", { className: "text-xs leading-relaxed text-
|
|
37
|
+
return /* @__PURE__ */ jsx("p", { className: "text-xs leading-relaxed text-muted-foreground", children: sentence });
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
40
|
RecordsInline
|
|
@@ -23,7 +23,7 @@ import { Button } from "@ai-matrx/design-system/controls";
|
|
|
23
23
|
const Favicon = ({ url, className }) => {
|
|
24
24
|
const [failed, setFailed] = React.useState(false);
|
|
25
25
|
const src = url ? getFaviconUrl(url) : "";
|
|
26
|
-
if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: `text-
|
|
26
|
+
if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: `text-muted-foreground ${className ?? ""}` });
|
|
27
27
|
return (
|
|
28
28
|
// eslint-disable-next-line @next/next/no-img-element -- favicon service, not owned media
|
|
29
29
|
/* @__PURE__ */ jsx("img", { src, alt: "", className: `rounded-sm ${className ?? ""}`, onError: () => setFailed(true) })
|
|
@@ -33,10 +33,10 @@ const StatChip = ({
|
|
|
33
33
|
icon,
|
|
34
34
|
value,
|
|
35
35
|
label
|
|
36
|
-
}) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-md border border-
|
|
37
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
38
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tabular-nums text-
|
|
39
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-
|
|
36
|
+
}) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-md border border-border bg-card px-2.5 py-1.5", children: [
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: icon }),
|
|
38
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tabular-nums text-foreground", children: value }),
|
|
39
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: label })
|
|
40
40
|
] });
|
|
41
41
|
const SourceRow = ({ source, index }) => /* @__PURE__ */ jsxs(
|
|
42
42
|
"a",
|
|
@@ -49,8 +49,8 @@ const SourceRow = ({ source, index }) => /* @__PURE__ */ jsxs(
|
|
|
49
49
|
style: { animationDelay: `${Math.min(index, 10) * 30}ms`, animationDuration: "220ms", animationFillMode: "backwards" },
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ jsx(Favicon, { url: source.url, className: "h-4 w-4 flex-shrink-0" }),
|
|
52
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-
|
|
53
|
-
/* @__PURE__ */ jsx("span", { className: "hidden flex-shrink-0 truncate text-xs text-
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground group-hover:text-primary", children: source.title }),
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: "hidden flex-shrink-0 truncate text-xs text-muted-foreground sm:inline", children: source.domain })
|
|
54
54
|
]
|
|
55
55
|
}
|
|
56
56
|
);
|
|
@@ -156,15 +156,15 @@ const ResearchInline = ({
|
|
|
156
156
|
parsed.domains.slice(0, 8).map((d) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "gap-1.5 font-normal", children: [
|
|
157
157
|
/* @__PURE__ */ jsx(Favicon, { url: `https://${d.domain}`, className: "h-3 w-3" }),
|
|
158
158
|
/* @__PURE__ */ jsx("span", { className: "max-w-[140px] truncate", children: d.domain }),
|
|
159
|
-
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-
|
|
159
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums text-muted-foreground", children: d.count })
|
|
160
160
|
] }, d.domain)),
|
|
161
|
-
parsed.domains.length > 8 && /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "font-normal text-
|
|
161
|
+
parsed.domains.length > 8 && /* @__PURE__ */ jsxs(Badge, { variant: "outline", className: "font-normal text-muted-foreground", children: [
|
|
162
162
|
"+",
|
|
163
163
|
parsed.domains.length - 8,
|
|
164
164
|
" more"
|
|
165
165
|
] })
|
|
166
166
|
] }),
|
|
167
|
-
topSources.length > 0 && /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50 rounded-md border border-
|
|
167
|
+
topSources.length > 0 && /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50 rounded-md border border-border p-1", children: topSources.map((s, i) => /* @__PURE__ */ jsx(SourceRow, { index: i, source: s }, `${s.url}-${i}`)) }),
|
|
168
168
|
onOpenOverlay && (parsed.sources.length > 0 || parsed.reads.length > 0) && /* @__PURE__ */ jsxs(Button, { variant: "outline", iconEnd: /* @__PURE__ */ jsx(ArrowRight, {}), onClick: (e) => {
|
|
169
169
|
e.stopPropagation();
|
|
170
170
|
onOpenOverlay(`tool-group-${toolGroupId}`);
|
|
@@ -26,13 +26,13 @@ import { RichDocument } from "@ai-matrx/rich-content/rich-document/RichDocument"
|
|
|
26
26
|
const Favicon = ({ url, className }) => {
|
|
27
27
|
const [failed, setFailed] = useState(false);
|
|
28
28
|
const src = url ? getFaviconUrl(url) : "";
|
|
29
|
-
if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: cn("text-
|
|
29
|
+
if (failed || !src) return /* @__PURE__ */ jsx(Globe, { className: cn("text-muted-foreground", className) });
|
|
30
30
|
return (
|
|
31
31
|
// eslint-disable-next-line @next/next/no-img-element -- favicon service, not owned media
|
|
32
32
|
/* @__PURE__ */ jsx("img", { src, alt: "", className: cn("rounded-sm", className), onError: () => setFailed(true) })
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
|
-
const EmptyState = ({ icon, message }) => /* @__PURE__ */ jsx("div", { className: "flex h-64 items-center justify-center text-
|
|
35
|
+
const EmptyState = ({ icon, message }) => /* @__PURE__ */ jsx("div", { className: "flex h-64 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
36
36
|
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 opacity-40", children: icon }),
|
|
37
37
|
/* @__PURE__ */ jsx("p", { className: "text-sm", children: message })
|
|
38
38
|
] }) });
|
|
@@ -44,10 +44,10 @@ const ResearchReportTab = ({ entry }) => {
|
|
|
44
44
|
if (!parsed.report) {
|
|
45
45
|
return /* @__PURE__ */ jsx(EmptyState, { icon: /* @__PURE__ */ jsx(FileText, { className: "h-12 w-12" }), message: "No curated report available" });
|
|
46
46
|
}
|
|
47
|
-
return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-
|
|
48
|
-
parsed.queries.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-b border-
|
|
49
|
-
/* @__PURE__ */ jsx("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-
|
|
50
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-
|
|
47
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [
|
|
48
|
+
parsed.queries.length > 0 && /* @__PURE__ */ jsxs("div", { className: "border-b border-border bg-muted/40 px-5 py-3", children: [
|
|
49
|
+
/* @__PURE__ */ jsx("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Queries" }),
|
|
50
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-foreground", children: parsed.queries.join(" \xB7 ") })
|
|
51
51
|
] }),
|
|
52
52
|
/* @__PURE__ */ jsx("div", { className: "p-5", children: /* @__PURE__ */ jsx(
|
|
53
53
|
RichDocument,
|
|
@@ -72,8 +72,8 @@ const ReadCard = ({
|
|
|
72
72
|
}) => {
|
|
73
73
|
const [expanded, setExpanded] = useState(false);
|
|
74
74
|
const isLong = read.text.length > 500;
|
|
75
|
-
return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-
|
|
76
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-
|
|
75
|
+
return /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-border bg-muted/40 px-4 py-2.5", children: [
|
|
77
77
|
/* @__PURE__ */ jsx(Favicon, { url: read.url, className: "h-4 w-4 flex-shrink-0" }),
|
|
78
78
|
/* @__PURE__ */ jsx(
|
|
79
79
|
"a",
|
|
@@ -81,7 +81,7 @@ const ReadCard = ({
|
|
|
81
81
|
href: read.url || void 0,
|
|
82
82
|
target: "_blank",
|
|
83
83
|
rel: "noopener noreferrer",
|
|
84
|
-
className: "truncate text-xs font-medium text-
|
|
84
|
+
className: "truncate text-xs font-medium text-primary hover:underline",
|
|
85
85
|
title: read.url,
|
|
86
86
|
children: getDomain(read.url)
|
|
87
87
|
}
|
|
@@ -95,7 +95,7 @@ const ReadCard = ({
|
|
|
95
95
|
href: read.url || void 0,
|
|
96
96
|
target: "_blank",
|
|
97
97
|
rel: "noopener noreferrer",
|
|
98
|
-
className: "block text-base font-semibold text-
|
|
98
|
+
className: "block text-base font-semibold text-foreground hover:text-primary",
|
|
99
99
|
children: read.title || getDomain(read.url)
|
|
100
100
|
}
|
|
101
101
|
),
|
|
@@ -120,15 +120,15 @@ const RankedSource = ({ source, rank }) => /* @__PURE__ */ jsxs(
|
|
|
120
120
|
rel: "noopener noreferrer",
|
|
121
121
|
className: "group flex items-start gap-3 px-3 py-2 transition-colors hover:bg-muted/40",
|
|
122
122
|
children: [
|
|
123
|
-
/* @__PURE__ */ jsx("span", { className: "mt-0.5 w-6 flex-shrink-0 text-right text-xs tabular-nums text-
|
|
123
|
+
/* @__PURE__ */ jsx("span", { className: "mt-0.5 w-6 flex-shrink-0 text-right text-xs tabular-nums text-muted-foreground", children: rank }),
|
|
124
124
|
/* @__PURE__ */ jsx(Favicon, { url: source.url, className: "mt-0.5 h-4 w-4 flex-shrink-0" }),
|
|
125
125
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
126
126
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
127
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-
|
|
128
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-
|
|
127
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-foreground group-hover:text-primary", children: source.title }),
|
|
128
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 flex-shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" })
|
|
129
129
|
] }),
|
|
130
130
|
/* @__PURE__ */ jsx("div", { className: "truncate text-xs text-primary/80", children: source.domain }),
|
|
131
|
-
source.snippet && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs leading-relaxed text-
|
|
131
|
+
source.snippet && /* @__PURE__ */ jsx("p", { className: "mt-1 line-clamp-2 text-xs leading-relaxed text-muted-foreground", children: source.snippet })
|
|
132
132
|
] })
|
|
133
133
|
]
|
|
134
134
|
}
|
|
@@ -150,10 +150,10 @@ ${read.text}`, "default", { toast: false })) {
|
|
|
150
150
|
}
|
|
151
151
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
152
152
|
parsed.reads.length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-3", children: parsed.reads.map((r, i) => /* @__PURE__ */ jsx(ReadCard, { read: r, index: i, copied, onCopy: handleCopy }, `${r.url}-${i}`)) }),
|
|
153
|
-
parsed.sources.length > 0 && /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-md border border-
|
|
154
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-
|
|
155
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-
|
|
156
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs tabular-nums text-
|
|
153
|
+
parsed.sources.length > 0 && /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-md border border-border", children: [
|
|
154
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-border bg-muted/40 px-3 py-2", children: [
|
|
155
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: "All sources" }),
|
|
156
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
|
|
157
157
|
parsed.sources.length,
|
|
158
158
|
" ",
|
|
159
159
|
parsed.sources.length === 1 ? "source" : "sources"
|
|
@@ -230,7 +230,7 @@ const ResearchFullTextTab = ({ entry }) => {
|
|
|
230
230
|
if (!fullText.trim()) {
|
|
231
231
|
return /* @__PURE__ */ jsx(EmptyState, { icon: /* @__PURE__ */ jsx(BookOpen, { className: "h-12 w-12" }), message: "No research data available" });
|
|
232
232
|
}
|
|
233
|
-
return /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-lg border border-
|
|
233
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-lg border border-border bg-card", children: [
|
|
234
234
|
/* @__PURE__ */ jsx(Button, { variant: "outline", icon: copied ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {}), glyphTone: copied ? "success" : void 0, onClick: handleCopyAll, "aria-label": copied ? "Copied" : "Copy all", title: copied ? "Copied" : "Copy all", className: "absolute right-2 top-2 z-10" }),
|
|
235
235
|
/* @__PURE__ */ jsx("div", { className: "p-5", children: /* @__PURE__ */ jsx(RichContent, { level: "full", imagePolicy: "ai", source: fullText, hideCopyButton: true, className: "text-sm" }) })
|
|
236
236
|
] });
|