feat(mindspace): 悬浮聊天勾选资料联动、UI 与交互优化
勾选单个文件时 Agent 获知上下文并主动问候;打开悬浮窗使用新会话。 统一弹窗浅色主题、固定高度与输入区布局,支持点击外部收起。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -297,7 +297,7 @@ export function ChatPanel({
|
||||
: chatState === 'waiting'
|
||||
? '消息已收到,正在连接后台…'
|
||||
: compact
|
||||
? '在这里继续和 Agent 对话…'
|
||||
? '随时召唤你的小助手吧'
|
||||
: randomPrompt;
|
||||
|
||||
const mergeVoiceText = (spoken: string) => {
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
import { useState } from 'react';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useChat } from '../context/ChatProvider';
|
||||
import type { MindSpaceChatContext, MindSpaceSaveCategory, PortalUser } from '../types';
|
||||
import { buildSelectedAssetGreeting } from '../utils/mindspaceChatContext';
|
||||
import type { Message, MindSpaceChatContext, MindSpaceSaveCategory, PortalUser } from '../types';
|
||||
import { SpaceChatFab } from './SpaceChatFab';
|
||||
import { SpaceChatPanel } from './SpaceChatPanel';
|
||||
|
||||
const SELECTED_ASSET_GREETING_ID = 'mindspace-selected-asset-greeting';
|
||||
|
||||
function buildSelectedAssetGreetingMessage(
|
||||
asset: NonNullable<MindSpaceChatContext['selectedAssets']>[number],
|
||||
): Message {
|
||||
const text = buildSelectedAssetGreeting(asset);
|
||||
return {
|
||||
id: SELECTED_ASSET_GREETING_ID,
|
||||
role: 'assistant',
|
||||
created: Math.floor(Date.now() / 1000),
|
||||
content: [{ type: 'text', text }],
|
||||
metadata: {
|
||||
userVisible: true,
|
||||
agentVisible: false,
|
||||
displayText: text,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function MindSpaceSpaceChat({
|
||||
context,
|
||||
user,
|
||||
@@ -31,15 +51,64 @@ export function MindSpaceSpaceChat({
|
||||
hideOpenFullChat?: boolean;
|
||||
title?: string;
|
||||
}) {
|
||||
const { chatState, pendingTool } = useChat();
|
||||
const { chatState, pendingTool, newSession, switchSession, session, messages } = useChat();
|
||||
const [internalOpen, setInternalOpen] = useState(false);
|
||||
const open = controlledOpen ?? internalOpen;
|
||||
const setOpen = onOpenChange ?? setInternalOpen;
|
||||
const wasOpenRef = useRef(false);
|
||||
const restoreSessionIdRef = useRef<string | null>(null);
|
||||
const messagesRef = useRef(messages);
|
||||
messagesRef.current = messages;
|
||||
|
||||
useEffect(() => {
|
||||
if (chatBridge) {
|
||||
wasOpenRef.current = open;
|
||||
return;
|
||||
}
|
||||
|
||||
const wasOpen = wasOpenRef.current;
|
||||
if (open && !wasOpen) {
|
||||
restoreSessionIdRef.current = session?.id ?? null;
|
||||
newSession();
|
||||
} else if (!open && wasOpen) {
|
||||
if (messagesRef.current.length === 0 && restoreSessionIdRef.current) {
|
||||
switchSession(restoreSessionIdRef.current);
|
||||
}
|
||||
restoreSessionIdRef.current = null;
|
||||
}
|
||||
wasOpenRef.current = open;
|
||||
}, [chatBridge, newSession, open, session?.id, switchSession]);
|
||||
|
||||
useEffect(() => {
|
||||
if (chatBridge) return;
|
||||
return () => {
|
||||
if (messagesRef.current.length === 0 && restoreSessionIdRef.current) {
|
||||
switchSession(restoreSessionIdRef.current);
|
||||
}
|
||||
};
|
||||
}, [chatBridge, switchSession]);
|
||||
|
||||
const prefillMessages = useMemo(() => {
|
||||
if (chatBridge || !open) return [];
|
||||
if (messages.some((message) => message.role === 'user')) return [];
|
||||
const selected = context.selectedAssets ?? [];
|
||||
if (selected.length !== 1) return [];
|
||||
return [buildSelectedAssetGreetingMessage(selected[0])];
|
||||
}, [chatBridge, context.selectedAssets, messages, open]);
|
||||
|
||||
const wrapperClass =
|
||||
variant === 'overlay' ? 'space-chat-stack space-chat-stack-overlay' : 'space-chat-stack';
|
||||
|
||||
return (
|
||||
<div className={wrapperClass}>
|
||||
{open ? (
|
||||
<button
|
||||
type="button"
|
||||
className="space-chat-backdrop"
|
||||
aria-label="收起对话"
|
||||
onClick={() => setOpen(false)}
|
||||
/>
|
||||
) : null}
|
||||
<SpaceChatFab
|
||||
open={open}
|
||||
streaming={chatState === 'streaming'}
|
||||
@@ -56,6 +125,7 @@ export function MindSpaceSpaceChat({
|
||||
chatBridge={chatBridge}
|
||||
hideOpenFullChat={hideOpenFullChat}
|
||||
title={title}
|
||||
prefillMessages={prefillMessages}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -667,6 +667,14 @@ export function MindSpaceView({
|
||||
return () => document.removeEventListener('pointerdown', handlePointerDown);
|
||||
}, [openAssetMenuId]);
|
||||
|
||||
const selectedAssetsForChat = useMemo(
|
||||
() =>
|
||||
selectedAssetIds
|
||||
.map((id) => assets.find((asset) => asset.id === id))
|
||||
.filter((asset): asset is MindSpaceAsset => Boolean(asset)),
|
||||
[selectedAssetIds, assets],
|
||||
);
|
||||
|
||||
const mindspaceChatContext = useMemo(() => {
|
||||
if (!space) return null;
|
||||
return buildMindSpaceChatContext({
|
||||
@@ -677,7 +685,7 @@ export function MindSpaceView({
|
||||
pages,
|
||||
pageLive: pageLiveContext,
|
||||
assets,
|
||||
focusedAsset: agentAsset,
|
||||
selectedAssets: selectedAssetsForChat,
|
||||
route: `${location.pathname}${location.search}`,
|
||||
agentSessionId: session?.id ?? null,
|
||||
h5ApiBase,
|
||||
@@ -690,7 +698,7 @@ export function MindSpaceView({
|
||||
pages,
|
||||
pageLiveContext,
|
||||
assets,
|
||||
agentAsset,
|
||||
selectedAssetsForChat,
|
||||
location.pathname,
|
||||
location.search,
|
||||
session?.id,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
import { useChat } from '../context/ChatProvider';
|
||||
import { INSUFFICIENT_BALANCE_NOTICE } from '../hooks/useTKMindChat';
|
||||
import type { PageEditSubChatBridge } from '../hooks/usePageEditSubChat';
|
||||
import type { MindSpaceChatContext, MindSpaceSaveCategory, PortalUser } from '../types';
|
||||
import type { MindSpaceChatContext, MindSpaceSaveCategory, PortalUser, Message } from '../types';
|
||||
import { formatContextChip } from '../utils/mindspaceChatContext';
|
||||
import { ChatPanel } from './ChatPanel';
|
||||
import { TKMindAvatar } from './TKMindAvatar';
|
||||
@@ -17,6 +17,7 @@ export function SpaceChatPanel({
|
||||
chatBridge,
|
||||
hideOpenFullChat = false,
|
||||
title = 'TKMind',
|
||||
prefillMessages = [],
|
||||
}: {
|
||||
open: boolean;
|
||||
context: MindSpaceChatContext;
|
||||
@@ -31,6 +32,7 @@ export function SpaceChatPanel({
|
||||
chatBridge?: PageEditSubChatBridge;
|
||||
hideOpenFullChat?: boolean;
|
||||
title?: string;
|
||||
prefillMessages?: Message[];
|
||||
}) {
|
||||
const mainChat = useChat();
|
||||
const chat = chatBridge ?? mainChat;
|
||||
@@ -59,6 +61,15 @@ export function SpaceChatPanel({
|
||||
return () => window.removeEventListener('keydown', handleKeyDown);
|
||||
}, [open, onClose]);
|
||||
|
||||
const displayMessages = useMemo(() => {
|
||||
if (!prefillMessages.length) return messages;
|
||||
if (messages.some((message) => message.role === 'user')) return messages;
|
||||
const extras = prefillMessages.filter(
|
||||
(item) => !messages.some((message) => message.id && message.id === item.id),
|
||||
);
|
||||
return extras.length ? [...messages, ...extras] : messages;
|
||||
}, [messages, prefillMessages]);
|
||||
|
||||
if (!open) return null;
|
||||
|
||||
const contextLabel = formatContextChip(context);
|
||||
@@ -119,7 +130,7 @@ export function SpaceChatPanel({
|
||||
<ChatPanel
|
||||
variant="compact"
|
||||
user={user}
|
||||
messages={messages}
|
||||
messages={displayMessages}
|
||||
chatState={chatState}
|
||||
pendingTool={pendingTool}
|
||||
session={session}
|
||||
@@ -132,7 +143,6 @@ export function SpaceChatPanel({
|
||||
onStop={stop}
|
||||
onApproveTool={approveTool}
|
||||
onPageSaved={onPageSaved}
|
||||
onClose={onClose}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
+271
-18
@@ -8769,11 +8769,12 @@ body,
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
color: inherit;
|
||||
background: #fffaf0;
|
||||
color: #18211d;
|
||||
background:
|
||||
linear-gradient(145deg, rgba(255, 252, 244, 0.98), rgba(229, 237, 226, 0.96));
|
||||
box-shadow:
|
||||
0 10px 30px rgba(24, 33, 29, 0.18),
|
||||
0 0 0 1px rgba(47, 111, 87, 0.18);
|
||||
0 10px 30px rgba(24, 33, 29, 0.16),
|
||||
0 0 0 1px rgba(47, 111, 87, 0.16);
|
||||
cursor: pointer;
|
||||
transition: transform 0.18s ease, box-shadow 0.18s ease;
|
||||
}
|
||||
@@ -8782,6 +8783,16 @@ body,
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.space-chat-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 899;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.space-chat-fab.is-streaming {
|
||||
box-shadow:
|
||||
0 10px 30px rgba(47, 111, 87, 0.28),
|
||||
@@ -8815,15 +8826,59 @@ body,
|
||||
right: 24px;
|
||||
bottom: 92px;
|
||||
z-index: 900;
|
||||
display: grid;
|
||||
grid-template-rows: auto auto minmax(0, 1fr) auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min(480px, calc(100vw - 32px));
|
||||
height: min(620px, calc(100vh - 120px));
|
||||
max-height: min(620px, calc(100vh - 120px));
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(24, 33, 29, 0.12);
|
||||
border: 1px solid rgba(24, 33, 29, 0.14);
|
||||
border-radius: 24px;
|
||||
background: rgba(255, 252, 244, 0.98);
|
||||
box-shadow: 0 24px 60px rgba(24, 33, 29, 0.18);
|
||||
color: #18211d;
|
||||
background:
|
||||
linear-gradient(160deg, rgba(255, 252, 244, 0.98) 0%, rgba(244, 240, 231, 0.98) 52%, rgba(229, 237, 226, 0.94) 100%);
|
||||
box-shadow:
|
||||
0 24px 60px rgba(24, 33, 29, 0.16),
|
||||
0 0 0 1px rgba(47, 111, 87, 0.08);
|
||||
|
||||
--ms-ink: #18211d;
|
||||
--ms-muted: #6d7771;
|
||||
--ms-soft: #52605a;
|
||||
--ms-green: #2f6f57;
|
||||
--ms-green-deep: #245742;
|
||||
--ms-cream: #fffaf0;
|
||||
--ms-paper: rgba(255, 252, 244, 0.96);
|
||||
--ms-line: rgba(24, 33, 29, 0.12);
|
||||
--ms-line-soft: rgba(24, 33, 29, 0.08);
|
||||
|
||||
--color-bg-base: #f4f0e7;
|
||||
--color-bg-surface: rgba(255, 255, 255, 0.82);
|
||||
--color-bg-elevated: var(--ms-paper);
|
||||
--color-bg-active: rgba(47, 111, 87, 0.12);
|
||||
--color-bg-code: rgba(24, 33, 29, 0.06);
|
||||
--color-bg-warning: rgba(238, 176, 78, 0.14);
|
||||
--color-bg-error: rgba(214, 69, 69, 0.1);
|
||||
--color-bg-info: rgba(47, 111, 87, 0.1);
|
||||
--color-bg-hover: rgba(24, 33, 29, 0.06);
|
||||
|
||||
--color-text-primary: var(--ms-ink);
|
||||
--color-text-secondary: var(--ms-soft);
|
||||
--color-text-muted: var(--ms-muted);
|
||||
--color-text-faint: #8a958f;
|
||||
--color-text-meta: #8a958f;
|
||||
--color-text-link: var(--ms-green);
|
||||
--color-text-error: #8a1f1f;
|
||||
--color-text-info: var(--ms-green-deep);
|
||||
|
||||
--color-border: var(--ms-line);
|
||||
--color-border-input: rgba(24, 33, 29, 0.16);
|
||||
--color-border-strong: rgba(47, 111, 87, 0.28);
|
||||
--color-border-warning: rgba(238, 176, 78, 0.35);
|
||||
--color-border-input-focus: rgba(47, 111, 87, 0.42);
|
||||
|
||||
--color-accent: var(--ms-green);
|
||||
--color-accent-user: var(--ms-green-deep);
|
||||
--color-danger: #c4453d;
|
||||
}
|
||||
|
||||
.space-chat-panel-header {
|
||||
@@ -8831,8 +8886,11 @@ body,
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
flex-shrink: 0;
|
||||
padding: 14px 16px;
|
||||
border-bottom: 1px solid rgba(24, 33, 29, 0.08);
|
||||
border-bottom: 1px solid var(--ms-line-soft);
|
||||
background: rgba(255, 252, 244, 0.72);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.space-chat-panel-brand {
|
||||
@@ -8845,12 +8903,13 @@ body,
|
||||
.space-chat-panel-brand strong {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: var(--ms-ink);
|
||||
}
|
||||
|
||||
.space-chat-context-chip {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
color: #6d7771;
|
||||
color: var(--ms-muted);
|
||||
font-size: 12px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -8868,11 +8927,29 @@ body,
|
||||
height: 32px;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
color: #52605a;
|
||||
color: var(--ms-soft);
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
background: rgba(24, 33, 29, 0.06);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
.space-chat-panel-close:hover {
|
||||
color: var(--ms-green-deep);
|
||||
background: rgba(47, 111, 87, 0.1);
|
||||
}
|
||||
|
||||
.space-chat-panel-actions .ghost-btn {
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
color: var(--ms-soft);
|
||||
border: 1px solid rgba(24, 33, 29, 0.12);
|
||||
}
|
||||
|
||||
.space-chat-panel-actions .ghost-btn:hover:not(:disabled) {
|
||||
color: var(--ms-green-deep);
|
||||
border-color: rgba(47, 111, 87, 0.24);
|
||||
background: rgba(47, 111, 87, 0.08);
|
||||
}
|
||||
|
||||
.space-chat-panel-error {
|
||||
@@ -8880,6 +8957,7 @@ body,
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
flex-shrink: 0;
|
||||
padding: 10px 16px;
|
||||
color: #8a1f1f;
|
||||
font-size: 13px;
|
||||
@@ -8887,8 +8965,11 @@ body,
|
||||
}
|
||||
|
||||
.space-chat-panel-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 12px 14px 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.space-chat-panel-body .msg-content {
|
||||
@@ -8910,27 +8991,141 @@ body,
|
||||
|
||||
.space-chat-panel-body .empty-state-compact {
|
||||
padding: 28px 12px;
|
||||
color: var(--ms-muted);
|
||||
}
|
||||
|
||||
.space-chat-panel-body .empty-state-compact h2 {
|
||||
font-size: 20px;
|
||||
color: var(--ms-ink);
|
||||
}
|
||||
|
||||
.space-chat-panel-body .empty-state-compact p {
|
||||
font-size: 13px;
|
||||
color: var(--ms-muted);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-bubble-assistant {
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
color: var(--ms-ink);
|
||||
border-color: rgba(24, 33, 29, 0.1);
|
||||
box-shadow: 0 2px 8px rgba(24, 33, 29, 0.04);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-bubble-assistant::before {
|
||||
border-right-color: rgba(255, 255, 255, 0.92);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-bubble-user {
|
||||
background: var(--ms-green);
|
||||
color: var(--ms-cream);
|
||||
box-shadow: 0 2px 10px rgba(47, 111, 87, 0.22);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-bubble-user::before {
|
||||
border-left-color: var(--ms-green);
|
||||
}
|
||||
|
||||
.space-chat-panel .thinking {
|
||||
color: var(--ms-muted);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
padding: 12px 16px 16px;
|
||||
border-top: 1px solid rgba(24, 33, 29, 0.08);
|
||||
background: rgba(255, 252, 244, 0.96);
|
||||
border-top: 1px solid var(--ms-line-soft);
|
||||
background: rgba(255, 252, 244, 0.82);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-input-shell {
|
||||
border: 1px solid rgba(24, 33, 29, 0.14);
|
||||
border-radius: 16px;
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
|
||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-input-shell:focus-within {
|
||||
border-color: rgba(47, 111, 87, 0.35);
|
||||
box-shadow:
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.65),
|
||||
0 0 0 3px rgba(47, 111, 87, 0.1);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer textarea.input.chat-input-field {
|
||||
color: var(--ms-ink);
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.space-chat-panel-footer textarea.input.chat-input-field::placeholder {
|
||||
color: rgba(109, 119, 113, 0.85);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.space-chat-panel-footer textarea.input.chat-input-field:focus {
|
||||
outline: none;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-image-upload-trigger {
|
||||
color: var(--ms-soft);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-image-upload-trigger:hover:not(:disabled) {
|
||||
color: var(--ms-green-deep);
|
||||
background: rgba(47, 111, 87, 0.1);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .voice-btn {
|
||||
color: var(--ms-soft);
|
||||
border-color: rgba(24, 33, 29, 0.14);
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .voice-btn:hover:not(:disabled) {
|
||||
color: var(--ms-green-deep);
|
||||
border-color: rgba(47, 111, 87, 0.24);
|
||||
background: rgba(47, 111, 87, 0.08);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-skill-trigger {
|
||||
border-color: rgba(24, 33, 29, 0.14);
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
color: var(--ms-soft);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-skill-trigger:hover:not(:disabled) {
|
||||
color: var(--ms-green-deep);
|
||||
border-color: rgba(47, 111, 87, 0.24);
|
||||
background: rgba(47, 111, 87, 0.08);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .send-btn {
|
||||
min-width: 72px;
|
||||
border-radius: 14px;
|
||||
color: var(--ms-cream);
|
||||
background: var(--ms-green);
|
||||
box-shadow: 0 8px 18px rgba(47, 111, 87, 0.22);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .send-btn:hover:not(:disabled) {
|
||||
background: var(--ms-green-deep);
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .danger-btn {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.space-chat-panel-footer .chat-input-row .ghost-btn {
|
||||
padding: 8px 10px;
|
||||
font-size: 13px;
|
||||
color: var(--ms-soft);
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
border: 1px solid rgba(24, 33, 29, 0.12);
|
||||
}
|
||||
|
||||
.space-chat-panel-dismiss {
|
||||
@@ -8938,7 +9133,7 @@ body,
|
||||
padding: 8px 12px;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
color: #6d7771;
|
||||
color: var(--ms-muted);
|
||||
font-size: 13px;
|
||||
background: rgba(24, 33, 29, 0.05);
|
||||
cursor: pointer;
|
||||
@@ -8946,13 +9141,66 @@ body,
|
||||
}
|
||||
|
||||
.space-chat-panel-dismiss:hover {
|
||||
color: #52605a;
|
||||
color: var(--ms-soft);
|
||||
background: rgba(24, 33, 29, 0.09);
|
||||
}
|
||||
|
||||
.tool-confirm-compact {
|
||||
margin: 0 16px 8px;
|
||||
.space-chat-panel .tool-confirm-compact {
|
||||
margin: 0 14px 8px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 16px;
|
||||
color: var(--ms-ink);
|
||||
border-color: rgba(238, 176, 78, 0.35);
|
||||
background: rgba(238, 176, 78, 0.12);
|
||||
}
|
||||
|
||||
.space-chat-panel .tool-confirm-compact .tool-confirm-text {
|
||||
color: var(--ms-ink);
|
||||
}
|
||||
|
||||
.space-chat-panel .tool-confirm-compact .tool-confirm-actions button {
|
||||
background: var(--ms-green);
|
||||
color: var(--ms-cream);
|
||||
}
|
||||
|
||||
.space-chat-panel .tool-confirm-compact .tool-confirm-actions .danger {
|
||||
background: var(--color-danger);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-copy {
|
||||
background: rgba(24, 33, 29, 0.06);
|
||||
color: var(--ms-muted);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-copy:hover {
|
||||
background: rgba(47, 111, 87, 0.12);
|
||||
color: var(--ms-green-deep);
|
||||
}
|
||||
|
||||
.space-chat-panel .msg-save-page,
|
||||
.space-chat-panel .msg-public-share-link {
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
border-color: rgba(24, 33, 29, 0.12);
|
||||
color: var(--ms-soft);
|
||||
}
|
||||
|
||||
.space-chat-panel .chat-skill-menu {
|
||||
border-color: rgba(24, 33, 29, 0.12);
|
||||
background: rgba(255, 252, 244, 0.98);
|
||||
box-shadow: 0 12px 32px rgba(24, 33, 29, 0.14);
|
||||
}
|
||||
|
||||
.space-chat-panel .chat-skill-menu-item {
|
||||
color: var(--ms-ink);
|
||||
}
|
||||
|
||||
.space-chat-panel .chat-skill-menu-item:hover {
|
||||
background: rgba(47, 111, 87, 0.08);
|
||||
}
|
||||
|
||||
.space-chat-panel .chat-history-loader {
|
||||
border-color: rgba(24, 33, 29, 0.1);
|
||||
color: var(--ms-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
@@ -8966,6 +9214,7 @@ body,
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
height: min(75vh, calc(100vh - 48px));
|
||||
max-height: min(75vh, calc(100vh - 48px));
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
border-radius: 24px 24px 0 0;
|
||||
@@ -9065,6 +9314,10 @@ body,
|
||||
z-index: 1010;
|
||||
}
|
||||
|
||||
.space-chat-stack-overlay .space-chat-backdrop {
|
||||
z-index: 1009;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.mindspace-page-fullscreen-preview-toolbar {
|
||||
align-items: flex-start;
|
||||
|
||||
@@ -71,7 +71,20 @@ export type MindSpaceChatContext = {
|
||||
id: string;
|
||||
displayName: string;
|
||||
mimeType: string;
|
||||
filename?: string;
|
||||
sizeBytes?: number;
|
||||
categoryCode?: MindSpaceCategory['code'];
|
||||
assetType?: string;
|
||||
};
|
||||
selectedAssets?: Array<{
|
||||
id: string;
|
||||
displayName: string;
|
||||
mimeType: string;
|
||||
filename?: string;
|
||||
sizeBytes?: number;
|
||||
categoryCode?: MindSpaceCategory['code'];
|
||||
assetType?: string;
|
||||
}>;
|
||||
homeCategories?: Array<{
|
||||
code: MindSpaceCategory['code'];
|
||||
name: string;
|
||||
|
||||
@@ -11,6 +11,7 @@ export type { MindSpaceChatContext } from '../types';
|
||||
export {
|
||||
buildContextPrefix,
|
||||
buildMindSpaceChatContext,
|
||||
buildSelectedAssetGreeting,
|
||||
formatContextChip,
|
||||
} from '../../mindspace-chat-context.mjs';
|
||||
|
||||
@@ -27,6 +28,7 @@ export type BuildMindSpaceChatContextInput = {
|
||||
content: string;
|
||||
} | null;
|
||||
assets?: MindSpaceAsset[];
|
||||
selectedAssets?: MindSpaceAsset[];
|
||||
focusedAsset?: MindSpaceAsset | null;
|
||||
route: string;
|
||||
agentSessionId?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user