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