diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-chat-content/ai-chat-content.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-chat-content/ai-chat-content.ts index e0df10e9c..4200912b0 100644 --- a/packages/frontend/core/src/blocksuite/ai/components/ai-chat-content/ai-chat-content.ts +++ b/packages/frontend/core/src/blocksuite/ai/components/ai-chat-content/ai-chat-content.ts @@ -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( diff --git a/tests/affine-cloud-copilot/e2e/ai-action/change-tone.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/change-tone.spec.ts index c699e0acc..8f3cabc11 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/change-tone.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/change-tone.spec.ts @@ -59,7 +59,7 @@ test.describe('AIAction/ChangeTone', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/check-code-error.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/check-code-error.spec.ts index b8169ae17..c85a821ac 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/check-code-error.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/check-code-error.spec.ts @@ -24,7 +24,7 @@ test.describe('AIAction/CheckCodeError', () => { ); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/continue-writing.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/continue-writing.spec.ts index f9664c590..35d62c307 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/continue-writing.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/continue-writing.spec.ts @@ -60,7 +60,7 @@ test.describe('AIAction/ContinueWriting', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/explain-code.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/explain-code.spec.ts index ed4f4b51c..60c7eb760 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/explain-code.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/explain-code.spec.ts @@ -18,7 +18,7 @@ test.describe('AIAction/ExplainCode', () => { await expect(answer).toHaveText(/console.log/); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/explain-image.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/explain-image.spec.ts index 8b1299d52..a717b9a10 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/explain-image.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/explain-image.spec.ts @@ -27,7 +27,7 @@ test.describe('AIAction/ExplainImage', () => { expect(responses).toEqual(new Set(['insert-below', 'replace-selection'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/explain-selection.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/explain-selection.spec.ts index 325cd56bd..3d85ae207 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/explain-selection.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/explain-selection.spec.ts @@ -53,7 +53,7 @@ test.describe('AIAction/ExplainSelection', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts index 909a231b2..a01aecaff 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts @@ -102,7 +102,7 @@ Compare and Select Flights` expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/fix-grammar.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/fix-grammar.spec.ts index e7dd8e052..da867547a 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/fix-grammar.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/fix-grammar.spec.ts @@ -53,7 +53,7 @@ test.describe('AIAction/FixGrammar', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/fix-spelling.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/fix-spelling.spec.ts index 66c52cc7f..8e0ed91a8 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/fix-spelling.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/fix-spelling.spec.ts @@ -50,7 +50,7 @@ test.describe('AIAction/FixSpelling', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-image.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-image.spec.ts index 9165d50c3..a2c19cf83 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-image.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-image.spec.ts @@ -27,7 +27,7 @@ test.describe('AIAction/GenerateAnImageWithImage', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-text.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-text.spec.ts index 5677b4de2..65fda5ca3 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-text.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/generate-an-image-with-text.spec.ts @@ -63,7 +63,7 @@ test.describe('AIAction/GenerateAnImageWithText', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/generate-headings.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/generate-headings.spec.ts index 48122f93b..02b8ab633 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/generate-headings.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/generate-headings.spec.ts @@ -74,7 +74,7 @@ test.describe('AIAction/GenerateHeadings', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/generate-image-caption.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/generate-image-caption.spec.ts index 6da747f4c..442bcef54 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/generate-image-caption.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/generate-image-caption.spec.ts @@ -29,7 +29,7 @@ test.describe('AIAction/GenerateImageCaption', () => { ); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/generate-outline.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/generate-outline.spec.ts index 301be1ebe..00397fe76 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/generate-outline.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/generate-outline.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/GenerateOutline', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/image-processing.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/image-processing.spec.ts index 5d57d59ed..ab62a1fd0 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/image-processing.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/image-processing.spec.ts @@ -27,7 +27,7 @@ test.describe('AIAction/ImageProcessing', () => { await expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/improve-writing.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/improve-writing.spec.ts index ec4034e04..5e2831dd8 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/improve-writing.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/improve-writing.spec.ts @@ -51,7 +51,7 @@ test.describe('AIAction/ImproveWriting', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/make-it-longer.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/make-it-longer.spec.ts index 669e19e97..97ada5360 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/make-it-longer.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/make-it-longer.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/MakeItLonger', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/make-it-real.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/make-it-real.spec.ts index 8efca253d..64fc06339 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/make-it-real.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/make-it-real.spec.ts @@ -64,7 +64,7 @@ test.describe('AIAction/MakeItReal', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/make-it-shorter.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/make-it-shorter.spec.ts index d02cc1927..09340bf72 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/make-it-shorter.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/make-it-shorter.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/MakeItShorter', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/summarize.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/summarize.spec.ts index 908b1c0af..fd6d3996d 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/summarize.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/summarize.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/Summarize', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/translate.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/translate.spec.ts index 52ba54c11..62731a232 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/translate.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/translate.spec.ts @@ -48,7 +48,7 @@ test.describe('AIAction/Translate', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('support show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/write-an-article.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/write-an-article.spec.ts index ddbdfdcbb..3f35d64f2 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/write-an-article.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/write-an-article.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/WriteAnArticleAboutThis', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/write-an-blog.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/write-an-blog.spec.ts index eb57dc555..65f050005 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/write-an-blog.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/write-an-blog.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/WriteAnBlogPostAboutThis', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/write-an-poem.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/write-an-poem.spec.ts index b50421d80..aff4092fb 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/write-an-poem.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/write-an-poem.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/WriteAnPoemAboutThis', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => { diff --git a/tests/affine-cloud-copilot/e2e/ai-action/write-an-tweet.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/write-an-tweet.spec.ts index b78729bb2..fa6b969ba 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/write-an-tweet.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/write-an-tweet.spec.ts @@ -57,7 +57,7 @@ test.describe('AIAction/WriteAnTweetAboutThis', () => { expect(responses).toEqual(new Set(['insert-below'])); }); - test('should show chat history in chat panel', async ({ + test.skip('should show chat history in chat panel', async ({ loggedInPage: page, utils, }) => {