mirror of
https://github.com/cline/cline.git
synced 2025-06-03 03:59:07 +00:00
Set icons position based on text area base height
This commit is contained in:
parent
23e679cbf4
commit
4a3ebd49af
@ -2,7 +2,7 @@
|
|||||||
"name": "claude-dev",
|
"name": "claude-dev",
|
||||||
"displayName": "Claude Dev",
|
"displayName": "Claude Dev",
|
||||||
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.",
|
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.",
|
||||||
"version": "1.5.16",
|
"version": "1.5.17",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.84.0"
|
"vscode": "^1.84.0"
|
||||||
|
@ -57,6 +57,7 @@ const ChatView = ({
|
|||||||
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false)
|
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false)
|
||||||
const [selectedImages, setSelectedImages] = useState<string[]>([])
|
const [selectedImages, setSelectedImages] = useState<string[]>([])
|
||||||
const [thumbnailsHeight, setThumbnailsHeight] = useState(0)
|
const [thumbnailsHeight, setThumbnailsHeight] = useState(0)
|
||||||
|
const [textAreaBaseHeight, setTextAreaBaseHeight] = useState<number | undefined>(undefined)
|
||||||
|
|
||||||
// we need to hold on to the ask because useEffect > lastMessage will always let us know when an ask comes in and handle it, but by the time handleMessage is called, the last message might not be the ask anymore (it could be a say that followed)
|
// we need to hold on to the ask because useEffect > lastMessage will always let us know when an ask comes in and handle it, but by the time handleMessage is called, the last message might not be the ask anymore (it could be a say that followed)
|
||||||
const [claudeAsk, setClaudeAsk] = useState<ClaudeAsk | undefined>(undefined)
|
const [claudeAsk, setClaudeAsk] = useState<ClaudeAsk | undefined>(undefined)
|
||||||
@ -606,10 +607,13 @@ const ChatView = ({
|
|||||||
onFocus={() => setIsTextAreaFocused(true)}
|
onFocus={() => setIsTextAreaFocused(true)}
|
||||||
onBlur={() => setIsTextAreaFocused(false)}
|
onBlur={() => setIsTextAreaFocused(false)}
|
||||||
onPaste={handlePaste}
|
onPaste={handlePaste}
|
||||||
onHeightChange={() =>
|
onHeightChange={(height, meta) => {
|
||||||
|
if (textAreaBaseHeight === undefined || height < textAreaBaseHeight) {
|
||||||
|
setTextAreaBaseHeight(height)
|
||||||
|
}
|
||||||
//virtuosoRef.current?.scrollToIndex({ index: "LAST", align: "end", behavior: "auto" })
|
//virtuosoRef.current?.scrollToIndex({ index: "LAST", align: "end", behavior: "auto" })
|
||||||
virtuosoRef.current?.scrollTo({ top: Number.MAX_SAFE_INTEGER, behavior: "auto" })
|
virtuosoRef.current?.scrollTo({ top: Number.MAX_SAFE_INTEGER, behavior: "auto" })
|
||||||
}
|
}}
|
||||||
placeholder={placeholderText}
|
placeholder={placeholderText}
|
||||||
maxRows={10}
|
maxRows={10}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
@ -657,7 +661,7 @@ const ChatView = ({
|
|||||||
right: 20,
|
right: 20,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "flex-center",
|
alignItems: "flex-center",
|
||||||
top: 10,
|
height: textAreaBaseHeight || 31,
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
}}>
|
}}>
|
||||||
<div style={{ display: "flex", flexDirection: "row", alignItems: "center" }}>
|
<div style={{ display: "flex", flexDirection: "row", alignItems: "center" }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user