mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2025-06-22 15:35:04 +00:00
add embedding
This commit is contained in:
parent
b5c10ec8cd
commit
6e5d28e52e
@ -213,6 +213,10 @@ class EmbedPreview {
|
|||||||
if (context.startsWith('@')) {
|
if (context.startsWith('@')) {
|
||||||
// @mentions - just show the text
|
// @mentions - just show the text
|
||||||
pill.innerHTML = '<span>' + context + '</span>';
|
pill.innerHTML = '<span>' + context + '</span>';
|
||||||
|
} else if (context.startsWith('http://') || context.startsWith('https://')) {
|
||||||
|
// Web URLs show world icon
|
||||||
|
icon = '<svg class="w-3 h-3" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM4.332 8.027a6.012 6.012 0 011.912-2.706C6.512 5.73 6.974 6 7.5 6A1.5 1.5 0 019 7.5V8a2 2 0 004 0 2 2 0 011.523-1.943A5.977 5.977 0 0116 10c0 .34-.028.675-.083 1H15a2 2 0 00-2 2v2.197A5.973 5.973 0 0110 16v-2a2 2 0 00-2-2 2 2 0 01-2-2 2 2 0 00-1.668-1.973z" clip-rule="evenodd"/></svg>';
|
||||||
|
pill.innerHTML = icon + '<span>' + context + '</span>';
|
||||||
} else if (context.startsWith('#')) {
|
} else if (context.startsWith('#')) {
|
||||||
// Any hashtag context shows image icon
|
// Any hashtag context shows image icon
|
||||||
icon = '<svg class="w-3 h-3" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/></svg>';
|
icon = '<svg class="w-3 h-3" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/></svg>';
|
||||||
|
@ -213,6 +213,10 @@ class EmbedPreview {
|
|||||||
if (context.startsWith('@')) {
|
if (context.startsWith('@')) {
|
||||||
// @mentions - just show the text
|
// @mentions - just show the text
|
||||||
pill.innerHTML = '<span>' + context + '</span>';
|
pill.innerHTML = '<span>' + context + '</span>';
|
||||||
|
} else if (context.startsWith('http://') || context.startsWith('https://')) {
|
||||||
|
// Web URLs show world icon
|
||||||
|
icon = '<svg class="w-3 h-3" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM4.332 8.027a6.012 6.012 0 011.912-2.706C6.512 5.73 6.974 6 7.5 6A1.5 1.5 0 019 7.5V8a2 2 0 004 0 2 2 0 011.523-1.943A5.977 5.977 0 0116 10c0 .34-.028.675-.083 1H15a2 2 0 00-2 2v2.197A5.973 5.973 0 0110 16v-2a2 2 0 00-2-2 2 2 0 01-2-2 2 2 0 00-1.668-1.973z" clip-rule="evenodd"/></svg>';
|
||||||
|
pill.innerHTML = icon + '<span>' + context + '</span>';
|
||||||
} else if (context.startsWith('#')) {
|
} else if (context.startsWith('#')) {
|
||||||
// Any hashtag context shows image icon
|
// Any hashtag context shows image icon
|
||||||
icon = '<svg class="w-3 h-3" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/></svg>';
|
icon = '<svg class="w-3 h-3" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/></svg>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user