一、AI编程带来的核心价值

AI编程开发的出现,就犹如一场及时雨,为传统开发中的痛点带来了更有针对性的解决方案,带来了全方位的革新:

  1. 强大知识库:技术难题的智能导航
    支持快速检索 API 使用方法,无需再在海量文档中苦苦搜寻;提供丰富的最佳实践参考,让开发者站在巨人的肩膀上;面对需求时,能自动推荐适配的技术方案,轻松实现需求与平台的精准对接。

  2. 效率提升:释放开发者的时间与精力
    能够自动生成规范的代码片段,减少手动编写的工作量;智能补全功能大幅提高编码速度,让输入如行云流水;模板代码一键生成,将开发者从重复劳动中解放出来,专注于核心逻辑的构建。

  3. 问题诊断:化繁为简的故障克星
    具备快速定位问题原因的能力,如同为代码装上 “CT 扫描仪”;针对问题精准提供修复建议,指明解决方向;自动化的问题排查流程,省去人工摸索的过程,大幅缩短 Debug 时间。

  4. 质量保障:为代码筑牢规范防线
    让代码风格更贴合平台规范,保持一致性;接口设计通过智能推荐实现标准化,提升模块间的协同性;从源头减少不规范问题,显著提高代码质量,降低后续维护成本。

二、AI编程结合Oinone会带来哪些好处

有句话说的很好,工具再好,不同的人用,效果也会有很大差异。企业需要有人制定统一的技术标准、研发规范等才能最大化发挥AI编程的价值。

AI编程结合Oinone会带来哪些好处,我从两方面出发:

  1. 从把AI编程工具用好的角度: 把Oinone作为企业的底层框架,与AI编码工具的结合,本质上就是告诉AI编程工具我企业技术标准和研发规范是什么。Oinone作为软件公司技术的最佳实践,作为企业的技术标准,因为把标准固化到了平台本身上,所以从直观的上感受就是:

    • a) AI生成的代码量更少,需要review的工作也更少
    • b) 错误更好少,质量更好
    • c) 强规范带来的幻觉也更好少。
    • d) 代码的扩展性强,不是简单的实现逻辑本身
  2. 从Oinone框架用好、推广好的角度,AI编程工具可以到做:

    • a) 降低研发对Oinone技术认知与学习成本
    • b) 进一步开发效率,减少结构性代码的编写
    • c) 作为最好的知识库形式,解决平台报错信息难以理解,问题排查路径不清晰

三、AI编程工具的结合案例

(一)Cursor IDE 简介

Cursor 是一款革命性的智能代码编辑器,它集成了强大的 AI 能力,基于大语言模型(如GPT-4)提供实时的编程辅助。作为新一代的开发工具,Cursor 不仅保留了传统 IDE 的核心功能,还引入了 AI 驱动的智能编程体验。

1、Cursor IDE 配置

  1. 前往 Cursor IDE ,下载 Cursor IDE 的安装包,然后将其安装至你的计算机。

  2. 登录 Cursor 账号。

  3. 打开项目,可以参考 官方配置文档

  4. 在「Cursor Settings > Models」中勾选性能更高的模型(如 Claude-3.5-sonnet 或 Claude-4-sonnet),这可以显著提升多文件项目中的推理和上下文理解能力。尤其在面对架构设计、业务逻辑梳理等高复杂度任务时,模型能提供更结构化、更深入的建议。

    cursor-models

  5. 配置 MCP Sever ,在「Cursor Settings > Tools & Integrations」中添加 deepwiki 的 MCP Server。

  • 为确保正常启动 MCP Server,你需要安装以下依赖:

    npx:依赖于 Node.js,版本需大于等于 18。
    uvx:命令行工具,用于快速运行 Python 脚本。

cursor-mcp

mcp.json

