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