Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(editor): move Database below Markdown slash actions (#7622)

Wolf Mermelstein44acfb8431dd
diff --git a/apps/web/src/lib/core/component/LexicalMarkdown/plugins/actions/actions.ts b/apps/web/src/lib/core/component/LexicalMarkdown/plugins/actions/actions.ts
index d1ace0f072..99eb82227a 100644
--- a/apps/web/src/lib/core/component/LexicalMarkdown/plugins/actions/actions.ts
+++ b/apps/web/src/lib/core/component/LexicalMarkdown/plugins/actions/actions.ts
@@ -127,36 +127,6 @@ function openCreationComposer(
}
export const ACTIONS: Action[] = [
- {
- id: 'database-query',
- name: 'Database',
- keywords: [
- 'query',
- 'query-database',
- 'ask',
- 'database',
- 'live',
- 'answer',
- 'sql',
- ],
- category: ActionCategory.MEDIA,
- icon: LightningIcon,
- dependencies: [DatabaseQueryNode],
- action: (editor) => {
- if (!isFeatureEnabled(enableDatabases)) return;
- queueMicrotask(() =>
- editor.update(() => {
- $insertNodes([
- $createDatabaseQueryNode({
- queryId: '',
- prompt: '',
- displayMode: 'scalar',
- }),
- ]);
- })
- );
- },
- },
{
id: 'paragraph',
name: 'Normal Text',
@@ -369,4 +339,34 @@ export const ACTIONS: Action[] = [
},
dependencies: [HorizontalRuleNode],
},
+ {
+ id: 'database-query',
+ name: 'Database',
+ keywords: [
+ 'query',
+ 'query-database',
+ 'ask',
+ 'database',
+ 'live',
+ 'answer',
+ 'sql',
+ ],
+ category: ActionCategory.MEDIA,
+ icon: LightningIcon,
+ dependencies: [DatabaseQueryNode],
+ action: (editor) => {
+ if (!isFeatureEnabled(enableDatabases)) return;
+ queueMicrotask(() =>
+ editor.update(() => {
+ $insertNodes([
+ $createDatabaseQueryNode({
+ queryId: '',
+ prompt: '',
+ displayMode: 'scalar',
+ }),
+ ]);
+ })
+ );
+ },
+ },
];
diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.md
index 9a33ebc179..8f46f9de5f 100644
--- a/docs/AGENT_GUIDE/channels.md
+++ b/docs/AGENT_GUIDE/channels.md
@@ -1024,4 +1024,8 @@ reconnecting.
Members see the picture without editing controls. One-to-one direct messages
continue to show the other person's user picture.
+Opening the slash menu with `/` lists Normal Text, headings, and the other
+Markdown options before Database. Typing `/database` filters to the Database
+action.
+
When Databases is enabled, type `/database` in a channel message or thread reply and choose **Database** to insert a live question. Ask with Enter or the Ask button, then accept the answer before sending the message. Enter in the question box belongs to the question and must not send the channel draft. Recipients can read the live answer subject to their database access.
diff --git a/docs/AGENT_GUIDE/documents.md b/docs/AGENT_GUIDE/documents.md
index 721882c7b4..52ef64afd8 100644
--- a/docs/AGENT_GUIDE/documents.md
+++ b/docs/AGENT_GUIDE/documents.md
@@ -74,6 +74,10 @@ HTTPS machine hostnames; verify the proxy configuration before retrying.
## Live database answers
+Opening the slash menu with `/` lists Normal Text, headings, and the other
+Markdown options before Database. Typing `/database` filters to the Database
+action.
+
With Databases on, type `/database` and choose **Database** to insert a live answer
to a question about a database. Answers run with each reader's database access and
refresh when referenced tables change. See