├── src ├── toolkits │ ├── toolkits │ │ ├── toolkit-types.ts │ │ ├── e2b │ │ │ ├── tools │ │ │ │ ├── tools.ts │ │ │ │ └── run_code │ │ │ │ │ └── base.ts │ │ │ ├── base.ts │ │ │ ├── server.ts │ │ │ └── client.tsx │ │ ├── image │ │ │ ├── tools │ │ │ │ ├── tools.ts │ │ │ │ └── generate │ │ │ │ │ ├── base.ts │ │ │ │ │ └── client.tsx │ │ │ ├── base.ts │ │ │ ├── client.tsx │ │ │ └── server.ts │ │ ├── notion │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ └── tool-call-display.tsx │ │ │ ├── tools │ │ │ │ ├── client.ts │ │ │ │ ├── server.ts │ │ │ │ ├── index.ts │ │ │ │ └── users │ │ │ │ │ ├── base.ts │ │ │ │ │ └── server.ts │ │ │ ├── lib │ │ │ │ └── title.ts │ │ │ └── base.ts │ │ ├── etsy │ │ │ ├── tools │ │ │ │ ├── tools.ts │ │ │ │ └── get-listings │ │ │ │ │ ├── base.ts │ │ │ │ │ └── client.tsx │ │ │ ├── base.ts │ │ │ └── client.tsx │ │ ├── github │ │ │ ├── tools │ │ │ │ ├── client.ts │ │ │ │ ├── server.ts │ │ │ │ └── index.ts │ │ │ ├── lib │ │ │ │ └── prs.ts │ │ │ ├── base.ts │ │ │ └── components │ │ │ │ └── user-avatar.tsx │ │ ├── twitter │ │ │ ├── tools │ │ │ │ ├── client.ts │ │ │ │ ├── server.ts │ │ │ │ ├── index.ts │ │ │ │ ├── profile │ │ │ │ │ ├── base.ts │ │ │ │ │ └── server.ts │ │ │ │ └── tweets │ │ │ │ │ └── base.ts │ │ │ └── base.ts │ │ ├── discord │ │ │ ├── tools │ │ │ │ ├── client.ts │ │ │ │ ├── server.ts │ │ │ │ ├── index.ts │ │ │ │ ├── get-user-info │ │ │ │ │ ├── base.ts │ │ │ │ │ └── server.ts │ │ │ │ └── list-servers │ │ │ │ │ ├── base.ts │ │ │ │ │ └── server.ts │ │ │ └── base.ts │ │ ├── mem0 │ │ │ ├── tools │ │ │ │ ├── tools.ts │ │ │ │ ├── add_memory │ │ │ │ │ └── base.ts │ │ │ │ └── search_memories │ │ │ │ │ └── base.ts │ │ │ ├── base.ts │ │ │ └── components │ │ │ │ └── tool-call-display.tsx │ │ ├── video │ │ │ ├── tools │ │ │ │ ├── index.ts │ │ │ │ └── generate │ │ │ │ │ ├── base.ts │ │ │ │ │ └── client.tsx │ │ │ ├── server.ts │ │ │ ├── base.ts │ │ │ ├── client.tsx │ │ │ └── env-vars.tsx │ │ ├── google-drive │ │ │ ├── tools │ │ │ │ ├── client.ts │ │ │ │ ├── server.ts │ │ │ │ ├── index.ts │ │ │ │ └── read-file │ │ │ │ │ └── base.ts │ │ │ ├── base.ts │ │ │ └── components │ │ │ │ └── tool-call.tsx │ │ ├── exa │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ ├── tool-call-display.tsx │ │ │ │ └── results-list.tsx │ │ │ └── tools │ │ │ │ ├── tools.ts │ │ │ │ ├── crawling │ │ │ │ ├── base.ts │ │ │ │ ├── client.tsx │ │ │ │ └── server.ts │ │ │ │ ├── search │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ │ │ ├── competitor_finder │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ │ │ ├── github_search │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ │ │ ├── linkedin_search │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ │ │ ├── wikipedia_search │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ │ │ ├── research_paper_search │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ │ │ └── company_research │ │ │ │ ├── base.ts │ │ │ │ └── client.tsx │ │ ├── spotify │ │ │ ├── tools │ │ │ │ ├── index.ts │ │ │ │ ├── tracks │ │ │ │ │ ├── base.ts │ │ │ │ │ └── server.ts │ │ │ │ └── playlists │ │ │ │ │ └── base.ts │ │ │ ├── base.ts │ │ │ └── components │ │ │ │ └── tool-call-display.tsx │ │ ├── google-calendar │ │ │ ├── tools │ │ │ │ ├── find-availability │ │ │ │ │ ├── lib │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── server.ts │ │ │ │ ├── get-calendar │ │ │ │ │ ├── base.ts │ │ │ │ │ ├── server.ts │ │ │ │ │ └── client.tsx │ │ │ │ ├── get-event │ │ │ │ │ ├── base.ts │ │ │ │ │ ├── server.ts │ │ │ │ │ └── client.tsx │ │ │ │ ├── client.ts │ │ │ │ ├── server.ts │ │ │ │ ├── create-event │ │ │ │ │ └── base.ts │ │ │ │ ├── index.ts │ │ │ │ ├── list-calendars │ │ │ │ │ ├── base.ts │ │ │ │ │ └── server.ts │ │ │ │ └── list-events │ │ │ │ │ └── server.ts │ │ │ ├── lib │ │ │ │ ├── calendar-client.ts │ │ │ │ └── index.ts │ │ │ ├── components │ │ │ │ └── tool-call.tsx │ │ │ └── base.ts │ │ ├── components │ │ │ └── link.tsx │ │ └── strava │ │ │ ├── tools │ │ │ ├── stats │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── zones │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── profile │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── segment │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── routes │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── activity-details │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── explore-segments │ │ │ │ ├── base.ts │ │ │ │ └── server.ts │ │ │ ├── activities │ │ │ │ ├── server.ts │ │ │ │ └── base.ts │ │ │ └── index.ts │ │ │ └── base.ts │ ├── toolkit-groups.ts │ └── create-tool.ts ├── app │ ├── (general) │ │ ├── account │ │ │ ├── components │ │ │ │ ├── tabs │ │ │ │ │ ├── attachments │ │ │ │ │ │ ├── attachment.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── images │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── videos │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── memories │ │ │ │ │ │ └── index.tsx │ │ │ │ └── header.tsx │ │ │ └── page.tsx │ │ ├── workbench │ │ │ ├── new │ │ │ │ ├── _components │ │ │ │ │ └── index.ts │ │ │ │ └── page.tsx │ │ │ └── [id] │ │ │ │ ├── edit │ │ │ │ └── page.tsx │ │ │ │ ├── page.tsx │ │ │ │ ├── [chatId] │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ └── _components │ │ │ │ └── header.tsx │ │ ├── _components │ │ │ ├── landing-page │ │ │ │ ├── dependencies │ │ │ │ │ └── types.ts │ │ │ │ ├── workbench-examples │ │ │ │ │ ├── types.ts │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── data.tsx │ │ │ │ ├── sections.ts │ │ │ │ ├── lib │ │ │ │ │ ├── section.tsx │ │ │ │ │ └── handle.tsx │ │ │ │ ├── vision │ │ │ │ │ └── index.tsx │ │ │ │ ├── workbenches │ │ │ │ │ └── index.tsx │ │ │ │ ├── contributors │ │ │ │ │ └── user-avatar-circles.tsx │ │ │ │ ├── hero │ │ │ │ │ └── graphic │ │ │ │ │ │ └── toolkit-node.tsx │ │ │ │ ├── banner │ │ │ │ │ └── index.tsx │ │ │ │ └── top-toolkits │ │ │ │ │ └── index.tsx │ │ │ ├── chat │ │ │ │ ├── layout.tsx │ │ │ │ └── messages │ │ │ │ │ ├── utils │ │ │ │ │ └── llm-code-block.tsx │ │ │ │ │ └── greeting.tsx │ │ │ └── sidebar │ │ │ │ └── main.tsx │ │ ├── _hooks │ │ │ ├── use-star-chat.ts │ │ │ ├── use-delete-chat.ts │ │ │ ├── use-chat-visibility.ts │ │ │ ├── use-delete-messages.tsx │ │ │ └── use-messages.tsx │ │ ├── page.tsx │ │ ├── layout.tsx │ │ ├── login │ │ │ └── page.tsx │ │ └── [id] │ │ │ └── page.tsx │ ├── icon1.png │ ├── favicon.ico │ ├── apple-icon.png │ ├── opengraph-image.png │ ├── twitter-image.png │ ├── admin │ │ ├── page.tsx │ │ ├── toolkits │ │ │ └── _components │ │ │ │ └── sync-button.tsx │ │ └── layout.tsx │ ├── api │ │ ├── auth │ │ │ ├── [...nextauth] │ │ │ │ └── route.ts │ │ │ └── guest │ │ │ │ └── route.ts │ │ └── trpc │ │ │ └── [trpc] │ │ │ └── route.ts │ ├── _components │ │ └── navbar │ │ │ ├── account-button │ │ │ ├── index.tsx │ │ │ └── provider-icon.tsx │ │ │ ├── color-mode-toggle.tsx │ │ │ └── index.tsx │ └── manifest.ts ├── components │ ├── ui │ │ ├── logo │ │ │ ├── index.ts │ │ │ └── static.tsx │ │ ├── skeleton.tsx │ │ ├── model-icon.tsx │ │ ├── code │ │ │ ├── shared.ts │ │ │ └── codegen.ts │ │ ├── sonner.tsx │ │ ├── merit-logo.tsx │ │ ├── stack.tsx │ │ ├── textarea.tsx │ │ ├── separator.tsx │ │ ├── label.tsx │ │ ├── input.tsx │ │ └── info-tooltip.tsx │ ├── toolkit │ │ └── types.ts │ └── magicui │ │ └── animated-shiny-text.tsx ├── ai │ ├── video │ │ ├── index.ts │ │ ├── key-map.ts │ │ ├── types.ts │ │ ├── models │ │ │ └── luma.ts │ │ └── generate.ts │ ├── language │ │ ├── provider.ts │ │ ├── models │ │ │ ├── index.ts │ │ │ ├── all.ts │ │ │ ├── qwen.ts │ │ │ ├── perplexity.ts │ │ │ └── deepseek.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── generate.ts │ └── image │ │ ├── types.ts │ │ ├── key-map.ts │ │ ├── models │ │ ├── xai.ts │ │ ├── openai.ts │ │ ├── luma.ts │ │ ├── fireworks.ts │ │ └── fal.ts │ │ ├── registry.ts │ │ ├── index.ts │ │ └── generate.ts ├── lib │ ├── cookies │ │ ├── keys.ts │ │ └── types.ts │ ├── utils.ts │ ├── fetch.ts │ └── constants.ts ├── server │ ├── auth │ │ └── index.ts │ ├── db.ts │ └── api │ │ └── routers │ │ ├── index.ts │ │ ├── credits.ts │ │ ├── streams.ts │ │ └── users.ts ├── contexts │ └── env │ │ └── index.tsx ├── trpc │ ├── query-client.ts │ └── server.ts └── hooks │ └── use-mobile.ts ├── banner.png ├── .vscode └── settings.json ├── public ├── icons │ ├── t3.png │ ├── e2b.png │ ├── fal.png │ ├── luma.png │ ├── mem0.png │ ├── next.png │ ├── qwen.png │ ├── radix.png │ ├── react.png │ ├── redis.png │ ├── tRPC.png │ ├── x-ai.png │ ├── xai.png │ ├── zod.png │ ├── discord.png │ ├── google.png │ ├── lucide.png │ ├── motion.png │ ├── openai.png │ ├── prisma.png │ ├── shadcn.png │ ├── vercel.png │ ├── anthropic.png │ ├── deepseek.png │ ├── fireworks.png │ ├── meta-llama.png │ ├── nextauth.png │ ├── openrouter.png │ ├── perplexity.png │ ├── postgres.png │ ├── recharts.png │ ├── tailwind.png │ └── tanstack.png └── manifest │ ├── web-app-manifest-192x192.png │ └── web-app-manifest-512x512.png ├── postcss.config.js ├── .npmrc ├── prisma └── migrations │ ├── 20250721181107_optional_user_role │ └── migration.sql │ ├── 20250721180853_user_role │ └── migration.sql │ ├── 20250714211437_add_starring │ └── migration.sql │ ├── migration_lock.toml │ ├── 20250731015740_videos │ └── migration.sql │ ├── 20250721015616_tool_usage │ └── migration.sql │ ├── 20250615144652_chat_branching │ └── migration.sql │ ├── 20250721181257_user_role_enum │ └── migration.sql │ ├── 20250613013025_images │ └── migration.sql │ ├── 20250608210029_streams │ └── migration.sql │ ├── 20250730234607_videos │ └── migration.sql │ ├── 20250721200114_update_tool_schema │ └── migration.sql │ ├── 20250612033842_files │ └── migration.sql │ ├── 20250616064236_workbenches │ └── migration.sql │ ├── 20250721030057_tools_and_toolkiits │ └── migration.sql │ ├── 20250608175206_chats │ └── migration.sql │ └── 20250615224432_features │ └── migration.sql ├── setup ├── steps │ ├── index.ts │ ├── 4_database.ts │ └── 2_dependencies.ts └── types.ts ├── vercel.json ├── prettier.config.js ├── components.json ├── next.config.js ├── .gitignore ├── .github └── workflows │ └── ci.yml ├── tsconfig.json ├── LICENSE └── docker-compose.yml /src/toolkits/toolkits/toolkit-types.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/(general)/account/components/tabs/attachments/attachment.tsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/banner.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib" 3 | } 4 | -------------------------------------------------------------------------------- /src/app/icon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/src/app/icon1.png -------------------------------------------------------------------------------- /src/components/ui/logo/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./static"; 2 | export * from "./animated"; 3 | -------------------------------------------------------------------------------- /public/icons/t3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/t3.png -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /public/icons/e2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/e2b.png -------------------------------------------------------------------------------- /public/icons/fal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/fal.png -------------------------------------------------------------------------------- /public/icons/luma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/luma.png -------------------------------------------------------------------------------- /public/icons/mem0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/mem0.png -------------------------------------------------------------------------------- /public/icons/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/next.png -------------------------------------------------------------------------------- /public/icons/qwen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/qwen.png -------------------------------------------------------------------------------- /public/icons/radix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/radix.png -------------------------------------------------------------------------------- /public/icons/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/react.png -------------------------------------------------------------------------------- /public/icons/redis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/redis.png -------------------------------------------------------------------------------- /public/icons/tRPC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/tRPC.png -------------------------------------------------------------------------------- /public/icons/x-ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/x-ai.png -------------------------------------------------------------------------------- /public/icons/xai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/xai.png -------------------------------------------------------------------------------- /public/icons/zod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/zod.png -------------------------------------------------------------------------------- /src/app/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/src/app/apple-icon.png -------------------------------------------------------------------------------- /src/toolkits/toolkits/e2b/tools/tools.ts: -------------------------------------------------------------------------------- 1 | export enum E2BTools { 2 | RunCode = "run-code", 3 | } 4 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | "@tailwindcss/postcss": {}, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /public/icons/discord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/discord.png -------------------------------------------------------------------------------- /public/icons/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/google.png -------------------------------------------------------------------------------- /public/icons/lucide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/lucide.png -------------------------------------------------------------------------------- /public/icons/motion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/motion.png -------------------------------------------------------------------------------- /public/icons/openai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/openai.png -------------------------------------------------------------------------------- /public/icons/prisma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/prisma.png -------------------------------------------------------------------------------- /public/icons/shadcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/shadcn.png -------------------------------------------------------------------------------- /public/icons/vercel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/vercel.png -------------------------------------------------------------------------------- /src/toolkits/toolkits/image/tools/tools.ts: -------------------------------------------------------------------------------- 1 | export enum ImageTools { 2 | Generate = "generate", 3 | } 4 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/notion/components/index.ts: -------------------------------------------------------------------------------- 1 | export { ToolCallDisplay } from "./tool-call-display"; 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | public-hoist-pattern[]=*eslint* 2 | public-hoist-pattern[]=*prettier* 3 | public-hoist-pattern[]=@shikijs/* -------------------------------------------------------------------------------- /public/icons/anthropic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/anthropic.png -------------------------------------------------------------------------------- /public/icons/deepseek.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/deepseek.png -------------------------------------------------------------------------------- /public/icons/fireworks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/fireworks.png -------------------------------------------------------------------------------- /public/icons/meta-llama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/meta-llama.png -------------------------------------------------------------------------------- /public/icons/nextauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/nextauth.png -------------------------------------------------------------------------------- /public/icons/openrouter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/openrouter.png -------------------------------------------------------------------------------- /public/icons/perplexity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/perplexity.png -------------------------------------------------------------------------------- /public/icons/postgres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/postgres.png -------------------------------------------------------------------------------- /public/icons/recharts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/recharts.png -------------------------------------------------------------------------------- /public/icons/tailwind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/tailwind.png -------------------------------------------------------------------------------- /public/icons/tanstack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/icons/tanstack.png -------------------------------------------------------------------------------- /src/app/(general)/workbench/new/_components/index.ts: -------------------------------------------------------------------------------- 1 | export { NewWorkbenchForm } from "./new-workbench-form"; 2 | -------------------------------------------------------------------------------- /src/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/src/app/opengraph-image.png -------------------------------------------------------------------------------- /src/app/twitter-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/src/app/twitter-image.png -------------------------------------------------------------------------------- /src/toolkits/toolkits/etsy/tools/tools.ts: -------------------------------------------------------------------------------- 1 | export enum EtsyTools { 2 | getListings = "get-listings", 3 | } 4 | -------------------------------------------------------------------------------- /src/app/admin/page.tsx: -------------------------------------------------------------------------------- 1 | export default function AdminDashboard() { 2 | return
Admin Dashboard
; 3 | } 4 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/github/tools/client.ts: -------------------------------------------------------------------------------- 1 | export * from "./search/client"; 2 | export * from "./repo/client"; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/github/tools/server.ts: -------------------------------------------------------------------------------- 1 | export * from "./repo/server"; 2 | export * from "./search/server"; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/twitter/tools/client.ts: -------------------------------------------------------------------------------- 1 | export * from "./profile/client"; 2 | export * from "./tweets/client"; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/twitter/tools/server.ts: -------------------------------------------------------------------------------- 1 | export * from "./profile/server"; 2 | export * from "./tweets/server"; 3 | -------------------------------------------------------------------------------- /src/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import { handlers } from "@/server/auth"; 2 | 3 | export const { GET, POST } = handlers; 4 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/discord/tools/client.ts: -------------------------------------------------------------------------------- 1 | export * from "./list-servers/client"; 2 | export * from "./get-user-info/client"; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/discord/tools/server.ts: -------------------------------------------------------------------------------- 1 | export * from "./list-servers/server"; 2 | export * from "./get-user-info/server"; 3 | -------------------------------------------------------------------------------- /prisma/migrations/20250721181107_optional_user_role/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ALTER COLUMN "role" DROP NOT NULL; 3 | -------------------------------------------------------------------------------- /public/manifest/web-app-manifest-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/manifest/web-app-manifest-192x192.png -------------------------------------------------------------------------------- /public/manifest/web-app-manifest-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonhedman/toolkit.dev/HEAD/public/manifest/web-app-manifest-512x512.png -------------------------------------------------------------------------------- /src/ai/video/index.ts: -------------------------------------------------------------------------------- 1 | import { lumaVideoModels } from "./models/luma"; 2 | 3 | export const allVideoModels = [...lumaVideoModels] as const; 4 | -------------------------------------------------------------------------------- /prisma/migrations/20250721180853_user_role/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ADD COLUMN "role" TEXT NOT NULL DEFAULT 'user'; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/mem0/tools/tools.ts: -------------------------------------------------------------------------------- 1 | export enum Mem0Tools { 2 | AddMemory = "add-memory", 3 | SearchMemories = "search-memories", 4 | } 5 | -------------------------------------------------------------------------------- /prisma/migrations/20250714211437_add_starring/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ADD COLUMN "starred" BOOLEAN NOT NULL DEFAULT false; 3 | -------------------------------------------------------------------------------- /setup/steps/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./1_environment"; 2 | export * from "./2_dependencies"; 3 | export * from "./3_docker"; 4 | export * from "./4_database"; 5 | -------------------------------------------------------------------------------- /src/app/(general)/_components/landing-page/dependencies/types.ts: -------------------------------------------------------------------------------- 1 | export interface Dependency { 2 | name: string; 3 | icon: React.ReactNode | null; 4 | } 5 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/video/tools/index.ts: -------------------------------------------------------------------------------- 1 | export enum VideoTools { 2 | Generate = "generate", 3 | } 4 | 5 | export { baseGenerateTool } from "./generate/base"; 6 | -------------------------------------------------------------------------------- /prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (e.g., Git) 3 | provider = "postgresql" 4 | -------------------------------------------------------------------------------- /src/app/(general)/account/components/tabs/images/index.tsx: -------------------------------------------------------------------------------- 1 | import { ImagesTable } from "./table"; 2 | 3 | export const Images = () => { 4 | return ; 5 | }; 6 | -------------------------------------------------------------------------------- /src/app/(general)/account/components/tabs/videos/index.tsx: -------------------------------------------------------------------------------- 1 | import { VideosTable } from "./table"; 2 | 3 | export const Videos = () => { 4 | return ; 5 | }; 6 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://openapi.vercel.sh/vercel.json", 3 | "git": { 4 | "deploymentEnabled": { 5 | "!main": false 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /src/ai/video/key-map.ts: -------------------------------------------------------------------------------- 1 | import type { VideoModelProvider } from "./types"; 2 | 3 | export const videoKeyMap: Record = { 4 | luma: "LUMA_API_KEY", 5 | }; 6 | -------------------------------------------------------------------------------- /src/ai/video/types.ts: -------------------------------------------------------------------------------- 1 | export type VideoModelProvider = "luma"; 2 | 3 | export type VideoModel = { 4 | name: string; 5 | provider: VideoModelProvider; 6 | modelId: string; 7 | }; 8 | -------------------------------------------------------------------------------- /src/app/(general)/account/components/tabs/memories/index.tsx: -------------------------------------------------------------------------------- 1 | import { MemoriesTable } from "./table"; 2 | 3 | export const Memories = () => { 4 | return ; 5 | }; 6 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */ 2 | export default { 3 | plugins: ["prettier-plugin-tailwindcss"], 4 | }; 5 | -------------------------------------------------------------------------------- /src/app/(general)/account/components/tabs/attachments/index.tsx: -------------------------------------------------------------------------------- 1 | import { DataTableDemo } from "./table"; 2 | 3 | export const Attachments = async () => { 4 | return ; 5 | }; 6 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-drive/tools/client.ts: -------------------------------------------------------------------------------- 1 | export { googleDriveSearchFilesToolConfigClient } from "./search-files/client"; 2 | export { googleDriveReadFileToolConfigClient } from "./read-file/client"; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-drive/tools/server.ts: -------------------------------------------------------------------------------- 1 | export { googleDriveSearchFilesToolConfigServer } from "./search-files/server"; 2 | export { googleDriveReadFileToolConfigServer } from "./read-file/server"; 3 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/exa/components/index.ts: -------------------------------------------------------------------------------- 1 | export { ToolCallDisplay } from "./tool-call-display"; 2 | export { ResultItem, type ResultData } from "./result-item"; 3 | export { ResultsList } from "./results-list"; 4 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/discord/tools/index.ts: -------------------------------------------------------------------------------- 1 | export enum DiscordTools { 2 | ListServers = "list-servers", 3 | GetUserInfo = "get-user-info", 4 | } 5 | 6 | export * from "./list-servers/base"; 7 | export * from "./get-user-info/base"; 8 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/twitter/tools/index.ts: -------------------------------------------------------------------------------- 1 | export enum TwitterTools { 2 | GetUserProfile = "get-user-profile", 3 | GetLatestTweets = "get-latest-tweets", 4 | } 5 | 6 | export * from "./profile/base"; 7 | export * from "./tweets/base"; 8 | -------------------------------------------------------------------------------- /prisma/migrations/20250731015740_videos/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `size` on the `Video` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Video" DROP COLUMN "size"; 9 | -------------------------------------------------------------------------------- /src/ai/language/provider.ts: -------------------------------------------------------------------------------- 1 | import { createOpenRouter } from "@openrouter/ai-sdk-provider"; 2 | 3 | export const openrouter = createOpenRouter({ 4 | headers: { 5 | "HTTP-Referer": "https://toolkit.dev", 6 | "X-Title": "Toolkit.dev", 7 | }, 8 | }); 9 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/spotify/tools/index.ts: -------------------------------------------------------------------------------- 1 | export enum SpotifyTools { 2 | GetPlaylists = "get-playlists", 3 | GetTracks = "get-tracks", 4 | } 5 | 6 | export { getPlaylistsBase } from "./playlists/base"; 7 | export { getTracksBase } from "./tracks/base"; 8 | -------------------------------------------------------------------------------- /src/lib/cookies/keys.ts: -------------------------------------------------------------------------------- 1 | export const COOKIE_KEYS = { 2 | SELECTED_CHAT_MODEL: "open-chat-selected-model", 3 | IMAGE_GENERATION_MODEL: "open-chat-image-model", 4 | USE_NATIVE_SEARCH: "open-chat-native-search", 5 | TOOLKITS: "open-chat-toolkits", 6 | } as const; 7 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-drive/tools/index.ts: -------------------------------------------------------------------------------- 1 | export enum GoogleDriveTools { 2 | SearchFiles = "search-files", 3 | ReadFile = "read-file", 4 | } 5 | 6 | export { searchFilesTool } from "./search-files/base"; 7 | export { readFileTool } from "./read-file/base"; 8 | -------------------------------------------------------------------------------- /src/ai/image/types.ts: -------------------------------------------------------------------------------- 1 | export type ImageModelProvider = 2 | | "openai" 3 | | "xai" 4 | | "fal" 5 | | "fireworks" 6 | | "luma"; 7 | 8 | export type ImageModel = { 9 | name: string; 10 | provider: ImageModelProvider; 11 | modelId: string; 12 | }; 13 | -------------------------------------------------------------------------------- /src/components/toolkit/types.ts: -------------------------------------------------------------------------------- 1 | import type { Toolkits } from "@/toolkits/toolkits/shared"; 2 | import type { ClientToolkit } from "@/toolkits/types"; 3 | 4 | export type SelectedToolkit = { 5 | id: Toolkits; 6 | toolkit: ClientToolkit; 7 | parameters: Record; 8 | }; 9 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/github/tools/index.ts: -------------------------------------------------------------------------------- 1 | export enum GithubTools { 2 | SearchRepos = "search-repos", 3 | SearchCode = "search-code", 4 | SearchUsers = "search-users", 5 | RepoInfo = "repo-info", 6 | } 7 | 8 | export * from "./search/base"; 9 | export * from "./repo/base"; 10 | -------------------------------------------------------------------------------- /src/app/(general)/_components/chat/layout.tsx: -------------------------------------------------------------------------------- 1 | interface Props { 2 | children: React.ReactNode; 3 | } 4 | 5 | export const ChatLayout: React.FC = ({ children }) => { 6 | return ( 7 |
{children}
8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /src/ai/image/key-map.ts: -------------------------------------------------------------------------------- 1 | import type { ImageModelProvider } from "./types"; 2 | 3 | export const imageKeyMap: Record = { 4 | openai: "OPENAI_API_KEY", 5 | xai: "XAI_API_KEY", 6 | fal: "FAL_API_KEY", 7 | fireworks: "FIREWORKS_API_KEY", 8 | luma: "LUMA_API_KEY", 9 | }; 10 | -------------------------------------------------------------------------------- /src/app/(general)/_components/landing-page/workbench-examples/types.ts: -------------------------------------------------------------------------------- 1 | import type { Toolkits } from "@/toolkits/toolkits/shared"; 2 | import type { LucideIcon } from "lucide-react"; 3 | 4 | export interface WorkbenchExample { 5 | title: string; 6 | systemPrompt: string; 7 | toolkits: Toolkits[]; 8 | icon: LucideIcon; 9 | } 10 | -------------------------------------------------------------------------------- /src/server/auth/index.ts: -------------------------------------------------------------------------------- 1 | import { cache } from "react"; 2 | 3 | import NextAuth from "next-auth"; 4 | 5 | import { authConfig } from "./config"; 6 | 7 | const { auth: uncachedAuth, handlers, signIn, signOut } = NextAuth(authConfig); 8 | 9 | const auth = cache(uncachedAuth); 10 | 11 | export { auth, handlers, signIn, signOut }; 12 | -------------------------------------------------------------------------------- /src/app/(general)/_hooks/use-star-chat.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { api } from "@/trpc/react"; 4 | 5 | export const useStarChat = () => { 6 | const utils = api.useUtils(); 7 | 8 | return api.chats.starChat.useMutation({ 9 | onSuccess: async () => { 10 | await utils.chats.getChats.invalidate(); 11 | }, 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /src/app/(general)/_hooks/use-delete-chat.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { api } from "@/trpc/react"; 4 | 5 | export const useDeleteChat = () => { 6 | const utils = api.useUtils(); 7 | 8 | return api.chats.deleteChat.useMutation({ 9 | onSuccess: async () => { 10 | await utils.chats.getChats.invalidate(); 11 | }, 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/github/lib/prs.ts: -------------------------------------------------------------------------------- 1 | import { type Octokit } from "octokit"; 2 | 3 | export const getTotalPrs = async (octokit: Octokit, query: string) => { 4 | const { 5 | data: { total_count }, 6 | } = await octokit.rest.search.issuesAndPullRequests({ 7 | q: query, 8 | per_page: 1, 9 | }); 10 | 11 | return total_count; 12 | }; 13 | -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | function Skeleton({ className, ...props }: React.ComponentProps<"div">) { 4 | return ( 5 |
10 | ); 11 | } 12 | 13 | export { Skeleton }; 14 | -------------------------------------------------------------------------------- /src/ai/image/models/xai.ts: -------------------------------------------------------------------------------- 1 | import type { ImageModel } from "../types"; 2 | 3 | const xaiImageModelData: Omit[] = [ 4 | { 5 | name: "Grok 2 Image", 6 | modelId: "grok-2-image", 7 | }, 8 | ]; 9 | 10 | export const xaiImageModels: ImageModel[] = xaiImageModelData.map((model) => ({ 11 | ...model, 12 | provider: "xai", 13 | })); 14 | -------------------------------------------------------------------------------- /src/app/(general)/_hooks/use-chat-visibility.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { api } from "@/trpc/react"; 4 | 5 | export const useUpdateChatVisibility = () => { 6 | const utils = api.useUtils(); 7 | 8 | return api.chats.updateChatVisibility.useMutation({ 9 | onSuccess: async () => { 10 | await utils.chats.getChats.invalidate(); 11 | }, 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-calendar/tools/find-availability/lib/index.ts: -------------------------------------------------------------------------------- 1 | export { generateTimeSlots } from "./slot-generator"; 2 | export { 3 | hasConflict, 4 | filterConflictingSlots, 5 | extractConflictingEvents, 6 | } from "./conflict-detector"; 7 | export { resolveAttendeeEmails } from "./attendee-resolver"; 8 | export { analyzeAvailability } from "./analyze-availability"; 9 | -------------------------------------------------------------------------------- /src/app/(general)/workbench/new/page.tsx: -------------------------------------------------------------------------------- 1 | import { auth } from "@/server/auth"; 2 | import { redirect } from "next/navigation"; 3 | import { NewWorkbenchForm } from "./_components"; 4 | 5 | export default async function NewWorkbenchPage() { 6 | const session = await auth(); 7 | 8 | if (!session) { 9 | redirect("/"); 10 | } 11 | 12 | return ; 13 | } 14 | -------------------------------------------------------------------------------- /prisma/migrations/20250721015616_tool_usage/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "ToolUsage" ( 3 | "toolkit" TEXT NOT NULL, 4 | "tool" TEXT NOT NULL, 5 | "count" INTEGER NOT NULL, 6 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 7 | "updatedAt" TIMESTAMP(3) NOT NULL, 8 | 9 | CONSTRAINT "ToolUsage_pkey" PRIMARY KEY ("toolkit","tool") 10 | ); 11 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/exa/tools/tools.ts: -------------------------------------------------------------------------------- 1 | export enum ExaTools { 2 | Search = "search", 3 | ResearchPaperSearch = "research-paper-search", 4 | CompanyResearch = "company-research", 5 | Crawling = "crawling", 6 | CompetitorFinder = "competitor-finder", 7 | LinkedinSearch = "linkedin-search", 8 | WikipediaSearch = "wikipedia-search-exa", 9 | GithubSearch = "github-search", 10 | } 11 | -------------------------------------------------------------------------------- /src/ai/image/models/openai.ts: -------------------------------------------------------------------------------- 1 | import type { ImageModel } from "../types"; 2 | 3 | const openAiImageModelsData: Omit[] = [ 4 | { 5 | name: "GPT Image", 6 | modelId: "gpt-image-1", 7 | }, 8 | ]; 9 | 10 | export const openAiImageModels: ImageModel[] = openAiImageModelsData.map( 11 | (model) => ({ 12 | ...model, 13 | provider: "openai", 14 | }), 15 | ); 16 | -------------------------------------------------------------------------------- /prisma/migrations/20250615144652_chat_branching/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ADD COLUMN "parentChatId" TEXT; 3 | 4 | -- AlterTable 5 | ALTER TABLE "Message" ADD COLUMN "modelId" TEXT NOT NULL DEFAULT 'openai:gpt-4o'; 6 | 7 | -- AddForeignKey 8 | ALTER TABLE "Chat" ADD CONSTRAINT "Chat_parentChatId_fkey" FOREIGN KEY ("parentChatId") REFERENCES "Chat"("id") ON DELETE CASCADE ON UPDATE CASCADE; 9 | -------------------------------------------------------------------------------- /prisma/migrations/20250721181257_user_role_enum/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - The `role` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column. 5 | 6 | */ 7 | -- CreateEnum 8 | CREATE TYPE "UserRole" AS ENUM ('USER', 'ADMIN'); 9 | 10 | -- AlterTable 11 | ALTER TABLE "User" DROP COLUMN "role", 12 | ADD COLUMN "role" "UserRole" DEFAULT 'USER'; 13 | -------------------------------------------------------------------------------- /src/app/(general)/_hooks/use-delete-messages.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { api } from "@/trpc/react"; 4 | 5 | export const useDeleteMessagesAfterTimestamp = () => { 6 | const utils = api.useUtils(); 7 | 8 | return api.messages.deleteMessagesAfterTimestamp.useMutation({ 9 | onSuccess: async (_, { chatId }) => { 10 | await utils.messages.getMessagesForChat.invalidate({ chatId }); 11 | }, 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /src/ai/image/registry.ts: -------------------------------------------------------------------------------- 1 | import { createProviderRegistry } from "ai"; 2 | 3 | import { openai } from "@ai-sdk/openai"; 4 | import { xai } from "@ai-sdk/xai"; 5 | import { fireworks } from "@ai-sdk/fireworks"; 6 | import { fal } from "@ai-sdk/fal"; 7 | import { luma } from "@ai-sdk/luma"; 8 | 9 | export const imageModelRegistry = createProviderRegistry({ 10 | openai, 11 | xai, 12 | fireworks, 13 | fal, 14 | luma, 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/(general)/_components/landing-page/sections.ts: -------------------------------------------------------------------------------- 1 | export const SECTIONS = { 2 | Hero: "Hero", 3 | Vision: "Vision", 4 | Merit: "Merit", 5 | Contributors: "Contributors", 6 | Features: "Features", 7 | TopToolkits: "TopToolkits", 8 | ToolkitCreation: "ToolkitCreation", 9 | Workbench: "Workbench", 10 | WorkbenchExamples: "WorkbenchExamples", 11 | Dependencies: "Dependencies", 12 | Roadmap: "Roadmap", 13 | } as const; 14 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/components/link.tsx: -------------------------------------------------------------------------------- 1 | import BaseLink from "next/link"; 2 | 3 | export const Link = ({ 4 | href, 5 | children, 6 | }: { 7 | href: string; 8 | children: string; 9 | }) => { 10 | return ( 11 | 17 | {children} 18 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/strava/tools/stats/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { createBaseTool } from "@/toolkits/create-tool"; 4 | 5 | import type { ActivityStats } from "strava"; 6 | 7 | export const getAthleteStatsBase = createBaseTool({ 8 | description: "Get the authenticated athlete's statistics", 9 | inputSchema: z.object({}), 10 | outputSchema: z.object({ 11 | stats: z.custom(), 12 | }), 13 | }); 14 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/strava/tools/zones/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { createBaseTool } from "@/toolkits/create-tool"; 4 | 5 | import type { Zones } from "strava"; 6 | 7 | export const getAthleteZonesBase = createBaseTool({ 8 | description: "Get the authenticated athlete's heart rate and power zones", 9 | inputSchema: z.object({}), 10 | outputSchema: z.object({ 11 | zones: z.custom(), 12 | }), 13 | }); 14 | -------------------------------------------------------------------------------- /src/lib/cookies/types.ts: -------------------------------------------------------------------------------- 1 | import type { LanguageModel } from "@/ai/language/types"; 2 | import type { ImageModel } from "@/ai/image/types"; 3 | 4 | export interface PersistedToolkit { 5 | id: string; 6 | parameters: Record; 7 | } 8 | 9 | export interface ChatPreferences { 10 | selectedChatModel?: LanguageModel; 11 | imageGenerationModel?: ImageModel; 12 | useNativeSearch?: boolean; 13 | toolkits?: PersistedToolkit[]; 14 | } 15 | -------------------------------------------------------------------------------- /src/ai/language/models/index.ts: -------------------------------------------------------------------------------- 1 | export { anthropicModels } from "./anthropic"; 2 | export { googleModels } from "./google"; 3 | export { openAiLanguageModels } from "./openai"; 4 | export { xaiLanguageModels } from "./xai"; 5 | export { perplexityModels } from "./perplexity"; 6 | export { llamaModels } from "./llama"; 7 | export { qwenModels } from "./qwen"; 8 | export { deepseekModels } from "./deepseek"; 9 | export { openRouterModels } from "./openrouter"; 10 | -------------------------------------------------------------------------------- /setup/steps/4_database.ts: -------------------------------------------------------------------------------- 1 | import { execSync } from "child_process"; 2 | 3 | import { logSuccess, logError, getPackageManager } from "../utils"; 4 | 5 | export function runMigrations(): void { 6 | try { 7 | execSync(`${getPackageManager()} db:generate`, { stdio: "ignore" }); 8 | logSuccess("Database migrations completed successfully"); 9 | } catch (error) { 10 | logError("Failed to run database migrations"); 11 | throw error; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ai/video/models/luma.ts: -------------------------------------------------------------------------------- 1 | import type { VideoModel } from "../types"; 2 | 3 | const lumaVideoModelsData: Omit[] = [ 4 | { 5 | name: "Ray 2 Flash", 6 | modelId: "ray-flash-2", 7 | }, 8 | { 9 | name: "Ray 2", 10 | modelId: "ray-2", 11 | }, 12 | ] as const; 13 | 14 | export const lumaVideoModels: VideoModel[] = lumaVideoModelsData.map( 15 | (model) => ({ 16 | ...model, 17 | provider: "luma", 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /src/ai/image/index.ts: -------------------------------------------------------------------------------- 1 | import { openAiImageModels } from "./models/openai"; 2 | import { xaiImageModels } from "./models/xai"; 3 | import { fireworksImageModels } from "./models/fireworks"; 4 | import { falImageModels } from "./models/fal"; 5 | import { lumaImageModels } from "./models/luma"; 6 | 7 | export const allImageModels = [ 8 | ...openAiImageModels, 9 | ...xaiImageModels, 10 | ...falImageModels, 11 | ...fireworksImageModels, 12 | ...lumaImageModels, 13 | ]; 14 | -------------------------------------------------------------------------------- /src/ai/image/models/luma.ts: -------------------------------------------------------------------------------- 1 | import type { ImageModel } from "../types"; 2 | 3 | const lumaImageModelsData: Omit[] = [ 4 | { 5 | name: "Photon 1", 6 | modelId: "photon-1", 7 | }, 8 | { 9 | name: "Photon 1 Flash", 10 | modelId: "photon-flash-1", 11 | }, 12 | ]; 13 | 14 | export const lumaImageModels: ImageModel[] = lumaImageModelsData.map( 15 | (model) => ({ 16 | ...model, 17 | provider: "luma", 18 | }), 19 | ); 20 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/strava/tools/profile/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { createBaseTool } from "@/toolkits/create-tool"; 4 | 5 | import type { DetailedAthlete } from "strava"; 6 | 7 | export const getAthleteBase = createBaseTool({ 8 | description: 9 | "Get the authenticated athlete's profile information from Strava", 10 | inputSchema: z.object({}), 11 | outputSchema: z.object({ 12 | athlete: z.custom(), 13 | }), 14 | }); 15 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/etsy/tools/get-listings/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { createBaseTool } from "@/toolkits/create-tool"; 3 | import type { IShopListing } from "etsy-ts"; 4 | 5 | export const getListings = createBaseTool({ 6 | description: 7 | "Fetches all listings from the Etsy shop associated with the authenticated user.", 8 | inputSchema: z.object({}), 9 | outputSchema: z.object({ 10 | results: z.array(z.custom()), 11 | }), 12 | }); 13 | -------------------------------------------------------------------------------- /src/ai/image/generate.ts: -------------------------------------------------------------------------------- 1 | import { experimental_generateImage as baseGenerateImage } from "ai"; 2 | 3 | import { imageModelRegistry } from "./registry"; 4 | 5 | import type { ImageModelProvider } from "./types"; 6 | 7 | export const generateImage = async ( 8 | model: `${ImageModelProvider}:${string}`, 9 | prompt: string, 10 | ) => { 11 | const { image } = await baseGenerateImage({ 12 | model: imageModelRegistry.imageModel(model), 13 | prompt, 14 | }); 15 | 16 | return image; 17 | }; 18 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/e2b/base.ts: -------------------------------------------------------------------------------- 1 | import type { ToolkitConfig } from "@/toolkits/types"; 2 | import { baseRunCodeTool } from "./tools/run_code/base"; 3 | import { E2BTools } from "./tools/tools"; 4 | import { z } from "zod"; 5 | 6 | export const e2bParameters = z.object({}); 7 | 8 | export const baseE2BToolkitConfig: ToolkitConfig< 9 | E2BTools, 10 | typeof e2bParameters.shape 11 | > = { 12 | tools: { 13 | [E2BTools.RunCode]: baseRunCodeTool, 14 | }, 15 | parameters: e2bParameters, 16 | }; 17 | -------------------------------------------------------------------------------- /src/components/ui/model-icon.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | interface Props { 6 | provider: string; 7 | className?: string; 8 | } 9 | 10 | export const ModelProviderIcon: React.FC = ({ provider, className }) => { 11 | return ( 12 | {provider} 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/discord/tools/get-user-info/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { createBaseTool } from "@/toolkits/create-tool"; 4 | 5 | import type { APIUser } from "discord-api-types/v10"; 6 | 7 | export const getUserInfoTool = createBaseTool({ 8 | description: "Get information about your Discord account", 9 | inputSchema: z.object({ 10 | // No input needed - uses authenticated user 11 | }), 12 | outputSchema: z.object({ 13 | user: z.custom(), 14 | }), 15 | }); 16 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/discord/tools/list-servers/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { createBaseTool } from "@/toolkits/create-tool"; 3 | import type { APIGuild } from "discord-api-types/v10"; 4 | 5 | export const listServersTool = createBaseTool({ 6 | description: "List all Discord servers you are a member of", 7 | inputSchema: z.object({ 8 | // No input needed - uses authenticated user's servers 9 | }), 10 | outputSchema: z.object({ 11 | servers: z.custom(), 12 | }), 13 | }); 14 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/strava/tools/segment/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { createBaseTool } from "@/toolkits/create-tool"; 4 | 5 | import type { DetailedSegment } from "strava"; 6 | 7 | export const getSegmentDetailsBase = createBaseTool({ 8 | description: "Get detailed information about a specific segment", 9 | inputSchema: z.object({ 10 | id: z.number().describe("The segment ID"), 11 | }), 12 | outputSchema: z.object({ 13 | segment: z.custom(), 14 | }), 15 | }); 16 | -------------------------------------------------------------------------------- /prisma/migrations/20250613013025_images/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Image" ( 3 | "id" TEXT NOT NULL, 4 | "userId" TEXT NOT NULL, 5 | "contentType" TEXT NOT NULL, 6 | "url" TEXT NOT NULL, 7 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 | 9 | CONSTRAINT "Image_pkey" PRIMARY KEY ("id") 10 | ); 11 | 12 | -- AddForeignKey 13 | ALTER TABLE "Image" ADD CONSTRAINT "Image_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; 14 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /prisma/migrations/20250608210029_streams/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Stream" ( 3 | "id" TEXT NOT NULL, 4 | "chatId" TEXT NOT NULL, 5 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 6 | 7 | CONSTRAINT "Stream_pkey" PRIMARY KEY ("id") 8 | ); 9 | 10 | -- CreateIndex 11 | CREATE INDEX "Stream_chatId_idx" ON "Stream"("chatId"); 12 | 13 | -- AddForeignKey 14 | ALTER TABLE "Stream" ADD CONSTRAINT "Stream_chatId_fkey" FOREIGN KEY ("chatId") REFERENCES "Chat"("id") ON DELETE CASCADE ON UPDATE CASCADE; 15 | -------------------------------------------------------------------------------- /src/ai/language/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | openAiLanguageModels, 3 | xaiLanguageModels, 4 | perplexityModels, 5 | googleModels, 6 | anthropicModels, 7 | llamaModels, 8 | qwenModels, 9 | deepseekModels, 10 | openRouterModels, 11 | } from "./models"; 12 | 13 | export const languageModels = [ 14 | ...anthropicModels, 15 | ...googleModels, 16 | ...openAiLanguageModels, 17 | ...xaiLanguageModels, 18 | ...perplexityModels, 19 | ...openRouterModels, 20 | ...llamaModels, 21 | ...qwenModels, 22 | ...deepseekModels, 23 | ]; 24 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-calendar/tools/get-calendar/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { createBaseTool } from "@/toolkits/create-tool"; 3 | import type { calendar_v3 } from "googleapis"; 4 | 5 | export const getCalendarTool = createBaseTool({ 6 | description: "Get details of a specific calendar by ID", 7 | inputSchema: z.object({ 8 | calendarId: z.string().describe("The ID of the calendar to retrieve"), 9 | }), 10 | outputSchema: z.object({ 11 | calendar: z.custom(), 12 | }), 13 | }); 14 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/etsy/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { EtsyTools } from "./tools/tools"; 4 | 5 | import { getListings } from "@/toolkits/toolkits/etsy/tools/get-listings/base"; 6 | 7 | import type { ToolkitConfig } from "@/toolkits/types"; 8 | 9 | export const etsyParameters = z.object({}); 10 | 11 | export const baseEtsyToolkitConfig: ToolkitConfig< 12 | EtsyTools, 13 | typeof etsyParameters.shape 14 | > = { 15 | tools: { 16 | [EtsyTools.getListings]: getListings, 17 | }, 18 | parameters: etsyParameters, 19 | }; 20 | -------------------------------------------------------------------------------- /src/app/(general)/_components/landing-page/lib/section.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | import React from "react"; 3 | import type { SECTIONS } from "../sections"; 4 | 5 | interface Props { 6 | id: (typeof SECTIONS)[keyof typeof SECTIONS]; 7 | children: React.ReactNode; 8 | className?: string; 9 | } 10 | 11 | export const Section: React.FC = ({ id, className, children }) => { 12 | return ( 13 |
14 | {children} 15 |
16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/video/tools/generate/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { createBaseTool } from "@/toolkits/create-tool"; 3 | 4 | const inputSchema = z.object({ 5 | prompt: z.string().min(1).max(250).describe("The video generation prompt"), 6 | }); 7 | 8 | const outputSchema = z.object({ 9 | url: z.string().describe("The URL of the generated video"), 10 | }); 11 | 12 | export const baseGenerateTool = createBaseTool({ 13 | description: "Generate a video using Luma Labs Dream Machine", 14 | inputSchema, 15 | outputSchema, 16 | }); 17 | -------------------------------------------------------------------------------- /prisma/migrations/20250730234607_videos/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Video" ( 3 | "id" TEXT NOT NULL, 4 | "userId" TEXT NOT NULL, 5 | "url" TEXT NOT NULL, 6 | "size" INTEGER NOT NULL, 7 | "modelId" TEXT NOT NULL DEFAULT 'ray-2', 8 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 9 | 10 | CONSTRAINT "Video_pkey" PRIMARY KEY ("id") 11 | ); 12 | 13 | -- AddForeignKey 14 | ALTER TABLE "Video" ADD CONSTRAINT "Video_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; 15 | -------------------------------------------------------------------------------- /src/toolkits/toolkit-groups.ts: -------------------------------------------------------------------------------- 1 | import { Logo } from "@/components/ui/logo"; 2 | import { ToolkitGroups, type ToolkitGroup } from "./types"; 3 | import { BookCopy, Database } from "lucide-react"; 4 | 5 | export const toolkitGroups: ToolkitGroup[] = [ 6 | { 7 | id: ToolkitGroups.Native, 8 | name: "Native Tools", 9 | icon: Logo, 10 | }, 11 | { 12 | id: ToolkitGroups.DataSource, 13 | name: "Data Sources", 14 | icon: Database, 15 | }, 16 | { 17 | id: ToolkitGroups.KnowledgeBase, 18 | name: "Knowledge Base", 19 | icon: BookCopy, 20 | }, 21 | ]; 22 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/notion/tools/client.ts: -------------------------------------------------------------------------------- 1 | export { 2 | notionListDatabasesToolConfigClient, 3 | notionQueryDatabaseToolConfigClient, 4 | notionCreateDatabaseToolConfigClient, 5 | } from "./databases/client"; 6 | 7 | export { 8 | notionGetPageToolConfigClient, 9 | notionSearchPagesToolConfigClient, 10 | notionCreatePageToolConfigClient, 11 | } from "./pages/client"; 12 | 13 | export { 14 | notionGetBlocksToolConfigClient, 15 | notionAppendBlocksToolConfigClient, 16 | } from "./blocks/client"; 17 | 18 | export { notionListUsersToolConfigClient } from "./users/client"; 19 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/notion/tools/server.ts: -------------------------------------------------------------------------------- 1 | export { 2 | notionListDatabasesToolConfigServer, 3 | notionQueryDatabaseToolConfigServer, 4 | notionCreateDatabaseToolConfigServer, 5 | } from "./databases/server"; 6 | 7 | export { 8 | notionGetPageToolConfigServer, 9 | notionSearchPagesToolConfigServer, 10 | notionCreatePageToolConfigServer, 11 | } from "./pages/server"; 12 | 13 | export { 14 | notionGetBlocksToolConfigServer, 15 | notionAppendBlocksToolConfigServer, 16 | } from "./blocks/server"; 17 | 18 | export { notionListUsersToolConfigServer } from "./users/server"; 19 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export function generateUUID(): string { 9 | return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { 10 | const r = (Math.random() * 16) | 0; 11 | const v = c === "x" ? r : (r & 0x3) | 0x8; 12 | return v.toString(16); 13 | }); 14 | } 15 | 16 | export function sanitizeText(text: string) { 17 | return text.replace("", ""); 18 | } 19 | -------------------------------------------------------------------------------- /src/ai/language/types.ts: -------------------------------------------------------------------------------- 1 | import type { ProviderMetadata } from "ai"; 2 | 3 | export enum LanguageModelCapability { 4 | Vision = "vision", 5 | WebSearch = "web-search", 6 | Reasoning = "reasoning", 7 | Pdf = "pdf", 8 | ToolCalling = "tool-calling", 9 | Free = "free", 10 | } 11 | 12 | export type LanguageModel = { 13 | name: string; 14 | provider: string; 15 | modelId: string; 16 | description?: string; 17 | capabilities?: LanguageModelCapability[]; 18 | bestFor?: string[]; 19 | contextLength?: number; 20 | isNew?: boolean; 21 | providerOptions?: ProviderMetadata; 22 | }; 23 | -------------------------------------------------------------------------------- /src/contexts/env/index.tsx: -------------------------------------------------------------------------------- 1 | import { env } from "@/env"; 2 | 3 | import { AvailableEnvVarsProvider } from "./available-env-vars"; 4 | 5 | import { IS_DEVELOPMENT } from "@/lib/constants"; 6 | 7 | export const EnvProvider = ({ children }: { children: React.ReactNode }) => { 8 | if (!IS_DEVELOPMENT) { 9 | return children; 10 | } 11 | 12 | return ( 13 | [key, Boolean(value)]), 16 | )} 17 | > 18 | {children} 19 | 20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/strava/tools/routes/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { createBaseTool } from "@/toolkits/create-tool"; 4 | 5 | import type { Route } from "strava"; 6 | 7 | export const getRoutesBase = createBaseTool({ 8 | description: "Get the authenticated athlete's routes (requires Premium)", 9 | inputSchema: z.object({ 10 | page: z.number().optional().describe("Page number for pagination"), 11 | per_page: z.number().optional().describe("Number of routes per page"), 12 | }), 13 | outputSchema: z.object({ 14 | routes: z.array(z.custom()), 15 | }), 16 | }); 17 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/twitter/base.ts: -------------------------------------------------------------------------------- 1 | import type { ToolkitConfig } from "@/toolkits/types"; 2 | import { z } from "zod"; 3 | import { TwitterTools } from "./tools"; 4 | import { getUserProfileTool, getLatestTweetsTool } from "./tools"; 5 | 6 | export const twitterParameters = z.object({}); 7 | 8 | export const baseTwitterToolkitConfig: ToolkitConfig< 9 | TwitterTools, 10 | typeof twitterParameters.shape 11 | > = { 12 | tools: { 13 | [TwitterTools.GetUserProfile]: getUserProfileTool, 14 | [TwitterTools.GetLatestTweets]: getLatestTweetsTool, 15 | }, 16 | parameters: twitterParameters, 17 | }; 18 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/twitter/tools/profile/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { createBaseTool } from "@/toolkits/create-tool"; 3 | import type { UserV2Result } from "twitter-api-v2"; 4 | 5 | export const getUserProfileTool = createBaseTool({ 6 | description: "Get Twitter user profile information by username", 7 | inputSchema: z.object({ 8 | username: z 9 | .string() 10 | .describe( 11 | "Twitter username (without @ symbol). Example: 'elonmusk', 'twitter'", 12 | ), 13 | }), 14 | outputSchema: z.object({ 15 | user: z.custom(), 16 | }), 17 | }); 18 | -------------------------------------------------------------------------------- /src/app/(general)/page.tsx: -------------------------------------------------------------------------------- 1 | import { Chat } from "./_components/chat"; 2 | import LandingPage from "./_components/landing-page"; 3 | 4 | import { auth } from "@/server/auth"; 5 | 6 | import { generateUUID } from "@/lib/utils"; 7 | 8 | export default async function Page() { 9 | const session = await auth(); 10 | 11 | if (!session) { 12 | return ; 13 | } 14 | 15 | const id = generateUUID(); 16 | 17 | return ( 18 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-calendar/lib/calendar-client.ts: -------------------------------------------------------------------------------- 1 | import { google } from "googleapis"; 2 | import type { calendar_v3 } from "googleapis"; 3 | 4 | /** 5 | * Creates a Google Calendar client with the provided access token 6 | * @param accessToken - The Google OAuth access token 7 | * @returns A configured Google Calendar client 8 | */ 9 | export const createCalendarClient = ( 10 | accessToken: string, 11 | ): calendar_v3.Calendar => { 12 | const auth = new google.auth.OAuth2(); 13 | auth.setCredentials({ access_token: accessToken }); 14 | return google.calendar({ version: "v3", auth }); 15 | }; 16 | -------------------------------------------------------------------------------- /src/server/db.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | import { env } from "@/env"; 4 | 5 | const createPrismaClient = () => 6 | new PrismaClient({ 7 | log: 8 | env.NODE_ENV === "development" && env.PRISMA_LOG_QUERIES === "true" 9 | ? ["query", "error", "warn"] 10 | : ["error"], 11 | }); 12 | 13 | const globalForPrisma = globalThis as unknown as { 14 | prisma: ReturnType | undefined; 15 | }; 16 | 17 | export const db = globalForPrisma.prisma ?? createPrismaClient(); 18 | 19 | if (env.NODE_ENV !== "production") globalForPrisma.prisma = db; 20 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/discord/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | import { DiscordTools, listServersTool, getUserInfoTool } from "./tools"; 4 | 5 | import type { ToolkitConfig } from "@/toolkits/types"; 6 | 7 | export const discordParameters = z.object({ 8 | // No parameters needed for user-focused tools 9 | }); 10 | 11 | export const baseDiscordToolkitConfig: ToolkitConfig< 12 | DiscordTools, 13 | typeof discordParameters.shape 14 | > = { 15 | tools: { 16 | [DiscordTools.ListServers]: listServersTool, 17 | [DiscordTools.GetUserInfo]: getUserInfoTool, 18 | }, 19 | parameters: discordParameters, 20 | }; 21 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/notion/lib/title.ts: -------------------------------------------------------------------------------- 1 | import type { PageObjectResponse } from "@notionhq/client/build/src/api-endpoints"; 2 | 3 | export const getTitle = (page: PageObjectResponse) => { 4 | if ( 5 | "title" in page.properties && 6 | page.properties.title?.type === "title" && 7 | page.properties.title.title?.[0]?.plain_text 8 | ) { 9 | return page.properties.title.title[0].plain_text; 10 | } 11 | 12 | const urlTitle = 13 | page.url.split("/").pop()?.split("-").slice(0, -1).join(" ") ?? ""; 14 | 15 | if (urlTitle) { 16 | return urlTitle; 17 | } 18 | 19 | return "Untitled Page"; 20 | }; 21 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/google-calendar/tools/get-event/base.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { createBaseTool } from "@/toolkits/create-tool"; 3 | import type { calendar_v3 } from "googleapis"; 4 | 5 | export const getEventTool = createBaseTool({ 6 | description: "Get details of a specific event by ID", 7 | inputSchema: z.object({ 8 | calendarId: z 9 | .string() 10 | .describe("The ID of the calendar containing the event"), 11 | eventId: z.string().describe("The ID of the event to retrieve"), 12 | }), 13 | outputSchema: z.object({ 14 | event: z.custom(), 15 | }), 16 | }); 17 | -------------------------------------------------------------------------------- /src/toolkits/toolkits/video/tools/generate/client.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import type { baseGenerateTool } from "./base"; 4 | 5 | import type { ClientToolConfig } from "@/toolkits/types"; 6 | 7 | export const generateToolConfigClient: ClientToolConfig< 8 | typeof baseGenerateTool.inputSchema.shape, 9 | typeof baseGenerateTool.outputSchema.shape 10 | > = { 11 | CallComponent: ({ args }) => { 12 | return {args.prompt}; 13 | }, 14 | ResultComponent: ({ result }) => { 15 | return