fix(core): hide footer actions for independent ai chat (#13177)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for an "independent mode" in assistant chat messages, which hides editor actions when enabled. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -79,6 +79,9 @@ export class ChatMessageAssistant extends WithDisposable(ShadowlessElement) {
|
|||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
accessor notificationService!: NotificationService;
|
accessor notificationService!: NotificationService;
|
||||||
|
|
||||||
|
@property({ attribute: false })
|
||||||
|
accessor independentMode!: boolean;
|
||||||
|
|
||||||
get state() {
|
get state() {
|
||||||
const { isLast, status } = this;
|
const { isLast, status } = this;
|
||||||
return isLast
|
return isLast
|
||||||
@@ -175,7 +178,7 @@ export class ChatMessageAssistant extends WithDisposable(ShadowlessElement) {
|
|||||||
: EdgelessEditorActions
|
: EdgelessEditorActions
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const showActions = host && !!markdown;
|
const showActions = host && !!markdown && !this.independentMode;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<chat-copy-more
|
<chat-copy-more
|
||||||
|
|||||||
@@ -327,6 +327,7 @@ export class AIChatMessages extends WithDisposable(ShadowlessElement) {
|
|||||||
.notificationService=${this.notificationService}
|
.notificationService=${this.notificationService}
|
||||||
.retry=${() => this.retry()}
|
.retry=${() => this.retry()}
|
||||||
.width=${this.width}
|
.width=${this.width}
|
||||||
|
.independentMode=${this.independentMode}
|
||||||
></chat-message-assistant>`;
|
></chat-message-assistant>`;
|
||||||
} else if (isChatAction(item) && this.host) {
|
} else if (isChatAction(item) && this.host) {
|
||||||
return html`<chat-message-action
|
return html`<chat-message-action
|
||||||
|
|||||||
Reference in New Issue
Block a user