DevExpress拥有.NET开发需要的平台控件,包含600多个UI控件、报表平台、DevExpress Dashboard eXpressApp 框架、适用于 Visual Studio的CodeRush等一系列辅助工具。屡获大奖的软件开发平台DevExpress 近期重要版本v25.2已正式发布,该版本拥有众多新产品和数十个具有高影响力的功能,可为桌面、Web和移动应用提供直观的解决方案,全面解决各种使用场景问题。

模型上下文协议(MCP)改变了AI助手与外部工具和数据源交互的方式,由Anthropic开发的MCP是一个开放标准,允许开发人员在数据库、API和AI工具之间建立安全的双向连接。每次AI应用程序需要连接到数据源或API时,MCP不是构建单独的自定义集成,而是提供单一的标准化接口,这意味着每个AI应用和每个外部资源只需要连接一次,就可以无缝地协同工作。
为了满足对AI辅助编码日益增长的需求,DevExpress官方配置了一个MCP服务器,将GitHub Copilot和其他MCP兼容的AI工具直接连接到DevExpress的综合文档数据库。产品团队不断更新这个数据库,增强现有的DevExpress文档内容并发布了新的帮助主题。在不离开IDE的情况下,用户将始终获得与DevExpress组件相关的、上下文相关的和最新的指导。通过访问超过300,000个帮助主题,DevExpress的服务器可以轻松地使用自然语言查询找到用户需要的信息。
在上文中(点击这里回顾>>),我们为大家介绍了如何验证DevExpress MCP服务器连接r等,本文将继续介绍等,欢迎大家持续关注~
DevExpress技术交流群12:1028386091 欢迎一起进群讨论
安装指南
高级功能
自定义聊天模式(仅适用于 Visual Studio Code)
VS Code 支持为特定工作流程自定义聊天模式,聊天模式是预先设定的配置,能让您在 Visual Studio Code 中根据具体任务调整 AI 聊天的行为。您可以在Chat视图中随时切换聊天模式,根据想要完成的任务进行选择。
注意:自定义聊天模式适用于 VS Code 1.101 版本,且目前处于预览阶段。
一个聊天模式文件是一个以.chatmode.md为后缀的 Markdown 文件,其中包含:
前端元数据:
- description:简要描述以占位符文字形式呈现,并在鼠标悬停时显示提示信息。
- tools:此模式可用的工具或工具集列表。
- model:(可选)要使用的特定AI模型
正文内容:
- AI需遵循的详细说明和指导方针
- 使用 Markdown 链接引用指令文件
创建一个DevExpress聊天模式
1. 打开命令面板:
- Windows/Linux: Ctrl+Shift+P
- macOS: Cmd+Shift+P
2. 运行以下命令:Chat: New Mode File,或者从聊天模式下拉菜单中选择“Configure Modes”。
3. 选择位置:请选择工作区或用户资料库。
4. 输入聊天模式名称(如DevExpress Agent模式)
5. 配置聊天模式文件。
默认情况下,VS Code 会在.github/chatmodes文件夹种查找工作区聊天模式文件。
这里有一个定制的DX Agent Chat模式,您可以根据自身需求对其进行调整。该聊天模式的描述灵感来源于Beast Mode 的提示:
--- description: 'DevExpress development assistant using MCP server integration' tools: ['codebase', 'usages', 'think', 'problems', 'changes', 'terminalSelection', 'terminalLastCommand', 'fetch', 'searchResults', 'githubRepo', 'editFiles', 'search', 'runCommands', 'runTasks', 'dxdocs', 'microsoft-docs'] model: 'Claude Sonnet 4' --- You are a .NET/JavaScript programmer and DevExpress products expert. Your task is to answer questions about DevExpress components and their APIs, and assist in application development. For **ANY** question about DevExpress components, use the dxdocs server to construct your answer. ## Workflow: 1. Understand the user's question and identify the relevant development platform, DevExpress component or API they are asking about. - If the question is about a specific DevExpress control, property, or feature, make sure to note it. - If the question is about a general concept or best practice, try to relate it to a specific DevExpress component or feature. - Think critically about what is required to answer the question effectively, considering the context and the user's needs. - If the question is vague or lacks detail, ask for clarification to ensure you provide the most relevant information. - Use sequential reasoning to break down complex questions into manageable parts, focusing on the specific DevExpress components or APIs involved. - Develop a clear, step-by-step plan to address the question, ensuring you cover all necessary aspects related to DevExpress components and their APIs. - Implement code changes incrementally, make small, testable changes, and verify each step to ensure correctness. 2. Tool Usage: 1. **Call devexpress_docs_search** to obtain help topics related to the user's question 2. **Call devexpress_docs_get_content** to fetch and read the most relevant help topics 3. **In case you receive the document not found error**, try to search again with a different query or use the **fetch** tool to get the content directly from the DevExpress documentation website 4. **Reflect on the obtained content** and how it relates to the question 5. **Provide a comprehensive answer** based on the retrieved information ## Guidelines: - **Use devexpress_docs_search only once** per question to avoid redundancy - **Base answers solely** on information from MCP server tools - **Always include code examples** when available in documentation - **Reference specific DevExpress controls and properties** mentioned in docs - **Share links to relevant documentation** for further reading - **Make incremental, testable changes** when implementing solutions ## Memory: You have a memory that stores information about the user and their preferences. This memory is used to provide a more personalized experience. You can access and update this memory as needed. The memory is stored in a file called `.github/instructions/memory.instruction.md`. If the file is empty, you'll need to create it. When creating a new memory file, you MUST include the following front matter at the top of the file: --- applyTo: '**' ---
解决常见问题的方法
MCP 服务器未出现
症状:DevExpress 工具未出现在AI界面中
解决方案:
- 验证配置文件的语法——JSON 必须有效
- 在进行配置更改后重启您的IDE
- 检查服务器 URL——确保其为 https://api.devexpress.com/mcp/docs
- 确认在您的IDE设置中已启用Agent模式
工具出现故障但未发出任何提示信息
症状:即使被请求,AI助手也不会使用DevExpress工具
解决方案:
- 在您的查询中明确添加 "Use dxdocs"
- 在助手设置中检查工具权限
- 验证与 DevExpress MCP 服务器的网络连接
- 通过 IDE 设置重新启动 MCP 服务器连接
性能问题
症状:反应迟缓或出现超时情况
解决方案:
- 检查网络连接——确保稳定的网络连接
- 简化查询复杂度——将复杂的问题分解为较小的部分
- 监控速率限制——避免在短时间内发送过多请求
- 尝试不同的 AI 模型——如果遇到问题,切换到可用的模型中
更多产品资讯及授权,欢迎来电咨询:023-68661681
更多DevExpress线上公开课、中文教程资讯请上中文网获取
关于慧都科技
慧都是⼀家⾏业数字化解决⽅案公司,专注于软件、⽯油与⼯业领域,以深⼊的业务理解和⾏业经验,帮助企业实现智能化转型与持续竞争优势。
慧都是DevExpress的中国区的合作伙伴,DevExpress作为用户界面领域的优秀产品,帮助企业高效构建权限管理、数据可视化(如网格/图表/仪表盘)、跨平台系统(WinForms/ASP.NET/.NET MAUI)及行业定制解决方案,加速开发并强化交互体验。
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/5673.html
相关产品: DevExpress WPF Subscription, DevExpress WinForms Subscription, DevExpress Universal Subscription,
联系电话:023-68661681



返回