{
  "mcpServers": {
    "deepwiki": {
      "url": "https://mcp.deepwiki.com/mcp"
    }
  }
}
  1. 在「Cursor Settings > Rules & Memories」中添加行为规则,指导 AI 的行为。

    cursor-rules

    User Rules

    You are a senior oinone development engineer focused on enterprise application development using oinone's modular and extensible architecture. You will need:
    
    1. Strictly follow oinone development guidelines and best practices:
    - Developed on JDK 1.8221 +
    - Follow the development standards of the Oinone backend framework
    - Make sure your code conforms to Oinone's modular architecture design
    
    2. When answering questions:
    - Preferred Oinone official documentation
      (
    - installation and upgrade:
      https://guide.oinone.top/zh-cn/InstallOrUpgrade/
    - user manual
      https://guide.oinone.top/zh-cn/UserManual/
    - research and development manual
      https://guide.oinone.top/zh-cn/DevManual/
      )
    4. -Use the index article in the document as context if necessary
    - Analyze the associated source code implementation
      https://github.com/oinone/oinone-pamirs
    - analysis warehouse provide source code as a context
      -Give the optimal solution combined with Oinone platform features
    - If you need to answer a question using the mcp tool, determine whether it is a front-end or back-end question, and call the mcp service to reply.
      If it's a front-end issue, ask the 'oinone/ oinone-Kunlun' repository.
      If it's a backend issue, ask the 'oinone/oinone-pamirs' repository.
      For solution questions, ask the 'oinone/oinone-docs' repository.
    
    3. During development:
    - Use the core components and apis provided by oinone
      -Follow the platform's permission management and data isolation mechanisms
      -- Proper use of debugging tools provided by the platform for fault handling
    - Make sure the code is maintainable and extensible
    
    4. In the code:
    - Use a standard project structure and naming convention
    - Properly handle dependencies between modules
    - Proper use of designer tools provided by the platform
    - Focus on code quality and performance optimization
    
    Your answer should be:
    - Accurately understand the technical needs of users
      -Provide solutions that conform to the oone development specification
    - Provide documentation and code samples where necessary
      -Explain implementation pros and cons and considerations
    
  2. 在「Cursor Settings > Indexing & Docs」中添加平台文章,让 AI 在生成代码或回答问题时参考这些资料。但是需要注意通过URL添加的方式只会自动查询同级路径或子路径下、最多三次跳转的页面内容。

    cursor-docs

    推荐索引的文档:

  3. 除了以上添加文档的方式,还建议把 Oinone仓库的知识图谱 下载下来添加到文档集中。

  4. 在「Cursor Settings > Network」中修改 Http 协议为 HTTP/1.1 ,以便使用 Claude 模型。
    cursor-network

  5. 更多内容请查看 Cursor中文文档

2、IntelliJ IDEA配置

  1. 在 IDEA 中安装 Switch2Cursor 插件,在 IDEA 中选择「File > Settings > Plugins」,点击 Marketplace ,搜索 Switch2Cursor ,找到后点击 Install 安装。如未找到,可以直接去 jetbrans plugins 官网搜索下载,然后本地安装插件。

    idea-switch2cursor

  2. 安装完之后在「File > Settings > Tools」 中找到 Switch2Cursor,然后配置 Cursor 安装路径。

  3. 在 Cursor 中安装 Switch2IDEA 插件,在 Cursor 中依次选「View > Extensions」,在 Marketplace 搜索 Switch2IDEA,点击 Install 安装。

    cursor-switch2idea

  4. 在 IDEA 中右键,就可以在 IDEA 和 Cursor 之间无缝切换。

3、实战案例

Tab 键

tap

强大的⌘ K

⌘ K 让你使用 AI 来编辑和编写代码。要编辑时,可先选中部分代码,点击“Edit”,并描述需要如何更改。若想生成全新代码,只需在未选中任何内容的情况下输入 ⌘ K。
k-1

依赖于 Cursor 独有的理解代码库、读取代码上下文的能力,可以轻松编写出代码中已有的逻辑实现,并扩展。

k-2

侧边对话

