File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/vs/workbench/contrib/chat/browser Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -134,13 +134,15 @@ export class ChatViewPane extends ViewPane implements IChatViewPane {
134
134
}
135
135
136
136
override saveState ( ) : void {
137
- // Since input history is per-provider, this is handled by a separate service and not the memento here.
138
- // TODO multiple chat views will overwrite each other
139
- this . _widget . saveState ( ) ;
140
-
141
- const widgetViewState = this . _widget . getViewState ( ) ;
142
- this . viewState . inputValue = widgetViewState . inputValue ;
143
- this . memento . saveMemento ( ) ;
137
+ if ( this . _widget ) {
138
+ // Since input history is per-provider, this is handled by a separate service and not the memento here.
139
+ // TODO multiple chat views will overwrite each other
140
+ this . _widget . saveState ( ) ;
141
+
142
+ const widgetViewState = this . _widget . getViewState ( ) ;
143
+ this . viewState . inputValue = widgetViewState . inputValue ;
144
+ this . memento . saveMemento ( ) ;
145
+ }
144
146
145
147
super . saveState ( ) ;
146
148
}
You can’t perform that action at this time.
0 commit comments