@devries-cameron20 / composio Mirror · read-only / commits / ecd602c2b
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 04:30 UTC

docs: reorder copied prompt — code first, rules after

Restructure the copy output so code examples come right after the context intro, with key concepts, rules, and verify checklist at the end as guardrails. Remove redundant "code examples included below" line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmitha Mallesh committed Mar 6, 2026 at 23:50 UTC ecd602c2b0c5c834e04c389f66d5bf27d104f048
2 files changed +12 -16
docs/components/quickstart/prompt-banner.tsx
+12 -4
@@ -41,7 +41,13 @@ export function PromptBanner({ children }: PromptBannerProps) {
41 };
42
43 const handleCopy = () => {
44 - const promptMeta = contentRef.current?.innerText ?? '';
44 + const fullMeta = contentRef.current?.innerText ?? '';
45 +
46 + // Split prompt into context (before "Key concepts") and rules (from "Key concepts" onward)
47 + const splitMarker = 'Key concepts';
48 + const splitIdx = fullMeta.indexOf(splitMarker);
49 + const context = splitIdx > 0 ? fullMeta.slice(0, splitIdx).trim() : fullMeta;
50 + const rules = splitIdx > 0 ? fullMeta.slice(splitIdx).trim() : '';
51
52 // Walk siblings after the banner to find the .fd-steps element
53 let sibling = contentRef.current?.closest('.not-prose')?.nextElementSibling;
@@ -54,9 +60,11 @@ export function PromptBanner({ children }: PromptBannerProps) {
60 sibling = sibling.nextElementSibling;
61 }
62
57 - const fullPrompt = stepsText
58 - ? `${promptMeta}\n\n## Code from tutorial\n\n${stepsText}`
59 - : promptMeta;
63 + // Order: context → code → rules
64 + const parts = [context];
65 + if (stepsText) parts.push(`## Code\n\n${stepsText}`);
66 + if (rules) parts.push(rules);
67 + const fullPrompt = parts.join('\n\n');
68
69 navigator.clipboard.writeText(fullPrompt);
70 setCopied(true);
docs/content/docs/quickstart.mdx
-12
@@ -18,8 +18,6 @@ Build your first AI agent with Composio Tools. You'll create a [session](/docs/u
18
19 Give your OpenAI Agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio. Composio handles authentication, tool discovery, and execution. You create a **session** for a user, get tools from that session, and pass them to your Agent.
20
21 -The complete code examples from the official tutorial are included below.
22 -
21 **Key concepts**
22
23 - **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.
@@ -201,8 +199,6 @@ readline.close();
199
200 Give your OpenAI Agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio's hosted MCP server. No provider package needed — you connect directly to Composio's MCP endpoint. Composio handles authentication, tool discovery, and execution. You create a **session** for a user and pass the MCP connection to your Agent.
201
204 -The complete code examples from the official tutorial are included below.
205 -
202 **Key concepts**
203
204 - **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.
@@ -405,8 +401,6 @@ readline.close();
401
402 Give your Claude agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio. Composio handles authentication, tool discovery, and execution. You create a **session** for a user, get tools, wrap them in an SDK MCP server, and pass that server to ClaudeAgentOptions.
403
408 -The complete code examples from the official tutorial are included below.
409 -
404 **Key concepts**
405
406 - **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.
@@ -617,8 +611,6 @@ readline.close();
611
612 Give your Claude agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio's hosted MCP server. No provider package needed — you connect directly to Composio's MCP endpoint. Composio handles authentication, tool discovery, and execution. You create a **session** for a user and pass the MCP connection to ClaudeAgentOptions.
613
620 -The complete code examples from the official tutorial are included below.
621 -
614 **Key concepts**
615
616 - **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.
@@ -846,8 +838,6 @@ readline.close();
838
839 Give your Vercel AI agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio. Composio handles authentication, tool discovery, and execution. You create a **session** for a user, get tools from that session, and pass them to `streamText` or `generateText`. TypeScript only.
840
849 -The complete code examples from the official tutorial are included below.
850 -
841 **Key concepts**
842
843 - **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.
@@ -989,8 +979,6 @@ readline.close();
979
980 Give your Vercel AI agent access to 1000+ tools (Gmail, GitHub, Slack, Notion, etc.) via Composio's hosted MCP server. No provider package needed — you connect directly to Composio's MCP endpoint using `@ai-sdk/mcp`. Composio handles authentication, tool discovery, and execution. TypeScript only.
981
992 -The complete code examples from the official tutorial are included below.
993 -
982 **Key concepts**
983
984 - **Session**: Scoped environment for a user. Created with `composio.create(userId)`. Sessions have access to all toolkits by default — the agent discovers which tools to use via `COMPOSIO_SEARCH_TOOLS`.