From bf470aecda7121996b893de2a21f76b07ea084ba Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sun, 22 Jun 2025 16:57:48 -0700 Subject: [PATCH] feat: new rules --- .../rules/github-pr-documentation-updater.md | 7 +++ .continue/rules/pure-function-unit-tests.md | 1 + .../vs-code-commands-helper-functions.md | 5 ++ extensions/intellij/rules.md | 56 +++++++++++++++++++ extensions/vscode/package-lock.json | 4 +- packages/config-yaml/package-lock.json | 4 +- 6 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 .continue/rules/github-pr-documentation-updater.md create mode 100644 .continue/rules/pure-function-unit-tests.md create mode 100644 .continue/rules/vs-code-commands-helper-functions.md create mode 100644 extensions/intellij/rules.md diff --git a/.continue/rules/github-pr-documentation-updater.md b/.continue/rules/github-pr-documentation-updater.md new file mode 100644 index 000000000..3560ccdad --- /dev/null +++ b/.continue/rules/github-pr-documentation-updater.md @@ -0,0 +1,7 @@ +--- +name: Update docs from GitHub PR +description: Provide a PR link to update docs based on +alwaysApply: false +--- + +When provided with a GitHub PR URL, use the GitHub CLI (`gh pr view --json title,body,commits,files,additions,deletions,changedFiles`) to fetch comprehensive PR details including title, description, commits, changed files, and diff statistics. Analyze the PR content to identify what documentation in the `docs` folder needs to be updated, created, or modified. Update relevant documentation files to reflect the changes, new features, bug fixes, or improvements described in the PR. Ensure documentation changes are accurate, well-structured, and maintain consistency with existing docs formatting and style. diff --git a/.continue/rules/pure-function-unit-tests.md b/.continue/rules/pure-function-unit-tests.md new file mode 100644 index 000000000..68a1ff983 --- /dev/null +++ b/.continue/rules/pure-function-unit-tests.md @@ -0,0 +1 @@ +Always create comprehensive unit tests for new pure functions. Tests should cover normal cases, edge cases, and boundary conditions. diff --git a/.continue/rules/vs-code-commands-helper-functions.md b/.continue/rules/vs-code-commands-helper-functions.md new file mode 100644 index 000000000..bf2e0a8da --- /dev/null +++ b/.continue/rules/vs-code-commands-helper-functions.md @@ -0,0 +1,5 @@ +--- +globs: "extensions/vscode/src/commands.ts" +--- + +When adding new commands to the commands map, always create a separate helper function for the command logic instead of defining it inline. Follow the pattern of existing commands like `streamInlineEdit` - define the helper function below the commands map, then call it from within the command entry. diff --git a/extensions/intellij/rules.md b/extensions/intellij/rules.md new file mode 100644 index 000000000..1f95724c9 --- /dev/null +++ b/extensions/intellij/rules.md @@ -0,0 +1,56 @@ +# Continue JetBrains Extension + +## Project Purpose + +JetBrains/IntelliJ extension for Continue AI code assistant. Provides chat, autocomplete, inline edit, and agent features within JetBrains IDEs. + +## Architecture + +- **Language**: Kotlin (JDK 17), Gradle build +- **Communication**: stdin/stdout message passing with core binary from `../../binary` +- **UI**: Embeds React webview from `../../gui` +- **Platform**: IntelliJ Platform Plugin (IDEA, PyCharm, WebStorm, etc.) + +## Key Source Structure + +``` +src/main/kotlin/com/github/continuedev/continueintellijextension/ +├── continue/ # Core integration (CoreMessenger, IntelliJIde, IdeProtocolClient) +├── autocomplete/ # Code completion logic +├── editor/ # Diff handling, inline edits +├── toolWindow/ # Main UI panel +├── services/ # Settings, plugin lifecycle +├── actions/ # Keyboard shortcuts, menu actions +├── protocol/ # Message type definitions +└── constants/ # App constants, paths + +src/main/resources/ +├── META-INF/plugin.xml # Plugin configuration +└── webview/ # Embedded React UI assets +``` + +## Core Files + +- `IntelliJIde.kt`: Main IDE interface implementation +- `CoreMessenger.kt`: Binary communication handler +- `plugin.xml`: Plugin manifest and extension points +- `build.gradle.kts`: Build configuration +- `ContinuePluginService.kt`: Main service orchestrator + +## Message Protocol + +JSON messages between Extension ↔ Core ↔ GUI. Message types in `constants/MessageTypes.kt`. Extension relays messages between core binary and webview. + +## Testing + +- Unit tests: `src/test/kotlin/` +- E2E tests: UI automation with intellij-ui-test-robot +- Test command: `./gradlew test` +- Debug: `runIde` Gradle task + +## Key Integration Points + +- File operations via IntelliJ VFS +- Editor integration for diffs/autocomplete +- Git operations for repository context +- Settings via IntelliJ platform storage diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 199c669c7..1d493deef 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.48", + "version": "1.1.49", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.48", + "version": "1.1.49", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", diff --git a/packages/config-yaml/package-lock.json b/packages/config-yaml/package-lock.json index 492e0eaa5..6d02d51d8 100644 --- a/packages/config-yaml/package-lock.json +++ b/packages/config-yaml/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.93", + "version": "1.0.94", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/config-yaml", - "version": "1.0.93", + "version": "1.0.94", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14",