收口 Makelore 客户端变更
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-08-12 22:35:06 +08:00
parent 253bad8b40
commit f4113a872f
232 changed files with 4617 additions and 20121 deletions

View File

@@ -12,6 +12,7 @@ import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import { createPortal } from 'react-dom';
import { Button } from '@/components/ui/button';
import { DisclosureContent } from '@/components/ui/disclosure';
import { cn } from '@/lib/utils';
import { invokeIpc, statFile } from '@/lib/api-client';
import type { RawMessage, AttachedFileMeta } from '@/types/chat';
@@ -30,7 +31,7 @@ interface ChatMessageProps {
* Keep the assistant column aligned without painting a second avatar when
* the message belongs to an execution trace that already owns the avatar.
*/
assistantAvatarMode?: 'visible' | 'reserved' | 'reserved-trace';
assistantAvatarMode?: 'visible' | 'reserved' | 'reserved-trace' | 'embedded-trace';
/** Reduce the top whitespace when the reply follows its own execution trace. */
compactAssistantReply?: boolean;
textOverride?: string;
@@ -673,7 +674,7 @@ function MessageBubble({
<p className="whitespace-pre-wrap break-words break-all text-sm">{text}</p>
</>
) : (
<div className="prose prose-sm max-w-none break-words break-all text-foreground">
<div className="chat-assistant-message-markdown prose prose-sm max-w-none break-words break-all text-foreground">
<ReactMarkdown
remarkPlugins={[remarkGfm, remarkMath]}
rehypePlugins={[[rehypeKatex, { strict: false, throwOnError: false, output: 'html' }]]}
@@ -703,6 +704,9 @@ function MessageBubble({
</a>
);
},
hr() {
return null;
},
}}
>
{normalizeLatexDelimiters(text)}
@@ -862,7 +866,7 @@ function ImageLightbox({
return createPortal(
<div
className="fixed inset-0 z-50 flex items-center justify-center bg-foreground/65 backdrop-blur-sm"
className="fixed inset-0 z-[100] flex items-center justify-center bg-foreground/65 backdrop-blur-sm"
onClick={onClose}
>
{/* Image + buttons stacked */}
@@ -935,14 +939,14 @@ function ToolCard({
<Wrench className="h-3 w-3 shrink-0 opacity-60" />
<span className="font-mono text-xs">{name}</span>
{expanded
? <ChevronDown className="h-3 w-3 ml-auto" />
: <ChevronRight className="h-3 w-3 ml-auto" />}
? <ChevronDown className="ml-auto h-3 w-3 transition-transform duration-200 ease-out" />
: <ChevronRight className="ml-auto h-3 w-3 transition-transform duration-200 ease-out" />}
</button>
{expanded && input != null && (
<pre className="px-3 pb-2 text-xs text-muted-foreground overflow-x-auto">
<DisclosureContent open={expanded && input != null} innerClassName="px-3 pb-2">
<pre className="overflow-x-auto text-xs text-muted-foreground">
{typeof input === 'string' ? input : JSON.stringify(input, null, 2)}
</pre>
)}
</DisclosureContent>
</div>
);
}