Skip to content

Commit

Permalink
Rebase against the upstream 231deb1
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: 231deb1
  • Loading branch information
Eclipse Che Sync committed Aug 30, 2024
2 parents 954282f + 231deb1 commit 5d993cc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
6 changes: 3 additions & 3 deletions code/src/vs/workbench/contrib/chat/browser/chatInputPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
onDidChangeCursorPosition();
}

private initAttachedContext(container: HTMLElement) {
private initAttachedContext(container: HTMLElement, isLayout = false) {
const oldHeight = container.offsetHeight;
dom.clearNode(container);
this.attachedContextDisposables.clear();
Expand Down Expand Up @@ -578,7 +578,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
this.attachedContextDisposables.add(disp);
});

if (oldHeight !== container.offsetHeight) {
if (oldHeight !== container.offsetHeight && !isLayout) {
this._onDidChangeHeight.fire();
}
}
Expand Down Expand Up @@ -609,7 +609,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge

private previousInputEditorDimension: IDimension | undefined;
private _layout(height: number, width: number, allowRecurse = true): void {
this.initAttachedContext(this.attachedContextContainer);
this.initAttachedContext(this.attachedContextContainer, true);

const data = this.getLayoutData();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export class CallStackWidget extends Disposable {
multipleSelectionSupport: false,
mouseSupport: false,
keyboardSupport: false,
setRowLineHeight: false,
accessibilityProvider: instantiationService.createInstance(StackAccessibilityProvider),
}
) as WorkbenchList<ListItem>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
&[role="link"] {
cursor: pointer;
}

.monaco-icon-label::before {
height: auto;
}
}

&.collapsed {
Expand All @@ -39,6 +43,7 @@
.collapse-button {
width: 16px;
min-height: 1px; /* show even if empty */
line-height: 0;

a {
cursor: pointer;
Expand All @@ -56,7 +61,6 @@
.multiCallStackWidget {
.multiCallStackFrameContainer {
background: none !important;
line-height: inherit !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ export class ModifiedElement extends AbstractElementRenderer {
{
updateInfoRendering: () => renderSourceEditor(),
checkIfModified: (cell) => {
return cell.modified?.textModel.getValue() !== cell.original?.textModel.getValue() ? { reason: undefined } : false;
return cell.modified?.textModel.getTextBufferHash() !== cell.original?.textModel.getTextBufferHash() ? { reason: undefined } : false;
},
getFoldingState: (cell) => cell.cellFoldingState,
updateFoldingState: (cell, state) => cell.cellFoldingState = state,
Expand All @@ -1660,7 +1660,7 @@ export class ModifiedElement extends AbstractElementRenderer {
const scopedContextKeyService = this.contextKeyService.createScoped(this.templateData.inputToolbarContainer);
this._register(scopedContextKeyService);
const inputChanged = NOTEBOOK_DIFF_CELL_INPUT.bindTo(scopedContextKeyService);
inputChanged.set(this.cell.modified.textModel.getValue() !== this.cell.original.textModel.getValue());
inputChanged.set(this.cell.modified.textModel.getTextBufferHash() !== this.cell.original.textModel.getTextBufferHash());

const ignoreWhitespace = NOTEBOOK_DIFF_CELL_IGNORE_WHITESPACE.bindTo(scopedContextKeyService);
const ignore = this.textConfigurationService.getValue<boolean>(this.cell.modified.uri, 'diffEditor.ignoreTrimWhitespace');
Expand All @@ -1675,7 +1675,7 @@ export class ModifiedElement extends AbstractElementRenderer {
const refreshToolbar = () => {
const ignore = this.textConfigurationService.getValue<boolean>(this.cell.modified.uri, 'diffEditor.ignoreTrimWhitespace');
ignoreWhitespace.set(ignore);
const hasChanges = this.cell.modified.textModel.getValue() !== this.cell.original.textModel.getValue();
const hasChanges = this.cell.modified.textModel.getTextBufferHash() !== this.cell.original.textModel.getTextBufferHash();
inputChanged.set(hasChanges);

if (hasChanges) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,16 +441,12 @@ function createDiffViewModels(instantiationService: IInstantiationService, confi
);
}
case 'unchanged': {
const originalCell = originalModel.cells[diff.originalCellIndex];
const modifiedCell = modifiedModel.cells[diff.modifiedCellIndex];
const type = (originalCell.textModel?.getValue() !== modifiedCell.textModel?.getValue()) ? 'modified' : 'unchanged';
return new SideBySideDiffElementViewModel(
model.modified.notebook,
model.original.notebook,
originalCell,
modifiedCell,
type,
eventDispatcher,
originalModel.cells[diff.originalCellIndex],
modifiedModel.cells[diff.modifiedCellIndex],
'unchanged', eventDispatcher,
initData,
notebookService
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@ export class NotebookCellTextModel extends Disposable implements ICell {
return false;
}

if (this.outputs.length !== b.outputs.length) {
return false;
}

if (this.getTextLength() !== b.getTextLength()) {
return false;
}
Expand Down

0 comments on commit 5d993cc

Please sign in to comment.