mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-12 19:39:20 -05:00
renaming the CSS variable names and the labels from interactive editor to inline chat
This commit is contained in:
@@ -713,8 +713,8 @@
|
||||
"--vscode-editorCodeLens-fontSize",
|
||||
"--vscode-editorCodeLens-lineHeight",
|
||||
"--vscode-explorer-align-offset-margin-left",
|
||||
"--vscode-interactive-editor-cropped",
|
||||
"--vscode-interactive-editor-expanded",
|
||||
"--vscode-inline-chat-cropped",
|
||||
"--vscode-inline-chat-expanded",
|
||||
"--vscode-interactive-session-foreground",
|
||||
"--vscode-interactive-result-editor-background-color",
|
||||
"--vscode-repl-font-family",
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.monaco-editor .zone-widget.interactive-editor-widget {
|
||||
.monaco-editor .zone-widget.inline-chat-widget {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor {
|
||||
.monaco-editor .inline-chat {
|
||||
color: inherit;
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
@@ -17,22 +17,22 @@
|
||||
|
||||
/* body */
|
||||
|
||||
.monaco-editor .interactive-editor .body {
|
||||
.monaco-editor .inline-chat .body {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content {
|
||||
.monaco-editor .inline-chat .body .content {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
border-radius: 2px;
|
||||
border: 1px solid var(--vscode-inlineChatInput-border);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content.synthetic-focus {
|
||||
.monaco-editor .inline-chat .body .content.synthetic-focus {
|
||||
outline: 1px solid var(--vscode-inlineChatInput-focusBorder);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content .input {
|
||||
.monaco-editor .inline-chat .body .content .input {
|
||||
padding: 2px 2px 2px 4px;
|
||||
border-top-left-radius: 2px;
|
||||
border-bottom-left-radius: 2px;
|
||||
@@ -40,11 +40,11 @@
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content .input .monaco-editor-background {
|
||||
.monaco-editor .inline-chat .body .content .input .monaco-editor-background {
|
||||
background-color: var(--vscode-inlineChatInput-background);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content .input .editor-placeholder {
|
||||
.monaco-editor .inline-chat .body .content .input .editor-placeholder {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
padding: 3px 0 0 0;
|
||||
@@ -54,14 +54,14 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content .input .editor-placeholder.hidden {
|
||||
.monaco-editor .inline-chat .body .content .input .editor-placeholder.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .content .input .editor-container {
|
||||
.monaco-editor .inline-chat .body .content .input .editor-container {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.monaco-editor .interactive-editor .body .toolbar {
|
||||
.monaco-editor .inline-chat .body .toolbar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-self: stretch;
|
||||
@@ -71,7 +71,7 @@
|
||||
background: var(--vscode-inlineChatInput-background);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .body .toolbar .actions-container {
|
||||
.monaco-editor .inline-chat .body .toolbar .actions-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 4px;
|
||||
@@ -79,35 +79,35 @@
|
||||
|
||||
/* progress bit */
|
||||
|
||||
.monaco-editor .interactive-editor .progress {
|
||||
.monaco-editor .inline-chat .progress {
|
||||
position: relative;
|
||||
width: calc(100% - 18px);
|
||||
left: 19px;
|
||||
}
|
||||
|
||||
/* UGLY - fighting against workbench styles */
|
||||
.monaco-workbench .part.editor>.content .monaco-editor .interactive-editor .progress .monaco-progress-container {
|
||||
.monaco-workbench .part.editor>.content .monaco-editor .inline-chat .progress .monaco-progress-container {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* status */
|
||||
|
||||
.monaco-editor .interactive-editor .status {
|
||||
.monaco-editor .inline-chat .status {
|
||||
margin-top: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status.actions {
|
||||
.monaco-editor .inline-chat .status.actions {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .actions.hidden {
|
||||
.monaco-editor .inline-chat .status .actions.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label {
|
||||
.monaco-editor .inline-chat .status .label {
|
||||
overflow: hidden;
|
||||
color: var(--vscode-descriptionForeground);
|
||||
font-size: 11px;
|
||||
@@ -115,40 +115,40 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label.hidden {
|
||||
.monaco-editor .inline-chat .status .label.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label.info {
|
||||
.monaco-editor .inline-chat .status .label.info {
|
||||
margin-right: auto;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label.info > .codicon {
|
||||
.monaco-editor .inline-chat .status .label.info > .codicon {
|
||||
padding: 0 5px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label.status {
|
||||
.monaco-editor .inline-chat .status .label.status {
|
||||
padding-left: 10px;
|
||||
padding-right: 4px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage {
|
||||
.monaco-editor .inline-chat .markdownMessage {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage.hidden {
|
||||
.monaco-editor .inline-chat .markdownMessage.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage .message * {
|
||||
.monaco-editor .inline-chat .markdownMessage .message * {
|
||||
margin: unset;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage .message {
|
||||
.monaco-editor .inline-chat .markdownMessage .message {
|
||||
margin-left: 5px;
|
||||
-webkit-line-clamp: initial;
|
||||
-webkit-box-orient: vertical;
|
||||
@@ -158,42 +158,42 @@
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage .message[state="cropped"] {
|
||||
-webkit-line-clamp: var(--vscode-interactive-editor-cropped, 3);
|
||||
.monaco-editor .inline-chat .markdownMessage .message[state="cropped"] {
|
||||
-webkit-line-clamp: var(--vscode-inline-chat-cropped, 3);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage .message[state="expanded"] {
|
||||
-webkit-line-clamp: var(--vscode-interactive-editor-expanded, 10);
|
||||
.monaco-editor .inline-chat .markdownMessage .message[state="expanded"] {
|
||||
-webkit-line-clamp: var(--vscode-inline-chat-expanded, 10);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .markdownMessage .messageActions {
|
||||
.monaco-editor .inline-chat .markdownMessage .messageActions {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label A {
|
||||
.monaco-editor .inline-chat .status .label A {
|
||||
color: var(--vscode-textLink-foreground);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label.error {
|
||||
.monaco-editor .inline-chat .status .label.error {
|
||||
color: var(--vscode-errorForeground);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .label.warn {
|
||||
.monaco-editor .inline-chat .status .label.warn {
|
||||
color: var(--vscode-editorWarning-foreground);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .monaco-toolbar .action-item {
|
||||
.monaco-editor .inline-chat .status .monaco-toolbar .action-item {
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .monaco-toolbar .action-label.checked {
|
||||
.monaco-editor .inline-chat .status .monaco-toolbar .action-label.checked {
|
||||
color: var(--vscode-inputOption-activeForeground);
|
||||
background-color: var(--vscode-inputOption-activeBackground);
|
||||
outline: 1px solid var(--vscode-inputOption-activeBorder);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .monaco-toolbar .action-item.button-item .action-label {
|
||||
.monaco-editor .inline-chat .status .monaco-toolbar .action-item.button-item .action-label {
|
||||
color: var(--vscode-button-foreground);
|
||||
background-color: var(--vscode-button-background);
|
||||
border-radius: 2px;
|
||||
@@ -201,18 +201,18 @@
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .status .monaco-toolbar .action-item.button-item .action-label>.codicon {
|
||||
.monaco-editor .inline-chat .status .monaco-toolbar .action-item.button-item .action-label>.codicon {
|
||||
color: unset;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* preview */
|
||||
|
||||
.monaco-editor .interactive-editor .preview {
|
||||
.monaco-editor .inline-chat .preview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .previewDiff {
|
||||
.monaco-editor .inline-chat .previewDiff {
|
||||
display: inherit;
|
||||
padding: 6px;
|
||||
border: 1px solid var(--vscode-inlineChat-border);
|
||||
@@ -222,11 +222,11 @@
|
||||
margin: 0 2px 6px 2px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .previewCreateTitle {
|
||||
.monaco-editor .inline-chat .previewCreateTitle {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .previewCreate {
|
||||
.monaco-editor .inline-chat .previewCreate {
|
||||
display: inherit;
|
||||
padding: 6px;
|
||||
border: 1px solid var(--vscode-inlineChat-border);
|
||||
@@ -234,53 +234,53 @@
|
||||
margin: 0 2px 6px 2px;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor .previewDiff.hidden,
|
||||
.monaco-editor .interactive-editor .previewCreate.hidden,
|
||||
.monaco-editor .interactive-editor .previewCreateTitle.hidden {
|
||||
.monaco-editor .inline-chat .previewDiff.hidden,
|
||||
.monaco-editor .inline-chat .previewCreate.hidden,
|
||||
.monaco-editor .inline-chat .previewCreateTitle.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* decoration styles */
|
||||
|
||||
.monaco-editor .interactive-editor-lines-deleted-range-inline {
|
||||
.monaco-editor .inline-chat-lines-deleted-range-inline {
|
||||
text-decoration: line-through;
|
||||
background-color: var(--vscode-diffEditor-removedTextBackground);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.monaco-editor .interactive-editor-lines-inserted-range {
|
||||
.monaco-editor .inline-chat-lines-inserted-range {
|
||||
background-color: var(--vscode-diffEditor-insertedTextBackground);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor-block-selection {
|
||||
.monaco-editor .inline-chat-block-selection {
|
||||
background-color: var(--vscode-inlineChat-regionHighlight);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor-slash-command {
|
||||
.monaco-editor .inline-chat-slash-command {
|
||||
color: var(--vscode-textLink-foreground)
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor-slash-command-detail {
|
||||
.monaco-editor .inline-chat-slash-command-detail {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* diff zone */
|
||||
|
||||
.monaco-editor .interactive-editor-diff-widget {
|
||||
.monaco-editor .inline-chat-diff-widget {
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor-diff-widget .monaco-diff-editor .monaco-editor-background,
|
||||
.monaco-editor .interactive-editor-diff-widget .monaco-diff-editor .monaco-editor .margin-view-overlays {
|
||||
.monaco-editor .inline-chat-diff-widget .monaco-diff-editor .monaco-editor-background,
|
||||
.monaco-editor .inline-chat-diff-widget .monaco-diff-editor .monaco-editor .margin-view-overlays {
|
||||
background-color: var(--vscode-inlineChat-regionHighlight);
|
||||
}
|
||||
|
||||
/* create zone */
|
||||
|
||||
.monaco-editor .interactive-editor-newfile-widget {
|
||||
.monaco-editor .inline-chat-newfile-widget {
|
||||
padding: 3px 0 6px 0;
|
||||
background-color: var(--vscode-inlineChat-regionHighlight);
|
||||
}
|
||||
|
||||
.monaco-editor .interactive-editor-newfile-widget .title {
|
||||
.monaco-editor .inline-chat-newfile-widget .title {
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
@@ -76,10 +76,10 @@ export class InlineChatController implements IEditorContribution {
|
||||
}
|
||||
|
||||
private static _decoBlock = ModelDecorationOptions.register({
|
||||
description: 'interactive-editor',
|
||||
description: 'inline-chat',
|
||||
showIfCollapsed: false,
|
||||
isWholeLine: true,
|
||||
className: 'interactive-editor-block-selection',
|
||||
className: 'inline-chat-block-selection',
|
||||
});
|
||||
|
||||
private static _promptHistory: string[] = [];
|
||||
|
||||
@@ -36,7 +36,7 @@ export class InlineChatLivePreviewWidget extends ZoneWidget {
|
||||
|
||||
private static readonly _hideId = 'overlayDiff';
|
||||
|
||||
private readonly _elements = h('div.interactive-editor-diff-widget@domNode');
|
||||
private readonly _elements = h('div.inline-chat-diff-widget@domNode');
|
||||
|
||||
private readonly _sessionStore = this._disposables.add(new DisposableStore());
|
||||
private readonly _diffEditor: IDiffEditor;
|
||||
@@ -191,7 +191,7 @@ export class InlineChatLivePreviewWidget extends ZoneWidget {
|
||||
};
|
||||
|
||||
if (!modifiedRange.isEmpty()) {
|
||||
options.className = 'interactive-editor-lines-inserted-range';
|
||||
options.className = 'inline-chat-lines-inserted-range';
|
||||
}
|
||||
|
||||
if (!originalRange.isEmpty()) {
|
||||
@@ -201,7 +201,7 @@ export class InlineChatLivePreviewWidget extends ZoneWidget {
|
||||
}
|
||||
options.before = {
|
||||
content,
|
||||
inlineClassName: 'interactive-editor-lines-deleted-range-inline'
|
||||
inlineClassName: 'inline-chat-lines-deleted-range-inline'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ function isInlineDiffFriendly(mapping: LineRangeMapping): boolean {
|
||||
|
||||
export class InlineChatFileCreatePreviewWidget extends ZoneWidget {
|
||||
|
||||
private readonly _elements = h('div.interactive-editor-newfile-widget@domNode', [
|
||||
private readonly _elements = h('div.inline-chat-newfile-widget@domNode', [
|
||||
h('div.title.show-file-icons@title'),
|
||||
h('div.editor@editor'),
|
||||
]);
|
||||
|
||||
@@ -182,17 +182,17 @@ class InlineDiffDecorations {
|
||||
const tracking: IModelDeltaDecoration = {
|
||||
range: edit.range,
|
||||
options: {
|
||||
description: 'interactive-editor-inline-diff',
|
||||
description: 'inline-chat-inline-diff',
|
||||
}
|
||||
};
|
||||
|
||||
const decorating: IModelDecorationOptions = {
|
||||
description: 'interactive-editor-inline-diff',
|
||||
className: !edit.range.isEmpty() ? 'interactive-editor-lines-inserted-range' : undefined,
|
||||
description: 'inline-chat-inline-diff',
|
||||
className: !edit.range.isEmpty() ? 'inline-chat-lines-inserted-range' : undefined,
|
||||
showIfCollapsed: true,
|
||||
before: {
|
||||
content,
|
||||
inlineClassName: 'interactive-editor-lines-deleted-range-inline',
|
||||
inlineClassName: 'inline-chat-lines-deleted-range-inline',
|
||||
attachedData: edit,
|
||||
}
|
||||
};
|
||||
@@ -294,7 +294,7 @@ export class LiveStrategy extends EditModeStrategy {
|
||||
if (++this._editCount === 1) {
|
||||
this._editor.pushUndoStop();
|
||||
}
|
||||
this._editor.executeEdits('interactive-editor-live', edits, ignoreInlineDiff ? undefined : cursorStateComputerAndInlineDiffCollection);
|
||||
this._editor.executeEdits('inline-chat-live', edits, ignoreInlineDiff ? undefined : cursorStateComputerAndInlineDiffCollection);
|
||||
}
|
||||
|
||||
override async renderChanges(response: EditResponse) {
|
||||
|
||||
@@ -125,7 +125,7 @@ export class InlineChatWidget {
|
||||
private static _modelPool: number = 1;
|
||||
|
||||
private readonly _elements = h(
|
||||
'div.interactive-editor@root',
|
||||
'div.inline-chat@root',
|
||||
[
|
||||
h('div.body', [
|
||||
h('div.content@content', [
|
||||
@@ -217,7 +217,7 @@ export class InlineChatWidget {
|
||||
}
|
||||
}));
|
||||
|
||||
const uri = URI.from({ scheme: 'vscode', authority: 'interactive-editor', path: `/interactive-editor/model${InlineChatWidget._modelPool++}.txt` });
|
||||
const uri = URI.from({ scheme: 'vscode', authority: 'inline-chat', path: `/inline-chat/model${InlineChatWidget._modelPool++}.txt` });
|
||||
this._inputModel = this._modelService.getModel(uri) ?? this._modelService.createModel('', null, uri);
|
||||
this._inputEditor.setModel(this._inputModel);
|
||||
|
||||
@@ -398,8 +398,8 @@ export class InlineChatWidget {
|
||||
const lineHeight = this.parentEditor.getOption(EditorOption.lineHeight);
|
||||
const editorHeight = this.parentEditor.getLayoutInfo().height;
|
||||
const editorHeightInLines = Math.floor(editorHeight / lineHeight);
|
||||
this._elements.root.style.setProperty('--vscode-interactive-editor-cropped', String(Math.floor(editorHeightInLines / 5)));
|
||||
this._elements.root.style.setProperty('--vscode-interactive-editor-expanded', String(Math.floor(editorHeightInLines / 3)));
|
||||
this._elements.root.style.setProperty('--vscode-inline-chat-cropped', String(Math.floor(editorHeightInLines / 5)));
|
||||
this._elements.root.style.setProperty('--vscode-inline-chat-expanded', String(Math.floor(editorHeightInLines / 3)));
|
||||
}
|
||||
} finally {
|
||||
this._isLayouting = false;
|
||||
@@ -684,8 +684,8 @@ export class InlineChatWidget {
|
||||
newDecorations.push({
|
||||
range: new Range(1, 1, 1, withSlash.length + 1),
|
||||
options: {
|
||||
description: 'interactive-editor-slash-command',
|
||||
inlineClassName: 'interactive-editor-slash-command',
|
||||
description: 'inline-chat-slash-command',
|
||||
inlineClassName: 'inline-chat-slash-command',
|
||||
}
|
||||
});
|
||||
|
||||
@@ -694,10 +694,10 @@ export class InlineChatWidget {
|
||||
newDecorations.push({
|
||||
range: new Range(1, withSlash.length + 1, 1, withSlash.length + 2),
|
||||
options: {
|
||||
description: 'interactive-editor-slash-command-detail',
|
||||
description: 'inline-chat-slash-command-detail',
|
||||
after: {
|
||||
content: `${command.detail}`,
|
||||
inlineClassName: 'interactive-editor-slash-command-detail'
|
||||
inlineClassName: 'inline-chat-slash-command-detail'
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -726,7 +726,7 @@ export class InlineChatZoneWidget extends ZoneWidget {
|
||||
@IInstantiationService private readonly _instaService: IInstantiationService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
) {
|
||||
super(editor, { showFrame: false, showArrow: false, isAccessible: true, className: 'interactive-editor-widget', keepEditorSelection: true, showInHiddenAreas: true, ordinal: 10000 + 3 });
|
||||
super(editor, { showFrame: false, showArrow: false, isAccessible: true, className: 'inline-chat-widget', keepEditorSelection: true, showInHiddenAreas: true, ordinal: 10000 + 3 });
|
||||
|
||||
this._ctxVisible = CTX_INLINE_CHAT_VISIBLE.bindTo(contextKeyService);
|
||||
this._ctxCursorPosition = CTX_INLINE_CHAT_OUTER_CURSOR_POSITION.bindTo(contextKeyService);
|
||||
|
||||
Reference in New Issue
Block a user