<mxfile host="next-ai-draw-io" version="26.0.0">
  <diagram id="02-微信与窗口切换" name="02-微信与窗口切换">
    <mxGraphModel dx="1400" dy="900" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1180" pageHeight="1180" math="0" shadow="0" background="#0d1117">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="n2" value="微信收发 · 多窗口切换流程" style="text;html=1;align=left;verticalAlign=middle;fontSize=26;fontColor=#e6edf3;fontStyle=1;whiteSpace=wrap;" vertex="1" parent="1"><mxGeometry x="40" y="14" width="900" height="38" as="geometry"/></mxCell>
        <mxCell id="n3" value="一条消息从手机进来到回复出去，以及它被路由到哪个窗口" style="text;html=1;align=left;verticalAlign=middle;fontSize=13;fontColor=#8b949e;fontStyle=0;whiteSpace=wrap;" vertex="1" parent="1"><mxGeometry x="40" y="52" width="1000" height="24" as="geometry"/></mxCell>
        <mxCell id="n4" value="📱 手机微信发出消息" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#1f6feb;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="96" width="260" height="56" as="geometry"/></mxCell>
        <mxCell id="n5" value="微信网关接收<br>解析 openid / 群 / 话题" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#0b3d91;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="184" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n6" value="身份与会话识别<br>私聊 / 群 / topic → profile" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#0b3d91;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="278" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n7" value="路由到窗口<br>关键词 + 上下文匹配" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#8957e5;strokeColor=#a371f7;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="372" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n8" value="装配上下文<br>窗口提示 + 记忆 + 技能索引" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#9e6a03;strokeColor=#e3b341;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="466" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n9" value="模型推理 ⇄ 工具调用<br>ReAct 循环" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#9e6a03;strokeColor=#e3b341;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="560" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n10" value="上下文压缩<br>每 3 轮 micro_compact" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#9e6a03;strokeColor=#e3b341;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="654" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n11" value="回复渲染<br>Markdown / 表格 / emoji" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#0b3d91;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="748" width="260" height="62" as="geometry"/></mxCell>
        <mxCell id="n12" value="回复超过 1000 字符？" style="rhombus;whiteSpace=wrap;html=1;fillColor=#3d1f1f;strokeColor=#f85149;fontColor=#ffd7d5;fontSize=12;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="345" y="844" width="250" height="92" as="geometry"/></mxCell>
        <mxCell id="n13" value="存为静态页 + 发链接<br>trackgen.top/reports" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#3d1f5c;strokeColor=#a371f7;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="120" y="972" width="260" height="68" as="geometry"/></mxCell>
        <mxCell id="n14" value="直接发文本<br>&lt; 1000 字符" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#238636;strokeColor=#3fb950;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="560" y="972" width="260" height="68" as="geometry"/></mxCell>
        <mxCell id="n15" value="微信推送 → 用户手机" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#1f6feb;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=13;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="340" y="1078" width="260" height="60" as="geometry"/></mxCell>
        <mxCell id="n16" value="窗口路由规则" style="text;html=1;align=left;verticalAlign=middle;fontSize=17;fontColor=#e6edf3;fontStyle=1;whiteSpace=wrap;" vertex="1" parent="1"><mxGeometry x="700" y="92" width="400" height="30" as="geometry"/></mxCell>
        <mxCell id="n17" value="编程 · programming" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#1f6feb;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=12;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="136" width="210" height="58" as="geometry"/></mxCell>
        <mxCell id="n18" value="代码 / 脚本 / 算法 / 调试" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#161b22;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="920" y="136" width="200" height="58" as="geometry"/></mxCell>
        <mxCell id="n19" value="股票 · stock" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#238636;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=12;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="208" width="210" height="58" as="geometry"/></mxCell>
        <mxCell id="n20" value="个股分析 / 打板 / 复盘" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#161b22;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="920" y="208" width="200" height="58" as="geometry"/></mxCell>
        <mxCell id="n21" value="工程 · engineering" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#9e6a03;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=12;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="280" width="210" height="58" as="geometry"/></mxCell>
        <mxCell id="n22" value="CAD / 图纸 / 结构校核" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#161b22;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="920" y="280" width="200" height="58" as="geometry"/></mxCell>
        <mxCell id="n23" value="专利 · patent" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#8957e5;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=12;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="352" width="210" height="58" as="geometry"/></mxCell>
        <mxCell id="n24" value="交底书 / 权利要求 / 检索" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#161b22;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="920" y="352" width="200" height="58" as="geometry"/></mxCell>
        <mxCell id="n25" value="默认 · default" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#161b22;strokeColor=#58a6ff;fontColor=#ffffff;fontSize=12;fontStyle=1;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="424" width="210" height="58" as="geometry"/></mxCell>
        <mxCell id="n26" value="其余全部话题" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#161b22;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="920" y="424" width="200" height="58" as="geometry"/></mxCell>
        <mxCell id="n27" value="关键约束" style="text;html=1;align=left;verticalAlign=middle;fontSize=17;fontColor=#e6edf3;fontStyle=1;whiteSpace=wrap;" vertex="1" parent="1"><mxGeometry x="700" y="536" width="420" height="30" as="geometry"/></mxCell>
        <mxCell id="n28" value="① 窗口隔离：不同窗口互不串上下文" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#11161d;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="576" width="420" height="46" as="geometry"/></mxCell>
        <mxCell id="n29" value="② 上下文超预算即压缩，任务台账不丢" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#11161d;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="630" width="420" height="46" as="geometry"/></mxCell>
        <mxCell id="n30" value="③ 长内容一律转链接，避免微信截断" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#11161d;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="684" width="420" height="46" as="geometry"/></mxCell>
        <mxCell id="n31" value="④ 推送必须带 openid，否则静默丢失" style="rounded=1;arcSize=14;whiteSpace=wrap;html=1;fillColor=#11161d;strokeColor=#30363d;fontColor=#c9d1d9;fontSize=11;fontStyle=0;dashed=0;strokeWidth=1.5;" vertex="1" parent="1"><mxGeometry x="700" y="738" width="420" height="46" as="geometry"/></mxCell>
        <mxCell id="e1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n4" target="n5"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n5" target="n6"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n6" target="n7"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n7" target="n8"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n8" target="n9"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n9" target="n10"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n10" target="n11"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#58a6ff;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n11" target="n12"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e9" value="是" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#a371f7;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n12" target="n13"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e10" value="否" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#3fb950;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n12" target="n14"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#a371f7;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n13" target="n15"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#3fb950;strokeWidth=1.6;endArrow=block;endFill=1;dashed=0;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n14" target="n15"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;strokeColor=#8b949e;strokeWidth=1.6;endArrow=block;endFill=1;dashed=1;fontSize=11;fontColor=#c9d1d9;labelBackgroundColor=#0d1117;" edge="1" parent="1" source="n10" target="n9"><mxGeometry relative="1" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
