use h() in chatContinueInAction (#278881)

use h()
This commit is contained in:
Josh Spicer
2025-11-21 17:15:36 -08:00
committed by GitHub
parent 80f75cffa0
commit ab2f720670

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { Codicon } from '../../../../../base/common/codicons.js'; import { Codicon } from '../../../../../base/common/codicons.js';
import { h } from '../../../../../base/browser/dom.js';
import { Disposable, IDisposable, markAsSingleton } from '../../../../../base/common/lifecycle.js'; import { Disposable, IDisposable, markAsSingleton } from '../../../../../base/common/lifecycle.js';
import { Schemas } from '../../../../../base/common/network.js'; import { Schemas } from '../../../../../base/common/network.js';
import { basename } from '../../../../../base/common/resources.js'; import { basename } from '../../../../../base/common/resources.js';
@@ -177,18 +178,11 @@ export class ChatContinueInSessionActionItem extends ActionWidgetDropdownActionV
protected override renderLabel(element: HTMLElement): IDisposable | null { protected override renderLabel(element: HTMLElement): IDisposable | null {
if (this.location === ActionLocation.Editor) { if (this.location === ActionLocation.Editor) {
const container = document.createElement('span'); const view = h('span.action-widget-delegate-label', [
container.classList.add('action-widget-delegate-label'); h('span', { className: ThemeIcon.asClassName(Codicon.forward) }),
h('span', [localize('delegate', "Delegate to...")])
const iconSpan = document.createElement('span'); ]);
iconSpan.classList.add(...ThemeIcon.asClassNameArray(Codicon.forward)); element.appendChild(view.root);
container.appendChild(iconSpan);
const textSpan = document.createElement('span');
textSpan.textContent = localize('delegate', "Delegate to...");
container.appendChild(textSpan);
element.appendChild(container);
return null; return null;
} else { } else {
const icon = this.contextKeyService.contextMatchesRules(ChatContextKeys.remoteJobCreating) ? Codicon.sync : Codicon.forward; const icon = this.contextKeyService.contextMatchesRules(ChatContextKeys.remoteJobCreating) ? Codicon.sync : Codicon.forward;