diff --git a/.env.example b/.env.example index 8d715703..e5f5288f 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,8 @@ # AI Provider (at least one required) ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -# ANTHROPIC_MODEL=claude-sonnet-4-20250514 +# ANTHROPIC_MODEL=claude-opus-5 +# Required when the key above is identity-linked (scoped to all workspaces). +# ANTHROPIC_WORKSPACE_ID=wrkspc_xxxxxxxxxxxxxxxxxxxxxxx # OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # OPENAI_MODEL=gpt-4-turbo diff --git a/CLAUDE.md b/CLAUDE.md index 43662375..e51248f5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -51,6 +51,7 @@ bun run kill # Kill processes on ports 3000, 3002, 8081 **Server:** - `ANTHROPIC_API_KEY` (required) +- `ANTHROPIC_WORKSPACE_ID` (required for an identity-linked key): sent as the `anthropic-workspace-id` header - `LOG_FORMAT` (optional): `pretty` (default) or `json` - `RATE_LIMIT_MAX_REQUESTS` (optional): Max requests per window (0 = unlimited) - `RATE_LIMIT_WINDOW_MS` (optional): Window in ms (default: 60000) diff --git a/README.md b/README.md index 15ded121..84ce4d36 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ services: # - OPENAI_API_KEY=${OPENAI_API_KEY} # Optional: Model selection - # - ANTHROPIC_MODEL=claude-sonnet-4-20250514 + # - ANTHROPIC_MODEL=claude-opus-5 # - OPENAI_MODEL=gpt-4-turbo # Optional: Server configuration @@ -723,6 +723,79 @@ root.render( ); ``` +For partial customization, override only the built-in chat regions you own. +Every slot receives the built-in UI as `children`: render it to decorate the +default behavior, or omit it to replace that region completely. + +```tsx +import type { + ChatMessageSlotProps, + ChatComposerSlotProps, +} from '@meetsmore-oss/use-ai-client'; + +function Message({ message, children }: ChatMessageSlotProps) { + return
{children}
; +} + +function Composer({ input, onInputChange, onSend, canSend }: ChatComposerSlotProps) { + return ( +
{ event.preventDefault(); onSend(); }}> +