mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat(core): do not show AI actions in history (#13198)
Close [AI-351](https://linear.app/affine-design/issue/AI-351) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Disabled action updates related to document IDs and sessions in the AI chat content panel. * **Tests** * Skipped all end-to-end tests for the "should show chat history in chat panel" scenario across various AI action test suites. These tests will no longer run during automated testing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -219,14 +219,7 @@ export class AIChatContent extends SignalWatcher(
|
||||
}
|
||||
|
||||
get showActions() {
|
||||
if (this.docId) {
|
||||
if (!this.session) {
|
||||
return true;
|
||||
}
|
||||
return this.session.docId === this.docId;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private readonly updateHistory = async () => {
|
||||
@@ -269,7 +262,7 @@ export class AIChatContent extends SignalWatcher(
|
||||
};
|
||||
|
||||
private readonly updateActions = async () => {
|
||||
if (!this.docId || !AIProvider.histories) {
|
||||
if (!this.docId || !AIProvider.histories || !this.showActions) {
|
||||
return;
|
||||
}
|
||||
const actions = await AIProvider.histories.actions(
|
||||
|
||||
Reference in New Issue
Block a user