Skip to content

Commit 3f2aff5

Browse files
Merge branch 'main' into improvement/sim-294
2 parents 66ed5ec + 9a4b9e2 commit 3f2aff5

File tree

189 files changed

+14907
-2495
lines changed

Some content is hidden

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

189 files changed

+14907
-2495
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import Link from 'next/link'
66
import { notFound } from 'next/navigation'
77
import { StructuredData } from '@/components/structured-data'
88
import { CodeBlock } from '@/components/ui/code-block'
9+
import { CopyPageButton } from '@/components/ui/copy-page-button'
910
import { source } from '@/lib/source'
1011

11-
export const dynamic = 'force-dynamic'
12-
1312
export default async function Page(props: { params: Promise<{ slug?: string[]; lang: string }> }) {
1413
const params = await props.params
1514
const page = source.getPage(params.slug, params.lang)
@@ -193,8 +192,19 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
193192
component: <CustomFooter />,
194193
}}
195194
>
196-
<DocsTitle>{page.data.title}</DocsTitle>
197-
<DocsDescription>{page.data.description}</DocsDescription>
195+
<div className='relative'>
196+
<div className='absolute top-1 right-0'>
197+
<CopyPageButton
198+
content={`# ${page.data.title}
199+
200+
${page.data.description || ''}
201+
202+
${page.data.content || ''}`}
203+
/>
204+
</div>
205+
<DocsTitle>{page.data.title}</DocsTitle>
206+
<DocsDescription>{page.data.description}</DocsDescription>
207+
</div>
198208
<DocsBody>
199209
<MDX
200210
components={{

apps/docs/app/global.css

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
/* Shift the sidebar slightly left from the content edge for extra breathing room */
3737
--sidebar-shift: 90px;
3838
--sidebar-offset: max(0px, calc(var(--edge-gutter) - var(--sidebar-shift)));
39-
--toc-offset: var(--edge-gutter);
39+
/* Shift TOC slightly right to match sidebar spacing for symmetry */
40+
--toc-shift: 90px;
41+
--toc-offset: max(0px, calc(var(--edge-gutter) - var(--toc-shift)));
4042
/* Sidebar and TOC have 20px internal padding - navbar accounts for this directly */
4143
/* Extra gap between sidebar/TOC and the main text content */
4244
--content-gap: 1.75rem;
@@ -50,9 +52,7 @@
5052

5153
/* Light mode navbar and search styling */
5254
:root:not(.dark) nav {
53-
background-color: hsla(0, 0%, 96%, 0.92) !important;
54-
backdrop-filter: blur(25px) saturate(180%) brightness(1.05) !important;
55-
-webkit-backdrop-filter: blur(25px) saturate(180%) brightness(1.05) !important;
55+
background-color: hsla(0, 0%, 96%, 0.85) !important;
5656
}
5757

5858
:root:not(.dark) nav button[type="button"] {
@@ -66,6 +66,13 @@
6666
color: rgba(0, 0, 0, 0.6) !important;
6767
}
6868

69+
/* Dark mode navbar and search styling */
70+
:root.dark nav {
71+
background-color: hsla(0, 0%, 7.04%, 0.92) !important;
72+
backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
73+
-webkit-backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
74+
}
75+
6976
/* ============================================
7077
Custom Sidebar Styling (Turborepo-inspired)
7178
============================================ */
@@ -107,8 +114,21 @@ aside#nd-sidebar {
107114
aside#nd-sidebar {
108115
left: var(--sidebar-offset) !important;
109116
}
110-
[data-toc] {
111-
margin-right: var(--toc-offset) !important;
117+
/* TOC positioning - target all possible selectors */
118+
[data-toc],
119+
aside[data-toc],
120+
div[data-toc],
121+
.fd-toc,
122+
#nd-toc,
123+
nav[data-toc],
124+
aside:has([role="complementary"]) {
125+
right: var(--toc-offset) !important;
126+
}
127+
128+
/* Alternative TOC container targeting */
129+
[data-docs-page] > aside:last-child,
130+
main ~ aside {
131+
right: var(--toc-offset) !important;
112132
}
113133
}
114134

apps/docs/components/navbar/navbar.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@ export function Navbar() {
1111
<nav
1212
className='sticky top-0 z-50 border-border/50 border-b'
1313
style={{
14-
backgroundColor: 'hsla(0, 0%, 7.04%, 0.92)',
15-
backdropFilter: 'blur(25px) saturate(180%) brightness(0.6)',
16-
WebkitBackdropFilter: 'blur(25px) saturate(180%) brightness(0.6)',
14+
backdropFilter: 'blur(25px) saturate(180%)',
15+
WebkitBackdropFilter: 'blur(25px) saturate(180%)',
1716
}}
1817
>
1918
{/* Desktop: Single row layout */}
2019
<div className='hidden h-16 w-full items-center lg:flex'>
2120
<div
22-
className='grid w-full grid-cols-[auto_1fr_auto] items-center'
21+
className='relative flex w-full items-center justify-between'
2322
style={{
2423
paddingLeft: 'calc(var(--sidebar-offset) + 20px)',
25-
paddingRight: 'calc(var(--toc-offset) + 20px)',
24+
paddingRight: 'calc(var(--toc-offset) + 60px)',
2625
}}
2726
>
28-
{/* Left cluster: translate by sidebar delta to align with sidebar edge */}
27+
{/* Left cluster: logo */}
2928
<div className='flex items-center'>
3029
<Link href='/' className='flex min-w-[100px] items-center'>
3130
<Image
@@ -38,12 +37,12 @@ export function Navbar() {
3837
</Link>
3938
</div>
4039

41-
{/* Center cluster: search */}
42-
<div className='flex flex-1 items-center justify-center pl-32'>
40+
{/* Center cluster: search - absolutely positioned to center */}
41+
<div className='-translate-x-1/2 absolute left-1/2 flex items-center justify-center'>
4342
<SearchTrigger />
4443
</div>
4544

46-
{/* Right cluster aligns with TOC edge using the same right gutter */}
45+
{/* Right cluster aligns with TOC edge */}
4746
<div className='flex items-center gap-4'>
4847
<Link
4948
href='https://sim.ai'
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use client'
2+
3+
import { useState } from 'react'
4+
import { Check, Copy } from 'lucide-react'
5+
6+
interface CopyPageButtonProps {
7+
content: string
8+
}
9+
10+
export function CopyPageButton({ content }: CopyPageButtonProps) {
11+
const [copied, setCopied] = useState(false)
12+
13+
const handleCopy = async () => {
14+
try {
15+
await navigator.clipboard.writeText(content)
16+
setCopied(true)
17+
setTimeout(() => setCopied(false), 2000)
18+
} catch (err) {
19+
console.error('Failed to copy:', err)
20+
}
21+
}
22+
23+
return (
24+
<button
25+
onClick={handleCopy}
26+
className='flex items-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-1.5 text-muted-foreground/60 text-sm transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
27+
aria-label={copied ? 'Copied to clipboard' : 'Copy page content'}
28+
>
29+
{copied ? (
30+
<>
31+
<Check className='h-4 w-4' />
32+
<span>Copied</span>
33+
</>
34+
) : (
35+
<>
36+
<Copy className='h-4 w-4' />
37+
<span>Copy page</span>
38+
</>
39+
)}
40+
</button>
41+
)
42+
}

apps/docs/content/docs/de/blocks/index.mdx

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Blöcke sind die Bausteine, die du miteinander verbindest, um KI-Workflows zu er
1616

1717
## Grundlegende Blocktypen
1818

19-
Sim bietet sieben grundlegende Blocktypen, die die wesentlichen Funktionen von KI-Workflows abdecken:
19+
Sim bietet wesentliche Blocktypen, die die Kernfunktionen von KI-Workflows abdecken:
2020

2121
### Verarbeitungsblöcke
2222
- **[Agent](/blocks/agent)** - Chatte mit KI-Modellen (OpenAI, Anthropic, Google, lokale Modelle)
@@ -28,16 +28,20 @@ Sim bietet sieben grundlegende Blocktypen, die die wesentlichen Funktionen von K
2828
- **[Router](/blocks/router)** - Nutze KI, um Anfragen intelligent auf verschiedene Pfade zu leiten
2929
- **[Evaluator](/blocks/evaluator)** - Bewerte und beurteile die Inhaltsqualität mit KI
3030

31+
### Ablaufsteuerungsblöcke
32+
- **[Variablen](/blocks/variables)** - Workflow-bezogene Variablen setzen und verwalten
33+
- **[Warten](/blocks/wait)** - Workflow-Ausführung für eine bestimmte Zeitverzögerung pausieren
34+
3135
### Ausgabeblöcke
32-
- **[Response](/blocks/response)** - Formatiere und gib endgültige Ergebnisse aus deinem Workflow zurück
36+
- **[Antwort](/blocks/response)** - Formatieren und Zurückgeben der endgültigen Ergebnisse aus Ihrem Workflow
3337

3438
## Wie Blöcke funktionieren
3539

3640
Jeder Block hat drei Hauptkomponenten:
3741

3842
**Eingaben**: Daten, die in den Block von anderen Blöcken oder Benutzereingaben kommen
39-
**Konfiguration**: Einstellungen, die das Verhalten des Blocks steuern
40-
**Ausgaben**: Daten, die der Block für andere Blöcke produziert
43+
**Konfiguration**: Einstellungen, die steuern, wie der Block sich verhält
44+
**Ausgaben**: Daten, die der Block für andere Blöcke zur Verwendung erzeugt
4145

4246
<Steps>
4347
<Step>
@@ -56,7 +60,7 @@ Jeder Block hat drei Hauptkomponenten:
5660
Sie erstellen Workflows, indem Sie Blöcke miteinander verbinden. Die Ausgabe eines Blocks wird zur Eingabe eines anderen:
5761

5862
- **Ziehen zum Verbinden**: Ziehen Sie von einem Ausgabeport zu einem Eingabeport
59-
- **Mehrfachverbindungen**: Eine Ausgabe kann mit mehreren Eingängen verbunden werden
63+
- **Mehrfachverbindungen**: Eine Ausgabe kann mit mehreren Eingaben verbunden werden
6064
- **Verzweigende Pfade**: Einige Blöcke können basierend auf Bedingungen zu verschiedenen Pfaden weiterleiten
6165

6266
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
@@ -73,7 +77,7 @@ User Input → Agent → Function → Response
7377
```
7478

7579
### Bedingte Verzweigung
76-
Verwenden Sie Bedingungsblöcke oder Router-Blöcke, um verschiedene Pfade zu erstellen:
80+
Verwenden Sie Bedingung- oder Router-Blöcke, um verschiedene Pfade zu erstellen:
7781

7882
```
7983
User Input → Router → Agent A (for questions)
@@ -93,37 +97,43 @@ Agent → Evaluator → Condition → Response (if good)
9397
Jeder Blocktyp hat spezifische Konfigurationsoptionen:
9498

9599
**Alle Blöcke**:
96-
- Ein-/Ausgabeverbindungen
100+
- Eingabe-/Ausgabeverbindungen
97101
- Fehlerbehandlungsverhalten
98-
- Zeitüberschreitungseinstellungen für die Ausführung
102+
- Einstellungen für Ausführungs-Timeout
99103

100104
**KI-Blöcke** (Agent, Router, Evaluator):
101105
- Modellauswahl (OpenAI, Anthropic, Google, lokal)
102106
- API-Schlüssel und Authentifizierung
103-
- Temperature und andere Modellparameter
107+
- Temperatur und andere Modellparameter
104108
- Systemaufforderungen und Anweisungen
105109

106-
**Logikblöcke** (Bedingung, Funktion):
110+
**Logik-Blöcke** (Bedingung, Funktion):
107111
- Benutzerdefinierte Ausdrücke oder Code
108112
- Variablenreferenzen
109-
- Einstellungen für die Ausführungsumgebung
113+
- Einstellungen für Ausführungsumgebung
110114

111-
**Integrationsblöcke** (API, Antwort):
115+
**Integrations-Blöcke** (API, Response):
112116
- Endpunktkonfiguration
113117
- Header und Authentifizierung
114118
- Anfrage-/Antwortformatierung
115119

116120
<Cards>
117-
<Card title="Agent Block" href="/blocks/agent">
118-
Verbindung zu KI-Modellen herstellen und intelligente Antworten erzeugen
121+
<Card title="Agent-Block" href="/blocks/agent">
122+
Verbindung zu KI-Modellen herstellen und intelligente Antworten erstellen
119123
</Card>
120-
<Card title="Function Block" href="/blocks/function">
124+
<Card title="Funktions-Block" href="/blocks/function">
121125
Benutzerdefinierten Code ausführen, um Daten zu verarbeiten und zu transformieren
122126
</Card>
123-
<Card title="API Block" href="/blocks/api">
127+
<Card title="API-Block" href="/blocks/api">
124128
Integration mit externen Diensten und APIs
125129
</Card>
126-
<Card title="Condition Block" href="/blocks/condition">
130+
<Card title="Bedingungs-Block" href="/blocks/condition">
127131
Verzweigende Logik basierend auf Datenbewertung erstellen
128132
</Card>
133+
<Card title="Variablen-Block" href="/blocks/variables">
134+
Workflow-bezogene Variablen setzen und verwalten
135+
</Card>
136+
<Card title="Warte-Block" href="/blocks/wait">
137+
Workflow-Ausführung für bestimmte Zeitverzögerungen pausieren
138+
</Card>
129139
</Cards>

0 commit comments

Comments
 (0)