Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 1 addition & 7 deletions apps/docs/app/[lang]/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
<div className='relative mt-6 sm:mt-0'>
<div className='absolute top-1 right-0 flex items-center gap-2'>
<div className='hidden sm:flex'>
<CopyPageButton
content={`# ${page.data.title}

${page.data.description || ''}

${page.data.content || ''}`}
/>
<CopyPageButton markdownUrl={`${page.url}.mdx`} />
</div>
<PageNavigationArrows previous={neighbours?.previous} next={neighbours?.next} />
</div>
Expand Down
6 changes: 5 additions & 1 deletion apps/docs/app/llms.mdx/[[...slug]]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export async function GET(_req: NextRequest, { params }: { params: Promise<{ slu
const page = source.getPage(slug)
if (!page) notFound()

return new NextResponse(await getLLMText(page))
return new NextResponse(await getLLMText(page), {
headers: {
'Content-Type': 'text/markdown',
},
})
}

export function generateStaticParams() {
Expand Down
11 changes: 11 additions & 0 deletions apps/docs/cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"aliases": {
"uiDir": "./components/ui",
"componentsDir": "./components",
"blockDir": "./components",
"cssDir": "./styles",
"libDir": "./lib"
},
"baseDir": "",
"commands": {}
}
194 changes: 194 additions & 0 deletions apps/docs/components/icons.tsx

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions apps/docs/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -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>
29 changes: 26 additions & 3 deletions apps/docs/components/ui/copy-page-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down
14 changes: 14 additions & 0 deletions apps/docs/components/ui/icon-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ import {
HuggingFaceIcon,
HunterIOIcon,
ImageIcon,
IncidentioIcon,
IntercomIcon,
JinaAIIcon,
JiraIcon,
LinearIcon,
LinkupIcon,
MailchimpIcon,
Mem0Icon,
MicrosoftExcelIcon,
MicrosoftOneDriveIcon,
Expand All @@ -55,11 +58,14 @@ import {
PineconeIcon,
PipedriveIcon,
PostgresIcon,
PosthogIcon,
PylonIcon,
QdrantIcon,
RedditIcon,
ResendIcon,
S3Icon,
SalesforceIcon,
SentryIcon,
SerperIcon,
SlackIcon,
STTIcon,
Expand All @@ -80,13 +86,15 @@ import {
WikipediaIcon,
xIcon,
YouTubeIcon,
ZendeskIcon,
ZepIcon,
} from '@/components/icons'

type IconComponent = ComponentType<SVGProps<SVGSVGElement>>

export const blockTypeToIconMap: Record<string, IconComponent> = {
zep: ZepIcon,
zendesk: ZendeskIcon,
youtube: YouTubeIcon,
x: xIcon,
wikipedia: WikipediaIcon,
Expand All @@ -112,11 +120,14 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
slack: SlackIcon,
sharepoint: MicrosoftSharepointIcon,
serper: SerperIcon,
sentry: SentryIcon,
salesforce: SalesforceIcon,
s3: S3Icon,
resend: ResendIcon,
reddit: RedditIcon,
qdrant: QdrantIcon,
pylon: PylonIcon,
posthog: PosthogIcon,
postgresql: PostgresIcon,
pipedrive: PipedriveIcon,
pinecone: PineconeIcon,
Expand All @@ -135,11 +146,14 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
microsoft_excel: MicrosoftExcelIcon,
memory: BrainIcon,
mem0: Mem0Icon,
mailchimp: MailchimpIcon,
linkup: LinkupIcon,
linear: LinearIcon,
knowledge: PackageSearchIcon,
jira: JiraIcon,
jina: JinaAIIcon,
intercom: IntercomIcon,
incidentio: IncidentioIcon,
image_generator: ImageIcon,
hunter: HunterIOIcon,
huggingface: HuggingFaceIcon,
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/de/blocks/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Der Agent-Block unterstützt mehrere LLM-Anbieter über eine einheitliche Infere
- **Anthropic**: Claude 4.5 Sonnet, Claude Opus 4.1
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, Azure OpenAI, OpenRouter
- **Lokale Modelle**: Ollama-kompatible Modelle
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle

### Temperatur

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/de/blocks/evaluator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Wählen Sie ein KI-Modell für die Durchführung der Bewertung:
- **Anthropic**: Claude 3.7 Sonnet
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek
- **Lokale Modelle**: Ollama-kompatible Modelle
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle

Verwenden Sie Modelle mit starken Argumentationsfähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für beste Ergebnisse.

Expand Down
8 changes: 4 additions & 4 deletions apps/docs/content/docs/de/blocks/guardrails.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ Verwendet Retrieval-Augmented Generation (RAG) mit LLM-Bewertung, um zu erkennen
4. Validierung besteht, wenn der Wert ≥ Schwellenwert ist (Standard: 3)

**Konfiguration:**
- **Wissensdatenbank**: Auswahl aus Ihren vorhandenen Wissensdatenbanken
- **Modell**: Wahl des LLM für die Bewertung (erfordert starkes Reasoning - GPT-4o, Claude 3.7 Sonnet empfohlen)
- **API-Schlüssel**: Authentifizierung für den ausgewählten LLM-Anbieter (automatisch ausgeblendet für gehostete/Ollama-Modelle)
- **Konfidenz-Schwellenwert**: Mindestwert zum Bestehen (0-10, Standard: 3)
- **Wissensdatenbank**: Wählen Sie aus Ihren vorhandenen Wissensdatenbanken
- **Modell**: Wählen Sie LLM für die Bewertung (erfordert starkes Denkvermögen - GPT-4o, Claude 3.7 Sonnet empfohlen)
- **API-Schlüssel**: Authentifizierung für den ausgewählten LLM-Anbieter (automatisch ausgeblendet für gehostete/Ollama oder VLLM-kompatible Modelle)
- **Vertrauensschwelle**: Mindestpunktzahl zum Bestehen (0-10, Standard: 3)
- **Top K** (Erweitert): Anzahl der abzurufenden Wissensdatenbank-Chunks (Standard: 10)

**Ausgabe:**
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/de/blocks/router.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Wähle ein KI-Modell für die Weiterleitungsentscheidung:
- **Anthropic**: Claude 3.7 Sonnet
- **Google**: Gemini 2.5 Pro, Gemini 2.0 Flash
- **Andere Anbieter**: Groq, Cerebras, xAI, DeepSeek
- **Lokale Modelle**: Ollama-kompatible Modelle
- **Lokale Modelle**: Ollama oder VLLM-kompatible Modelle

Verwende Modelle mit starken Argumentationsfähigkeiten wie GPT-4o oder Claude 3.7 Sonnet für beste Ergebnisse.

Expand Down
Loading
Loading