new rules
This commit is contained in:
35
.continue/rules/new-protocol-message.md
Normal file
35
.continue/rules/new-protocol-message.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: New protocol message
|
||||
description: Create a new protocol message from core/gui/ide to core/gui/ide
|
||||
---
|
||||
|
||||
Create a new protocol message by taking the following steps:
|
||||
|
||||
## 1. Define the message type
|
||||
|
||||
Add your new message type definition to the appropriate file in the `protocol/` directory with correct TypeScript typing.
|
||||
|
||||
## 2. Check for duplicates
|
||||
|
||||
Verify that no existing message type already provides the same functionality.
|
||||
|
||||
## 3. Add to passThrough (if webview ↔ core)
|
||||
|
||||
If your message is between webview and core, add it to `core/protocol/passThrough.ts`.
|
||||
|
||||
## 4. Add to IntelliJ constants (if webview ↔ core)
|
||||
|
||||
If your message is between webview and core, add it to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt`.
|
||||
|
||||
## 5. Implement the message handler
|
||||
|
||||
Implement the message in the appropriate location:
|
||||
|
||||
- **Messages to core**: `core/core.ts`
|
||||
- **Messages to GUI**: `useWebviewListener` hook
|
||||
- **Messages to VS Code IDE**: `VsCodeMessenger.ts`
|
||||
- **Messages to JetBrains IDE**: `IdeProtocolClient.kt`
|
||||
|
||||
## 6. Test the implementation
|
||||
|
||||
Verify that your message works correctly in both VS Code and JetBrains IDEs if applicable.
|
||||
5
.continue/rules/overeager.md
Normal file
5
.continue/rules/overeager.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
name: Don't be overeager
|
||||
---
|
||||
|
||||
Avoid over-eagerly adding new features. You should solve the problem at hand and then can propose further work.
|
||||
10
core/rules.md
Normal file
10
core/rules.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# `core` rules
|
||||
|
||||
Whenever a new protocol message is added to the `protocol/` directory, check the following:
|
||||
|
||||
- It's type is defined correctly
|
||||
- If it is a message from webview to core or vice versa:
|
||||
- It has been added to `core/protocol/passThrough.ts`
|
||||
- It has been added to `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt`
|
||||
- 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).
|
||||
- It does not duplicate functionality from another message type that already exists.
|
||||
Reference in New Issue
Block a user