-
Notifications
You must be signed in to change notification settings - Fork 15.9k
docs: 文档检查/check 20260419 #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b20f916
20d9c01
7e1954a
d764acc
90825fa
72d5f3f
a28a452
4a68966
7735a70
4cc8573
635ef3d
8a62c03
64430e3
fb0aa4d
fccdcd7
f416889
5079a17
b048fdc
6d36e92
b12bd29
7ed387a
6b44de2
6fe085d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ message_stop ← 消息结束 | |
|
|
||
| ### 事件处理状态机 | ||
|
|
||
| `src/services/api/claude.ts` 中 `queryStreamRaw()` 函数的事件处理循环实现了一个基于 `switch(part.type)` 的状态机: | ||
| `src/services/api/claude.ts` 中 `queryModelWithStreaming()` 函数的事件处理循环实现了一个基于 `switch(part.type)` 的状态机: | ||
|
|
||
| | 事件类型 | 处理逻辑 | 状态变更 | | ||
| |----------|----------|----------| | ||
|
|
@@ -167,10 +167,13 @@ UI 层通过 `useToolCallProgress` hook 实时展示命令输出,而不是等 | |
|
|
||
| | Provider | 流式协议 | 特殊处理 | | ||
| |----------|----------|----------| | ||
| | **Anthropic Direct** | 原生 SSE | 延迟最低,TTFT 最快 | | ||
| | **firstParty** (Anthropic Direct) | 原生 SSE | 延迟最低,TTFT 最快 | | ||
| | **AWS Bedrock** | AWS SDK 流式接口 | 需要额外的 beta header 和认证 | | ||
| | **Google Vertex** | gRPC → 事件流 | 通过 `getMergedBetas()` 适配 | | ||
| | **Azure** | Anthropic 兼容 API | 自定义 base URL | | ||
| | **foundry** | Anthropic 兼容 API | 内部部署 | | ||
| | **openai** | OpenAI 流式适配器 | 转换为 Anthropic 内部格式 | | ||
| | **gemini** | Gemini 流式适配器 | 转换为 Anthropic 内部格式 | | ||
| | **grok** (xAI) | Grok 流式适配器 | 转换为 Anthropic 内部格式 | | ||
|
Comment on lines
+170
to
+176
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mirror the newly documented providers in the selection snippet. Lines 170-176 now document 📝 Proposed docs fix // 根据 api_provider 配置选择:
-// "anthropic" → 直连
-// "bedrock" → AWS SDK
-// "vertex" → Google SDK
-// 第三方 base URL → 自动检测
+// "anthropic" / "firstParty" → Anthropic Direct
+// "bedrock" → AWS SDK
+// "vertex" → Google SDK
+// "foundry" → 内部 Anthropic-compatible endpoint
+// "openai" → OpenAI adapter
+// "gemini" → Gemini adapter
+// "grok" → xAI adapter
+// 第三方 base URL → 自动检测Also applies to: 184-190 🤖 Prompt for AI Agents |
||
|
|
||
| 所有 Provider 通过统一的 `Stream<BetaRawMessageStreamEvent>` 抽象层屏蔽差异。上层代码(QueryEngine、REPL)不需要关心底层用的是哪个 Provider。 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ | |
|
|
||
| - **端点**: `{region}-aiplatform.googleapis.com` | ||
| - **认证**: `GoogleAuth` + `cloud-platform` scope | ||
| - **文件**: `src/services/api/client.ts:228-298` | ||
| - **文件**: `src/services/api/client.ts:221-298` | ||
|
|
||
| ### 4. Azure Foundry | ||
|
|
||
|
|
@@ -129,12 +129,12 @@ WebSearch 工具支持直接抓取 Bing 搜索结果页面,也支持通过 Bra | |
| - **Bing 端点**: `https://www.bing.com/search?q={query}&setmkt=en-US` | ||
| - **Brave 端点**: `https://api.search.brave.com/res/v1/llm/context?q={query}` | ||
| - **文件**: | ||
| - `src/tools/WebSearchTool/adapters/bingAdapter.ts` | ||
| - `src/tools/WebSearchTool/adapters/braveAdapter.ts` | ||
| - `packages/builtin-tools/src/tools/WebSearchTool/adapters/bingAdapter.ts` | ||
| - `packages/builtin-tools/src/tools/WebSearchTool/adapters/braveAdapter.ts` | ||
|
|
||
| 另外还有 Domain Blocklist 查询: | ||
| - **端点**: `https://api.anthropic.com/api/web/domain_info?domain={domain}` | ||
| - **文件**: `src/tools/WebFetchTool/utils.ts` | ||
| - **文件**: `packages/builtin-tools/src/tools/WebFetchTool/utils.ts` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🛠️ Suggested doc fix-| `/api/web/domain_info?domain={}` | 域名安全检查 | `src/tools/WebFetchTool/utils.ts` |
+| `/api/web/domain_info?domain={}` | 域名安全检查 | `packages/builtin-tools/src/tools/WebFetchTool/utils.ts` |🤖 Prompt for AI Agents |
||
|
|
||
| ### 15. Google Cloud Storage (自动更新) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
启动流程描述前后矛盾:请同步更新流程图。
这里明确写了“当前未接入启动流程”,但流程图仍在 Line 283-285 把
assertMinVersion()和migrateAutoUpdatesToSettings()画成启动阶段必经步骤。请二选一统一描述,否则会误导排障与运维判断。Also applies to: 203-203
🤖 Prompt for AI Agents