-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Button style on 404 * Deploy ongoing * Deploying new cards * Fix * Latest RC * Fix? * Attachement fix * Fixes * Results pages * Assistant Selector * Ready * more fixes * Trying to fix suggestions * New Rc * [extension] - refactor: standardize citation component usage across the app - Renamed `CitationNew` related components to `Citation` for consistency - Removed the `MarkdownCitation.tsx` as its interface was no longer used - Replaced `CitationType` with inline conditionals and direct icon imports - Updated `@dust-tt/sparkle` to version `0.2.343-rc5` reflecting these citation changes - Removed unused `typeIcons` object, adapting citation calls to use the new icon method * [extension] - refactor: streamline `CitationIconType` definition - Simplify the `CitationIconType` by directly using a union type instead of an array constant mapping * [extension] - refactor: streamline icon imports in AgentMessage component - Removed individual icon imports for various services and replaced with a generic document icon - Implemented a citation icon map to dynamically resolve icons based on document provider - Simplified makeDocumentCitation and makeWebsearchResultsCitation by integrating icon components directly * Moving to prod Sparkle 345 * cleanup --------- Co-authored-by: JulesBelveze <jules.belveze@hotmail.fr>
- Loading branch information
1 parent
53f36af
commit ac54577
Showing
72 changed files
with
327 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
extension/app/src/components/conversation/MarkdownCitation.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 45 additions & 2 deletions
47
extension/app/src/components/markdown/MarkdownCitation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<SVGSVGElement>) => 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; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.