feat: Implement admin settings UI, enhance admin authentication with password hashing, and add new streaming runtime logic for Claude and OpenAI adapters with extensive compatibility tests.

This commit is contained in:
CJACK
2026-02-19 02:45:38 +08:00
parent d21aedac83
commit 7307a5cc9a
64 changed files with 4078 additions and 967 deletions

View File

@@ -0,0 +1,8 @@
{
"parts": [
{"text": "思考中", "type": "thinking"},
{"text": "结论", "type": "text"}
],
"finished": false,
"new_type": "text"
}

View File

@@ -0,0 +1,5 @@
{
"parts": [],
"finished": true,
"new_type": "text"
}

View File

@@ -0,0 +1,8 @@
{
"parts": [
{"text": "{\"", "type": "text"},
{"text": "tool_calls\":[{\"name\":\"read_file\",\"input\":{\"path\":\"README.MD\"}}]}", "type": "text"}
],
"finished": false,
"new_type": "text"
}

View File

@@ -0,0 +1,7 @@
{
"cases": [
{"name": "ascii_short", "tokens": 1},
{"name": "cjk", "tokens": 3},
{"name": "mixed", "tokens": 4}
]
}

View File

@@ -0,0 +1,3 @@
{
"calls": []
}

View File

@@ -0,0 +1,5 @@
{
"calls": [
{"name": "unknown_tool", "input": {"x": 1}}
]
}

View File

@@ -0,0 +1,12 @@
{
"chunk": {
"p": "response/fragments",
"o": "APPEND",
"v": [
{"type": "THINK", "content": "思考中"},
{"type": "RESPONSE", "content": "结论"}
]
},
"thinking_enabled": true,
"current_type": "thinking"
}

View File

@@ -0,0 +1,10 @@
{
"chunk": {
"p": "response",
"v": [
{"p": "status", "v": "FINISHED"}
]
},
"thinking_enabled": false,
"current_type": "text"
}

View File

@@ -0,0 +1,11 @@
{
"chunk": {
"p": "response",
"v": [
{"p": "response/content", "v": "{\""},
{"p": "response/content", "v": "tool_calls\":[{\"name\":\"read_file\",\"input\":{\"path\":\"README.MD\"}}]}"}
]
},
"thinking_enabled": false,
"current_type": "text"
}

View File

@@ -0,0 +1,7 @@
{
"cases": [
{"name": "ascii_short", "text": "abcd"},
{"name": "cjk", "text": "你好世界"},
{"name": "mixed", "text": "Hello 你好世界"}
]
}

View File

@@ -0,0 +1,4 @@
{
"text": "```json\n{\"tool_calls\":[{\"name\":\"read_file\",\"input\":{\"path\":\"README.MD\"}}]}\n```",
"tool_names": ["read_file"]
}

View File

@@ -0,0 +1,4 @@
{
"text": "{\"tool_calls\":[{\"name\":\"unknown_tool\",\"input\":{\"x\":1}}]}",
"tool_names": ["read_file"]
}