mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-19 02:51:47 +08: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 {
|
ai-chat-messages {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: hidden;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-panel-hints {
|
.chat-panel-hints {
|
||||||
@@ -211,6 +211,10 @@ export class PlaygroundChat extends SignalWatcher(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get showActions() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private readonly _initPanel = async () => {
|
private readonly _initPanel = async () => {
|
||||||
const userId = (await AIProvider.userInfo)?.id;
|
const userId = (await AIProvider.userInfo)?.id;
|
||||||
if (!userId) return;
|
if (!userId) return;
|
||||||
@@ -240,7 +244,7 @@ export class PlaygroundChat extends SignalWatcher(
|
|||||||
this.doc.id
|
this.doc.id
|
||||||
)
|
)
|
||||||
: Promise.resolve([]),
|
: Promise.resolve([]),
|
||||||
this.doc.id
|
this.doc.id && this.showActions
|
||||||
? AIProvider.histories.actions(this.doc.workspace.id, this.doc.id)
|
? AIProvider.histories.actions(this.doc.workspace.id, this.doc.id)
|
||||||
: Promise.resolve([]),
|
: Promise.resolve([]),
|
||||||
]);
|
]);
|
||||||
@@ -369,6 +373,7 @@ export class PlaygroundChat extends SignalWatcher(
|
|||||||
.notificationService=${this.notificationService}
|
.notificationService=${this.notificationService}
|
||||||
.aiToolsConfigService=${this.aiToolsConfigService}
|
.aiToolsConfigService=${this.aiToolsConfigService}
|
||||||
.affineWorkspaceDialogService=${this.affineWorkspaceDialogService}
|
.affineWorkspaceDialogService=${this.affineWorkspaceDialogService}
|
||||||
|
.affineFeatureFlagService=${this.affineFeatureFlagService}
|
||||||
></ai-chat-composer>
|
></ai-chat-composer>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -614,6 +614,7 @@ export class AIChatBlockPeekView extends LitElement {
|
|||||||
.affineWorkspaceDialogService=${this.affineWorkspaceDialogService}
|
.affineWorkspaceDialogService=${this.affineWorkspaceDialogService}
|
||||||
.notificationService=${notificationService}
|
.notificationService=${notificationService}
|
||||||
.aiToolsConfigService=${this.aiToolsConfigService}
|
.aiToolsConfigService=${this.aiToolsConfigService}
|
||||||
|
.affineFeatureFlagService=${this.affineFeatureFlagService}
|
||||||
.onChatSuccess=${this._onChatSuccess}
|
.onChatSuccess=${this._onChatSuccess}
|
||||||
.trackOptions=${{
|
.trackOptions=${{
|
||||||
where: 'ai-chat-block',
|
where: 'ai-chat-block',
|
||||||
|
|||||||
Reference in New Issue
Block a user