diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF index 7155eb4e..dead985e 100644 --- a/plugin/META-INF/MANIFEST.MF +++ b/plugin/META-INF/MANIFEST.MF @@ -28,7 +28,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.31.0", org.apache.commons.logging;bundle-version="1.2.0", slf4j.api;bundle-version="2.0.13", org.apache.commons.lang3;bundle-version="3.14.0" -Bundle-Classpath: target/classes/, +Bundle-Classpath: ., target/dependency/annotations-2.28.26.jar, target/dependency/apache-client-2.28.26.jar, target/dependency/auth-2.28.26.jar, diff --git a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java index 36e79a0c..68d3f4b9 100644 --- a/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java +++ b/plugin/src/software/aws/toolkits/eclipse/amazonq/views/AmazonQChatWebview.java @@ -233,11 +233,10 @@ private String generateCss() { mask-position: center; scale: 60%; } - .mynah-button.mynah-button-secondary.fill-state-always.code-snippet-close-button - .mynah-ui-clickable-item - .mynah-ui-icon-cancel { - -webkit-mask-size: 187.5% !important; - mask-size: 187.5% !important; + .code-snippet-close-button i.mynah-ui-icon-cancel, + .mynah-chat-item-card-related-content-show-more i.mynah-ui-icon-down-open { + -webkit-mask-size: 195.5% !important; + mask-size: 195.5% !important; mask-position: center; aspect-ratio: 1/1; width: 15px; @@ -252,6 +251,9 @@ private String generateCss() { textarea:placeholder-shown { line-height: 1.5rem; } + .mynah-ui-spinner-container > span.mynah-ui-spinner-logo-part > .mynah-ui-spinner-logo-mask.text { + opacity: 1 !important; + } """; } @@ -270,7 +272,8 @@ private String generateJS(final String jsEntrypoint) { postMessage: (message) => { ideCommand(JSON.stringify(message)); } - }, { + }, + { quickActionCommands: %s, disclaimerAcknowledged: %b }); @@ -286,10 +289,12 @@ private String generateJS(final String jsEntrypoint) { %s + %s + """, jsEntrypoint, getWaitFunction(), chatQuickActionConfig, "true".equals(disclaimerAcknowledged), getArrowKeyBlockingFunction(), - getSelectAllAndCopySupportFunctions(), getPreventEmptyPopupFunction()); + getSelectAllAndCopySupportFunctions(), getPreventEmptyPopupFunction(), getFocusOnChatPromptFunction()); } /* @@ -425,6 +430,21 @@ function attachEventListeners(element) { """.formatted(selector); } + private String getFocusOnChatPromptFunction() { + return """ + window.addEventListener('load', () => { + const chatContainer = document.querySelector('.mynah-chat-prompt'); + if (chatContainer) { + chatContainer.addEventListener('click', (event) => { + if (!event.target.closest('.mynah-chat-prompt-input')) { + keepFocusOnPrompt(); + } + }); + } + }); + """; + } + @Override public final void onSendToChatUi(final String message) { String script = "window.postMessage(" + message + ");";