feat: 支持 cursor cli#5
Open
Daydreamer114 wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 为现有的 GitHub composite action 增加了对 Cursor CLI 的支持,使其除了 Copilot CLI 之外,也可以选择 Cursor 作为分析后端,并继续以“流式更新同一条 Issue 评论”的方式输出分析过程与最终结论。
Changes:
- 在 action 输入中新增
ai-provider/cursor-api-key/cursor-model,并在运行时按 provider 分支安装与调用对应 CLI - 新增 Cursor 模式下的 API key 解析与校验逻辑,并复用原有的流式评论更新机制
- 更新 README 接入文档并新增一个 Cursor 专用示例 workflow
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| README.md | 补充 Cursor CLI 的接入说明与新增输入参数解释 |
| action.yml | 增加 provider 选择、Cursor CLI 安装/鉴权/执行分支逻辑 |
| .github/workflows/ai-issue-analysis-cursor.yml | 新增一个 workflow_dispatch 的 Cursor 示例工作流 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if: ${{ steps.provider.outputs.provider == 'cursor' }} | ||
| shell: bash | ||
| run: | | ||
| curl https://cursor.com/install -fsS | bash |
Author
There was a problem hiding this comment.
cursor不提供校验和,故不做校验,仅使用官方链接下载
Comment on lines
+401
to
+406
|
|
||
| cursor-agent -p "$(cat "$ANALYSIS_PROMPT_FILE")" \ | ||
| --force \ | ||
| --model "$CURSOR_MODEL" \ | ||
| --output-format text > "$OUTPUT_FILE" 2>&1 & | ||
| AGENT_PID=$! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.