Compare commits

...
Author SHA1 Message Date
Trevor Hudson a25e384956 remove sourcemap 2025-04-16 09:23:08 -07:00
Trevor Hudson 59275e77eb resolve conflicts 2025-04-14 18:31:06 -07:00
Trevor Hudson f7677fa856 remove colon if there is no message 2025-04-14 18:27:48 -07:00
Trevor Hudson 19c2de6067 - add ability to send context with an options selection
- add sourcemaps for debugging in the webview
2025-04-14 18:27:46 -07:00
4 changed files with 22 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Allow user to send context with an option selection
+12 -2
View File
@@ -49,6 +49,7 @@ interface ChatRowProps {
lastModifiedMessage?: ClineMessage
isLast: boolean
onHeightChange: (isTaller: boolean) => void
inputValue?: string
}
interface ChatRowContentProps extends Omit<ChatRowProps, "onHeightChange"> {}
@@ -84,7 +85,7 @@ const Markdown = memo(({ markdown }: { markdown?: string }) => {
const ChatRow = memo(
(props: ChatRowProps) => {
const { isLast, onHeightChange, message, lastModifiedMessage } = props
const { isLast, onHeightChange, message, lastModifiedMessage, inputValue } = props
// Store the previous height to compare with the current height
// This allows us to detect changes without causing re-renders
const prevHeightRef = useRef(0)
@@ -117,7 +118,14 @@ const ChatRow = memo(
export default ChatRow
export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifiedMessage, isLast }: ChatRowContentProps) => {
export const ChatRowContent = ({
message,
isExpanded,
onToggleExpand,
lastModifiedMessage,
isLast,
inputValue,
}: ChatRowContentProps) => {
const { mcpServers, mcpMarketplaceCatalog } = useExtensionState()
const [seeNewChangesDisabled, setSeeNewChangesDisabled] = useState(false)
@@ -1248,6 +1256,7 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
options={options}
selected={selected}
isActive={isLast && lastModifiedMessage?.ask === "followup"}
inputValue={inputValue}
/>
</div>
</>
@@ -1287,6 +1296,7 @@ export const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifi
options={options}
selected={selected}
isActive={isLast && lastModifiedMessage?.ask === "plan_mode_respond"}
inputValue={inputValue}
/>
</div>
)
+2 -1
View File
@@ -789,10 +789,11 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
lastModifiedMessage={modifiedMessages.at(-1)}
isLast={index === groupedMessages.length - 1}
onHeightChange={handleRowHeightChange}
inputValue={inputValue}
/>
)
},
[expandedRows, modifiedMessages, groupedMessages.length, toggleRowExpansion, handleRowHeightChange],
[expandedRows, modifiedMessages, groupedMessages.length, toggleRowExpansion, handleRowHeightChange, inputValue],
)
return (
@@ -26,10 +26,12 @@ export const OptionsButtons = ({
options,
selected,
isActive,
inputValue,
}: {
options?: string[]
selected?: string
isActive?: boolean
inputValue?: string
}) => {
if (!options?.length) return null
@@ -58,7 +60,7 @@ export const OptionsButtons = ({
}
vscode.postMessage({
type: "optionsResponse",
text: option,
text: option + (inputValue ? `: ${inputValue?.trim()}` : ""),
})
}}>
{option}