feat: Enhance account identification to support email, mobile, and token-only synthetic IDs across API, UI, and documentation.

This commit is contained in:
CJACK
2026-02-18 20:39:38 +08:00
parent 7fc10573ab
commit 0348fa8a22
10 changed files with 232 additions and 22 deletions

6
API.md
View File

@@ -439,6 +439,7 @@ data: {"type":"message_stop"}
"keys": ["k1", "k2"],
"accounts": [
{
"identifier": "user@example.com",
"email": "user@example.com",
"mobile": "",
"has_password": true,
@@ -499,6 +500,7 @@ data: {"type":"message_stop"}
{
"items": [
{
"identifier": "user@example.com",
"email": "user@example.com",
"mobile": "",
"has_password": true,
@@ -523,7 +525,7 @@ data: {"type":"message_stop"}
### `DELETE /admin/accounts/{identifier}`
`identifier` 为 emailmobile。
`identifier` 为 emailmobile,或 token-only 账号的合成标识(`token:<hash>`
**响应**`{"success": true, "total_accounts": 5}`
@@ -553,7 +555,7 @@ data: {"type":"message_stop"}
| 字段 | 必填 | 说明 |
| --- | --- | --- |
| `identifier` | ✅ | email mobile |
| `identifier` | ✅ | email / mobile / token-only 合成标识 |
| `model` | ❌ | 默认 `deepseek-chat` |
| `message` | ❌ | 空字符串时仅测试会话创建 |