Skip to content

Commit 2488206

Browse files
github-actions[bot]nearestnaborscursoragent
authored
Editorial improvements for #646 (#660)
* Editorial: Structure - Added intro line explaining what readers will learn; Voice and tone - Removed marketing language "seamlessly" and "making it easy" * Editorial: Structure - Removed marketing language "straightforward" in opening paragraph; Voice and tone - Changed "Let's get started!" to more direct language; Structure - Modified intro to better follow 10/20/70 format * Update app/en/guides/agent-frameworks/vercelai/page.mdx * Update app/en/guides/agent-frameworks/vercelai/page.mdx * Restore missing Chat component code section The code section from lines 883-944 was accidentally removed. This commit restores: - Complete condition check for empty messages - Message rendering logic with auth handling - Loader display for assistant responses - AuthPendingUI integration - PromptInput form section - Proper closing tags for the complete code example Co-authored-by: nabors <nabors@arcade.dev> * Fix MDX syntax errors: convert HTML comments to JSX comments - Removed stray ```mdx code fence from page.mdx - Converted HTML comments to JSX comment syntax {/* */} - Moved editorial comment from before frontmatter to after imports This fixes the MDX parsing error: 'Unexpected character `!` before name' Co-authored-by: nabors <nabors@arcade.dev> * Fix duplicate Chat component code and malformed code block Removed incorrectly duplicated code that was added when restoring the missing section. The Chat component now correctly appears: - Once in the step-by-step guide (lines 428-525) - Once in the Complete code section at the end (lines 800-947) This fixes the malformed ```.role line that was breaking the code block. Co-authored-by: nabors <nabors@arcade.dev> * Update app/en/guides/agent-frameworks/vercelai/page.mdx --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: RL "Nearest" Nabors <236306+nearestnabors@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: nabors <nabors@arcade.dev>
1 parent a62d3a7 commit 2488206

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

app/en/guides/agent-frameworks/page.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { PlatformCard } from "@/app/_components/platform-card";
22
import { Tabs } from "nextra/components";
33

4+
{/* Editorial: Structure - Added intro line explaining what readers will learn; Voice and tone - Removed marketing language "seamlessly" and "making it straightforward" */}
5+
46
# Arcade with Agent Frameworks and MCP Clients
57

6-
Arcade seamlessly integrates with your favorite agent frameworks and MCP clients, making it easy to add powerful tool-calling capabilities to your AI applications.
8+
Arcade integrates with agent frameworks and MCP clients to add tool-calling capabilities to your AI applications.
79

810
## Agent Frameworks
911

@@ -65,3 +67,4 @@ Arcade seamlessly integrates with your favorite agent frameworks and MCP clients
6567
</div>
6668
</Tabs.Tab>
6769
</Tabs>
70+
```

app/en/guides/agent-frameworks/vercelai/page.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ description: "Create a browser-based chatbot that uses Arcade tools to access Gm
55

66
import { Steps, Tabs, Callout } from "nextra/components";
77

8+
{/* Editorial: Structure - Removed marketing language "straightforward" in opening paragraph; Voice and tone - Changed "Let's get started!" to more direct language; Structure - Modified intro to better follow 10/20/70 format */}
9+
810
# Build an AI Chatbot with Arcade and Vercel AI SDK
911

10-
The [Vercel AI SDK](https://sdk.vercel.ai/) is a TypeScript toolkit for building AI-powered applications. It provides streaming responses, framework-agnostic support for React, Next.js, Vue, and more, plus straightforward switching between AI providers. This guide uses **Vercel AI SDK v6**.
12+
The [Vercel AI SDK](https://sdk.vercel.ai/) is a TypeScript toolkit for building AI-powered applications. It provides streaming responses, framework-agnostic support for React, Next.js, Vue, and more, plus AI provider switching. This guide uses **Vercel AI SDK v6**.
1113

1214
In this guide, you'll build a browser-based chatbot that uses Arcade's Gmail and Slack tools. Your users can read emails, send messages, and interact with Slack through a conversational interface with built-in authentication.
1315

@@ -271,7 +273,7 @@ export async function POST(req: Request) {
271273
}
272274
```
273275

274-
The `stopWhen: stepCountIs(5)` allows the AI to make multiple tool calls in a single responseuseful when it needs to chain actions together.
276+
The `stopWhen: stepCountIs(5)` allows the AI to make multiple tool calls in a single response (useful when it needs to chain actions together).
275277

276278
### Create the auth status endpoint
277279

@@ -306,11 +308,11 @@ export async function POST(req: Request) {
306308
}
307309
```
308310

309-
This endpoint lets the frontend poll for authorization completion, creating a seamless experience where the chatbot automatically retries after the user authorizes.
311+
This endpoint allows the frontend to poll for authorization completion, creating a seamless experience where the chatbot automatically retries after the user authorizes.
310312

311313
### Build the chat interface
312314

313-
AI Elements provides pre-built components for conversations, messages, and input—we just need to add custom handling for Arcade's OAuth flow. Replace the contents of **app/page.tsx** with the following code:
315+
AI Elements provides pre-built components for conversations, messages, and input. All you need to add is custom handling for Arcade's OAuth flow. Replace the contents of **app/page.tsx** with the following code:
314316

315317
```tsx filename="app/page.tsx"
316318
"use client";
@@ -421,7 +423,7 @@ The `AuthPendingUI` component polls for OAuth completion and calls `onAuthComple
421423

422424
#### Create the Chat component
423425

424-
The `Conversation` component handles auto-scrolling, `Message` handles role-based styling, and [`MessageResponse` renders markdown automatically](https://ai-sdk.dev/elements/components/message#features). We just need to check for Arcade's `authorization_required` flag in tool results:
426+
The `Conversation` component handles auto-scrolling, `Message` handles role-based styling, and [`MessageResponse` renders markdown automatically](https://ai-sdk.dev/elements/components/message#features). The implementation checks for Arcade's `authorization_required` flag in tool results:
425427

426428
```tsx filename="app/page.tsx"
427429
export default function Chat() {
@@ -563,7 +565,7 @@ Open [http://localhost:3000](http://localhost:3000) and try prompts like:
563565
- "Send a Slack DM to myself saying hello"
564566
- "Email me a summary of this slack channel's activity since yesterday..."
565567

566-
On first use, you'll see an authorization button. Click it to connect your Gmail or Slack accountArcade remembers this for future requests.
568+
On first use, you'll see an authorization button. Click it to connect your Gmail or Slack account (Arcade remembers this for future requests).
567569

568570
</Steps>
569571

@@ -941,4 +943,5 @@ export default function Chat() {
941943
}
942944
```
943945

946+
944947
</details>

0 commit comments

Comments
 (0)