feat(frontend): refine app shell and assistant editors

This commit is contained in:
Xin Wang
2026-08-05 08:19:16 +08:00
parent 0ce5d9774e
commit b88e37789a
13 changed files with 623 additions and 453 deletions
@@ -8,6 +8,7 @@ import {
Controls,
type Edge,
MarkerType,
MiniMap,
type Node,
type NodeChange,
type OnConnectEnd,
@@ -561,7 +562,7 @@ export function WorkflowCanvas({
<NodeActionContext.Provider value={nodeActions}>
<EdgeActionContext.Provider value={edgeActions}>
<div className="relative h-full w-full min-h-[560px]">
<section className="relative h-full w-full overflow-hidden rounded-2xl border border-hairline bg-canvas-soft shadow-sm">
<section className="relative h-full w-full overflow-hidden bg-canvas-soft">
<div
aria-hidden
className="pointer-events-none absolute -right-24 -top-24 z-0 h-80 w-80 rounded-full opacity-30 blur-3xl"
@@ -616,6 +617,17 @@ export function WorkflowCanvas({
<Controls
className="!rounded-xl !border !border-hairline !bg-card !shadow-sm [&_button]:!border-hairline [&_button]:!bg-card [&_button]:!text-foreground"
/>
<MiniMap
position="bottom-left"
pannable
zoomable
nodeBorderRadius={8}
nodeColor="var(--surface-strong)"
nodeStrokeColor="var(--hairline-strong)"
maskColor="color-mix(in srgb, var(--background) 68%, transparent)"
className="!rounded-xl !border !border-hairline !bg-card/90 !shadow-sm"
style={{ left: 56, width: 176, height: 108 }}
/>
<Panel position="top-left">
<TooltipProvider>
<div className="flex flex-col gap-2">
@@ -23,7 +23,7 @@ export function WorkflowEditor(props: WorkflowEditorProps) {
if (loading) {
return (
<div className="flex h-full w-full items-center justify-center rounded-2xl border border-hairline bg-canvas-soft text-muted-foreground">
<div className="flex h-full w-full items-center justify-center bg-canvas-soft text-muted-foreground">
<Loader2 className="mr-2 animate-spin" size={18} />
正在加载节点目录…
</div>
@@ -31,7 +31,7 @@ export function WorkflowEditor(props: WorkflowEditorProps) {
}
if (error) {
return (
<div className="flex h-full w-full items-center justify-center rounded-2xl border border-hairline bg-canvas-soft px-6 text-center text-sm text-destructive">
<div className="flex h-full w-full items-center justify-center bg-canvas-soft px-6 text-center text-sm text-destructive">
加载节点目录失败:{error}
</div>
);