diff --git a/apps/docs/app/[lang]/[[...slug]]/page.tsx b/apps/docs/app/[lang]/[[...slug]]/page.tsx index 2d9e00a8849..438968103cf 100644 --- a/apps/docs/app/[lang]/[[...slug]]/page.tsx +++ b/apps/docs/app/[lang]/[[...slug]]/page.tsx @@ -121,7 +121,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l const urlParts = page.url.split('/').filter(Boolean) let currentPath = '' - urlParts.forEach((part, index) => { + urlParts.forEach((part: string, index: number) => { if (index === 0 && SUPPORTED_LANGUAGES.has(part)) { currentPath = `/${part}` return @@ -131,7 +131,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l const name = part .split('-') - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .map((word: string) => word.charAt(0).toUpperCase() + word.slice(1)) .join(' ') if (index === urlParts.length - 1) { diff --git a/apps/docs/app/api/chat/route.ts b/apps/docs/app/api/chat/route.ts index 2150e044980..915fe9a39c4 100644 --- a/apps/docs/app/api/chat/route.ts +++ b/apps/docs/app/api/chat/route.ts @@ -1,7 +1,13 @@ import { openai } from '@ai-sdk/openai' -import { convertToModelMessages, stepCountIs, streamText, tool, type UIMessage } from 'ai' +import { + convertToModelMessages, + jsonSchema, + stepCountIs, + streamText, + tool, + type UIMessage, +} from 'ai' import { sql } from 'drizzle-orm' -import { z } from 'zod' import { db, docsEmbeddings } from '@/lib/db' import { generateSearchEmbedding } from '@/lib/embeddings' @@ -332,8 +338,21 @@ export async function POST(req: Request) { searchDocs: tool({ description: 'Search the Sim documentation for relevant content. Use this before answering any question about Sim.', - inputSchema: z.object({ - query: z.string().describe('A focused natural-language search query.'), + /** + * The SDK's own schema helper instead of a zod schema: the `ai` + * package's zod-v4 typings lag the workspace zod version, so a zod + * object here fails the tool() overloads whenever the two drift. + */ + inputSchema: jsonSchema<{ query: string }>({ + type: 'object', + properties: { + query: { + type: 'string', + description: 'A focused natural-language search query.', + }, + }, + required: ['query'], + additionalProperties: false, }), execute: async ({ query }) => searchDocs(query, locale), }), diff --git a/apps/docs/content/docs/en/platform/costs.mdx b/apps/docs/content/docs/en/platform/costs.mdx index 26c47fe0898..46f379730c1 100644 --- a/apps/docs/content/docs/en/platform/costs.mdx +++ b/apps/docs/content/docs/en/platform/costs.mdx @@ -321,7 +321,7 @@ By default, your usage is capped at the credits included in your plan. To allow | **Max** | Up to 10 | — | | **Team / Enterprise** | — | Unlimited (Owners and Admins) | -Team and Enterprise plans unlock shared workspaces that belong to your organization. Every workspace created under a Team or Enterprise plan is organization-owned: Owners and Admins can create unlimited shared workspaces, while organization Members cannot create workspaces (personal workspaces created before joining the organization remain accessible). Internal members invited to a shared workspace join the organization and count toward your seat total — Enterprise invites require an available seat at invite time, while Team plans add a seat automatically when the invitee accepts. Existing Sim users who already belong to another organization can be added as external workspace members; they get workspace access without joining your organization or using one of your seats. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces remain accessible to current members but new invites are disabled until the organization is upgraded again. +Team and Enterprise plans unlock shared workspaces that belong to your organization. Every workspace created under a Team or Enterprise plan is organization-owned: Owners and Admins can create unlimited shared workspaces, while organization Members cannot create workspaces. When someone joins the organization as an internal member, personal workspaces they own move into the organization and their usage is billed to it from then on. Internal members count toward your seat total — Enterprise invites require an available seat at invite time, while Team plans add a seat automatically when the invitee accepts. External workspace members get access to specific workspaces without joining your organization or using one of your seats; they must already be on a paid Sim plan (their own Pro or Max subscription, or another organization that seats them), and invitees who already belong to another organization always join this way. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces remain accessible to current members but new invites are disabled until the organization is upgraded again. ### Rate Limits diff --git a/apps/docs/content/docs/en/platform/permissions.mdx b/apps/docs/content/docs/en/platform/permissions.mdx index 97a7412cc64..c6af67ec2b1 100644 --- a/apps/docs/content/docs/en/platform/permissions.mdx +++ b/apps/docs/content/docs/en/platform/permissions.mdx @@ -37,7 +37,7 @@ Inherited roles are **automatic and locked**. In member lists they show greyed o Sim has two kinds of workspaces: - **Personal workspaces** live under your individual account. The number you can create depends on your plan. -- **Shared (organization) workspaces** live under an organization and are available on Team and Enterprise plans. Any organization Owner or Admin can create them. Internal members invited to a shared workspace join the organization and count toward your seat total. Existing Sim users who already belong to another organization can be added as external workspace members instead, giving them access to the workspace without adding them to your organization roster or using one of your seats. +- **Shared (organization) workspaces** live under an organization and are available on Team and Enterprise plans. Any organization Owner or Admin can create them. When you invite someone to a shared workspace you choose their **Membership**: **Member** or **Admin** makes them an internal member of the organization — they use a seat, and their own workspaces move in with them (see [Joining an organization](#joining-an-organization)) — while **External** gives them access to the selected workspaces only. Invitees who already belong to another organization always become external, because a Sim account belongs to at most one organization. ### Workspace Limits by Plan @@ -48,7 +48,7 @@ Sim has two kinds of workspaces: | **Max** | Up to 10 | — | | **Team / Enterprise** | — | Unlimited (Owners and Admins) | -On Team and Enterprise plans, every workspace you create belongs to the organization. Organization Owners and Admins can create unlimited shared workspaces; organization Members cannot create workspaces. Personal workspaces created before joining the organization remain accessible. Enterprise invites require an available seat at invite time; on Team plans, a seat is added automatically when the invitee accepts. +On Team and Enterprise plans, every workspace you create belongs to the organization. Organization Owners and Admins can create unlimited shared workspaces; organization Members cannot create workspaces. Personal workspaces you owned before joining move into the organization when you accept the invite — see [Joining an organization](#joining-an-organization). Enterprise invites require an available seat at invite time; on Team plans, a seat is added automatically when the invitee accepts. When a Team or Enterprise subscription is cancelled or downgraded, existing shared workspaces stay accessible to current members. New invitations are blocked until the organization is upgraded again. @@ -60,6 +60,12 @@ On Team and Enterprise plans, every workspace you create belongs to the organiza