Skip to content

Commit 7b28e1c

Browse files
committed
Merge branch 'main' of https://github.com/continuedev/continue into feat/continuous-ai-guide
2 parents e41ba45 + 5512dd6 commit 7b28e1c

File tree

374 files changed

+17324
-8890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

374 files changed

+17324
-8890
lines changed

.claude/lint-check.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

.claude/settings.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/actions/run-vscode-e2e-test/action.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
name: 'Run VS Code E2E Test'
2-
description: 'Run a single VS Code E2E test with all required setup'
1+
name: "Run VS Code E2E Test"
2+
description: "Run a single VS Code E2E test with all required setup"
33
inputs:
44
test_file:
5-
description: 'E2E test file to run'
5+
description: "E2E test file to run"
66
required: true
77
command:
8-
description: 'Command to run (e2e:ci:run or e2e:ci:run-yaml)'
8+
description: "Command to run (e2e:ci:run or e2e:ci:run-yaml)"
99
required: true
1010
ssh_key:
11-
description: 'SSH private key for testing'
11+
description: "SSH private key for testing"
1212
required: false
1313
ssh_host:
14-
description: 'SSH host for testing'
14+
description: "SSH host for testing"
1515
required: false
1616
is_fork:
17-
description: 'Whether this is a fork (affects SSH tests)'
17+
description: "Whether this is a fork (affects SSH tests)"
1818
required: false
19-
default: 'false'
19+
default: "false"
2020

