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