-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add: option to view plaintext chat message. Issue/2508 #3496
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d685715
Add: plain text i18next
CertifiedJoon ce7bbfc
Modify: add isPlainText to render plaintext response
CertifiedJoon 8fc4834
Modify: enabled plaintext conversion on chatentry
CertifiedJoon 67b52a7
Modify: useMemo on isplaintext
CertifiedJoon 54d994e
Modify: Removed debugging code and useMemo on isPlainText
CertifiedJoon a20ba69
Add: SVG support
CertifiedJoon 138870f
Modify: lucide icon to markdown svg
CertifiedJoon c8bae39
wip
notmd e2ec478
wip
notmd 5eabb4c
wip
notmd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { LucideProps } from "lucide-react"; | ||
|
||
export const MarkdownIcon = (props: LucideProps) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
className="icon icon-tabler icon-tabler-markdown" | ||
width={24} | ||
height={24} | ||
viewBox="0 0 24 24" | ||
strokeWidth="2" | ||
stroke="currentColor" | ||
fill="none" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
{...props} | ||
> | ||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path> | ||
<path d="M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"></path> | ||
<path d="M7 15v-6l2 2l2 -2v6"></path> | ||
<path d="M14 13l2 2l2 -2m-2 2v-6"></path> | ||
</svg> | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { LucideProps } from "lucide-react"; | ||
|
||
export const MarkdownOffIcon = (props: LucideProps) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
className="icon icon-tabler icon-tabler-markdown-off" | ||
width={24} | ||
height={24} | ||
viewBox="0 0 24 24" | ||
strokeWidth="2" | ||
stroke="currentColor" | ||
fill="none" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
{...props} | ||
> | ||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path> | ||
<path d="M9 5h10a2 2 0 0 1 2 2v10"></path> | ||
<path d="M19 19h-14a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 1.85 -2"></path> | ||
<path d="M7 15v-6l2 2l1 -1m1 1v4"></path> | ||
<path d="M17.5 13.5l.5 -.5m-2 -1v-3"></path> | ||
<path d="M3 3l18 18"></path> | ||
</svg> | ||
); | ||
}; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you adjust icon base on the
isPlainText
state? I think using these two icons will make more sensehttps://tabler-icons.io/i/markdown-off
https://tabler-icons.io/i/markdown
Just copy the SVG, we don't need to install the lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted. have made the relevant changes.