diff --git a/extension/app/src/components/conversation/AgentMessage.tsx b/extension/app/src/components/conversation/AgentMessage.tsx index 596a280405c5..8eae148a54c5 100644 --- a/extension/app/src/components/conversation/AgentMessage.tsx +++ b/extension/app/src/components/conversation/AgentMessage.tsx @@ -23,25 +23,12 @@ import { removeNulls, } from "@dust-tt/client"; import type { ConversationMessageSizeType } from "@dust-tt/sparkle"; +import { DocumentTextStrokeIcon } from "@dust-tt/sparkle"; import { - ConfluenceLogo, - DocumentTextIcon, - DriveLogo, - GithubLogo, - ImageIcon, - IntercomLogo, - MicrosoftLogo, - NotionLogo, - SlackLogo, - SnowflakeLogo, - ZendeskLogo, -} from "@dust-tt/sparkle"; -import { - CitationNew, - CitationNewIcons, - CitationNewIndex, - CitationNewTitle, - Icon, + Citation, + CitationIcons, + CitationIndex, + CitationTitle, } from "@dust-tt/sparkle"; import { ArrowPathIcon, @@ -59,12 +46,13 @@ import { } from "@dust-tt/sparkle"; import { AgentMessageActions } from "@extension/components/conversation/AgentMessageActions"; import { GenerationContext } from "@extension/components/conversation/GenerationContextProvider"; -import type { MarkdownCitation } from "@extension/components/conversation/MarkdownCitation"; import { CitationsContext, CiteBlock, getCiteDirective, } from "@extension/components/markdown/CiteBlock"; +import type { MarkdownCitation } from "@extension/components/markdown/MarkdownCitation"; +import { citationIconMap } from "@extension/components/markdown/MarkdownCitation"; import { MentionBlock, mentionDirective, @@ -86,20 +74,6 @@ import type { ReactMarkdownProps } from "react-markdown/lib/complex-types"; import type { PluggableList } from "react-markdown/lib/react-markdown"; import { visit } from "unist-util-visit"; -const typeIcons = { - confluence: ConfluenceLogo, - document: DocumentTextIcon, - github: GithubLogo, - google_drive: DriveLogo, - intercom: IntercomLogo, - microsoft: MicrosoftLogo, - zendesk: ZendeskLogo, - notion: NotionLogo, - slack: SlackLogo, - image: ImageIcon, - snowflake: SnowflakeLogo, -}; - export function visualizationDirective() { return (tree: any) => { visit(tree, ["containerDirective"], (node) => { @@ -117,10 +91,12 @@ export function visualizationDirective() { export function makeDocumentCitation( document: RetrievalDocumentPublicType ): MarkdownCitation { + const IconComponent = + citationIconMap[getProviderFromRetrievedDocument(document)]; return { href: document.sourceUrl ?? undefined, title: getTitleFromRetrievedDocument(document), - type: getProviderFromRetrievedDocument(document), + icon: , }; } @@ -131,7 +107,7 @@ export function makeWebsearchResultsCitation( description: result.snippet, href: result.link, title: result.title, - type: "document" as const, + icon: , }; } @@ -651,13 +627,13 @@ function getCitations({ activeReferences.sort((a, b) => a.index - b.index); return activeReferences.map(({ document, index }) => { return ( - - - {index} - - - {document.title} - + + + {index} + {document.icon} + + {document.title} + ); }); } diff --git a/extension/app/src/components/conversation/MarkdownCitation.tsx b/extension/app/src/components/conversation/MarkdownCitation.tsx deleted file mode 100644 index d62f2d03ed7c..000000000000 --- a/extension/app/src/components/conversation/MarkdownCitation.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import type { Citation } from "@dust-tt/sparkle"; - -export interface MarkdownCitation { - description?: string; - href?: string; - title: string; - type: Exclude["type"], undefined>; -} diff --git a/extension/app/src/components/conversation/MessageItem.tsx b/extension/app/src/components/conversation/MessageItem.tsx index 4681b10084a8..1ac71055d580 100644 --- a/extension/app/src/components/conversation/MessageItem.tsx +++ b/extension/app/src/components/conversation/MessageItem.tsx @@ -4,15 +4,14 @@ import type { } from "@dust-tt/client"; import { Avatar, - CitationNew, - CitationNewIcons, - CitationNewImage, - CitationNewTitle, + Citation, + CitationIcons, + CitationImage, + CitationTitle, DocumentTextIcon, Icon, SlackLogo, } from "@dust-tt/sparkle"; -import type { CitationType } from "@dust-tt/sparkle/dist/esm/components/Citation"; import { AgentMessage } from "@extension/components/conversation/AgentMessage"; import { UserMessage } from "@extension/components/conversation/UserMessage"; import type { MessageWithContentFragmentsType } from "@extension/lib/conversation"; @@ -45,9 +44,9 @@ const MessageItem = React.forwardRef( case "user_message": const citations = message.contenFragments ? message.contenFragments.map((contentFragment) => { - const citationType: CitationType = [ - "dust-application/slack", - ].includes(contentFragment.contentType) + const citationType = ["dust-application/slack"].includes( + contentFragment.contentType + ) ? "slack" : "document"; @@ -55,34 +54,34 @@ const MessageItem = React.forwardRef( citationType === "slack" ? SlackLogo : DocumentTextIcon; return ( -
{contentFragment.context.profilePictureUrl && ( - + - + )} {contentFragment.sourceUrl ? ( <> - - + + - + ) : ( - + - + )}
- {contentFragment.title} -
+ {contentFragment.title} + ); }) : undefined; diff --git a/extension/app/src/components/input_bar/InputBarCitations.tsx b/extension/app/src/components/input_bar/InputBarCitations.tsx index d46ada9d0622..db8d44e902c1 100644 --- a/extension/app/src/components/input_bar/InputBarCitations.tsx +++ b/extension/app/src/components/input_bar/InputBarCitations.tsx @@ -1,9 +1,9 @@ import { - CitationNew, - CitationNewClose, - CitationNewIcons, - CitationNewImage, - CitationNewTitle, + Citation, + CitationClose, + CitationIcons, + CitationImage, + CitationTitle, DocumentIcon, Icon, ImageIcon, @@ -27,7 +27,7 @@ export function InputBarCitations({ nodes.push( <> - {isImage ? ( <> - - + + - + ) : ( - + - + )} - {blob.id} - {blob.id} + fileUploaderService.removeFile(blob.id)} /> - + ); } @@ -62,7 +62,7 @@ export function InputBarCitations({ } return ( -
+
{processContentFragments()}
); diff --git a/extension/app/src/components/markdown/MarkdownCitation.tsx b/extension/app/src/components/markdown/MarkdownCitation.tsx index 7912285dda6a..59b3811dec0e 100644 --- a/extension/app/src/components/markdown/MarkdownCitation.tsx +++ b/extension/app/src/components/markdown/MarkdownCitation.tsx @@ -1,8 +1,51 @@ -import type { CitationType } from "@dust-tt/sparkle"; +import { + ConfluenceLogo, + DocumentTextStrokeIcon, + DriveLogo, + GithubLogo, + ImageStrokeIcon, + IntercomLogo, + MicrosoftLogo, + NotionLogo, + SlackLogo, + SnowflakeLogo, + ZendeskLogo, +} from "@dust-tt/sparkle"; +import type { SVGProps } from "react"; + +export type CitationIconType = + | "confluence" + | "document" + | "github" + | "google_drive" + | "intercom" + | "microsoft" + | "zendesk" + | "notion" + | "slack" + | "image" + | "snowflake"; + +export const citationIconMap: Record< + CitationIconType, + (props: SVGProps) => React.JSX.Element +> = { + confluence: ConfluenceLogo, + document: DocumentTextStrokeIcon, + github: GithubLogo, + google_drive: DriveLogo, + intercom: IntercomLogo, + microsoft: MicrosoftLogo, + zendesk: ZendeskLogo, + notion: NotionLogo, + slack: SlackLogo, + image: ImageStrokeIcon, + snowflake: SnowflakeLogo, +}; export interface MarkdownCitation { description?: string; href?: string; title: string; - type: CitationType; + icon: React.JSX.Element; } diff --git a/extension/package-lock.json b/extension/package-lock.json index 32dfc9f3fd91..297493d9a02c 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@dust-tt/client": "^1.0.15", - "@dust-tt/sparkle": "^0.2.332", + "@dust-tt/sparkle": "^0.2.343-rc5", "@tailwindcss/forms": "^0.5.9", "@tiptap/extension-character-count": "^2.9.1", "@tiptap/extension-mention": "^2.9.1", @@ -258,9 +258,9 @@ } }, "node_modules/@dust-tt/sparkle": { - "version": "0.2.332", - "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.2.332.tgz", - "integrity": "sha512-6m26Q51zpY/Z2CdVuDvGzIT6z57McAgRU+bLcFt7uzCmGo/8INv37LnZ/2+whzeFjGORsjj5xb9PDn2GIZhlXQ==", + "version": "0.2.344", + "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.2.344.tgz", + "integrity": "sha512-dmvR6FPLCv+ipiaPO6DXR8VZFbauHrzBVLyGkj9StaMt50IhELTZPzBPHDkKz0fW++ttweQP+mxSnv2vU4nAng==", "dependencies": { "@emoji-mart/data": "^1.1.2", "@emoji-mart/react": "^1.1.1", @@ -277,7 +277,6 @@ "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-tabs": "^1.1.1", "@radix-ui/react-tooltip": "^1.1.3", - "@tailwindcss/container-queries": "^0.1.1", "@tanstack/react-table": "^8.13.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", @@ -1952,14 +1951,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@tailwindcss/container-queries": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz", - "integrity": "sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==", - "peerDependencies": { - "tailwindcss": ">=3.2.0" - } - }, "node_modules/@tailwindcss/forms": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.9.tgz", diff --git a/extension/package.json b/extension/package.json index 0dc973628185..988839d6cb8c 100644 --- a/extension/package.json +++ b/extension/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@dust-tt/client": "^1.0.15", - "@dust-tt/sparkle": "^0.2.332", + "@dust-tt/sparkle": "^0.2.343-rc5", "@tailwindcss/forms": "^0.5.9", "@tiptap/extension-character-count": "^2.9.1", "@tiptap/extension-mention": "^2.9.1", diff --git a/front/components/DataSourceViewDocumentModal.tsx b/front/components/DataSourceViewDocumentModal.tsx index 8d2e16339530..6554c40b9a32 100644 --- a/front/components/DataSourceViewDocumentModal.tsx +++ b/front/components/DataSourceViewDocumentModal.tsx @@ -69,7 +69,7 @@ export default function DataSourceViewDocumentModal({ )} {!isDocumentLoading && document && ( <> -
+
Content of the document:
diff --git a/front/components/actions/ActionDetailsWrapper.tsx b/front/components/actions/ActionDetailsWrapper.tsx
index f8a2f0e38f9f..6c1b705a5f6a 100644
--- a/front/components/actions/ActionDetailsWrapper.tsx
+++ b/front/components/actions/ActionDetailsWrapper.tsx
@@ -17,11 +17,9 @@ export function ActionDetailsWrapper({
   return (
     
       
-        
- - - {actionName} - +
+ + {actionName}
{children} diff --git a/front/components/actions/browse/BrowseActionDetails.tsx b/front/components/actions/browse/BrowseActionDetails.tsx index 076ad29b9f70..73752ffa6eba 100644 --- a/front/components/actions/browse/BrowseActionDetails.tsx +++ b/front/components/actions/browse/BrowseActionDetails.tsx @@ -23,18 +23,22 @@ export function BrowseActionDetails({ >
-
+
{action.output?.results.map((r, idx) => (
- + Requested url : {r.requestedUrl} {r.responseCode === "200" ? ( - + @@ -44,7 +48,7 @@ export function BrowseActionDetails({ ) : ( - + Cannot fetch content, error code : {r.responseCode}. {r.errorMessage} diff --git a/front/components/actions/conversation/include_file/IncludeFileActionDetails.tsx b/front/components/actions/conversation/include_file/IncludeFileActionDetails.tsx index 2fd438f8a278..09a0adaab3f5 100644 --- a/front/components/actions/conversation/include_file/IncludeFileActionDetails.tsx +++ b/front/components/actions/conversation/include_file/IncludeFileActionDetails.tsx @@ -17,7 +17,7 @@ export function ConversationIncludeFileActionDetails({ visual={MagnifyingGlassIcon} >
-

+

{fileTitle || "(no file name available)"}

diff --git a/front/components/actions/dust_app_run/DustAppRunActionDetails.tsx b/front/components/actions/dust_app_run/DustAppRunActionDetails.tsx index e1938b71ca15..37075dbebfbc 100644 --- a/front/components/actions/dust_app_run/DustAppRunActionDetails.tsx +++ b/front/components/actions/dust_app_run/DustAppRunActionDetails.tsx @@ -23,16 +23,18 @@ export function DustAppRunActionDetails({ visual={CommandLineIcon} >
-
- Parameters -
+
+ Parameters +
- Results + + Results + diff --git a/front/components/actions/process/ProcessActionDetails.tsx b/front/components/actions/process/ProcessActionDetails.tsx index 3251a405e856..a11ebad0b6fb 100644 --- a/front/components/actions/process/ProcessActionDetails.tsx +++ b/front/components/actions/process/ProcessActionDetails.tsx @@ -21,13 +21,15 @@ export function ProcessActionDetails({ >
- Query + Query
- Results + + Results + @@ -55,7 +57,7 @@ function ProcessActionQuery({ action }: { action: ProcessActionType }) { return (
-

+

{makeQueryDescription(action)}

{overflow && ( diff --git a/front/components/actions/retrieval/RetrievalActionDetails.tsx b/front/components/actions/retrieval/RetrievalActionDetails.tsx index 5037ecab2687..175397c49c67 100644 --- a/front/components/actions/retrieval/RetrievalActionDetails.tsx +++ b/front/components/actions/retrieval/RetrievalActionDetails.tsx @@ -28,17 +28,17 @@ export function RetrievalActionDetails({ >
- + {isIncludeAction ? "Timeframe" : "Query"} -
+
- Results + Results @@ -69,7 +69,7 @@ function RetrievalActionQuery({ action }: { action: RetrievalActionType }) { return (
-

+

{makeQueryDescription(action)}

{tooManyChunks && ( diff --git a/front/components/actions/tables_query/TablesQueryActionDetails.tsx b/front/components/actions/tables_query/TablesQueryActionDetails.tsx index 3e793b221f33..9f74e59e0f06 100644 --- a/front/components/actions/tables_query/TablesQueryActionDetails.tsx +++ b/front/components/actions/tables_query/TablesQueryActionDetails.tsx @@ -1,8 +1,10 @@ import { Citation, + CitationIcons, CitationTitle, Collapsible, ContentMessage, + Icon, InformationCircleIcon, TableIcon, useSendNotification, @@ -47,8 +49,8 @@ function TablesQuery({ action }: { action: TablesQueryActionType }) { return (
- Query -
+ Query +
- Reasoning -
+ Reasoning +
- Error + + Error +
{output.error}
); @@ -142,16 +146,23 @@ function QueryTablesResults({ return (
- Results -
- - {title} - -
+ Results + + + + + {title} + - Preview + + Preview +
diff --git a/front/components/actions/websearch/WebsearchActionDetails.tsx b/front/components/actions/websearch/WebsearchActionDetails.tsx index 7dfc76ec933e..eb4195e1558d 100644 --- a/front/components/actions/websearch/WebsearchActionDetails.tsx +++ b/front/components/actions/websearch/WebsearchActionDetails.tsx @@ -32,15 +32,15 @@ export function WebsearchActionDetails({ >
- Query -
+ Query +
{action.query}
- Results + Results diff --git a/front/components/app/blocks/Database.tsx b/front/components/app/blocks/Database.tsx index c3bb29e86d5c..c77a23483116 100644 --- a/front/components/app/blocks/Database.tsx +++ b/front/components/app/blocks/Database.tsx @@ -153,7 +153,7 @@ export function TablesManager({
{!viewTab && ( -
+
No assistants found. Try adjusting your search criteria.
)} {viewTab && ( -
+ {agentsByTab[viewTab].map((agent) => ( - handleAssistantClick(agent)} - actionElement={ -
+ )} ); diff --git a/front/components/assistant/AssistantDetails.tsx b/front/components/assistant/AssistantDetails.tsx index b853a294cf53..e3341e652e20 100644 --- a/front/components/assistant/AssistantDetails.tsx +++ b/front/components/assistant/AssistantDetails.tsx @@ -66,7 +66,7 @@ export function AssistantDetails({
20 ? "text-md" : "text-lg" )} >{`@${agentConfiguration.name}`}
@@ -100,7 +100,7 @@ export function AssistantDetails({ )} -
+
{agentConfiguration.description}
@{assistant.name} diff --git a/front/components/assistant/conversation/AgentSuggestion.tsx b/front/components/assistant/conversation/AgentSuggestion.tsx index 0eaf5dd41630..4925c07529ed 100644 --- a/front/components/assistant/conversation/AgentSuggestion.tsx +++ b/front/components/assistant/conversation/AgentSuggestion.tsx @@ -1,6 +1,8 @@ import { - AssistantPreview, + AssistantCard, + AssistantCardMore, Button, + CardGrid, RobotIcon, Spinner, useSendNotification, @@ -90,10 +92,10 @@ export function AgentSuggestion({ return ( <>
-
- +
+

Which Assistant would you like to chat with? - +

) : ( -
+ {topAgents.map((agent, id) => ( - handleSelectSuggestion(agent)} - onActionClick={() => showAssistantDetails(agent)} + variant="secondary" + action={ + showAssistantDetails(agent)} + /> + } /> ))} -
+ )}
diff --git a/front/components/assistant/conversation/ConversationError.tsx b/front/components/assistant/conversation/ConversationError.tsx index 748c6229be88..19c95fd0e1d4 100644 --- a/front/components/assistant/conversation/ConversationError.tsx +++ b/front/components/assistant/conversation/ConversationError.tsx @@ -73,7 +73,7 @@ function ErrorDisplay({ icon, message, title }: ErrorDisplayProps) { return (
{icon && } -

+

{title}

diff --git a/front/components/assistant/conversation/MessageItem.tsx b/front/components/assistant/conversation/MessageItem.tsx index 9939c85372cb..c32f665226dd 100644 --- a/front/components/assistant/conversation/MessageItem.tsx +++ b/front/components/assistant/conversation/MessageItem.tsx @@ -170,7 +170,6 @@ const MessageItem = React.forwardRef(

-
-
- -
- {message.mentions.length === 0 && isLastMessage && ( - - )} -
+ + {message.mentions.length === 0 && isLastMessage && ( + + )} ); } diff --git a/front/components/assistant/conversation/actions/AgentMessageActionsDrawer.tsx b/front/components/assistant/conversation/actions/AgentMessageActionsDrawer.tsx index 95009f878bdf..1b20b88e4621 100644 --- a/front/components/assistant/conversation/actions/AgentMessageActionsDrawer.tsx +++ b/front/components/assistant/conversation/actions/AgentMessageActionsDrawer.tsx @@ -47,7 +47,7 @@ export function AgentMessageActionsDrawer({ className="flex flex-col gap-4 pb-4 duration-1000 animate-in fade-in" key={step} > -

+

Step {step}

{actions.map((action, idx) => { diff --git a/front/components/assistant/conversation/input_bar/InputBar.tsx b/front/components/assistant/conversation/input_bar/InputBar.tsx index d907016a3925..e7781e30f63f 100644 --- a/front/components/assistant/conversation/input_bar/InputBar.tsx +++ b/front/components/assistant/conversation/input_bar/InputBar.tsx @@ -277,7 +277,7 @@ export function AssistantInputBar({ >
fileUploaderService.removeFile(blob.id)} + /> + } > {isImage ? ( <> @@ -43,9 +48,6 @@ export function InputBarCitations({ )} {blob.id} - fileUploaderService.removeFile(blob.id)} - /> ); @@ -59,7 +61,7 @@ export function InputBarCitations({ } return ( -
+
{processContentFragments()}
); diff --git a/front/components/assistant/conversation/input_bar/InputBarContainer.tsx b/front/components/assistant/conversation/input_bar/InputBarContainer.tsx index 67ff00540be5..47b80937f7ac 100644 --- a/front/components/assistant/conversation/input_bar/InputBarContainer.tsx +++ b/front/components/assistant/conversation/input_bar/InputBarContainer.tsx @@ -99,7 +99,7 @@ const InputBarContainer = ({ const contentEditableClasses = classNames( "inline-block w-full", - "border-0 pr-1 pl-2 sm:pl-0 outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 py-3.5", + "border-0 px-2 outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 sm:py-3.5", "whitespace-pre-wrap font-normal" ); diff --git a/front/components/assistant/conversation/input_bar/editor/MentionList.tsx b/front/components/assistant/conversation/input_bar/editor/MentionList.tsx index 30da5d7826ef..9879b81a2eac 100644 --- a/front/components/assistant/conversation/input_bar/editor/MentionList.tsx +++ b/front/components/assistant/conversation/input_bar/editor/MentionList.tsx @@ -110,7 +110,7 @@ export const MentionList = forwardRef(function MentionList(
)} -
+ {configurableActions.map((a) => ( -
- { - setAction({ - type: "edit", - action: a, - }); - }} - deleteAction={() => { - deleteAction(a.name); - }} - isLegacyConfig={isLegacyConfig} - /> -
+ { + setAction({ + type: "edit", + action: a, + }); + }} + deleteAction={() => { + deleteAction(a.name); + }} + isLegacyConfig={isLegacyConfig} + /> ))} -
+
{ + deleteAction(); + e.stopPropagation(); + }} + /> + } >
-
- +
+
{actionDisplayName(action)}
- { - deleteAction(); - e.stopPropagation(); - }} - />
{isLegacyConfig ? (
@@ -660,20 +659,16 @@ function ActionCard({ />
) : ( - <> +
{actionError ? ( -
- {actionError} -
+ {actionError} ) : ( -
- {action.description} -
+ <>{action.description} )} - +
)}
- + ); } @@ -1125,7 +1120,7 @@ function Capabilities({ onCheckedChange={enabled ? onDisable : onEnable} />
-
+
{name}
{description}
diff --git a/front/components/assistant_builder/AssistantBuilderDustAppModal.tsx b/front/components/assistant_builder/AssistantBuilderDustAppModal.tsx index 63218d3a7aac..37300393b6cf 100644 --- a/front/components/assistant_builder/AssistantBuilderDustAppModal.tsx +++ b/front/components/assistant_builder/AssistantBuilderDustAppModal.tsx @@ -132,7 +132,7 @@ function PickDustApp({ className={classNames( disabled ? "s-text-element-500" - : "s-text-element-900" + : "s-text-foreground" )} > {app.name + (disabled ? " (No description)" : "")} diff --git a/front/components/assistant_builder/AssistantTemplateModal.tsx b/front/components/assistant_builder/AssistantTemplateModal.tsx index 82fd3a05bb37..747376d2737c 100644 --- a/front/components/assistant_builder/AssistantTemplateModal.tsx +++ b/front/components/assistant_builder/AssistantTemplateModal.tsx @@ -56,7 +56,7 @@ export function AssistantTemplateModal({
- + @{handle}
-
+
Selected Data Sources
diff --git a/front/components/assistant_builder/InstructionScreen.tsx b/front/components/assistant_builder/InstructionScreen.tsx index 84ed110251cf..b56febe01c0d 100644 --- a/front/components/assistant_builder/InstructionScreen.tsx +++ b/front/components/assistant_builder/InstructionScreen.tsx @@ -382,7 +382,7 @@ const InstructionsCharacterCount = ({ = maxCount ? "text-red-500" : "text-slate-500" + count >= maxCount ? "text-red-500" : "text-muted-foreground" )} > {count} / {maxCount} characters diff --git a/front/components/assistant_builder/SlackIntegration.tsx b/front/components/assistant_builder/SlackIntegration.tsx index adc224c1925a..c27291efaecc 100644 --- a/front/components/assistant_builder/SlackIntegration.tsx +++ b/front/components/assistant_builder/SlackIntegration.tsx @@ -177,7 +177,7 @@ export function SlackAssistantDefaultManager({
-
+
Set this assistant as the default assistant on one or several of your Slack channels. It will answer by default when the{" "} {assistantHandle} Slack bot diff --git a/front/components/assistant_builder/TemplateGrid.tsx b/front/components/assistant_builder/TemplateGrid.tsx index 0668fcc924dc..cdc43b39df53 100644 --- a/front/components/assistant_builder/TemplateGrid.tsx +++ b/front/components/assistant_builder/TemplateGrid.tsx @@ -1,4 +1,4 @@ -import { AssistantPreview } from "@dust-tt/sparkle"; +import { LargeAssistantCard } from "@dust-tt/sparkle"; import type { AssistantTemplateListType } from "@app/pages/api/w/[wId]/assistant/builder/templates"; @@ -17,12 +17,11 @@ export function TemplateGrid({ return (
{templates.map((t) => ( - openTemplateModal(t.sId)} /> ))} diff --git a/front/components/assistant_builder/actions/ProcessAction.tsx b/front/components/assistant_builder/actions/ProcessAction.tsx index 885a53971def..41b67b391b71 100644 --- a/front/components/assistant_builder/actions/ProcessAction.tsx +++ b/front/components/assistant_builder/actions/ProcessAction.tsx @@ -424,7 +424,7 @@ export function ActionProcess({ (actionConfiguration.tagsFilter?.in || []).length > 0) && (
-
+
Folder tags filtering
@@ -539,7 +539,7 @@ export function ActionProcess({ )}
-
+
Process data from the last
-
+
Schema
{actionConfiguration.schema.length > 0 && !isGeneratingSchema && ( diff --git a/front/components/assistant_builder/actions/RetrievalAction.tsx b/front/components/assistant_builder/actions/RetrievalAction.tsx index b1750bafb4b0..4b96c8405fe4 100644 --- a/front/components/assistant_builder/actions/RetrievalAction.tsx +++ b/front/components/assistant_builder/actions/RetrievalAction.tsx @@ -190,7 +190,7 @@ export function ActionRetrievalExhaustive({
Only include data from the last diff --git a/front/components/assistant_builder/spaces/SpaceSelector.tsx b/front/components/assistant_builder/spaces/SpaceSelector.tsx index 8fec0f796bed..51735902e4fe 100644 --- a/front/components/assistant_builder/spaces/SpaceSelector.tsx +++ b/front/components/assistant_builder/spaces/SpaceSelector.tsx @@ -96,7 +96,7 @@ export function SpaceSelector({ className={classNames( "font-bold", "align-middle", - isDisabled ? "text-element-700" : "text-element-900" + isDisabled ? "text-element-700" : "text-foreground" )} > {getSpaceName(space)} diff --git a/front/components/home/ContentBlocks.tsx b/front/components/home/ContentBlocks.tsx index 7973a119a254..2cd88d677631 100644 --- a/front/components/home/ContentBlocks.tsx +++ b/front/components/home/ContentBlocks.tsx @@ -112,8 +112,8 @@ export const BlogBlock: React.FC = ({ ) : null}
-
{title}
-

+

{title}
+

{content}

@@ -151,7 +151,7 @@ export const HeaderContentBlock = ({ )} > {uptitle && ( -

+

{uptitle}

)} @@ -270,7 +270,7 @@ export const CarousselContentBlock = ({

{"Dust for " + title}

{subtitle}

-

+

{description}

diff --git a/front/components/home/ContentComponents.tsx b/front/components/home/ContentComponents.tsx index 4a9b5d151c9b..3e33a8b23f7a 100644 --- a/front/components/home/ContentComponents.tsx +++ b/front/components/home/ContentComponents.tsx @@ -95,7 +95,7 @@ export const Span = ({ children, className = "" }: ContentProps) => ( ); const pClasses = { - xxs: "font-objektiv text-xs text-slate-500 md:text-sm leading-relaxed", + xxs: "font-objektiv text-xs text-muted-foreground md:text-sm leading-relaxed", xs: "font-objektiv text-sm text-slate-400 md:text-base leading-relaxed", sm: "font-objektiv text-base text-slate-400 md:text-lg leading-relaxed", md: "font-objektiv text-lg md:text-lg text-slate-300 lg:text-xl leading-relaxed", @@ -143,8 +143,8 @@ export const P = ({ const aClasses = { primary: "text-action-400 hover:text-action-400 active:text-action-600", - secondary: "text-slate-200 hover:text-slate-100 active:text-slate-500", - tertiary: "text-slate-400 hover:text-slate-100 active:text-slate-500", + secondary: "text-slate-200 hover:text-slate-100 active:text-muted-foreground", + tertiary: "text-slate-400 hover:text-slate-100 active:text-muted-foreground", }; interface AProps extends AnchorHTMLAttributes { diff --git a/front/components/home/LandingLayout.tsx b/front/components/home/LandingLayout.tsx index 9083bdc7ca12..0d0c1ef2d765 100644 --- a/front/components/home/LandingLayout.tsx +++ b/front/components/home/LandingLayout.tsx @@ -189,7 +189,7 @@ const CookieBanner = ({ className || "" )} > -
+
We use{" "} ( -

+

{block}

)); @@ -129,7 +129,7 @@ const SolutionSectionContentBlock = ({ return (
-
{title}
+
{title}
{renderContentBlocks()}
); @@ -158,7 +158,7 @@ export const SolutionSectionAssistantBlock = ({ )} > -
{name}
+
{name}

{description}

diff --git a/front/components/home/menu/MainNavigation.tsx b/front/components/home/menu/MainNavigation.tsx index 7f2f2270f18b..dbaee16fb8ea 100644 --- a/front/components/home/menu/MainNavigation.tsx +++ b/front/components/home/menu/MainNavigation.tsx @@ -95,7 +95,7 @@ const ListItem = React.forwardRef< >
diff --git a/front/components/home/menu/MobileNavigation.tsx b/front/components/home/menu/MobileNavigation.tsx index 8482fdc753f4..032459b7da73 100644 --- a/front/components/home/menu/MobileNavigation.tsx +++ b/front/components/home/menu/MobileNavigation.tsx @@ -56,7 +56,7 @@ export function MobileNavigation() { onOpenChange={setOpen} isExternal={item.isExternal} > - {" "} + {" "} {item.title} ) : ( @@ -100,7 +100,7 @@ function MobileLink({ target={isExternal ? "_blank" : undefined} className={classNames( "flex select-none items-center gap-1 rounded-md py-3 font-semibold leading-none text-slate-50 no-underline outline-none transition-colors", - "hover:bg-accent focus:bg-accent hover:text-slate-100 hover:underline hover:underline-offset-4 focus:text-slate-100 active:text-slate-500" + "hover:bg-accent focus:bg-accent hover:text-slate-100 hover:underline hover:underline-offset-4 focus:text-slate-100 active:text-muted-foreground" )} {...props} > diff --git a/front/components/home/menu/NavigationMenu.tsx b/front/components/home/menu/NavigationMenu.tsx index 41c4aff6404d..623db856cd96 100644 --- a/front/components/home/menu/NavigationMenu.tsx +++ b/front/components/home/menu/NavigationMenu.tsx @@ -41,7 +41,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-md text-slate-400 hover:text-slate-100 active:text-slate-500 font-medium transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50 hover:underline hover:underline-offset-4" + "group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-md text-slate-400 hover:text-slate-100 active:text-muted-foreground font-medium transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50 hover:underline hover:underline-offset-4" ); const NavigationMenuTrigger = React.forwardRef< diff --git a/front/components/members/EditInvitationModal.tsx b/front/components/members/EditInvitationModal.tsx index b3854cb88bc4..85fc5de59fed 100644 --- a/front/components/members/EditInvitationModal.tsx +++ b/front/components/members/EditInvitationModal.tsx @@ -65,7 +65,7 @@ export function EditInvitationModal({ {new Date(invitation.createdAt).toLocaleDateString()}
-
Role:
+
Role:
-
Role:
+
Role:
-
Loading...
+
Loading...
diff --git a/front/components/spaces/EditSpaceManagedDatasourcesViews.tsx b/front/components/spaces/EditSpaceManagedDatasourcesViews.tsx index 3cb1e766e3e6..c79daa6f069c 100644 --- a/front/components/spaces/EditSpaceManagedDatasourcesViews.tsx +++ b/front/components/spaces/EditSpaceManagedDatasourcesViews.tsx @@ -119,13 +119,13 @@ export function EditSpaceManagedDataSourcesViews({ validateVariant: "warning", alertDialog: true, children: ( -
+

The following data sources are currently in use:

{deletedViewsWithUsage.map((view) => (

{getDisplayNameForDataSource(view.dataSource)}{" "} - + (used by {view.usage.count} assistant {view.usage.count > 1 ? "s" : ""}) diff --git a/front/components/workspace/Analytics.tsx b/front/components/workspace/Analytics.tsx index 7aa008bb4d2e..6e8b3d3560bd 100644 --- a/front/components/workspace/Analytics.tsx +++ b/front/components/workspace/Analytics.tsx @@ -1,4 +1,4 @@ -import { Card, Page, Spinner } from "@dust-tt/sparkle"; +import { Page, Spinner, ValueCard } from "@dust-tt/sparkle"; import type { WorkspaceType } from "@dust-tt/types"; import { useWorkspaceAnalytics } from "@app/lib/swr/workspaces"; @@ -22,64 +22,60 @@ export function QuickInsights({ owner }: QuickInsightsProps) {

) : (
- +
{analytics.memberCount}
} - size="sm" className="w-full" /> - -
+
{analytics.averageWeeklyDailyActiveUsers.count}
} - size="sm" className="w-full" /> - -
+
{analytics.weeklyActiveUsers.count}
-
+
{`${analytics.weeklyActiveUsers.growth >= 0 ? "+" : ""}${Math.floor( analytics.weeklyActiveUsers.growth )}%`}
} - size="sm" className="w-full" /> - -
+
{analytics.monthlyActiveUsers.count}
-
+
{`${analytics.monthlyActiveUsers.growth >= 0 ? "+" : ""}${Math.floor( analytics.monthlyActiveUsers.growth )}%`}
} - size="sm" className="w-full" />
diff --git a/front/components/workspace/ChangeMemberModal.tsx b/front/components/workspace/ChangeMemberModal.tsx index abfe79b33fa1..5a5d1bf8e0f1 100644 --- a/front/components/workspace/ChangeMemberModal.tsx +++ b/front/components/workspace/ChangeMemberModal.tsx @@ -70,7 +70,7 @@ export function ChangeMemberModal({
-
+
{member.fullName}
{member.email}
@@ -78,7 +78,7 @@ export function ChangeMemberModal({
-
Role:
+
Role:
- + Make all providers available
- + ☕️ -

+

404: Page not found

-

+

Looks like this page took an unscheduled coffee break.

{currentURL && ( @@ -32,7 +32,11 @@ export default function Custom404() { )}
-
diff --git a/front/pages/no-workspace.tsx b/front/pages/no-workspace.tsx index b09dda0a7c3e..c830c6c99803 100644 --- a/front/pages/no-workspace.tsx +++ b/front/pages/no-workspace.tsx @@ -145,7 +145,7 @@ export default function NoWorkspace({
- + Hello {userFirstName}!
diff --git a/front/pages/poke/templates/[tId].tsx b/front/pages/poke/templates/[tId].tsx index 302eb1e43768..eff1f3bec603 100644 --- a/front/pages/poke/templates/[tId].tsx +++ b/front/pages/poke/templates/[tId].tsx @@ -1,5 +1,5 @@ import { - AssistantPreview, + AssistantCard, ColorPicker, DropdownMenu, DropdownMenuContent, @@ -436,11 +436,10 @@ function PreviewDialog({ form }: { form: any }) { Preview - console.log("clicked")} /> diff --git a/sparkle/src/components/AnimatedText.tsx b/sparkle/src/components/AnimatedText.tsx index de5c8363b4c4..1dee400c6682 100644 --- a/sparkle/src/components/AnimatedText.tsx +++ b/sparkle/src/components/AnimatedText.tsx @@ -49,7 +49,7 @@ const animatedTextVariants: Record = { highlight: "s-text-highlight", emerald: "s-text-emerald-800", amber: "s-text-amber-800", - slate: "s-text-slate-600", + slate: "s-text-muted-foreground", purple: "s-text-purple-800-800", warning: "s-text-warning-800", sky: "s-text-sky-800", diff --git a/sparkle/src/components/Breadcrumbs.tsx b/sparkle/src/components/Breadcrumbs.tsx index a4e757dfa177..7fc8116604de 100644 --- a/sparkle/src/components/Breadcrumbs.tsx +++ b/sparkle/src/components/Breadcrumbs.tsx @@ -87,7 +87,7 @@ export function Breadcrumbs({ items }: BreadcrumbProps) { href={item.href || "#"} className={ index === items.length - 1 - ? "s-text-element-900" + ? "s-text-foreground" : "s-text-element-700" } > diff --git a/sparkle/src/components/CardButton.tsx b/sparkle/src/components/CardButton.tsx deleted file mode 100644 index 21a72a4c5559..000000000000 --- a/sparkle/src/components/CardButton.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import { cva } from "class-variance-authority"; -import React, { ReactNode } from "react"; - -import { - noHrefLink, - SparkleContext, - SparkleContextLinkType, -} from "@sparkle/context"; -import { cn } from "@sparkle/lib/utils"; - -export const CARD_BUTTON_VARIANTS = [ - "primary", - "secondary", - "tertiary", -] as const; - -export type CardButtonVariantType = (typeof CARD_BUTTON_VARIANTS)[number]; - -const variantClasses: Record = { - primary: "s-bg-primary-50 s-border-border-dark/0", - secondary: "s-bg-background s-border-border-dark", - tertiary: "s-bg-background s-border-border-dark/0", -}; - -const CARD_BUTTON_SIZES = ["sm", "md", "lg"] as const; - -type CardButtonSizeType = (typeof CARD_BUTTON_SIZES)[number]; - -const sizeVariants: Record = { - sm: "s-p-3 s-rounded-xl", - md: "s-p-4 s-rounded-2xl", - lg: "s-p-5 s-rounded-3xl", -}; - -const cardButtonVariants = cva( - "s-flex s-text-left s-justify-center s-group s-border s-overflow-hidden s-text-foreground", - { - variants: { - variant: variantClasses, - size: sizeVariants, - }, - defaultVariants: { - variant: "primary", - size: "md", - }, - } -); - -interface CommonProps { - variant?: CardButtonVariantType; - size?: CardButtonSizeType; - className?: string; -} - -interface LinkProps extends CommonProps { - children?: ReactNode; - href: string; - target?: string; - rel?: string; - replace?: boolean; - shallow?: boolean; - onClick?: never; - onMouseEnter?: never; - onMouseLeave?: never; -} - -interface ButtonProps - extends CommonProps, - React.ButtonHTMLAttributes { - href?: never; - target?: never; - rel?: never; - replace?: never; - shallow?: never; -} - -export type CardButtonProps = LinkProps | ButtonProps; - -export const CardButton = React.forwardRef( - ( - { - children, - variant, - size, - className, - onClick, - onMouseEnter, - onMouseLeave, - href, - target = "_blank", - rel = "", - replace, - shallow, - ...props - }, - ref - ) => { - const { components } = React.useContext(SparkleContext); - const Link: SparkleContextLinkType = href ? components.link : noHrefLink; - - const cardButtonClassNames = cn( - cardButtonVariants({ variant, size }), - (onClick || onMouseEnter) && - "s-cursor-pointer disabled:s-text-primary-muted disabled:s-border-structure-100 disabled:s-pointer-events-none s-transition s-duration-200", - "[&:not(:has(button:hover))]:hover:s-bg-primary-100", // apply hover style when no button children are hovered - "[&:not(:has(button:active))]:active:s-bg-primary-200", // apply hover style when no button children are hovered - className - ); - - if (href) { - return ( - - {children} - - ); - } - - return ( -
- {children} -
- ); - } -); - -CardButton.displayName = "CardButton"; diff --git a/sparkle/src/components/Chip.tsx b/sparkle/src/components/Chip.tsx index 8da67debcf9a..af5e3f6f99b7 100644 --- a/sparkle/src/components/Chip.tsx +++ b/sparkle/src/components/Chip.tsx @@ -52,7 +52,7 @@ const backgroundVariants: Record = { const textVariants: Record = { emerald: "s-text-emerald-900", amber: "s-text-amber-900", - slate: "s-text-slate-900", + slate: "s-text-foreground", purple: "s-text-purple-900", warning: "s-text-warning-900", sky: "s-text-sky-900", diff --git a/sparkle/src/components/Collapsible.tsx b/sparkle/src/components/Collapsible.tsx index 1c5ca6334541..a5f67710c095 100644 --- a/sparkle/src/components/Collapsible.tsx +++ b/sparkle/src/components/Collapsible.tsx @@ -65,11 +65,11 @@ Collapsible.Button = function ({ }, secondary: { - base: "s-text-element-900 s-inline-flex s-transition-colors s-ease-out s-duration-400 s-box-border s-gap-x-2 s-select-none", + base: "s-text-foreground s-inline-flex s-transition-colors s-ease-out s-duration-400 s-box-border s-gap-x-2 s-select-none", hover: "group-hover/col:s-text-action-500", active: "active:s-text-action-600", dark: { - base: "dark:s-text-element-900-dark", + base: "dark:s-text-foreground-dark", hover: "dark:group-hover/col:s-text-action-400-dark", active: "dark:active:s-text-action-600-dark", disabled: "dark:s-element-500-dark", diff --git a/sparkle/src/components/ContextItem.tsx b/sparkle/src/components/ContextItem.tsx index 57f1725aed32..b1752e984dfd 100644 --- a/sparkle/src/components/ContextItem.tsx +++ b/sparkle/src/components/ContextItem.tsx @@ -153,7 +153,7 @@ ContextItem.SectionHeader = function ({ hasBorder ? "s-border-b s-border-structure-200" : "" )} > -
+
{title}
{description && ( diff --git a/sparkle/src/components/ConversationMessageHeader.tsx b/sparkle/src/components/ConversationMessageHeader.tsx index 3c56cab568fc..095d208ba67c 100644 --- a/sparkle/src/components/ConversationMessageHeader.tsx +++ b/sparkle/src/components/ConversationMessageHeader.tsx @@ -30,7 +30,7 @@ export function ConversationMessageHeader({
diff --git a/sparkle/src/components/IconButton.tsx b/sparkle/src/components/IconButton.tsx index b2efb0d9f644..3ffecce9c037 100644 --- a/sparkle/src/components/IconButton.tsx +++ b/sparkle/src/components/IconButton.tsx @@ -28,7 +28,7 @@ const styleVariants: Record = { "active:s-text-warning-600 dark:active:s-text-warning-600-dark" + "s-text-element-500 dark:s-text-element-500-dark", highlight: - "s-text-element-900 dark:s-text-element-900-dark" + + "s-text-foreground dark:s-text-foreground-dark" + "hover:s-text-action-400 dark:hover:s-text-action-500-dark" + "active:s-text-action-600 dark:active:s-text-action-600-dark" + "s-text-element-500 dark:s-text-element-500-dark", diff --git a/sparkle/src/components/IconToggleButton.tsx b/sparkle/src/components/IconToggleButton.tsx index 0670abeacd74..fb9944210c7a 100644 --- a/sparkle/src/components/IconToggleButton.tsx +++ b/sparkle/src/components/IconToggleButton.tsx @@ -23,13 +23,13 @@ const baseClasses = const iconClasses = { secondary: { - idle: "s-text-element-900", + idle: "s-text-foreground", selected: "s-text-action-500", hover: "hover:s-text-action-400", active: "active:s-text-action-600", disabled: "s-text-element-500", dark: { - idle: "dark:s-text-element-900-dark", + idle: "dark:s-text-foreground-dark", selected: "dark:s-text-action-500-dark", hover: "dark:hover:s-text-action-500-dark", active: "dark:active:s-text-action-600-dark", diff --git a/sparkle/src/components/Page.tsx b/sparkle/src/components/Page.tsx index 54a95690907d..9241a0fb8cf9 100644 --- a/sparkle/src/components/Page.tsx +++ b/sparkle/src/components/Page.tsx @@ -21,7 +21,7 @@ export function Page({ children, variant = "normal" }: PageProps) {
@@ -97,7 +97,7 @@ Page.P = function ({ children, variant, size = "sm" }: PagePProps) { PsizeClasses[size], variant === "secondary" ? "s-text-element-700 dark:s-text-element-600-dark" - : "s-text-element-900 dark:s-text-element-900-dark" + : "s-text-foreground dark:s-text-foreground-dark" )} > {children} @@ -125,7 +125,7 @@ Page.H = function ({ children, variant = "h3" }: PageHProps) { return ( diff --git a/sparkle/src/components/Popup.tsx b/sparkle/src/components/Popup.tsx index 8e8cb645a5c1..3620e337387a 100644 --- a/sparkle/src/components/Popup.tsx +++ b/sparkle/src/components/Popup.tsx @@ -57,7 +57,7 @@ export function Popup({
)}
-
+
{description}
diff --git a/sparkle/src/components/SearchInput.tsx b/sparkle/src/components/SearchInput.tsx index aea142ef2ab6..09d9429308a4 100644 --- a/sparkle/src/components/SearchInput.tsx +++ b/sparkle/src/components/SearchInput.tsx @@ -57,7 +57,7 @@ export const SearchInput = forwardRef(
}
{label}
diff --git a/sparkle/src/components/markdown/Markdown.tsx b/sparkle/src/components/markdown/Markdown.tsx index fbb1bc82f1f3..0df172eda0e7 100644 --- a/sparkle/src/components/markdown/Markdown.tsx +++ b/sparkle/src/components/markdown/Markdown.tsx @@ -164,7 +164,7 @@ export function Markdown({ ), strong: ({ children }) => ( - + {children} ),