Skip to content

Commit b24534a

Browse files
committed
add replace code option
1 parent a40820c commit b24534a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/command-palette.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,15 @@ export const CommandPalette = () => {
184184
>
185185
Append result
186186
</Button>
187-
<Button appearance="primary">Replace code</Button>
187+
<Button
188+
appearance="primary"
189+
onClick={() => {
190+
setQuery(response);
191+
setIsOpen(false);
192+
}}
193+
>
194+
Replace code
195+
</Button>
188196
</div>
189197
</>
190198
)}

0 commit comments

Comments
 (0)