jamdesk 1.1.177 → 1.1.179
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamdesk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.179",
|
|
4
4
|
"description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jamdesk",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
4
|
-
import { CursorIcon } from '@/components/mdx/ai-action-icons';
|
|
4
|
+
import { ChatGPTIcon, ClaudeIcon, CursorIcon, GeminiIcon, PerplexityIcon } from '@/components/mdx/ai-action-icons';
|
|
5
5
|
import { useOnClickOutside } from '@/hooks/useOnClickOutside';
|
|
6
6
|
import { usePathname } from 'next/navigation';
|
|
7
7
|
import { AI_CHAT_URLS } from '@/lib/ai-service-urls';
|
|
@@ -109,39 +109,7 @@ function ExternalLinkIcon({ className }: { className?: string }) {
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
// Brand logos
|
|
113
|
-
function ChatGPTIcon({ className }: { className?: string }) {
|
|
114
|
-
return (
|
|
115
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
116
|
-
<path d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z" />
|
|
117
|
-
</svg>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function ClaudeIcon({ className }: { className?: string }) {
|
|
122
|
-
return (
|
|
123
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
124
|
-
<path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z" />
|
|
125
|
-
</svg>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function PerplexityIcon({ className }: { className?: string }) {
|
|
130
|
-
return (
|
|
131
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 38" fill="currentColor" className={className}>
|
|
132
|
-
<path fillRule="evenodd" clipRule="evenodd" d="M5.12114 0.0400391L15.919 9.98864V9.98636V0.062995H18.0209V10.0332L28.8671 0.0400391V11.3829H33.3202V27.744H28.8808V37.8442L18.0209 28.303V37.9538H15.919V28.4604L5.13338 37.96V27.744H0.680176V11.3829H5.12114V0.0400391ZM14.3344 13.4592H2.78208V25.6677H5.13074V21.8167L14.3344 13.4592ZM7.23518 22.7379V33.3271L15.919 25.6786V14.8506L7.23518 22.7379ZM18.0814 25.5775V14.8404L26.7677 22.7282V27.744H26.7789V33.219L18.0814 25.5775ZM28.8808 25.6677H31.2183V13.4592H19.752L28.8808 21.7302V25.6677ZM26.7652 11.3829V4.81584L19.6374 11.3829H26.7652ZM14.3507 11.3829H7.22306V4.81584L14.3507 11.3829Z" />
|
|
133
|
-
</svg>
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function GeminiIcon({ className }: { className?: string }) {
|
|
138
|
-
return (
|
|
139
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
140
|
-
<path d="M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81" />
|
|
141
|
-
</svg>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
112
|
+
// Brand logos (shared marks live in mdx/ai-action-icons.tsx)
|
|
145
113
|
function VSCodeIcon({ className }: { className?: string }) {
|
|
146
114
|
return (
|
|
147
115
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="currentColor" className={className}>
|
|
@@ -17,11 +17,12 @@ import { useOnClickOutside } from '@/hooks/useOnClickOutside';
|
|
|
17
17
|
import { renderInlineMarkdown } from '@/lib/inline-markdown';
|
|
18
18
|
import { decodePromptSource } from '@/lib/prompt-source-codec';
|
|
19
19
|
|
|
20
|
-
import { CursorIcon } from './ai-action-icons';
|
|
20
|
+
import { ChatGPTIcon, ClaudeIcon, CursorIcon, GeminiIcon, PerplexityIcon } from './ai-action-icons';
|
|
21
21
|
import { Icon } from './Icon';
|
|
22
22
|
import {
|
|
23
23
|
resolvePromptActions,
|
|
24
24
|
type PromptAction,
|
|
25
|
+
type PromptBuiltinAction,
|
|
25
26
|
type ResolvedPromptAction,
|
|
26
27
|
} from './prompt-actions';
|
|
27
28
|
|
|
@@ -55,18 +56,21 @@ function resolveAuthorIcon(icon: string | ReactElement, iconType?: IconType): st
|
|
|
55
56
|
return `${iconType}/${icon}`;
|
|
56
57
|
}
|
|
57
58
|
|
|
59
|
+
const BUILTIN_ACTION_ICONS: Record<Exclude<PromptBuiltinAction, 'copy'>, typeof ClaudeIcon> = {
|
|
60
|
+
cursor: CursorIcon,
|
|
61
|
+
claude: ClaudeIcon,
|
|
62
|
+
chatgpt: ChatGPTIcon,
|
|
63
|
+
perplexity: PerplexityIcon,
|
|
64
|
+
gemini: GeminiIcon,
|
|
65
|
+
};
|
|
66
|
+
|
|
58
67
|
function ActionIcon({ action }: { action: ResolvedPromptAction['action'] }): ReactElement | null {
|
|
59
|
-
if (action === '
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (action === 'claude') {
|
|
63
|
-
return <Icon icon="brain" size={16} className="shrink-0" />;
|
|
64
|
-
}
|
|
65
|
-
if (action === 'chatgpt') {
|
|
66
|
-
return <Icon icon="brands/openai" size={16} className="shrink-0" />;
|
|
68
|
+
if (typeof action === 'string') {
|
|
69
|
+
const BrandIcon = BUILTIN_ACTION_ICONS[action];
|
|
70
|
+
return <BrandIcon className="h-3.5 w-3.5 shrink-0" />;
|
|
67
71
|
}
|
|
68
|
-
if (
|
|
69
|
-
return <Icon icon={action.icon} size={
|
|
72
|
+
if (action.icon) {
|
|
73
|
+
return <Icon icon={action.icon} size={14} className="shrink-0" />;
|
|
70
74
|
}
|
|
71
75
|
return null;
|
|
72
76
|
}
|
|
@@ -132,7 +136,7 @@ const promptUtilityClassName = [
|
|
|
132
136
|
].join(' ');
|
|
133
137
|
|
|
134
138
|
const primaryActionClassName = [
|
|
135
|
-
'inline-flex min-h-
|
|
139
|
+
'inline-flex min-h-7 min-w-0 items-center gap-1.5 px-3 py-0.5 text-[13px] font-semibold',
|
|
136
140
|
'prompt-primary-action bg-[var(--color-primary)] text-white transition-opacity cursor-pointer',
|
|
137
141
|
'hover:opacity-90',
|
|
138
142
|
contrastSafeFocusClassName,
|
|
@@ -446,7 +450,7 @@ export function Prompt({
|
|
|
446
450
|
aria-haspopup="menu"
|
|
447
451
|
aria-expanded={menuOpen}
|
|
448
452
|
aria-controls={menuId}
|
|
449
|
-
className={`${primaryActionClassName} min-w-
|
|
453
|
+
className={`${primaryActionClassName} min-w-7 rounded-r-full border-l border-[var(--color-bg-primary)] px-2`}
|
|
450
454
|
onMouseDown={(event) => {
|
|
451
455
|
if (menuOpen) event.preventDefault();
|
|
452
456
|
}}
|
|
@@ -455,7 +459,7 @@ export function Prompt({
|
|
|
455
459
|
if (menuOpen) triggerRef.current?.focus();
|
|
456
460
|
}}
|
|
457
461
|
>
|
|
458
|
-
<i className="fa-solid fa-chevron-down text-
|
|
462
|
+
<i className="fa-solid fa-chevron-down text-[10px]" aria-hidden="true" />
|
|
459
463
|
</button>
|
|
460
464
|
{menuOpen ? (
|
|
461
465
|
<div
|
|
@@ -478,7 +482,7 @@ export function Prompt({
|
|
|
478
482
|
target="_blank"
|
|
479
483
|
rel="noopener noreferrer"
|
|
480
484
|
aria-label={action.label}
|
|
481
|
-
className={`prompt-menu-item flex min-h-
|
|
485
|
+
className={`prompt-menu-item flex min-h-8 min-w-0 max-w-full cursor-pointer items-center gap-1.5 rounded-[var(--radius-lg)] px-2.5 py-1.5 text-[13px] text-[var(--color-text-primary)] hover:bg-[var(--color-border)] ${contrastSafeFocusClassName}`}
|
|
482
486
|
onClick={closeMenuAndFocusTrigger}
|
|
483
487
|
>
|
|
484
488
|
<span aria-hidden="true"><ActionIcon action={action.action} /></span>
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
export function ChatGPTIcon({ className }: { className?: string }) {
|
|
2
|
+
return (
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
4
|
+
<path d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z" />
|
|
5
|
+
</svg>
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function PerplexityIcon({ className }: { className?: string }) {
|
|
10
|
+
return (
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 38" fill="currentColor" className={className}>
|
|
12
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M5.12114 0.0400391L15.919 9.98864V9.98636V0.062995H18.0209V10.0332L28.8671 0.0400391V11.3829H33.3202V27.744H28.8808V37.8442L18.0209 28.303V37.9538H15.919V28.4604L5.13338 37.96V27.744H0.680176V11.3829H5.12114V0.0400391ZM14.3344 13.4592H2.78208V25.6677H5.13074V21.8167L14.3344 13.4592ZM7.23518 22.7379V33.3271L15.919 25.6786V14.8506L7.23518 22.7379ZM18.0814 25.5775V14.8404L26.7677 22.7282V27.744H26.7789V33.219L18.0814 25.5775ZM28.8808 25.6677H31.2183V13.4592H19.752L28.8808 21.7302V25.6677ZM26.7652 11.3829V4.81584L19.6374 11.3829H26.7652ZM14.3507 11.3829H7.22306V4.81584L14.3507 11.3829Z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function GeminiIcon({ className }: { className?: string }) {
|
|
18
|
+
return (
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
20
|
+
<path d="M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81" />
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
1
25
|
export function CursorIcon({ className }: { className?: string }) {
|
|
2
26
|
return (
|
|
3
27
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
@@ -5,3 +29,11 @@ export function CursorIcon({ className }: { className?: string }) {
|
|
|
5
29
|
</svg>
|
|
6
30
|
);
|
|
7
31
|
}
|
|
32
|
+
|
|
33
|
+
export function ClaudeIcon({ className }: { className?: string }) {
|
|
34
|
+
return (
|
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" className={className}>
|
|
36
|
+
<path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z" />
|
|
37
|
+
</svg>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AI_CHAT_URLS } from '@/lib/ai-service-urls';
|
|
2
2
|
|
|
3
|
-
export type PromptBuiltinAction = 'copy' | 'cursor' | 'claude' | 'chatgpt';
|
|
3
|
+
export type PromptBuiltinAction = 'copy' | 'cursor' | 'claude' | 'chatgpt' | 'perplexity' | 'gemini';
|
|
4
4
|
|
|
5
5
|
export interface PromptCustomAction {
|
|
6
6
|
label: string;
|
|
@@ -17,6 +17,8 @@ const BASES: Record<Exclude<PromptBuiltinAction, 'copy'>, string> = {
|
|
|
17
17
|
cursor: AI_CHAT_URLS.cursor,
|
|
18
18
|
claude: AI_CHAT_URLS.claude,
|
|
19
19
|
chatgpt: AI_CHAT_URLS.chatgpt,
|
|
20
|
+
perplexity: AI_CHAT_URLS.perplexity,
|
|
21
|
+
gemini: AI_CHAT_URLS.gemini,
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
export function normalizePromptActions(actions: unknown): PromptOpenAction[] {
|
|
@@ -38,7 +40,7 @@ function normalizePromptActionsUnsafe(actions: unknown): PromptOpenAction[] {
|
|
|
38
40
|
if (action === 'copy') continue;
|
|
39
41
|
|
|
40
42
|
if (typeof action === 'string') {
|
|
41
|
-
if (!['cursor', 'claude', 'chatgpt'].includes(action) || seen.has(action)) continue;
|
|
43
|
+
if (!['cursor', 'claude', 'chatgpt', 'perplexity', 'gemini'].includes(action) || seen.has(action)) continue;
|
|
42
44
|
seen.add(action);
|
|
43
45
|
normalized.push(action as Exclude<PromptBuiltinAction, 'copy'>);
|
|
44
46
|
continue;
|
|
@@ -121,6 +123,8 @@ const BUILTIN_META = {
|
|
|
121
123
|
cursor: { label: 'Open in Cursor' },
|
|
122
124
|
claude: { label: 'Open in Claude' },
|
|
123
125
|
chatgpt: { label: 'Open in ChatGPT' },
|
|
126
|
+
perplexity: { label: 'Open in Perplexity' },
|
|
127
|
+
gemini: { label: 'Open in Gemini' },
|
|
124
128
|
} as const;
|
|
125
129
|
|
|
126
130
|
export function resolvePromptActions(actions: unknown, prompt: string): ResolvedPromptAction[] {
|
|
@@ -2962,9 +2962,9 @@
|
|
|
2962
2962
|
"license": "MIT"
|
|
2963
2963
|
},
|
|
2964
2964
|
"node_modules/electron-to-chromium": {
|
|
2965
|
-
"version": "1.5.
|
|
2966
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
2967
|
-
"integrity": "sha512-
|
|
2965
|
+
"version": "1.5.393",
|
|
2966
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.393.tgz",
|
|
2967
|
+
"integrity": "sha512-kiDJdIUawuEIcp9XoICKp1iTYDEbgguIPq526N1Q7jIQDeQ3CqoMx71025PI/7E48Ddtw2HuWsVjY7afEgNxmg==",
|
|
2968
2968
|
"license": "ISC"
|
|
2969
2969
|
},
|
|
2970
2970
|
"node_modules/enhanced-resolve": {
|