feat(tools): added sentry, incidentio, and posthog tools (#2116)

* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs
This commit is contained in:
Waleed
2025-11-25 19:50:23 -08:00
committed by GitHub
parent 3a3c946607
commit ff79b78b5f
146 changed files with 20971 additions and 144 deletions

View File

@@ -0,0 +1,27 @@
import { cva, type VariantProps } from 'class-variance-authority'
const variants = {
primary: 'bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80',
outline: 'border hover:bg-fd-accent hover:text-fd-accent-foreground',
ghost: 'hover:bg-fd-accent hover:text-fd-accent-foreground',
secondary:
'border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground',
} as const
export const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring',
{
variants: {
variant: variants,
color: variants,
size: {
sm: 'gap-1 px-2 py-1.5 text-xs',
icon: 'p-1.5 [&_svg]:size-5',
'icon-sm': 'p-1.5 [&_svg]:size-4.5',
'icon-xs': 'p-1 [&_svg]:size-4',
},
},
}
)
export type ButtonProps = VariantProps<typeof buttonVariants>

View File

@@ -3,25 +3,48 @@
import { useState } from 'react'
import { Check, Copy } from 'lucide-react'
const cache = new Map<string, string>()
interface CopyPageButtonProps {
content: string
markdownUrl: string
}
export function CopyPageButton({ content }: CopyPageButtonProps) {
export function CopyPageButton({ markdownUrl }: CopyPageButtonProps) {
const [copied, setCopied] = useState(false)
const [isLoading, setLoading] = useState(false)
const handleCopy = async () => {
const cached = cache.get(markdownUrl)
if (cached) {
await navigator.clipboard.writeText(cached)
setCopied(true)
setTimeout(() => setCopied(false), 2000)
return
}
setLoading(true)
try {
await navigator.clipboard.writeText(content)
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
const content = await res.text()
cache.set(markdownUrl, content)
return content
}),
}),
])
setCopied(true)
setTimeout(() => setCopied(false), 2000)
} catch (err) {
console.error('Failed to copy:', err)
} finally {
setLoading(false)
}
}
return (
<button
disabled={isLoading}
onClick={handleCopy}
className='flex cursor-pointer items-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-2 text-muted-foreground/60 text-sm leading-none transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
aria-label={copied ? 'Copied to clipboard' : 'Copy page content'}

View File

@@ -32,6 +32,7 @@ import {
HuggingFaceIcon,
HunterIOIcon,
ImageIcon,
IncidentioIcon,
JinaAIIcon,
JiraIcon,
LinearIcon,
@@ -55,11 +56,13 @@ import {
PineconeIcon,
PipedriveIcon,
PostgresIcon,
PosthogIcon,
QdrantIcon,
RedditIcon,
ResendIcon,
S3Icon,
SalesforceIcon,
SentryIcon,
SerperIcon,
SlackIcon,
STTIcon,
@@ -112,11 +115,13 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
slack: SlackIcon,
sharepoint: MicrosoftSharepointIcon,
serper: SerperIcon,
sentry: SentryIcon,
salesforce: SalesforceIcon,
s3: S3Icon,
resend: ResendIcon,
reddit: RedditIcon,
qdrant: QdrantIcon,
posthog: PosthogIcon,
postgresql: PostgresIcon,
pipedrive: PipedriveIcon,
pinecone: PineconeIcon,
@@ -140,6 +145,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
knowledge: PackageSearchIcon,
jira: JiraIcon,
jina: JinaAIIcon,
incidentio: IncidentioIcon,
image_generator: ImageIcon,
hunter: HunterIOIcon,
huggingface: HuggingFaceIcon,