mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
show message when accept or discard is need for saving (#203427)
re https://github.com/microsoft/vscode-copilot/issues/3653
This commit is contained in:
parent
589d37d2e8
commit
f055b096fd
|
@ -974,6 +974,10 @@ export class InlineChatController implements IEditorContribution {
|
|||
|
||||
// ---- controller API
|
||||
|
||||
showSaveHint(): void {
|
||||
const status = localize('savehint', "Accept or discard changes to continue saving");
|
||||
this._zone.value.widget.updateStatus(status, { classes: ['warn'] });
|
||||
}
|
||||
|
||||
setPlaceholder(text: string): void {
|
||||
this._forcedPlaceholder = text;
|
||||
|
|
|
@ -29,6 +29,7 @@ import { IWorkingCopyFileService } from 'vs/workbench/services/workingCopy/commo
|
|||
import { URI } from 'vs/base/common/uri';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { InlineChatController } from 'vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
||||
|
||||
interface SessionData {
|
||||
readonly resourceUri: URI;
|
||||
|
@ -241,6 +242,7 @@ export class InlineChatSavingServiceImpl implements IInlineChatSavingService {
|
|||
break;
|
||||
}
|
||||
this._inlineChatSessionService.moveSession(data.session, editor);
|
||||
InlineChatController.get(editor)?.showSaveHint();
|
||||
this._logService.info('WAIT for session to end', editor.getId(), data.session.targetUri.toString());
|
||||
await this._whenSessionsEnded(Iterable.single(data), token);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue