Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(ai): soup input the semi-final-fixening (#1241)
Eric Hayes22a2e917cf94
diff --git a/js/app/packages/app/component/SoupChatInput.tsx b/js/app/packages/app/component/SoupChatInput.tsxindex 5f3e348081..bc2dc9a13b 100644--- a/js/app/packages/app/component/SoupChatInput.tsx+++ b/js/app/packages/app/component/SoupChatInput.tsx@@ -49,7 +49,7 @@ export function SoupChatInput() {<Show when={!preview()}><divref={containerRef}- class="absolute z-10 bottom-0 pb-2 px-2 flex justify-center w-full pointer-events-none "+ class="absolute z-10 bottom-0 pb-2 px-2 flex justify-center w-full pointer-events-none"style={{'background-image': `linear-gradient(transparent, var(--color-panel) 85%)`,}}diff --git a/js/app/packages/core/component/AI/component/input/useChatInput.tsx b/js/app/packages/core/component/AI/component/input/useChatInput.tsxindex 8f48b51686..3ce9957255 100644--- a/js/app/packages/core/component/AI/component/input/useChatInput.tsx+++ b/js/app/packages/core/component/AI/component/input/useChatInput.tsx@@ -344,7 +344,7 @@ function ChatInput(props: ChatInputInternalProps) {id="chat-input-text-area"class="text-base sm:text-sm text-ink transition-all duration-150 ease-out"classList={{- 'pl-8 pr-[180px]': !isMultiline(),+ 'pl-8 pr-[130px]': !isMultiline(),'pl-0 pr-0 pb-8': isMultiline(),}}ref={mdRef}diff --git a/js/app/packages/core/component/LexicalMarkdown/component/decorator/Snapshot.tsx b/js/app/packages/core/component/LexicalMarkdown/component/decorator/Snapshot.tsxindex 9bcfe8880d..a0acfc4b98 100644--- a/js/app/packages/core/component/LexicalMarkdown/component/decorator/Snapshot.tsx+++ b/js/app/packages/core/component/LexicalMarkdown/component/decorator/Snapshot.tsx@@ -23,7 +23,7 @@ import {KEY_ENTER_COMMAND,} from 'lexical';import type { JSX } from 'solid-js';-import { createMemo, createSignal, Show, useContext } from 'solid-js';+import { createMemo, createSignal, Show, Suspense, useContext } from 'solid-js';import { LexicalWrapperContext } from '../../context/LexicalWrapperContext';import { autoRegister } from '../../plugins';import { openDocument } from '../core/BlockLink';@@ -55,6 +55,14 @@ function Loading() {}export function Snapshot(props: SnapshotDecoratorProps) {+ return (+ <Suspense>+ <SnapshotInner {...props} />+ </Suspense>+ );+}++function SnapshotInner(props: SnapshotDecoratorProps) {const currentBlockId = useMaybeBlockId();const lexicalWrapper = useContext(LexicalWrapperContext);diff --git a/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.ts b/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.tsindex 8292013d60..aa7d5d4a54 100644--- a/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.ts+++ b/js/app/packages/core/component/LexicalMarkdown/utils/mentionsUtils.ts@@ -303,7 +303,7 @@ export async function handleBasicMention(const itemName = getItemName(itemEntity);onDocumentMention?.(item);if (dependencies.useSnapshotNode && supportsSnapshotNode(itemBlock)) {- handleSnapshotMention(item, dependencies);+ await handleSnapshotMention(item, dependencies);} else {editor.dispatchCommand(INSERT_DOCUMENT_MENTION_COMMAND, {documentId: item.id,diff --git a/js/app/packages/core/constant/featureFlags.ts b/js/app/packages/core/constant/featureFlags.tsindex 5c3976b590..267e29a7bb 100644--- a/js/app/packages/core/constant/featureFlags.ts+++ b/js/app/packages/core/constant/featureFlags.ts@@ -119,7 +119,7 @@ export const ENABLE_STATIC_DOCUMENT_CARDS = false;export const ENABLE_MARKDOWN_AI_GENERATE = false;-export const ENABLE_UNIFIED_LIST_AI_INPUT = false;+export const ENABLE_UNIFIED_LIST_AI_INPUT = true;// snapshot mention content inline for AI chatexport const ENABLE_SNAPSHOT_NODE = true;