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