diff --git a/.continue/rules/continue-pun.md b/.continue/rules/continue-pun.md new file mode 100644 index 000000000..502e1cfbc --- /dev/null +++ b/.continue/rules/continue-pun.md @@ -0,0 +1,9 @@ +--- +name: Add Continue pun easter eggs +description: Adds an easter egg whenever the "continue" keyword +pattern: "continue" +--- + +Our product name is "Continue", so whenever the "continue" statement is used in our codebase, you should add a comment joking about the use of the continue keyword in the Continue codebase + +Do not add a comment if the use of "continue" is not in a code continue statement diff --git a/.continue/rules/css-units.md b/.continue/rules/css-units.md new file mode 100644 index 000000000..a270a383d --- /dev/null +++ b/.continue/rules/css-units.md @@ -0,0 +1,5 @@ +--- +globs: "gui/**/*.tsx" +--- + +You should try to use the `rem` CSS unit whenever possible for scalability instead of `px`. diff --git a/.continue/rules/dev-data-guide.md b/.continue/rules/dev-data-guide.md new file mode 100644 index 000000000..7321b93c0 --- /dev/null +++ b/.continue/rules/dev-data-guide.md @@ -0,0 +1,200 @@ +--- +alwaysApply: false +--- + +# Continue Development Data (Dev Data) Guide + +## Overview + +Development data (dev data) captures detailed information about how developers interact with LLM-aided development tools. Unlike basic telemetry, dev data includes lots of details into the complete software development workflow, including code context, user interactions, and development patterns. + +## Core Architecture + +### Primary Implementation Files + +- **`/core/data/log.ts`**: Main `DataLogger` class - singleton for event logging and remote transmission +- **`/packages/config-yaml/src/schemas/data/`**: Schema definitions for all event types + +### Storage Locations + +- **Default storage**: `~/.continue/dev_data/` +- **Event files**: `~/.continue/dev_data/{version}/{eventName}.jsonl` + +## Event Types and Schemas + +### Core Event Types + +1. **`tokensGenerated`**: LLM token usage tracking +2. **`autocomplete`**: Code completion interactions +3. **`chatInteraction`**: Chat-based development assistance +4. **`editInteraction`**: Code editing sessions +5. **`editOutcome`**: Results of edit operations +6. **`nextEditOutcome`**: Next Edit feature outcomes +7. **`chatFeedback`**: User feedback on AI responses +8. **`toolUsage`**: Tool interaction statistics +9. **`quickEdit`**: Quick edit functionality usage + +### Schema Versioning + +- **Version 0.1.0**: Initial schema implementation +- **Version 0.2.0**: Current schema with expanded fields and metadata +- **Schema files**: Located in `/packages/config-yaml/src/schemas/data/` + +### Base Schema Structure + +All events inherit from a base schema (`/packages/config-yaml/src/schemas/data/base.ts`): + +```typescript +{ + eventName: string, + schema: string, + timestamp: string, + userId: string, + userAgent: string, + selectedProfileId: string +} +``` + +## Key Integration Points + +### Autocomplete System + +- **File**: `/core/autocomplete/util/AutocompleteLoggingService.ts` +- **Purpose**: Tracks code completion acceptance/rejection, timing, and cache hits +- **Integration**: Called from autocomplete engine when completions are shown/accepted + +### Chat Interface + +- **Integration**: Chat interactions logged through `DataLogger.logDevData()` +- **Data**: Includes prompts, responses, context, and user feedback +- **Privacy**: Can be configured to exclude code content + +### Edit Features + +- **Files**: `/extensions/vscode/src/extension/EditOutcomeTracker.ts`, `/core/nextEdit/NextEditLoggingService.ts` +- **Purpose**: Track edit suggestions, acceptance rates, and outcomes +- **Integration**: Embedded in edit workflow to capture user decisions + +### LLM Token Tracking + +- **File**: `/core/llm/index.ts` +- **Purpose**: Track token usage across all LLM providers +- **Storage**: SQLite database for efficient querying and reporting + +## Configuration and Customization + +### Configuration Structure + +Dev data is configured through `data` blocks in your Continue config: + +```yaml +data: + - name: "Local Development Data" + destination: "file:///Users/developer/.continue/dev_data" + schema: "0.2.0" + level: "all" + events: ["autocomplete", "chatInteraction", "editOutcome"] + + - name: "Team Analytics" + destination: "https://analytics.yourcompany.com/api/events" + schema: "0.2.0" + level: "noCode" + apiKey: "your-api-key-here" + events: ["tokensGenerated", "toolUsage"] +``` + +### Configuration Options + +- **`destination`**: Where to send data (`file://` for local, `http://`/`https://` for remote) +- **`schema`**: Schema version to use (`"0.1.0"` or `"0.2.0"`) +- **`level`**: Data detail level (`"all"` includes code, `"noCode"` excludes code content) +- **`events`**: Array of event types to collect +- **`apiKey`**: Authentication for remote endpoints + +### Privacy Controls + +- **`"all"` level**: Includes code content (prefixes, suffixes, completions) +- **`"noCode"` level**: Excludes code content, only metadata and metrics +- **Local-first**: Data is always stored locally, remote transmission is optional + +## Making Changes to Dev Data + +### Adding New Event Types + +1. **Create schema**: Add new event schema in `/packages/config-yaml/src/schemas/data/` +2. **Update index**: Add to schema aggregator in `/packages/config-yaml/src/schemas/data/index.ts` +3. **Implement logging**: Add logging calls in relevant service files +4. **Update version**: Consider schema version bump if breaking changes + +### Modifying Existing Events + +1. **Schema changes**: Update schema files in `/packages/config-yaml/src/schemas/data/` +2. **Backward compatibility**: Ensure changes don't break existing data consumers +3. **Version management**: Increment schema version for breaking changes +4. **Test thoroughly**: Validate schema changes with existing data + +### Adding New Logging Points + +1. **Import DataLogger**: `import { DataLogger } from "core/data/log"` +2. **Log events**: Call `DataLogger.getInstance().logDevData(eventName, data)` +3. **Follow patterns**: Use existing logging services as examples +4. **Validate data**: Ensure logged data matches schema requirements + +### Debugging Dev Data Issues + +1. **Check local storage**: Verify files are being created in `~/.continue/dev_data/` +2. **Validate schemas**: Ensure event data matches expected schema format +3. **Review configuration**: Check `data` blocks in Continue config +4. **Test endpoints**: Verify remote endpoints are reachable and accepting data + +## Best Practices + +### When Adding New Events + +- Follow existing naming conventions for event types +- Include sufficient context for analysis without oversharing sensitive data +- Consider privacy implications and respect user configuration levels +- Add appropriate error handling and logging + +### When Modifying Schemas + +- Maintain backward compatibility when possible +- Document schema changes thoroughly +- Consider impact on existing data consumers +- Test with real development data + +### When Integrating Logging + +- Use the singleton pattern: `DataLogger.getInstance()` +- Log events at appropriate points in user workflow +- Respect user privacy settings and configuration +- Handle errors gracefully without disrupting user experience + +## Common Patterns + +### Service-Based Logging + +Most dev data logging follows a service pattern: + +```typescript +export class FeatureLoggingService { + private dataLogger = DataLogger.getInstance(); + + logFeatureUsage(data: FeatureUsageData) { + this.dataLogger.logDevData("featureUsage", data); + } +} +``` + +### Event-Driven Logging + +Events are typically logged at key interaction points: + +```typescript +// When user accepts autocomplete +onAutocompleteAccepted(completion: CompletionData) { + AutocompleteLoggingService.getInstance().logAutocompleteAccepted(completion); +} +``` + +This guide provides the foundation for understanding and working with Continue's dev data system. Always prioritize user privacy and follow established patterns when making changes. diff --git a/.continue/rules/edit-aggregator-singleton-rule.md b/.continue/rules/edit-aggregator-singleton-rule.md new file mode 100644 index 000000000..05ad0917b --- /dev/null +++ b/.continue/rules/edit-aggregator-singleton-rule.md @@ -0,0 +1,8 @@ +--- +patterns: ["EditAggregator", "processEdit"] +glob: "**/*.tsx" +name: "Enforce EditAggregator Singleton" +description: "Ensure that EditAggregator is used as a singleton in the codebase." +--- + +When you encounter usage of EditAggregator, be sure that this is compatible with the singleton nature of the EditAggregator class. If you are creating a new instance of EditAggregator, you should instead use the existing singleton. Refer to the `aggregateEdits.ts` to examine how the singleton pattern is used. Do not create a new instance of EditAggregator. diff --git a/.continue/rules/migrate-styled-components-to-tailwind.md b/.continue/rules/migrate-styled-components-to-tailwind.md new file mode 100644 index 000000000..0432f9a8d --- /dev/null +++ b/.continue/rules/migrate-styled-components-to-tailwind.md @@ -0,0 +1,5 @@ +--- +alwaysApply: false +--- + +Convert all of the styled components in this file into tailwind CSS. If a variable is used that is not already in @theme.ts and @tailwind.config.cjs, then you should figure out where it comes from and try adding that so it can be used. Wherever a function is called to interpolate a value, you can just use inline `styles={{ ... }}`. For ternaries, you could use @cn.ts. diff --git a/.continue/rules/test-running-guide.md b/.continue/rules/test-running-guide.md new file mode 100644 index 000000000..479185878 --- /dev/null +++ b/.continue/rules/test-running-guide.md @@ -0,0 +1,25 @@ +--- +globs: ["gui/**/*", "core/**/*"] +description: Provides test running instructions for GUI and core folders +alwaysApply: false +--- + +When working with test files, use the following commands to run tests: + +GUI folder tests: + +- Run all tests: `cd gui && npm test` + +Core folder tests: + +- Run Jest tests: `cd core && npm test` +- Run Vitest tests: `cd core && npm run vitest` + +Test file patterns: + +- GUI: _.test.ts or_.test.tsx files use Vitest +- Core: _.test.ts files use Jest,_.vitest.ts files use Vitest + +Best practices: + +- We are transitioning to vitest, so use that when creating new tests diff --git a/.continue/rules/typescript-enum-usage.md b/.continue/rules/typescript-enum-usage.md new file mode 100644 index 000000000..34728c1d5 --- /dev/null +++ b/.continue/rules/typescript-enum-usage.md @@ -0,0 +1,6 @@ +--- +globs: "**/*.{ts,tsx}" +alwaysApply: false +--- + +Use enums instead of simple string unions when possible in TypeScript code diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4a0595a38..cc85d0d0a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,6 +11,8 @@ body: attributes: label: Before submitting your bug report options: + - label: I've tried using the "Ask AI" feature on the [Continue docs site](https://docs.continue.dev/) to see if the docs have an answer + required: false - label: I believe this is a bug. I'll try to join the [Continue Discord](https://discord.gg/NWtdYexhMs) for questions required: false - label: I'm not able to find an [open issue](https://github.com/continuedev/continue/issues?q=is%3Aopen+is%3Aissue) that reports the same bug diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2497e28dc..348566cd8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,9 +8,9 @@ - [] The relevant docs, if any, have been updated or created - [] The relevant tests, if any, have been updated or created -## Screenshots +## Screen recording or screenshot -[ For visual changes, include screenshots. Screen recordings are particularly helpful, and appreciated! ] +[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See [this PR](https://github.com/continuedev/continue/pull/6455) as a good example. ] ## Tests diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index 1c170855c..225439ced 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -24,7 +24,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: path-to-signatures: "signatures/version1/cla.json" - path-to-document: "https://github.com/continuedev/continue/blob/main/docs/docs/CLA.md" + path-to-document: "https://github.com/continuedev/continue/blob/main/CLA.md" branch: cla-signatures - allowlist: dependabot[bot] + # Bots and CLAs signed outside of GitHub + allowlist: dependabot[bot],fbricon,panyamkeerthana,Jazzcort,owtaylor,halfline signed-commit-message: "CLA signed in $pullRequestNo" diff --git a/.github/workflows/compliance.yaml b/.github/workflows/compliance.yaml new file mode 100644 index 000000000..1c4adce0c --- /dev/null +++ b/.github/workflows/compliance.yaml @@ -0,0 +1,199 @@ +name: PR Compliance Checks + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + branches: [main] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + conventional-commits: + name: Validate Conventional Commits (Warning Only) + runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} + continue-on-error: true + permissions: + pull-requests: write + issues: write + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Validate conventional commits + id: commitlint + uses: wagoid/commitlint-github-action@v6 + with: + configFile: .commitlintrc.warning.json + # Only check the last commit instead of all commits in the PR + commitDepth: 1 + continue-on-error: true + + - name: Add commit message guidance comment + if: steps.commitlint.outcome == 'failure' + uses: actions/github-script@v7 + with: + script: | + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const botComment = comments.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Conventional Commit Format') + ); + + if (!botComment) { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: [ + "## ⚠️ Conventional Commit Format", + "", + "Your latest commit message doesn't follow the conventional commit format, but **this won't block your PR from being merged**. We recommend downloading [this extension](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) if you are using VS Code.", + "", + "### Expected Format:", + "```", + "[optional scope]: ", + "", + "[optional body]", + "", + "[optional footer(s)]", + "```", + "", + "### Examples:", + "- `feat: add changelog generation support`", + "- `fix: resolve login redirect issue`", + "- `docs: update README with new instructions`", + "- `chore: update dependencies`", + "", + "### Valid Types:", + "`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`", + "", + "This helps with:", + "- 📝 Automatic changelog generation", + "- 🚀 Automated semantic versioning", + "- 📊 Better project history tracking", + "", + "*This is a non-blocking warning - your PR can still be merged without fixing this.*" + ].join('\n') + }); + } + + security-audit: + name: Security Audit + runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} + permissions: + security-events: write + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Fix vulnerabilities + run: npm audit fix + + - name: Run npm audit + run: npm audit --audit-level=moderate + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + + # Use this for any files that we want to be certain exist + # Basically creates a forcing function to discuss were anyone to want to remove them + file-validation: + name: Required Files Check + runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check required files + run: | + required_files=( + "package.json" + "package-lock.json" + "README.md" + "LICENSE" + ".gitignore" + "tsconfig.json" + "SECURITY.md" + "CONTRIBUTING.md" + ".nvmrc" + ".prettierrc" + ".prettierignore" + ) + + missing_files=() + for file in "${required_files[@]}"; do + if [[ ! -f "$file" ]]; then + missing_files+=("$file") + fi + done + + if [[ ${#missing_files[@]} -gt 0 ]]; then + echo "❌ Missing required files:" + printf '%s\n' "${missing_files[@]}" + exit 1 + else + echo "✅ All required files present" + fi + + compliance-summary: + name: Compliance Summary + runs-on: ubuntu-latest + needs: [conventional-commits, security-audit, file-validation] + if: always() && !github.event.pull_request.draft + steps: + - name: Check compliance status + run: | + echo "## 🔍 Compliance Check Results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + if [[ "${{ needs.conventional-commits.result }}" == "success" ]]; then + echo "✅ Conventional Commits: PASSED" >> $GITHUB_STEP_SUMMARY + elif [[ "${{ needs.conventional-commits.result }}" == "failure" ]]; then + echo "⚠️ Conventional Commits: WARNING (non-blocking)" >> $GITHUB_STEP_SUMMARY + else + echo "❌ Conventional Commits: SKIPPED" >> $GITHUB_STEP_SUMMARY + fi + + if [[ "${{ needs.security-audit.result }}" == "success" ]]; then + echo "✅ Security Audit: PASSED" >> $GITHUB_STEP_SUMMARY + else + echo "❌ Security Audit: FAILED" >> $GITHUB_STEP_SUMMARY + fi + + if [[ "${{ needs.file-validation.result }}" == "success" ]]; then + echo "✅ File Validation: PASSED" >> $GITHUB_STEP_SUMMARY + else + echo "❌ File Validation: FAILED" >> $GITHUB_STEP_SUMMARY + fi + + echo "" >> $GITHUB_STEP_SUMMARY + echo "📊 **Overall Status**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..b83567fca --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,32 @@ +name: Docs Check + +on: + push: + paths: + - 'docs2/**' + pull_request: + paths: + - 'docs2/**' + +jobs: + check-broken-links: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + cache-dependency-path: docs2/package-lock.json + + - name: Install dependencies + working-directory: ./docs2 + run: npm ci + + - name: Check for broken links + working-directory: ./docs2 + run: npx mintlify broken-links \ No newline at end of file diff --git a/.github/workflows/jetbrains-release.yaml b/.github/workflows/jetbrains-release.yaml index 8ea3d2ebb..531129c79 100644 --- a/.github/workflows/jetbrains-release.yaml +++ b/.github/workflows/jetbrains-release.yaml @@ -63,7 +63,6 @@ jobs: - name: Bump version in gradle.properties run: | - cd extensions/intellij awk '/pluginVersion=/{split($0,a,"="); split(a[2],b,"."); b[3]+=1; printf "%s=%s.%s.%s\n",a[1],b[1],b[2],b[3];next}1' gradle.properties > tmp && mv tmp gradle.properties rm -rf tmp NEW_VERSION=$(grep 'pluginVersion=' gradle.properties | cut -d'=' -f2) @@ -167,20 +166,8 @@ jobs: path: gui/node_modules key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} - - uses: actions/cache@v4 - id: config-yaml-cache - with: - path: packages/config-yaml/node_modules - key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }} - - - name: Build and check config-yaml - run: | - cd ../../packages/config-yaml - npm i - npx tsc --noEmit - # Tests are currently failing, commenting out for now - # npm test - npm run build + - name: Build packages (Unix) + run: cd ../.. && ./scripts/build-packages.sh # npm install core - name: Install core node_modules @@ -236,10 +223,6 @@ jobs: # apple-product-id: dev.continue.continue-binary # options: --options runtime --entitlements entitlements.xml - # Build plugin - - name: Build plugin - run: ./gradlew buildPlugin - # Publish the plugin to JetBrains Marketplace - name: Publish EAP Plugin if: github.event_name == 'release' || github.event.inputs.publish_build == 'true' @@ -249,7 +232,7 @@ jobs: PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} RELEASE_CHANNEL: eap - run: ./gradlew publishPlugin + run: ./gradlew publishPlugin --info --stacktrace - name: Publish Stable Plugin if: github.event_name == 'release' || github.event.inputs.publish_build == 'true' @@ -259,7 +242,7 @@ jobs: PRIVATE_KEY: ${{ secrets.JETBRAINS_PRIVATE_KEY }} PRIVATE_KEY_PASSWORD: ${{ secrets.JETBRAINS_PRIVATE_KEY_PASSWORD }} RELEASE_CHANNEL: default - run: ./gradlew publishPlugin + run: ./gradlew publishPlugin --info --stacktrace # Prepare plugin archive content for creating artifact - name: Prepare Plugin Artifact diff --git a/.github/workflows/metrics.yaml b/.github/workflows/metrics.yaml index 1ee476aaf..ba4e1cd4a 100644 --- a/.github/workflows/metrics.yaml +++ b/.github/workflows/metrics.yaml @@ -50,7 +50,7 @@ jobs: echo "metrics_content=$content" >> "$GITHUB_OUTPUT" - name: Post a message in a channel - uses: slackapi/slack-github-action@v2.1.0 + uses: slackapi/slack-github-action@v2.1.1 with: webhook: ${{ secrets.ISSUE_PR_METRICS_SLACK_WEBHOOK_URL }} webhook-type: incoming-webhook diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 36eebc970..b4333890d 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -50,7 +50,10 @@ jobs: install-config-yaml: needs: install-root - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -77,7 +80,10 @@ jobs: install-openai-adapters: needs: install-root - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -133,7 +139,10 @@ jobs: install-core: needs: install-root - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -381,7 +390,10 @@ jobs: install-vscode: needs: [install-root, install-core, install-config-yaml, install-openai-adapters] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -572,6 +584,43 @@ jobs: cd packages/config-yaml npm test + openai-adapters-tests: + needs: install-openai-adapters + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + + - uses: actions/cache@v4 + id: openai-adapters-cache + with: + path: packages/openai-adapters/node_modules + key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }} + + - name: Run openai-adapters tests + run: | + cd packages/openai-adapters + npm test + env: + IGNORE_API_KEY_TESTS: ${{ github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]' }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_CODESTRAL_API_KEY: ${{ secrets.AZURE_FOUNDRY_CODESTRAL_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} + VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} + vscode-get-test-file-matrix: runs-on: ubuntu-latest needs: [install-root, install-vscode, install-config-yaml] @@ -613,13 +662,19 @@ jobs: echo "test_file_matrix<> $GITHUB_OUTPUT echo "$FILES" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + env: + # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - name: Debug Outputs run: | echo "Test files: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}" vscode-package-extension: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] needs: [ install-vscode, @@ -676,7 +731,7 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v4 with: - name: vscode-extension-build + name: vscode-extension-build-${{ runner.os }} path: extensions/vscode/build vscode-download-e2e-dependencies: @@ -772,7 +827,7 @@ jobs: - name: Download build artifact uses: actions/download-artifact@v4 with: - name: vscode-extension-build + name: vscode-extension-build-Linux path: extensions/vscode/build - name: Download e2e dependencies @@ -1068,6 +1123,7 @@ jobs: - config-yaml-checks - install-config-yaml - install-openai-adapters + - openai-adapters-tests steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/.github/workflows/release-config-yaml.yml b/.github/workflows/release-config-yaml.yml index f0d220ed0..fea1c31d4 100644 --- a/.github/workflows/release-config-yaml.yml +++ b/.github/workflows/release-config-yaml.yml @@ -6,6 +6,13 @@ on: - main paths: - "packages/config-yaml/**" + - ".github/workflows/release-config-yaml.yml" + - ".github/workflows/reusable-release.yml" + +permissions: + contents: write + issues: write + pull-requests: write jobs: release: @@ -16,3 +23,12 @@ jobs: secrets: SEMANTIC_RELEASE_GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} SEMANTIC_RELEASE_NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_CODESTRAL_API_KEY: ${{ secrets.AZURE_FOUNDRY_CODESTRAL_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} + VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} diff --git a/.github/workflows/release-fetch.yml b/.github/workflows/release-fetch.yml index 2fa1124bc..fb4636a21 100644 --- a/.github/workflows/release-fetch.yml +++ b/.github/workflows/release-fetch.yml @@ -6,6 +6,13 @@ on: - main paths: - "packages/fetch/**" + - ".github/workflows/release-fetch.yml" + - ".github/workflows/reusable-release.yml" + +permissions: + contents: write + issues: write + pull-requests: write jobs: release: @@ -16,3 +23,12 @@ jobs: secrets: SEMANTIC_RELEASE_GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} SEMANTIC_RELEASE_NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_CODESTRAL_API_KEY: ${{ secrets.AZURE_FOUNDRY_CODESTRAL_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} + VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} diff --git a/.github/workflows/release-llm-info.yml b/.github/workflows/release-llm-info.yml index 1b1c044dc..7a94eba59 100644 --- a/.github/workflows/release-llm-info.yml +++ b/.github/workflows/release-llm-info.yml @@ -16,3 +16,11 @@ jobs: secrets: SEMANTIC_RELEASE_GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} SEMANTIC_RELEASE_NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_CODESTRAL_API_KEY: ${{ secrets.AZURE_FOUNDRY_CODESTRAL_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/release-openai-adapters.yml b/.github/workflows/release-openai-adapters.yml index ce7f4fda8..e2a6b0622 100644 --- a/.github/workflows/release-openai-adapters.yml +++ b/.github/workflows/release-openai-adapters.yml @@ -6,6 +6,13 @@ on: - main paths: - "packages/openai-adapters/**" + - ".github/workflows/release-openai-adapters.yml" + - ".github/workflows/reusable-release.yml" + +permissions: + contents: write + issues: write + pull-requests: write jobs: release: @@ -16,3 +23,12 @@ jobs: secrets: SEMANTIC_RELEASE_GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} SEMANTIC_RELEASE_NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_CODESTRAL_API_KEY: ${{ secrets.AZURE_FOUNDRY_CODESTRAL_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} + VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} diff --git a/.github/workflows/reusable-release.yml b/.github/workflows/reusable-release.yml index 7de9d7320..80d135e29 100644 --- a/.github/workflows/reusable-release.yml +++ b/.github/workflows/reusable-release.yml @@ -14,6 +14,24 @@ on: required: true SEMANTIC_RELEASE_NPM_TOKEN: required: true + OPENAI_API_KEY: + required: false + ANTHROPIC_API_KEY: + required: false + GEMINI_API_KEY: + required: false + MISTRAL_API_KEY: + required: false + AZURE_OPENAI_API_KEY: + required: false + AZURE_FOUNDRY_CODESTRAL_API_KEY: + required: false + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: + required: false + AZURE_OPENAI_GPT41_API_KEY: + required: false + VOYAGE_API_KEY: + required: false permissions: contents: write @@ -46,10 +64,20 @@ jobs: - name: Run tests run: npm test + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_CODESTRAL_API_KEY: ${{ secrets.AZURE_FOUNDRY_CODESTRAL_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} + VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }} - name: Release env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} - run: npx semantic-release \ No newline at end of file + run: npx semantic-release diff --git a/.gitignore b/.gitignore index 0e528088c..bf5b0366d 100644 --- a/.gitignore +++ b/.gitignore @@ -67,8 +67,9 @@ instance/ # Scrapy stuff: .scrapy -# Sphinx documentation +# docusaurus docs/_build/ +docs/.docusaurus # PyBuilder target/ diff --git a/.idea/gradle.xml b/.idea/gradle.xml index c277e816e..324ac997a 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,7 @@