mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
fix(core): missing lit component props (#13482)
Close [AI-413](https://linear.app/affine-design/issue/AI-413) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Chat messages now scroll vertically, preventing content from being cut off. * Chat actions are no longer displayed or fetched, reducing unnecessary loading. * Peek view chat composer behavior is aligned with the main chat, ensuring consistent feature availability across views. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -90,7 +90,7 @@ export class PlaygroundChat extends SignalWatcher(
|
||||
|
||||
ai-chat-messages {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.chat-panel-hints {
|
||||
@@ -211,6 +211,10 @@ export class PlaygroundChat extends SignalWatcher(
|
||||
});
|
||||
}
|
||||
|
||||
get showActions() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private readonly _initPanel = async () => {
|
||||
const userId = (await AIProvider.userInfo)?.id;
|
||||
if (!userId) return;
|
||||
@@ -240,7 +244,7 @@ export class PlaygroundChat extends SignalWatcher(
|
||||
this.doc.id
|
||||
)
|
||||
: Promise.resolve([]),
|
||||
this.doc.id
|
||||
this.doc.id && this.showActions
|
||||
? AIProvider.histories.actions(this.doc.workspace.id, this.doc.id)
|
||||
: Promise.resolve([]),
|
||||
]);
|
||||
@@ -369,6 +373,7 @@ export class PlaygroundChat extends SignalWatcher(
|
||||
.notificationService=${this.notificationService}
|
||||
.aiToolsConfigService=${this.aiToolsConfigService}
|
||||
.affineWorkspaceDialogService=${this.affineWorkspaceDialogService}
|
||||
.affineFeatureFlagService=${this.affineFeatureFlagService}
|
||||
></ai-chat-composer>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
@@ -614,6 +614,7 @@ export class AIChatBlockPeekView extends LitElement {
|
||||
.affineWorkspaceDialogService=${this.affineWorkspaceDialogService}
|
||||
.notificationService=${notificationService}
|
||||
.aiToolsConfigService=${this.aiToolsConfigService}
|
||||
.affineFeatureFlagService=${this.affineFeatureFlagService}
|
||||
.onChatSuccess=${this._onChatSuccess}
|
||||
.trackOptions=${{
|
||||
where: 'ai-chat-block',
|
||||
|
||||
Reference in New Issue
Block a user