Skip to content

Commit 031c56f

Browse files
authored
Merge pull request #123 from sdcb/feature/1.10.2
Feature/1.10.2
2 parents 96a8796 + 2e53b79 commit 031c56f

File tree

98 files changed

+7884
-402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+7884
-402
lines changed

AzureFileMigrator/AzureFileMigrator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.3" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ Sdcb Chats 是一个强大且灵活的大语言模型前端,支持 21+ 主流
1717

1818
<img alt="chats" src="https://github.com/user-attachments/assets/106ece3f-d94d-460e-9313-4a01f624a647" />
1919

20-
## 🆕 最新版本(1.10.1
20+
## 🆕 最新版本(1.10.2
2121

22-
- 📅 发布日期:2026-02-15
23-
- 🐳 沙箱管理器增强:环境变量管理、会话信息卡片、文件管理与编辑体验升级
24-
- ⚡ 性能改进:高频接口支持服务端 ETag 缓存与 304,移除前端聊天列表本地缓存
25-
- 🗺️ 交互优化:新增 ChatMiniMap 导航,滚动控制从输入框迁移
26-
- 🔐 安全与可用性:API Key 创建后一次性展示完整 Key,列表默认脱敏
27-
- 📦 Code Interpreter 镜像流水线升级:支持构建运行号标识、预装 ripgrep、非 main 分支发布 latest manifest
22+
- 📅 发布日期:2026-03-10
23+
- 🔍 Request Trace:新增入站/出站 HTTP 请求全链路追踪,记录关键时间点、状态码、异常和正文与原始数据
24+
- 🧑‍💼 管理后台:新增请求跟踪工作台,支持筛选、详情查看、原始下载、双记录对比、Excel 导出和按筛选删除
25+
- ⚙️ 采集治理:支持采样率、include/exclude 规则、URL 参数脱敏、保留周期和热刷新
26+
- ♻️ 生命周期管理:新增队列容量保护与定时自动清理,降低持续采集对业务链路的干扰
27+
- 🛠️ 其它改进:统计卡片按时间范围统计,长用户消息支持折叠,Anthropic 协议兼容性继续改进
2828

29-
👉 [查看 1.10.1 发布说明](./doc/zh-CN/release-notes/1.10.1.md) · [查看全部版本](./doc/zh-CN/release-notes/README.md)
29+
👉 [查看 1.10.2 发布说明](./doc/zh-CN/release-notes/1.10.2.md) · [查看全部版本](./doc/zh-CN/release-notes/README.md)
3030

3131
## 快速开始
3232

README_EN.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ Sdcb Chats is a powerful and flexible frontend for large language models, suppor
1717

1818
<img alt="chats-en" src="https://github.com/user-attachments/assets/40d2376e-58a0-4309-a2f5-5ed8262a0c2e" />
1919

20-
## 🆕 Latest Release (1.10.1)
20+
## 🆕 Latest Release (1.10.2)
2121

22-
- 📅 Release Date: 2026-02-15
23-
- 🐳 Sandbox Manager upgrades: environment variable management, richer session info, improved file manager and editor flows
24-
- ⚡ Performance: high-frequency APIs now use server-side ETag caching with 304 handling; frontend chat list local cache removed
25-
- 🗺️ UX: new ChatMiniMap navigation and scroll controls moved out of ChatInput
26-
- 🔐 Security & usability: API keys show full value once at creation and stay masked in list views
27-
- 📦 Code Interpreter image pipeline updates: run-version marker, preinstalled ripgrep, and latest manifest publishing on non-main branches
22+
- 📅 Release Date: 2026-03-10
23+
- 🔍 Request Trace: adds end-to-end inbound and outbound HTTP tracing with timing points, status codes, errors, body capture, and raw payload storage
24+
- 🧑‍💼 Admin workspace: adds a dedicated request trace page with filtering, details, raw downloads, compare view, Excel export, and bulk delete by filters
25+
- ⚙️ Trace governance: adds sampling, include/exclude rules, URL parameter redaction, retention policies, and hot-refreshable configuration
26+
- ♻️ Lifecycle management: adds bounded queue protection and scheduled cleanup to reduce long-running trace pressure
27+
- 🛠️ Other improvements: dashboard summary cards now follow the selected time range, long user messages can collapse, and Anthropic compatibility is improved further
2828

