diff --git a/vscode/webviews/chat/ChatMessageContent/create-buttons.ts b/vscode/webviews/chat/ChatMessageContent/create-buttons.ts
index c651934becb2..97ea1e66e9ce 100644
--- a/vscode/webviews/chat/ChatMessageContent/create-buttons.ts
+++ b/vscode/webviews/chat/ChatMessageContent/create-buttons.ts
@@ -6,6 +6,7 @@ import {
CopyCodeBlockIcon,
EllipsisIcon,
InsertCodeBlockIcon,
+ RefreshIcon,
SaveCodeBlockIcon,
SparkleIcon,
SyncSpinIcon,
@@ -286,6 +287,22 @@ function createApplyButton(
break
}
+ case 'Applied':
+ case 'Finished': {
+ button.innerHTML = 'Reapply'
+
+ // Add Refresh Icon
+ const iconContainer = document.createElement('div')
+ iconContainer.className = styles.iconContainer
+ iconContainer.innerHTML = RefreshIcon
+ button.prepend(iconContainer)
+
+ button.addEventListener('click', () =>
+ smartApply.onSubmit(smartApplyId, preText, humanMessage?.text, fileName)
+ )
+
+ break
+ }
default: {
button.innerHTML = 'Apply'
diff --git a/vscode/webviews/icons/CodeBlockActionIcons.tsx b/vscode/webviews/icons/CodeBlockActionIcons.tsx
index 1a4fa5a04a26..bfe6475b4069 100644
--- a/vscode/webviews/icons/CodeBlockActionIcons.tsx
+++ b/vscode/webviews/icons/CodeBlockActionIcons.tsx
@@ -30,3 +30,5 @@ export const CloseIcon =
''
export const TerminalIcon = ''
+
+export const RefreshIcon = ''