Changesets · Branches · Tags · Compare
| Changeset | 4073cbe78fb8e974f32f5163a76d38004b18983025eb36cf72037b00948537bc |
|---|---|
| Author | Nate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-06-26 10:56 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-06-26 10:56 -07:00 |
| Parents | 3787403640d0, ad5483c0b909 |
3 files changed
added .continue/rules/new-protocol-message.md +35 −0
| @@ -0,0 +1,35 @@ | ||
| 1 | +--- | |
| 2 | +name: New protocol message | |
| 3 | +description: Create a new protocol message from core/gui/ide to core/gui/ide | |
| 4 | +--- | |
| 5 | + | |
| 6 | +Create a new protocol message by taking the following steps: | |
| 7 | + | |
| 8 | +## 1. Define the message type | |
| 9 | + | |
| 10 | +Add your new message type definition to the appropriate file in the `protocol/` directory with correct TypeScript typing. | |
| 11 | + | |
| 12 | +## 2. Check for duplicates | |
| 13 | + | |
| 14 | +Verify that no existing message type already provides the same functionality. | |
| 15 | + | |
| 16 | +## 3. Add to passThrough (if webview ↔ core) | |
| 17 | + | |
| 18 | +If your message is between webview and core, add it to `core/protocol/passThrough.ts`. | |
| 19 | + | |
| 20 | +## 4. Add to IntelliJ constants (if webview ↔ core) | |
| 21 | + | |
| 22 | +If your message is between webview and core, add it to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt`. | |
| 23 | + | |
| 24 | +## 5. Implement the message handler | |
| 25 | + | |
| 26 | +Implement the message in the appropriate location: | |
| 27 | + | |
| 28 | +- **Messages to core**: `core/core.ts` | |
| 29 | +- **Messages to GUI**: `useWebviewListener` hook | |
| 30 | +- **Messages to VS Code IDE**: `VsCodeMessenger.ts` | |
| 31 | +- **Messages to JetBrains IDE**: `IdeProtocolClient.kt` | |
| 32 | + | |
| 33 | +## 6. Test the implementation | |
| 34 | + | |
| 35 | +Verify that your message works correctly in both VS Code and JetBrains IDEs if applicable. |
added .continue/rules/overeager.md +5 −0
| @@ -0,0 +1,5 @@ | ||
| 1 | +--- | |
| 2 | +name: Don't be overeager | |
| 3 | +--- | |
| 4 | + | |
| 5 | +Avoid over-eagerly adding new features. You should solve the problem at hand and then can propose further work. |
added core/rules.md +10 −0
| @@ -0,0 +1,10 @@ | ||
| 1 | +# `core` rules | |
| 2 | + | |
| 3 | +Whenever a new protocol message is added to the `protocol/` directory, check the following: | |
| 4 | + | |
| 5 | +- It's type is defined correctly | |
| 6 | +- If it is a message from webview to core or vice versa: | |
| 7 | + - It has been added to `core/protocol/passThrough.ts` | |
| 8 | + - It has been added to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt` | |
| 9 | +- It is implemented in either `core/core.ts` (for messages to the core), in a `useWebviewListener` (for messages to the gui), or in `VsCodeMessenger.ts` for VS Code or `IdeProtocolClient.kt` for JetBriains (for messages to the IDE). | |
| 10 | +- It does not duplicate functionality from another message type that already exists. |