Loading...
Loading...
Compare original and translation side by side
@google/stitch-sdk@google/stitch-sdk| What you need | Where to find it |
|---|---|
| Public exports (full surface) | |
| Domain class methods + signatures | Source files for each exported class ( |
| Generated method bindings | |
| Handwritten methods | Methods in class source files that aren't in domain-map bindings (e.g. |
| AI SDK tools adapter | |
| Generated tool definitions | |
| Tool client methods | |
| Error codes | |
| Config options | |
| Proxy config | |
| 需要获取的内容 | 查找路径 |
|---|---|
| 公开导出内容(完整API范围) | |
| 领域类方法及签名 | 每个导出类的源文件( |
| 生成的方法绑定 | |
| 手写方法 | 类源文件中未包含在domain-map绑定中的方法(例如 |
| AI SDK工具适配器 | |
| 生成的工具定义 | |
| 工具客户端方法 | |
| 错误码 | |
| 配置选项 | |
| 代理配置 | |
project(id) → generate → getHtmlcallTool("create_project", ...)stitch.listTools()stitch.callTool()StitchToolClientstitchTools()@google/stitch-sdk/aigenerateTexttools: stitchTools()stepCountIsSTITCH_API_KEYnpm install @google/stitch-sdknpm install @google/stitch-sdk aiai@google/stitch-sdk/ai// ...project(id) → generate → getHtmlcallTool("create_project", ...)stitch.listTools()stitch.callTool()StitchToolClientstitchTools()@google/stitch-sdk/aitools: stitchTools()stepCountIsgenerateTextSTITCH_API_KEYnpm install @google/stitch-sdknpm install @google/stitch-sdk ai@google/stitch-sdk/aiai// ...StitchProjectScreenStitchToolClienttoolDefinitionstoolMapstitchTools()StitchProxystitchStitchProjectScreenStitchToolClienttoolDefinitionstoolMapstitchTools()StitchProxystitchindex.tsindex.tsStitchToolClientstitchTools()index.tsindex.tsStitchToolClientstitchTools()| Anti-pattern | Why it fails |
|---|---|
| Leading with badges, logos, or status shields | Visual noise before the reader knows what the library does |
| "Getting Started" as the first section | Forces setup before demonstrating value |
| Feature bullet lists without code | Tells instead of shows |
| "Easy to use", "simple", "just works" | Self-congratulatory claims that invite skepticism |
| Long install/config blocks before any usage | Asks for investment before demonstrating return |
| Collapsible sections hiding core API docs | Buries the content committed readers came for |
| Hard-coding the API in docs without sourcing | Goes stale when tools are added |
| 反模式 | 失败原因 |
|---|---|
| 以徽章、标识或状态图标开头 | 在读者了解库的用途前,这些都是视觉干扰 |
| 第一个章节是“快速开始” | 强迫读者先完成配置,再了解库的价值 |
| 仅用功能列表而不带代码 | 只做告知,不做演示 |
| 使用“易于使用”“简单”“开箱即用”这类词汇 | 自我夸赞的表述容易引发质疑 |
| 在展示任何用法前先放冗长的安装/配置步骤 | 要求读者先投入精力,却未展示价值 |
| 用折叠区域隐藏核心API文档 | 将目标读者需要的内容深埋 |
| 不从代码库获取API,而是在文档中硬编码 | 新增工具时文档会过时 |