Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ To send us a pull request, please:
GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

## Updating Plugin Version

To update the plugin version across all files:

1. **Prerequisites**: Ensure you have Git Bash (Windows) or Terminal (Mac/Linux)
2. **Run the version script**:
```bash
./update-version.sh [new-version]
```
Example: `./update-version.sh 2.7.0`

3. **What gets updated**:
- Root `pom.xml` version
- All child `pom.xml` parent versions
- `plugin/META-INF/MANIFEST.MF` Bundle-Version
- `feature/feature.xml` version
- `updatesite/category.xml` version references

4. **Build with new version**: `mvn clean install` and `mvn clean package`

## Debugging/Running Locally
To test your changes locally, you can run the plugin from your workspace by importing it into Eclipse.

Expand Down
4 changes: 2 additions & 2 deletions feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="software.aws.toolkits.eclipse.amazonq.feature"
label="Amazon Q for Eclipse"
version="2.2.1.qualifier">
version="2.4.0.qualifier">

<description>
Amazon Q Developer helps users build faster across the entire software development lifecycle by providing tailored responses and code recommendations that conform to their team's internal libraries, proprietary algorithmic techniques, and enterprise code style.
Expand Down Expand Up @@ -198,6 +198,6 @@ https://github.com/aws/amazon-q-eclipse/blob/main/attribution.xml
id="amazon-q-eclipse"
download-size="11000"
install-size="0"
version="2.2.1.qualifier"
version="2.4.0.qualifier"
unpack="false"/>
</feature>
2 changes: 1 addition & 1 deletion feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>software.aws.toolkits.eclipse</groupId>
<artifactId>amazon-q-eclipse-group</artifactId>
<version>2.2.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
3 changes: 2 additions & 1 deletion plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: Amazon Q for Eclipse
Bundle-Provider: Amazon Web Services
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-SymbolicName: amazon-q-eclipse;singleton:=true
Bundle-Version: 2.2.1.qualifier
Bundle-Version: 2.4.0.qualifier
Automatic-Module-Name: amazon.q.eclipse
Bundle-ActivationPolicy: lazy
Bundle-Activator: software.aws.toolkits.eclipse.amazonq.plugin.Activator
Expand Down Expand Up @@ -35,6 +35,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.31.0",
Bundle-Classpath: .,
target/dependency/annotations.jar,
target/dependency/apache-client.jar,
target/dependency/arns.jar,
target/dependency/auth.jar,
target/dependency/aws-core.jar,
target/dependency/aws-json-protocol.jar,
Expand Down
25 changes: 23 additions & 2 deletions plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,29 @@
<equals value="org.eclipse.ui.DefaultTextEditor"/>
<equals value="org.eclipse.jdt.ui.CompilationUnitEditor"/>
<equals value="org.eclipse.ui.genericeditor.GenericEditor"/>
<equals value="software.aws.toolkits.eclipse.amazonq.views.AmazonQViewContainer"/>
<equals value="com.sap.adt.programs.ui.AdtProgramEditor"/>
<equals value="software.aws.toolkits.eclipse.amazonq.views.AmazonQViewContainer"/>
<equals value="com.sap.adt.programs.ui.AdtProgramEditor"/>
<equals value="com.sap.adt.programs.ui.AdtIncludeEditor"/>
<equals value="com.sap.adt.abapClassEditor"/>
<equals value="com.sap.adt.abapInterfaceEditor"/>
<!-- SAP GUI Editor for .asprog files -->
<equals value="com.sap.adt.sapgui.ui.editors.WinGuiEditor"/>
<!-- CDS Service Definition Editor for .assrvds files -->
<equals value="com.sap.adt.cds.srvd.ui.editors.SrvdSourceEditor"/>
<!-- Behavior Definition Editor for .asbdef files -->
<equals value="com.sap.wbobj.bdef.ui.editors.BdefSourceEditor"/>
<!-- CDS Data Definition Language Editor for .asddls files -->
<equals value="com.sap.adt.cds.ddl.ui.editors.DdlSourceEditor"/>
<!-- Dictionary Table Editor for .astabldt files -->
<equals value="com.sap.wbobj.dictionary.tabldt.ui.editors.DdicTableEditor"/>
<!-- Dictionary Structure Editor for .astablds files -->
<equals value="com.sap.wbobj.dictionary.tablds.ui.editors.DdicStructureEditor"/>
<!-- ABAP Function Group Include Editor for .asfugr files -->
<equals value="com.sap.adt.functions.ui.includes.abapFunctionGroupIncludeEditor"/>
<!-- ABAP Function Module Editor for .asfunc files -->
<equals value="com.sap.adt.functions.ui.fmodules.abapFunctionModuleEditor"/>
<!-- ABAP Function Group Editor for .asfugr files -->
<equals value="com.sap.adt.functions.ui.includes.abapFunctionGroupEditor"/>
</or>
</with>
</and>
Expand Down
7 changes: 6 additions & 1 deletion plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>software.aws.toolkits.eclipse</groupId>
<artifactId>amazon-q-eclipse-group</artifactId>
<version>2.2.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down Expand Up @@ -91,6 +91,11 @@
<artifactId>regions</artifactId>
<version>${aws.java.sdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>arns</artifactId>
<version>${aws.java.sdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>apache-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public final class ChatCommunicationManager implements EventObserver<ChatUIInbou
private final Map<String, Long> lastProcessedTimeMap = new ConcurrentHashMap<>();

private static final int MINIMUM_PARTIAL_RESPONSE_LENGTH = 50;
private static final int MIN_DELAY_BETWEEN_PARTIALS = 500;
private static final int MAX_DELAY_BETWEEN_PARTIALS = 2500;
private static final int MIN_DELAY_BETWEEN_PARTIALS = 250;
private static final int MAX_DELAY_BETWEEN_PARTIALS = 1500;
private static final int CHAR_COUNT_FOR_MAX_DELAY = 5000;

private final ConcurrentHashMap<String, Object> partialResultLocks = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -258,6 +258,42 @@ public void sendMessageToChatServer(final Command command, final ChatMessage mes
Activator.getLogger().error("Error processing mcpServerClick: " + e);
}
break;
case LIST_RULES:
try {
Object listRulesResponse = amazonQLspServer.listRules(message.getData()).get();
var listRulesCommand = ChatUIInboundCommand.createCommand(ChatUIInboundCommandName.ListRules.getValue(),
listRulesResponse);
Activator.getEventBroker().post(ChatUIInboundCommand.class, listRulesCommand);
} catch (Exception e) {
Activator.getLogger().error("Error processing listRules: " + e);
}
break;
case RULE_CLICK:
try {
Object ruleClickResponse = amazonQLspServer.ruleClick(message.getData()).get();
var ruleClickCommand = ChatUIInboundCommand.createCommand(ChatUIInboundCommandName.RuleClick.getValue(),
ruleClickResponse);
Activator.getEventBroker().post(ChatUIInboundCommand.class, ruleClickCommand);
} catch (Exception e) {
Activator.getLogger().error("Error processing ruleClick: " + e);
}
break;
case LIST_AVAILABLE_MODELS:
try {
Object listModelsResponse = amazonQLspServer.listAvailableModels(message.getData()).get();
var listModelsCommand = ChatUIInboundCommand.createCommand(ChatUIInboundCommandName.ListAvailableModels.getValue(),
listModelsResponse);
Activator.getEventBroker().post(ChatUIInboundCommand.class, listModelsCommand);
} catch (Exception e) {
Activator.getLogger().error("Error processing listAvailableModels: " + e);
}
break;
case PINNED_CONTEXT_ADD:
amazonQLspServer.pinnedContextAdd(message.getData());
break;
case PINNED_CONTEXT_REMOVE:
amazonQLspServer.pinnedContextRemove(message.getData());
break;
default:
throw new AmazonQPluginException("Unexpected command received from Chat UI: " + command.toString());
}
Expand Down Expand Up @@ -602,7 +638,10 @@ public void handlePartialResultProgressNotification(final ProgressParams params)
// send partial response to UI if not cancelled in the interim
if (Boolean.FALSE.equals(finalResultProcessed.get(token))) {
sendMessageToChatUI(new ChatUIInboundCommand(command, tabId, partialChatResult, true, null));
lastProcessedTimeMap.put(tabId, currentTime);
// only update timestamp for rate-limited messages (string body without additional messages)
if (!hasAdditionalMessages && body instanceof String) {
lastProcessedTimeMap.put(tabId, currentTime);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public enum ChatUIInboundCommandName {
GenericCommand("genericCommand"),
ChatOptionsUpdate("aws/chat/chatOptionsUpdate"),
ListMcpServers("aws/chat/listMcpServers"),
McpServerClick("aws/chat/mcpServerClick");
McpServerClick("aws/chat/mcpServerClick"),
ListRules("aws/chat/listRules"),
RuleClick("aws/chat/ruleClick"),
ListAvailableModels("aws/chat/listAvailableModels"),
SendPinnedContext("aws/chat/sendPinnedContext");

private final String value;

Expand Down
Loading
Loading