Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: disable default save page as (#6548)

soumyasen1019f8407d7f4e
diff --git a/packages/backend/server/src/schema.gql b/packages/backend/server/src/schema.gql
index da7ee6499c..fc3454dbf2 100644
--- a/packages/backend/server/src/schema.gql
+++ b/packages/backend/server/src/schema.gql
@@ -26,6 +26,7 @@ type Copilot {
type CopilotHistories {
"""An mark identifying which view to use to display the session"""
action: String
+ createdAt: DateTime!
messages: [ChatMessage!]!
sessionId: String!
diff --git a/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx b/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx
index d1fbfba86c..daf796d1bc 100644
--- a/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx
+++ b/packages/frontend/core/src/hooks/affine/use-register-blocksuite-editor-commands.tsx
@@ -238,6 +238,22 @@ export function useRegisterBlocksuiteEditorCommands() {
);
}
+ unsubs.push(
+ registerAffineCommand({
+ id: 'alert-ctrl-s',
+ category: 'affine:general',
+ preconditionStrategy: PreconditionStrategy.Never,
+ keyBinding: {
+ binding: '$mod+s',
+ },
+ label: '',
+ icon: null,
+ run() {
+ toast(t['Save']());
+ },
+ })
+ );
+
return () => {
unsubs.forEach(unsub => unsub());
};
diff --git a/packages/frontend/graphql/src/graphql/index.ts b/packages/frontend/graphql/src/graphql/index.ts
index 6070c9323c..e429b004ce 100644
--- a/packages/frontend/graphql/src/graphql/index.ts
+++ b/packages/frontend/graphql/src/graphql/index.ts
@@ -225,6 +225,7 @@ query getCopilotHistories($workspaceId: String!, $docId: String, $options: Query
sessionId
tokens
action
+ createdAt
messages {
role
content
diff --git a/packages/frontend/graphql/src/schema.ts b/packages/frontend/graphql/src/schema.ts
index 3d490692db..7d57eda72d 100644
--- a/packages/frontend/graphql/src/schema.ts
+++ b/packages/frontend/graphql/src/schema.ts
@@ -340,6 +340,7 @@ export type GetCopilotHistoriesQuery = {
sessionId: string;
tokens: number;
action: string | null;
+ createdAt: string;
messages: Array<{
__typename?: 'ChatMessage';
role: string;