Skip to content

Commit 29aef1b

Browse files
committed
message -> response
1 parent fe0cbe4 commit 29aef1b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { registerAction2 } from 'vs/platform/actions/common/actions';
77
import { EditorContributionInstantiation, registerEditorContribution } from 'vs/editor/browser/editorExtensions';
88
import { InlineChatController } from 'vs/workbench/contrib/inlineChat/browser/inlineChatController';
99
import * as InlineChatActions from 'vs/workbench/contrib/inlineChat/browser/inlineChatActions';
10-
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_MESSAGE_FOCUSED, IInlineChatService, INLINE_CHAT_ID, INTERACTIVE_EDITOR_ACCESSIBILITY_HELP_ID } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
10+
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_RESPONSE_FOCUSED, IInlineChatService, INLINE_CHAT_ID, INTERACTIVE_EDITOR_ACCESSIBILITY_HELP_ID } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
1111
import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions';
1212
import { InlineChatServiceImpl } from 'vs/workbench/contrib/inlineChat/common/inlineChatServiceImpl';
1313
import { IInlineChatSessionService, InlineChatSessionService } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSession';
@@ -89,7 +89,7 @@ class InlineChatAccessibleViewContribution extends Disposable {
8989
options: { ariaLabel: localize('inlineChatAccessibleView', "Inline Chat Accessible View"), type: AccessibleViewType.View }
9090
});
9191
return true;
92-
}, ContextKeyExpr.or(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_MESSAGE_FOCUSED)));
92+
}, ContextKeyExpr.or(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_RESPONSE_FOCUSED)));
9393
}
9494
}
9595

src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class InlineChatController implements IEditorContribution {
159159
}
160160

161161
getMessage(): string | undefined {
162-
return this._zone.value.widget.message;
162+
return this._zone.value.widget.responseContent;
163163
}
164164

