[{"data":1,"prerenderedAt":3907},["ShallowReactive",2],{"article-/topics/ai/ai-agent-evidence-conflict-resolution-governance":3,"related-ai":643,"content-query-RPEuZO2if1":3412},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":12,"image":17,"imageQuery":18,"pexelsPhotoId":19,"pexelsUrl":20,"featured":6,"readingTime":21,"body":22,"_type":637,"_id":638,"_source":639,"_file":640,"_stem":641,"_extension":642},"/topics/ai/ai-agent-evidence-conflict-resolution-governance","ai",false,"","AI agent Evidence Conflict Resolution：多来源文档互相打架时，系统怎样决定该信谁、该停谁","知识层最危险的时刻不是找不到证据，而是找到了互相冲突的证据。本文讲清 AI agent evidence conflict resolution 的分级规则、决策顺序、升级路径和审计记录，让系统不再把冲突交给相似度凑运气。","2026-06-10","HTMLPAGE 团队",[13,14,15,16],"AI agent","Evidence Conflict","Knowledge Governance","Decision Policy","/images/articles/ai-agent-evidence-conflict-resolution-governance-featured.jpg","team reviewing conflicting documents meeting table",8171198,"https://www.pexels.com/photo/people-working-in-an-office-8171198/",16,{"type":23,"children":24,"toc":625},"root",[25,33,38,43,80,87,192,197,203,208,238,243,249,254,341,346,352,357,362,381,386,392,397,402,407,413,418,499,504,510,515,520,526,589,594],{"type":26,"tag":27,"props":28,"children":29},"element","p",{},[30],{"type":31,"value":32},"text","知识层真正让团队紧张的，不一定是搜不到东西，而是搜到了太多看起来都像东西的东西。法务规则说 A，培训材料说 B，区域例外说明又说 C，模型甚至还能把三者组织成一段非常通顺的回答。问题从来不是语言组织能力，而是系统根本还没有回答：当多来源 evidence 互相冲突时，谁有权赢、在什么范围内赢、什么时候必须停下，而不是继续用最像答案的那条片段把流程往前推。",{"type":26,"tag":27,"props":34,"children":35},{},[36],{"type":31,"value":37},"很多团队在这里会下意识相信 reranker 或模型“综合判断”的能力。可只要冲突进入的是审批、价格、权限、流程边界这类高风险事实，靠语义相似度或文本流畅度去仲裁，本质上就是把治理外包给概率模型。模型当然可以帮助归纳冲突，但它不该单独决定冲突解决。真正成熟的 Knowledge Plane，必须把 conflict resolution 做成一套显式协议。",{"type":26,"tag":27,"props":39,"children":40},{},[41],{"type":31,"value":42},"这套协议至少要回答三件事：冲突属于哪一类，默认按什么顺序裁决，以及在什么条件下必须升级人工。没有这三条，系统表面上像在“综合多来源知识”，实际上却是在把证据冲突包装成一次更有自信的输出。",{"type":26,"tag":27,"props":44,"children":45},{},[46,48,55,57,63,64,70,72,78],{"type":31,"value":47},"建议配合 ",{"type":26,"tag":49,"props":50,"children":52},"a",{"href":51},"/topics/ai/ai-agent-canonical-fact-registry-term-normalization",[53],{"type":31,"value":54},"AI agent Canonical Fact Registry",{"type":31,"value":56},"、",{"type":26,"tag":49,"props":58,"children":60},{"href":59},"/topics/ai/ai-agent-knowledge-source-onboarding-contract",[61],{"type":31,"value":62},"AI agent Knowledge Source Onboarding Contract",{"type":31,"value":56},{"type":26,"tag":49,"props":65,"children":67},{"href":66},"/topics/ai/ai-agent-evidence-provenance-trust-scoring",[68],{"type":31,"value":69},"AI agent Evidence Provenance 可信度分层",{"type":31,"value":71}," 和 ",{"type":26,"tag":49,"props":73,"children":75},{"href":74},"/topics/ai/ai-agent-human-review-console-design",[76],{"type":31,"value":77},"AI agent Human Review Console",{"type":31,"value":79}," 一起看。",{"type":26,"tag":81,"props":82,"children":84},"h2",{"id":83},"先给结论evidence-conflict-不是一种错误信息而是一类必须被系统显式建模的运行状态",[85],{"type":31,"value":86},"先给结论：Evidence conflict 不是一种错误信息，而是一类必须被系统显式建模的运行状态",{"type":26,"tag":88,"props":89,"children":90},"table",{},[91,115],{"type":26,"tag":92,"props":93,"children":94},"thead",{},[95],{"type":26,"tag":96,"props":97,"children":98},"tr",{},[99,105,110],{"type":26,"tag":100,"props":101,"children":102},"th",{},[103],{"type":31,"value":104},"冲突类型",{"type":26,"tag":100,"props":106,"children":107},{},[108],{"type":31,"value":109},"例子",{"type":26,"tag":100,"props":111,"children":112},{},[113],{"type":31,"value":114},"默认动作",{"type":26,"tag":116,"props":117,"children":118},"tbody",{},[119,138,156,174],{"type":26,"tag":96,"props":120,"children":121},{},[122,128,133],{"type":26,"tag":123,"props":124,"children":125},"td",{},[126],{"type":31,"value":127},"权威冲突",{"type":26,"tag":123,"props":129,"children":130},{},[131],{"type":31,"value":132},"canonical 规则与培训材料结论相反",{"type":26,"tag":123,"props":134,"children":135},{},[136],{"type":31,"value":137},"优先权威来源，低权重来源降为背景说明",{"type":26,"tag":96,"props":139,"children":140},{},[141,146,151],{"type":26,"tag":123,"props":142,"children":143},{},[144],{"type":31,"value":145},"范围冲突",{"type":26,"tag":123,"props":147,"children":148},{},[149],{"type":31,"value":150},"全局制度与区域例外同时存在",{"type":26,"tag":123,"props":152,"children":153},{},[154],{"type":31,"value":155},"先判断当前租户 / 地区 / 流程是否命中局部范围",{"type":26,"tag":96,"props":157,"children":158},{},[159,164,169],{"type":26,"tag":123,"props":160,"children":161},{},[162],{"type":31,"value":163},"新旧冲突",{"type":26,"tag":123,"props":165,"children":166},{},[167],{"type":31,"value":168},"新版本政策与历史 FAQ 不一致",{"type":26,"tag":123,"props":170,"children":171},{},[172],{"type":31,"value":173},"按 freshness 和生效时间决定是否允许继续回答",{"type":26,"tag":96,"props":175,"children":176},{},[177,182,187],{"type":26,"tag":123,"props":178,"children":179},{},[180],{"type":31,"value":181},"数值冲突",{"type":26,"tag":123,"props":183,"children":184},{},[185],{"type":31,"value":186},"价格、阈值、日期等关键信息不一致",{"type":26,"tag":123,"props":188,"children":189},{},[190],{"type":31,"value":191},"高风险数字冲突默认阻断，进入人工或 live tool 核验",{"type":26,"tag":27,"props":193,"children":194},{},[195],{"type":31,"value":196},"这张表最重要的意义，不是给团队一个“万能裁决器”，而是把冲突从文本层拉回运行时层。系统先知道自己处于冲突状态，后面才有资格决定继续、阻断还是升级。否则所谓“解决冲突”通常只是让模型替你隐藏冲突。",{"type":26,"tag":81,"props":198,"children":200},{"id":199},"决策顺序最值钱先看-authority-和-scope再看-freshness最后才看语言相似度",[201],{"type":31,"value":202},"决策顺序最值钱：先看 authority 和 scope，再看 freshness，最后才看语言相似度",{"type":26,"tag":27,"props":204,"children":205},{},[206],{"type":31,"value":207},"一个更稳的冲突解决顺序通常是：",{"type":26,"tag":209,"props":210,"children":211},"ol",{},[212,218,223,228,233],{"type":26,"tag":213,"props":214,"children":215},"li",{},[216],{"type":31,"value":217},"authority：来源的 truth level 和 owner 级别谁更高。",{"type":26,"tag":213,"props":219,"children":220},{},[221],{"type":31,"value":222},"scope：当前租户、地区、流程是否命中局部例外。",{"type":26,"tag":213,"props":224,"children":225},{},[226],{"type":31,"value":227},"freshness：谁的生效时间、同步水位和索引时效更可靠。",{"type":26,"tag":213,"props":229,"children":230},{},[231],{"type":31,"value":232},"structural consistency：和 canonical fact registry、当前 tool state 是否一致。",{"type":26,"tag":213,"props":234,"children":235},{},[236],{"type":31,"value":237},"semantic fit：在前面都不分胜负时，才允许比较文本相似度和上下文相关度。",{"type":26,"tag":27,"props":239,"children":240},{},[241],{"type":31,"value":242},"很多系统恰恰是把这个顺序倒过来了。它们先按语义相关度选出“最像答案”的证据，再在结果层附一点解释。这在低风险说明类问题上或许还能容忍，一旦进入高风险事实，顺序倒置就会让系统先天偏向“说得顺”的证据，而不是“应该被信”的证据。",{"type":26,"tag":81,"props":244,"children":246},{"id":245},"冲突解决不能只产出最终结论还要产出冲突记录和被拒绝理由",[247],{"type":31,"value":248},"冲突解决不能只产出最终结论，还要产出冲突记录和被拒绝理由",{"type":26,"tag":27,"props":250,"children":251},{},[252],{"type":31,"value":253},"知识冲突之所以难排查，很大一部分原因是系统只留下最终答案，没有留下“它为什么没选另一个来源”。一个可运营的 conflict resolver，至少应该保留：",{"type":26,"tag":88,"props":255,"children":256},{},[257,273],{"type":26,"tag":92,"props":258,"children":259},{},[260],{"type":26,"tag":96,"props":261,"children":262},{},[263,268],{"type":26,"tag":100,"props":264,"children":265},{},[266],{"type":31,"value":267},"字段",{"type":26,"tag":100,"props":269,"children":270},{},[271],{"type":31,"value":272},"用途",{"type":26,"tag":116,"props":274,"children":275},{},[276,289,302,315,328],{"type":26,"tag":96,"props":277,"children":278},{},[279,284],{"type":26,"tag":123,"props":280,"children":281},{},[282],{"type":31,"value":283},"conflictClass",{"type":26,"tag":123,"props":285,"children":286},{},[287],{"type":31,"value":288},"这是 authority、scope、freshness 还是 numeric 冲突",{"type":26,"tag":96,"props":290,"children":291},{},[292,297],{"type":26,"tag":123,"props":293,"children":294},{},[295],{"type":31,"value":296},"candidateEvidence",{"type":26,"tag":123,"props":298,"children":299},{},[300],{"type":31,"value":301},"本次参与裁决的证据集合",{"type":26,"tag":96,"props":303,"children":304},{},[305,310],{"type":26,"tag":123,"props":306,"children":307},{},[308],{"type":31,"value":309},"winningReason",{"type":26,"tag":123,"props":311,"children":312},{},[313],{"type":31,"value":314},"为什么当前这条 evidence 被保留",{"type":26,"tag":96,"props":316,"children":317},{},[318,323],{"type":26,"tag":123,"props":319,"children":320},{},[321],{"type":31,"value":322},"rejectedReasons",{"type":26,"tag":123,"props":324,"children":325},{},[326],{"type":31,"value":327},"其他证据为什么被降权、屏蔽或转背景说明",{"type":26,"tag":96,"props":329,"children":330},{},[331,336],{"type":26,"tag":123,"props":332,"children":333},{},[334],{"type":31,"value":335},"escalationFlag",{"type":26,"tag":123,"props":337,"children":338},{},[339],{"type":31,"value":340},"是否达到必须人工升级的阈值",{"type":26,"tag":27,"props":342,"children":343},{},[344],{"type":31,"value":345},"这份记录不是附属日志，它是后续复盘、客户解释和策略迭代的基础。没有 rejected reason，团队每次都只能事后猜“是不是 reranker 又偏了”。而真正成熟的系统，应该能直接告诉你：这次不是 reranker 偏，而是 canonical source 胜了 scope exception，或者 freshness proof 不足所以被强制阻断。",{"type":26,"tag":81,"props":347,"children":349},{"id":348},"numeric-和-policy-conflict-绝不能被当成普通文本冲突",[350],{"type":31,"value":351},"Numeric 和 policy conflict 绝不能被当成普通文本冲突",{"type":26,"tag":27,"props":353,"children":354},{},[355],{"type":31,"value":356},"知识层有一类非常危险的误判，就是把数值冲突和政策冲突当成普通段落差异。比如两份文档里的金额阈值不同、履约时间不同、审批条件不同。模型很擅长把这种差异组织成貌似合理的综合表达，但对业务来说，综合表达往往正是最危险的。金额不是“折中一下”，审批规则也不该“综合理解”。",{"type":26,"tag":27,"props":358,"children":359},{},[360],{"type":31,"value":361},"一个更稳的默认规则是：",{"type":26,"tag":363,"props":364,"children":365},"ul",{},[366,371,376],{"type":26,"tag":213,"props":367,"children":368},{},[369],{"type":31,"value":370},"关键数字冲突：必须先回到 canonical source 或 live tool 核验。",{"type":26,"tag":213,"props":372,"children":373},{},[374],{"type":31,"value":375},"policy 冲突：若 authority 和 scope 仍无法单边裁决，直接阻断自动继续。",{"type":26,"tag":213,"props":377,"children":378},{},[379],{"type":31,"value":380},"解释型冲突：可允许系统先展示冲突存在，再提示用户缩小范围或请求人工。",{"type":26,"tag":27,"props":382,"children":383},{},[384],{"type":31,"value":385},"只有这样，Knowledge Plane 才不会在最需要明确边界的地方，反而因为语言能力太强而把边界抹糊。",{"type":26,"tag":81,"props":387,"children":389},{"id":388},"失败案例区域例外说明和全局制度同时命中agent-因为全局制度更完整直接忽略了例外",[390],{"type":31,"value":391},"失败案例：区域例外说明和全局制度同时命中，agent 因为“全局制度更完整”直接忽略了例外",{"type":26,"tag":27,"props":393,"children":394},{},[395],{"type":31,"value":396},"某团队的采购 agent 在回答审批门槛时，同时检索到了总部制度和一个区域例外备忘录。因为总部制度写得更系统、上下文也更完整，reranker 把它排在前面，模型随之给出了全局规则下的答案。结果这个区域客户被错误地引导走了不适用的审批路径。",{"type":26,"tag":27,"props":398,"children":399},{},[400],{"type":31,"value":401},"真正的问题不在于模型没读懂例外，而在于系统根本没把 scope conflict 显式建模。它只把两份证据当成普通候选，任由相关度决定顺序。后来团队修正冲突 resolver 时，先把区域、租户和业务域 scope 提前纳入判断：只要当前请求明确命中局部例外，局部来源就先拥有裁决优先级；若当前 scope 信息不完整，则系统不继续给最终结论，而先追问或转人工。",{"type":26,"tag":27,"props":403,"children":404},{},[405],{"type":31,"value":406},"这个变化的价值很大。它让 system 停止把“更完整的全局制度”误当成“更适用的答案”，也让冲突解决第一次变得可解释。",{"type":26,"tag":81,"props":408,"children":410},{"id":409},"真正成熟的-conflict-governance不是把所有冲突都推给人工而是把只有人能拍板的那部分精确筛出来",[411],{"type":31,"value":412},"真正成熟的 conflict governance，不是把所有冲突都推给人工，而是把只有人能拍板的那部分精确筛出来",{"type":26,"tag":27,"props":414,"children":415},{},[416],{"type":31,"value":417},"很多团队意识到冲突危险后，会一口气把所有 evidence conflict 都扔给人工。短期看风险下降，长期看吞吐和组织成本会迅速崩。更成熟的做法，是用 conflict taxonomy 把冲突分成：",{"type":26,"tag":88,"props":419,"children":420},{},[421,442],{"type":26,"tag":92,"props":422,"children":423},{},[424],{"type":26,"tag":96,"props":425,"children":426},{},[427,432,437],{"type":26,"tag":100,"props":428,"children":429},{},[430],{"type":31,"value":431},"等级",{"type":26,"tag":100,"props":433,"children":434},{},[435],{"type":31,"value":436},"场景",{"type":26,"tag":100,"props":438,"children":439},{},[440],{"type":31,"value":441},"默认去向",{"type":26,"tag":116,"props":443,"children":444},{},[445,463,481],{"type":26,"tag":96,"props":446,"children":447},{},[448,453,458],{"type":26,"tag":123,"props":449,"children":450},{},[451],{"type":31,"value":452},"L1",{"type":26,"tag":123,"props":454,"children":455},{},[456],{"type":31,"value":457},"authority 清晰、scope 清晰、只是说明差异",{"type":26,"tag":123,"props":459,"children":460},{},[461],{"type":31,"value":462},"系统自动裁决并保留记录",{"type":26,"tag":96,"props":464,"children":465},{},[466,471,476],{"type":26,"tag":123,"props":467,"children":468},{},[469],{"type":31,"value":470},"L2",{"type":26,"tag":123,"props":472,"children":473},{},[474],{"type":31,"value":475},"authority 清晰但 freshness 或 structure 有疑点",{"type":26,"tag":123,"props":477,"children":478},{},[479],{"type":31,"value":480},"系统保守回答，附带风险说明",{"type":26,"tag":96,"props":482,"children":483},{},[484,489,494],{"type":26,"tag":123,"props":485,"children":486},{},[487],{"type":31,"value":488},"L3",{"type":26,"tag":123,"props":490,"children":491},{},[492],{"type":31,"value":493},"numeric、policy、responsibility 等关键冲突",{"type":26,"tag":123,"props":495,"children":496},{},[497],{"type":31,"value":498},"强制升级人工或 live tool 对账",{"type":26,"tag":27,"props":500,"children":501},{},[502],{"type":31,"value":503},"这样人工接到的不是所有“看起来不太一样”的文本，而是那些真正会改变高风险事实、且系统无法单边证明自己正确的冲突。这才是冲突治理应该服务的方向：减少盲目自动化，同时也减少无意义的人海兜底。",{"type":26,"tag":81,"props":505,"children":507},{"id":506},"如果你现在只能先补一层先让系统在-numeric-和-policy-conflict-时学会显式停下",[508],{"type":31,"value":509},"如果你现在只能先补一层，先让系统在 numeric 和 policy conflict 时学会显式停下",{"type":26,"tag":27,"props":511,"children":512},{},[513],{"type":31,"value":514},"很多平台会先从更复杂的信任打分、图谱融合或模型仲裁开始。更值钱的第一步，反而是非常朴素的规则：只要命中关键数字和政策冲突，就默认不继续自动给最终结论。因为这类冲突最贵，也最不适合靠语言模型做“看起来合理”的综合。",{"type":26,"tag":27,"props":516,"children":517},{},[518],{"type":31,"value":519},"AI agent 成熟的一个标志，不是它能把冲突讲得更顺，而是它已经知道哪些冲突不能靠自己讲顺。把这一层守住，Knowledge Plane 才算真正拥有了治理底线。",{"type":26,"tag":81,"props":521,"children":523},{"id":522},"checklist",[524],{"type":31,"value":525},"Checklist",{"type":26,"tag":363,"props":527,"children":530},{"className":528},[529],"contains-task-list",[531,544,553,562,571,580],{"type":26,"tag":213,"props":532,"children":535},{"className":533},[534],"task-list-item",[536,542],{"type":26,"tag":537,"props":538,"children":541},"input",{"disabled":539,"type":540},true,"checkbox",[],{"type":31,"value":543}," evidence conflict 是否被按 authority、scope、freshness、numeric 等类型显式分类",{"type":26,"tag":213,"props":545,"children":547},{"className":546},[534],[548,551],{"type":26,"tag":537,"props":549,"children":550},{"disabled":539,"type":540},[],{"type":31,"value":552}," 冲突裁决顺序是否先看 authority 和 scope，再看 freshness 和语义相关度",{"type":26,"tag":213,"props":554,"children":556},{"className":555},[534],[557,560],{"type":26,"tag":537,"props":558,"children":559},{"disabled":539,"type":540},[],{"type":31,"value":561}," numeric 和 policy conflict 是否默认进入更保守的处理路径",{"type":26,"tag":213,"props":563,"children":565},{"className":564},[534],[566,569],{"type":26,"tag":537,"props":567,"children":568},{"disabled":539,"type":540},[],{"type":31,"value":570}," conflict resolver 是否同时记录 winningReason 和 rejectedReasons",{"type":26,"tag":213,"props":572,"children":574},{"className":573},[534],[575,578],{"type":26,"tag":537,"props":576,"children":577},{"disabled":539,"type":540},[],{"type":31,"value":579}," 是否只把 L3 高风险冲突升级人工，而不是把所有冲突都扔给人",{"type":26,"tag":213,"props":581,"children":583},{"className":582},[534],[584,587],{"type":26,"tag":537,"props":585,"children":586},{"disabled":539,"type":540},[],{"type":31,"value":588}," support 和 audit 是否能直接查看本次冲突的分类和裁决记录",{"type":26,"tag":27,"props":590,"children":591},{},[592],{"type":31,"value":593},"延伸阅读：",{"type":26,"tag":363,"props":595,"children":596},{},[597,604,611,618],{"type":26,"tag":213,"props":598,"children":599},{},[600],{"type":26,"tag":49,"props":601,"children":602},{"href":51},[603],{"type":31,"value":54},{"type":26,"tag":213,"props":605,"children":606},{},[607],{"type":26,"tag":49,"props":608,"children":609},{"href":59},[610],{"type":31,"value":62},{"type":26,"tag":213,"props":612,"children":613},{},[614],{"type":26,"tag":49,"props":615,"children":616},{"href":66},[617],{"type":31,"value":69},{"type":26,"tag":213,"props":619,"children":620},{},[621],{"type":26,"tag":49,"props":622,"children":623},{"href":74},[624],{"type":31,"value":77},{"title":7,"searchDepth":626,"depth":626,"links":627},3,[628,630,631,632,633,634,635,636],{"id":83,"depth":629,"text":86},2,{"id":199,"depth":629,"text":202},{"id":245,"depth":629,"text":248},{"id":348,"depth":629,"text":351},{"id":388,"depth":629,"text":391},{"id":409,"depth":629,"text":412},{"id":506,"depth":629,"text":509},{"id":522,"depth":629,"text":525},"markdown","content:topics:ai:ai-agent-evidence-conflict-resolution-governance.md","content","topics/ai/ai-agent-evidence-conflict-resolution-governance.md","topics/ai/ai-agent-evidence-conflict-resolution-governance","md",[644,1799,2749],{"_path":645,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":646,"description":647,"date":648,"topic":5,"author":11,"tags":649,"image":655,"imageAlt":656,"pexelsPhotoId":657,"pexelsUrl":658,"readingTime":659,"body":660,"_type":637,"_id":1796,"_source":639,"_file":1797,"_stem":1798,"_extension":642},"/topics/ai/cursor-keyboard-shortcuts-cheatsheet","Cursor 快捷键速查表（macOS/Windows）：从“会用”到“能提效”的 10 个工作流","把 Cursor 常用快捷键按任务分组（查代码、改代码、多文件、对话、审查与回滚），给出可直接照抄的工作流与最小回归清单，避免“快捷键背了也没变快”。","2026-03-02",[650,651,652,653,654],"Cursor","快捷键","AI IDE","VS Code","开发效率","/images/topics/ai/cursor-keyboard-shortcuts-cheatsheet.jpg","彩色机械键盘与鼠标的工作台面",34563105,"https://www.pexels.com/photo/colorful-mechanical-keyboard-and-mouse-setup-34563105/",12,{"type":23,"children":661,"toc":1770},[662,667,685,690,718,723,759,763,769,774,807,812,835,838,844,849,1068,1077,1080,1086,1093,1112,1120,1141,1146,1152,1167,1198,1203,1216,1222,1241,1259,1267,1272,1278,1283,1304,1312,1318,1323,1346,1351,1357,1370,1376,1394,1412,1418,1429,1447,1453,1464,1470,1475,1518,1521,1527,1535,1588,1591,1597,1603,1608,1613,1636,1654,1659,1684,1687,1693,1699,1704,1710,1715,1721,1726,1729,1735],{"type":26,"tag":27,"props":663,"children":664},{},[665],{"type":31,"value":666},"如果你在搜“Cursor 快捷键”，你大概率不是想背一张表，而是想解决这类问题：",{"type":26,"tag":363,"props":668,"children":669},{},[670,675,680],{"type":26,"tag":213,"props":671,"children":672},{},[673],{"type":31,"value":674},"为什么我用了 AI，还是很慢？（对话来回太多、改动不可控）",{"type":26,"tag":213,"props":676,"children":677},{},[678],{"type":31,"value":679},"为什么它“看起来懂了”，却改错文件/改出回归？（上下文与范围没锁住）",{"type":26,"tag":213,"props":681,"children":682},{},[683],{"type":31,"value":684},"多文件改动怎么做得安全？（验收、回滚、最小回归集）",{"type":26,"tag":27,"props":686,"children":687},{},[688],{"type":31,"value":689},"这篇文章给你两份东西：",{"type":26,"tag":209,"props":691,"children":692},{},[693,706],{"type":26,"tag":213,"props":694,"children":695},{},[696,698,704],{"type":31,"value":697},"一张",{"type":26,"tag":699,"props":700,"children":701},"strong",{},[702],{"type":31,"value":703},"按任务分组",{"type":31,"value":705},"的快捷键表（不是按功能堆在一起）",{"type":26,"tag":213,"props":707,"children":708},{},[709,711,716],{"type":31,"value":710},"一套“从需求到落地”的",{"type":26,"tag":699,"props":712,"children":713},{},[714],{"type":31,"value":715},"最小闭环工作流",{"type":31,"value":717},"（每一步都有快捷键）",{"type":26,"tag":27,"props":719,"children":720},{},[721],{"type":31,"value":722},"想看系统玩法：",{"type":26,"tag":363,"props":724,"children":725},{},[726,737,748],{"type":26,"tag":213,"props":727,"children":728},{},[729,731],{"type":31,"value":730},"入门教程看：",{"type":26,"tag":49,"props":732,"children":734},{"href":733},"/topics/ai/cursor-tutorial",[735],{"type":31,"value":736},"Cursor 使用教程（2026）",{"type":26,"tag":213,"props":738,"children":739},{},[740,742],{"type":31,"value":741},"进阶玩法看：",{"type":26,"tag":49,"props":743,"children":745},{"href":744},"/topics/ai/cursor-editor-guide",[746],{"type":31,"value":747},"Cursor 编辑器深度玩法",{"type":26,"tag":213,"props":749,"children":750},{},[751,753],{"type":31,"value":752},"规则与忽略看：",{"type":26,"tag":49,"props":754,"children":756},{"href":755},"/topics/ai/cursor-rules-cursorrules",[757],{"type":31,"value":758},"Cursor Rules 与 .cursorrules",{"type":26,"tag":760,"props":761,"children":762},"hr",{},[],{"type":26,"tag":81,"props":764,"children":766},{"id":765},"先给结论提效不是按得快而是闭环更短",[767],{"type":31,"value":768},"先给结论：提效不是“按得快”，而是“闭环更短”",{"type":26,"tag":27,"props":770,"children":771},{},[772],{"type":31,"value":773},"你可以把 Cursor 的快捷键理解为 3 条流水线：",{"type":26,"tag":363,"props":775,"children":776},{},[777,787,797],{"type":26,"tag":213,"props":778,"children":779},{},[780,785],{"type":26,"tag":699,"props":781,"children":782},{},[783],{"type":31,"value":784},"改一小段",{"type":31,"value":786},"（内联编辑）：把改动限制在一个函数/一段样式",{"type":26,"tag":213,"props":788,"children":789},{},[790,795],{"type":26,"tag":699,"props":791,"children":792},{},[793],{"type":31,"value":794},"改一组文件",{"type":31,"value":796},"（Composer）：把改动限制在一组明确文件，并要求输出 diff + 验收点",{"type":26,"tag":213,"props":798,"children":799},{},[800,805],{"type":26,"tag":699,"props":801,"children":802},{},[803],{"type":31,"value":804},"聊清楚再动手",{"type":31,"value":806},"（侧边对话）：先对齐目标、范围、验收、回滚",{"type":26,"tag":27,"props":808,"children":809},{},[810],{"type":31,"value":811},"当你觉得“它乱改/改太大”时，往往不是快捷键没记住，而是缺了两件事：",{"type":26,"tag":363,"props":813,"children":814},{},[815,825],{"type":26,"tag":213,"props":816,"children":817},{},[818,820],{"type":31,"value":819},"没有在动手前锁定",{"type":26,"tag":699,"props":821,"children":822},{},[823],{"type":31,"value":824},"范围",{"type":26,"tag":213,"props":826,"children":827},{},[828,830],{"type":31,"value":829},"没有在接受改动前准备",{"type":26,"tag":699,"props":831,"children":832},{},[833],{"type":31,"value":834},"验收/回滚",{"type":26,"tag":760,"props":836,"children":837},{},[],{"type":26,"tag":81,"props":839,"children":841},{"id":840},"快捷键速查表按任务分组",[842],{"type":31,"value":843},"快捷键速查表（按任务分组）",{"type":26,"tag":27,"props":845,"children":846},{},[847],{"type":31,"value":848},"说明：下表按“你正在做什么”组织，而不是按“功能名字”组织。不同版本快捷键可能略有差异，但核心逻辑一致。",{"type":26,"tag":88,"props":850,"children":851},{},[852,878],{"type":26,"tag":92,"props":853,"children":854},{},[855],{"type":26,"tag":96,"props":856,"children":857},{},[858,863,868,873],{"type":26,"tag":100,"props":859,"children":860},{},[861],{"type":31,"value":862},"任务",{"type":26,"tag":100,"props":864,"children":865},{},[866],{"type":31,"value":867},"macOS",{"type":26,"tag":100,"props":869,"children":870},{},[871],{"type":31,"value":872},"Windows",{"type":26,"tag":100,"props":874,"children":875},{},[876],{"type":31,"value":877},"你该在什么时候用",{"type":26,"tag":116,"props":879,"children":880},{},[881,913,944,975,1006,1037],{"type":26,"tag":96,"props":882,"children":883},{},[884,889,899,908],{"type":26,"tag":123,"props":885,"children":886},{},[887],{"type":31,"value":888},"改一小段（最安全）",{"type":26,"tag":123,"props":890,"children":891},{},[892],{"type":26,"tag":893,"props":894,"children":896},"code",{"className":895},[],[897],{"type":31,"value":898},"Cmd + K",{"type":26,"tag":123,"props":900,"children":901},{},[902],{"type":26,"tag":893,"props":903,"children":905},{"className":904},[],[906],{"type":31,"value":907},"Ctrl + K",{"type":26,"tag":123,"props":909,"children":910},{},[911],{"type":31,"value":912},"只想改一个函数/一段 CSS，不想动别的",{"type":26,"tag":96,"props":914,"children":915},{},[916,921,930,939],{"type":26,"tag":123,"props":917,"children":918},{},[919],{"type":31,"value":920},"打开 AI 对话（先对齐再动手）",{"type":26,"tag":123,"props":922,"children":923},{},[924],{"type":26,"tag":893,"props":925,"children":927},{"className":926},[],[928],{"type":31,"value":929},"Cmd + L",{"type":26,"tag":123,"props":931,"children":932},{},[933],{"type":26,"tag":893,"props":934,"children":936},{"className":935},[],[937],{"type":31,"value":938},"Ctrl + L",{"type":26,"tag":123,"props":940,"children":941},{},[942],{"type":31,"value":943},"需要澄清目标、制定步骤、给验收点",{"type":26,"tag":96,"props":945,"children":946},{},[947,952,961,970],{"type":26,"tag":123,"props":948,"children":949},{},[950],{"type":31,"value":951},"多文件编辑（有组织地改一组文件）",{"type":26,"tag":123,"props":953,"children":954},{},[955],{"type":26,"tag":893,"props":956,"children":958},{"className":957},[],[959],{"type":31,"value":960},"Cmd + I",{"type":26,"tag":123,"props":962,"children":963},{},[964],{"type":26,"tag":893,"props":965,"children":967},{"className":966},[],[968],{"type":31,"value":969},"Ctrl + I",{"type":26,"tag":123,"props":971,"children":972},{},[973],{"type":31,"value":974},"改动涉及多个文件：组件+样式+测试",{"type":26,"tag":96,"props":976,"children":977},{},[978,983,992,1001],{"type":26,"tag":123,"props":979,"children":980},{},[981],{"type":31,"value":982},"把选中代码加入对话上下文",{"type":26,"tag":123,"props":984,"children":985},{},[986],{"type":26,"tag":893,"props":987,"children":989},{"className":988},[],[990],{"type":31,"value":991},"Cmd + Shift + L",{"type":26,"tag":123,"props":993,"children":994},{},[995],{"type":26,"tag":893,"props":996,"children":998},{"className":997},[],[999],{"type":31,"value":1000},"Ctrl + Shift + L",{"type":26,"tag":123,"props":1002,"children":1003},{},[1004],{"type":31,"value":1005},"让 AI 只看你选的片段（降低噪音）",{"type":26,"tag":96,"props":1007,"children":1008},{},[1009,1014,1023,1032],{"type":26,"tag":123,"props":1010,"children":1011},{},[1012],{"type":31,"value":1013},"接受当前建议",{"type":26,"tag":123,"props":1015,"children":1016},{},[1017],{"type":26,"tag":893,"props":1018,"children":1020},{"className":1019},[],[1021],{"type":31,"value":1022},"Cmd + Y",{"type":26,"tag":123,"props":1024,"children":1025},{},[1026],{"type":26,"tag":893,"props":1027,"children":1029},{"className":1028},[],[1030],{"type":31,"value":1031},"Ctrl + Y",{"type":26,"tag":123,"props":1033,"children":1034},{},[1035],{"type":31,"value":1036},"你已经准备好验收/回滚，并确认改动范围",{"type":26,"tag":96,"props":1038,"children":1039},{},[1040,1045,1054,1063],{"type":26,"tag":123,"props":1041,"children":1042},{},[1043],{"type":31,"value":1044},"拒绝当前建议",{"type":26,"tag":123,"props":1046,"children":1047},{},[1048],{"type":26,"tag":893,"props":1049,"children":1051},{"className":1050},[],[1052],{"type":31,"value":1053},"Cmd + N",{"type":26,"tag":123,"props":1055,"children":1056},{},[1057],{"type":26,"tag":893,"props":1058,"children":1060},{"className":1059},[],[1061],{"type":31,"value":1062},"Ctrl + N",{"type":26,"tag":123,"props":1064,"children":1065},{},[1066],{"type":31,"value":1067},"改得太大、改错方向，立刻收手",{"type":26,"tag":1069,"props":1070,"children":1071},"blockquote",{},[1072],{"type":26,"tag":27,"props":1073,"children":1074},{},[1075],{"type":31,"value":1076},"小技巧：把“改一小段”当默认路径。只有当你能清晰写出“会改哪几类文件、怎么验收”时再进入多文件。",{"type":26,"tag":760,"props":1078,"children":1079},{},[],{"type":26,"tag":81,"props":1081,"children":1083},{"id":1082},"_10-个可直接照抄的提效工作流每个都能闭环",[1084],{"type":31,"value":1085},"10 个可直接照抄的提效工作流（每个都能闭环）",{"type":26,"tag":1087,"props":1088,"children":1090},"h3",{"id":1089},"工作流-1需求计划小步改新手最稳",[1091],{"type":31,"value":1092},"工作流 1：需求→计划→小步改（新手最稳）",{"type":26,"tag":209,"props":1094,"children":1095},{},[1096,1107],{"type":26,"tag":213,"props":1097,"children":1098},{},[1099,1105],{"type":26,"tag":893,"props":1100,"children":1102},{"className":1101},[],[1103],{"type":31,"value":1104},"Cmd/Ctrl + L",{"type":31,"value":1106}," 打开对话",{"type":26,"tag":213,"props":1108,"children":1109},{},[1110],{"type":31,"value":1111},"先发这段（可复制）：",{"type":26,"tag":1069,"props":1113,"children":1114},{},[1115],{"type":26,"tag":27,"props":1116,"children":1117},{},[1118],{"type":31,"value":1119},"目标：……\n范围：只修改以下文件/模块：……\n非目标：……（明确不做）\n验收：……（可测试/可手动检查）\n输出格式：先给计划，再逐步执行；每一步写出 diff 摘要。",{"type":26,"tag":209,"props":1121,"children":1122},{"start":626},[1123,1128],{"type":26,"tag":213,"props":1124,"children":1125},{},[1126],{"type":31,"value":1127},"让 AI 先给“计划（3~6 步）”，你确认后再执行",{"type":26,"tag":213,"props":1129,"children":1130},{},[1131,1133,1139],{"type":31,"value":1132},"任何一步涉及改代码：优先回到编辑区，选中片段用 ",{"type":26,"tag":893,"props":1134,"children":1136},{"className":1135},[],[1137],{"type":31,"value":1138},"Cmd/Ctrl + K",{"type":31,"value":1140}," 小步改",{"type":26,"tag":27,"props":1142,"children":1143},{},[1144],{"type":31,"value":1145},"为什么有效：你把“想法”变成了“可执行约束”，这就是 GEO（面向 AI/模型的可理解结构）。",{"type":26,"tag":1087,"props":1147,"children":1149},{"id":1148},"工作流-2只改一个函数高频低风险",[1150],{"type":31,"value":1151},"工作流 2：只改一个函数（高频、低风险）",{"type":26,"tag":363,"props":1153,"children":1154},{},[1155],{"type":26,"tag":213,"props":1156,"children":1157},{},[1158,1160,1165],{"type":31,"value":1159},"选中函数 → ",{"type":26,"tag":893,"props":1161,"children":1163},{"className":1162},[],[1164],{"type":31,"value":1138},{"type":31,"value":1166}," → 输入指令：",{"type":26,"tag":1069,"props":1168,"children":1169},{},[1170,1175],{"type":26,"tag":27,"props":1171,"children":1172},{},[1173],{"type":31,"value":1174},"把这段改成更可读：",{"type":26,"tag":363,"props":1176,"children":1177},{},[1178,1183,1188,1193],{"type":26,"tag":213,"props":1179,"children":1180},{},[1181],{"type":31,"value":1182},"用 async/await",{"type":26,"tag":213,"props":1184,"children":1185},{},[1186],{"type":31,"value":1187},"错误处理不要吞掉",{"type":26,"tag":213,"props":1189,"children":1190},{},[1191],{"type":31,"value":1192},"添加类型（若可推断）",{"type":26,"tag":213,"props":1194,"children":1195},{},[1196],{"type":31,"value":1197},"不要改函数签名",{"type":26,"tag":27,"props":1199,"children":1200},{},[1201],{"type":31,"value":1202},"验收方式（强制）：",{"type":26,"tag":363,"props":1204,"children":1205},{},[1206,1211],{"type":26,"tag":213,"props":1207,"children":1208},{},[1209],{"type":31,"value":1210},"输出前后函数行为一致（输入/输出）",{"type":26,"tag":213,"props":1212,"children":1213},{},[1214],{"type":31,"value":1215},"失败分支有可观测日志（不要悄悄 return null）",{"type":26,"tag":1087,"props":1217,"children":1219},{"id":1218},"工作流-3多文件改动先定文件清单",[1220],{"type":31,"value":1221},"工作流 3：多文件改动（先定“文件清单”）",{"type":26,"tag":209,"props":1223,"children":1224},{},[1225,1236],{"type":26,"tag":213,"props":1226,"children":1227},{},[1228,1234],{"type":26,"tag":893,"props":1229,"children":1231},{"className":1230},[],[1232],{"type":31,"value":1233},"Cmd/Ctrl + I",{"type":31,"value":1235}," 进入多文件",{"type":26,"tag":213,"props":1237,"children":1238},{},[1239],{"type":31,"value":1240},"先让 AI 输出：",{"type":26,"tag":363,"props":1242,"children":1243},{},[1244,1249,1254],{"type":26,"tag":213,"props":1245,"children":1246},{},[1247],{"type":31,"value":1248},"预计会改哪些文件（最多 5 个）",{"type":26,"tag":213,"props":1250,"children":1251},{},[1252],{"type":31,"value":1253},"每个文件改什么",{"type":26,"tag":213,"props":1255,"children":1256},{},[1257],{"type":31,"value":1258},"每一步怎么验收",{"type":26,"tag":209,"props":1260,"children":1261},{"start":626},[1262],{"type":26,"tag":213,"props":1263,"children":1264},{},[1265],{"type":31,"value":1266},"你确认文件清单后再开始生成改动",{"type":26,"tag":27,"props":1268,"children":1269},{},[1270],{"type":31,"value":1271},"关键点：多文件最容易翻车的是“它把你没想到的文件也改了”。所以文件清单是第一道闸门。",{"type":26,"tag":1087,"props":1273,"children":1275},{"id":1274},"工作流-4把上下文噪音砍掉防跑偏",[1276],{"type":31,"value":1277},"工作流 4：把“上下文噪音”砍掉（防跑偏）",{"type":26,"tag":27,"props":1279,"children":1280},{},[1281],{"type":31,"value":1282},"当你怀疑它在胡说/乱改时：",{"type":26,"tag":363,"props":1284,"children":1285},{},[1286,1299],{"type":26,"tag":213,"props":1287,"children":1288},{},[1289,1291,1297],{"type":31,"value":1290},"只选择关键代码片段 → ",{"type":26,"tag":893,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":31,"value":1296},"Cmd/Ctrl + Shift + L",{"type":31,"value":1298}," 加入对话",{"type":26,"tag":213,"props":1300,"children":1301},{},[1302],{"type":31,"value":1303},"然后在对话里要求：",{"type":26,"tag":1069,"props":1305,"children":1306},{},[1307],{"type":26,"tag":27,"props":1308,"children":1309},{},[1310],{"type":31,"value":1311},"只基于我提供的代码片段回答，不要假设其它文件存在。",{"type":26,"tag":1087,"props":1313,"children":1315},{"id":1314},"工作流-5生成变更说明让-code-review-变快",[1316],{"type":31,"value":1317},"工作流 5：生成变更说明（让 code review 变快）",{"type":26,"tag":27,"props":1319,"children":1320},{},[1321],{"type":31,"value":1322},"改完后在对话里让它输出：",{"type":26,"tag":363,"props":1324,"children":1325},{},[1326,1331,1336,1341],{"type":26,"tag":213,"props":1327,"children":1328},{},[1329],{"type":31,"value":1330},"改动摘要（3~7 条）",{"type":26,"tag":213,"props":1332,"children":1333},{},[1334],{"type":31,"value":1335},"风险点（依赖/边界条件）",{"type":26,"tag":213,"props":1337,"children":1338},{},[1339],{"type":31,"value":1340},"回滚方式",{"type":26,"tag":213,"props":1342,"children":1343},{},[1344],{"type":31,"value":1345},"验收步骤",{"type":26,"tag":27,"props":1347,"children":1348},{},[1349],{"type":31,"value":1350},"这套结构能直接贴进 PR 描述。",{"type":26,"tag":1087,"props":1352,"children":1354},{"id":1353},"工作流-6写最小回归集不写回归-等事故",[1355],{"type":31,"value":1356},"工作流 6：写“最小回归集”（不写回归 = 等事故）",{"type":26,"tag":27,"props":1358,"children":1359},{},[1360,1362,1368],{"type":31,"value":1361},"每次改动都至少做 10 条最小回归（见下文清单）。你可以把它写在 ",{"type":26,"tag":893,"props":1363,"children":1365},{"className":1364},[],[1366],{"type":31,"value":1367},"README",{"type":31,"value":1369}," 或团队 wiki。",{"type":26,"tag":1087,"props":1371,"children":1373},{"id":1372},"工作流-7把接受建议变成最后一步",[1374],{"type":31,"value":1375},"工作流 7：把“接受建议”变成最后一步",{"type":26,"tag":27,"props":1377,"children":1378},{},[1379,1385,1387,1392],{"type":26,"tag":893,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":31,"value":1384},"Cmd/Ctrl + Y",{"type":31,"value":1386}," 应该是",{"type":26,"tag":699,"props":1388,"children":1389},{},[1390],{"type":31,"value":1391},"最后一步",{"type":31,"value":1393},"：",{"type":26,"tag":363,"props":1395,"children":1396},{},[1397,1402,1407],{"type":26,"tag":213,"props":1398,"children":1399},{},[1400],{"type":31,"value":1401},"你已经看过 diff",{"type":26,"tag":213,"props":1403,"children":1404},{},[1405],{"type":31,"value":1406},"你能说清楚“怎么验收”",{"type":26,"tag":213,"props":1408,"children":1409},{},[1410],{"type":31,"value":1411},"你知道“怎么回滚”",{"type":26,"tag":1087,"props":1413,"children":1415},{"id":1414},"工作流-8拒绝建议不是失败是风控动作",[1416],{"type":31,"value":1417},"工作流 8：拒绝建议不是失败，是风控动作",{"type":26,"tag":27,"props":1419,"children":1420},{},[1421,1427],{"type":26,"tag":893,"props":1422,"children":1424},{"className":1423},[],[1425],{"type":31,"value":1426},"Cmd/Ctrl + N",{"type":31,"value":1428}," 的使用时机：",{"type":26,"tag":363,"props":1430,"children":1431},{},[1432,1437,1442],{"type":26,"tag":213,"props":1433,"children":1434},{},[1435],{"type":31,"value":1436},"它开始改你没提过的东西（范围漂移）",{"type":26,"tag":213,"props":1438,"children":1439},{},[1440],{"type":31,"value":1441},"它改了 10 个文件但你只想改 1 个",{"type":26,"tag":213,"props":1443,"children":1444},{},[1445],{"type":31,"value":1446},"它为了“更优雅”引入新依赖/新抽象",{"type":26,"tag":1087,"props":1448,"children":1450},{"id":1449},"工作流-9重复任务做成模板提示词不是一次性",[1451],{"type":31,"value":1452},"工作流 9：重复任务做成模板（提示词不是一次性）",{"type":26,"tag":27,"props":1454,"children":1455},{},[1456,1458,1462],{"type":31,"value":1457},"把高频任务（比如“写组件+样式+验收”）固化成模板，放进 Rules（见：",{"type":26,"tag":49,"props":1459,"children":1460},{"href":755},[1461],{"type":31,"value":758},{"type":31,"value":1463},"）。",{"type":26,"tag":1087,"props":1465,"children":1467},{"id":1466},"工作流-10把快捷键表做成你自己的任务表",[1468],{"type":31,"value":1469},"工作流 10：把“快捷键表”做成你自己的任务表",{"type":26,"tag":27,"props":1471,"children":1472},{},[1473],{"type":31,"value":1474},"你不需要记住所有快捷键，只需要记住：",{"type":26,"tag":363,"props":1476,"children":1477},{},[1478,1488,1498,1508],{"type":26,"tag":213,"props":1479,"children":1480},{},[1481,1483],{"type":31,"value":1482},"小步改：",{"type":26,"tag":893,"props":1484,"children":1486},{"className":1485},[],[1487],{"type":31,"value":1138},{"type":26,"tag":213,"props":1489,"children":1490},{},[1491,1493],{"type":31,"value":1492},"先对齐：",{"type":26,"tag":893,"props":1494,"children":1496},{"className":1495},[],[1497],{"type":31,"value":1104},{"type":26,"tag":213,"props":1499,"children":1500},{},[1501,1503],{"type":31,"value":1502},"多文件：",{"type":26,"tag":893,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":31,"value":1233},{"type":26,"tag":213,"props":1509,"children":1510},{},[1511,1513],{"type":31,"value":1512},"上下文聚焦：",{"type":26,"tag":893,"props":1514,"children":1516},{"className":1515},[],[1517],{"type":31,"value":1296},{"type":26,"tag":760,"props":1519,"children":1520},{},[],{"type":26,"tag":81,"props":1522,"children":1524},{"id":1523},"必交付物-1最小回归任务清单10-条通用",[1525],{"type":31,"value":1526},"必交付物 1：最小回归任务清单（10 条，通用）",{"type":26,"tag":1069,"props":1528,"children":1529},{},[1530],{"type":26,"tag":27,"props":1531,"children":1532},{},[1533],{"type":31,"value":1534},"这份清单的意义：让每次 AI 改动都能“被验证”。否则你只是把不可控变成了更快的不可控。",{"type":26,"tag":209,"props":1536,"children":1537},{},[1538,1543,1548,1553,1558,1563,1568,1573,1578,1583],{"type":26,"tag":213,"props":1539,"children":1540},{},[1541],{"type":31,"value":1542},"关键路径能跑通（手动点击/请求一次）",{"type":26,"tag":213,"props":1544,"children":1545},{},[1546],{"type":31,"value":1547},"错误路径能触发（模拟一次失败输入）",{"type":26,"tag":213,"props":1549,"children":1550},{},[1551],{"type":31,"value":1552},"控制台无新增错误（至少关注 1 次真实操作）",{"type":26,"tag":213,"props":1554,"children":1555},{},[1556],{"type":31,"value":1557},"关键 UI 未错位（移动端/桌面端各看一眼）",{"type":26,"tag":213,"props":1559,"children":1560},{},[1561],{"type":31,"value":1562},"刷新后状态正确（尤其是表单/列表）",{"type":26,"tag":213,"props":1564,"children":1565},{},[1566],{"type":31,"value":1567},"路由跳转没断（从入口到目标页）",{"type":26,"tag":213,"props":1569,"children":1570},{},[1571],{"type":31,"value":1572},"相关接口未改变契约（字段名/类型）",{"type":26,"tag":213,"props":1574,"children":1575},{},[1576],{"type":31,"value":1577},"性能没有明显退化（首屏、交互卡顿）",{"type":26,"tag":213,"props":1579,"children":1580},{},[1581],{"type":31,"value":1582},"回滚方案可执行（知道回滚哪几个文件/commit）",{"type":26,"tag":213,"props":1584,"children":1585},{},[1586],{"type":31,"value":1587},"写下“这次改动解决了什么、风险是什么”（可贴 PR）",{"type":26,"tag":760,"props":1589,"children":1590},{},[],{"type":26,"tag":81,"props":1592,"children":1594},{"id":1593},"必交付物-2失败案例复盘真实会发生",[1595],{"type":31,"value":1596},"必交付物 2：失败案例复盘（真实会发生）",{"type":26,"tag":1087,"props":1598,"children":1600},{"id":1599},"现象快捷键用得很熟但交付还是慢",[1601],{"type":31,"value":1602},"现象：快捷键用得很熟，但交付还是慢",{"type":26,"tag":27,"props":1604,"children":1605},{},[1606],{"type":31,"value":1607},"典型原因：你把 Cursor 当成“更聪明的搜索框”，不断对话，直到它给出你想要的答案。",{"type":26,"tag":27,"props":1609,"children":1610},{},[1611],{"type":31,"value":1612},"复现路径：",{"type":26,"tag":363,"props":1614,"children":1615},{},[1616,1621,1626,1631],{"type":26,"tag":213,"props":1617,"children":1618},{},[1619],{"type":31,"value":1620},"你直接说“把页面做得更好看、更高级”",{"type":26,"tag":213,"props":1622,"children":1623},{},[1624],{"type":31,"value":1625},"AI 开始大改样式、抽象组件、甚至引入新依赖",{"type":26,"tag":213,"props":1627,"children":1628},{},[1629],{"type":31,"value":1630},"你为了省事按了“接受建议”",{"type":26,"tag":213,"props":1632,"children":1633},{},[1634],{"type":31,"value":1635},"最后发现：设计没统一、移动端崩、甚至埋了性能问题",{"type":26,"tag":27,"props":1637,"children":1638},{},[1639,1641,1645,1647,1652],{"type":31,"value":1640},"根因：缺少",{"type":26,"tag":699,"props":1642,"children":1643},{},[1644],{"type":31,"value":824},{"type":31,"value":1646},"与",{"type":26,"tag":699,"props":1648,"children":1649},{},[1650],{"type":31,"value":1651},"验收",{"type":31,"value":1653},"。",{"type":26,"tag":27,"props":1655,"children":1656},{},[1657],{"type":31,"value":1658},"修复方式（可照抄）：",{"type":26,"tag":363,"props":1660,"children":1661},{},[1662,1667,1679],{"type":26,"tag":213,"props":1663,"children":1664},{},[1665],{"type":31,"value":1666},"把需求拆成 3 个可验证目标：例如“按钮样式统一”“首屏 CTA 更明显”“移动端间距不挤”",{"type":26,"tag":213,"props":1668,"children":1669},{},[1670,1672,1677],{"type":31,"value":1671},"每个目标只用 ",{"type":26,"tag":893,"props":1673,"children":1675},{"className":1674},[],[1676],{"type":31,"value":1138},{"type":31,"value":1678}," 改一个局部",{"type":26,"tag":213,"props":1680,"children":1681},{},[1682],{"type":31,"value":1683},"每次接受建议前跑一遍“最小回归集”",{"type":26,"tag":760,"props":1685,"children":1686},{},[],{"type":26,"tag":81,"props":1688,"children":1690},{"id":1689},"faq高频问题",[1691],{"type":31,"value":1692},"FAQ（高频问题）",{"type":26,"tag":1087,"props":1694,"children":1696},{"id":1695},"q1我应该先记快捷键还是先学工作流",[1697],{"type":31,"value":1698},"Q1：我应该先记快捷键还是先学工作流？",{"type":26,"tag":27,"props":1700,"children":1701},{},[1702],{"type":31,"value":1703},"先学工作流。快捷键只是把工作流的步骤变短。",{"type":26,"tag":1087,"props":1705,"children":1707},{"id":1706},"q2为什么我一用多文件就容易翻车",[1708],{"type":31,"value":1709},"Q2：为什么我一用多文件就容易翻车？",{"type":26,"tag":27,"props":1711,"children":1712},{},[1713],{"type":31,"value":1714},"因为多文件意味着范围更大、依赖更多、验收更难。先锁定“文件清单 + 每步验收”，再让它动手。",{"type":26,"tag":1087,"props":1716,"children":1718},{"id":1717},"q3有没有万能提示词",[1719],{"type":31,"value":1720},"Q3：有没有“万能提示词”？",{"type":26,"tag":27,"props":1722,"children":1723},{},[1724],{"type":31,"value":1725},"没有，但有“万能结构”：目标、范围、非目标、验收、输出格式。",{"type":26,"tag":760,"props":1727,"children":1728},{},[],{"type":26,"tag":81,"props":1730,"children":1732},{"id":1731},"延伸阅读建议按顺序",[1733],{"type":31,"value":1734},"延伸阅读（建议按顺序）",{"type":26,"tag":363,"props":1736,"children":1737},{},[1738,1745,1752,1759],{"type":26,"tag":213,"props":1739,"children":1740},{},[1741],{"type":26,"tag":49,"props":1742,"children":1743},{"href":733},[1744],{"type":31,"value":736},{"type":26,"tag":213,"props":1746,"children":1747},{},[1748],{"type":26,"tag":49,"props":1749,"children":1750},{"href":744},[1751],{"type":31,"value":747},{"type":26,"tag":213,"props":1753,"children":1754},{},[1755],{"type":26,"tag":49,"props":1756,"children":1757},{"href":755},[1758],{"type":31,"value":758},{"type":26,"tag":213,"props":1760,"children":1761},{},[1762,1764],{"type":31,"value":1763},"如果你更关心“网页制作落地”：看这篇 ",{"type":26,"tag":49,"props":1765,"children":1767},{"href":1766},"/topics/practical-tips/htmlpage-quick-landing-page",[1768],{"type":31,"value":1769},"3 分钟用 HTMLPAGE 做落地页",{"title":7,"searchDepth":626,"depth":626,"links":1771},[1772,1773,1774,1786,1787,1790,1795],{"id":765,"depth":629,"text":768},{"id":840,"depth":629,"text":843},{"id":1082,"depth":629,"text":1085,"children":1775},[1776,1777,1778,1779,1780,1781,1782,1783,1784,1785],{"id":1089,"depth":626,"text":1092},{"id":1148,"depth":626,"text":1151},{"id":1218,"depth":626,"text":1221},{"id":1274,"depth":626,"text":1277},{"id":1314,"depth":626,"text":1317},{"id":1353,"depth":626,"text":1356},{"id":1372,"depth":626,"text":1375},{"id":1414,"depth":626,"text":1417},{"id":1449,"depth":626,"text":1452},{"id":1466,"depth":626,"text":1469},{"id":1523,"depth":629,"text":1526},{"id":1593,"depth":629,"text":1596,"children":1788},[1789],{"id":1599,"depth":626,"text":1602},{"id":1689,"depth":629,"text":1692,"children":1791},[1792,1793,1794],{"id":1695,"depth":626,"text":1698},{"id":1706,"depth":626,"text":1709},{"id":1717,"depth":626,"text":1720},{"id":1731,"depth":629,"text":1734},"content:topics:ai:cursor-keyboard-shortcuts-cheatsheet.md","topics/ai/cursor-keyboard-shortcuts-cheatsheet.md","topics/ai/cursor-keyboard-shortcuts-cheatsheet",{"_path":1800,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1801,"description":1802,"date":1803,"topic":5,"author":11,"tags":1804,"image":1808,"imageAlt":1809,"pexelsPhotoId":1810,"pexelsUrl":1811,"readingTime":1812,"body":1813,"_type":637,"_id":2746,"_source":639,"_file":2747,"_stem":2748,"_extension":642},"/topics/ai/cursor-vs-copilot-vscode-workflow","Cursor vs GitHub Copilot vs VS Code：怎么选、怎么搭配、怎么把风险关在笼子里","用“任务类型×风险×验收成本”的选择矩阵解释 Cursor/Copilot/VS Code 的差异，并给出一套可落地的协作工作流（范围闸门、最小回归集、回滚策略）。","2026-03-01",[650,1805,653,1806,1807],"GitHub Copilot","AI 编程","工作流","/images/topics/ai/cursor-vs-copilot-vscode-workflow.jpg","团队在电脑前进行协作讨论",1181371,"https://www.pexels.com/photo/man-wearing-blue-dress-shirt-1181371/",15,{"type":23,"children":1814,"toc":2724},[1815,1820,1825,1843,1848,1866,1869,1875,1880,1911,1916,1919,1925,1933,2137,2145,2158,2161,2167,2173,2186,2191,2204,2210,2215,2248,2254,2259,2277,2280,2286,2291,2297,2302,2335,2341,2354,2359,2372,2378,2390,2396,2401,2414,2419,2422,2428,2433,2554,2557,2563,2573,2582,2600,2609,2617,2626,2644,2647,2653,2659,2664,2670,2675,2678,2683],{"type":26,"tag":27,"props":1816,"children":1817},{},[1818],{"type":31,"value":1819},"“Cursor 和 Copilot 到底有什么区别？”",{"type":26,"tag":27,"props":1821,"children":1822},{},[1823],{"type":31,"value":1824},"这个问题问得越早越好，因为你一旦把工具选错，后面所有痛苦都不是“提示词不够好”，而是：",{"type":26,"tag":363,"props":1826,"children":1827},{},[1828,1833,1838],{"type":26,"tag":213,"props":1829,"children":1830},{},[1831],{"type":31,"value":1832},"改动不可控（范围漂移、改错文件）",{"type":26,"tag":213,"props":1834,"children":1835},{},[1836],{"type":31,"value":1837},"验收成本爆炸（不知道要测什么）",{"type":26,"tag":213,"props":1839,"children":1840},{},[1841],{"type":31,"value":1842},"团队协作崩盘（没有闸门、没有回滚）",{"type":26,"tag":27,"props":1844,"children":1845},{},[1846],{"type":31,"value":1847},"这篇文章用一张选择矩阵 + 一套可执行工作流，帮你做到两件事：",{"type":26,"tag":209,"props":1849,"children":1850},{},[1851,1856],{"type":26,"tag":213,"props":1852,"children":1853},{},[1854],{"type":31,"value":1855},"知道什么时候用 Cursor、什么时候用 Copilot、什么时候“纯 VS Code 更快”",{"type":26,"tag":213,"props":1857,"children":1858},{},[1859,1861],{"type":31,"value":1860},"就算用 AI，也能把风险关在笼子里：",{"type":26,"tag":699,"props":1862,"children":1863},{},[1864],{"type":31,"value":1865},"可审查、可验证、可回滚",{"type":26,"tag":760,"props":1867,"children":1868},{},[],{"type":26,"tag":81,"props":1870,"children":1872},{"id":1871},"结论先说三者不是互斥而是分工",[1873],{"type":31,"value":1874},"结论先说：三者不是互斥，而是分工",{"type":26,"tag":27,"props":1876,"children":1877},{},[1878],{"type":31,"value":1879},"你可以把它们看成三层能力：",{"type":26,"tag":363,"props":1881,"children":1882},{},[1883,1892,1902],{"type":26,"tag":213,"props":1884,"children":1885},{},[1886,1890],{"type":26,"tag":699,"props":1887,"children":1888},{},[1889],{"type":31,"value":653},{"type":31,"value":1891},"：编辑器与生态（调试、插件、任务、终端、语言服务）",{"type":26,"tag":213,"props":1893,"children":1894},{},[1895,1900],{"type":26,"tag":699,"props":1896,"children":1897},{},[1898],{"type":31,"value":1899},"Copilot",{"type":31,"value":1901},"：代码补全与局部建议（“我正在写这一行/这一段”）",{"type":26,"tag":213,"props":1903,"children":1904},{},[1905,1909],{"type":26,"tag":699,"props":1906,"children":1907},{},[1908],{"type":31,"value":650},{"type":31,"value":1910},"：以项目为单位的 AI 协作（对话、索引、多文件编辑、规则）",{"type":26,"tag":27,"props":1912,"children":1913},{},[1914],{"type":31,"value":1915},"最常见的误区是：把“局部补全能力”当作“能做架构与多文件落地”。",{"type":26,"tag":760,"props":1917,"children":1918},{},[],{"type":26,"tag":81,"props":1920,"children":1922},{"id":1921},"选择矩阵按任务类型选工具不是按偏好",[1923],{"type":31,"value":1924},"选择矩阵：按任务类型选工具（不是按偏好）",{"type":26,"tag":1069,"props":1926,"children":1927},{},[1928],{"type":26,"tag":27,"props":1929,"children":1930},{},[1931],{"type":31,"value":1932},"你只要把自己的任务放进表格，就能得到推荐路径。",{"type":26,"tag":88,"props":1934,"children":1935},{},[1936,1968],{"type":26,"tag":92,"props":1937,"children":1938},{},[1939],{"type":26,"tag":96,"props":1940,"children":1941},{},[1942,1947,1953,1958,1963],{"type":26,"tag":100,"props":1943,"children":1944},{},[1945],{"type":31,"value":1946},"任务类型",{"type":26,"tag":100,"props":1948,"children":1950},{"align":1949},"right",[1951],{"type":31,"value":1952},"风险",{"type":26,"tag":100,"props":1954,"children":1955},{"align":1949},[1956],{"type":31,"value":1957},"验收成本",{"type":26,"tag":100,"props":1959,"children":1960},{},[1961],{"type":31,"value":1962},"更推荐",{"type":26,"tag":100,"props":1964,"children":1965},{},[1966],{"type":31,"value":1967},"为什么",{"type":26,"tag":116,"props":1969,"children":1970},{},[1971,1998,2031,2057,2084,2111],{"type":26,"tag":96,"props":1972,"children":1973},{},[1974,1979,1984,1988,1993],{"type":26,"tag":123,"props":1975,"children":1976},{},[1977],{"type":31,"value":1978},"写一段代码/补一个 if",{"type":26,"tag":123,"props":1980,"children":1981},{"align":1949},[1982],{"type":31,"value":1983},"低",{"type":26,"tag":123,"props":1985,"children":1986},{"align":1949},[1987],{"type":31,"value":1983},{"type":26,"tag":123,"props":1989,"children":1990},{},[1991],{"type":31,"value":1992},"Copilot / Cursor 内联编辑",{"type":26,"tag":123,"props":1994,"children":1995},{},[1996],{"type":31,"value":1997},"局部建议足够，成本最低",{"type":26,"tag":96,"props":1999,"children":2000},{},[2001,2006,2011,2015,2026],{"type":26,"tag":123,"props":2002,"children":2003},{},[2004],{"type":31,"value":2005},"重构一个函数",{"type":26,"tag":123,"props":2007,"children":2008},{"align":1949},[2009],{"type":31,"value":2010},"中",{"type":26,"tag":123,"props":2012,"children":2013},{"align":1949},[2014],{"type":31,"value":2010},{"type":26,"tag":123,"props":2016,"children":2017},{},[2018,2020],{"type":31,"value":2019},"Cursor ",{"type":26,"tag":893,"props":2021,"children":2023},{"className":2022},[],[2024],{"type":31,"value":2025},"内联编辑",{"type":26,"tag":123,"props":2027,"children":2028},{},[2029],{"type":31,"value":2030},"需要解释、需要约束输出",{"type":26,"tag":96,"props":2032,"children":2033},{},[2034,2039,2043,2047,2052],{"type":26,"tag":123,"props":2035,"children":2036},{},[2037],{"type":31,"value":2038},"改一个组件 + 样式",{"type":26,"tag":123,"props":2040,"children":2041},{"align":1949},[2042],{"type":31,"value":2010},{"type":26,"tag":123,"props":2044,"children":2045},{"align":1949},[2046],{"type":31,"value":2010},{"type":26,"tag":123,"props":2048,"children":2049},{},[2050],{"type":31,"value":2051},"Cursor（小范围多文件）",{"type":26,"tag":123,"props":2053,"children":2054},{},[2055],{"type":31,"value":2056},"需要同时改模板与样式",{"type":26,"tag":96,"props":2058,"children":2059},{},[2060,2065,2070,2074,2079],{"type":26,"tag":123,"props":2061,"children":2062},{},[2063],{"type":31,"value":2064},"改 3~5 个文件（组件+api+测试）",{"type":26,"tag":123,"props":2066,"children":2067},{"align":1949},[2068],{"type":31,"value":2069},"高",{"type":26,"tag":123,"props":2071,"children":2072},{"align":1949},[2073],{"type":31,"value":2069},{"type":26,"tag":123,"props":2075,"children":2076},{},[2077],{"type":31,"value":2078},"Cursor Composer + 闸门",{"type":26,"tag":123,"props":2080,"children":2081},{},[2082],{"type":31,"value":2083},"需要计划、验收、回滚",{"type":26,"tag":96,"props":2085,"children":2086},{},[2087,2092,2097,2101,2106],{"type":26,"tag":123,"props":2088,"children":2089},{},[2090],{"type":31,"value":2091},"重写一段架构/引入新依赖",{"type":26,"tag":123,"props":2093,"children":2094},{"align":1949},[2095],{"type":31,"value":2096},"很高",{"type":26,"tag":123,"props":2098,"children":2099},{"align":1949},[2100],{"type":31,"value":2096},{"type":26,"tag":123,"props":2102,"children":2103},{},[2104],{"type":31,"value":2105},"先人脑设计 + VS Code 实现",{"type":26,"tag":123,"props":2107,"children":2108},{},[2109],{"type":31,"value":2110},"AI 易发散，最好先设计再执行",{"type":26,"tag":96,"props":2112,"children":2113},{},[2114,2119,2123,2127,2132],{"type":26,"tag":123,"props":2115,"children":2116},{},[2117],{"type":31,"value":2118},"排查线上问题/性能抖动",{"type":26,"tag":123,"props":2120,"children":2121},{"align":1949},[2122],{"type":31,"value":2069},{"type":26,"tag":123,"props":2124,"children":2125},{"align":1949},[2126],{"type":31,"value":2096},{"type":26,"tag":123,"props":2128,"children":2129},{},[2130],{"type":31,"value":2131},"VS Code + 工具链优先，AI 辅助归纳",{"type":26,"tag":123,"props":2133,"children":2134},{},[2135],{"type":31,"value":2136},"需要证据，不要“猜”",{"type":26,"tag":27,"props":2138,"children":2139},{},[2140],{"type":26,"tag":699,"props":2141,"children":2142},{},[2143],{"type":31,"value":2144},"一句话规则：",{"type":26,"tag":363,"props":2146,"children":2147},{},[2148,2153],{"type":26,"tag":213,"props":2149,"children":2150},{},[2151],{"type":31,"value":2152},"当你的改动可以用“10 条最小回归集”覆盖时，用 Cursor。",{"type":26,"tag":213,"props":2154,"children":2155},{},[2156],{"type":31,"value":2157},"当你的改动无法验证时，先别让 AI 动手。",{"type":26,"tag":760,"props":2159,"children":2160},{},[],{"type":26,"tag":81,"props":2162,"children":2164},{"id":2163},"差异拆解到底差在哪里",[2165],{"type":31,"value":2166},"差异拆解：到底差在哪里？",{"type":26,"tag":1087,"props":2168,"children":2170},{"id":2169},"_1-上下文来源补全-vs-项目索引",[2171],{"type":31,"value":2172},"1) 上下文来源：补全 vs 项目索引",{"type":26,"tag":363,"props":2174,"children":2175},{},[2176,2181],{"type":26,"tag":213,"props":2177,"children":2178},{},[2179],{"type":31,"value":2180},"Copilot 更擅长：你正在写的这几行、当前文件的局部上下文",{"type":26,"tag":213,"props":2182,"children":2183},{},[2184],{"type":31,"value":2185},"Cursor 更擅长：项目级索引 + 多文件关联理解",{"type":26,"tag":27,"props":2187,"children":2188},{},[2189],{"type":31,"value":2190},"因此：",{"type":26,"tag":363,"props":2192,"children":2193},{},[2194,2199],{"type":26,"tag":213,"props":2195,"children":2196},{},[2197],{"type":31,"value":2198},"写代码片段：Copilot 速度更快",{"type":26,"tag":213,"props":2200,"children":2201},{},[2202],{"type":31,"value":2203},"改一坨工程：Cursor 更有胜算（但更需要闸门）",{"type":26,"tag":1087,"props":2205,"children":2207},{"id":2206},"_2-交互方式你能不能控制范围",[2208],{"type":31,"value":2209},"2) 交互方式：你能不能控制范围",{"type":26,"tag":27,"props":2211,"children":2212},{},[2213],{"type":31,"value":2214},"范围控制的三个层级：",{"type":26,"tag":209,"props":2216,"children":2217},{},[2218,2228,2238],{"type":26,"tag":213,"props":2219,"children":2220},{},[2221,2223],{"type":31,"value":2222},"内联编辑（选中一段）→ ",{"type":26,"tag":699,"props":2224,"children":2225},{},[2226],{"type":31,"value":2227},"最强范围控制",{"type":26,"tag":213,"props":2229,"children":2230},{},[2231,2233],{"type":31,"value":2232},"Composer 多文件（先列文件清单）→ ",{"type":26,"tag":699,"props":2234,"children":2235},{},[2236],{"type":31,"value":2237},"可控但要闸门",{"type":26,"tag":213,"props":2239,"children":2240},{},[2241,2243],{"type":31,"value":2242},"大对话（泛目标）→ ",{"type":26,"tag":699,"props":2244,"children":2245},{},[2246],{"type":31,"value":2247},"最容易跑偏",{"type":26,"tag":1087,"props":2249,"children":2251},{"id":2250},"_3-输出形态建议-vs-可审查的变更",[2252],{"type":31,"value":2253},"3) 输出形态：建议 vs 可审查的变更",{"type":26,"tag":27,"props":2255,"children":2256},{},[2257],{"type":31,"value":2258},"最好的 AI 输出不是“给我一段代码”，而是：",{"type":26,"tag":363,"props":2260,"children":2261},{},[2262,2267,2272],{"type":26,"tag":213,"props":2263,"children":2264},{},[2265],{"type":31,"value":2266},"改动摘要（做了什么）",{"type":26,"tag":213,"props":2268,"children":2269},{},[2270],{"type":31,"value":2271},"diff 级别的可审查变更",{"type":26,"tag":213,"props":2273,"children":2274},{},[2275],{"type":31,"value":2276},"验收步骤与回滚方案",{"type":26,"tag":760,"props":2278,"children":2279},{},[],{"type":26,"tag":81,"props":2281,"children":2283},{"id":2282},"一套可落地的团队工作流把风险关住",[2284],{"type":31,"value":2285},"一套可落地的团队工作流（把风险关住）",{"type":26,"tag":27,"props":2287,"children":2288},{},[2289],{"type":31,"value":2290},"下面这套流程，你可以直接写进团队规范：",{"type":26,"tag":1087,"props":2292,"children":2294},{"id":2293},"step-1先写任务单geo-友好结构",[2295],{"type":31,"value":2296},"Step 1：先写任务单（GEO 友好结构）",{"type":26,"tag":27,"props":2298,"children":2299},{},[2300],{"type":31,"value":2301},"模板：",{"type":26,"tag":363,"props":2303,"children":2304},{},[2305,2310,2315,2320,2325,2330],{"type":26,"tag":213,"props":2306,"children":2307},{},[2308],{"type":31,"value":2309},"目标：……",{"type":26,"tag":213,"props":2311,"children":2312},{},[2313],{"type":31,"value":2314},"背景：……",{"type":26,"tag":213,"props":2316,"children":2317},{},[2318],{"type":31,"value":2319},"范围：只改这些文件/模块：……",{"type":26,"tag":213,"props":2321,"children":2322},{},[2323],{"type":31,"value":2324},"非目标：不做哪些事情：……",{"type":26,"tag":213,"props":2326,"children":2327},{},[2328],{"type":31,"value":2329},"验收：如何判断完成（可测试/可观察）：……",{"type":26,"tag":213,"props":2331,"children":2332},{},[2333],{"type":31,"value":2334},"回滚：如果失败怎么撤回：……",{"type":26,"tag":1087,"props":2336,"children":2338},{"id":2337},"step-2用范围闸门限制-ai",[2339],{"type":31,"value":2340},"Step 2：用“范围闸门”限制 AI",{"type":26,"tag":363,"props":2342,"children":2343},{},[2344,2349],{"type":26,"tag":213,"props":2345,"children":2346},{},[2347],{"type":31,"value":2348},"单文件改动：优先 Cursor 内联编辑",{"type":26,"tag":213,"props":2350,"children":2351},{},[2352],{"type":31,"value":2353},"多文件改动：必须先让 AI 输出“文件清单（≤5）+ 每步验收”",{"type":26,"tag":27,"props":2355,"children":2356},{},[2357],{"type":31,"value":2358},"如果 AI 输出的文件清单超过 5 个：",{"type":26,"tag":363,"props":2360,"children":2361},{},[2362,2367],{"type":26,"tag":213,"props":2363,"children":2364},{},[2365],{"type":31,"value":2366},"不是它太强，是任务太大",{"type":26,"tag":213,"props":2368,"children":2369},{},[2370],{"type":31,"value":2371},"你需要拆任务，而不是继续推进",{"type":26,"tag":1087,"props":2373,"children":2375},{"id":2374},"step-3最小回归集10-条",[2376],{"type":31,"value":2377},"Step 3：最小回归集（10 条）",{"type":26,"tag":27,"props":2379,"children":2380},{},[2381,2383,2388],{"type":31,"value":2382},"每次接受改动前必须跑（可参考：",{"type":26,"tag":49,"props":2384,"children":2385},{"href":645},[2386],{"type":31,"value":2387},"Cursor 快捷键速查表",{"type":31,"value":2389}," 里的清单）。",{"type":26,"tag":1087,"props":2391,"children":2393},{"id":2392},"step-4回滚策略不用等事故才想",[2394],{"type":31,"value":2395},"Step 4：回滚策略（不用等事故才想）",{"type":26,"tag":27,"props":2397,"children":2398},{},[2399],{"type":31,"value":2400},"回滚最常见的两条路：",{"type":26,"tag":363,"props":2402,"children":2403},{},[2404,2409],{"type":26,"tag":213,"props":2405,"children":2406},{},[2407],{"type":31,"value":2408},"git 回滚 commit",{"type":26,"tag":213,"props":2410,"children":2411},{},[2412],{"type":31,"value":2413},"对关键文件保留前版本（至少能快速恢复）",{"type":26,"tag":27,"props":2415,"children":2416},{},[2417],{"type":31,"value":2418},"你需要做到：任何一轮 AI 改动都能在 5 分钟内撤回。",{"type":26,"tag":760,"props":2420,"children":2421},{},[],{"type":26,"tag":81,"props":2423,"children":2425},{"id":2424},"必交付物对比矩阵可复制",[2426],{"type":31,"value":2427},"必交付物：对比矩阵（可复制）",{"type":26,"tag":27,"props":2429,"children":2430},{},[2431],{"type":31,"value":2432},"下面这张表可以直接贴到你的团队 wiki：",{"type":26,"tag":88,"props":2434,"children":2435},{},[2436,2459],{"type":26,"tag":92,"props":2437,"children":2438},{},[2439],{"type":26,"tag":96,"props":2440,"children":2441},{},[2442,2447,2451,2455],{"type":26,"tag":100,"props":2443,"children":2444},{},[2445],{"type":31,"value":2446},"维度",{"type":26,"tag":100,"props":2448,"children":2449},{},[2450],{"type":31,"value":653},{"type":26,"tag":100,"props":2452,"children":2453},{},[2454],{"type":31,"value":1899},{"type":26,"tag":100,"props":2456,"children":2457},{},[2458],{"type":31,"value":650},{"type":26,"tag":116,"props":2460,"children":2461},{},[2462,2485,2508,2531],{"type":26,"tag":96,"props":2463,"children":2464},{},[2465,2470,2475,2480],{"type":26,"tag":123,"props":2466,"children":2467},{},[2468],{"type":31,"value":2469},"强项",{"type":26,"tag":123,"props":2471,"children":2472},{},[2473],{"type":31,"value":2474},"工具链、调试、生态",{"type":26,"tag":123,"props":2476,"children":2477},{},[2478],{"type":31,"value":2479},"补全与局部建议",{"type":26,"tag":123,"props":2481,"children":2482},{},[2483],{"type":31,"value":2484},"项目上下文、多文件落地",{"type":26,"tag":96,"props":2486,"children":2487},{},[2488,2493,2498,2503],{"type":26,"tag":123,"props":2489,"children":2490},{},[2491],{"type":31,"value":2492},"适合任务",{"type":26,"tag":123,"props":2494,"children":2495},{},[2496],{"type":31,"value":2497},"排查、调试、验证",{"type":26,"tag":123,"props":2499,"children":2500},{},[2501],{"type":31,"value":2502},"写一段、补一段",{"type":26,"tag":123,"props":2504,"children":2505},{},[2506],{"type":31,"value":2507},"改一段、改一组文件",{"type":26,"tag":96,"props":2509,"children":2510},{},[2511,2516,2521,2526],{"type":26,"tag":123,"props":2512,"children":2513},{},[2514],{"type":31,"value":2515},"最大风险",{"type":26,"tag":123,"props":2517,"children":2518},{},[2519],{"type":31,"value":2520},"无",{"type":26,"tag":123,"props":2522,"children":2523},{},[2524],{"type":31,"value":2525},"过度依赖建议",{"type":26,"tag":123,"props":2527,"children":2528},{},[2529],{"type":31,"value":2530},"范围漂移、多文件回归",{"type":26,"tag":96,"props":2532,"children":2533},{},[2534,2539,2544,2549],{"type":26,"tag":123,"props":2535,"children":2536},{},[2537],{"type":31,"value":2538},"必须搭配",{"type":26,"tag":123,"props":2540,"children":2541},{},[2542],{"type":31,"value":2543},"规范与检查",{"type":26,"tag":123,"props":2545,"children":2546},{},[2547],{"type":31,"value":2548},"代码评审",{"type":26,"tag":123,"props":2550,"children":2551},{},[2552],{"type":31,"value":2553},"闸门 + 最小回归集",{"type":26,"tag":760,"props":2555,"children":2556},{},[],{"type":26,"tag":81,"props":2558,"children":2560},{"id":2559},"失败案例多文件看似成功实际埋雷",[2561],{"type":31,"value":2562},"失败案例：多文件“看似成功”，实际埋雷",{"type":26,"tag":27,"props":2564,"children":2565},{},[2566,2571],{"type":26,"tag":699,"props":2567,"children":2568},{},[2569],{"type":31,"value":2570},"现象",{"type":31,"value":2572},"：AI 说“我已经把所有地方都改了”，你也接受了，结果上线后 404 或样式错位。",{"type":26,"tag":27,"props":2574,"children":2575},{},[2576,2581],{"type":26,"tag":699,"props":2577,"children":2578},{},[2579],{"type":31,"value":2580},"复现条件",{"type":31,"value":1393},{"type":26,"tag":363,"props":2583,"children":2584},{},[2585,2590,2595],{"type":26,"tag":213,"props":2586,"children":2587},{},[2588],{"type":31,"value":2589},"你给了一个大目标（例如“把所有按钮统一成主题色”）",{"type":26,"tag":213,"props":2591,"children":2592},{},[2593],{"type":31,"value":2594},"它改了组件、样式、甚至主题配置",{"type":26,"tag":213,"props":2596,"children":2597},{},[2598],{"type":31,"value":2599},"你没有按页面模块走一遍，直接合并",{"type":26,"tag":27,"props":2601,"children":2602},{},[2603,2608],{"type":26,"tag":699,"props":2604,"children":2605},{},[2606],{"type":31,"value":2607},"根因",{"type":31,"value":1393},{"type":26,"tag":363,"props":2610,"children":2611},{},[2612],{"type":26,"tag":213,"props":2613,"children":2614},{},[2615],{"type":31,"value":2616},"改动范围大，但验收仍按“小改动”的方式做（只看一处）",{"type":26,"tag":27,"props":2618,"children":2619},{},[2620,2625],{"type":26,"tag":699,"props":2621,"children":2622},{},[2623],{"type":31,"value":2624},"修复",{"type":31,"value":1393},{"type":26,"tag":363,"props":2627,"children":2628},{},[2629,2634,2639],{"type":26,"tag":213,"props":2630,"children":2631},{},[2632],{"type":31,"value":2633},"强制把任务拆成“模块级目标”：Hero、Feature、Pricing、Form",{"type":26,"tag":213,"props":2635,"children":2636},{},[2637],{"type":31,"value":2638},"每个模块改完就验收一次",{"type":26,"tag":213,"props":2640,"children":2641},{},[2642],{"type":31,"value":2643},"验收通过再进入下一个模块",{"type":26,"tag":760,"props":2645,"children":2646},{},[],{"type":26,"tag":81,"props":2648,"children":2650},{"id":2649},"faq",[2651],{"type":31,"value":2652},"FAQ",{"type":26,"tag":1087,"props":2654,"children":2656},{"id":2655},"q1我已经用了-cursor为什么还要用-copilot",[2657],{"type":31,"value":2658},"Q1：我已经用了 Cursor，为什么还要用 Copilot？",{"type":26,"tag":27,"props":2660,"children":2661},{},[2662],{"type":31,"value":2663},"因为“补全”这种高频低风险任务，Copilot 的交互成本更低；Cursor 更适合需要解释与约束的改动。",{"type":26,"tag":1087,"props":2665,"children":2667},{"id":2666},"q2什么时候应该完全不用-ai",[2668],{"type":31,"value":2669},"Q2：什么时候应该完全不用 AI？",{"type":26,"tag":27,"props":2671,"children":2672},{},[2673],{"type":31,"value":2674},"当你无法定义验收标准时。比如“更高级”“更好看”这种目标，先做信息结构与设计规则，再让 AI 帮你落地局部。",{"type":26,"tag":760,"props":2676,"children":2677},{},[],{"type":26,"tag":81,"props":2679,"children":2681},{"id":2680},"延伸阅读",[2682],{"type":31,"value":2680},{"type":26,"tag":363,"props":2684,"children":2685},{},[2686,2695,2704,2713],{"type":26,"tag":213,"props":2687,"children":2688},{},[2689,2691],{"type":31,"value":2690},"Cursor 入门：",{"type":26,"tag":49,"props":2692,"children":2693},{"href":733},[2694],{"type":31,"value":736},{"type":26,"tag":213,"props":2696,"children":2697},{},[2698,2700],{"type":31,"value":2699},"Cursor 进阶：",{"type":26,"tag":49,"props":2701,"children":2702},{"href":744},[2703],{"type":31,"value":747},{"type":26,"tag":213,"props":2705,"children":2706},{},[2707,2709],{"type":31,"value":2708},"规则配置：",{"type":26,"tag":49,"props":2710,"children":2711},{"href":755},[2712],{"type":31,"value":758},{"type":26,"tag":213,"props":2714,"children":2715},{},[2716,2718],{"type":31,"value":2717},"Copilot 实战：",{"type":26,"tag":49,"props":2719,"children":2721},{"href":2720},"/topics/ai/github-copilot-tips",[2722],{"type":31,"value":2723},"GitHub Copilot 实用技巧",{"title":7,"searchDepth":626,"depth":626,"links":2725},[2726,2727,2728,2733,2739,2740,2741,2745],{"id":1871,"depth":629,"text":1874},{"id":1921,"depth":629,"text":1924},{"id":2163,"depth":629,"text":2166,"children":2729},[2730,2731,2732],{"id":2169,"depth":626,"text":2172},{"id":2206,"depth":626,"text":2209},{"id":2250,"depth":626,"text":2253},{"id":2282,"depth":629,"text":2285,"children":2734},[2735,2736,2737,2738],{"id":2293,"depth":626,"text":2296},{"id":2337,"depth":626,"text":2340},{"id":2374,"depth":626,"text":2377},{"id":2392,"depth":626,"text":2395},{"id":2424,"depth":629,"text":2427},{"id":2559,"depth":629,"text":2562},{"id":2649,"depth":629,"text":2652,"children":2742},[2743,2744],{"id":2655,"depth":626,"text":2658},{"id":2666,"depth":626,"text":2669},{"id":2680,"depth":629,"text":2680},"content:topics:ai:cursor-vs-copilot-vscode-workflow.md","topics/ai/cursor-vs-copilot-vscode-workflow.md","topics/ai/cursor-vs-copilot-vscode-workflow",{"_path":2750,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":2751,"description":2752,"date":2753,"topic":5,"author":11,"tags":2754,"image":2759,"featured":539,"readingTime":1812,"body":2760,"_type":637,"_id":3409,"_source":639,"_file":3410,"_stem":3411,"_extension":642},"/topics/ai/ai-debugging-troubleshooting-guide","AI 辅助调试与问题排查：让 AI 成为你的调试搭档","深入探讨如何利用 AI 工具提升调试效率，包括错误信息分析、日志解读、性能问题定位、复杂 bug 排查等实战场景，构建 AI 驱动的调试工作流。","2026-01-18",[2755,2756,2757,654,2758],"AI 调试","问题排查","Debug","错误处理","/images/topics/ai/ai-debugging-guide.jpg",{"type":23,"children":2761,"toc":3380},[2762,2768,2774,2779,2784,2789,2795,2801,2806,2814,2842,2850,2873,2879,2890,2899,2907,2915,2948,2956,2986,2999,3007,3012,3020,3028,3039,3045,3053,3064,3072,3081,3087,3093,3098,3107,3113,3118,3127,3133,3139,3148,3154,3163,3169,3180,3186,3192,3201,3207,3216,3222,3228,3236,3242,3251,3259,3267,3270,3276,3281,3300,3312,3315,3321,3326,3335,3340,3343,3349,3354,3372],{"type":26,"tag":81,"props":2763,"children":2765},{"id":2764},"ai-辅助调试与问题排查",[2766],{"type":31,"value":2767},"AI 辅助调试与问题排查",{"type":26,"tag":81,"props":2769,"children":2771},{"id":2770},"引言调试的痛与-ai-的解药",[2772],{"type":31,"value":2773},"引言：调试的痛与 AI 的解药",{"type":26,"tag":27,"props":2775,"children":2776},{},[2777],{"type":31,"value":2778},"调试是每个程序员的日常，也是最消耗时间和精力的工作之一。我们都有过这样的经历：盯着一个莫名其妙的错误信息，翻遍 Stack Overflow，尝试各种方案，几个小时后才发现是一个愚蠢的拼写错误。",{"type":26,"tag":27,"props":2780,"children":2781},{},[2782],{"type":31,"value":2783},"AI 工具的出现，正在改变调试的方式。不是替代你的思考，而是加速你的分析过程——帮你快速理解错误、缩小排查范围、验证假设。",{"type":26,"tag":27,"props":2785,"children":2786},{},[2787],{"type":31,"value":2788},"这篇文章分享我在实际项目中使用 AI 辅助调试的经验和方法论。",{"type":26,"tag":81,"props":2790,"children":2792},{"id":2791},"第一部分建立-ai-调试的思维模型",[2793],{"type":31,"value":2794},"第一部分：建立 AI 调试的思维模型",{"type":26,"tag":1087,"props":2796,"children":2798},{"id":2797},"_11-ai-在调试中的角色",[2799],{"type":31,"value":2800},"1.1 AI 在调试中的角色",{"type":26,"tag":27,"props":2802,"children":2803},{},[2804],{"type":31,"value":2805},"把 AI 想象成一个经验丰富但不了解你项目的高级工程师。它：",{"type":26,"tag":27,"props":2807,"children":2808},{},[2809],{"type":26,"tag":699,"props":2810,"children":2811},{},[2812],{"type":31,"value":2813},"擅长的事情：",{"type":26,"tag":363,"props":2815,"children":2816},{},[2817,2822,2827,2832,2837],{"type":26,"tag":213,"props":2818,"children":2819},{},[2820],{"type":31,"value":2821},"解读错误信息的含义",{"type":26,"tag":213,"props":2823,"children":2824},{},[2825],{"type":31,"value":2826},"提供可能的原因列表",{"type":26,"tag":213,"props":2828,"children":2829},{},[2830],{"type":31,"value":2831},"给出排查方向建议",{"type":26,"tag":213,"props":2833,"children":2834},{},[2835],{"type":31,"value":2836},"解释复杂的技术概念",{"type":26,"tag":213,"props":2838,"children":2839},{},[2840],{"type":31,"value":2841},"生成调试代码片段",{"type":26,"tag":27,"props":2843,"children":2844},{},[2845],{"type":26,"tag":699,"props":2846,"children":2847},{},[2848],{"type":31,"value":2849},"不擅长的事情：",{"type":26,"tag":363,"props":2851,"children":2852},{},[2853,2858,2863,2868],{"type":26,"tag":213,"props":2854,"children":2855},{},[2856],{"type":31,"value":2857},"了解你的业务逻辑",{"type":26,"tag":213,"props":2859,"children":2860},{},[2861],{"type":31,"value":2862},"知道你的代码历史",{"type":26,"tag":213,"props":2864,"children":2865},{},[2866],{"type":31,"value":2867},"理解项目特定的约定",{"type":26,"tag":213,"props":2869,"children":2870},{},[2871],{"type":31,"value":2872},"做出架构级判断",{"type":26,"tag":1087,"props":2874,"children":2876},{"id":2875},"_12-有效提问的结构",[2877],{"type":31,"value":2878},"1.2 有效提问的结构",{"type":26,"tag":2880,"props":2881,"children":2885},"pre",{"code":2882,"language":637,"meta":7,"className":2883},"## 高效的调试提问模板\n\n**问题描述**\n[简洁描述遇到的问题]\n\n**错误信息**\n",[2884],"language-markdown",[2886],{"type":26,"tag":893,"props":2887,"children":2888},{"__ignoreMap":7},[2889],{"type":31,"value":2882},{"type":26,"tag":27,"props":2891,"children":2892},{},[2893],{"type":26,"tag":2894,"props":2895,"children":2896},"span",{},[2897],{"type":31,"value":2898},"完整的错误信息，不要截断",{"type":26,"tag":2880,"props":2900,"children":2902},{"code":2901},"\n**相关代码**\n```javascript\n[精简但完整的相关代码]\n",[2903],{"type":26,"tag":893,"props":2904,"children":2905},{"__ignoreMap":7},[2906],{"type":31,"value":2901},{"type":26,"tag":27,"props":2908,"children":2909},{},[2910],{"type":26,"tag":699,"props":2911,"children":2912},{},[2913],{"type":31,"value":2914},"环境信息",{"type":26,"tag":363,"props":2916,"children":2917},{},[2918,2928,2938],{"type":26,"tag":213,"props":2919,"children":2920},{},[2921,2923],{"type":31,"value":2922},"运行环境：",{"type":26,"tag":2894,"props":2924,"children":2925},{},[2926],{"type":31,"value":2927},"Node 版本/浏览器版本",{"type":26,"tag":213,"props":2929,"children":2930},{},[2931,2933],{"type":31,"value":2932},"框架版本：",{"type":26,"tag":2894,"props":2934,"children":2935},{},[2936],{"type":31,"value":2937},"相关框架版本",{"type":26,"tag":213,"props":2939,"children":2940},{},[2941,2943],{"type":31,"value":2942},"操作系统：",{"type":26,"tag":2894,"props":2944,"children":2945},{},[2946],{"type":31,"value":2947},"如果相关",{"type":26,"tag":27,"props":2949,"children":2950},{},[2951],{"type":26,"tag":699,"props":2952,"children":2953},{},[2954],{"type":31,"value":2955},"已尝试的方案",{"type":26,"tag":363,"props":2957,"children":2958},{},[2959,2973],{"type":26,"tag":213,"props":2960,"children":2961},{},[2962,2967,2968],{"type":26,"tag":2894,"props":2963,"children":2964},{},[2965],{"type":31,"value":2966},"方案1",{"type":31,"value":1393},{"type":26,"tag":2894,"props":2969,"children":2970},{},[2971],{"type":31,"value":2972},"结果",{"type":26,"tag":213,"props":2974,"children":2975},{},[2976,2981,2982],{"type":26,"tag":2894,"props":2977,"children":2978},{},[2979],{"type":31,"value":2980},"方案2",{"type":31,"value":1393},{"type":26,"tag":2894,"props":2983,"children":2984},{},[2985],{"type":31,"value":2972},{"type":26,"tag":27,"props":2987,"children":2988},{},[2989,2994],{"type":26,"tag":699,"props":2990,"children":2991},{},[2992],{"type":31,"value":2993},"期望的结果",{"type":26,"tag":2894,"props":2995,"children":2996},{},[2997],{"type":31,"value":2998},"描述期望的行为",{"type":26,"tag":2880,"props":3000,"children":3002},{"code":3001},"\n### 1.3 分级调试策略\n\n",[3003],{"type":26,"tag":893,"props":3004,"children":3005},{"__ignoreMap":7},[3006],{"type":31,"value":3001},{"type":26,"tag":27,"props":3008,"children":3009},{},[3010],{"type":31,"value":3011},"┌───────────────────────────────────────────────────────────┐\n│                    AI 辅助调试决策树                        │\n├───────────────────────────────────────────────────────────┤\n│                                                           │\n│  Level 1：简单错误（5分钟内解决）                           │\n│  ├── 语法错误、拼写错误                                    │\n│  ├── 方法：直接复制错误信息给 AI                           │\n│  └── 工具：Copilot Chat / ChatGPT                        │\n│                                                           │\n│  Level 2：中等复杂度（30分钟内解决）                        │\n│  ├── 类型错误、逻辑错误、API 使用错误                      │\n│  ├── 方法：提供错误信息 + 相关代码 + 上下文                 │\n│  └── 工具：Cursor Chat / Claude                          │\n│                                                           │\n│  Level 3：复杂问题（需要深入分析）                          │\n│  ├── 竞态条件、内存泄漏、性能问题                          │\n│  ├── 方法：详细描述场景 + 提供多个文件 + 讨论               │\n│  └── 工具：Cursor Composer / 专门的 AI 会话                │\n│                                                           │\n│  Level 4：架构级问题                                       │\n│  ├── 设计缺陷、技术债务                                    │\n│  ├── 方法：AI 辅助分析 + 人工判断                          │\n│  └── 工具：与团队讨论 + AI 作为顾问                        │\n│                                                           │\n└───────────────────────────────────────────────────────────┘",{"type":26,"tag":2880,"props":3013,"children":3015},{"code":3014},"\n## 第二部分：错误信息分析\n\n### 2.1 前端错误分析\n\n**场景 1：React 错误边界触发**\n\n```typescript\n// 错误信息：\n// Error: Hydration failed because the initial UI does not match \n// what was rendered on the server.\n\n// 提问方式：\n/**\n * 我在 Next.js 14 App Router 项目中遇到这个错误：\n * \n * Error: Hydration failed because the initial UI does not match \n * what was rendered on the server.\n * \n * 相关代码：\n */\nfunction UserStatus() {\n  const [isLoggedIn, setIsLoggedIn] = useState(false);\n  \n  useEffect(() => {\n    setIsLoggedIn(localStorage.getItem('token') !== null);\n  }, []);\n  \n  return \u003Cdiv>{isLoggedIn ? '已登录' : '未登录'}\u003C/div>;\n}\n\n// AI 会分析出：\n// 1. 服务端渲染时 localStorage 不可用，默认 false\n// 2. 客户端 hydration 时可能是 true\n// 3. 导致服务端和客户端渲染结果不一致\n\n// AI 建议的解决方案：\nfunction UserStatus() {\n  const [isLoggedIn, setIsLoggedIn] = useState\u003Cboolean | null>(null);\n  \n  useEffect(() => {\n    setIsLoggedIn(localStorage.getItem('token') !== null);\n  }, []);\n  \n  // 初始状态显示加载中，避免 hydration 不匹配\n  if (isLoggedIn === null) {\n    return \u003Cdiv>加载中...\u003C/div>;\n  }\n  \n  return \u003Cdiv>{isLoggedIn ? '已登录' : '未登录'}\u003C/div>;\n}\n",[3016],{"type":26,"tag":893,"props":3017,"children":3018},{"__ignoreMap":7},[3019],{"type":31,"value":3014},{"type":26,"tag":27,"props":3021,"children":3022},{},[3023],{"type":26,"tag":699,"props":3024,"children":3025},{},[3026],{"type":31,"value":3027},"场景 2：Vue 响应式警告",{"type":26,"tag":2880,"props":3029,"children":3034},{"code":3030,"language":3031,"meta":7,"className":3032},"// 警告信息：\n// [Vue warn]: Property \"xxx\" was accessed during render but is not \n// defined on instance.\n\n// 提问方式：\n/**\n * Vue 3 项目中出现这个警告：\n * [Vue warn]: Property \"userInfo\" was accessed during render \n * but is not defined on instance.\n * \n * 组件代码：\n */\n\u003Ctemplate>\n  \u003Cdiv>{{ userInfo.name }}\u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { data: userInfo } = await useFetch('/api/user');\n\u003C/script>\n\n// AI 分析：\n// 1. useFetch 是异步的，初始渲染时 userInfo 可能是 undefined\n// 2. 直接访问 userInfo.name 会报错\n\n// AI 建议：\n\u003Ctemplate>\n  \u003Cdiv v-if=\"userInfo\">{{ userInfo.name }}\u003C/div>\n  \u003Cdiv v-else>加载中...\u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst { data: userInfo, pending } = await useFetch('/api/user');\n\u003C/script>\n","typescript",[3033],"language-typescript",[3035],{"type":26,"tag":893,"props":3036,"children":3037},{"__ignoreMap":7},[3038],{"type":31,"value":3030},{"type":26,"tag":1087,"props":3040,"children":3042},{"id":3041},"_22-后端错误分析",[3043],{"type":31,"value":3044},"2.2 后端错误分析",{"type":26,"tag":27,"props":3046,"children":3047},{},[3048],{"type":26,"tag":699,"props":3049,"children":3050},{},[3051],{"type":31,"value":3052},"场景 1：Node.js 内存问题",{"type":26,"tag":2880,"props":3054,"children":3059},{"code":3055,"language":3056,"meta":7,"className":3057},"// 错误信息：\n// FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - \n// JavaScript heap out of memory\n\n// 提问方式（包含上下文）：\n/**\n * Node.js 服务运行几小时后崩溃，错误信息：\n * FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - \n * JavaScript heap out of memory\n * \n * 服务功能：处理 CSV 文件上传，每次约 100MB\n * \n * 处理代码：\n */\nasync function processCSV(filePath) {\n  const content = fs.readFileSync(filePath, 'utf-8');\n  const rows = content.split('\\n');\n  const results = [];\n  \n  for (const row of rows) {\n    const processed = await processRow(row);\n    results.push(processed);\n  }\n  \n  return results;\n}\n\n// AI 分析会指出：\n// 1. 一次性读取整个文件到内存\n// 2. 所有处理结果累积在 results 数组\n// 3. 建议使用流式处理\n\n// AI 提供的优化方案：\nconst { createReadStream } = require('fs');\nconst { createInterface } = require('readline');\n\nasync function processCSVStream(filePath, onRow) {\n  const fileStream = createReadStream(filePath);\n  const rl = createInterface({\n    input: fileStream,\n    crlfDelay: Infinity\n  });\n  \n  let count = 0;\n  for await (const line of rl) {\n    await onRow(line);\n    count++;\n    \n    // 每处理 1000 行，给 GC 机会运行\n    if (count % 1000 === 0) {\n      await new Promise(r => setImmediate(r));\n    }\n  }\n}\n","javascript",[3058],"language-javascript",[3060],{"type":26,"tag":893,"props":3061,"children":3062},{"__ignoreMap":7},[3063],{"type":31,"value":3055},{"type":26,"tag":27,"props":3065,"children":3066},{},[3067],{"type":26,"tag":699,"props":3068,"children":3069},{},[3070],{"type":31,"value":3071},"场景 2：数据库连接问题",{"type":26,"tag":2880,"props":3073,"children":3076},{"code":3074,"language":3031,"meta":7,"className":3075},"// 错误信息：\n// Error: Connection pool exhausted - \n// max connections (10) already in use\n\n// 提问方式：\n/**\n * PostgreSQL 连接池耗尽错误，高并发时出现：\n * Error: Connection pool exhausted\n * \n * 当前配置：\n * - max connections: 10\n * - 并发请求: 约 100/秒\n * \n * 数据库调用代码：\n */\nasync function getUserData(userId: string) {\n  const client = await pool.connect();\n  try {\n    const user = await client.query('SELECT * FROM users WHERE id = $1', [userId]);\n    const orders = await client.query('SELECT * FROM orders WHERE user_id = $1', [userId]);\n    const payments = await client.query('SELECT * FROM payments WHERE user_id = $1', [userId]);\n    return { user: user.rows[0], orders: orders.rows, payments: payments.rows };\n  } finally {\n    client.release();\n  }\n}\n\n// AI 会分析出多个可能原因并给出综合方案\n",[3033],[3077],{"type":26,"tag":893,"props":3078,"children":3079},{"__ignoreMap":7},[3080],{"type":31,"value":3074},{"type":26,"tag":81,"props":3082,"children":3084},{"id":3083},"第三部分日志分析与问题定位",[3085],{"type":31,"value":3086},"第三部分：日志分析与问题定位",{"type":26,"tag":1087,"props":3088,"children":3090},{"id":3089},"_31-结构化日志分析",[3091],{"type":31,"value":3092},"3.1 结构化日志分析",{"type":26,"tag":27,"props":3094,"children":3095},{},[3096],{"type":31,"value":3097},"当面对大量日志时，让 AI 帮你快速定位问题：",{"type":26,"tag":2880,"props":3099,"children":3102},{"code":3100,"language":3056,"meta":7,"className":3101},"// 提问示例：\n/**\n * 分析以下日志，找出导致请求失败的原因：\n * \n * 日志片段：\n */\nconst logs = `\n2024-01-15 10:23:45.123 INFO  [req-abc123] 收到请求 POST /api/order\n2024-01-15 10:23:45.125 DEBUG [req-abc123] 用户认证通过 userId=u001\n2024-01-15 10:23:45.130 DEBUG [req-abc123] 开始库存检查 productId=p001\n2024-01-15 10:23:45.145 DEBUG [req-abc123] 库存检查通过 available=50\n2024-01-15 10:23:45.150 DEBUG [req-abc123] 开始创建订单\n2024-01-15 10:23:45.200 DEBUG [req-abc123] 数据库连接获取成功\n2024-01-15 10:23:45.250 ERROR [req-abc123] 订单创建失败 error=\"deadlock detected\"\n2024-01-15 10:23:45.251 WARN  [req-abc123] 事务回滚\n2024-01-15 10:23:45.255 INFO  [req-abc123] 响应 500 耗时 132ms\n`;\n\n// AI 分析结果会包括：\n// 1. 问题定位：数据库死锁\n// 2. 可能原因：并发订单创建导致锁竞争\n// 3. 排查建议：检查事务隔离级别、锁顺序\n",[3058],[3103],{"type":26,"tag":893,"props":3104,"children":3105},{"__ignoreMap":7},[3106],{"type":31,"value":3100},{"type":26,"tag":1087,"props":3108,"children":3110},{"id":3109},"_32-创建调试日志",[3111],{"type":31,"value":3112},"3.2 创建调试日志",{"type":26,"tag":27,"props":3114,"children":3115},{},[3116],{"type":31,"value":3117},"让 AI 帮你生成调试用的日志代码：",{"type":26,"tag":2880,"props":3119,"children":3122},{"code":3120,"language":3031,"meta":7,"className":3121},"// 请求：\n// \"为这个函数添加详细的调试日志，包括入参、关键步骤、耗时和结果\"\n\n// 原代码：\nasync function processOrder(order: Order): Promise\u003COrderResult> {\n  const inventory = await checkInventory(order.items);\n  const payment = await processPayment(order.userId, order.total);\n  const result = await createOrder(order, payment.transactionId);\n  return result;\n}\n\n// AI 生成的带日志版本：\nasync function processOrder(order: Order): Promise\u003COrderResult> {\n  const requestId = generateRequestId();\n  const startTime = performance.now();\n  \n  logger.info({\n    requestId,\n    event: 'order_processing_start',\n    orderId: order.id,\n    userId: order.userId,\n    itemCount: order.items.length,\n    total: order.total\n  });\n  \n  try {\n    // 库存检查\n    const inventoryStart = performance.now();\n    const inventory = await checkInventory(order.items);\n    logger.debug({\n      requestId,\n      event: 'inventory_check_complete',\n      duration: performance.now() - inventoryStart,\n      available: inventory.allAvailable\n    });\n    \n    // 支付处理\n    const paymentStart = performance.now();\n    const payment = await processPayment(order.userId, order.total);\n    logger.debug({\n      requestId,\n      event: 'payment_complete',\n      duration: performance.now() - paymentStart,\n      transactionId: payment.transactionId\n    });\n    \n    // 创建订单\n    const createStart = performance.now();\n    const result = await createOrder(order, payment.transactionId);\n    logger.debug({\n      requestId,\n      event: 'order_created',\n      duration: performance.now() - createStart,\n      resultOrderId: result.orderId\n    });\n    \n    logger.info({\n      requestId,\n      event: 'order_processing_complete',\n      duration: performance.now() - startTime,\n      success: true\n    });\n    \n    return result;\n  } catch (error) {\n    logger.error({\n      requestId,\n      event: 'order_processing_failed',\n      duration: performance.now() - startTime,\n      error: error.message,\n      stack: error.stack\n    });\n    throw error;\n  }\n}\n",[3033],[3123],{"type":26,"tag":893,"props":3124,"children":3125},{"__ignoreMap":7},[3126],{"type":31,"value":3120},{"type":26,"tag":81,"props":3128,"children":3130},{"id":3129},"第四部分性能问题排查",[3131],{"type":31,"value":3132},"第四部分：性能问题排查",{"type":26,"tag":1087,"props":3134,"children":3136},{"id":3135},"_41-前端性能分析",[3137],{"type":31,"value":3138},"4.1 前端性能分析",{"type":26,"tag":2880,"props":3140,"children":3143},{"code":3141,"language":3031,"meta":7,"className":3142},"// 场景：页面加载慢，需要分析原因\n\n// 提问方式：\n/**\n * 页面首屏加载需要 5 秒，以下是 Performance API 数据，\n * 请分析性能瓶颈：\n */\nconst performanceData = {\n  // Navigation Timing\n  dns: 50,           // DNS 查询\n  tcp: 100,          // TCP 连接\n  ttfb: 800,         // 首字节时间\n  download: 200,     // 文档下载\n  domParsing: 300,   // DOM 解析\n  domContentLoaded: 1500,\n  load: 5000,\n  \n  // Resource Timing (主要资源)\n  resources: [\n    { name: 'main.js', size: '2.5MB', duration: 1200 },\n    { name: 'vendor.js', size: '1.8MB', duration: 900 },\n    { name: 'styles.css', size: '500KB', duration: 300 },\n    { name: 'hero-image.jpg', size: '3MB', duration: 1500 },\n  ],\n  \n  // Long Tasks\n  longTasks: [\n    { startTime: 1600, duration: 800, name: 'script-evaluation' },\n    { startTime: 2500, duration: 400, name: 'layout' }\n  ]\n};\n\n// AI 会分析出：\n// 1. JS bundle 过大（4.3MB），需要代码分割\n// 2. 图片未优化（3MB 的 hero 图片）\n// 3. 存在长任务阻塞主线程\n// 并给出具体优化建议\n",[3033],[3144],{"type":26,"tag":893,"props":3145,"children":3146},{"__ignoreMap":7},[3147],{"type":31,"value":3141},{"type":26,"tag":1087,"props":3149,"children":3151},{"id":3150},"_42-内存泄漏排查",[3152],{"type":31,"value":3153},"4.2 内存泄漏排查",{"type":26,"tag":2880,"props":3155,"children":3158},{"code":3156,"language":3031,"meta":7,"className":3157},"// 场景：应用运行一段时间后变卡\n\n// 提问方式：\n/**\n * React 应用运行一段时间后内存持续增长，以下是 Heap Snapshot 对比：\n * \n * 初始状态：50MB\n * 运行 1 小时后：150MB\n * 运行 2 小时后：280MB\n * \n * Retained objects 增长最快的：\n * - (closure) - 增长 50MB\n * - HTMLDivElement - 增长 30MB\n * - Array - 增长 20MB\n * \n * 可疑代码：\n */\nfunction DataDashboard() {\n  const [data, setData] = useState([]);\n  const chartRef = useRef(null);\n  \n  useEffect(() => {\n    // 每秒刷新数据\n    const interval = setInterval(async () => {\n      const newData = await fetchLatestData();\n      setData(prev => [...prev, ...newData]);  // 数据不断累积\n    }, 1000);\n    \n    // 初始化图表\n    const chart = new Chart(chartRef.current, {\n      // 配置...\n    });\n    \n    // 没有 cleanup！\n  }, []);\n  \n  return \u003Ccanvas ref={chartRef} />;\n}\n\n// AI 会指出：\n// 1. interval 没有清理\n// 2. Chart 实例没有销毁\n// 3. data 无限增长\n// 并提供修复代码\n",[3033],[3159],{"type":26,"tag":893,"props":3160,"children":3161},{"__ignoreMap":7},[3162],{"type":31,"value":3156},{"type":26,"tag":1087,"props":3164,"children":3166},{"id":3165},"_43-数据库查询优化",[3167],{"type":31,"value":3168},"4.3 数据库查询优化",{"type":26,"tag":2880,"props":3170,"children":3175},{"code":3171,"language":3172,"meta":7,"className":3173},"-- 场景：查询很慢，让 AI 分析执行计划\n\n-- 提问方式：\n-- 以下查询在数据量大时很慢（orders 表 1000 万行），\n-- 执行计划如下，请分析并优化：\n\nEXPLAIN ANALYZE\nSELECT o.*, u.name, u.email\nFROM orders o\nJOIN users u ON o.user_id = u.id\nWHERE o.status = 'pending'\n  AND o.created_at > '2024-01-01'\nORDER BY o.created_at DESC\nLIMIT 20;\n\n-- 执行计划：\n/*\nSort  (cost=156847.23..157847.23 rows=400000 width=250)\n  Sort Key: o.created_at DESC\n  ->  Hash Join  (cost=1500.00..89847.23 rows=400000 width=250)\n        Hash Cond: (o.user_id = u.id)\n        ->  Seq Scan on orders o  (cost=0.00..85000.00 rows=400000)\n              Filter: ((status = 'pending') AND (created_at > '2024-01-01'))\n        ->  Hash  (cost=1000.00..1000.00 rows=50000 width=100)\n              ->  Seq Scan on users u  (cost=0.00..1000.00 rows=50000)\nPlanning Time: 0.5 ms\nExecution Time: 3500 ms\n*/\n\n-- AI 会分析出问题并建议：\n-- 1. orders 表全表扫描 - 需要复合索引\n-- 2. 建议创建索引：\nCREATE INDEX idx_orders_status_created ON orders(status, created_at DESC);\n\n-- 3. 如果 status 选择性不高，考虑部分索引：\nCREATE INDEX idx_orders_pending ON orders(created_at DESC) \nWHERE status = 'pending';\n","sql",[3174],"language-sql",[3176],{"type":26,"tag":893,"props":3177,"children":3178},{"__ignoreMap":7},[3179],{"type":31,"value":3171},{"type":26,"tag":81,"props":3181,"children":3183},{"id":3182},"第五部分复杂-bug-排查",[3184],{"type":31,"value":3185},"第五部分：复杂 Bug 排查",{"type":26,"tag":1087,"props":3187,"children":3189},{"id":3188},"_51-竞态条件",[3190],{"type":31,"value":3191},"5.1 竞态条件",{"type":26,"tag":2880,"props":3193,"children":3196},{"code":3194,"language":3031,"meta":7,"className":3195},"// 场景：偶发的数据不一致问题\n\n// 提问方式：\n/**\n * 用户反馈偶尔看到错误的账户余额，但刷新后正常。\n * 怀疑是竞态条件，以下是相关代码：\n */\nasync function updateBalance(userId: string, amount: number) {\n  // 读取当前余额\n  const user = await db.users.findOne({ id: userId });\n  const newBalance = user.balance + amount;\n  \n  // 更新余额\n  await db.users.update({ id: userId }, { balance: newBalance });\n  \n  // 记录交易\n  await db.transactions.create({\n    userId,\n    amount,\n    balanceAfter: newBalance,\n    createdAt: new Date()\n  });\n  \n  return newBalance;\n}\n\n// 并发调用场景：\n// 用户同时发起两笔交易：+100 和 -50\n// 期望结果：原余额 1000 → 1050\n// 实际可能：原余额 1000 → 1100 或 950\n\n// AI 会分析竞态条件并提供解决方案：\nasync function updateBalanceAtomic(userId: string, amount: number) {\n  // 方案 1：使用数据库原子操作\n  const result = await db.users.findOneAndUpdate(\n    { id: userId },\n    { $inc: { balance: amount } },\n    { returnDocument: 'after' }\n  );\n  \n  await db.transactions.create({\n    userId,\n    amount,\n    balanceAfter: result.balance,\n    createdAt: new Date()\n  });\n  \n  return result.balance;\n}\n\n// 方案 2：使用乐观锁\nasync function updateBalanceOptimistic(userId: string, amount: number) {\n  const maxRetries = 3;\n  \n  for (let i = 0; i \u003C maxRetries; i++) {\n    const user = await db.users.findOne({ id: userId });\n    const newBalance = user.balance + amount;\n    \n    const updated = await db.users.updateOne(\n      { id: userId, version: user.version },\n      { balance: newBalance, version: user.version + 1 }\n    );\n    \n    if (updated.modifiedCount === 1) {\n      await db.transactions.create({...});\n      return newBalance;\n    }\n    \n    // 版本冲突，重试\n    await sleep(10 * (i + 1));\n  }\n  \n  throw new Error('Update failed after retries');\n}\n",[3033],[3197],{"type":26,"tag":893,"props":3198,"children":3199},{"__ignoreMap":7},[3200],{"type":31,"value":3194},{"type":26,"tag":1087,"props":3202,"children":3204},{"id":3203},"_52-分布式系统问题",[3205],{"type":31,"value":3206},"5.2 分布式系统问题",{"type":26,"tag":2880,"props":3208,"children":3211},{"code":3209,"language":3031,"meta":7,"className":3210},"// 场景：微服务间的数据不一致\n\n// 提问方式：\n/**\n * 订单服务和库存服务偶尔出现数据不一致：\n * - 订单显示已创建\n * - 库存未扣减\n * \n * 当前流程：\n */\n// Order Service\nasync function createOrder(orderData) {\n  // 1. 调用库存服务扣减库存\n  await inventoryService.deduct(orderData.items);\n  \n  // 2. 创建订单\n  const order = await orderRepository.create(orderData);\n  \n  // 3. 发送订单创建事件\n  await eventBus.publish('order.created', order);\n  \n  return order;\n}\n\n// 问题分析：如果步骤 2 或 3 失败，库存已经扣减但订单未创建\n\n// AI 会建议使用 Saga 模式或事务发件箱模式\n",[3033],[3212],{"type":26,"tag":893,"props":3213,"children":3214},{"__ignoreMap":7},[3215],{"type":31,"value":3209},{"type":26,"tag":81,"props":3217,"children":3219},{"id":3218},"第六部分ai-调试工作流",[3220],{"type":31,"value":3221},"第六部分：AI 调试工作流",{"type":26,"tag":1087,"props":3223,"children":3225},{"id":3224},"_61-我的调试流程",[3226],{"type":31,"value":3227},"6.1 我的调试流程",{"type":26,"tag":2880,"props":3229,"children":3231},{"code":3230},"┌────────────────────────────────────────────────────────────┐\n│                    AI 辅助调试工作流                         │\n├────────────────────────────────────────────────────────────┤\n│                                                            │\n│  Step 1: 问题收集                                          │\n│  ├── 复制完整错误信息                                       │\n│  ├── 截图相关日志                                          │\n│  └── 记录复现步骤                                          │\n│                                                            │\n│  Step 2: 快速分析                                          │\n│  ├── 将错误信息发给 AI                                      │\n│  ├── 获取可能原因列表                                       │\n│  └── 评估哪些最可能                                         │\n│                                                            │\n│  Step 3: 深入调查                                          │\n│  ├── 根据 AI 建议添加日志/断点                              │\n│  ├── 收集更多信息                                          │\n│  └── 再次询问 AI（带新信息）                                │\n│                                                            │\n│  Step 4: 验证修复                                          │\n│  ├── AI 生成修复代码                                        │\n│  ├── 人工审查确认                                          │\n│  └── 测试验证                                               │\n│                                                            │\n│  Step 5: 预防措施                                          │\n│  ├── AI 建议类似问题的预防方法                              │\n│  ├── 添加相关测试用例                                       │\n│  └── 更新文档/知识库                                        │\n│                                                            │\n└────────────────────────────────────────────────────────────┘\n",[3232],{"type":26,"tag":893,"props":3233,"children":3234},{"__ignoreMap":7},[3235],{"type":31,"value":3230},{"type":26,"tag":1087,"props":3237,"children":3239},{"id":3238},"_62-调试对话模板",[3240],{"type":31,"value":3241},"6.2 调试对话模板",{"type":26,"tag":2880,"props":3243,"children":3246},{"code":3244,"language":637,"meta":7,"className":3245},"## 第一轮：问题描述\n\n我遇到了一个问题：[简述问题]\n\n错误信息：\n",[2884],[3247],{"type":26,"tag":893,"props":3248,"children":3249},{"__ignoreMap":7},[3250],{"type":31,"value":3244},{"type":26,"tag":27,"props":3252,"children":3253},{},[3254],{"type":26,"tag":2894,"props":3255,"children":3256},{},[3257],{"type":31,"value":3258},"粘贴完整错误",{"type":26,"tag":2880,"props":3260,"children":3262},{"code":3261},"\n相关代码：\n```javascript\n[粘贴代码]\n",[3263],{"type":26,"tag":893,"props":3264,"children":3265},{"__ignoreMap":7},[3266],{"type":31,"value":3261},{"type":26,"tag":760,"props":3268,"children":3269},{},[],{"type":26,"tag":81,"props":3271,"children":3273},{"id":3272},"第二轮补充信息",[3274],{"type":31,"value":3275},"第二轮：补充信息",{"type":26,"tag":27,"props":3277,"children":3278},{},[3279],{"type":31,"value":3280},"根据你的建议，我添加了日志，发现：",{"type":26,"tag":363,"props":3282,"children":3283},{},[3284,3292],{"type":26,"tag":213,"props":3285,"children":3286},{},[3287],{"type":26,"tag":2894,"props":3288,"children":3289},{},[3290],{"type":31,"value":3291},"发现 1",{"type":26,"tag":213,"props":3293,"children":3294},{},[3295],{"type":26,"tag":2894,"props":3296,"children":3297},{},[3298],{"type":31,"value":3299},"发现 2",{"type":26,"tag":27,"props":3301,"children":3302},{},[3303,3305,3310],{"type":31,"value":3304},"这是否说明问题出在 ",{"type":26,"tag":2894,"props":3306,"children":3307},{},[3308],{"type":31,"value":3309},"你的猜测",{"type":31,"value":3311},"？",{"type":26,"tag":760,"props":3313,"children":3314},{},[],{"type":26,"tag":81,"props":3316,"children":3318},{"id":3317},"第三轮确认修复",[3319],{"type":31,"value":3320},"第三轮：确认修复",{"type":26,"tag":27,"props":3322,"children":3323},{},[3324],{"type":31,"value":3325},"我按照你的建议修改了代码：",{"type":26,"tag":2880,"props":3327,"children":3330},{"code":3328,"language":3056,"meta":7,"className":3329},"[粘贴修改后的代码]\n",[3058],[3331],{"type":26,"tag":893,"props":3332,"children":3333},{"__ignoreMap":7},[3334],{"type":31,"value":3328},{"type":26,"tag":27,"props":3336,"children":3337},{},[3338],{"type":31,"value":3339},"请确认这个修复是否正确，以及是否有其他潜在问题。",{"type":26,"tag":760,"props":3341,"children":3342},{},[],{"type":26,"tag":81,"props":3344,"children":3346},{"id":3345},"第四轮预防",[3347],{"type":31,"value":3348},"第四轮：预防",{"type":26,"tag":27,"props":3350,"children":3351},{},[3352],{"type":31,"value":3353},"这个问题已解决。请建议：",{"type":26,"tag":209,"props":3355,"children":3356},{},[3357,3362,3367],{"type":26,"tag":213,"props":3358,"children":3359},{},[3360],{"type":31,"value":3361},"如何防止类似问题再次发生？",{"type":26,"tag":213,"props":3363,"children":3364},{},[3365],{"type":31,"value":3366},"应该添加什么测试用例？",{"type":26,"tag":213,"props":3368,"children":3369},{},[3370],{"type":31,"value":3371},"有什么最佳实践可以参考？",{"type":26,"tag":2880,"props":3373,"children":3375},{"code":3374},"\n## 结语：AI 是放大器，不是替代品\n\nAI 调试工具能够显著加速问题排查过程，但它不能替代你的思考。最有价值的能力组合是：\n\n- **你的领域知识** + **AI 的广博见识**\n- **你对项目的理解** + **AI 的分析能力**\n- **你的判断力** + **AI 的执行速度**\n\n调试的本质是假设-验证的循环。AI 帮你更快地生成假设、更高效地验证假设，但做出最终判断的还是你。\n\n学会与 AI 高效协作调试，不是依赖 AI 给你答案，而是让 AI 帮你更快地找到自己的答案。\n\n---\n\n## 参考资源\n\n- [Chrome DevTools 官方文档](https://developer.chrome.com/docs/devtools)\n- [Node.js 调试指南](https://nodejs.org/en/docs/guides/debugging-getting-started)\n- [React DevTools 使用指南](https://react.dev/learn/react-developer-tools)\n",[3376],{"type":26,"tag":893,"props":3377,"children":3378},{"__ignoreMap":7},[3379],{"type":31,"value":3374},{"title":7,"searchDepth":626,"depth":626,"links":3381},[3382,3383,3384,3389,3393,3398,3402,3406,3407,3408],{"id":2764,"depth":629,"text":2767},{"id":2770,"depth":629,"text":2773},{"id":2791,"depth":629,"text":2794,"children":3385},[3386,3387,3388],{"id":2797,"depth":626,"text":2800},{"id":2875,"depth":626,"text":2878},{"id":3041,"depth":626,"text":3044},{"id":3083,"depth":629,"text":3086,"children":3390},[3391,3392],{"id":3089,"depth":626,"text":3092},{"id":3109,"depth":626,"text":3112},{"id":3129,"depth":629,"text":3132,"children":3394},[3395,3396,3397],{"id":3135,"depth":626,"text":3138},{"id":3150,"depth":626,"text":3153},{"id":3165,"depth":626,"text":3168},{"id":3182,"depth":629,"text":3185,"children":3399},[3400,3401],{"id":3188,"depth":626,"text":3191},{"id":3203,"depth":626,"text":3206},{"id":3218,"depth":629,"text":3221,"children":3403},[3404,3405],{"id":3224,"depth":626,"text":3227},{"id":3238,"depth":626,"text":3241},{"id":3272,"depth":629,"text":3275},{"id":3317,"depth":629,"text":3320},{"id":3345,"depth":629,"text":3348},"content:topics:ai:ai-debugging-troubleshooting-guide.md","topics/ai/ai-debugging-troubleshooting-guide.md","topics/ai/ai-debugging-troubleshooting-guide",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"topic":5,"author":11,"tags":3413,"image":17,"imageQuery":18,"pexelsPhotoId":19,"pexelsUrl":20,"featured":6,"readingTime":21,"body":3414,"_type":637,"_id":638,"_source":639,"_file":640,"_stem":641,"_extension":642},[13,14,15,16],{"type":23,"children":3415,"toc":3897},[3416,3420,3424,3428,3452,3456,3540,3544,3548,3552,3575,3579,3583,3587,3662,3666,3670,3674,3678,3693,3697,3701,3705,3709,3713,3717,3721,3790,3794,3798,3802,3806,3810,3862,3866],{"type":26,"tag":27,"props":3417,"children":3418},{},[3419],{"type":31,"value":32},{"type":26,"tag":27,"props":3421,"children":3422},{},[3423],{"type":31,"value":37},{"type":26,"tag":27,"props":3425,"children":3426},{},[3427],{"type":31,"value":42},{"type":26,"tag":27,"props":3429,"children":3430},{},[3431,3432,3436,3437,3441,3442,3446,3447,3451],{"type":31,"value":47},{"type":26,"tag":49,"props":3433,"children":3434},{"href":51},[3435],{"type":31,"value":54},{"type":31,"value":56},{"type":26,"tag":49,"props":3438,"children":3439},{"href":59},[3440],{"type":31,"value":62},{"type":31,"value":56},{"type":26,"tag":49,"props":3443,"children":3444},{"href":66},[3445],{"type":31,"value":69},{"type":31,"value":71},{"type":26,"tag":49,"props":3448,"children":3449},{"href":74},[3450],{"type":31,"value":77},{"type":31,"value":79},{"type":26,"tag":81,"props":3453,"children":3454},{"id":83},[3455],{"type":31,"value":86},{"type":26,"tag":88,"props":3457,"children":3458},{},[3459,3477],{"type":26,"tag":92,"props":3460,"children":3461},{},[3462],{"type":26,"tag":96,"props":3463,"children":3464},{},[3465,3469,3473],{"type":26,"tag":100,"props":3466,"children":3467},{},[3468],{"type":31,"value":104},{"type":26,"tag":100,"props":3470,"children":3471},{},[3472],{"type":31,"value":109},{"type":26,"tag":100,"props":3474,"children":3475},{},[3476],{"type":31,"value":114},{"type":26,"tag":116,"props":3478,"children":3479},{},[3480,3495,3510,3525],{"type":26,"tag":96,"props":3481,"children":3482},{},[3483,3487,3491],{"type":26,"tag":123,"props":3484,"children":3485},{},[3486],{"type":31,"value":127},{"type":26,"tag":123,"props":3488,"children":3489},{},[3490],{"type":31,"value":132},{"type":26,"tag":123,"props":3492,"children":3493},{},[3494],{"type":31,"value":137},{"type":26,"tag":96,"props":3496,"children":3497},{},[3498,3502,3506],{"type":26,"tag":123,"props":3499,"children":3500},{},[3501],{"type":31,"value":145},{"type":26,"tag":123,"props":3503,"children":3504},{},[3505],{"type":31,"value":150},{"type":26,"tag":123,"props":3507,"children":3508},{},[3509],{"type":31,"value":155},{"type":26,"tag":96,"props":3511,"children":3512},{},[3513,3517,3521],{"type":26,"tag":123,"props":3514,"children":3515},{},[3516],{"type":31,"value":163},{"type":26,"tag":123,"props":3518,"children":3519},{},[3520],{"type":31,"value":168},{"type":26,"tag":123,"props":3522,"children":3523},{},[3524],{"type":31,"value":173},{"type":26,"tag":96,"props":3526,"children":3527},{},[3528,3532,3536],{"type":26,"tag":123,"props":3529,"children":3530},{},[3531],{"type":31,"value":181},{"type":26,"tag":123,"props":3533,"children":3534},{},[3535],{"type":31,"value":186},{"type":26,"tag":123,"props":3537,"children":3538},{},[3539],{"type":31,"value":191},{"type":26,"tag":27,"props":3541,"children":3542},{},[3543],{"type":31,"value":196},{"type":26,"tag":81,"props":3545,"children":3546},{"id":199},[3547],{"type":31,"value":202},{"type":26,"tag":27,"props":3549,"children":3550},{},[3551],{"type":31,"value":207},{"type":26,"tag":209,"props":3553,"children":3554},{},[3555,3559,3563,3567,3571],{"type":26,"tag":213,"props":3556,"children":3557},{},[3558],{"type":31,"value":217},{"type":26,"tag":213,"props":3560,"children":3561},{},[3562],{"type":31,"value":222},{"type":26,"tag":213,"props":3564,"children":3565},{},[3566],{"type":31,"value":227},{"type":26,"tag":213,"props":3568,"children":3569},{},[3570],{"type":31,"value":232},{"type":26,"tag":213,"props":3572,"children":3573},{},[3574],{"type":31,"value":237},{"type":26,"tag":27,"props":3576,"children":3577},{},[3578],{"type":31,"value":242},{"type":26,"tag":81,"props":3580,"children":3581},{"id":245},[3582],{"type":31,"value":248},{"type":26,"tag":27,"props":3584,"children":3585},{},[3586],{"type":31,"value":253},{"type":26,"tag":88,"props":3588,"children":3589},{},[3590,3604],{"type":26,"tag":92,"props":3591,"children":3592},{},[3593],{"type":26,"tag":96,"props":3594,"children":3595},{},[3596,3600],{"type":26,"tag":100,"props":3597,"children":3598},{},[3599],{"type":31,"value":267},{"type":26,"tag":100,"props":3601,"children":3602},{},[3603],{"type":31,"value":272},{"type":26,"tag":116,"props":3605,"children":3606},{},[3607,3618,3629,3640,3651],{"type":26,"tag":96,"props":3608,"children":3609},{},[3610,3614],{"type":26,"tag":123,"props":3611,"children":3612},{},[3613],{"type":31,"value":283},{"type":26,"tag":123,"props":3615,"children":3616},{},[3617],{"type":31,"value":288},{"type":26,"tag":96,"props":3619,"children":3620},{},[3621,3625],{"type":26,"tag":123,"props":3622,"children":3623},{},[3624],{"type":31,"value":296},{"type":26,"tag":123,"props":3626,"children":3627},{},[3628],{"type":31,"value":301},{"type":26,"tag":96,"props":3630,"children":3631},{},[3632,3636],{"type":26,"tag":123,"props":3633,"children":3634},{},[3635],{"type":31,"value":309},{"type":26,"tag":123,"props":3637,"children":3638},{},[3639],{"type":31,"value":314},{"type":26,"tag":96,"props":3641,"children":3642},{},[3643,3647],{"type":26,"tag":123,"props":3644,"children":3645},{},[3646],{"type":31,"value":322},{"type":26,"tag":123,"props":3648,"children":3649},{},[3650],{"type":31,"value":327},{"type":26,"tag":96,"props":3652,"children":3653},{},[3654,3658],{"type":26,"tag":123,"props":3655,"children":3656},{},[3657],{"type":31,"value":335},{"type":26,"tag":123,"props":3659,"children":3660},{},[3661],{"type":31,"value":340},{"type":26,"tag":27,"props":3663,"children":3664},{},[3665],{"type":31,"value":345},{"type":26,"tag":81,"props":3667,"children":3668},{"id":348},[3669],{"type":31,"value":351},{"type":26,"tag":27,"props":3671,"children":3672},{},[3673],{"type":31,"value":356},{"type":26,"tag":27,"props":3675,"children":3676},{},[3677],{"type":31,"value":361},{"type":26,"tag":363,"props":3679,"children":3680},{},[3681,3685,3689],{"type":26,"tag":213,"props":3682,"children":3683},{},[3684],{"type":31,"value":370},{"type":26,"tag":213,"props":3686,"children":3687},{},[3688],{"type":31,"value":375},{"type":26,"tag":213,"props":3690,"children":3691},{},[3692],{"type":31,"value":380},{"type":26,"tag":27,"props":3694,"children":3695},{},[3696],{"type":31,"value":385},{"type":26,"tag":81,"props":3698,"children":3699},{"id":388},[3700],{"type":31,"value":391},{"type":26,"tag":27,"props":3702,"children":3703},{},[3704],{"type":31,"value":396},{"type":26,"tag":27,"props":3706,"children":3707},{},[3708],{"type":31,"value":401},{"type":26,"tag":27,"props":3710,"children":3711},{},[3712],{"type":31,"value":406},{"type":26,"tag":81,"props":3714,"children":3715},{"id":409},[3716],{"type":31,"value":412},{"type":26,"tag":27,"props":3718,"children":3719},{},[3720],{"type":31,"value":417},{"type":26,"tag":88,"props":3722,"children":3723},{},[3724,3742],{"type":26,"tag":92,"props":3725,"children":3726},{},[3727],{"type":26,"tag":96,"props":3728,"children":3729},{},[3730,3734,3738],{"type":26,"tag":100,"props":3731,"children":3732},{},[3733],{"type":31,"value":431},{"type":26,"tag":100,"props":3735,"children":3736},{},[3737],{"type":31,"value":436},{"type":26,"tag":100,"props":3739,"children":3740},{},[3741],{"type":31,"value":441},{"type":26,"tag":116,"props":3743,"children":3744},{},[3745,3760,3775],{"type":26,"tag":96,"props":3746,"children":3747},{},[3748,3752,3756],{"type":26,"tag":123,"props":3749,"children":3750},{},[3751],{"type":31,"value":452},{"type":26,"tag":123,"props":3753,"children":3754},{},[3755],{"type":31,"value":457},{"type":26,"tag":123,"props":3757,"children":3758},{},[3759],{"type":31,"value":462},{"type":26,"tag":96,"props":3761,"children":3762},{},[3763,3767,3771],{"type":26,"tag":123,"props":3764,"children":3765},{},[3766],{"type":31,"value":470},{"type":26,"tag":123,"props":3768,"children":3769},{},[3770],{"type":31,"value":475},{"type":26,"tag":123,"props":3772,"children":3773},{},[3774],{"type":31,"value":480},{"type":26,"tag":96,"props":3776,"children":3777},{},[3778,3782,3786],{"type":26,"tag":123,"props":3779,"children":3780},{},[3781],{"type":31,"value":488},{"type":26,"tag":123,"props":3783,"children":3784},{},[3785],{"type":31,"value":493},{"type":26,"tag":123,"props":3787,"children":3788},{},[3789],{"type":31,"value":498},{"type":26,"tag":27,"props":3791,"children":3792},{},[3793],{"type":31,"value":503},{"type":26,"tag":81,"props":3795,"children":3796},{"id":506},[3797],{"type":31,"value":509},{"type":26,"tag":27,"props":3799,"children":3800},{},[3801],{"type":31,"value":514},{"type":26,"tag":27,"props":3803,"children":3804},{},[3805],{"type":31,"value":519},{"type":26,"tag":81,"props":3807,"children":3808},{"id":522},[3809],{"type":31,"value":525},{"type":26,"tag":363,"props":3811,"children":3813},{"className":3812},[529],[3814,3822,3830,3838,3846,3854],{"type":26,"tag":213,"props":3815,"children":3817},{"className":3816},[534],[3818,3821],{"type":26,"tag":537,"props":3819,"children":3820},{"disabled":539,"type":540},[],{"type":31,"value":543},{"type":26,"tag":213,"props":3823,"children":3825},{"className":3824},[534],[3826,3829],{"type":26,"tag":537,"props":3827,"children":3828},{"disabled":539,"type":540},[],{"type":31,"value":552},{"type":26,"tag":213,"props":3831,"children":3833},{"className":3832},[534],[3834,3837],{"type":26,"tag":537,"props":3835,"children":3836},{"disabled":539,"type":540},[],{"type":31,"value":561},{"type":26,"tag":213,"props":3839,"children":3841},{"className":3840},[534],[3842,3845],{"type":26,"tag":537,"props":3843,"children":3844},{"disabled":539,"type":540},[],{"type":31,"value":570},{"type":26,"tag":213,"props":3847,"children":3849},{"className":3848},[534],[3850,3853],{"type":26,"tag":537,"props":3851,"children":3852},{"disabled":539,"type":540},[],{"type":31,"value":579},{"type":26,"tag":213,"props":3855,"children":3857},{"className":3856},[534],[3858,3861],{"type":26,"tag":537,"props":3859,"children":3860},{"disabled":539,"type":540},[],{"type":31,"value":588},{"type":26,"tag":27,"props":3863,"children":3864},{},[3865],{"type":31,"value":593},{"type":26,"tag":363,"props":3867,"children":3868},{},[3869,3876,3883,3890],{"type":26,"tag":213,"props":3870,"children":3871},{},[3872],{"type":26,"tag":49,"props":3873,"children":3874},{"href":51},[3875],{"type":31,"value":54},{"type":26,"tag":213,"props":3877,"children":3878},{},[3879],{"type":26,"tag":49,"props":3880,"children":3881},{"href":59},[3882],{"type":31,"value":62},{"type":26,"tag":213,"props":3884,"children":3885},{},[3886],{"type":26,"tag":49,"props":3887,"children":3888},{"href":66},[3889],{"type":31,"value":69},{"type":26,"tag":213,"props":3891,"children":3892},{},[3893],{"type":26,"tag":49,"props":3894,"children":3895},{"href":74},[3896],{"type":31,"value":77},{"title":7,"searchDepth":626,"depth":626,"links":3898},[3899,3900,3901,3902,3903,3904,3905,3906],{"id":83,"depth":629,"text":86},{"id":199,"depth":629,"text":202},{"id":245,"depth":629,"text":248},{"id":348,"depth":629,"text":351},{"id":388,"depth":629,"text":391},{"id":409,"depth":629,"text":412},{"id":506,"depth":629,"text":509},{"id":522,"depth":629,"text":525},1781081257005]