enable decorator

This commit is contained in:
锦恢 2025-04-27 16:05:00 +08:00
parent a55759d92f
commit 8ef6ddd1ed
2 changed files with 56 additions and 2 deletions

53
service/README.md Normal file
View File

@ -0,0 +1,53 @@
## Arch
```mermaid
graph LR
renderer <--ws://localhost:8080--> router
subgraph service
router <--setting/save--> app_service
router <--resources/read--> mcp_service
router <--llm/chat/completions--> llm_service
end
```
## Detail
Simplify via decorator
### mcp to renderer
```mermaid
graph LR
subgraph mcp_service_body
mcp_service --type image --> handle_image
mcp_service --type text --> handle_text
mcp_service --type video --> handle_video
handle_image --> post_process
handle_text --> post_process
handle_video --> post_process
end
post_process --tool response--> renderer
post_process --tool response--> storage
```
### service to llm
```mermaid
graph LR
renderer <--ws://localhost:8080--> llm_service
subgraph llm_service_body
llm_service --type image --> handle_image
llm_service --type text --> handle_text
llm_service --type video --> handle_video
handle_image --> post_process
handle_text --> post_process
handle_video --> post_process
end
post_process --> llm
```

View File

@ -7,8 +7,9 @@
"skipLibCheck": true, "skipLibCheck": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"outDir": "./dist", "outDir": "./dist",
"declaration": true, // "declaration": true,
"declarationMap": true // "declarationMap": true,
"experimentalDecorators": true
}, },
"paths": { "paths": {
"@/*": [ "@/*": [