docs: 补充回忆布局、回忆 AI 与 Android 页面三组图表

This commit is contained in:
cat-shark
2026-11-20 09:36:54 +08:00
parent 281585698b
commit bd6717dc8d
33 changed files with 2296 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
%%{init: {"flowchart": {"wrappingWidth": 680}}}%%
flowchart TB
%% 依据:lpt-fe RecallWorkspace.vue#ask/readRequest、useAiTask.ts#run;lpt-be AiTaskController#submit、
%% RecallAiService#submit/prepare/succeed/fail、AiTaskRunner、RecallHintAiTaskHandler#execute、
%% RecallAiClient#submit/await、RecallAiResultValidator#validate;lpt-ai routes/ai.ts、task-queue.ts#runTask。
%% 只画主干;组参、提示词、校验与失败回传分别见后续图。
classDef src fill:#ffe1e1,stroke:#c0392b,stroke-width:3.5px,color:#7b1414
classDef api fill:#e8f0fe,stroke:#1a56b0,stroke-width:1.2px,color:#111
classDef take fill:#e7f6ea,stroke:#2e8b57,stroke-width:1.2px,color:#14532d
classDef use fill:#f3f0fb,stroke:#6b4fa0,stroke-width:1.2px,color:#3b2a63
classDef origin fill:#fff3cd,stroke:#b8860b,stroke-dasharray:4 3,color:#664d03
classDef note fill:#f7f7f7,stroke:#999,stroke-dasharray:4 3,color:#333
classDef warn fill:#ffe1e1,stroke:#c0392b,stroke-width:2.2px,color:#7b1414
F["「入口」点「提示」或「主动查漏」<br/>POST /ai/tasks"]:::api
B["「用」RecallAiService#submit<br/>读回忆、组参、落 ai_tasks"]:::use
Q["「用」AiTaskRunner → 类型 handler<br/>提交 lpt-ai /ai/tasks"]:::use
A["「用」lpt-ai runTask<br/>prompt → LLM → 逐阶段校验"]:::use
R["「用」lpt-be await 轮询<br/>validator 复核后落 result 或 error"]:::use
G["「取」前端轮询读取<br/>展示结果或失败文案"]:::take
F --> B --> Q --> A --> R --> G
S["「源」review_recalls.document_json<br/>回忆文档;参考资料在创建时冻结"]:::origin
S -.-> B
T["「源」ai_tasks<br/>状态、result_payload、errorCode / errorMessage"]:::origin
R -.-> T
N1["「说明」提交幂等:同一 requestId 复用已有 taskNum"]:::note
B -.-> N1
N2["「说明」LEAF / TREE 提示会并入导图,并写 provenance 标记"]:::note
G -.-> N2
N3["「说明」HINT 的 parentId 作用域与失败子原因已修,见 retry / defect 图"]:::note
A -.-> N3