Repository: microsoft/terminal (language: cpp)

Issue:
Copilot chat loses input when dismissed and reloaded
### Windows Terminal version

1.23.3091.0

### Windows build number

10.0.26100.0

### Other Software

_No response_

### Steps to reproduce

@DHowett told me to bind copilot chat to <kbd>shift</kbd>+<kbd>/</kbd> which I thought was an alright idea.

That is... until I tried to type a question mark at the end of my query for Copilot to answer... which rightfully dismissed the input box.

However, when I brought it back up again.... everything I typed was gone.



### Expected Behavior

I would have expected the box to preserve and keep my input through to reopening the dialog.

### Actual Behavior

The input on Copilot chat is empty on every launch, even if it was dismissed with content inside it.


Discussion / hints:

Fix patch:
diff --git a/src/cascadia/QueryExtension/ExtensionPalette.cpp b/src/cascadia/QueryExtension/ExtensionPalette.cpp
index 857a2709074..ee693299d00 100644
--- a/src/cascadia/QueryExtension/ExtensionPalette.cpp
+++ b/src/cascadia/QueryExtension/ExtensionPalette.cpp
@@ -432,9 +432,6 @@ namespace winrt::Microsoft::Terminal::Query::Extension::implementation
     void ExtensionPalette::_close()
     {
         Visibility(Visibility::Collapsed);
-
-        // Clear the text box each time we close the dialog. This is consistent with VsCode.
-        _queryBox().Text(winrt::hstring{});
     }
 
     ChatMessage::ChatMessage(winrt::hstring content, bool isQuery) :


Test patch: