Changesets · Branches · Tags · Compare
| Changeset | e8ff68216a2eb894d70c4db57caba6775160cad3527c806732ead01a78e39f02 |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-08-14 17:12 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-08-14 17:12 +05:30 |
| Parents | f433400a74a4, daf46022d59b |
12 files changed
modified .github/pull_request_template.md +1 −1
| @@ -5,7 +5,7 @@ | ||
| 5 | 5 | ## AI Code Review |
| 6 | 6 | |
| 7 | 7 | - **Team members only**: AI review runs automatically when PR is opened or marked ready for review |
| 8 | -- Team members can also trigger a review by commenting `@continue-review` | |
| 8 | +- Team members can also trigger a review by commenting `@continue-general-review` or `@continue-detailed-review` | |
| 9 | 9 | |
| 10 | 10 | ## Checklist |
| 11 | 11 |
added .github/workflows/continue-detailed-review.yaml +310 −0
| @@ -0,0 +1,310 @@ | ||
| 1 | +name: Continue Detailed Review | |
| 2 | + | |
| 3 | +on: | |
| 4 | + pull_request: | |
| 5 | + types: [opened, ready_for_review] | |
| 6 | + issue_comment: | |
| 7 | + types: [created] | |
| 8 | + | |
| 9 | +permissions: | |
| 10 | + contents: read | |
| 11 | + pull-requests: write | |
| 12 | + issues: write | |
| 13 | + | |
| 14 | +jobs: | |
| 15 | + detailed-code-review: | |
| 16 | + name: Continue Detailed Review | |
| 17 | + runs-on: ubuntu-latest | |
| 18 | + timeout-minutes: 10 | |
| 19 | + # Only run if: | |
| 20 | + # - It's a PR event from a team member (with write/admin permissions) | |
| 21 | + # - OR it's a comment with @continue-detailed-review on a PR from a team member | |
| 22 | + if: > | |
| 23 | + (github.event_name == 'pull_request' && | |
| 24 | + (github.event.pull_request.author_association == 'OWNER' || | |
| 25 | + github.event.pull_request.author_association == 'MEMBER' || | |
| 26 | + github.event.pull_request.author_association == 'COLLABORATOR')) || | |
| 27 | + (github.event_name == 'issue_comment' && | |
| 28 | + github.event.issue.pull_request && | |
| 29 | + contains(github.event.comment.body, '@continue-detailed-review') && | |
| 30 | + (github.event.comment.author_association == 'OWNER' || | |
| 31 | + github.event.comment.author_association == 'MEMBER' || | |
| 32 | + github.event.comment.author_association == 'COLLABORATOR')) | |
| 33 | + | |
| 34 | + steps: | |
| 35 | + - name: Checkout Repository | |
| 36 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| 37 | + with: | |
| 38 | + fetch-depth: 0 # Fetch full history for better context | |
| 39 | + | |
| 40 | + - name: Setup Node.js | |
| 41 | + uses: actions/setup-node@v4 | |
| 42 | + with: | |
| 43 | + node-version: 20 | |
| 44 | + | |
| 45 | + - name: Install Continue CLI | |
| 46 | + run: npm install -g @continuedev/cli@1.4.25 | |
| 47 | + | |
| 48 | + - name: Build Inline Review Prompt | |
| 49 | + run: | | |
| 50 | + # Get PR number based on event type | |
| 51 | + if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| 52 | + PR_NUMBER="${{ github.event.number }}" | |
| 53 | + else | |
| 54 | + # For issue_comment event on a PR | |
| 55 | + PR_NUMBER="${{ github.event.issue.number }}" | |
| 56 | + fi | |
| 57 | + | |
| 58 | + # Get PR files with line numbers | |
| 59 | + gh api repos/${{ github.repository }}/pulls/$PR_NUMBER/files > pr_files.json | |
| 60 | + | |
| 61 | + # Get PR diff with context | |
| 62 | + gh pr diff $PR_NUMBER --color=never > pr_diff.txt | |
| 63 | + | |
| 64 | + # Annotate diff with position numbers for easy reference | |
| 65 | + awk ' | |
| 66 | + /^@@/ { | |
| 67 | + pos = 0 | |
| 68 | ||
| 69 | + next | |
| 70 | + } | |
| 71 | + /^diff --git/ || /^index / || /^--- / || /^\+\+\+ / { | |
| 72 | ||
| 73 | + next | |
| 74 | + } | |
| 75 | + { | |
| 76 | + pos++ | |
| 77 | + printf "[POS:%d] %s\n", pos, $0 | |
| 78 | + } | |
| 79 | + ' pr_diff.txt > pr_diff_annotated.txt | |
| 80 | + | |
| 81 | + # Create review prompt for inline comments | |
| 82 | + cat > inline_review_prompt.txt << 'EOF' | |
| 83 | + You are conducting a detailed inline code review for a pull request. | |
| 84 | + | |
| 85 | + Your task is to analyze the code changes and generate specific, actionable review comments for individual lines or small sections of code. | |
| 86 | + | |
| 87 | + IMPORTANT: The diff below has been annotated with [POS:N] markers showing the exact position for each line. | |
| 88 | + | |
| 89 | + Example of how to use the position markers: | |
| 90 | + ``` | |
| 91 | + diff --git a/src/app.js b/src/app.js | |
| 92 | + index abc123..def456 100644 | |
| 93 | + --- a/src/app.js | |
| 94 | + +++ b/src/app.js | |
| 95 | + @@ -10,4 +10,6 @@ function example() { | |
| 96 | + [POS:1] console.log("context"); | |
| 97 | + [POS:2] - const old = "remove this"; | |
| 98 | + [POS:3] + const new = "add this"; | |
| 99 | + [POS:4] + const risky = eval(userInput); <-- To comment here, use position: 4 | |
| 100 | + [POS:5] return result; | |
| 101 | + [POS:6] + console.log("done"); | |
| 102 | + @@ -20,3 +22,4 @@ function another() { | |
| 103 | + [POS:1] let x = 1; | |
| 104 | + [POS:2] + let y = 2; <-- To comment here, use position: 2 | |
| 105 | + ``` | |
| 106 | + | |
| 107 | + To comment on a line, simply use the number from its [POS:N] marker as the position value. | |
| 108 | + For example: {"path": "src/app.js", "position": 4, "body": "Avoid using eval with user input"} | |
| 109 | + | |
| 110 | + Below is the annotated PR diff: | |
| 111 | + | |
| 112 | + EOF | |
| 113 | + | |
| 114 | + cat pr_diff_annotated.txt >> inline_review_prompt.txt | |
| 115 | + | |
| 116 | + cat >> inline_review_prompt.txt << 'EOF' | |
| 117 | + | |
| 118 | + Please analyze these changes and provide inline review comments in the following JSON format: | |
| 119 | + | |
| 120 | + { | |
| 121 | + "review_summary": "Overall assessment of the PR", | |
| 122 | + "comments": [ | |
| 123 | + { | |
| 124 | + "path": "path/to/file.js", | |
| 125 | + "position": 4, | |
| 126 | + "body": "Brief, specific comment about this line or section" | |
| 127 | + } | |
| 128 | + ] | |
| 129 | + } | |
| 130 | + | |
| 131 | + Focus on: | |
| 132 | + 1. **Critical Issues**: Security vulnerabilities, bugs that will break functionality | |
| 133 | + 2. **High Priority**: Performance problems, incorrect logic, missing error handling | |
| 134 | + 3. **Medium Priority**: Code style violations, potential edge cases, unclear code | |
| 135 | + 4. **Low Priority**: Suggestions for improvement, refactoring opportunities | |
| 136 | + | |
| 137 | + Guidelines for comments: | |
| 138 | + - Be specific and actionable | |
| 139 | + - Use the [POS:N] number shown in the diff as the position value | |
| 140 | + - Keep comments concise but informative | |
| 141 | + - Suggest concrete improvements when pointing out issues | |
| 142 | + - Only comment on actual problems or important improvements | |
| 143 | + | |
| 144 | + Important: | |
| 145 | + - Output ONLY valid JSON, no additional text | |
| 146 | + - Use the exact number from [POS:N] markers as the position | |
| 147 | + - Only comment on changed lines (lines with + or - prefix) | |
| 148 | + - Comment on the most important issues first | |
| 149 | + - Limit to maximum 20 most relevant comments | |
| 150 | + EOF | |
| 151 | + env: | |
| 152 | + GH_TOKEN: ${{ github.token }} | |
| 153 | + | |
| 154 | + - name: Run Continue CLI Inline Review | |
| 155 | + run: | | |
| 156 | + echo "Running Continue CLI for inline review..." | |
| 157 | + | |
| 158 | + # Log the prompt for debugging | |
| 159 | + echo "===== START REVIEW PROMPT =====" | |
| 160 | + head -n 50 inline_review_prompt.txt | |
| 161 | + echo "... [diff content] ..." | |
| 162 | + tail -n 20 inline_review_prompt.txt | |
| 163 | + echo "===== END REVIEW PROMPT =====" | |
| 164 | + | |
| 165 | + # Run the CLI and capture JSON output | |
| 166 | + cat inline_review_prompt.txt | cn --readonly --format json --org continuedev --config continuedev/review-bot -p > inline_review_raw.json | |
| 167 | + | |
| 168 | + # Log the output for debugging | |
| 169 | + echo "Initial Continue CLI output:" | |
| 170 | + cat inline_review_raw.json | |
| 171 | + | |
| 172 | + # Validate JSON output | |
| 173 | + if ! jq empty inline_review_raw.json 2>/dev/null; then | |
| 174 | + echo "Invalid JSON output from Continue CLI" | |
| 175 | + echo "{\"review_summary\": \"Failed to generate review\", \"comments\": []}" > inline_review.json | |
| 176 | + else | |
| 177 | + # Use the output directly since positions are already correct | |
| 178 | + cp inline_review_raw.json inline_review.json | |
| 179 | + echo "Review output:" | |
| 180 | + cat inline_review.json | |
| 181 | + fi | |
| 182 | + env: | |
| 183 | + CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} | |
| 184 | + | |
| 185 | + - name: Post Inline Review Comments | |
| 186 | + uses: actions/github-script@v7 | |
| 187 | + with: | |
| 188 | + script: | | |
| 189 | + const fs = require('fs'); | |
| 190 | + | |
| 191 | + try { | |
| 192 | + // Read the review output | |
| 193 | + let reviewData; | |
| 194 | + try { | |
| 195 | + const reviewContent = fs.readFileSync('inline_review.json', 'utf8'); | |
| 196 | + reviewData = JSON.parse(reviewContent); | |
| 197 | + } catch (parseError) { | |
| 198 | + console.log('Failed to parse review JSON:', parseError); | |
| 199 | + reviewData = { | |
| 200 | + review_summary: 'AI review completed but failed to parse output', | |
| 201 | + comments: [] | |
| 202 | + }; | |
| 203 | + } | |
| 204 | + | |
| 205 | + // Get PR number | |
| 206 | + let prNumber; | |
| 207 | + if (context.eventName === 'pull_request') { | |
| 208 | + prNumber = context.payload.pull_request.number; | |
| 209 | + } else { | |
| 210 | + prNumber = context.payload.issue.number; | |
| 211 | + } | |
| 212 | + | |
| 213 | + // Get the latest commit SHA | |
| 214 | + const { data: pr } = await github.rest.pulls.get({ | |
| 215 | + owner: context.repo.owner, | |
| 216 | + repo: context.repo.repo, | |
| 217 | + pull_number: prNumber | |
| 218 | + }); | |
| 219 | + | |
| 220 | + const commitSha = pr.head.sha; | |
| 221 | + | |
| 222 | + // Prepare review comments - filter out comments without required fields | |
| 223 | + const allComments = reviewData.comments || []; | |
| 224 | + const validComments = allComments.filter(comment => | |
| 225 | + comment.position && | |
| 226 | + comment.path && | |
| 227 | + comment.body && | |
| 228 | + typeof comment.position === 'number' && | |
| 229 | + comment.position > 0 | |
| 230 | + ); | |
| 231 | + | |
| 232 | + if (validComments.length < allComments.length) { | |
| 233 | + console.log(`Filtered out ${allComments.length - validComments.length} comments due to missing/invalid position, path, or body`); | |
| 234 | + const invalidComments = allComments.filter(c => !validComments.includes(c)); | |
| 235 | + console.log('Invalid comments:', JSON.stringify(invalidComments, null, 2)); | |
| 236 | + } | |
| 237 | + | |
| 238 | + const comments = validComments.map(comment => ({ | |
| 239 | + path: comment.path, | |
| 240 | + position: comment.position, | |
| 241 | + body: comment.body | |
| 242 | + })); | |
| 243 | + | |
| 244 | + // Create the review | |
| 245 | + if (comments.length > 0) { | |
| 246 | + try { | |
| 247 | + await github.rest.pulls.createReview({ | |
| 248 | + owner: context.repo.owner, | |
| 249 | + repo: context.repo.repo, | |
| 250 | + pull_number: prNumber, | |
| 251 | + commit_id: commitSha, | |
| 252 | + body: reviewData.review_summary || 'AI Code Review', | |
| 253 | + event: 'COMMENT', | |
| 254 | + comments: comments | |
| 255 | + }); | |
| 256 | + console.log(`Successfully created review with ${comments.length} inline comments`); | |
| 257 | + } catch (reviewError) { | |
| 258 | + console.log('Failed to create review:', reviewError.message); | |
| 259 | + | |
| 260 | + // Fallback: post as a regular comment if review creation fails | |
| 261 | + const fallbackBody = `## AI Code Review\n\n${reviewData.review_summary}\n\n` + | |
| 262 | + `*Failed to post ${comments.length} inline comments. Please review the changes manually.*`; | |
| 263 | + | |
| 264 | + await github.rest.issues.createComment({ | |
| 265 | + issue_number: prNumber, | |
| 266 | + owner: context.repo.owner, | |
| 267 | + repo: context.repo.repo, | |
| 268 | + body: fallbackBody | |
| 269 | + }); | |
| 270 | + } | |
| 271 | + } else { | |
| 272 | + // No inline comments, just post the summary | |
| 273 | + await github.rest.issues.createComment({ | |
| 274 | + issue_number: prNumber, | |
| 275 | + owner: context.repo.owner, | |
| 276 | + repo: context.repo.repo, | |
| 277 | + body: `## AI Code Review\n\n${reviewData.review_summary}\n\n*No specific line comments generated.*` | |
| 278 | + }); | |
| 279 | + } | |
| 280 | + | |
| 281 | + // Add triggered by note if from comment | |
| 282 | + if (context.eventName === 'issue_comment') { | |
| 283 | + await github.rest.issues.createComment({ | |
| 284 | + issue_number: prNumber, | |
| 285 | + owner: context.repo.owner, | |
| 286 | + repo: context.repo.repo, | |
| 287 | + body: `*Inline review triggered by @${context.payload.comment.user.login}*` | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + | |
| 291 | + } catch (error) { | |
| 292 | + console.log('Failed to post review:', error.message); | |
| 293 | + console.log('Error details:', error); | |
| 294 | + } | |
| 295 | + env: | |
| 296 | + GITHUB_TOKEN: ${{ github.token }} | |
| 297 | + | |
| 298 | + - name: Upload Review Artifacts | |
| 299 | + uses: actions/upload-artifact@v4 | |
| 300 | + if: always() | |
| 301 | + with: | |
| 302 | + name: inline-review-results | |
| 303 | + path: | | |
| 304 | + inline_review_raw.json | |
| 305 | + inline_review.json | |
| 306 | + inline_review_prompt.txt | |
| 307 | + pr_files.json | |
| 308 | + pr_diff.txt | |
| 309 | + pr_diff_annotated.txt | |
| 310 | + retention-days: 7 |
added .github/workflows/continue-general-review.yaml +186 −0
| @@ -0,0 +1,186 @@ | ||
| 1 | +name: Continue General Review | |
| 2 | + | |
| 3 | +on: | |
| 4 | + pull_request: | |
| 5 | + types: [opened, ready_for_review] | |
| 6 | + issue_comment: | |
| 7 | + types: [created] | |
| 8 | + | |
| 9 | +permissions: | |
| 10 | + contents: read | |
| 11 | + pull-requests: write | |
| 12 | + issues: write | |
| 13 | + | |
| 14 | +jobs: | |
| 15 | + general-code-review: | |
| 16 | + name: Continue General Review | |
| 17 | + runs-on: ubuntu-latest | |
| 18 | + timeout-minutes: 10 | |
| 19 | + # Only run if: | |
| 20 | + # - It's a PR event from a team member (with write/admin permissions) | |
| 21 | + # - OR it's a comment with @continue-general-review on a PR from a team member | |
| 22 | + if: | | |
| 23 | + (github.event_name == 'pull_request' && | |
| 24 | + (github.event.pull_request.author_association == 'OWNER' || | |
| 25 | + github.event.pull_request.author_association == 'MEMBER' || | |
| 26 | + github.event.pull_request.author_association == 'COLLABORATOR')) || | |
| 27 | + (github.event_name == 'issue_comment' && | |
| 28 | + github.event.issue.pull_request && | |
| 29 | + contains(github.event.comment.body, '@continue-general-review') && | |
| 30 | + (github.event.comment.author_association == 'OWNER' || | |
| 31 | + github.event.comment.author_association == 'MEMBER' || | |
| 32 | + github.event.comment.author_association == 'COLLABORATOR')) | |
| 33 | + | |
| 34 | + steps: | |
| 35 | + - name: Checkout Repository | |
| 36 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| 37 | + with: | |
| 38 | + fetch-depth: 0 # Fetch full history for better context | |
| 39 | + | |
| 40 | + - name: Setup Node.js | |
| 41 | + uses: actions/setup-node@v4 | |
| 42 | + with: | |
| 43 | + node-version: 20 | |
| 44 | + | |
| 45 | + - name: Install Continue CLI | |
| 46 | + run: npm install -g @continuedev/cli@1.4.25 | |
| 47 | + | |
| 48 | + - name: Build PR Review Prompt | |
| 49 | + run: | | |
| 50 | + # Get PR number based on event type | |
| 51 | + if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| 52 | + PR_NUMBER="${{ github.event.number }}" | |
| 53 | + else | |
| 54 | + # For issue_comment event on a PR | |
| 55 | + PR_NUMBER="${{ github.event.issue.number }}" | |
| 56 | + fi | |
| 57 | + | |
| 58 | + # Get PR diff | |
| 59 | + gh pr diff $PR_NUMBER > pr_diff.txt | |
| 60 | + | |
| 61 | + # Create review prompt | |
| 62 | + cat > review_prompt.txt << 'EOF' | |
| 63 | + You are conducting a code review for a pull request. Below is the git diff showing all the changes: | |
| 64 | + | |
| 65 | + EOF | |
| 66 | + | |
| 67 | + echo "--- PR DIFF START ---" >> review_prompt.txt | |
| 68 | + cat pr_diff.txt >> review_prompt.txt | |
| 69 | + echo "--- PR DIFF END ---" >> review_prompt.txt | |
| 70 | + | |
| 71 | + cat >> review_prompt.txt << 'EOF' | |
| 72 | + | |
| 73 | + Please analyze these changes and provide a comprehensive code review. Consider: | |
| 74 | + | |
| 75 | + 1. **Code Quality**: Are there any bugs, performance issues, or code smells? | |
| 76 | + 2. **Best Practices**: Does the code follow established patterns and conventions? | |
| 77 | + 3. **Security**: Are there any potential security vulnerabilities? | |
| 78 | + 4. **Testing**: Are appropriate tests included or updated? | |
| 79 | + 5. **Documentation**: Is documentation adequate for the changes? | |
| 80 | + 6. **Architecture**: Do the changes fit well with the existing codebase structure? | |
| 81 | + | |
| 82 | + You can use the available tools to explore the codebase and understand context better. | |
| 83 | + | |
| 84 | + Format your response as a markdown code review with the following structure: | |
| 85 | + | |
| 86 | + ## Code Review Summary | |
| 87 | + | |
| 88 | + ### ✅ Strengths | |
| 89 | + - **[Aspect]**: [Description of what was done well] | |
| 90 | + | |
| 91 | + ### ⚠️ Issues Found | |
| 92 | + | |
| 93 | + Only include the severity subheaders below if you actually found issues at that level: | |
| 94 | + | |
| 95 | + #### Critical | |
| 96 | + - **[Issue Title]**: [Description of critical issues that must be fixed before merging] | |
| 97 | + | |
| 98 | + #### High | |
| 99 | + - **[Issue Title]**: [Description of high-priority issues that should be fixed] | |
| 100 | + | |
| 101 | + #### Medium | |
| 102 | + - **[Issue Title]**: [Description of issues that should be addressed] | |
| 103 | + | |
| 104 | + #### Low | |
| 105 | + - **[Issue Title]**: [Description of minor issues or nice-to-have improvements] | |
| 106 | + | |
| 107 | + | |
| 108 | + ### 💡 Suggestions | |
| 109 | + - **[Suggestion Title]**: [Description of improvement recommendations] | |
| 110 | + | |
| 111 | + ### 🚀 Overall Assessment | |
| 112 | + [Provide overall recommendation: APPROVE, REQUEST_CHANGES, or COMMENT] | |
| 113 | + | |
| 114 | + Only call the 'exit' tool if you find critical security vulnerabilities or bugs that would break production. | |
| 115 | + EOF | |
| 116 | + env: | |
| 117 | + GH_TOKEN: ${{ github.token }} | |
| 118 | + | |
| 119 | + - name: Run Continue CLI Review | |
| 120 | + run: | | |
| 121 | + echo "Running Continue CLI with prompt:" | |
| 122 | + echo "==================================" | |
| 123 | + cat review_prompt.txt | |
| 124 | + echo "==================================" | |
| 125 | + echo "" | |
| 126 | + | |
| 127 | + # Run the CLI with hardcoded assistant and pipe output to code_review.md | |
| 128 | + cat review_prompt.txt | cn --readonly --org continuedev --config continuedev/review-bot -p > code_review.md | |
| 129 | + env: | |
| 130 | + CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} | |
| 131 | + | |
| 132 | + - name: Upload Review Results | |
| 133 | + uses: actions/upload-artifact@v4 | |
| 134 | + if: always() | |
| 135 | + with: | |
| 136 | + name: code-review-results | |
| 137 | + path: | | |
| 138 | + code_review.md | |
| 139 | + review_prompt.txt | |
| 140 | + pr_diff.txt | |
| 141 | + retention-days: 30 | |
| 142 | + | |
| 143 | + - name: Comment PR with Review | |
| 144 | + if: always() | |
| 145 | + uses: actions/github-script@v7 | |
| 146 | + with: | |
| 147 | + script: | | |
| 148 | + const fs = require('fs'); | |
| 149 | + | |
| 150 | + try { | |
| 151 | + let reviewContent = ''; | |
| 152 | + | |
| 153 | + if (fs.existsSync('code_review.md') && fs.statSync('code_review.md').size > 0) { | |
| 154 | + reviewContent = fs.readFileSync('code_review.md', 'utf8'); | |
| 155 | + } else { | |
| 156 | + reviewContent = '⚠️ AI review completed but no review output was generated. Check the action logs for details.'; | |
| 157 | + } | |
| 158 | + | |
| 159 | + // Get PR number based on event type | |
| 160 | + let prNumber; | |
| 161 | + if (context.eventName === 'pull_request') { | |
| 162 | + prNumber = context.payload.pull_request.number; | |
| 163 | + } else { | |
| 164 | + // For issue_comment event | |
| 165 | + prNumber = context.payload.issue.number; | |
| 166 | + } | |
| 167 | + | |
| 168 | + // Add a header if triggered by comment | |
| 169 | + if (context.eventName === 'issue_comment') { | |
| 170 | + reviewContent = `*Triggered by @${context.payload.comment.user.login}'s request*\n\n${reviewContent}`; | |
| 171 | + } | |
| 172 | + | |
| 173 | + // Create new comment | |
| 174 | + await github.rest.issues.createComment({ | |
| 175 | + issue_number: prNumber, | |
| 176 | + owner: context.repo.owner, | |
| 177 | + repo: context.repo.repo, | |
| 178 | + body: reviewContent | |
| 179 | + }); | |
| 180 | + console.log(`Successfully created new comment on PR #${prNumber}`); | |
| 181 | + } catch (error) { | |
| 182 | + console.log('Failed to post comment:', error.message); | |
| 183 | + console.log('Error details:', error); | |
| 184 | + } | |
| 185 | + env: | |
| 186 | + GITHUB_TOKEN: ${{ github.token }} |
deleted .github/workflows/continue-review.yaml +0 −186
| @@ -1,186 +0,0 @@ | ||
| 1 | -name: Continue CLI Code Review | |
| 2 | - | |
| 3 | -on: | |
| 4 | - pull_request: | |
| 5 | - types: [opened, ready_for_review] | |
| 6 | - issue_comment: | |
| 7 | - types: [created] | |
| 8 | - | |
| 9 | -permissions: | |
| 10 | - contents: read | |
| 11 | - pull-requests: write | |
| 12 | - issues: write | |
| 13 | - | |
| 14 | -jobs: | |
| 15 | - code-review: | |
| 16 | - name: AI Code Review | |
| 17 | - runs-on: ubuntu-latest | |
| 18 | - timeout-minutes: 10 | |
| 19 | - # Only run if: | |
| 20 | - # - It's a PR event from a team member (with write/admin permissions) | |
| 21 | - # - OR it's a comment with @continue-review on a PR from a team member | |
| 22 | - if: | | |
| 23 | - (github.event_name == 'pull_request' && | |
| 24 | - (github.event.pull_request.author_association == 'OWNER' || | |
| 25 | - github.event.pull_request.author_association == 'MEMBER' || | |
| 26 | - github.event.pull_request.author_association == 'COLLABORATOR')) || | |
| 27 | - (github.event_name == 'issue_comment' && | |
| 28 | - github.event.issue.pull_request && | |
| 29 | - contains(github.event.comment.body, '@continue-review') && | |
| 30 | - (github.event.comment.author_association == 'OWNER' || | |
| 31 | - github.event.comment.author_association == 'MEMBER' || | |
| 32 | - github.event.comment.author_association == 'COLLABORATOR')) | |
| 33 | - | |
| 34 | - steps: | |
| 35 | - - name: Checkout Repository | |
| 36 | - uses: actions/checkout@v4 | |
| 37 | - with: | |
| 38 | - fetch-depth: 0 # Fetch full history for better context | |
| 39 | - | |
| 40 | - - name: Setup Node.js | |
| 41 | - uses: actions/setup-node@v4 | |
| 42 | - with: | |
| 43 | - node-version: 20 | |
| 44 | - | |
| 45 | - - name: Install Continue CLI | |
| 46 | - run: npm install -g @continuedev/cli@1.4.25 | |
| 47 | - | |
| 48 | - - name: Build PR Review Prompt | |
| 49 | - run: | | |
| 50 | - # Get PR number based on event type | |
| 51 | - if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| 52 | - PR_NUMBER="${{ github.event.number }}" | |
| 53 | - else | |
| 54 | - # For issue_comment event on a PR | |
| 55 | - PR_NUMBER="${{ github.event.issue.number }}" | |
| 56 | - fi | |
| 57 | - | |
| 58 | - # Get PR diff | |
| 59 | - gh pr diff $PR_NUMBER > pr_diff.txt | |
| 60 | - | |
| 61 | - # Create review prompt | |
| 62 | - cat > review_prompt.txt << 'EOF' | |
| 63 | - You are conducting a code review for a pull request. Below is the git diff showing all the changes: | |
| 64 | - | |
| 65 | - EOF | |
| 66 | - | |
| 67 | - echo "--- PR DIFF START ---" >> review_prompt.txt | |
| 68 | - cat pr_diff.txt >> review_prompt.txt | |
| 69 | - echo "--- PR DIFF END ---" >> review_prompt.txt | |
| 70 | - | |
| 71 | - cat >> review_prompt.txt << 'EOF' | |
| 72 | - | |
| 73 | - Please analyze these changes and provide a comprehensive code review. Consider: | |
| 74 | - | |
| 75 | - 1. **Code Quality**: Are there any bugs, performance issues, or code smells? | |
| 76 | - 2. **Best Practices**: Does the code follow established patterns and conventions? | |
| 77 | - 3. **Security**: Are there any potential security vulnerabilities? | |
| 78 | - 4. **Testing**: Are appropriate tests included or updated? | |
| 79 | - 5. **Documentation**: Is documentation adequate for the changes? | |
| 80 | - 6. **Architecture**: Do the changes fit well with the existing codebase structure? | |
| 81 | - | |
| 82 | - You can use the available tools to explore the codebase and understand context better. | |
| 83 | - | |
| 84 | - Format your response as a markdown code review with the following structure: | |
| 85 | - | |
| 86 | - ## Code Review Summary | |
| 87 | - | |
| 88 | - ### ✅ Strengths | |
| 89 | - - **[Aspect]**: [Description of what was done well] | |
| 90 | - | |
| 91 | - ### ⚠️ Issues Found | |
| 92 | - | |
| 93 | - Only include the severity subheaders below if you actually found issues at that level: | |
| 94 | - | |
| 95 | - #### Critical | |
| 96 | - - **[Issue Title]**: [Description of critical issues that must be fixed before merging] | |
| 97 | - | |
| 98 | - #### High | |
| 99 | - - **[Issue Title]**: [Description of high-priority issues that should be fixed] | |
| 100 | - | |
| 101 | - #### Medium | |
| 102 | - - **[Issue Title]**: [Description of issues that should be addressed] | |
| 103 | - | |
| 104 | - #### Low | |
| 105 | - - **[Issue Title]**: [Description of minor issues or nice-to-have improvements] | |
| 106 | - | |
| 107 | - | |
| 108 | - ### 💡 Suggestions | |
| 109 | - - **[Suggestion Title]**: [Description of improvement recommendations] | |
| 110 | - | |
| 111 | - ### 🚀 Overall Assessment | |
| 112 | - [Provide overall recommendation: APPROVE, REQUEST_CHANGES, or COMMENT] | |
| 113 | - | |
| 114 | - Only call the 'exit' tool if you find critical security vulnerabilities or bugs that would break production. | |
| 115 | - EOF | |
| 116 | - env: | |
| 117 | - GH_TOKEN: ${{ github.token }} | |
| 118 | - | |
| 119 | - - name: Run Continue CLI Review | |
| 120 | - run: | | |
| 121 | - echo "Running Continue CLI with prompt:" | |
| 122 | - echo "==================================" | |
| 123 | - cat review_prompt.txt | |
| 124 | - echo "==================================" | |
| 125 | - echo "" | |
| 126 | - | |
| 127 | - # Run the CLI with hardcoded assistant and pipe output to code_review.md | |
| 128 | - cat review_prompt.txt | cn --readonly --org continuedev --config continuedev/review-bot -p > code_review.md | |
| 129 | - env: | |
| 130 | - CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} | |
| 131 | - | |
| 132 | - - name: Upload Review Results | |
| 133 | - uses: actions/upload-artifact@v4 | |
| 134 | - if: always() | |
| 135 | - with: | |
| 136 | - name: code-review-results | |
| 137 | - path: | | |
| 138 | - code_review.md | |
| 139 | - review_prompt.txt | |
| 140 | - pr_diff.txt | |
| 141 | - retention-days: 30 | |
| 142 | - | |
| 143 | - - name: Comment PR with Review | |
| 144 | - if: always() | |
| 145 | - uses: actions/github-script@v7 | |
| 146 | - with: | |
| 147 | - script: | | |
| 148 | - const fs = require('fs'); | |
| 149 | - | |
| 150 | - try { | |
| 151 | - let reviewContent = ''; | |
| 152 | - | |
| 153 | - if (fs.existsSync('code_review.md') && fs.statSync('code_review.md').size > 0) { | |
| 154 | - reviewContent = fs.readFileSync('code_review.md', 'utf8'); | |
| 155 | - } else { | |
| 156 | - reviewContent = '⚠️ AI review completed but no review output was generated. Check the action logs for details.'; | |
| 157 | - } | |
| 158 | - | |
| 159 | - // Get PR number based on event type | |
| 160 | - let prNumber; | |
| 161 | - if (context.eventName === 'pull_request') { | |
| 162 | - prNumber = context.payload.pull_request.number; | |
| 163 | - } else { | |
| 164 | - // For issue_comment event | |
| 165 | - prNumber = context.payload.issue.number; | |
| 166 | - } | |
| 167 | - | |
| 168 | - // Add a header if triggered by comment | |
| 169 | - if (context.eventName === 'issue_comment') { | |
| 170 | - reviewContent = `*Triggered by @${context.payload.comment.user.login}'s request*\n\n${reviewContent}`; | |
| 171 | - } | |
| 172 | - | |
| 173 | - // Create new comment | |
| 174 | - await github.rest.issues.createComment({ | |
| 175 | - issue_number: prNumber, | |
| 176 | - owner: context.repo.owner, | |
| 177 | - repo: context.repo.repo, | |
| 178 | - body: reviewContent | |
| 179 | - }); | |
| 180 | - console.log(`Successfully created new comment on PR #${prNumber}`); | |
| 181 | - } catch (error) { | |
| 182 | - console.log('Failed to post comment:', error.message); | |
| 183 | - console.log('Error details:', error); | |
| 184 | - } | |
| 185 | - env: | |
| 186 | - GITHUB_TOKEN: ${{ github.token }} |
modified .github/workflows/similar-issues.yml +41 −39
| @@ -7,6 +7,8 @@ | ||
| 7 | 7 | |
| 8 | 8 | jobs: |
| 9 | 9 | analyze: |
| 10 | + # Disabling for now due to bugs | |
| 11 | + if: false | |
| 10 | 12 | runs-on: ubuntu-latest |
| 11 | 13 | permissions: |
| 12 | 14 | issues: write |
| @@ -16,28 +18,28 @@ | ||
| 16 | 18 | - name: Checkout deja-view |
| 17 | 19 | uses: actions/checkout@v5 |
| 18 | 20 | with: |
| 19 | - repository: 'bdougie/deja-view' | |
| 21 | + repository: "bdougie/deja-view" | |
| 20 | 22 | # Option 1: Pin to specific commit (most secure) |
| 21 | - ref: '45e7696' # Pin to specific commit for stability | |
| 22 | - | |
| 23 | + ref: "45e7696" # Pin to specific commit for stability | |
| 24 | + | |
| 23 | 25 | # Option 2: Use a tag (recommended after creating releases) |
| 24 | 26 | # ref: 'v1.0.0' |
| 25 | - | |
| 27 | + | |
| 26 | 28 | # Option 3: Use main branch (least secure, gets latest changes) |
| 27 | 29 | # ref: 'main' |
| 28 | - | |
| 30 | + | |
| 29 | 31 | path: deja-view |
| 30 | 32 | |
| 31 | 33 | - name: Setup Python |
| 32 | 34 | uses: actions/setup-python@v5 |
| 33 | 35 | with: |
| 34 | - python-version: '3.11' | |
| 36 | + python-version: "3.11" | |
| 35 | 37 | |
| 36 | 38 | - name: Install dependencies |
| 37 | 39 | run: | |
| 38 | 40 | cd deja-view |
| 39 | 41 | pip install -r requirements.txt |
| 40 | - | |
| 42 | + | |
| 41 | 43 | - name: Index repository if needed |
| 42 | 44 | env: |
| 43 | 45 | CHROMA_API_KEY: ${{ secrets.CHROMA_CLOUD_API_KEY }} |
| @@ -46,10 +48,10 @@ | ||
| 46 | 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 47 | 49 | run: | |
| 48 | 50 | cd deja-view |
| 49 | - | |
| 51 | + | |
| 50 | 52 | # Index the repository (this will update existing index) |
| 51 | 53 | python cli.py index "${{ github.repository }}" --max-issues 200 || true |
| 52 | - | |
| 54 | + | |
| 53 | 55 | - name: Search for similar issues |
| 54 | 56 | id: search |
| 55 | 57 | env: |
| @@ -59,7 +61,7 @@ | ||
| 59 | 61 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | 62 | run: | |
| 61 | 63 | cd deja-view |
| 62 | - | |
| 64 | + | |
| 63 | 65 | # Determine if this is an issue or PR |
| 64 | 66 | if [ "${{ github.event_name }}" = "pull_request" ]; then |
| 65 | 67 | ISSUE_URL="https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" |
| @@ -70,26 +72,26 @@ | ||
| 70 | 72 | THRESHOLD="0.7" |
| 71 | 73 | TOP_K="5" |
| 72 | 74 | fi |
| 73 | - | |
| 75 | + | |
| 74 | 76 | # Create a Python script to search and format as JSON |
| 75 | 77 | cat << 'PYTHON_SCRIPT' > search_similar.py |
| 76 | 78 | import sys |
| 77 | 79 | import json |
| 78 | 80 | import os |
| 79 | 81 | from github_similarity_service import SimilarityService |
| 80 | - | |
| 82 | + | |
| 81 | 83 | issue_url = sys.argv[1] |
| 82 | 84 | threshold = float(sys.argv[2]) |
| 83 | 85 | top_k = int(sys.argv[3]) |
| 84 | - | |
| 86 | + | |
| 85 | 87 | # Parse issue number from URL |
| 86 | 88 | issue_number = int(issue_url.split('/')[-1]) |
| 87 | 89 | repo_parts = issue_url.split('/') |
| 88 | 90 | owner = repo_parts[3] |
| 89 | 91 | repo = repo_parts[4] |
| 90 | - | |
| 92 | + | |
| 91 | 93 | service = SimilarityService() |
| 92 | - | |
| 94 | + | |
| 93 | 95 | # Find similar issues |
| 94 | 96 | similar = service.find_similar_issues( |
| 95 | 97 | owner=owner, |
| @@ -98,26 +100,26 @@ | ||
| 98 | 100 | top_k=top_k, |
| 99 | 101 | min_similarity=threshold |
| 100 | 102 | ) |
| 101 | - | |
| 103 | + | |
| 102 | 104 | # Format as JSON |
| 103 | 105 | print(json.dumps(similar)) |
| 104 | 106 | PYTHON_SCRIPT |
| 105 | - | |
| 107 | + | |
| 106 | 108 | # Search for similar issues |
| 107 | 109 | SIMILAR_ISSUES=$(python search_similar.py "$ISSUE_URL" "$THRESHOLD" "$TOP_K") |
| 108 | - | |
| 110 | + | |
| 109 | 111 | # Save to output |
| 110 | 112 | echo "similar_issues<<EOF" >> $GITHUB_OUTPUT |
| 111 | 113 | echo "$SIMILAR_ISSUES" >> $GITHUB_OUTPUT |
| 112 | 114 | echo "EOF" >> $GITHUB_OUTPUT |
| 113 | - | |
| 115 | + | |
| 114 | 116 | # Check if any similar issues found |
| 115 | 117 | if [ "$(echo "$SIMILAR_ISSUES" | jq '. | length')" -gt 0 ]; then |
| 116 | 118 | echo "has_similar=true" >> $GITHUB_OUTPUT |
| 117 | 119 | else |
| 118 | 120 | echo "has_similar=false" >> $GITHUB_OUTPUT |
| 119 | 121 | fi |
| 120 | - | |
| 122 | + | |
| 121 | 123 | - name: Check if issue should be a discussion |
| 122 | 124 | id: discussion_check |
| 123 | 125 | if: github.event_name == 'issues' |
| @@ -128,19 +130,19 @@ | ||
| 128 | 130 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 129 | 131 | run: | |
| 130 | 132 | cd deja-view |
| 131 | - | |
| 133 | + | |
| 132 | 134 | # Create a Python script to analyze the issue |
| 133 | 135 | cat << 'PYTHON_SCRIPT' > check_discussion.py |
| 134 | 136 | import os |
| 135 | 137 | import json |
| 136 | 138 | import re |
| 137 | 139 | from github_similarity_service import SimilarityService |
| 138 | - | |
| 140 | + | |
| 139 | 141 | # Get issue details from environment |
| 140 | 142 | issue_title = os.environ.get('ISSUE_TITLE', '') |
| 141 | 143 | issue_body = os.environ.get('ISSUE_BODY', '') |
| 142 | 144 | issue_labels = json.loads(os.environ.get('ISSUE_LABELS', '[]')) |
| 143 | - | |
| 145 | + | |
| 144 | 146 | # Mock Issue object for analysis |
| 145 | 147 | class MockIssue: |
| 146 | 148 | def __init__(self): |
| @@ -152,41 +154,41 @@ | ||
| 152 | 154 | self.created_at = '' |
| 153 | 155 | self.updated_at = '' |
| 154 | 156 | self.url = '' |
| 155 | - | |
| 157 | + | |
| 156 | 158 | service = SimilarityService() |
| 157 | 159 | issue = MockIssue() |
| 158 | - | |
| 160 | + | |
| 159 | 161 | score, reasons = service._calculate_discussion_score(issue) |
| 160 | - | |
| 162 | + | |
| 161 | 163 | result = { |
| 162 | 164 | 'score': score, |
| 163 | 165 | 'reasons': reasons, |
| 164 | 166 | 'should_be_discussion': score >= 0.5, |
| 165 | 167 | 'confidence': 'high' if score >= 0.7 else 'medium' if score >= 0.5 else 'low' |
| 166 | 168 | } |
| 167 | - | |
| 169 | + | |
| 168 | 170 | print(json.dumps(result)) |
| 169 | 171 | PYTHON_SCRIPT |
| 170 | - | |
| 172 | + | |
| 171 | 173 | # Run the analysis |
| 172 | 174 | DISCUSSION_ANALYSIS=$(ISSUE_TITLE="${{ github.event.issue.title }}" \ |
| 173 | 175 | ISSUE_BODY='${{ github.event.issue.body }}' \ |
| 174 | 176 | ISSUE_LABELS='${{ toJson(github.event.issue.labels.*.name) }}' \ |
| 175 | 177 | ISSUE_NUMBER="${{ github.event.issue.number }}" \ |
| 176 | 178 | python check_discussion.py) |
| 177 | - | |
| 179 | + | |
| 178 | 180 | echo "analysis<<EOF" >> $GITHUB_OUTPUT |
| 179 | 181 | echo "$DISCUSSION_ANALYSIS" >> $GITHUB_OUTPUT |
| 180 | 182 | echo "EOF" >> $GITHUB_OUTPUT |
| 181 | - | |
| 183 | + | |
| 182 | 184 | # Extract whether it should be a discussion |
| 183 | 185 | SHOULD_BE_DISCUSSION=$(echo "$DISCUSSION_ANALYSIS" | jq -r '.should_be_discussion') |
| 184 | 186 | echo "should_be_discussion=$SHOULD_BE_DISCUSSION" >> $GITHUB_OUTPUT |
| 185 | - | |
| 187 | + | |
| 186 | 188 | # Extract confidence level |
| 187 | 189 | CONFIDENCE=$(echo "$DISCUSSION_ANALYSIS" | jq -r '.confidence') |
| 188 | 190 | echo "confidence=$CONFIDENCE" >> $GITHUB_OUTPUT |
| 189 | - | |
| 191 | + | |
| 190 | 192 | - name: Comment with analysis |
| 191 | 193 | uses: actions/github-script@v7 |
| 192 | 194 | with: |
| @@ -195,7 +197,7 @@ | ||
| 195 | 197 | const hasSimilar = '${{ steps.search.outputs.has_similar }}' === 'true'; |
| 196 | 198 | const isPR = '${{ github.event_name }}' === 'pull_request'; |
| 197 | 199 | const shouldBeDiscussion = !isPR && '${{ steps.discussion_check.outputs.should_be_discussion }}' === 'true'; |
| 198 | - | |
| 200 | + | |
| 199 | 201 | // Add similar issues section if found |
| 200 | 202 | if (hasSimilar) { |
| 201 | 203 | const similarIssues = JSON.parse(`${{ steps.search.outputs.similar_issues }}`); |
| @@ -243,7 +245,7 @@ | ||
| 243 | 245 | comment += '\n'; |
| 244 | 246 | } |
| 245 | 247 | } |
| 246 | - | |
| 248 | + | |
| 247 | 249 | // Add discussion suggestion if applicable |
| 248 | 250 | if (shouldBeDiscussion) { |
| 249 | 251 | const analysis = JSON.parse(`${{ steps.discussion_check.outputs.analysis }}`); |
| @@ -280,7 +282,7 @@ | ||
| 280 | 282 | |
| 281 | 283 | comment += '_Consider converting this to a discussion if it\'s not a bug report or actionable task._\n'; |
| 282 | 284 | } |
| 283 | - | |
| 285 | + | |
| 284 | 286 | // Only comment if we have something to say |
| 285 | 287 | if (comment) { |
| 286 | 288 | comment += '\n---\n'; |
| @@ -302,14 +304,14 @@ | ||
| 302 | 304 | }); |
| 303 | 305 | } |
| 304 | 306 | } |
| 305 | - | |
| 307 | + | |
| 306 | 308 | - name: Add labels |
| 307 | 309 | if: github.event_name == 'issues' |
| 308 | 310 | uses: actions/github-script@v7 |
| 309 | 311 | with: |
| 310 | 312 | script: | |
| 311 | 313 | const labels = []; |
| 312 | - | |
| 314 | + | |
| 313 | 315 | // Check for duplicate |
| 314 | 316 | if ('${{ steps.search.outputs.has_similar }}' === 'true') { |
| 315 | 317 | const similarIssues = JSON.parse(`${{ steps.search.outputs.similar_issues }}`); |
| @@ -319,7 +321,7 @@ | ||
| 319 | 321 | labels.push('potential-duplicate'); |
| 320 | 322 | } |
| 321 | 323 | } |
| 322 | - | |
| 324 | + | |
| 323 | 325 | // Check for discussion suggestion |
| 324 | 326 | if ('${{ steps.discussion_check.outputs.should_be_discussion }}' === 'true') { |
| 325 | 327 | const confidence = '${{ steps.discussion_check.outputs.confidence }}'; |
| @@ -330,7 +332,7 @@ | ||
| 330 | 332 | labels.push('discussion'); |
| 331 | 333 | } |
| 332 | 334 | } |
| 333 | - | |
| 335 | + | |
| 334 | 336 | // Add labels if any |
| 335 | 337 | if (labels.length > 0) { |
| 336 | 338 | await github.rest.issues.addLabels({ |
modified README.md +14 −19
| @@ -8,15 +8,6 @@ | ||
| 8 | 8 | |
| 9 | 9 | <div align="center"> |
| 10 | 10 | |
| 11 | -**[Continue](https://docs.continue.dev) enables developers to create, share, and use custom AI code assistants with our | |
| 12 | -open-source [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) | |
| 13 | -and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions | |
| 14 | -and [hub of models, rules, and MCP tools](https://hub.continue.dev)** | |
| 15 | - | |
| 16 | -</div> | |
| 17 | - | |
| 18 | -<div align="center"> | |
| 19 | - | |
| 20 | 11 | <a target="_blank" href="https://opensource.org/licenses/Apache-2.0" style="background:none"> |
| 21 | 12 | <img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" style="height: 22px;" /> |
| 22 | 13 | </a> |
| @@ -32,38 +23,42 @@ | ||
| 32 | 23 | |
| 33 | 24 | <p></p> |
| 34 | 25 | |
| 26 | +<div align="center"> | |
| 27 | + | |
| 28 | +**Ship faster with Continuous AI** | |
| 29 | + | |
| 30 | +**Build and run custom agents across your IDE, terminal, and CI** | |
| 31 | + | |
| 32 | +</div> | |
| 33 | + | |
| 34 | +Get started in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue), [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension), or [CLI](https://docs.continue.dev/guides/cli) | |
| 35 | + | |
| 35 | 36 | ## Agent |
| 36 | 37 | |
| 37 | -[Agent](https://continue.dev/docs/agent/how-to-use-it) enables you to make more substantial changes to your codebase | |
| 38 | +[Agent](/features/agent/quick-start) to work on development tasks together with AI | |
| 38 | 39 | |
| 39 | 40 |  |
| 40 | 41 | |
| 41 | 42 | ## Chat |
| 42 | 43 | |
| 43 | -[Chat](https://continue.dev/docs/chat/how-to-use-it) makes it easy to ask for help from an LLM without needing to leave | |
| 44 | -the IDE | |
| 44 | +[Chat](/features/chat/quick-start) to ask general questions and clarify code sections | |
| 45 | 45 | |
| 46 | 46 |  |
| 47 | 47 | |
| 48 | 48 | ## Edit |
| 49 | 49 | |
| 50 | -[Edit](https://continue.dev/docs/edit/how-to-use-it) is a convenient way to modify code without leaving your current | |
| 51 | -file | |
| 50 | +[Edit](/features/edit/quick-start) to modify a code section without leaving your current file | |
| 52 | 51 | |
| 53 | 52 |  |
| 54 | 53 | |
| 55 | 54 | ## Autocomplete |
| 56 | 55 | |
| 57 | -[Autocomplete](https://continue.dev/docs/autocomplete/how-to-use-it) provides inline code suggestions as you type | |
| 56 | +[Autocomplete](/features/autocomplete/quick-start) to receive inline code suggestions as you type | |
| 58 | 57 | |
| 59 | 58 |  |
| 60 | 59 | |
| 61 | 60 | </div> |
| 62 | 61 | |
| 63 | -## Getting Started | |
| 64 | - | |
| 65 | -Learn about how to install and use Continue in the docs [here](https://continue.dev/docs/getting-started/install) | |
| 66 | - | |
| 67 | 62 | ## Contributing |
| 68 | 63 | |
| 69 | 64 | Read the [contributing guide](https://github.com/continuedev/continue/blob/main/CONTRIBUTING.md), and |
modified docs/home.mdx +11 −4
| @@ -2,9 +2,16 @@ | ||
| 2 | 2 | title: "Introduction" |
| 3 | 3 | --- |
| 4 | 4 | |
| 5 | -**Continue enables developers to create, share, and use custom AI code assistants with our open-source [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions and [hub of models, rules, prompts, docs, and other building blocks](https://hub.continue.dev)** | |
| 5 | +**Continue enables developers to ship faster with Continuous AI.** | |
| 6 | 6 | |
| 7 | -- [Chat](/features/chat/quick-start) to understand and iterate on code in the sidebar | |
| 7 | +**You can use Continue to build and run custom agents across your IDE, terminal, and CI.** | |
| 8 | + | |
| 9 | +1. Get started with Continue in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions: | |
| 10 | +- [Agent](/features/agent/quick-start) to work on development tasks together with AI | |
| 11 | +- [Chat](/features/chat/quick-start) to ask general questions and clarify code sections | |
| 12 | +- [Edit](/features/edit/quick-start) to modify code section without leaving your current file | |
| 8 | 13 | - [Autocomplete](/features/autocomplete/quick-start) to receive inline code suggestions as you type |
| 9 | -- [Edit](/features/edit/quick-start) to modify code without leaving your current file | |
| 10 | -- [Agent](/features/agent/quick-start) to make more substantial changes to your codebase | |
| 14 | + | |
| 15 | +2. Try out [Continue CLI (cn)](https://docs.continue.dev/guides/cli) and give us feedback | |
| 16 | + | |
| 17 | +3. Discover the models, rules, and MCP tools you need to create a custom AI coding agent on [Continue Hub](https://hub.continue.dev/) |
modified docs/index.mdx +23 −14
| @@ -7,24 +7,32 @@ | ||
| 7 | 7 | <img src="/images/intro-0c302b9c15b890c251b1ad04586c880f.png" /> |
| 8 | 8 | </Frame> |
| 9 | 9 | |
| 10 | -**Continue enables developers to create, share, and use custom AI code assistants with our open-source [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions and [hub of models, rules, prompts, docs, and other building blocks](https://hub.continue.dev)** | |
| 10 | +**Continue enables developers to ship faster with Continuous AI.** | |
| 11 | + | |
| 12 | +**You can use Continue to build and run custom agents across your IDE, terminal, and CI.** | |
| 13 | + | |
| 14 | +1. Get started with Continue in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions | |
| 15 | + | |
| 16 | +2. Try out [Continue CLI (cn)](https://docs.continue.dev/guides/cli) and give us feedback | |
| 17 | + | |
| 18 | +3. Discover models, rules, and MCP tools on [Continue Hub](https://hub.continue.dev/) | |
| 11 | 19 | |
| 12 | 20 | <CardGroup cols={2}> |
| 13 | 21 | <Card |
| 14 | - title="Chat" | |
| 15 | - icon="messages" | |
| 16 | - href="/features/chat/quick-start" | |
| 22 | + title="Agent" | |
| 23 | + icon="robot" | |
| 24 | + href="/features/agent/quick-start" | |
| 17 | 25 | horizontal |
| 18 | 26 | > |
| 19 | - to understand and iterate on code in the sidebar | |
| 27 | + to work on development tasks together with AI | |
| 20 | 28 | </Card> |
| 21 | 29 | <Card |
| 22 | - title="Autocomplete" | |
| 23 | - icon="sparkles" | |
| 24 | - href="/features/autocomplete/quick-start" | |
| 30 | + title="Chat" | |
| 31 | + icon="messages" | |
| 32 | + href="/features/chat/quick-start" | |
| 25 | 33 | horizontal |
| 26 | 34 | > |
| 27 | - to receive inline code suggestions as you type | |
| 35 | + to ask general questions and clarify code sections | |
| 28 | 36 | </Card> |
| 29 | 37 | <Card |
| 30 | 38 | title="Edit" |
| @@ -32,14 +40,15 @@ | ||
| 32 | 40 | href="/features/edit/quick-start" |
| 33 | 41 | horizontal |
| 34 | 42 | > |
| 35 | - to modify code without leaving your current file | |
| 43 | + to modify a code section without leaving your current file | |
| 36 | 44 | </Card> |
| 37 | 45 | <Card |
| 38 | - title="Agent" | |
| 39 | - icon="robot" | |
| 40 | - href="/features/agent/quick-start" | |
| 46 | + title="Autocomplete" | |
| 47 | + icon="sparkles" | |
| 48 | + href="/features/autocomplete/quick-start" | |
| 41 | 49 | horizontal |
| 42 | 50 | > |
| 43 | - to make more substantial changes to your codebase | |
| 51 | + to receive inline code suggestions as you type | |
| 44 | 52 | </Card> |
| 53 | + | |
| 45 | 54 | </CardGroup> |
modified extensions/intellij/README.md +19 −17
| @@ -4,35 +4,37 @@ | ||
| 4 | 4 | |
| 5 | 5 | <div align="center"> |
| 6 | 6 | |
| 7 | -[**Continue**](https://docs.continue.dev) enables developers to create, share, and use custom AI code assistants with our open-source [JetBrains extension](https://plugins.jetbrains.com/plugin/22707-continue-extension) and [hub of models, rules, prompts, docs, and other building blocks](https://hub.continue.dev). | |
| 7 | +<a target="_blank" href="https://opensource.org/licenses/Apache-2.0" style="background:none"> | |
| 8 | + <img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" style="height: 22px;" /> | |
| 9 | +</a> | |
| 10 | +<a target="_blank" href="https://docs.continue.dev" style="background:none"> | |
| 11 | + <img src="https://img.shields.io/badge/Continue-docs-%23BE1B55.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNiAyNCIgZmlsbD0id2hpdGUiPgogIDxwYXRoIGQ9Ik0yMC41Mjg2IDMuMjY4MTFMMTkuMTUxMiA1LjY1Njk0TDIyLjYzMjggMTEuNjg0OUMyMi42NTgyIDExLjczMDYgMjIuNjczNSAxMS43ODY2IDIyLjY3MzUgMTEuODM3NEMyMi42NzM1IDExLjg4ODIgMjIuNjU4MiAxMS45NDQxIDIyLjYzMjggMTEuOTg5OUwxOS4xNTEyIDE4LjAyMjlMMjAuNTI4NiAyMC40MTE3TDI1LjQ3OTEgMTEuODM3NEwyMC41Mjg2IDMuMjYzMDNWMy4yNjgxMVpNMTguNjE3NiA1LjM0NjlMMTkuOTk1IDIuOTU4MDdIMTcuMjQwMkwxNS44NjI4IDUuMzQ2OUgxOC42MjI3SDE4LjYxNzZaTTE1Ljg1NzcgNS45NjY5N0wxOS4wNzUgMTEuNTMyNEgyMS44Mjk4TDE4LjYxNzYgNS45NjY5N0gxNS44NTc3Wk0xOC42MTc2IDE3LjcxNzlMMjEuODI5OCAxMi4xNDc0SDE5LjA3NUwxNS44NTc3IDE3LjcxNzlIMTguNjE3NlpNMTUuODU3NyAxOC4zMzhMMTcuMjM1MSAyMC43MTY3SDE5Ljk4OTlMMTguNjEyNSAxOC4zMzhIMTUuODUyNkgxNS44NTc3Wk02LjUyMDk4IDIxLjMwNjNDNi40NjUwNyAyMS4zMDYzIDYuNDE0MjQgMjEuMjkxIDYuMzY4NSAyMS4yNjU2QzYuMzIyNzYgMjEuMjQwMiA2LjI4MjA5IDIxLjE5OTUgNi4yNTY2OCAyMS4xNTM4TDIuNzcwMDIgMTUuMTIwN0gwLjAxNTI0ODJMNC45NjU3IDIzLjY5SDE0Ljg2MTVMMTMuNDg0MSAyMS4zMDYzSDYuNTI2MDZINi41MjA5OFpNMTQuMDE3OCAyMC45OTYyTDE1LjM5NTIgMjMuMzhMMTYuNzcyNiAyMC45OTExTDE1LjM5NTIgMTguNjAyM0wxNC4wMTc4IDIwLjk5MTFWMjAuOTk2MlpNMTQuODYxNSAxOC4yOTc0SDguNDM3MTJMNy4wNTk3MyAyMC42ODYySDEzLjQ4NDFMMTQuODYxNSAxOC4yOTc0Wk03Ljg5ODM2IDE3Ljk5MjRMNC42ODEwOCAxMi40MjE5TDMuMzAzNjkgMTQuODEwN0w2LjUyMDk4IDIwLjM4MTJMNy44OTgzNiAxNy45OTI0Wk0wLjAxMDE2NTQgMTQuNTAwN0gyLjc2NDk0TDQuMTQyMzIgMTIuMTExOEgxLjM5MjYzTDAuMDEwMTY1NCAxNC41MDA3Wk02LjI0MTQzIDIuNTQxM0M2LjI2Njg1IDIuNDk1NTYgNi4zMDc1MSAyLjQ1NDkgNi4zNTMyNSAyLjQyOTQ4QzYuMzk5IDIuNDA0MDcgNi40NTQ5IDIuMzg4ODIgNi41MDU3MyAyLjM4ODgySDEzLjQ3NEwxNC44NTE0IDBINC45NTA0NUwwIDguNTc0MzVIMi43NTQ3N0w2LjIzMTI3IDIuNTQ2MzhMNi4yNDE0MyAyLjU0MTNaTTQuMTQyMzIgMTEuNTc4MkwyLjc2NDk0IDkuMTg5MzRIMC4wMTAxNjU0TDEuMzg3NTUgMTEuNTc4Mkg0LjE0MjMyWk02LjUxMDgxIDMuMzEzODZMMy4yOTg2MSA4Ljg3OTNMNC42NzU5OSAxMS4yNjgxTDcuODg4MiA1LjcwMjY4TDYuNTEwODEgMy4zMTM4NlpNMTMuNDc5MSAzLjAwMzgySDcuMDQ0NDhMOC40MjE4NyA1LjM5MjY0SDE0Ljg1NjRMMTMuNDc5MSAzLjAwMzgyWk0xNS4zOTUyIDUuMDgyNkwxNi43Njc1IDIuNjk4ODZMMTUuMzk1MiAwLjMxMDAzOEwxNC4wMTc4IDIuNjkzNzhMMTUuMzk1MiA1LjA4MjZaIi8+Cjwvc3ZnPg==" style="height: 22px;" /> | |
| 12 | +</a> | |
| 13 | +<a target="_blank" href="https://discord.gg/vapESyrFmJ" style="background:none"> | |
| 14 | + <img src="https://img.shields.io/badge/discord-join-continue.svg?labelColor=191937&color=6F6FF7&logo=discord" style="height: 22px;" /> | |
| 15 | +</a> | |
| 8 | 16 | |
| 9 | -</div> | |
| 17 | +<p></p> | |
| 10 | 18 | |
| 11 | -<div align="center"> | |
| 19 | +**Ship faster with Continuous AI** | |
| 12 | 20 | |
| 13 | -## Chat | |
| 14 | - | |
| 15 | -[Chat](https://continue.dev/docs/chat/how-to-use-it) makes it easy to ask for help from an LLM without needing to leave the IDE. | |
| 21 | +**Build and run custom agents across your IDE, terminal, and CI** | |
| 16 | 22 | |
| 17 | -You send it a task, including any relevant information, and it replies with the text / code most likely to complete the task. If it does not give you what you want, then you can send follow up messages to clarify and adjust its approach until the task is completed. | |
| 23 | +## Agent | |
| 18 | 24 | |
| 19 | -## Autocomplete | |
| 25 | +[Agent](/features/agent/quick-start) to work on development tasks together with AI | |
| 20 | 26 | |
| 21 | -[Autocomplete](https://continue.dev/docs/autocomplete/how-to-use-it) provides inline code suggestions as you type. | |
| 27 | +## Chat | |
| 22 | 28 | |
| 23 | -To enable it, simply click the "Continue" button in the status bar at the bottom right of your IDE or ensure the "Enable Tab Autocomplete" option is checked in your IDE settings. | |
| 29 | +[Chat](/features/chat/quick-start) to ask general questions and clarify code sections | |
| 24 | 30 | |
| 25 | 31 | ## Edit |
| 26 | 32 | |
| 27 | -[Edit](https://continue.dev/docs/edit/how-to-use-it) is a convenient way to modify code without leaving your current file. | |
| 28 | - | |
| 29 | -Highlight a block of code, describe your code changes, and a diff will be streamed inline to your file which you can accept or reject. | |
| 33 | +[Edit](/features/edit/quick-start) to modify a code section without leaving your current file | |
| 30 | 34 | |
| 31 | -## Agent | |
| 32 | - | |
| 33 | -[Agent](https://continue.dev/docs/agent/how-to-use-it) enables you to make more substantial changes to your codebase | |
| 35 | +## Autocomplete | |
| 34 | 36 | |
| 35 | -Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, allowing the model to make decisions and save you the work of manually finding context and performing actions. | |
| 37 | +[Autocomplete](/features/autocomplete/quick-start) to receive inline code suggestions as you type | |
| 36 | 38 | |
| 37 | 39 | </div> |
| 38 | 40 |
modified extensions/intellij/gradle.properties +1 −1
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | pluginGroup=com.github.continuedev.continueintellijextension |
| 2 | 2 | pluginRepositoryUrl=https://github.com/continuedev/continue |
| 3 | -pluginVersion=1.0.36 | |
| 3 | +pluginVersion=1.0.37 | |
| 4 | 4 | pluginSinceBuild=223 |
| 5 | 5 | platformType=IC |
| 6 | 6 | platformVersion=2022.3.3 |
modified extensions/vscode/README.md +16 −16
| @@ -2,16 +2,6 @@ | ||
| 2 | 2 | |
| 3 | 3 |  |
| 4 | 4 | |
| 5 | -</div> | |
| 6 | - | |
| 7 | -<h1 align="center">Continue</h1> | |
| 8 | - | |
| 9 | -<div align="center"> | |
| 10 | - | |
| 11 | -**[Continue](https://docs.continue.dev) enables developers to create, share, and use custom AI code assistants with our open-source [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [hub of models, rules, prompts, docs, and other building blocks](https://hub.continue.dev)** | |
| 12 | - | |
| 13 | -</div> | |
| 14 | - | |
| 15 | 5 | <div align="center"> |
| 16 | 6 | |
| 17 | 7 | <a target="_blank" href="https://opensource.org/licenses/Apache-2.0" style="background:none"> |
| @@ -26,29 +16,39 @@ | ||
| 26 | 16 | |
| 27 | 17 | <p></p> |
| 28 | 18 | |
| 19 | +</div> | |
| 20 | + | |
| 21 | +<h1 align="center">Continue</h1> | |
| 22 | + | |
| 23 | +<div align="center"> | |
| 24 | + | |
| 25 | +**Ship faster with Continuous AI** | |
| 26 | + | |
| 27 | +**Build and run custom agents across your IDE, terminal, and CI** | |
| 28 | + | |
| 29 | +</div> | |
| 30 | + | |
| 29 | 31 | ## Agent |
| 30 | 32 | |
| 31 | -[Agent](https://continue.dev/docs/agent/how-to-use-it) enables you to make more substantial changes to your codebase | |
| 33 | +[Agent](/features/agent/quick-start) to work on development tasks together with AI | |
| 32 | 34 | |
| 33 | 35 |  |
| 34 | 36 | |
| 35 | 37 | ## Chat |
| 36 | 38 | |
| 37 | -[Chat](https://continue.dev/docs/chat/how-to-use-it) makes it easy to ask for help from an LLM without needing to leave | |
| 38 | -the IDE | |
| 39 | +[Chat](/features/chat/quick-start) to ask general questions and clarify code sections | |
| 39 | 40 | |
| 40 | 41 |  |
| 41 | 42 | |
| 42 | 43 | ## Edit |
| 43 | 44 | |
| 44 | -[Edit](https://continue.dev/docs/edit/how-to-use-it) is a convenient way to modify code without leaving your current | |
| 45 | -file | |
| 45 | +[Edit](/features/edit/quick-start) to modify a code section without leaving your current file | |
| 46 | 46 | |
| 47 | 47 |  |
| 48 | 48 | |
| 49 | 49 | ## Autocomplete |
| 50 | 50 | |
| 51 | -[Autocomplete](https://continue.dev/docs/autocomplete/how-to-use-it) provides inline code suggestions as you type | |
| 51 | +[Autocomplete](/features/autocomplete/quick-start) to receive inline code suggestions as you type | |
| 52 | 52 | |
| 53 | 53 |  |
| 54 | 54 |
modified extensions/vscode/package.json +1 −1
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | "name": "continue", |
| 3 | 3 | "icon": "media/icon.png", |
| 4 | 4 | "author": "Continue Dev, Inc", |
| 5 | - "version": "1.1.76", | |
| 5 | + "version": "1.1.77", | |
| 6 | 6 | "repository": { |
| 7 | 7 | "type": "git", |
| 8 | 8 | "url": "https://github.com/continuedev/continue" |