File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/vs/workbench/contrib/notebook/browser/controller/chat Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,7 @@ registerAction2(class extends NotebookAction {
382
382
}
383
383
]
384
384
} ,
385
+ f1 : false ,
385
386
menu : [
386
387
{
387
388
id : MenuId . NotebookCellBetween ,
@@ -454,6 +455,7 @@ registerAction2(class extends NotebookAction {
454
455
original : '$(sparkle) Generate' ,
455
456
} ,
456
457
tooltip : localize ( 'notebookActions.menu.insertCodeCellWithChat.tooltip' , "Generate Code Cell with Chat" ) ,
458
+ f1 : false ,
457
459
menu : [
458
460
{
459
461
id : MenuId . NotebookCellListTop ,
Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ export class NotebookChatController extends Disposable implements INotebookEdito
369
369
const cellTop = this . _notebookEditor . getAbsoluteTopOfElement ( previousCell ) ;
370
370
const cellHeight = this . _notebookEditor . getHeightOfElement ( previousCell ) ;
371
371
372
- this . _notebookEditor . revealOffsetInCenterIfOutsideViewport ( cellTop + cellHeight ) ;
372
+ this . _notebookEditor . revealOffsetInCenterIfOutsideViewport ( cellTop + cellHeight + 48 /** center of the dialog */ ) ;
373
373
}
374
374
}
375
375
}
@@ -412,6 +412,12 @@ export class NotebookChatController extends Disposable implements INotebookEdito
412
412
return ;
413
413
}
414
414
415
+ if ( this . _widget . editingCell && this . _widget . editingCell . textBuffer . getLength ( ) > 0 ) {
416
+ // it already contains some text, clear it
417
+ const ref = await this . _widget . editingCell . resolveTextModel ( ) ;
418
+ ref . setValue ( '' ) ;
419
+ }
420
+
415
421
const editingCellIndex = this . _widget . editingCell ? this . _notebookEditor . getCellIndex ( this . _widget . editingCell ) : undefined ;
416
422
if ( editingCellIndex !== undefined ) {
417
423
this . _notebookEditor . setSelections ( [ {
You can’t perform that action at this time.
0 commit comments