setFlyoutVisible(!flyoutVisible)}
+ display="base"
+ size="s"
+ aria-label="toggle chat flyout button icon"
+ />
+ )}
+
setInputFocus(true)}
onBlur={() => setInputFocus(false)}
- placeholder="Ask question"
+ placeholder="Ask a question"
onKeyPress={onKeyPress}
onKeyUp={onKeyUp}
- prepend={
- setFlyoutVisible(!flyoutVisible)}
- />
- }
- append={
-
- {inputFocus ? (
-
- ⏎
-
- ) : (
-
- Ctrl + /
-
- )}
-
- }
+ className="llm-chat-header-text-input"
+ />
+ setFlyoutVisible(!flyoutVisible)}
+ className="llm-chat-toggle-icon"
/>
+
+ {inputFocus ? (
+
+ ⏎
+
+ ) : (
+
+ Ctrl + /
+
+ )}
+
diff --git a/public/index.scss b/public/index.scss
index be693d9f..cbc51a49 100644
--- a/public/index.scss
+++ b/public/index.scss
@@ -4,25 +4,14 @@
*/
.llm-chat-header-icon-wrapper {
- margin: 0 8px;
- height: 48px;
display: flex;
align-items: center;
+ position: relative;
+ width: 200px;
- .euiFormControlLayout__prepend {
- background-color: transparent !important;
- width: 36px !important;
- }
-
- .euiFieldText {
- width: 96px;
- transition: width 0.3s ease-in-out;
-
- &:focus {
- width: 250px;
- background-image: none;
- background-color: transparent;
- }
+ &.in-legacy-header{
+ margin: 0 $euiSizeS;
+ height: $euiSizeL * 2;
}
.euiIcon {
@@ -31,27 +20,19 @@
}
}
- .llm-chat-header-shortcut {
- display: flex;
- align-items: center;
- padding-right: 6px;
+ .llm-chat-header-text-input{
+ padding-left: $euiSizeXL;
+ padding-right: $euiSizeL * 2;
}
- &::after {
- content: '';
- display: block;
+ .llm-chat-toggle-icon{
position: absolute;
- top: 4px;
- bottom: 4px;
- left: 4px;
- right: 4px;
- border-radius: 9px;
- z-index: -1;
+ left: $euiSizeS;
}
-}
-.llm-chat-header-icon-wrapper-selected {
- &::after {
- background-color: $ouiColorPrimary;
+
+ .llm-chat-header-shortcut{
+ position: absolute;
+ right: $euiSizeS;
}
}
diff --git a/public/plugin.tsx b/public/plugin.tsx
index 954a4704..8d0d8a1c 100644
--- a/public/plugin.tsx
+++ b/public/plugin.tsx
@@ -246,20 +246,38 @@ export class AssistantPlugin
});
}
- coreStart.chrome.navControls.registerRight({
- order: 10000,
- mount: toMountPoint(
-
-
-
- ),
- });
+ if (coreStart.chrome.navGroup.getNavGroupEnabled()) {
+ coreStart.chrome.navControls.registerPrimaryHeaderRight({
+ order: 10000,
+ mount: toMountPoint(
+
+
+
+ ),
+ });
+ } else {
+ coreStart.chrome.navControls.registerRight({
+ order: 10000,
+ mount: toMountPoint(
+
+
+
+ ),
+ });
+ }
};
setupChat();
}