2121
runs:
22-
using: 'composite'
22+
using: "composite"
2323
steps:
2424
- uses: actions/setup-node@v4
2525
with:
@@ -58,6 +58,7 @@ runs:
5858
cd core
5959
npm ci
6060
cd ../extensions/vscode
61+
npm ci
6162
npm run e2e:ci:download
6263
else
6364
cd core
@@ -131,4 +132,4 @@ runs:
131132
uses: actions/upload-artifact@v4
132133
with:
133134
name: e2e-logs-${{ steps.sanitize_filename.outputs.sanitized_test_file || 'unknown' }}-${{ inputs.command == 'e2e:ci:run-yaml' && 'yaml' || 'json' }}
134-
path: extensions/vscode/e2e.log
135+
path: extensions/vscode/e2e.log
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
name: Auto Fix Failed Tests
2+
3+
on:
4+
workflow_run:
5+
workflows: ["PR Checks", "CLI PR Checks"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
issues: write
13+
actions: read
14+
15+
jobs:
16+
fix-failed-tests:
17+
# Only run if the workflow failed
18+
# DISABLED: Remove 'false && ' on the next line to enable auto-fixing
19+
if: false && github.event.workflow_run.conclusion == 'failure'
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Get workflow run details
24+
id: workflow-details
25+
uses: actions/github-script@v8
26+
with:
27+
script: |
28+
const workflowRun = context.payload.workflow_run;
29+
const { data: jobs } = await github.rest.actions.listJobsForWorkflowRun({
30+
owner: context.repo.owner,
31+
repo: context.repo.repo,
32+
run_id: workflowRun.id
33+
});
34+
35+
// Find all failed jobs since we're only monitoring specific test workflows
36+
const failedJobs = jobs.jobs.filter(job => job.conclusion === 'failure');
37+
38+
if (failedJobs.length === 0) {
39+
core.info('No failed jobs found');
40+
return null;
41+
}
42+
43+
core.setOutput('has_failed_tests', 'true');
44+
core.setOutput('workflow_name', workflowRun.name);
45+
core.setOutput('workflow_run_id', workflowRun.id);
46+
core.setOutput('head_branch', workflowRun.head_branch);
47+
core.setOutput('head_sha', workflowRun.head_sha);
48+
core.setOutput('failed_jobs', JSON.stringify(failedJobs.map(j => j.name)));
49+
50+
return failedJobs;
51+
52+
- name: Get job logs for failed tests
53+
if: steps.workflow-details.outputs.has_failed_tests == 'true'
54+
id: get-logs
55+
uses: actions/github-script@v8
56+
with:
57+
script: |
58+
const workflowRunId = ${{ github.event.workflow_run.id }};
59+
const { data: jobs } = await github.rest.actions.listJobsForWorkflowRun({
60+
owner: context.repo.owner,
61+
repo: context.repo.repo,
62+
run_id: workflowRunId
63+
});
64+
65+
let errorLogs = '';
66+
67+
for (const job of jobs.jobs) {
68+
if (job.conclusion === 'failure') {
69+
try {
70+
const { data: logData } = await github.rest.actions.downloadJobLogsForWorkflowRun({
71+
owner: context.repo.owner,
72+
repo: context.repo.repo,
73+
job_id: job.id
74+
});
75+
76+
errorLogs += `\n\n=== Job: ${job.name} ===\n`;
77+
errorLogs += logData;
78+
} catch (error) {
79+
core.warning(`Could not fetch logs for job ${job.name}: ${error.message}`);
80+
}
81+
}
82+
}
83+
84+
// Store logs in environment file for next step
85+
const fs = require('fs');
86+
fs.writeFileSync('/tmp/test_failure_logs.txt', errorLogs);
87+
88+
core.setOutput('has_logs', errorLogs.length > 0 ? 'true' : 'false');
89+
90+
- name: Checkout repository
91+
if: steps.workflow-details.outputs.has_failed_tests == 'true'
92+
uses: actions/checkout@v5
93+
with:
94+
token: ${{ secrets.GITHUB_TOKEN }}
95+
fetch-depth: 0
96+
ref: ${{ steps.workflow-details.outputs.head_sha }}
97+
98+
- name: Setup Node.js
99+
if: steps.workflow-details.outputs.has_failed_tests == 'true'
100+
uses: actions/setup-node@v5
101+
with:
102+
node-version: "20"
103+
104+
- name: Install Continue CLI globally
105+
if: steps.workflow-details.outputs.has_failed_tests == 'true'
106+
run: npm i -g @continuedev/cli
107+
108+
- name: Start remote session to fix failed tests
109+
if: steps.workflow-details.outputs.has_failed_tests == 'true'
110+
id: remote-session
111+
env:
112+
CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
113+
run: |
114+
# Create a detailed prompt for fixing the failed tests
115+
cat > /tmp/fix_tests_prompt.txt << 'PROMPT_EOF'
116+
🔧 **Auto Test Fix Request**
117+
118+
The following tests failed in workflow "${{ steps.workflow-details.outputs.workflow_name }}" (Run ID: ${{ steps.workflow-details.outputs.workflow_run_id }}):
119+
120+
**Failed Jobs:** ${{ steps.workflow-details.outputs.failed_jobs }}
121+
**Branch:** ${{ steps.workflow-details.outputs.head_branch }}
122+
**Commit:** ${{ steps.workflow-details.outputs.head_sha }}
123+
124+
**Your Task:**
125+
1. Analyze the test failure logs and error messages
126+
2. Identify the root cause of the test failures
127+
3. Fix the failing tests by updating the test code or the underlying implementation
128+
4. Ensure all tests pass after your changes
129+
5. Commit your fixes with a descriptive message
130+
131+
**Test Failure Context:**
132+
Please examine the repository structure, run the failing tests locally to understand the errors, and implement appropriate fixes.
133+
134+
Focus on:
135+
- Understanding what the tests are trying to validate
136+
- Identifying why they're failing (code changes, environment issues, test logic errors)
137+
- Making minimal, targeted fixes that address the root cause
138+
- Ensuring the fixes don't break other functionality
139+
140+
Please start by examining the failing tests and their error messages, then proceed with the necessary fixes.
141+
PROMPT_EOF
142+
143+
echo "Starting Continue CLI remote session for test fixes..."
144+
echo "Prompt content:"
145+
cat /tmp/fix_tests_prompt.txt
146+
147+
# Start remote session and capture JSON output
148+
SESSION_OUTPUT=$(cat /tmp/fix_tests_prompt.txt | cn remote -s --branch ${{ steps.workflow-details.outputs.head_branch }})
149+
echo "Raw session output: $SESSION_OUTPUT"
150+
151+
# Extract URL from JSON output
152+
SESSION_URL=$(echo "$SESSION_OUTPUT" | jq -r '.url // empty')
153+
154+
if [ -z "$SESSION_URL" ] || [ "$SESSION_URL" = "null" ]; then
155+
echo "Failed to extract session URL from output: $SESSION_OUTPUT"
156+
exit 1
157+
fi
158+
159+
echo "session_url=$SESSION_URL" >> $GITHUB_OUTPUT
160+
echo "✅ Started remote session: $SESSION_URL"
161+
162+
- name: Log session details
163+
if: steps.workflow-details.outputs.has_failed_tests == 'true'
164+
run: |
165+
echo "✅ Successfully started auto-fix session for failed tests"
166+
echo "Workflow: ${{ steps.workflow-details.outputs.workflow_name }}"
167+
echo "Run ID: ${{ steps.workflow-details.outputs.workflow_run_id }}"
168+
echo "Branch: ${{ steps.workflow-details.outputs.head_branch }}"
169+
echo "Session URL: ${{ steps.remote-session.outputs.session_url }}"
170+
echo "Failed jobs: ${{ steps.workflow-details.outputs.failed_jobs }}"

.github/workflows/beta-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
2525

2626
- name: Setup Node.js
27-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v5
2828
with:
2929
node-version: 20
3030
registry-url: "https://registry.npmjs.org"

.github/workflows/cli-pr-checks.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v5
2626

2727
- name: Setup Node.js
28-
uses: actions/setup-node@v4
28+
uses: actions/setup-node@v5
2929
with:
3030
node-version: 20
3131
cache: "npm"
@@ -59,14 +59,15 @@ jobs:
5959
matrix:
6060
os: [ubuntu-latest, windows-latest, macos-latest]
6161
node-version: [18, 20, 22, 24]
62+
fail-fast: false
6263
runs-on: ${{ matrix.os }}
6364

6465
steps:
6566
- name: Checkout code
6667
uses: actions/checkout@v5
6768

6869
- name: Setup Node.js ${{ matrix.node-version }}
69-
uses: actions/setup-node@v4
70+
uses: actions/setup-node@v5
7071
with:
7172
node-version: ${{ matrix.node-version }}
7273

.github/workflows/compliance.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
- name: Add PR title guidance comment
4343
if: always() && steps.pr-title-check.outputs.valid == 'false'
44-
uses: actions/github-script@v7
44+
uses: actions/github-script@v8
4545
with:
4646
script: |
4747
const { data: comments } = await github.rest.issues.listComments({
@@ -104,7 +104,7 @@ jobs:
104104
uses: actions/checkout@v5
105105

106106
- name: Setup Node.js
107-
uses: actions/setup-node@v4
107+
uses: actions/setup-node@v5
108108
with:
109109
node-version-file: ".nvmrc"
110110
cache: "npm"

.github/workflows/continue-detailed-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
timeout-minutes: 10
1919
steps:
2020
- name: Run Detailed PR Review
21-
uses: continuedev/continue/actions/detailed-review@80c679747b7c7b2624d15db31ff5bdadc9681c65
21+
uses: continuedev/continue/actions/detailed-review@5dc7a050db441934c26eb910b8433291f627db7f
2222
with:
2323
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
2424
continue-org: continuedev

.github/workflows/continue-general-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
timeout-minutes: 10
1919
steps:
2020
- name: Run Continue PR Review Action
21-
uses: continuedev/continue/actions/general-review@80c679747b7c7b2624d15db31ff5bdadc9681c65
21+
uses: continuedev/continue/actions/general-review@5dc7a050db441934c26eb910b8433291f627db7f
2222
with:
2323
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
2424
continue-org: "continuedev"

.github/workflows/jetbrains-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
153153
# # Setup Node.js
154154
- name: Use Node.js from .nvmrc
155-
uses: actions/setup-node@v4
155+
uses: actions/setup-node@v5
156156
with:
157157
node-version-file: ".nvmrc"
158158

@@ -370,7 +370,7 @@ jobs:
370370

371371
# 2. Install npm dependencies
372372
- name: Use Node.js from .nvmrc
373-
uses: actions/setup-node@v4
373+
uses: actions/setup-node@v5
374374
with:
375375
node-version-file: ".nvmrc"
376376

0 commit comments

Comments
 (0)