Skip to content

Commit

Permalink
chat - rewrite setup welcome (#234413)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored Nov 23, 2024
1 parent 1ea7d32 commit eb41ec1
Show file tree
Hide file tree
Showing 13 changed files with 473 additions and 337 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.96.0",
"distro": "83d6d153cc14e1f45b706cdc00383e54f25051bf",
"distro": "0f524a5cfa305bf4a8cc06ca7fd2d4363ec8c7c1",
"author": {
"name": "Microsoft Corporation"
},
Expand Down
4 changes: 4 additions & 0 deletions src/vs/base/browser/ui/toggle/toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ export class Checkbox extends Widget {
return this.checkbox.checked;
}

get enabled(): boolean {
return this.checkbox.enabled;
}

set checked(newIsChecked: boolean) {
this.checkbox.checked = newIsChecked;

Expand Down
8 changes: 4 additions & 4 deletions src/vs/base/common/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,12 @@ export interface IDefaultChatAgent {
readonly documentationUrl: string;
readonly privacyStatementUrl: string;
readonly collectionDocumentationUrl: string;
readonly skusDocumentationUrl: string;
readonly providerId: string;
readonly providerName: string;
readonly providerScopes: string[];
readonly providerScopes: string[][];
readonly entitlementUrl: string;
readonly entitlementChatEnabled: string;
readonly entitlementSkuKey: string;
readonly entitlementSku30DTrialValue: string;
readonly entitlementSkuAlternateUrl: string;
readonly entitlementSkuLimitedUrl: string;
readonly entitlementSkuLimitedEnabled: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface IMarkdownRendererOptions {
* Markdown renderer that can render codeblocks with the editor mechanics. This
* renderer should always be preferred.
*/
export class MarkdownRenderer {
export class MarkdownRenderer implements IDisposable {

private static _ttpTokenizer = createTrustedTypesPolicy('tokenizeToString', {
createHTML(html: string) {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const findInFiles: WatermarkEntry = { text: localize('watermark.findInFiles', "F
const toggleTerminal: WatermarkEntry = { text: localize({ key: 'watermark.toggleTerminal', comment: ['toggle is a verb here'] }, "Toggle Terminal"), id: 'workbench.action.terminal.toggleTerminal', when: { web: ContextKeyExpr.equals('terminalProcessSupported', true) } };
const startDebugging: WatermarkEntry = { text: localize('watermark.startDebugging', "Start Debugging"), id: 'workbench.action.debug.start', when: { web: ContextKeyExpr.equals('terminalProcessSupported', true) } };
const openSettings: WatermarkEntry = { text: localize('watermark.openSettings', "Open Settings"), id: 'workbench.action.openSettings' };
const openChat: WatermarkEntry = { text: localize('watermark.openChat', "Open Chat"), id: 'workbench.action.chat.open', when: { native: ContextKeyExpr.equals('chatPanelParticipantRegistered', true), web: ContextKeyExpr.equals('chatPanelParticipantRegistered', true) } };
const openCopilotEdits: WatermarkEntry = { text: localize('watermark.openCopilotEdits', "Open Copilot Edits"), id: 'workbench.action.chat.openEditSession', when: { native: ContextKeyExpr.equals('chatEditingParticipantRegistered', true), web: ContextKeyExpr.equals('chatEditingParticipantRegistered', true) } };
const openChat: WatermarkEntry = { text: localize('watermark.openChat', "Open Chat"), id: 'workbench.action.chat.open', when: { native: ContextKeyExpr.equals('chatSetupInstalled', true), web: ContextKeyExpr.equals('chatSetupInstalled', true) } };
const openCopilotEdits: WatermarkEntry = { text: localize('watermark.openCopilotEdits', "Open Copilot Edits"), id: 'workbench.action.chat.openEditSession', when: { native: ContextKeyExpr.equals('chatSetupInstalled', true), web: ContextKeyExpr.equals('chatSetupInstalled', true) } };

const emptyWindowEntries: WatermarkEntry[] = coalesce([
showCommands,
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/chat/browser/actions/chatActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ export class ChatCommandCenterRendering implements IWorkbenchContribution {
const chatExtensionInstalled = agentService.getAgents().some(agent => agent.isDefault);

const primaryAction = instantiationService.createInstance(MenuItemAction, {
id: chatExtensionInstalled ? CHAT_OPEN_ACTION_ID : 'workbench.action.chat.triggerSetup', // TODO@bpasero revisit layering of this action
title: OpenChatGlobalAction.TITLE,
id: chatExtensionInstalled ? CHAT_OPEN_ACTION_ID : 'workbench.action.chat.triggerSetup',
title: chatExtensionInstalled ? OpenChatGlobalAction.TITLE : localize2('triggerChatSetup', "Setup {0}...", defaultChat.name),
icon: defaultChat.icon,
}, undefined, undefined, undefined, undefined);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,6 @@ export class ChatExtensionPointHandler implements IWorkbenchContribution {
ctorDescriptor: new SyncDescriptor(ChatViewPane, [{ location: ChatAgentLocation.Panel }]),
when: ContextKeyExpr.or(
ChatContextKeys.Setup.triggered,
ChatContextKeys.Setup.signingIn,
ChatContextKeys.Setup.installing,
ChatContextKeys.Setup.installed,
ChatContextKeys.panelParticipantRegistered,
ChatContextKeys.extensionInvalid
Expand Down
Loading

0 comments on commit eb41ec1

Please sign in to comment.