29-
👉 [View 1.10.1 Release Notes](./doc/en-US/release-notes/1.10.1.md) · [View All Releases](./doc/en-US/release-notes/README.md)
29+
👉 [View 1.10.2 Release Notes](./doc/en-US/release-notes/1.10.2.md) · [View All Releases](./doc/en-US/release-notes/README.md)
3030

3131
## Quick Start
3232

doc/en-US/configuration.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Chats reads configuration based on the .NET configuration system, with priority
3939
| [`CodeInterpreter:MaxArtifactsFilesToUpload`](#69-codeinterpretermaxartifactsfilestoupload) | `50` | Max files to upload per turn |
4040
| [`CodeInterpreter:MaxSingleUploadBytes`](#610-codeinterpretermaxsingleuploadbytes) | `157286400` | 150MB, single file limit |
4141
| [`CodeInterpreter:MaxTotalUploadBytesPerTurn`](#611-codeinterpretermaxtotaluploadbytesperturn) | `314572800` | 300MB, total limit per turn |
42+
| [`RequestTraceQueue:Capacity`](#91-requesttracequeuecapacity) | `1000` | Request trace in-memory queue capacity |
43+
| [`RequestTraceCleanup:Enabled`](#92-requesttracecleanupenabled) | `true` | Controls whether scheduled auto-delete runs |
4244
| [`JwtValidPeriod`](#71-jwtvalidperiod) | `1.00:00:00` | 1 day, JWT validity period |
4345
| [`JwtSecretKey`](#72-jwtsecretkey) | `null` | Recommended to set stable key in production |
4446
| [`Chat:Retry429Times`](#81-chatretry429times) | `5` | HTTP 429 retry count |
@@ -356,3 +358,32 @@ The `CodeInterpreter` configuration group controls: the default sandbox image to
356358

357359
- **Environment variable syntax**: `Chat__Retry429Times=5`
358360
- **Command-line syntax**: `--Chat:Retry429Times=5`
361+
362+
---
363+
364+
## 9. Request Trace
365+
366+
### 9.1 `RequestTraceQueue:Capacity`
367+
368+
- **Type**: Integer
369+
- **Default**: `1000`
370+
- **Purpose**: Limits the in-memory bounded channel capacity used by request trace queue.
371+
- **Behavior**:
372+
- Uses `DropWrite` mode when queue is full.
373+
- If set to `<= 0`, the service falls back to `1000`.
374+
375+
- **Environment variable syntax**: `RequestTraceQueue__Capacity=1000`
376+
- **Command-line syntax**: `--RequestTraceQueue:Capacity=1000`
377+
378+
### 9.2 `RequestTraceCleanup:Enabled`
379+
380+
- **Type**: Boolean
381+
- **Default**: `true`
382+
- **Purpose**: Controls whether the RequestTrace scheduled auto-delete background task is enabled.
383+
- **Behavior**:
384+
- When enabled, the background service runs every 30 minutes.
385+
- Each run deletes RequestTrace rows where `ScheduledDeleteAt <= current UTC time` (using `ExecuteDeleteAsync`).
386+
- When disabled, scheduled auto-delete is skipped.
387+
388+
- **Environment variable syntax**: `RequestTraceCleanup__Enabled=true`
389+
- **Command-line syntax**: `--RequestTraceCleanup:Enabled=true`

doc/en-US/release-notes/1.10.2.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<!-- Language: en-US -->
2+
<p><a href="./README.md">📋 All Versions</a> <span style="float:right"><b>English</b> | <a href="../../zh-CN/release-notes/1.10.2.md">简体中文</a></span></p>
3+
4+
# Chats 1.10.2 Release Notes
5+
6+
> Release Date: 2026-03-10 (47 commits since main)
7+
8+
1.10.2 is an observability-focused release centered on **Request Trace**. It introduces **inbound and outbound HTTP request tracing**, a new **admin request trace workspace**, and **configurable sampling, filtering, redaction, and retention policies**, together with export, compare, bulk delete, and scheduled cleanup support. It also includes a small set of admin dashboard, message UX, and Anthropic compatibility improvements.
9+
10+
## 🎯 Core Features
11+
12+
### 1) Request Trace: end-to-end inbound and outbound HTTP tracing
13+
14+
- 🔍 **Two-way capture**: adds `InboundRequestTraceMiddleware` and `OutboundRequestTraceHandler` to trace both inbound user requests and outbound service-to-service HTTP calls.
15+
- 🧭 **Trace metadata**: records `TraceId`, user, source, HTTP method, full URL, status code, error type, and key timestamps for request start, request body completion, response header completion, and response body completion.
16+
- 📦 **Body and raw payload capture**: stores request/response headers, text bodies, raw binary payloads, and body length statistics for troubleshooting encoding, compression, and gateway passthrough issues.
17+
- 🔗 **Broader backend coverage**: request tracing is wired into multiple outbound HTTP call paths, making it easier to correlate upstream requests with downstream dependency behavior.
18+
19+
### 2) New admin request trace workspace
20+
21+
- 🧑‍💼 **Dedicated admin page**: adds `/admin/request-trace` to the admin navigation for centralized trace inspection.
22+
- 🔎 **Advanced filtering**: supports filtering by time range, URL, TraceId, username, and direction, with query state preserved in the URL for refresh and sharing.
23+
- 🧱 **24 selectable columns**: allows per-scenario column selection and persists visible columns in URL query parameters.
24+
- 👀 **Details and downloads**: each trace supports full request/response header and body inspection, `.dump` export, and raw request/response binary downloads, with explicit guidance when the response body is binary-only.
25+
- 🆚 **Two-trace compare**: supports side-by-side comparison for two selected traces, with an option to hide identical fields.
26+
- 📤 **Export and cleanup**: supports Excel export for the current filter set (up to 10000 rows) and bulk deletion by current filters.
27+
28+
### 3) Configurable capture rules, redaction, and retention
29+
30+
- ⚙️ **Independent inbound/outbound config**: inbound and outbound tracing can be enabled and tuned separately for sample rate, minimum duration, header/body capture, and retention days.
31+
- 🎯 **Include/exclude filters**: supports include and exclude rules by source, URL patterns, HTTP methods, and status codes, with quick presets for common gateway scenarios.
32+
- 🕶️ **Redaction improvements**: adds configurable URL parameter redaction and improves default redaction ordering to reduce the risk of sensitive values being stored.
33+
- ♻️ **Hot refresh**: trace configuration is stored in the database config table and refreshed by a background service without requiring a restart.
34+
35+
## 🏗️ Architecture & Engineering
36+
37+
### 1) Persistence and lifecycle management
38+
39+
- 🗄️ **Two-table storage model**: adds `RequestTrace` and `RequestTracePayload`, separating metadata from large payload content and keeping them consistent through cascading delete.
40+
- 📇 **Indexes and scheduled cleanup**: adds indexes on `StartedAt`, `UserId`, `TraceId`, and `ScheduledDeleteAt`; scheduled cleanup runs every 30 minutes to remove expired traces.
41+
- 🚦 **Queue protection**: adds `RequestTraceQueue:Capacity` and uses a bounded in-memory queue with `DropWrite` behavior to protect the main request path under pressure.
42+
- 🧵 **Async persistence**: tracing persistence is queue-based and asynchronous, reducing synchronous I/O pressure while keeping multi-stage timing and exception capture intact.
43+
44+
### 2) Stability refinements for the tracing pipeline
45+
46+
- 🧪 **Edge-case test coverage**: adds unit tests for `CaptureStreams`, `ObservedHttpContent`, `RequestTraceHelper`, `RequestTracePersistService`, and `RequestTraceQueue`.
47+
- 🛡️ **Stability fixes**: fixes missing 401 inbound traces, empty-pattern matching, details dialog overflow, redundant payload deletion, and binary/JSON presentation issues.
48+
- 🧰 **Config capacity**: expands `Config.Value` to `NVARCHAR(MAX)` so larger JSON trace configs can be stored safely.
49+
50+
## 🎨 Other Improvements
51+
52+
### Admin dashboard and message UX
53+
54+
- 📊 **Dashboard summary cards**: admin summary cards now compute chat count and active users based on the currently selected time range.
55+
- ✂️ **User message collapse**: long user messages can now collapse inside the message bubble with an approximately 5.5-line preview.
56+
- 🧠 **Thinking display refinement**: removes the fixed max-height cap from `ThinkingMessage` expansion so long reasoning content behaves more naturally.
57+
58+
### Protocol compatibility and dependency updates
59+
60+
- 🔧 **Anthropic compatibility fixes**: fixes lost tool results during Anthropic message conversion (#122) and improves thinking signature compatibility for the DeepSeek Anthropic protocol path.
61+
- 🔤 **Readable MCP JSON**: preserves readable Unicode when fetching MCP tool input schemas instead of over-escaping JSON.
62+
- ⬆️ **Frontend dependency update**: upgrades the frontend to `Next.js 16.1.6` and aligns related browser compatibility dependencies.
63+
64+
## 🐛 Stability Fixes
65+
66+
- Fixes Request Trace default redaction ordering and field ordering issues.
67+
- Fixes request/response capture timing so traces can start earlier and body capture becomes more complete.
68+
- Fixes scrolling and overflow behavior in the Request Trace details dialog for long headers and long bodies.
69+
- Simplifies the include/exclude rule organization in the trace config dialog to reduce configuration friction.
70+
71+
## ⬆️ Upgrade Notes
72+
73+
- Run DB migration: `src/scripts/db-migration/1.10/1.10.2.sql`
74+
- Adds the `RequestTrace` main table and the `RequestTracePayload` payload table
75+
- Adds indexes for `StartedAt`, `UserId`, `TraceId`, and `ScheduledDeleteAt`
76+
- Expands `Config.Value` to `NVARCHAR(MAX)` to support larger JSON configuration payloads
77+
- New config keys:
78+
- `RequestTraceQueue:Capacity`: controls the in-memory request trace queue capacity, default `1000`
79+
- `RequestTraceCleanup:Enabled`: controls scheduled auto-cleanup, default `true`
80+
- Upgrading does not automatically enable Request Trace for all traffic; the actual capture scope still depends on the inbound/outbound tracing rules, sample rate, and retention policy configured by the admin.
81+
- If you plan to enable request tracing in a high-concurrency environment, set sample rate, URL filters, and retention days first to avoid unnecessary database write and storage pressure.

doc/en-US/release-notes/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,21 @@ This page indexes all major version release notes for the Chats project, from th
77

88
---
99

10-
## [1.10.1](1.10.1.md) - 2026-02-15 ⭐ Latest Release
10+
## [1.10.2](1.10.2.md) - 2026-03-10 ⭐ Latest Release
11+
12+
**Core Highlights**: Request Trace end-to-end tracing · Admin request trace workspace · Sampling/filtering/redaction/retention policies · Export, compare, and scheduled cleanup · Small UX and compatibility improvements
13+
14+
- 🔍 **Request Trace**: adds inbound and outbound HTTP request tracing with timing points, status codes, errors, body capture, and raw payload downloads
15+
- 🧑‍💼 **Admin Workspace**: adds a dedicated request trace page with filters, 24-column customization, details, raw downloads, two-trace compare, Excel export, and bulk delete by filters
16+
- ⚙️ **Trace Governance**: supports separate inbound/outbound settings, sample rate, include/exclude filters, URL parameter redaction, and retention policies
17+
- ♻️ **Lifecycle Management**: adds bounded queue protection and scheduled cleanup to reduce long-running trace storage pressure
18+
- 🛠️ **Other Improvements**: updates dashboard summary card metrics, adds long user message collapse, and improves Anthropic protocol compatibility
19+
20+
[View Full Release Notes →](1.10.2.md)
21+
22+
---
23+
24+
## [1.10.1](1.10.1.md) - 2026-02-15
1125

1226
**Core Highlights**: Sandbox Manager Enhancements · Server-side ETag Caching · ChatMiniMap Navigation · API Key Management Upgrades · Code Interpreter Image Pipeline Updates
1327

doc/zh-CN/configuration.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Chats 基于 .NET 配置系统读取配置,优先级从高到低为:
4141
| [`CodeInterpreter:MaxArtifactsFilesToUpload`](#69-codeinterpretermaxartifactsfilestoupload) | `50` | 每轮最多上传文件数 |
4242
| [`CodeInterpreter:MaxSingleUploadBytes`](#610-codeinterpretermaxsingleuploadbytes) | `157286400` | 150MB,单文件限制 |
4343
| [`CodeInterpreter:MaxTotalUploadBytesPerTurn`](#611-codeinterpretermaxtotaluploadbytesperturn) | `314572800` | 300MB,单轮总限制 |
44+
| [`RequestTraceQueue:Capacity`](#91-requesttracequeuecapacity) | `1000` | RequestTrace 内存队列容量 |
45+
| [`RequestTraceCleanup:Enabled`](#92-requesttracecleanupenabled) | `true` | 控制定时自动删除是否启用 |
4446
| [`JwtValidPeriod`](#71-jwtvalidperiod) | `1.00:00:00` | 1天,JWT有效期 |
4547
| [`JwtSecretKey`](#72-jwtsecretkey) | `null` | 生产环境建议设置稳定密钥 |
4648
| [`Chat:Retry429Times`](#81-chatretry429times) | `5` | HTTP 429重试次数 |
@@ -360,3 +362,32 @@ Chats 基于 .NET 配置系统读取配置,优先级从高到低为:
360362

361363
- **环境变量写法**`Chat__Retry429Times=5`
362364
- **命令行写法**`--Chat:Retry429Times=5`
365+
366+
---
367+
368+
## 9. RequestTrace
369+
370+
### 9.1 `RequestTraceQueue:Capacity`
371+
372+
- **类型**:整数
373+
- **默认值**`1000`
374+
- **用途**:限制 RequestTrace 内存有界队列(Channel)的容量。
375+
- **行为说明**
376+
- 队列满时采用 `DropWrite` 策略。
377+
- 配置为 `<= 0` 时,会回退到 `1000`
378+
379+
- **环境变量写法**`RequestTraceQueue__Capacity=1000`
380+
- **命令行写法**`--RequestTraceQueue:Capacity=1000`
381+
382+
### 9.2 `RequestTraceCleanup:Enabled`
383+
384+
- **类型**:布尔值
385+
- **默认值**`true`
386+
- **用途**:控制 RequestTrace 自动删除后台任务是否启用。
387+
- **行为说明**
388+
- 启用时,后台服务每 30 分钟执行一次。
389+
- 每次执行会删除 `ScheduledDeleteAt <= 当前 UTC 时间` 的 RequestTrace 记录(使用 `ExecuteDeleteAsync`)。
390+
- 关闭时,不执行自动删除。
391+
392+
- **环境变量写法**`RequestTraceCleanup__Enabled=true`
393+
- **命令行写法**`--RequestTraceCleanup:Enabled=true`

0 commit comments

Comments
 (0)