mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
946babfc8b
## Summary Fills documentation gaps that Pathfinder (our docs-indexing / gap-analysis system) flagged in `showcase/shell-docs` — new backend, Microsoft Agent Framework / Mastra integration, reference-hook, troubleshooting, and shared-state pages, plus accuracy corrections to existing v1/v2 pages. 43 files, 6 by-area commits, rebased onto current `main`. ## Corrections (source-verified across two review passes) - **.NET MAF samples:** tool names now match the frontend (`Name = "get_weather"` / `"step_progress"`) so the renderer/middleware actually fire. - **v1/v2 provider identity:** v2-specific examples (e.g. `showDevConsole="auto"`) now use `<CopilotKitProvider>` — `<CopilotKit>` exported from `@copilotkit/react-core/v2` is the v1 backward-compat component, which has no `"auto"` mode. - **Imports / snippets:** added missing `useRenderTool` / `z` / `useAgent` imports + `"use client"`; removed a nonexistent `mcpApps.serverId` field; fixed an off-by-2 code-highlight range. - **API accuracy:** Express legacy factory is `copilotRuntimeNodeExpressEndpoint`; v1 `useAgent` `runAgent` signature + `UseAgentProps` type name; `useRenderToolCall` falls back to the default renderer (not `null`); `useComponent` also registers a tool; v1 `enableInspector` localhost/`0.0.0.0` default vs v2 `"auto"` nuance. - **Nav / icons:** registered `lucide/Map`; wired new pages into `meta.json`. - **Deletion:** removed the orphaned `content/docs/reference/v2/hooks/useAgent.mdx` — verified safe (the canonical `content/reference/hooks/useAgent.mdx` is intact and all inbound links resolve). ## Notes for reviewer - The working tree had no `node_modules`, so the docs build was **not run locally — relying on CI** for the build / lint / commitlint gate. - Deferred polish (follow-up): state-rendering "in the chat" framing, decorative `AgentState` types, `agentId`-key explanation, `useFrontendTool` migration example, error-reference dev-warn nuance. ## Test plan - [ ] CI green (shell-docs build, lint, commitlint)