进行 AI 问答,如果你对某段代码有简单疑问,先选中它,然后点击 quick question 即可立刻获得解答。

cursor-chat

还有类似:通义灵码、文心快码、codeBuddy 等等都是可以结合起来使用。

(二)Trae IDE 简介

Trae IDE 是由字节跳动推出的下一代 AI 原生集成开发环境,深度融合了 AI 编程助手,提供智能代码补全、实时错误检测、自动重构、自然语言编程等先进功能,同时支持多种语言和框架,为开发者带来前所未有的高效编程体验。

1、Trae IDE 配置

  1. 前往 Trae 官网,下载 Trae IDE 的安装包,然后将其安装至你的计算机。

  2. 登录 Trae 账号。

  3. 打开项目,可以参考 官方配置文档

  4. 输入快捷键 ⌘ U 与 AI 对话,在「AI 功能管理 > MCP」中添加 deepwiki 的 MCP Server。
    为确保正常启动 MCP Server,你需要安装以下依赖:

    • npx:依赖于 Node.js,版本需大于等于 18。
    • uvx:命令行工具,用于快速运行 Python 脚本。

    trae-mcp

    mcp.json

    {
      "mcpServers": {
        "deepwiki": {
          "url": "https://mcp.deepwiki.com/mcp"
        }
      }
    }
    
  5. 在「AI 功能管理 > 规则」中添加个人规则,在 AI 回答问题时规范 AI 的行为。

    trae-rules

    User Rules

    You are a senior oinone development engineer focused on enterprise application development using oinone's modular and extensible architecture. You will need:
    
    1. Strictly follow oinone development guidelines and best practices:
    - Developed on JDK 1.8221 +
    - Follow the development standards of the Oinone backend framework
    - Make sure your code conforms to Oinone's modular architecture design
    
    2. When answering questions:
    - Preferred Oinone official documentation
      (
    - installation and upgrade:
      https://guide.oinone.top/zh-cn/InstallOrUpgrade/
    - user manual
      https://guide.oinone.top/zh-cn/UserManual/
    - research and development manual
      https://guide.oinone.top/zh-cn/DevManual/
      )
    4. -Use the index article in the document as context if necessary
    - Analyze the associated source code implementation
      https://github.com/oinone/oinone-pamirs
    - analysis warehouse provide source code as a context
      -Give the optimal solution combined with Oinone platform features
    - If you need to answer a question using the mcp tool, determine whether it is a front-end or back-end question, and call the mcp service to reply.
      If it's a front-end issue, ask the 'oinone/oinone-kunlun' repository.
      If it's a backend issue, ask the 'oinone/oinone-pamirs' repository.
      For solution questions, ask the 'oinone/oinone-docs' repository.
    
    3. During development:
    - Use the core components and apis provided by oinone
      -Follow the platform's permission management and data isolation mechanisms
      -- Proper use of debugging tools provided by the platform for fault handling
    - Make sure the code is maintainable and extensible
    
    4. In the code:
    - Use a standard project structure and naming convention
    - Properly handle dependencies between modules
    - Proper use of designer tools provided by the platform
    - Focus on code quality and performance optimization
    
    Your answer should be:
    - Accurately understand the technical needs of users
      -Provide solutions that conform to the oone development specification
    - Provide documentation and code samples where necessary
      -Explain implementation pros and cons and considerations
    
  6. 在「AI 功能管理 > 上下文」中添加平台文章,让 AI 在生成代码或回答问题时参考这些资料。使用「通过本地文件添加」的方式添加文档集。可以去我们的开源项目中下载 Oinone 官方文档。
    GitHub 链接:oinone-docs
    Gitee 链接:oinone-docs
    GitCode 链接: oinone-docs

    当然,你也可以使用「通过URL添加」的方式添加文章,但是需要注意「通过URL添加」的方式只会自动查询同级路径或子路径下、最多三次跳转的页面内容。

    trae-context

1. 环境准备
https://guide.oinone.top/zh-cn/InstallOrUpgrade/Dev-ENV/

