[VS Code] Dynamically update Quick Chat placeholder text whenever selection is changed
Problem to solve
The appended message about context (include lines: N–N
) only reflects the state at the time quick chat is triggered. If we're able, it would be ideal to have the empty state message update if the user selects code after opening chat — immediately (preferred) or after a prompt is submitted.
Example scenario 1:
- User has no code selected and triggers quick chat. Empty state is
ask a question or give an instruction (select some code to add context)
. User then selects some code while chat is open and submits a prompt.- Current behavior: empty state is unchanged
- Ideal behavior: empty state updates either on code selection or after first prompt is submitted to use
... (include lines: N–N)
Example scenario 2:
- User has code selected and triggers quick chat. Empty state is
ask a question or give an instruction (include lines: N–N)
. User asks a question and then selects a different piece of code in the editor while chat is open. The chat context message now describes the original selection plus the followup code selection.- Current behavior: empty state is unchanged
- Ideal behavior: empty state updates either on code selection or after first prompt is submitted to reflect additional lines
... (include lines: N–N, N–N)
.