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