Skip to content

Commit ff79b78

Browse files
authored
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
1 parent 3a3c946 commit ff79b78

File tree

146 files changed

+20968
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+20968
-141
lines changed

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
201201
<div className='relative mt-6 sm:mt-0'>
202202
<div className='absolute top-1 right-0 flex items-center gap-2'>
203203
<div className='hidden sm:flex'>
204-
<CopyPageButton
205-
content={`# ${page.data.title}
206-
207-
${page.data.description || ''}
208-
209-
${page.data.content || ''}`}
210-
/>
204+
<CopyPageButton markdownUrl={`${page.url}.mdx`} />
211205
</div>
212206
<PageNavigationArrows previous={neighbours?.previous} next={neighbours?.next} />
213207
</div>

apps/docs/app/llms.mdx/[[...slug]]/route.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ export async function GET(_req: NextRequest, { params }: { params: Promise<{ slu
1010
const page = source.getPage(slug)
1111
if (!page) notFound()
1212

13-
return new NextResponse(await getLLMText(page))
13+
return new NextResponse(await getLLMText(page), {
14+
headers: {
15+
'Content-Type': 'text/markdown',
16+
},
17+
})
1418
}
1519

1620
export function generateStaticParams() {

apps/docs/cli.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"aliases": {
3+
"uiDir": "./components/ui",
4+
"componentsDir": "./components",
5+
"blockDir": "./components",
6+
"cssDir": "./styles",
7+
"libDir": "./lib"
8+
},
9+
"baseDir": "",
10+
"commands": {}
11+
}

apps/docs/components/icons.tsx

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4150,3 +4150,96 @@ export function VideoIcon(props: SVGProps<SVGSVGElement>) {
41504150
</svg>
41514151
)
41524152
}
4153+
4154+
export function VllmIcon(props: SVGProps<SVGSVGElement>) {
4155+
return (
4156+
<svg {...props} fill='currentColor' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
4157+
<title>vLLM</title>
4158+
<path d='M0 4.973h9.324V23L0 4.973z' fill='#FDB515' />
4159+
<path d='M13.986 4.351L22.378 0l-6.216 23H9.324l4.662-18.649z' fill='#30A2FF' />
4160+
</svg>
4161+
)
4162+
}
4163+
4164+
export function PosthogIcon(props: SVGProps<SVGSVGElement>) {
4165+
return (
4166+
<svg
4167+
{...props}
4168+
width='50'
4169+
height='30'
4170+
viewBox='0 0 50 30'
4171+
fill='none'
4172+
xmlns='http://www.w3.org/2000/svg'
4173+
>
4174+
<path
4175+
d='M10.8914 17.2057c-.3685.7371-1.42031.7371-1.78884 0L8.2212 15.443c-.14077-.2815-.14077-.6129 0-.8944l.88136-1.7627c.36853-.7371 1.42034-.7371 1.78884 0l.8814 1.7627c.1407.2815.1407.6129 0 .8944l-.8814 1.7627zM10.8914 27.2028c-.3685.737-1.42031.737-1.78884 0L8.2212 25.44c-.14077-.2815-.14077-.6129 0-.8944l.88136-1.7627c.36853-.7371 1.42034-.7371 1.78884 0l.8814 1.7627c.1407.2815.1407.6129 0 .8944l-.8814 1.7628z'
4176+
fill='#1D4AFF'
4177+
/>
4178+
<path
4179+
d='M0 23.4082c0-.8909 1.07714-1.3371 1.70711-.7071l4.58338 4.5834c.62997.63.1838 1.7071-.7071 1.7071H.999999c-.552284 0-.999999-.4477-.999999-1v-4.5834zm0-4.8278c0 .2652.105357.5196.292893.7071l9.411217 9.4112c.18753.1875.44189.2929.70709.2929h5.1692c.8909 0 1.3371-1.0771.7071-1.7071L1.70711 12.7041C1.07714 12.0741 0 12.5203 0 13.4112v5.1692zm0-9.99701c0 .26521.105357.51957.292893.7071L19.7011 28.6987c.1875.1875.4419.2929.7071.2929h5.1692c.8909 0 1.3371-1.0771.7071-1.7071L1.70711 2.70711C1.07715 2.07715 0 2.52331 0 3.41421v5.16918zm9.997 0c0 .26521.1054.51957.2929.7071l17.994 17.99401c.63.63 1.7071.1838 1.7071-.7071v-5.1692c0-.2652-.1054-.5196-.2929-.7071l-17.994-17.994c-.63-.62996-1.7071-.18379-1.7071.70711v5.16918zm11.7041-5.87628c-.63-.62997-1.7071-.1838-1.7071.7071v5.16918c0 .26521.1054.51957.2929.7071l7.997 7.99701c.63.63 1.7071.1838 1.7071-.7071v-5.1692c0-.2652-.1054-.5196-.2929-.7071l-7.997-7.99699z'
4180+
fill='#F9BD2B'
4181+
/>
4182+
<path
4183+
d='M42.5248 23.5308l-9.4127-9.4127c-.63-.63-1.7071-.1838-1.7071.7071v13.1664c0 .5523.4477 1 1 1h14.5806c.5523 0 1-.4477 1-1v-1.199c0-.5523-.4496-.9934-.9973-1.0647-1.6807-.2188-3.2528-.9864-4.4635-2.1971zm-6.3213 2.2618c-.8829 0-1.5995-.7166-1.5995-1.5996 0-.8829.7166-1.5995 1.5995-1.5995.883 0 1.5996.7166 1.5996 1.5995 0 .883-.7166 1.5996-1.5996 1.5996z'
4184+
fill='#000'
4185+
/>
4186+
<path
4187+
d='M0 27.9916c0 .5523.447715 1 1 1h4.58339c.8909 0 1.33707-1.0771.70711-1.7071l-4.58339-4.5834C1.07714 22.0711 0 22.5173 0 23.4082v4.5834zM9.997 10.997L1.70711 2.70711C1.07714 2.07714 0 2.52331 0 3.41421v5.16918c0 .26521.105357.51957.292893.7071L9.997 18.9946V10.997zM1.70711 12.7041C1.07714 12.0741 0 12.5203 0 13.4112v5.1692c0 .2652.105357.5196.292893.7071L9.997 28.9916V20.994l-8.28989-8.2899z'
4188+
fill='#1D4AFF'
4189+
/>
4190+
<path
4191+
d='M19.994 11.4112c0-.2652-.1053-.5196-.2929-.7071l-7.997-7.99699c-.6299-.62997-1.70709-.1838-1.70709.7071v5.16918c0 .26521.10539.51957.29289.7071l9.7041 9.70411v-7.5834zM9.99701 28.9916h5.58339c.8909 0 1.3371-1.0771.7071-1.7071L9.99701 20.994v7.9976zM9.99701 10.997v7.5834c0 .2652.10539.5196.29289.7071l9.7041 9.7041v-7.5834c0-.2652-.1053-.5196-.2929-.7071L9.99701 10.997z'
4192+
fill='#F54E00'
4193+
/>
4194+
</svg>
4195+
)
4196+
}
4197+
4198+
export function SentryIcon(props: SVGProps<SVGSVGElement>) {
4199+
return (
4200+
<svg
4201+
{...props}
4202+
width='800px'
4203+
height='800px'
4204+
viewBox='0 -14.5 256 256'
4205+
version='1.1'
4206+
xmlns='http://www.w3.org/2000/svg'
4207+
xmlnsXlink='http://www.w3.org/1999/xlink'
4208+
preserveAspectRatio='xMidYMid'
4209+
>
4210+
<g>
4211+
<path
4212+
d='M148.367708,12.4025287 C144.036807,5.21480737 136.258026,0.820118864 127.866362,0.820118864 C119.474697,0.820118864 111.695916,5.21480737 107.365016,12.4025287 L73.6403017,70.165071 C126.066153,96.3390588 160.689085,148.341727 164.615024,206.806542 L140.93597,206.806542 C137.017513,156.694333 106.874845,112.396698 61.6982677,90.3588968 L30.4849684,144.32869 C55.8497707,155.704426 73.6778379,179.211206 77.7918243,206.704035 L23.4120041,206.704035 C22.1018479,206.611361 20.9266153,205.864669 20.2861278,204.71799 C19.6456403,203.571311 19.6261529,202.179068 20.2342955,201.014912 L35.3027847,175.388229 C30.1976229,171.128798 24.3630321,167.829476 18.0816541,165.65009 L3.16692493,191.276772 C0.0305635285,196.656417 -0.818661742,203.068719 0.809210488,209.079324 C2.43708272,215.08993 6.40620885,220.197261 11.8287436,223.258872 C15.3657216,225.251729 19.3523095,226.310116 23.4120041,226.334074 L97.8831433,226.334074 C100.696274,191.620878 85.1423372,157.966047 56.8804514,137.614499 L68.7199787,117.113153 C104.398813,141.618242 124.473737,183.151896 121.510945,226.334074 L184.603837,226.334074 C187.593899,160.904124 155.557278,98.8221906 100.497065,63.3483734 L124.432386,22.3456815 C125.542508,20.4856859 127.944329,19.8680747 129.81399,20.9618406 C132.530418,22.4481882 233.807067,199.169791 235.703442,201.219925 C236.383476,202.439289 236.358897,203.929352 235.639016,205.125624 C234.919136,206.321896 233.614065,207.041397 232.218213,207.011555 L207.821611,207.011555 C208.129131,213.537817 208.129131,220.046994 207.821611,226.539592 L232.32072,226.539592 C238.604421,226.580218 244.643414,224.105731 249.091568,219.667205 C253.539722,215.228679 256.027289,209.195062 256,202.911286 C256.002825,198.802186 254.905596,194.767215 252.822066,191.225519 L148.367708,12.4025287 Z'
4213+
fill='#362D59'
4214+
/>
4215+
</g>
4216+
</svg>
4217+
)
4218+
}
4219+
4220+
export function IncidentioIcon(props: SVGProps<SVGSVGElement>) {
4221+
return (
4222+
<svg
4223+
{...props}
4224+
width='128'
4225+
height='163'
4226+
viewBox='0 0 128 163'
4227+
fill='none'
4228+
xmlns='http://www.w3.org/2000/svg'
4229+
>
4230+
<g clipPath='url(#clip0_1361_12561)'>
4231+
<path
4232+
fillRule='evenodd'
4233+
clipRule='evenodd'
4234+
d='M48.7336 139.642V163C20.7585 156.323 0 131.711 0 102.372C0 85.4557 7.15792 72.0354 18.1053 58.8703C27.1831 47.9534 49.5985 19.0426 56.6543 3.08954C58.3673 -0.783473 62.7348 -0.633805 64.6182 1.44721C70.6432 8.10421 78.0694 22.6432 80.4983 39.135C80.9932 42.4953 81.1969 45.2388 81.3587 47.4184C81.706 52.0954 81.8604 54.1748 84.2854 54.1748C88.0955 54.1748 90.588 48.3977 91.1358 42.4345C91.4869 38.6136 95.2774 37.3346 97.8914 38.6136C110.463 44.7644 123.292 74.0426 126.393 88.4102C127.366 92.9158 128 97.5719 128 102.372C128 131.646 107.335 156.214 79.4537 162.955V139.642H48.7336ZM64.0002 130.333C73.8316 130.333 81.8016 122.789 81.8016 113.483C81.8016 98.6407 70.8577 88.0345 65.4048 84.8105C65.0364 84.5928 64.8523 84.4839 64.3512 84.4974C63.9843 84.5073 63.4429 84.7369 63.181 84.9935C62.8232 85.3441 62.7283 85.743 62.5387 86.5409C61.5721 90.6065 58.5292 93.5054 55.327 96.556C50.9141 100.76 46.1988 105.252 46.1988 113.483C46.1988 122.789 54.1688 130.333 64.0002 130.333Z'
4235+
fill='#F25533'
4236+
/>
4237+
</g>
4238+
<defs>
4239+
<clipPath id='clip0_1361_12561'>
4240+
<rect width='128' height='163' fill='white' />
4241+
</clipPath>
4242+
</defs>
4243+
</svg>
4244+
)
4245+
}

apps/docs/components/ui/button.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { cva, type VariantProps } from 'class-variance-authority'
2+
3+
const variants = {
4+
primary: 'bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80',
5+
outline: 'border hover:bg-fd-accent hover:text-fd-accent-foreground',
6+
ghost: 'hover:bg-fd-accent hover:text-fd-accent-foreground',
7+
secondary:
8+
'border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground',
9+
} as const
10+
11+
export const buttonVariants = cva(
12+
'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',
13+
{
14+
variants: {
15+
variant: variants,
16+
color: variants,
17+
size: {
18+
sm: 'gap-1 px-2 py-1.5 text-xs',
19+
icon: 'p-1.5 [&_svg]:size-5',
20+
'icon-sm': 'p-1.5 [&_svg]:size-4.5',
21+
'icon-xs': 'p-1 [&_svg]:size-4',
22+
},
23+
},
24+
}
25+
)
26+
27+
export type ButtonProps = VariantProps<typeof buttonVariants>

apps/docs/components/ui/copy-page-button.tsx

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,48 @@
33
import { useState } from 'react'
44
import { Check, Copy } from 'lucide-react'
55

6+
const cache = new Map<string, string>()
7+
68
interface CopyPageButtonProps {
7-
content: string
9+
markdownUrl: string
810
}
911

10-
export function CopyPageButton({ content }: CopyPageButtonProps) {
12+
export function CopyPageButton({ markdownUrl }: CopyPageButtonProps) {
1113
const [copied, setCopied] = useState(false)
14+
const [isLoading, setLoading] = useState(false)
1215

1316
const handleCopy = async () => {
17+
const cached = cache.get(markdownUrl)
18+
if (cached) {
19+
await navigator.clipboard.writeText(cached)
20+
setCopied(true)
21+
setTimeout(() => setCopied(false), 2000)
22+
return
23+
}
24+
25+
setLoading(true)
1426
try {
15-
await navigator.clipboard.writeText(content)
27+
await navigator.clipboard.write([
28+
new ClipboardItem({
29+
'text/plain': fetch(markdownUrl).then(async (res) => {
30+
const content = await res.text()
31+
cache.set(markdownUrl, content)
32+
return content
33+
}),
34+
}),
35+
])
1636
setCopied(true)
1737
setTimeout(() => setCopied(false), 2000)
1838
} catch (err) {
1939
console.error('Failed to copy:', err)
40+
} finally {
41+
setLoading(false)
2042
}
2143
}
2244

2345
return (
2446
<button
47+
disabled={isLoading}
2548
onClick={handleCopy}
2649
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'
2750
aria-label={copied ? 'Copied to clipboard' : 'Copy page content'}

apps/docs/components/ui/icon-mapping.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
HuggingFaceIcon,
3333
HunterIOIcon,
3434
ImageIcon,
35+
IncidentioIcon,
3536
JinaAIIcon,
3637
JiraIcon,
3738
LinearIcon,
@@ -55,11 +56,13 @@ import {
5556
PineconeIcon,
5657
PipedriveIcon,
5758
PostgresIcon,
59+
PosthogIcon,
5860
QdrantIcon,
5961
RedditIcon,
6062
ResendIcon,
6163
S3Icon,
6264
SalesforceIcon,
65+
SentryIcon,
6366
SerperIcon,
6467
SlackIcon,
6568
STTIcon,
@@ -112,11 +115,13 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
112115
slack: SlackIcon,
113116
sharepoint: MicrosoftSharepointIcon,
114117
serper: SerperIcon,
118+
sentry: SentryIcon,
115119
salesforce: SalesforceIcon,
116120
s3: S3Icon,
117121
resend: ResendIcon,
118122
reddit: RedditIcon,
119123
qdrant: QdrantIcon,
124+
posthog: PosthogIcon,
120125
postgresql: PostgresIcon,
121126
pipedrive: PipedriveIcon,
122127
pinecone: PineconeIcon,
@@ -140,6 +145,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
140145
knowledge: PackageSearchIcon,
141146
jira: JiraIcon,
142147
jina: JinaAIIcon,
148+
incidentio: IncidentioIcon,
143149
image_generator: ImageIcon,
144150
hunter: HunterIOIcon,
145151
huggingface: HuggingFaceIcon,

apps/docs/content/docs/en/blocks/agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The Agent block supports multiple LLM providers through a unified inference inte
4646
- **Anthropic**: Claude 4.5 Sonnet, Claude Opus 4.1
4747
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
4848
- **Other Providers**: Groq, Cerebras, xAI, Azure OpenAI, OpenRouter
49-
- **Local Models**: Ollama-compatible models
49+
- **Local Models**: Ollama or VLLM compatible models
5050

5151
### Temperature
5252

apps/docs/content/docs/en/blocks/evaluator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Choose an AI model to perform the evaluation:
5252
- **Anthropic**: Claude 3.7 Sonnet
5353
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
5454
- **Other Providers**: Groq, Cerebras, xAI, DeepSeek
55-
- **Local Models**: Ollama-compatible models
55+
- **Local Models**: Ollama or VLLM compatible models
5656

5757
Use models with strong reasoning capabilities like GPT-4o or Claude 3.7 Sonnet for best results.
5858

apps/docs/content/docs/en/blocks/guardrails.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Uses Retrieval-Augmented Generation (RAG) with LLM scoring to detect when AI-gen
6565
**Configuration:**
6666
- **Knowledge Base**: Select from your existing knowledge bases
6767
- **Model**: Choose LLM for scoring (requires strong reasoning - GPT-4o, Claude 3.7 Sonnet recommended)
68-
- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama models)
68+
- **API Key**: Authentication for selected LLM provider (auto-hidden for hosted/Ollama or VLLM compatible models)
6969
- **Confidence Threshold**: Minimum score to pass (0-10, default: 3)
7070
- **Top K** (Advanced): Number of knowledge base chunks to retrieve (default: 10)
7171

0 commit comments

Comments
 (0)