feat:完善ai devops相关文档 #4

Merged
mengning merged 6 commits from feature_sgx into main 2025-12-16 07:01:06 +00:00
17 changed files with 189 additions and 28 deletions
Showing only changes of commit ee3efe7b08 - Show all commits

View File

@@ -149,19 +149,23 @@ jobs:
3. 点击「生成新的令牌」,命名令牌并给予仓库读取等必要权限
4. 复制生成的一串字符串,这就是你的 `gitea_token`
#### 配置AI IDE/CLI使用私有大模型及MCP Server
#### 配置 AI IDE/CLI 使用 LLM 及 MCP Server
* Copilot点击提示框里的“管理模型”选择ollama将mcp配置添加到 .vscode/mcp.json下
- **LLM**
- 使用第三方 API/云端模型OpenAI/Anthropic/Azure/Gemini
- **Cursor**:在模型设置中选择对应 Provider配置 **API Key / Base URL / Model**
- **Continue**Add Chat model 选择对应 Provider配置 **API Key / Base URL / Model**
- **Copilot**:在“管理模型”中选择 **Copilot 支持的云端模型**(若需使用自带 Key 的第三方,一般用 Cursor/Continue 接入更直接)
- 使用本地/私有部署Ollama / 内网 LLM
- **Copilot**:在“管理模型”中选择 **ollama**
- **Continue**Add Chat model → Provider 选择 **ollama**
- **Cursor**:若 LLM 在内网且 Cursor 不支持直连,需要做**反向代理/企业网关**提供公网可访问的 **Base URL** 再接入
- **MCP Server与 LLM 选择无关)**
- **CopilotVS Code**:将 MCP 配置添加到 **.vscode/mcp.json**
- **Cursor**Cursor Settings → Tools & MCP → New MCP Server将 MCP 配置写入 **mcp.json**
- **Continue**Settings → Tools → MCP Servers 配置 YAML ,或复用 Cursor 的 MCP 配置:将 **mcp.json** 放到 **.continue/mcpServers/mcp.json**
* Cursor不支持内网地址的私有部署大模型需要做反向代理使用公网可以访问的地址点击Cursor Settings -> Tools & MCP
-> New MCP Server 将mcp配置添加到mcp.json中
* Continue点击Add Chat modelProvider选择ollama设置->Tools->MCP Servers配置yaml文件
也可以将cursor的json文件放到.continue/mcpServers/mcp.json中
* ...
## 🚀 DevStar AI+ DevOps演示
@@ -169,7 +173,7 @@ jobs:
### 创建一个项目
使用ai-develops项目模板创建项目
点击右上角创建仓库->DevStar模板中选择Devstar.cn/template/ai-develops
![](./static/template.png)
@@ -185,7 +189,7 @@ jobs:
3.请为这次修复 issue #1 的改动补充或更新测试代码,遵循项目的现有测试风格,并说明每个测试在验证什么行为。
![](./static/exp.png)
### 提交PR

BIN
src/devstar/static/exp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB