Skip to content

Commit c8f12d4

Browse files
committed
feat(ai): add streaming assistant runtime
1 parent 7b67d4b commit c8f12d4

36 files changed

Lines changed: 2344 additions & 293 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Force LF line endings for all text files; matches Prettier's default endOfLine=lf.
22
* text=auto eol=lf
3+
*.bat text eol=crlf
4+
*.cmd text eol=crlf
35

46
# Binary files — never normalize.
57
*.png binary

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
*.svg
2+
pnpm-lock.yaml
3+
package-lock.json
4+
yarn.lock
5+
bun.lockb

apps/docs/public/logo.svg

Lines changed: 4 additions & 2 deletions
Loading

apps/docs/reference/diagnostic-codes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ requestId
291291
| [`AI-3001`](/reference/diagnostics/ai-3001) | Prompt 上下文为空 | `warning` |
292292
| [`AI-4001`](/reference/diagnostics/ai-4001) | 响应为空 | `error` |
293293
| [`AI-4002`](/reference/diagnostics/ai-4002) | 响应结构无法解析 | `error` |
294+
| [`AI-4010`](/reference/diagnostics/ai-4010) | 流式响应中断 | `error` |
295+
| [`AI-4011`](/reference/diagnostics/ai-4011) | 流式响应结构无法解析 | `error` |
296+
| [`AI-4012`](/reference/diagnostics/ai-4012) | 流式响应不可读 | `warning` |
294297
| [`AI-5001`](/reference/diagnostics/ai-5001) | AI Command dry-run 失败 | `error` |
295298
| [`AI-9001`](/reference/diagnostics/ai-9001) | AI 未知异常 | `error` |
296299

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
lastUpdated: false
3+
---
4+
5+
# AI-4010 流式响应中断
6+
7+
## 快速信息
8+
9+
| 名称 | 说明 |
10+
| -------- | ---------- |
11+
| 前缀 | AI |
12+
| 范围 | AI 助手 |
13+
| 严重程度 | `error` |
14+
| 阶段 | `response` |
15+
| 可重试 ||
16+
17+
## 含义
18+
19+
AI-4010 表示 流式响应中断。请先确认当前页面、项目状态和最近操作,再按建议操作处理。
20+
21+
## 触发条件
22+
23+
Provider 流式响应在完成标记前中断,或 SSE chunk 读取失败
24+
25+
## 建议操作
26+
27+
重试请求,或检查网络和 Provider 服务状态
28+
29+
## 上报时提供
30+
31+
- 错误码和 requestId
32+
- 当前项目或工作区 ID
33+
- 触发该错误的操作
34+
- 可复现时的最小文档或配置
35+
36+
[返回错误码索引](/reference/diagnostic-codes)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
lastUpdated: false
3+
---
4+
5+
# AI-4011 流式响应结构无法解析
6+
7+
## 快速信息
8+
9+
| 名称 | 说明 |
10+
| -------- | ---------- |
11+
| 前缀 | AI |
12+
| 范围 | AI 助手 |
13+
| 严重程度 | `error` |
14+
| 阶段 | `response` |
15+
| 可重试 ||
16+
17+
## 含义
18+
19+
AI-4011 表示 流式响应结构无法解析。请先确认当前页面、项目状态和最近操作,再按建议操作处理。
20+
21+
## 触发条件
22+
23+
Provider 流式响应完成,但累计文本无法解析为期望的结构化输出
24+
25+
## 建议操作
26+
27+
重试请求,或在调试详情中查看模型原始返回
28+
29+
## 上报时提供
30+
31+
- 错误码和 requestId
32+
- 当前项目或工作区 ID
33+
- 触发该错误的操作
34+
- 可复现时的最小文档或配置
35+
36+
[返回错误码索引](/reference/diagnostic-codes)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
lastUpdated: false
3+
---
4+
5+
# AI-4012 流式响应不可读
6+
7+
## 快速信息
8+
9+
| 名称 | 说明 |
10+
| -------- | ---------- |
11+
| 前缀 | AI |
12+
| 范围 | AI 助手 |
13+
| 严重程度 | `warning` |
14+
| 阶段 | `response` |
15+
| 可重试 ||
16+
17+
## 含义
18+
19+
AI-4012 表示 流式响应不可读。请先确认当前页面、项目状态和最近操作,再按建议操作处理。
20+
21+
## 触发条件
22+
23+
Provider 声称支持 streaming,但 fetcher 没有返回可读 `ReadableStream`
24+
25+
## 建议操作
26+
27+
重试请求;如果持续复现,切换到非流式 Provider 或检查运行环境
28+
29+
## 上报时提供
30+
31+
- 错误码和 requestId
32+
- 当前项目或工作区 ID
33+
- 触发该错误的操作
34+
- 可复现时的最小文档或配置
35+
36+
[返回错误码索引](/reference/diagnostic-codes)

apps/docs/reference/diagnostics/ai.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ AI 命名空间覆盖Provider、模型发现、Prompt、响应解析和 AI comma
1515
| [`AI-3001`](/reference/diagnostics/ai-3001) | Prompt 上下文为空 | `warning` |
1616
| [`AI-4001`](/reference/diagnostics/ai-4001) | 响应为空 | `error` |
1717
| [`AI-4002`](/reference/diagnostics/ai-4002) | 响应结构无法解析 | `error` |
18+
| [`AI-4010`](/reference/diagnostics/ai-4010) | 流式响应中断 | `error` |
19+
| [`AI-4011`](/reference/diagnostics/ai-4011) | 流式响应结构无法解析 | `error` |
20+
| [`AI-4012`](/reference/diagnostics/ai-4012) | 流式响应不可读 | `warning` |
1821
| [`AI-5001`](/reference/diagnostics/ai-5001) | AI Command dry-run 失败 | `error` |
1922
| [`AI-9001`](/reference/diagnostics/ai-9001) | AI 未知异常 | `error` |
2023

Lines changed: 4 additions & 2 deletions
Loading

apps/web/public/prodivix.svg

Lines changed: 4 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)