165165
getId(): string {

src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { localize } from 'vs/nls';
1212
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
1313
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
1414
import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget';
15-
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_EMPTY, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, CTX_INLINE_CHAT_VISIBLE, MENU_INLINE_CHAT_WIDGET, MENU_INLINE_CHAT_WIDGET_STATUS, MENU_INLINE_CHAT_WIDGET_MARKDOWN_MESSAGE, CTX_INLINE_CHAT_MESSAGE_CROP_STATE, IInlineChatSlashCommand, MENU_INLINE_CHAT_WIDGET_FEEDBACK, ACTION_REGENERATE_RESPONSE, ACTION_VIEW_IN_CHAT, MENU_INLINE_CHAT_WIDGET_TOGGLE, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_INNER_CURSOR_START, CTX_INLINE_CHAT_INNER_CURSOR_END, CTX_INLINE_CHAT_MESSAGE_FOCUSED } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
15+
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_EMPTY, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, CTX_INLINE_CHAT_VISIBLE, MENU_INLINE_CHAT_WIDGET, MENU_INLINE_CHAT_WIDGET_STATUS, MENU_INLINE_CHAT_WIDGET_MARKDOWN_MESSAGE, CTX_INLINE_CHAT_MESSAGE_CROP_STATE, IInlineChatSlashCommand, MENU_INLINE_CHAT_WIDGET_FEEDBACK, ACTION_REGENERATE_RESPONSE, ACTION_VIEW_IN_CHAT, MENU_INLINE_CHAT_WIDGET_TOGGLE, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_INNER_CURSOR_START, CTX_INLINE_CHAT_INNER_CURSOR_END, CTX_INLINE_CHAT_RESPONSE_FOCUSED } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
1616
import { IModelDeltaDecoration, ITextModel } from 'vs/editor/common/model';
1717
import { EventType, Dimension, addDisposableListener, getActiveElement, getTotalHeight, getTotalWidth, h, reset } from 'vs/base/browser/dom';
1818
import { Emitter, Event, MicrotaskEmitter } from 'vs/base/common/event';
@@ -164,7 +164,7 @@ export class InlineChatWidget {
164164
private readonly _ctxInnerCursorStart: IContextKey<boolean>;
165165
private readonly _ctxInnerCursorEnd: IContextKey<boolean>;
166166
private readonly _ctxInputEditorFocused: IContextKey<boolean>;
167-
private readonly _ctxMessageFocused: IContextKey<boolean>;
167+
private readonly _ctxResponseFocused: IContextKey<boolean>;
168168

169169
private readonly _progressBar: ProgressBar;
170170

@@ -218,8 +218,8 @@ export class InlineChatWidget {
218218
this._store.add(this._inputEditor.onDidChangeModelContent(() => this._onDidChangeInput.fire(this)));
219219
this._store.add(this._inputEditor.onDidLayoutChange(() => this._onDidChangeHeight.fire()));
220220
this._store.add(this._inputEditor.onDidContentSizeChange(() => this._onDidChangeHeight.fire()));
221-
this._store.add(addDisposableListener(this._elements.message, 'focus', () => this._ctxMessageFocused.set(true)));
222-
this._store.add(addDisposableListener(this._elements.message, 'blur', () => this._ctxMessageFocused.reset()));
221+
this._store.add(addDisposableListener(this._elements.message, 'focus', () => this._ctxResponseFocused.set(true)));
222+
this._store.add(addDisposableListener(this._elements.message, 'blur', () => this._ctxResponseFocused.reset()));
223223

224224
this._store.add(this._configurationService.onDidChangeConfiguration(e => {
225225
if (e.affectsConfiguration(AccessibilityVerbositySettingId.InlineChat)) {
@@ -241,7 +241,7 @@ export class InlineChatWidget {
241241
this._ctxInnerCursorStart = CTX_INLINE_CHAT_INNER_CURSOR_START.bindTo(this._contextKeyService);
242242
this._ctxInnerCursorEnd = CTX_INLINE_CHAT_INNER_CURSOR_END.bindTo(this._contextKeyService);
243243
this._ctxInputEditorFocused = CTX_INLINE_CHAT_FOCUSED.bindTo(this._contextKeyService);
244-
this._ctxMessageFocused = CTX_INLINE_CHAT_MESSAGE_FOCUSED.bindTo(this._contextKeyService);
244+
this._ctxResponseFocused = CTX_INLINE_CHAT_RESPONSE_FOCUSED.bindTo(this._contextKeyService);
245245

246246
// (1) inner cursor position (last/first line selected)
247247
const updateInnerCursorFirstLast = () => {
@@ -497,7 +497,7 @@ export class InlineChatWidget {
497497
this._preferredExpansionState = expansionState;
498498
}
499499

500-
get message(): string | undefined {
500+
get responseContent(): string | undefined {
501501
return this._elements.markdownMessage.textContent ?? undefined;
502502
}
503503

src/vs/workbench/contrib/inlineChat/common/inlineChat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const INTERACTIVE_EDITOR_ACCESSIBILITY_HELP_ID = 'interactiveEditorAccess
121121
export const CTX_INLINE_CHAT_HAS_PROVIDER = new RawContextKey<boolean>('inlineChatHasProvider', false, localize('inlineChatHasProvider', "Whether a provider for interactive editors exists"));
122122
export const CTX_INLINE_CHAT_VISIBLE = new RawContextKey<boolean>('inlineChatVisible', false, localize('inlineChatVisible', "Whether the interactive editor input is visible"));
123123
export const CTX_INLINE_CHAT_FOCUSED = new RawContextKey<boolean>('inlineChatFocused', false, localize('inlineChatFocused', "Whether the interactive editor input is focused"));
124-
export const CTX_INLINE_CHAT_MESSAGE_FOCUSED = new RawContextKey<boolean>('inlineChatMessageFocused', false, localize('inlineChatMessageFocused', "Whether the interactive widget's message is focused"));
124+
export const CTX_INLINE_CHAT_RESPONSE_FOCUSED = new RawContextKey<boolean>('inlineChatResponseFocused', false, localize('inlineChatResponseFocused', "Whether the interactive widget's response is focused"));
125125
export const CTX_INLINE_CHAT_EMPTY = new RawContextKey<boolean>('inlineChatEmpty', false, localize('inlineChatEmpty', "Whether the interactive editor input is empty"));
126126
export const CTX_INLINE_CHAT_INNER_CURSOR_FIRST = new RawContextKey<boolean>('inlineChatInnerCursorFirst', false, localize('inlineChatInnerCursorFirst', "Whether the cursor of the iteractive editor input is on the first line"));
127127
export const CTX_INLINE_CHAT_INNER_CURSOR_LAST = new RawContextKey<boolean>('inlineChatInnerCursorLast', false, localize('inlineChatInnerCursorLast', "Whether the cursor of the iteractive editor input is on the last line"));

0 commit comments

Comments
 (0)