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