{"type":"doc","content":[{"type":"heading","attrs":{"id":"6eedf9c6-c368-4540-be36-a928a97dac61","textAlign":"inherit","indent":0,"level":1,"isHoverDragHandle":false}},{"type":"paragraph","attrs":{"id":"6d79f063-2321-4668-a249-6012a8ba2e04","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"作为一款主打“全链路 AI 开发”的国产工具,CodeBuddy 确实在效率上带来了肉眼可见的提升,但深度使用后,我发现它更像是一把需要精心驾驭的“双刃剑”。以下是近半年的真实心得与踩坑记录。"}]},{"type":"paragraph","attrs":{"id":"a9aee19d-38fb-49c8-b3df-a9bdfa657eab","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"heading","attrs":{"id":"894518dd-3f75-496d-b920-4d43110de196","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"一、效率红利:确实能打 "}]},{"type":"paragraph","attrs":{"id":"73ac9d7e-2f9b-4986-8710-632b72196638","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"1. 全栈生成能力(真香)"}]},{"type":"paragraph","attrs":{"id":"dff9edae-2b55-48a5-8fcc-c52b7432f8ab","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"54647276-a1d3-44c9-8e20-a5a702426b42","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"在快速原型(PoC)阶段,CodeBuddy 的表现堪称惊艳。通过 Plan 模式,只需描述“做一个带 JWT 鉴权的用户管理系统”,它能在几分钟内生成完整的 Spring Boot 后端、Vue 前端页面甚至 Dockerfile。对于 CRUD 类业务,它能省去 70% 的样板代码编写时间,让开发者更聚焦于业务逻辑设计。"}]},{"type":"paragraph","attrs":{"id":"f97ac1d5-b871-41c9-8833-298a1dee6c70","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"6b3b8a40-ccc3-4b87-a437-1722a2d47257","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"2. 中文语境下的“懂行”"}]},{"type":"paragraph","attrs":{"id":"88368baf-8a81-466b-8b1a-2398515766a4","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"1849535c-3eac-4259-906b-27e07bb4f283","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"相比 Copilot,CodeBuddy 对国内开发环境的理解更深。它默认熟悉阿里 Java 规范、微信小程序 API 以及国内常见的“审批流”业务逻辑,生成的代码更贴合国内团队的代码风格,减少了大量格式调整的琐事。"}]},{"type":"paragraph","attrs":{"id":"c9058067-cdcc-4e6e-8fff-300d4638c01a","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"5863acd0-bdd8-4ed3-b624-629048c7a79d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"3. 对话式 Debug(降维打击)"}]},{"type":"paragraph","attrs":{"id":"d9f22009-60e4-493e-8a74-19168f62f1a0","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"c2cde0ad-b44c-418c-85c9-ff62d3561d1d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"这是最爽的点。遇到报错时,无需手动定位行号,直接将终端报错信息粘贴给 AI,它能精准定位问题并给出修复代码。对于依赖版本冲突、环境变量配置错误这类“琐碎但耗时”的问题,它能将排查时间从半小时压缩到 1 分钟。"}]},{"type":"paragraph","attrs":{"id":"46170aa3-16fe-4e7a-9074-1441e073ef1c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"heading","attrs":{"id":"6e87f0c7-bce4-4def-9f06-a8b8e3b994a0","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"二、硬核踩坑:痛并快乐着 "}]},{"type":"paragraph","attrs":{"id":"5a2078fd-0712-4438-ad05-cbe1af2d6559","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"1. 模型稳定性“薛定谔”"}]},{"type":"paragraph","attrs":{"id":"7bc6dcc5-17be-4f33-850a-3747780c2008","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"dee3a699-ca34-4358-a0ce-bd996ecedd03","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"CodeBuddy 支持多模型切换(混元、DS31、第三方),但稳定性差异巨大。DS31 模型在生成复杂算法时能力强,但连续使用易出现“上下文断连”或生成低级语法错误。"},{"type":"text","marks":[{"type":"bold"}],"text":"踩坑记录"},{"type":"text","text":":曾让它生成一个分库分表逻辑,前一步刚定义好 "},{"type":"text","marks":[{"type":"code"}],"text":"shardKey"},{"type":"text","text":",下一步它就在代码里写成了 "},{"type":"text","marks":[{"type":"code"}],"text":"shard_key"},{"type":"text","text":",导致深夜 Debug。建议在复杂任务中切换至更稳定的 DS-0324 或 Claude 模型。"}]},{"type":"paragraph","attrs":{"id":"4de89a12-8d77-4c23-88d0-f1526f26c66a","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"67c54ef5-dcdc-4848-98d4-fc242f9e94b4","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"2. 插件生态的“水土不服”"}]},{"type":"paragraph","attrs":{"id":"29dcb39b-93aa-4272-87a1-2b44db300dfd","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"ea7036bf-fd8b-408c-bc6d-5b9268e708a1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"CodeBuddy IDE 基于 VS Code 内核,但并非所有 VS Code 插件都能完美兼容。"},{"type":"text","marks":[{"type":"bold"}],"text":"踩坑记录"},{"type":"text","text":":同时开启 CodeBuddy 和 GitHub Copilot 插件时,会出现双重补全冲突,代码提示乱跳。此外,部分依赖本地 Native 模块的插件(如某些数据库客户端)在 CodeBuddy 中无法运行,需回退到原生 VS Code,打断了开发流。"}]},{"type":"paragraph","attrs":{"id":"50e95c71-08f3-42d3-8f6f-5b036086d4d9","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"c7472cb6-b534-484e-8c23-6c3c45198fce","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"3. 远程开发体验“掉线”"}]},{"type":"paragraph","attrs":{"id":"a6d8b0a9-eebf-4ccc-bfbc-3b4dca608cc7","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"efcc2cfd-e264-4bd3-a59d-ebc36620543e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"对于需要连接测试服务器开发的场景,CodeBuddy 的 SSH 远程连接稳定性远不如 Cursor。频繁断连和文件同步延迟是常态,在弱网环境下几乎不可用。"},{"type":"text","marks":[{"type":"bold"}],"text":"建议"},{"type":"text","text":":仅将其用于本地或云 IDE 开发,避免用于远程服务器调试。"}]},{"type":"paragraph","attrs":{"id":"cb3fda37-a56f-4a2d-bf72-773be137963c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"81db5b25-ee12-494c-8b83-d653a6f34399","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"4. 过度设计与幻觉"}]},{"type":"paragraph","attrs":{"id":"30fb8329-55c6-43e0-aec7-19b3364bab68","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"9ce9e7d1-7fca-4e68-bdd9-a989b06eb7a8","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"AI 没有“简单”的概念。"},{"type":"text","marks":[{"type":"bold"}],"text":"踩坑记录"},{"type":"text","text":":我曾让它写一个简单的数据导出脚本,它硬生生给我生成了包含工厂模式、策略模式的“企业级”架构,增加了不必要的复杂度。必须明确指令“不要设计模式,只要函数式脚本”,否则它会为了展示能力而过度工程化。"}]},{"type":"paragraph","attrs":{"id":"840b2b13-e825-41a3-813b-dfd9a75f4b4e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"heading","attrs":{"id":"c7d0309d-83c1-4012-92ce-5fdbe1b89900","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"三、避坑指南与最佳实践 "}]},{"type":"paragraph","attrs":{"id":"adaa6b25-3cc2-4fae-8aa3-d9463b0cab06","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"1. 模型选型策略"}]},{"type":"paragraph","attrs":{"id":"d383ef01-fab4-444d-86c2-54c9194f95e1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"bulletList","attrs":{"id":"90c16ac8-d984-4a9c-a837-ecd29cda925e","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"bab1022e-ec3c-4c8e-bcdb-d9b805436cbc"},"content":[{"type":"paragraph","attrs":{"id":"98058f15-ffcf-4bbb-99dc-bc7972151d1f","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"日常 CRUD"},{"type":"text","text":":使用默认混元模型,免费且响应快。"}]}]},{"type":"listItem","attrs":{"id":"012dfd7b-77fe-457e-b683-c514a770f7d2"},"content":[{"type":"paragraph","attrs":{"id":"dd1651b1-d102-4ff9-bed8-087bf482cb35","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"复杂重构/算法"},{"type":"text","text":":切换至 DS-0324 或 Claude,牺牲一点速度换取稳定性。"}]}]},{"type":"listItem","attrs":{"id":"ecb0893e-98ff-465f-9b53-2c26a6d80e2d"},"content":[{"type":"paragraph","attrs":{"id":"86611526-0aab-4dbe-9ef1-dff988b5fa30","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"禁用"},{"type":"text","text":":在关键生产代码生成中禁用“实验性模型”,避免引入不可控风险。"}]}]}]},{"type":"paragraph","attrs":{"id":"73c8d9f3-cac4-443a-8e1b-95d08cf8ad42","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"2. 上下文管理"}]},{"type":"paragraph","attrs":{"id":"cbdd469d-b60a-4889-aca2-46cbb1ac65a4","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"36517bb7-4211-486e-b206-59733c2b8fc0","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"AI 的上下文窗口有限。"},{"type":"text","marks":[{"type":"bold"}],"text":"踩坑记录"},{"type":"text","text":":长会话后 AI 会“失忆”。最佳实践是"},{"type":"text","marks":[{"type":"bold"}],"text":"“单任务单会话”"},{"type":"text","text":"。完成一个功能模块后,立即开启新会话进行下一个任务,避免上下文污染导致的逻辑错乱。"}]},{"type":"paragraph","attrs":{"id":"7ef56d34-161b-4494-bb87-0c9dfdb4b04d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"05eb72a8-754b-491c-baec-a830c644cc6b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"3. 安全边界"}]},{"type":"paragraph","attrs":{"id":"0b1048ae-3080-4ebc-b8f0-fc7d14f2fefa","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"2c2ce0ba-3d2b-46e0-b824-0cbef364f88a","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"CodeBuddy 生成的代码缺乏安全意识。"},{"type":"text","marks":[{"type":"bold"}],"text":"踩坑记录"},{"type":"text","text":":它生成的 SQL 往往是全字段查询("},{"type":"text","marks":[{"type":"code"}],"text":"SELECT *"},{"type":"text","text":"),且容易忽略 XSS 过滤。必须建立硬性规则:AI 生成的代码必须经过人工安全审查(尤其是涉及数据库操作和用户输入的地方)才能上线。"}]},{"type":"paragraph","attrs":{"id":"e1876ec2-c482-4703-9651-febacb1f6b11","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"65ca7f12-4bae-4633-9e18-5ad54c0ee9b2","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"4. 拒绝“黑盒”依赖"}]},{"type":"paragraph","attrs":{"id":"12399b69-6be2-4499-b2f7-d9316781ed86","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"fb925df6-8b2b-4836-868a-434c5686712c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"虽然 CodeBuddy 能“0 代码”生成项目,但绝不能做“甩手掌柜”。"},{"type":"text","marks":[{"type":"bold"}],"text":"建议"},{"type":"text","text":":生成代码后,必须通读核心逻辑,确保理解每一行代码的意图。否则,当线上出现 Bug 时,你会因完全不懂底层逻辑而无法快速修复,形成“认知债务”。"}]},{"type":"paragraph","attrs":{"id":"9b02a948-d047-428c-86a4-d53d1bfd9d28","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"heading","attrs":{"id":"cc48364b-c58c-4362-9da6-f57c7d847908","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"四、总结 "}]},{"type":"paragraph","attrs":{"id":"c4a08e77-4e0a-45c7-980c-d91858e0e495","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"CodeBuddy 是一款优秀的"},{"type":"text","marks":[{"type":"bold"}],"text":"“副驾驶”"},{"type":"text","text":",它能将开发效率提升 2-3 倍,但它绝不是“自动驾驶”。它放大了“好实践”,也放大了“坏习惯”。"}]},{"type":"paragraph","attrs":{"id":"0647dfee-1c0f-4ff9-9fc3-e9c628cfe041","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]},{"type":"paragraph","attrs":{"id":"4c40ecd5-2d6f-444d-97da-2b06b3be58e1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"最终建议"},{"type":"text","text":":将其定位为"},{"type":"text","marks":[{"type":"bold"}],"text":"高级代码审查员 + 快速原型工具"},{"type":"text","text":"。用它来写样板代码、生成测试用例、修复简单 Bug,但将核心架构设计、安全逻辑和最终决策权牢牢掌握在自己手中。只有这样,才能既享受 AI 的红利,又不被工具“反噬”。"}]},{"type":"paragraph","attrs":{"id":"b4b88540-db0a-4d5e-b4dd-ef669cf83b79","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":" "}]}]}