mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
reveal content widget when outside view port (#208405)
re https://github.com/microsoft/vscode-copilot/issues/4599
This commit is contained in:
parent
88ea3e1662
commit
ad2e199859
|
@ -19,6 +19,7 @@ import { ChatWidget } from 'vs/workbench/contrib/chat/browser/chatWidget';
|
|||
import { ChatAgentLocation } from 'vs/workbench/contrib/chat/common/chatAgents';
|
||||
import { editorBackground, editorForeground, inputBackground } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { ChatModel } from 'vs/workbench/contrib/chat/common/chatModel';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
|
||||
export class InlineChatContentWidget implements IContentWidget {
|
||||
|
||||
|
@ -158,6 +159,7 @@ export class InlineChatContentWidget implements IContentWidget {
|
|||
this._visible = true;
|
||||
this._focusNext = true;
|
||||
|
||||
this._editor.revealRangeNearTopIfOutsideViewport(Range.fromPositions(position));
|
||||
this._widget.inputEditor.setValue('');
|
||||
|
||||
const wordInfo = this._editor.getModel()?.getWordAtPosition(position);
|
||||
|
|
Loading…
Reference in a new issue