-
Notifications
You must be signed in to change notification settings - Fork 8
Docs/cursor setup #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
flyingeasten
wants to merge
6
commits into
aiberm:main
Choose a base branch
from
flyingeasten:docs/cursor-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
471780c
feat_add_Trae_IDE_setup_documentation
flyingeasten 6158272
docs_update_trae_setup
flyingeasten e0431a5
docs_add_trae_screenshots
flyingeasten 21e27fe
docs_update_trae_setup
flyingeasten e694d62
docs_update_cursor_setup
flyingeasten 01eac8c
Merge branch 'main' into docs/cursor-setup
flyingeasten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * [32mdocs/trae-setup[m 6158272 docs_update_trae_setup | ||
| main [m 471780c [[34morigin/main[m: ahead 1] feat_add_Trae_IDE_setup_documentation |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import docx | ||
|
|
||
| def read_docx(file_path): | ||
| doc = docx.Document(file_path) | ||
| full_text = [] | ||
| for para in doc.paragraphs: | ||
| full_text.append(para.text) | ||
| return '\n'.join(full_text) | ||
|
|
||
| try: | ||
| content = read_docx(r'f:\VibeCoding\aiberm-docs\Trae Setup - 完善版(中英文).docx') | ||
| print(content) | ||
| except Exception as e: | ||
| print(f"Error reading docx: {e}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| --- | ||
| layout: ../../layouts/DocsLayout.astro | ||
| title: Cursor Setup | ||
| lang: en | ||
| activeId: cursor | ||
| --- | ||
|
|
||
| import Callout from '../../components/Callout.tsx'; | ||
|
|
||
| # Cursor Setup | ||
|
|
||
| Cursor is an AI-native code editor built on VS Code, designed to increase developer productivity through deeply integrated AI features. By configuring Cursor to use Aiberm, you can access top-tier models like Claude 3.7, GPT-4o, and Gemini 2.5 for code generation, refactoring, and chat. | ||
|
|
||
| <Callout client:load type="info"> | ||
| To use Cursor with Aiberm, you need a valid Aiberm API key. If you haven't obtained one yet, please refer to the [Authentication](/docs/en/authentication) page. | ||
| </Callout> | ||
|
|
||
| ## What is Cursor? | ||
|
|
||
| Cursor is an editor designed specifically for AI-assisted programming. Its key features include: | ||
|
|
||
| - **Deep Integration**: AI understands your entire codebase, not just the current file. | ||
| - **Cursor Tab**: Powerful autocomplete that predicts your next edit. | ||
| - **Composer**: An AI interface supporting multi-file editing and complex task generation. | ||
| - **Privacy Mode**: Supports local code storage (when used with custom APIs). | ||
|
|
||
| ## Configuration Steps | ||
|
|
||
| Follow these steps to configure Cursor to use Aiberm's API: | ||
|
|
||
| ### Step 1: Open Model Settings | ||
|
|
||
| 1. Open Cursor editor. | ||
| 2. Click the **Settings** icon (gear) in the top-right corner, or use the shortcut `Ctrl + Shift + J`. | ||
| 3. In the left settings menu, select **Models**. | ||
| 4. On the Models page, you may need to click **"View All Models"** or scroll down to the bottom to see all configuration options. | ||
|
|
||
| ### Step 2: Configure OpenAI Base URL | ||
|
|
||
| Cursor allows you to add a custom OpenAI-compatible interface. | ||
|
|
||
| 1. On the Models page, find the **OpenAI API Key** section. | ||
| 2. Ensure the toggle is enabled. | ||
| 3. **Enter API Key**: Fill in your Aiberm API Key (starting with `sk-`). | ||
| 4. Click **"Override OpenAI Base URL"** below the input box. | ||
| 5. **Enter Base URL**: Input `https://aiberm.com/v1/`. | ||
|
|
||
| <Callout client:load type="warning"> | ||
| **Note**: Do **not** append `/models` after `v1` in the Base URL. Cursor will autocomplete it. | ||
| </Callout> | ||
|
|
||
| <Callout client:load type="tip"> | ||
| Screenshot: Configure API Key and Base URL. | ||
| </Callout> | ||
|
|
||
|  | ||
|
|
||
| ### Step 3: Add Custom Models | ||
|
|
||
| To use specific models provided by Aiberm (such as the latest GPT or Claude versions), you need to manually add them to Cursor. | ||
|
|
||
| 1. On the Models page, scroll down to the bottom of the **"Model Names"** list. | ||
| 2. Click **"+ Add Custom Model"**. | ||
|
|
||
| <Callout client:load type="tip"> | ||
| Screenshot: Click "Add Custom Model" in Cursor. | ||
| </Callout> | ||
|
|
||
|  | ||
|
|
||
| 3. **Get Model Names**: Log in to the [Aiberm Console](https://aiberm.com/) and go to the "Models & Pricing" page. | ||
| 4. Copy the model name you want to use (e.g., `openai/gpt-5.3-codex`). | ||
|
|
||
| <Callout client:load type="tip"> | ||
| Screenshot: Copy the model name from Aiberm Console. | ||
| </Callout> | ||
|
|
||
|  | ||
|
|
||
| 5. Paste the copied name into the input box in Cursor and click Add. | ||
| 6. Ensure the toggle next to your newly added model is **ON**. | ||
|
|
||
| <Callout client:load type="tip"> | ||
| **Recommended Model Configuration:** | ||
| - **Chat**: Use `claude-3-7-sonnet-20250219` or `gpt-4o` for the best chat experience. | ||
| - **Composer**: `claude-3-7-sonnet-20250219` excels at handling multi-file complex tasks. | ||
| </Callout> | ||
|
|
||
| ### Step 4: Verification | ||
|
|
||
| 1. Close the settings page. | ||
| 2. Use `Ctrl + L` (Windows/Linux) / `Cmd + L` (macOS) to open the chat panel. | ||
| 3. In the model selector at the bottom of the chat, choose the model you just added (e.g., `claude-3-7-sonnet-20250219`). | ||
| 4. Enter a test query, such as: "Hello, please write a Quick Sort algorithm in Python." | ||
| 5. If Cursor responds successfully, your configuration is working! | ||
|
|
||
| ## FAQ | ||
|
|
||
| ### Can I use Cursor Tab (Autocomplete)? | ||
| Cursor Tab (formerly Copilot++) typically relies on Cursor's own model services. While you can configure Chat and Composer to use Aiberm, the Tab feature might require a Cursor Pro subscription or default settings. If you wish to use Aiberm exclusively, we recommend relying primarily on Chat and Composer features. | ||
|
|
||
| ### Why are model responses slow? | ||
| Please check your network connection and ensure the Base URL is set correctly. Some complex reasoning models (like Claude 3 Opus) may inherently have slower response times. We recommend trying `claude-3-5-sonnet` or `gpt-4o-mini` for faster interactions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| --- | ||
| layout: ../../layouts/DocsLayout.astro | ||
| title: Cursor 配置 | ||
| lang: zh | ||
| activeId: cursor | ||
| --- | ||
|
|
||
| import Callout from '../../components/Callout.tsx'; | ||
|
|
||
| # Cursor 配置 | ||
|
|
||
| Cursor 是一款基于 VS Code 构建的 AI 原生代码编辑器,旨在通过深度集成的 AI 功能提高开发效率。通过配置 Cursor 使用 Aiberm,你可以调用 Claude 3.7、GPT-4o、Gemini 2.5 等顶级模型进行代码生成、重构和对话。 | ||
|
|
||
| <Callout client:load type="info"> | ||
| 使用 Cursor 配合 Aiberm 需要有效的 Aiberm API 密钥。如果你还没有获取,请参考 [身份认证](/docs/zh/authentication) 页面。 | ||
| </Callout> | ||
|
|
||
| ## 什么是 Cursor? | ||
|
|
||
| Cursor 是专为 AI 辅助编程设计的编辑器。它的主要特点包括: | ||
|
|
||
| - **深度集成**:AI 能够理解你的整个代码库,不仅仅是当前文件。 | ||
| - **Cursor Tab**:强大的自动补全功能,能够预测你的下一次编辑。 | ||
| - **Composer**:支持多文件编辑和复杂任务生成的 AI 界面。 | ||
| - **隐私模式**:支持将代码仅存储在本地(配合自定义 API 使用)。 | ||
|
|
||
| ## 配置步骤 | ||
|
|
||
| 按照以下步骤配置 Cursor 使用 Aiberm 的 API: | ||
|
|
||
| ### 步骤 1:打开模型设置 | ||
|
|
||
| 1. 打开 Cursor 编辑器。 | ||
| 2. 点击右上角的 **设置 (Settings)** 图标(齿轮状),或者使用快捷键 `Ctrl + Shift + J`。 | ||
| 3. 在左侧设置菜单中,选择 **Models**(模型)。 | ||
| 4. 在模型页面,你可能需要点击 **"View All Models"**(查看所有模型)或向下滚动到底部,以找到完整的配置选项。 | ||
|
|
||
| ### 步骤 2:配置 OpenAI Base URL | ||
|
|
||
| Cursor 允许你添加自定义的 OpenAI 兼容接口。 | ||
|
|
||
| 1. 在 Models 页面,找到 **OpenAI API Key** 部分。 | ||
| 2. 确保开关已启用。 | ||
| 3. **填写 API Key**:在输入框中填入你的 Aiberm API Key(以 `sk-` 开头)。 | ||
| 4. 点击输入框下方的 **"Override OpenAI Base URL"**(覆盖 OpenAI 基础 URL)。 | ||
| 5. **填写 Base URL**:输入 `https://aiberm.com/v1/`。 | ||
|
|
||
| <Callout client:load type="warning"> | ||
| **注意**:Base URL 结尾的 `v1` 后面 **不要** 跟 `/models`,Cursor 会自动补全路径。 | ||
| </Callout> | ||
|
|
||
| <Callout client:load type="tip"> | ||
| 截图:配置 API Key 和 Base URL。 | ||
| </Callout> | ||
|
|
||
|  | ||
|
|
||
| ### 步骤 3:添加自定义模型 | ||
|
|
||
| 为了使用 Aiberm 提供的特定模型(如最新版 GPT 或 Claude),你需要手动将它们添加到 Cursor 中。 | ||
|
|
||
| 1. 在 Models 页面,向下滚动找到 **"Model Names"** 列表下方。 | ||
| 2. 点击 **"+ Add Custom Model"**(添加自定义模型)。 | ||
|
|
||
| <Callout client:load type="tip"> | ||
| 截图:在 Cursor 中点击添加自定义模型。 | ||
| </Callout> | ||
|
|
||
|  | ||
|
|
||
| 3. **获取模型名称**:登录 [Aiberm 控制台](https://aiberm.com/),进入“模型与价格”页面。 | ||
| 4. 复制你想要使用的模型名称(例如 `openai/gpt-5.3-codex`)。 | ||
|
|
||
| <Callout client:load type="tip"> | ||
| 截图:在 Aiberm 控制台复制模型名称。 | ||
| </Callout> | ||
|
|
||
|  | ||
|
|
||
| 5. 将复制的名称粘贴到 Cursor 的输入框中,并点击添加。 | ||
| 6. 确保新添加的模型开关已 **开启 (ON)**。 | ||
|
|
||
| <Callout client:load type="tip"> | ||
| **推荐模型配置:** | ||
| - **Chat**: 推荐使用 `claude-3-7-sonnet-20250219` 或 `gpt-4o` 以获得最佳的对话体验。 | ||
| - **Composer**: `claude-3-7-sonnet-20250219` 在处理多文件复杂任务时表现出色。 | ||
| </Callout> | ||
|
|
||
| ### 步骤 4:验证配置 | ||
|
|
||
| 1. 关闭设置页面。 | ||
| 2. 使用 `Ctrl + L` (Windows/Linux) / `Cmd + L` (macOS) 打开对话面板。 | ||
| 3. 在对话框下方的模型选择器中,选择你刚刚添加的模型(例如 `claude-3-7-sonnet-20250219`)。 | ||
| 4. 输入一个测试问题,例如:“你好,请用 Python 写一个快速排序算法。” | ||
| 5. 如果 Cursor 成功回复,说明配置成功! | ||
|
|
||
| ## 常见问题 | ||
|
|
||
| ### Cursor Tab (自动补全) 能用吗? | ||
| Cursor Tab (原 Copilot++) 通常依赖 Cursor 自己的模型服务。虽然你可以配置 Chat 和 Composer 使用 Aiberm,但 Tab 功能可能需要 Cursor 的 Pro 订阅或默认设置。如果你希望完全使用 Aiberm,建议主要依赖 Chat 和 Composer 功能。 | ||
|
|
||
| ### 为什么模型回答很慢? | ||
| 请检查你的网络连接,并确保 Base URL 设置正确。某些复杂的推理模型(如 Claude 3 Opus)本身响应速度可能较慢,建议尝试 `claude-3-5-sonnet` 或 `gpt-4o-mini` 进行快速交互。 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些文件是干嘛的?无关的文件需要删掉