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:
Cats Juice
2025-07-11 20:59:02 +08:00
committed by GitHub
parent 33f6496d79
commit 6f87c1ca50
2 changed files with 5 additions and 1 deletions

View File

@@ -79,6 +79,9 @@ export class ChatMessageAssistant extends WithDisposable(ShadowlessElement) {
@property({ attribute: false })
accessor notificationService!: NotificationService;
@property({ attribute: false })
accessor independentMode!: boolean;
get state() {
const { isLast, status } = this;
return isLast
@@ -175,7 +178,7 @@ export class ChatMessageAssistant extends WithDisposable(ShadowlessElement) {
: EdgelessEditorActions
: null;
const showActions = host && !!markdown;
const showActions = host && !!markdown && !this.independentMode;
return html`
<chat-copy-more

View File

@@ -327,6 +327,7 @@ export class AIChatMessages extends WithDisposable(ShadowlessElement) {
.notificationService=${this.notificationService}
.retry=${() => this.retry()}
.width=${this.width}
.independentMode=${this.independentMode}
></chat-message-assistant>`;
} else if (isChatAction(item) && this.host) {
return html`<chat-message-action