Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Update docs

Vasek Mlejnskycf8541c662c1
diff --git a/apps/web/src/app/(docs)/docs/page.mdx b/apps/web/src/app/(docs)/docs/page.mdx
index 2374002f8..2a6739044 100644
--- a/apps/web/src/app/(docs)/docs/page.mdx
+++ b/apps/web/src/app/(docs)/docs/page.mdx
@@ -5,6 +5,7 @@ import { Button } from '@/components/Button'
import { Quickstart } from '@/components/Quickstart'
import { Concepts } from '@/components/Concepts'
import { UseCases } from '@/components/UseCases'
+import { CodeInterpreting } from '@/components/CodeInterpreting'
<HeroPattern />
@@ -36,9 +37,8 @@ For example, if you were building an AI data analysis chatbot, you would start t
## Quickstart
<Quickstart/>
-## [TODO] Code interpreting
-1. Analyze data with LLM & E2B
-2. Create charts & visualizations
+## Code interpreting with AI
+<CodeInterpreting/>
## Learn the core concepts
diff --git a/apps/web/src/app/(docs)/docs/quickstart/support/page.mdx b/apps/web/src/app/(docs)/docs/quickstart/support/page.mdx
new file mode 100644
index 000000000..25a2f15ef
--- /dev/null
+++ b/apps/web/src/app/(docs)/docs/quickstart/support/page.mdx
@@ -0,0 +1,4 @@
+
+# Support
+
+
diff --git a/apps/web/src/components/CodeInterpreting.tsx b/apps/web/src/components/CodeInterpreting.tsx
new file mode 100644
index 000000000..76bdd4f6b
--- /dev/null
+++ b/apps/web/src/components/CodeInterpreting.tsx
@@ -0,0 +1,39 @@
+import {
+ PlayCircle,
+} from 'lucide-react'
+
+import {
+ BoxItem,
+ BoxGrid,
+} from '@/components/DocsBox'
+
+const items: BoxItem[] = [
+ {
+ href: '/docs/code-interpreting/analyze-data-with-ai',
+ title: 'Analyze data with AI',
+ description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
+ icon: <PlayCircle strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ },
+ {
+ href: '/docs/code-interpreting/create-charts-visualizations',
+ title: 'Create charts & visualizations',
+ description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
+ icon: <PlayCircle strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ },
+ {
+ href: '/docs/code-interpreting/connect-your-data',
+ title: 'Connect your data',
+ description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
+ icon: <PlayCircle strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ },
+ {
+ href: '/docs/code-interpreting/todo',
+ title: 'Parsing code execution result',
+ description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ut purus eget sapien. Sed ut purus eget sapien.',
+ icon: <PlayCircle strokeWidth={1.5} className="h-5 w-5 transition-colors duration-300 fill-white/10 stroke-zinc-400 group-hover:fill-brand-300/10 group-hover:stroke-brand-400" />,
+ },
+]
+
+export function CodeInterpreting() {
+ return <BoxGrid items={items} />
+}
diff --git a/apps/web/src/components/Concepts.tsx b/apps/web/src/components/Concepts.tsx
index a0789b11c..61cd8ed28 100644
--- a/apps/web/src/components/Concepts.tsx
+++ b/apps/web/src/components/Concepts.tsx
@@ -38,5 +38,5 @@ const concepts: BoxItem[] = [
]
export function Concepts() {
- return <BoxGrid items={concepts} />
+ return <BoxGrid items={concepts} noBackground />
}
diff --git a/apps/web/src/components/DocsBox.tsx b/apps/web/src/components/DocsBox.tsx
index c0df2a23e..b7285af18 100644
--- a/apps/web/src/components/DocsBox.tsx
+++ b/apps/web/src/components/DocsBox.tsx
@@ -1,5 +1,6 @@
'use client'
import { ReactNode } from 'react'
+import clsx from 'clsx'
import Link from 'next/link'
import { useMotionValue } from 'framer-motion'
@@ -10,15 +11,20 @@ export interface BoxItem {
icon: ReactNode
}
-function Icon({ icon }: { icon: ReactNode }) {
+function Icon({ icon, noBackground }: { icon: ReactNode, noBackground?: boolean }) {
return (
- <div className="flex h-8 w-8 items-center justify-center rounded-full bg-zinc-900/5 ring-1 ring-zinc-900/25 backdrop-blur-[2px] transition duration-300 group-hover:bg-white/50 group-hover:ring-zinc-900/25 dark:bg-white/7.5 dark:ring-white/15 dark:group-hover:bg-brand-300/10 dark:group-hover:ring-brand-400">
+ <div className={
+ clsx(
+ 'flex h-8 w-8 items-center justify-center rounded-full backdrop-blur-[2px] transition duration-300 ',
+ noBackground ? 'bg-none ring-0' : 'ring-1 ring-white/15 bg-white/7.5 group-hover:bg-brand-300/10 group-hover:ring-brand-400',
+ )
+ }>
{icon}
</div>
)
}
-export function DocsBox({ item: { href, title, description, icon } }: { item: BoxItem }) {
+export function DocsBox({ item: { href, title, description, icon }, noBackground }: { item: BoxItem, noBackground?: boolean }) {
const mouseX = useMotionValue(0)
const mouseY = useMotionValue(0)
@@ -32,36 +38,53 @@ export function DocsBox({ item: { href, title, description, icon } }: { item: Bo
<div
key={href}
onMouseMove={onMouseMove}
- className="group relative flex rounded-2xl transition-shadow hover:shadow-md bg-white/2.5 hover:shadow-black/5"
+ className={clsx('group relative flex rounded-2xl transition-shadow hover:shadow-md', noBackground ? 'bg-none hover:bg-none' : 'bg-white/2.5 hover:shadow-black/5')}
>
<div
- className="absolute inset-0 rounded-2xl ring-1 ring-inset ring-white/10 group-hover:ring-white/20" />
- <div className="relative rounded-2xl px-4 pb-4 pt-16">
- <Icon icon={icon} />
- {/* <UseCaseIcon icon={icon} /> */}
- <h3 className="mt-4 text-sm font-semibold leading-7 text-white">
- <Link href={href}>
- <span className="absolute inset-0 rounded-2xl" />
- {title}
- </Link>
- </h3>
- <p className="mt-1 text-sm text-zinc-400">
- {description}
- </p>
- </div>
+ className={clsx('absolute inset-0 rounded-2xl', noBackground ? 'ring-0 outline-none' : 'ring-1 ring-inset ring-white/10 group-hover:ring-white/20')} />
+ {noBackground ? (
+ <div className="relative flex items-start justify-start gap-4">
+ <Icon icon={icon} noBackground={true} />
+ <div className="flex flex-col gap-1 items-start justify-start">
+ <h3 className="text-sm font-semibold leading-7 text-white">
+ <Link href={href}>
+ <span className="absolute inset-0 rounded-2xl" />
+ {title}
+ </Link>
+ </h3>
+ <p className="mt-1 text-sm text-zinc-400">
+ {description}
+ </p>
+ </div>
+ </div>
+ ) : (
+ <div className="relative rounded-2xl px-4 pb-4 pt-16">
+ <Icon icon={icon} />
+ <h3 className="mt-4 text-sm font-semibold leading-7 text-white">
+ <Link href={href}>
+ <span className="absolute inset-0 rounded-2xl" />
+ {title}
+ </Link>
+ </h3>
+ <p className="mt-1 text-sm text-zinc-400">
+ {description}
+ </p>
+ </div>
+ )}
</div>
)
}
-export function BoxGrid({ items }: { items: Array<BoxItem> }) {
+export function BoxGrid({ items, noBackground }: { items: Array<BoxItem>, noBackground?: boolean }) {
return (
<div className="xl:max-w-none">
<div
- className="not-prose grid grid-cols-1 gap-8 sm:grid-cols-2 xl:grid-cols-4">
+ className="mt-4 not-prose grid grid-cols-1 gap-8 sm:grid-cols-2 xl:grid-cols-4">
{items.map(item => (
<DocsBox
key={item.href}
item={item}
+ noBackground={noBackground}
/>
))}
</div>
diff --git a/apps/web/src/components/Navigation/routes.tsx b/apps/web/src/components/Navigation/routes.tsx
index bfe7e3ebf..5c8d3265d 100644
--- a/apps/web/src/components/Navigation/routes.tsx
+++ b/apps/web/src/components/Navigation/routes.tsx
@@ -91,7 +91,7 @@ export const routes: NavGroup[] = [
icon: <MessagesSquare size={16} />,
},
{
- title: '* Migrating from SDK v0.* to v1.*',
+ title: '* Migrating from v0.* to v1.*',
href: '/docs/quickstart/migrating-from-v0',
},
],
@@ -158,6 +158,10 @@ export const routes: NavGroup[] = [
},
],
},
+ {
+ title: '* Create charts & visualizations',
+ href: '/docs/code-interpreting/create-charts-visualizations',
+ },
{
title: '* Connect your data',
href: '/docs/code-interpreting/connect-your-data',
@@ -188,7 +192,7 @@ export const routes: NavGroup[] = [
]
},
{
- title: '* Code interpreting results',
+ title: '* Parsing code execution result',
href: '/docs/code-interpreting/todo',
},
]