Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep all inputs, no matter their results #178583

Merged
merged 1 commit into from Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -823,6 +823,10 @@ export class InteractiveEditorController implements IEditorContribution {
continue;
}

if (!InteractiveEditorController._promptHistory.includes(input)) {
InteractiveEditorController._promptHistory.unshift(input);
}

const refer = session.slashCommands?.some(value => value.refer && input.startsWith(`/${value.command}`));
if (refer) {
this._logService.info('[IE] seeing refer command, continuing outside editor', provider.debugName);
Expand Down Expand Up @@ -936,9 +940,6 @@ export class InteractiveEditorController implements IEditorContribution {

this._zone.widget.updateMessage(reply.detail ?? localize('fyi', "AI-generated code may be incorrect."));

if (!InteractiveEditorController._promptHistory.includes(input)) {
InteractiveEditorController._promptHistory.unshift(input);
}
placeholder = reply.placeholder ?? session.placeholder ?? '';
value = '';
data.rounds += round + '|';
Expand Down