feat(memory-v2): close Phase A with auto-review, product events, and H5 recall UI.

Add candidate auto-review pipeline, shadow audit tooling, admin metrics page,
and user-visible memory recall hints in chat with phase-a readiness checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-01 17:14:06 +08:00
parent 666db0b939
commit 6f3e53a56a
50 changed files with 3730 additions and 38 deletions
+21 -1
View File
@@ -1,12 +1,14 @@
import { useEffect, useMemo } from 'react';
import { useChat } from '../context/ChatProvider';
import { INSUFFICIENT_BALANCE_NOTICE } from '../hooks/useTKMindChat';
import { useGoalRunBanner } from '../hooks/useGoalRunBanner';
import type { PageEditSubChatBridge } from '../hooks/usePageEditSubChat';
import type { MindSpaceChatContext, MindSpaceSaveCategory, PortalUser, Message } from '../types';
import { formatContextChip } from '../utils/mindspaceChatContext';
import { shouldShowChatMessage } from '../utils/message';
import { ChatPanel } from './ChatPanel';
import { TKMindAvatar } from './TKMindAvatar';
import { GoalRunAwaitingBanner } from './GoalRunAwaitingBanner';
export function SpaceChatPanel({
open,
@@ -53,7 +55,15 @@ export function SpaceChatPanel({
uploadChatAttachment,
retryConnect,
} = chat;
const { capabilities, grantedSkills } = mainChat;
const { capabilities, grantedSkills, followAgentRun, goalRunEnabled } = mainChat;
const goalRunBanner = useGoalRunBanner({
userId: user.id,
sessionId: session?.id,
chatState,
submit: (text, options) => void submit(text, options),
followAgentRun,
featureEnabled: goalRunEnabled,
});
useEffect(() => {
if (!open) return;
@@ -130,6 +140,16 @@ export function SpaceChatPanel({
</div>
)}
{goalRunBanner.enabled && (
<GoalRunAwaitingBanner
items={goalRunBanner.items}
busy={goalRunBanner.bannerBusy}
onContinue={goalRunBanner.handleContinue}
onDismiss={goalRunBanner.dismissItem}
onRefresh={goalRunBanner.refresh}
/>
)}
<ChatPanel
variant="compact"
user={user}