diff --git a/src/app/common/common.less b/src/app/common/common.less index 3a9f65dc..3ca716ae 100644 --- a/src/app/common/common.less +++ b/src/app/common/common.less @@ -407,9 +407,7 @@ } pre.selected { - border-style: solid; - outline-width: 2px; - border-color: @term-green; + outline: 2px solid @term-green; } .title.is-1 { diff --git a/src/app/workspace/cmdinput/aichat.tsx b/src/app/workspace/cmdinput/aichat.tsx index 008fe8eb..debba909 100644 --- a/src/app/workspace/cmdinput/aichat.tsx +++ b/src/app/workspace/cmdinput/aichat.tsx @@ -139,10 +139,10 @@ class AIChat extends React.Component<{}, {}> { let msgClassName = "chat-msg " + senderClassName; let innerHTML: React.JSX.Element = ( - - -

You

-
+
+ +
You
+

{chatItem.userquery}

); @@ -152,13 +152,13 @@ class AIChat extends React.Component<{}, {}> { } else { innerHTML = ( - +
-

ChatGPT

- +
ChatGPT
+
); diff --git a/src/app/workspace/cmdinput/cmdinput.less b/src/app/workspace/cmdinput/cmdinput.less index 07134cb6..4d02cd17 100644 --- a/src/app/workspace/cmdinput/cmdinput.less +++ b/src/app/workspace/cmdinput/cmdinput.less @@ -190,12 +190,16 @@ display: inline-block; margin-right: 0; padding: 0.2em 0.7rem; - opacity: 0.5; - cursor: pointer; border-radius: 4px; vertical-align: super; - &:hover { - opacity: 1; + + .hint-elem { + cursor: pointer; + opacity: 0.5; + + &:hover { + opacity: 1.0; + } } } } diff --git a/src/app/workspace/cmdinput/cmdinput.tsx b/src/app/workspace/cmdinput/cmdinput.tsx index f6b0693b..6625b9df 100644 --- a/src/app/workspace/cmdinput/cmdinput.tsx +++ b/src/app/workspace/cmdinput/cmdinput.tsx @@ -74,6 +74,14 @@ class CmdInput extends React.Component<{}, {}> { GlobalModel.inputModel.giveFocus(); } + @boundMethod + clickAIHint(e: any): void { + e.preventDefault(); + e.stopPropagation(); + let inputModel = GlobalModel.inputModel; + inputModel.openAIAssistantChat(); + } + @boundMethod clickHistoryHint(e: any): void { e.preventDefault(); @@ -218,12 +226,18 @@ class CmdInput extends React.Component<{}, {}> { **/} {!focusVal && (
- focus input ({renderCmdText("I")}) +
focus input ({renderCmdText("I")})
)} {focusVal && ( -
- {historyShow ? "close (esc)" : "history (ctrl-r)"} +
+ +
close (esc)
+
+ +
history (ctrl-r)
+
AI (ctrl-space)
+
)}