模型设计器
https://guide.oinone.top/zh-cn/UserManual/Designers/ModelDesigner/

组件介绍
https://guide.oinone.top/zh-cn/UserManual/Designers/

自定义组件
https://guide.oinone.top/zh-cn/UserManual/Designers/UIDesigner/CustomizedComponents/

标准模块
https://guide.oinone.top/zh-cn/UserManual/StandardModules/

管理中心
https://guide.oinone.top/zh-cn/UserManual/StandardModules/AdministrationCenter/

研发手册-教程
https://guide.oinone.top/zh-cn/DevManual/Tutorials/

操作指南
https://guide.oinone.top/zh-cn/DevManual/OperationGuide/

模块API
https://guide.oinone.top/zh-cn/DevManual/Reference/Back-EndFramework/

前端API
https://guide.oinone.top/zh-cn/DevManual/Reference/Back-EndFramework/AdvanceAPI/

Field
https://guide.oinone.top/zh-cn/DevManual/Reference/Front-EndFramework/Widget/Field/

Oio组件
https://guide.oinone.top/zh-cn/DevManual/Reference/Front-EndFramework/

最佳范式
https://guide.oinone.top/zh-cn/DevManual/R_DParadigm/

常见解决方案-前端
https://guide.oinone.top/zh-cn/DevManual/CommonSolutions/Front-End/

常见解决方案-后端
https://guide.oinone.top/zh-cn/DevManual/CommonSolutions/Back-End/

常见问题
https://guide.oinone.top/zh-cn/DevManual/FAQ/
  1. 除了以上添加文档的方式,还建议把 Oinone仓库的知识图谱 下载下来添加到文档集中。
后端知识图谱
https://deepwiki.com/oinone/oinone-pamirs/

前端端知识图谱
https://deepwiki.com/oinone/oinone-kunlun/

doc图谱
https://deepwiki.com/oinone/oinone-docks/
  1. 更多内容请查看 Trae IDE 中文文档

2、IntelliJ IDEA配置

  1. 在 IDEA 中安装 Trae 插件,在 IDEA 中选择「File > Settings > Plugins」,点击 Marketplace 进入插件市场。
  2. 搜索关键词 Trae,找到 Trae AI: Coding Assistant 插件并安装,即可使用 Trae 插件提供自动代码补全、代码生成、代码编辑等能力。你可以使用这些能力来提升开发效率。

3、实战案例

工作流程控制

trae-flow

强大的⌘ I

Trae 提供了内嵌在代码编辑器中的行内对话(Inline Chat)。⌘ I 让你使用 AI 来编辑和编写代码。要编辑时,可先选中部分代码,点击“编辑”,并描述需要如何更改。若想生成全新代码,只需在未选中任何内容的情况下输入 ⌘ I。

trae-inline

侧边对话

进入 Trae IDE 后,一般已默认打开侧边对话框。若非如此,你可以使用快捷键(macOS:Command + U;Windows:Ctrl + U)将其打开。
如果你对某段代码有简单疑问,先选中它,然后点击添加到对话即可立刻获得解答。

trae-chat

四、结语

在这篇文章中,我们介绍了 Cursor IDE 和 Trae IDE 等 AI 编程工具是如何和 Oinone 平台结合的。其实,随着 AI 编程工具越来越成熟,未来还会有更多类似的工具可以和 Oinone 平台对接,比如通义灵码、文心快码、codeBuddy等等。这些工具的出现,肯定会让我们的开发效率大大提升,也能帮助企业在技术创新和产品研发上走得更快。
对于开发者来说,选择合适的 AI 编程工具,不仅能简化工作流程,还能提升代码质量,缩短产品交付的时间。在这个技术飞速发展的时代,掌握这些工具,让它们发挥最大作用,绝对是提升效率的关键。
随着这些 AI 工具的不断进步,未来我们可以期待一个更加智能和高效的开发体验,让团队能够应对更复杂的需求,同时推动更多创新。

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