Updating Roo-Cline with the latest cline/cline (11/22)

This commit is contained in:
John Stearns
2024-11-22 15:28:46 -08:00
67 changed files with 22904 additions and 22914 deletions

View File

@@ -91,7 +91,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
nextActionMessages.length > 0
? {
messages: [...nextActionMessages],
}
}
: undefined,
})
@@ -121,7 +121,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
nextActionMessages.length > 0
? {
messages: [...nextActionMessages],
}
}
: undefined,
})
}
@@ -167,13 +167,13 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
mousePosition: currentPage?.currentState.mousePosition || latestState.mousePosition || "700,400",
consoleLogs: currentPage?.currentState.consoleLogs,
screenshot: currentPage?.currentState.screenshot || latestState.screenshot,
}
}
: {
url: currentPage?.currentState.url || initialUrl,
mousePosition: currentPage?.currentState.mousePosition || "700,400",
consoleLogs: currentPage?.currentState.consoleLogs,
screenshot: currentPage?.currentState.screenshot,
}
}
const [actionContent, { height: actionHeight }] = useSize(
<div>
@@ -188,7 +188,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
{!isBrowsing && messages.some((m) => m.say === "browser_action_result") && currentPageIndex === 0 && (
<BrowserActionBox action={"launch"} text={initialUrl} />
)}
</div>
</div>,
)
useEffect(() => {
@@ -381,7 +381,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
</div>
</div>
)}
</div>
</div>,
)
// Height change effect

View File

@@ -35,7 +35,7 @@ const ChatRow = memo(
padding: "10px 6px 10px 15px",
}}>
<ChatRowContent {...props} />
</div>
</div>,
)
useEffect(() => {
@@ -55,7 +55,7 @@ const ChatRow = memo(
return chatrow
},
// memo does shallow comparison of props, so we need to do deep comparison of arrays/objects whose properties might change
deepEqual
deepEqual,
)
export default ChatRow
@@ -707,9 +707,7 @@ export const ChatRowContent = ({
padding: `2px 8px ${isExpanded ? 0 : 8}px 8px`,
}}>
<span
className={`codicon codicon-chevron-${
isExpanded ? "down" : "right"
}`}></span>
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"}`}></span>
<span style={{ fontSize: "0.8em" }}>Command Output</span>
</div>
{isExpanded && <CodeBlock source={`${"```"}shell\n${output}\n${"```"}`} />}

View File

@@ -40,7 +40,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
shouldDisableImages,
onHeightChange,
},
ref
ref,
) => {
const { filePaths } = useExtensionState()
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false)
@@ -119,7 +119,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
const { newValue, mentionIndex } = insertMention(
textAreaRef.current.value,
cursorPosition,
insertValue
insertValue,
)
setInputValue(newValue)
@@ -137,7 +137,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
}, 0)
}
},
[setInputValue, cursorPosition]
[setInputValue, cursorPosition],
)
const handleKeyDown = useCallback(
@@ -163,14 +163,14 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
const selectableOptions = options.filter(
(option) =>
option.type !== ContextMenuOptionType.URL &&
option.type !== ContextMenuOptionType.NoResults
option.type !== ContextMenuOptionType.NoResults,
)
if (selectableOptions.length === 0) return -1 // No selectable options
// Find the index of the next selectable option
const currentSelectableIndex = selectableOptions.findIndex(
(option) => option === options[prevIndex]
(option) => option === options[prevIndex],
)
const newSelectableIndex =
@@ -252,7 +252,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
setInputValue,
justDeletedSpaceAfterMention,
queryItems,
]
],
)
useLayoutEffect(() => {
@@ -285,7 +285,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
setSelectedMenuIndex(-1)
}
},
[setInputValue]
[setInputValue],
)
useEffect(() => {
@@ -370,7 +370,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
}
}
},
[shouldDisableImages, setSelectedImages, cursorPosition, setInputValue, inputValue]
[shouldDisableImages, setSelectedImages, cursorPosition, setInputValue, inputValue],
)
const handleThumbnailsHeightChange = useCallback((height: number) => {
@@ -394,7 +394,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
highlightLayerRef.current.innerHTML = text
.replace(/\n$/, "\n\n")
.replace(/[<>&]/g, (c) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" }[c] || c))
.replace(/[<>&]/g, (c) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[c] || c)
.replace(mentionRegexGlobal, '<mark class="mention-context-textarea-highlight">$&</mark>')
highlightLayerRef.current.scrollTop = textAreaRef.current.scrollTop
@@ -417,7 +417,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
updateCursorPosition()
}
},
[updateCursorPosition]
[updateCursorPosition],
)
return (
@@ -594,7 +594,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
</div>
</div>
)
}
},
)
export default ChatTextArea

View File

@@ -271,7 +271,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
disableAutoScrollRef.current = false
}
},
[messages.length, clineAsk]
[messages.length, clineAsk],
)
const startNewTask = useCallback(() => {
@@ -366,7 +366,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
const newImages = message.images ?? []
if (newImages.length > 0) {
setSelectedImages((prevImages) =>
[...prevImages, ...newImages].slice(0, MAX_IMAGES_PER_MESSAGE)
[...prevImages, ...newImages].slice(0, MAX_IMAGES_PER_MESSAGE),
)
}
break
@@ -392,7 +392,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
handleSendMessage,
handlePrimaryButtonClick,
handleSecondaryButtonClick,
]
],
)
useEvent("message", handleMessage)
@@ -530,9 +530,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
})
},
10,
{ immediate: true }
{ immediate: true },
),
[]
[],
)
const scrollToBottomAuto = useCallback(() => {
@@ -594,7 +594,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
}
}
},
[groupedMessages, expandedRows, scrollToBottomAuto, isAtBottom]
[groupedMessages, expandedRows, scrollToBottomAuto, isAtBottom],
)
const handleRowHeightChange = useCallback(
@@ -609,7 +609,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
}
}
},
[scrollToBottomSmooth, scrollToBottomAuto]
[scrollToBottomSmooth, scrollToBottomAuto],
)
useEffect(() => {
@@ -672,7 +672,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
/>
)
},
[expandedRows, modifiedMessages, groupedMessages.length, toggleRowExpansion, handleRowHeightChange]
[expandedRows, modifiedMessages, groupedMessages.length, toggleRowExpansion, handleRowHeightChange],
)
return (

View File

@@ -25,7 +25,7 @@ const ContextMenu: React.FC<ContextMenuProps> = ({
const filteredOptions = useMemo(
() => getContextMenuOptions(searchQuery, selectedType, queryItems),
[searchQuery, selectedType, queryItems]
[searchQuery, selectedType, queryItems],
)
useEffect(() => {