Files
memind/src/utils/mindspaceChatContext.ts
T
john 71e536eceb feat(mindspace): 悬浮聊天勾选资料联动、UI 与交互优化
勾选单个文件时 Agent 获知上下文并主动问候;打开悬浮窗使用新会话。
统一弹窗浅色主题、固定高度与输入区布局,支持点击外部收起。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 18:08:06 +08:00

39 lines
903 B
TypeScript

import type {
MindSpace,
MindSpaceAsset,
MindSpaceCategory,
MindSpaceChatContext,
MindSpacePage,
} from '../types';
export type { MindSpaceChatContext } from '../types';
export {
buildContextPrefix,
buildMindSpaceChatContext,
buildSelectedAssetGreeting,
formatContextChip,
} from '../../mindspace-chat-context.mjs';
export type BuildMindSpaceChatContextInput = {
space: MindSpace;
ownerUsername?: string;
selectedCategory: MindSpaceCategory | null;
selectedPageId: string | null;
pages: MindSpacePage[];
pageLive?: {
page: MindSpacePage;
title: string;
summary: string;
content: string;
} | null;
assets?: MindSpaceAsset[];
selectedAssets?: MindSpaceAsset[];
focusedAsset?: MindSpaceAsset | null;
route: string;
agentSessionId?: string | null;
h5ApiBase?: string | null;
pageEditMode?: boolean;
parentAgentSessionId?: string | null;
};