Skip to content

Commit 5e559fa

Browse files
fix @ context button
1 parent 85f9d57 commit 5e559fa

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"noFallthroughCasesInSwitch": true,
1111
"noImplicitOverride": true,
1212
"noImplicitReturns": true,
13-
"noUnusedLocals": true,
13+
"noUnusedLocals": false,
1414
"resolveJsonModule": true,
1515
"rootDir": ".",
1616
"skipLibCheck": true,

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -748,19 +748,17 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
748748
variant={"secondary"}
749749
disabled={textAreaDisabled}
750750
onClick={() => {
751-
// if (!textAreaDisabled && textAreaRef.current) {
752-
// const newValue =
753-
// inputValue.slice(0, cursorPosition) +
754-
// "@" +
755-
// inputValue.slice(cursorPosition);
756-
// setInputValue(newValue);
757-
// const newCursorPosition = cursorPosition + 1;
758-
// setCursorPosition(newCursorPosition);
759-
// setIntendedCursorPosition(newCursorPosition);
760-
// }
761-
setShowContextMenu(true)
762-
setSearchQuery("")
763-
// textAreaRef.current.focus();
751+
if (!textAreaDisabled && textAreaRef.current) {
752+
setShowContextMenu(true)
753+
setSearchQuery("")
754+
const newValue =
755+
inputValue.slice(0, cursorPosition) + "@" + inputValue.slice(cursorPosition)
756+
setInputValue(newValue)
757+
const newCursorPosition = cursorPosition + 1
758+
setCursorPosition(newCursorPosition)
759+
setIntendedCursorPosition(newCursorPosition)
760+
textAreaRef.current.focus()
761+
}
764762
}}
765763
style={{
766764
color: vscForeground,

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
10191019
<img src={splashIcon} alt="..." />
10201020
<div className="w-[300px] flex-col justify-start items-start gap-5 inline-flex">
10211021
<div className="flex flex-col text-left">
1022-
<div className="text-2xl">PearAI Coding Agesdfasfnt</div>
1022+
<div className="text-2xl">PearAI Coding Agent</div>
10231023
<div className="h-[18px] opacity-50 text-xs leading-[18px]">
10241024
Powered by Roo Code / Cline
10251025
</div>

0 commit comments

Comments
 (0)