work-agent 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +234 -0
- package/app/(admin)/approvals/page.tsx +16 -0
- package/app/(admin)/audit/page.tsx +18 -0
- package/app/(admin)/layout.tsx +47 -0
- package/app/(admin)/scheduled-tasks/page.tsx +17 -0
- package/app/(admin)/settings/page.tsx +46 -0
- package/app/(admin)/skills/[name]/page.tsx +378 -0
- package/app/(admin)/skills/page.tsx +406 -0
- package/app/(admin)/statistics/page.tsx +416 -0
- package/app/(admin)/tickets/[id]/page.tsx +348 -0
- package/app/(admin)/tickets/new/page.tsx +309 -0
- package/app/(admin)/tickets/page.tsx +27 -0
- package/app/api/audit/route.ts +30 -0
- package/app/api/auth/feishu/callback/route.ts +72 -0
- package/app/api/auth/feishu/login/route.ts +17 -0
- package/app/api/auth/feishu/sso/route.ts +78 -0
- package/app/api/auth/login/route.ts +85 -0
- package/app/api/auth/oauth/route.ts +168 -0
- package/app/api/config/providers/route.ts +105 -0
- package/app/api/config/route.ts +115 -0
- package/app/api/config/status/route.ts +56 -0
- package/app/api/config/test/route.ts +212 -0
- package/app/api/documents/[id]/route.ts +88 -0
- package/app/api/documents/route.ts +53 -0
- package/app/api/health/route.ts +32 -0
- package/app/api/knowledge/[id]/route.ts +152 -0
- package/app/api/knowledge/from-session/route.ts +27 -0
- package/app/api/knowledge/route.ts +100 -0
- package/app/api/market/knowledge/[id]/route.ts +92 -0
- package/app/api/market/knowledge/route.ts +130 -0
- package/app/api/marketplace/skills/[id]/approve/route.ts +68 -0
- package/app/api/marketplace/skills/[id]/certify/route.ts +54 -0
- package/app/api/marketplace/skills/[id]/install/route.ts +180 -0
- package/app/api/marketplace/skills/[id]/promote-to-system/route.ts +219 -0
- package/app/api/marketplace/skills/[id]/rate/route.ts +90 -0
- package/app/api/marketplace/skills/[id]/ratings/route.ts +55 -0
- package/app/api/marketplace/skills/[id]/reject/route.ts +68 -0
- package/app/api/marketplace/skills/[id]/route.ts +177 -0
- package/app/api/marketplace/skills/route.ts +235 -0
- package/app/api/memory/route.ts +40 -0
- package/app/api/my/files/[id]/route.ts +52 -0
- package/app/api/my/files/route.ts +230 -0
- package/app/api/my/knowledge/route.ts +36 -0
- package/app/api/pi-chat/route.ts +443 -0
- package/app/api/recommend/route.ts +38 -0
- package/app/api/scheduled-tasks/[id]/execute/route.ts +132 -0
- package/app/api/scheduled-tasks/[id]/route.ts +165 -0
- package/app/api/scheduled-tasks/[id]/toggle/route.ts +53 -0
- package/app/api/scheduled-tasks/route.ts +101 -0
- package/app/api/sessions/[id]/messages/route.ts +212 -0
- package/app/api/sessions/route.ts +101 -0
- package/app/api/share/file/[id]/route.ts +37 -0
- package/app/api/skills/[name]/execute/route.ts +121 -0
- package/app/api/skills/[name]/route.ts +167 -0
- package/app/api/skills/create/route.ts +65 -0
- package/app/api/skills/generate/route.ts +405 -0
- package/app/api/skills/installed/route.ts +151 -0
- package/app/api/skills/route.ts +174 -0
- package/app/api/skills/translate/route.ts +40 -0
- package/app/api/skills/user/[name]/route.ts +159 -0
- package/app/api/skills/user/route.ts +90 -0
- package/app/api/statistics/route.ts +94 -0
- package/app/api/task-executions/[id]/route.ts +34 -0
- package/app/api/task-executions/route.ts +29 -0
- package/app/api/tickets/[id]/approve/route.ts +129 -0
- package/app/api/tickets/[id]/execute/route.ts +201 -0
- package/app/api/tickets/[id]/route.ts +127 -0
- package/app/api/tickets/route.ts +103 -0
- package/app/api/user/skills/route.ts +175 -0
- package/app/api/users/route.ts +80 -0
- package/app/chat/page.tsx +5 -0
- package/app/globals.css +84 -0
- package/app/h5/layout.tsx +5 -0
- package/app/h5/mobile-approvals-page.tsx +167 -0
- package/app/h5/mobile-chat-page.tsx +951 -0
- package/app/h5/mobile-profile-page.tsx +147 -0
- package/app/h5/mobile-tickets-page.tsx +121 -0
- package/app/h5/page.tsx +23 -0
- package/app/h5/ticket-action-buttons.tsx +80 -0
- package/app/layout.tsx +26 -0
- package/app/login/page.tsx +318 -0
- package/app/market/knowledge/[id]/page.tsx +77 -0
- package/app/market/knowledge/page.tsx +358 -0
- package/app/market/layout.tsx +29 -0
- package/app/market/page.tsx +18 -0
- package/app/market/skills/page.tsx +397 -0
- package/app/my/files/page.tsx +511 -0
- package/app/my/knowledge/[id]/page.tsx +271 -0
- package/app/my/knowledge/new/page.tsx +234 -0
- package/app/my/knowledge/page.tsx +248 -0
- package/app/my/layout.tsx +32 -0
- package/app/my/memory/page.tsx +164 -0
- package/app/my/page.tsx +18 -0
- package/app/my/scheduled-tasks/[id]/edit/page.tsx +290 -0
- package/app/my/scheduled-tasks/[id]/executions/page.tsx +275 -0
- package/app/my/scheduled-tasks/[id]/page.tsx +284 -0
- package/app/my/scheduled-tasks/new/page.tsx +230 -0
- package/app/my/scheduled-tasks/page.tsx +27 -0
- package/app/my/skills/[name]/page.tsx +320 -0
- package/app/my/skills/new/page.tsx +394 -0
- package/app/my/skills/page.tsx +303 -0
- package/app/page.tsx +2288 -0
- package/app/share/[sessionId]/page.tsx +226 -0
- package/app/share/file/[id]/page.tsx +140 -0
- package/bin/README.md +63 -0
- package/bin/generate-api-system +300 -0
- package/bin/postinstall.js +95 -0
- package/bin/work-agent.js +173 -0
- package/components/ai-elements/agent.tsx +142 -0
- package/components/ai-elements/artifact.tsx +149 -0
- package/components/ai-elements/attachments.tsx +427 -0
- package/components/ai-elements/audio-player.tsx +232 -0
- package/components/ai-elements/canvas.tsx +26 -0
- package/components/ai-elements/chain-of-thought.tsx +223 -0
- package/components/ai-elements/checkpoint.tsx +72 -0
- package/components/ai-elements/code-block.tsx +555 -0
- package/components/ai-elements/commit.tsx +449 -0
- package/components/ai-elements/confirmation.tsx +173 -0
- package/components/ai-elements/connection.tsx +28 -0
- package/components/ai-elements/context.tsx +410 -0
- package/components/ai-elements/controls.tsx +19 -0
- package/components/ai-elements/conversation.tsx +167 -0
- package/components/ai-elements/edge.tsx +144 -0
- package/components/ai-elements/environment-variables.tsx +325 -0
- package/components/ai-elements/file-tree.tsx +298 -0
- package/components/ai-elements/image.tsx +25 -0
- package/components/ai-elements/inline-citation.tsx +294 -0
- package/components/ai-elements/jsx-preview.tsx +250 -0
- package/components/ai-elements/message.tsx +367 -0
- package/components/ai-elements/mic-selector.tsx +372 -0
- package/components/ai-elements/model-selector.tsx +214 -0
- package/components/ai-elements/node.tsx +72 -0
- package/components/ai-elements/open-in-chat.tsx +367 -0
- package/components/ai-elements/package-info.tsx +235 -0
- package/components/ai-elements/panel.tsx +16 -0
- package/components/ai-elements/persona.tsx +280 -0
- package/components/ai-elements/plan.tsx +144 -0
- package/components/ai-elements/prompt-input.tsx +1341 -0
- package/components/ai-elements/queue.tsx +275 -0
- package/components/ai-elements/reasoning.tsx +355 -0
- package/components/ai-elements/sandbox.tsx +133 -0
- package/components/ai-elements/schema-display.tsx +473 -0
- package/components/ai-elements/shimmer.tsx +78 -0
- package/components/ai-elements/snippet.tsx +141 -0
- package/components/ai-elements/sources.tsx +78 -0
- package/components/ai-elements/speech-input.tsx +324 -0
- package/components/ai-elements/stack-trace.tsx +531 -0
- package/components/ai-elements/suggestion.tsx +58 -0
- package/components/ai-elements/task.tsx +88 -0
- package/components/ai-elements/terminal.tsx +277 -0
- package/components/ai-elements/test-results.tsx +497 -0
- package/components/ai-elements/tool.tsx +174 -0
- package/components/ai-elements/toolbar.tsx +17 -0
- package/components/ai-elements/transcription.tsx +126 -0
- package/components/ai-elements/voice-selector.tsx +525 -0
- package/components/ai-elements/web-preview.tsx +282 -0
- package/components/audit-log-list.tsx +114 -0
- package/components/chat/EmptyPreviewState.tsx +12 -0
- package/components/chat/KnowledgePickerDialog.tsx +464 -0
- package/components/chat/KnowledgePreview.tsx +70 -0
- package/components/chat/KnowledgePreviewPanel.tsx +86 -0
- package/components/chat/MentionInput.tsx +309 -0
- package/components/chat/OrganizeDialog.tsx +258 -0
- package/components/chat/RecommendationBanner.tsx +94 -0
- package/components/chat/SaveToKnowledgeDialog.tsx +193 -0
- package/components/chat/SkillSelector.tsx +305 -0
- package/components/chat/SkillSwitcher.tsx +163 -0
- package/components/client-layout.tsx +15 -0
- package/components/knowledge/KnowledgeMetadataPanel.tsx +293 -0
- package/components/layout-wrapper.tsx +18 -0
- package/components/mobile-layout.tsx +62 -0
- package/components/scheduled-task-list.tsx +356 -0
- package/components/setup-guide.tsx +484 -0
- package/components/sub-nav.tsx +54 -0
- package/components/ticket-detail-content.tsx +383 -0
- package/components/ticket-list.tsx +366 -0
- package/components/top-nav.tsx +132 -0
- package/components/ui/accordion.tsx +58 -0
- package/components/ui/alert.tsx +59 -0
- package/components/ui/avatar.tsx +50 -0
- package/components/ui/badge.tsx +36 -0
- package/components/ui/button-group.tsx +83 -0
- package/components/ui/button.tsx +57 -0
- package/components/ui/card.tsx +91 -0
- package/components/ui/carousel.tsx +262 -0
- package/components/ui/collapsible.tsx +11 -0
- package/components/ui/command.tsx +153 -0
- package/components/ui/dialog.tsx +122 -0
- package/components/ui/dropdown-menu.tsx +200 -0
- package/components/ui/hover-card.tsx +29 -0
- package/components/ui/input-group.tsx +170 -0
- package/components/ui/input.tsx +22 -0
- package/components/ui/label.tsx +26 -0
- package/components/ui/popover.tsx +31 -0
- package/components/ui/progress.tsx +28 -0
- package/components/ui/scroll-area.tsx +48 -0
- package/components/ui/select.tsx +174 -0
- package/components/ui/separator.tsx +31 -0
- package/components/ui/spinner.tsx +16 -0
- package/components/ui/switch.tsx +29 -0
- package/components/ui/table.tsx +120 -0
- package/components/ui/tabs.tsx +55 -0
- package/components/ui/textarea.tsx +22 -0
- package/components/ui/tooltip.tsx +30 -0
- package/components/welcome-guide.tsx +182 -0
- package/components.json +24 -0
- package/lib/command-parser.ts +331 -0
- package/lib/dangerous-commands.ts +672 -0
- package/lib/db.ts +2250 -0
- package/lib/feishu-auth.ts +135 -0
- package/lib/file-storage.ts +306 -0
- package/lib/file-tool.ts +583 -0
- package/lib/knowledge-tool.ts +152 -0
- package/lib/knowledge-types.ts +66 -0
- package/lib/market-client.ts +313 -0
- package/lib/market-db.ts +736 -0
- package/lib/market-types.ts +51 -0
- package/lib/memory-tool.ts +211 -0
- package/lib/memory.ts +197 -0
- package/lib/pi-config.ts +436 -0
- package/lib/pi-session.ts +799 -0
- package/lib/pinyin.ts +13 -0
- package/lib/recommendation.ts +227 -0
- package/lib/risk-estimator.ts +350 -0
- package/lib/scheduled-task-tool.ts +184 -0
- package/lib/scheduler-init.ts +43 -0
- package/lib/scheduler.ts +416 -0
- package/lib/secure-bash-tool.ts +413 -0
- package/lib/skill-engine.ts +396 -0
- package/lib/skill-generator.ts +269 -0
- package/lib/skill-loader.ts +234 -0
- package/lib/skill-tool.ts +188 -0
- package/lib/skill-types.ts +82 -0
- package/lib/skills-init.ts +58 -0
- package/lib/ticket-tool.ts +246 -0
- package/lib/user-skill-types.ts +30 -0
- package/lib/user-skills.ts +362 -0
- package/lib/utils.ts +6 -0
- package/lib/workflow.ts +154 -0
- package/lib/zip-tool.ts +191 -0
- package/next.config.js +8 -0
- package/package.json +106 -0
- package/public/.gitkeep +1 -0
- package/public/icon.svg +1 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
5
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react"
|
|
6
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
7
|
+
|
|
8
|
+
import { cn } from "@/lib/utils"
|
|
9
|
+
|
|
10
|
+
const Select = SelectPrimitive.Root
|
|
11
|
+
|
|
12
|
+
const SelectGroup = SelectPrimitive.Group
|
|
13
|
+
|
|
14
|
+
const SelectValue = SelectPrimitive.Value
|
|
15
|
+
|
|
16
|
+
const selectTriggerVariants = cva(
|
|
17
|
+
"flex w-full items-center justify-between rounded-md border border-input bg-background text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
size: {
|
|
21
|
+
default: "h-10 px-3 py-2",
|
|
22
|
+
sm: "h-9 px-3 py-1",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
size: "default",
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const SelectTrigger = React.forwardRef<
|
|
32
|
+
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
33
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> &
|
|
34
|
+
VariantProps<typeof selectTriggerVariants>
|
|
35
|
+
>(({ className, children, size, ...props }, ref) => (
|
|
36
|
+
<SelectPrimitive.Trigger
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn(selectTriggerVariants({ size }), className)}
|
|
39
|
+
{...props}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
<SelectPrimitive.Icon asChild>
|
|
43
|
+
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
44
|
+
</SelectPrimitive.Icon>
|
|
45
|
+
</SelectPrimitive.Trigger>
|
|
46
|
+
))
|
|
47
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
|
48
|
+
|
|
49
|
+
const SelectScrollUpButton = React.forwardRef<
|
|
50
|
+
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
51
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
52
|
+
>(({ className, ...props }, ref) => (
|
|
53
|
+
<SelectPrimitive.ScrollUpButton
|
|
54
|
+
ref={ref}
|
|
55
|
+
className={cn(
|
|
56
|
+
"flex cursor-default items-center justify-center py-1",
|
|
57
|
+
className
|
|
58
|
+
)}
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
<ChevronUp className="h-4 w-4" />
|
|
62
|
+
</SelectPrimitive.ScrollUpButton>
|
|
63
|
+
))
|
|
64
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName
|
|
65
|
+
|
|
66
|
+
const SelectScrollDownButton = React.forwardRef<
|
|
67
|
+
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
68
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
69
|
+
>(({ className, ...props }, ref) => (
|
|
70
|
+
<SelectPrimitive.ScrollDownButton
|
|
71
|
+
ref={ref}
|
|
72
|
+
className={cn(
|
|
73
|
+
"flex cursor-default items-center justify-center py-1",
|
|
74
|
+
className
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
<ChevronDown className="h-4 w-4" />
|
|
79
|
+
</SelectPrimitive.ScrollDownButton>
|
|
80
|
+
))
|
|
81
|
+
SelectScrollDownButton.displayName =
|
|
82
|
+
SelectPrimitive.ScrollDownButton.displayName
|
|
83
|
+
|
|
84
|
+
const SelectContent = React.forwardRef<
|
|
85
|
+
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
86
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
87
|
+
>(({ className, children, position = "popper", ...props }, ref) => (
|
|
88
|
+
<SelectPrimitive.Portal>
|
|
89
|
+
<SelectPrimitive.Content
|
|
90
|
+
ref={ref}
|
|
91
|
+
className={cn(
|
|
92
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
|
|
93
|
+
position === "popper" &&
|
|
94
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
95
|
+
className
|
|
96
|
+
)}
|
|
97
|
+
position={position}
|
|
98
|
+
{...props}
|
|
99
|
+
>
|
|
100
|
+
<SelectScrollUpButton />
|
|
101
|
+
<SelectPrimitive.Viewport
|
|
102
|
+
className={cn(
|
|
103
|
+
"p-1",
|
|
104
|
+
position === "popper" &&
|
|
105
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
106
|
+
)}
|
|
107
|
+
>
|
|
108
|
+
{children}
|
|
109
|
+
</SelectPrimitive.Viewport>
|
|
110
|
+
<SelectScrollDownButton />
|
|
111
|
+
</SelectPrimitive.Content>
|
|
112
|
+
</SelectPrimitive.Portal>
|
|
113
|
+
))
|
|
114
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName
|
|
115
|
+
|
|
116
|
+
const SelectLabel = React.forwardRef<
|
|
117
|
+
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
118
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
119
|
+
>(({ className, ...props }, ref) => (
|
|
120
|
+
<SelectPrimitive.Label
|
|
121
|
+
ref={ref}
|
|
122
|
+
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
123
|
+
{...props}
|
|
124
|
+
/>
|
|
125
|
+
))
|
|
126
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName
|
|
127
|
+
|
|
128
|
+
const SelectItem = React.forwardRef<
|
|
129
|
+
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
130
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
|
|
131
|
+
>(({ className, children, ...props }, ref) => (
|
|
132
|
+
<SelectPrimitive.Item
|
|
133
|
+
ref={ref}
|
|
134
|
+
className={cn(
|
|
135
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
136
|
+
className
|
|
137
|
+
)}
|
|
138
|
+
{...props}
|
|
139
|
+
>
|
|
140
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
141
|
+
<SelectPrimitive.ItemIndicator>
|
|
142
|
+
<Check className="h-4 w-4" />
|
|
143
|
+
</SelectPrimitive.ItemIndicator>
|
|
144
|
+
</span>
|
|
145
|
+
|
|
146
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
147
|
+
</SelectPrimitive.Item>
|
|
148
|
+
))
|
|
149
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName
|
|
150
|
+
|
|
151
|
+
const SelectSeparator = React.forwardRef<
|
|
152
|
+
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
153
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
154
|
+
>(({ className, ...props }, ref) => (
|
|
155
|
+
<SelectPrimitive.Separator
|
|
156
|
+
ref={ref}
|
|
157
|
+
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
158
|
+
{...props}
|
|
159
|
+
/>
|
|
160
|
+
))
|
|
161
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName
|
|
162
|
+
|
|
163
|
+
export {
|
|
164
|
+
Select,
|
|
165
|
+
SelectGroup,
|
|
166
|
+
SelectValue,
|
|
167
|
+
SelectTrigger,
|
|
168
|
+
SelectContent,
|
|
169
|
+
SelectLabel,
|
|
170
|
+
SelectItem,
|
|
171
|
+
SelectSeparator,
|
|
172
|
+
SelectScrollUpButton,
|
|
173
|
+
SelectScrollDownButton,
|
|
174
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const Separator = React.forwardRef<
|
|
9
|
+
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
11
|
+
>(
|
|
12
|
+
(
|
|
13
|
+
{ className, orientation = "horizontal", decorative = true, ...props },
|
|
14
|
+
ref
|
|
15
|
+
) => (
|
|
16
|
+
<SeparatorPrimitive.Root
|
|
17
|
+
ref={ref}
|
|
18
|
+
decorative={decorative}
|
|
19
|
+
orientation={orientation}
|
|
20
|
+
className={cn(
|
|
21
|
+
"shrink-0 bg-border",
|
|
22
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName
|
|
30
|
+
|
|
31
|
+
export { Separator }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Loader2Icon } from "lucide-react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
|
|
6
|
+
return (
|
|
7
|
+
<Loader2Icon
|
|
8
|
+
role="status"
|
|
9
|
+
aria-label="Loading"
|
|
10
|
+
className={cn("size-4 animate-spin", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Spinner }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const Switch = React.forwardRef<
|
|
9
|
+
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
11
|
+
>(({ className, ...props }, ref) => (
|
|
12
|
+
<SwitchPrimitives.Root
|
|
13
|
+
className={cn(
|
|
14
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
ref={ref}
|
|
19
|
+
>
|
|
20
|
+
<SwitchPrimitives.Thumb
|
|
21
|
+
className={cn(
|
|
22
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
23
|
+
)}
|
|
24
|
+
/>
|
|
25
|
+
</SwitchPrimitives.Root>
|
|
26
|
+
))
|
|
27
|
+
Switch.displayName = SwitchPrimitives.Root.displayName
|
|
28
|
+
|
|
29
|
+
export { Switch }
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Table = React.forwardRef<
|
|
6
|
+
HTMLTableElement,
|
|
7
|
+
React.HTMLAttributes<HTMLTableElement>
|
|
8
|
+
>(({ className, ...props }, ref) => (
|
|
9
|
+
<div className="relative w-full overflow-auto">
|
|
10
|
+
<table
|
|
11
|
+
ref={ref}
|
|
12
|
+
className={cn('w-full caption-bottom text-sm', className)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
));
|
|
17
|
+
Table.displayName = 'Table';
|
|
18
|
+
|
|
19
|
+
const TableHeader = React.forwardRef<
|
|
20
|
+
HTMLTableSectionElement,
|
|
21
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
22
|
+
>(({ className, ...props }, ref) => (
|
|
23
|
+
<thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
|
|
24
|
+
));
|
|
25
|
+
TableHeader.displayName = 'TableHeader';
|
|
26
|
+
|
|
27
|
+
const TableBody = React.forwardRef<
|
|
28
|
+
HTMLTableSectionElement,
|
|
29
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
30
|
+
>(({ className, ...props }, ref) => (
|
|
31
|
+
<tbody
|
|
32
|
+
ref={ref}
|
|
33
|
+
className={cn('[&_tr:last-child]:border-0', className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
));
|
|
37
|
+
TableBody.displayName = 'TableBody';
|
|
38
|
+
|
|
39
|
+
const TableFooter = React.forwardRef<
|
|
40
|
+
HTMLTableSectionElement,
|
|
41
|
+
React.HTMLAttributes<HTMLTableSectionElement>
|
|
42
|
+
>(({ className, ...props }, ref) => (
|
|
43
|
+
<tfoot
|
|
44
|
+
ref={ref}
|
|
45
|
+
className={cn(
|
|
46
|
+
'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',
|
|
47
|
+
className
|
|
48
|
+
)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
));
|
|
52
|
+
TableFooter.displayName = 'TableFooter';
|
|
53
|
+
|
|
54
|
+
const TableRow = React.forwardRef<
|
|
55
|
+
HTMLTableRowElement,
|
|
56
|
+
React.HTMLAttributes<HTMLTableRowElement>
|
|
57
|
+
>(({ className, ...props }, ref) => (
|
|
58
|
+
<tr
|
|
59
|
+
ref={ref}
|
|
60
|
+
className={cn(
|
|
61
|
+
'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',
|
|
62
|
+
className
|
|
63
|
+
)}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
));
|
|
67
|
+
TableRow.displayName = 'TableRow';
|
|
68
|
+
|
|
69
|
+
const TableHead = React.forwardRef<
|
|
70
|
+
HTMLTableCellElement,
|
|
71
|
+
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
72
|
+
>(({ className, ...props }, ref) => (
|
|
73
|
+
<th
|
|
74
|
+
ref={ref}
|
|
75
|
+
className={cn(
|
|
76
|
+
'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
|
|
77
|
+
className
|
|
78
|
+
)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
));
|
|
82
|
+
TableHead.displayName = 'TableHead';
|
|
83
|
+
|
|
84
|
+
const TableCell = React.forwardRef<
|
|
85
|
+
HTMLTableCellElement,
|
|
86
|
+
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
87
|
+
>(({ className, ...props }, ref) => (
|
|
88
|
+
<td
|
|
89
|
+
ref={ref}
|
|
90
|
+
className={cn(
|
|
91
|
+
'p-4 align-middle [&:has([role=checkbox])]:pr-0',
|
|
92
|
+
className
|
|
93
|
+
)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
));
|
|
97
|
+
TableCell.displayName = 'TableCell';
|
|
98
|
+
|
|
99
|
+
const TableCaption = React.forwardRef<
|
|
100
|
+
HTMLTableCaptionElement,
|
|
101
|
+
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
102
|
+
>(({ className, ...props }, ref) => (
|
|
103
|
+
<caption
|
|
104
|
+
ref={ref}
|
|
105
|
+
className={cn('mt-4 text-sm text-muted-foreground', className)}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
));
|
|
109
|
+
TableCaption.displayName = 'TableCaption';
|
|
110
|
+
|
|
111
|
+
export {
|
|
112
|
+
Table,
|
|
113
|
+
TableHeader,
|
|
114
|
+
TableBody,
|
|
115
|
+
TableFooter,
|
|
116
|
+
TableHead,
|
|
117
|
+
TableRow,
|
|
118
|
+
TableCell,
|
|
119
|
+
TableCaption,
|
|
120
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const Tabs = TabsPrimitive.Root
|
|
9
|
+
|
|
10
|
+
const TabsList = React.forwardRef<
|
|
11
|
+
React.ElementRef<typeof TabsPrimitive.List>,
|
|
12
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
13
|
+
>(({ className, ...props }, ref) => (
|
|
14
|
+
<TabsPrimitive.List
|
|
15
|
+
ref={ref}
|
|
16
|
+
className={cn(
|
|
17
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
))
|
|
23
|
+
TabsList.displayName = TabsPrimitive.List.displayName
|
|
24
|
+
|
|
25
|
+
const TabsTrigger = React.forwardRef<
|
|
26
|
+
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
27
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
28
|
+
>(({ className, ...props }, ref) => (
|
|
29
|
+
<TabsPrimitive.Trigger
|
|
30
|
+
ref={ref}
|
|
31
|
+
className={cn(
|
|
32
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
33
|
+
className
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
))
|
|
38
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
|
39
|
+
|
|
40
|
+
const TabsContent = React.forwardRef<
|
|
41
|
+
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
42
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
43
|
+
>(({ className, ...props }, ref) => (
|
|
44
|
+
<TabsPrimitive.Content
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
))
|
|
53
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName
|
|
54
|
+
|
|
55
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const Textarea = React.forwardRef<
|
|
6
|
+
HTMLTextAreaElement,
|
|
7
|
+
React.ComponentProps<"textarea">
|
|
8
|
+
>(({ className, ...props }, ref) => {
|
|
9
|
+
return (
|
|
10
|
+
<textarea
|
|
11
|
+
className={cn(
|
|
12
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
ref={ref}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
})
|
|
20
|
+
Textarea.displayName = "Textarea"
|
|
21
|
+
|
|
22
|
+
export { Textarea }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const TooltipProvider = TooltipPrimitive.Provider
|
|
9
|
+
|
|
10
|
+
const Tooltip = TooltipPrimitive.Root
|
|
11
|
+
|
|
12
|
+
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
13
|
+
|
|
14
|
+
const TooltipContent = React.forwardRef<
|
|
15
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
+
<TooltipPrimitive.Content
|
|
19
|
+
ref={ref}
|
|
20
|
+
sideOffset={sideOffset}
|
|
21
|
+
className={cn(
|
|
22
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
))
|
|
28
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
29
|
+
|
|
30
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { Button } from '@/components/ui/button';
|
|
6
|
+
import { Card, CardContent } from '@/components/ui/card';
|
|
7
|
+
import { Bot, ArrowRight, Search, Clock, FileText, Users, Zap, Upload, Download, RefreshCw, X } from 'lucide-react';
|
|
8
|
+
|
|
9
|
+
export function WelcomeGuide() {
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
|
|
12
|
+
const goToLogin = () => {
|
|
13
|
+
router.push('/login');
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const renderContent = () => (
|
|
17
|
+
<div className="py-6 space-y-10">
|
|
18
|
+
{/* 标题区 */}
|
|
19
|
+
<div className="text-center">
|
|
20
|
+
<div className="mx-auto mb-4 w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-600 rounded-2xl flex items-center justify-center">
|
|
21
|
+
<Bot className="w-8 h-8 text-white" />
|
|
22
|
+
</div>
|
|
23
|
+
<h1 className="text-3xl sm:text-4xl font-bold text-gray-900 mb-3">
|
|
24
|
+
智能工作助手
|
|
25
|
+
</h1>
|
|
26
|
+
<p className="text-lg text-blue-600 font-medium">
|
|
27
|
+
用 AI 帮您工作,让知识流动起来
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
{/* 对比区 */}
|
|
32
|
+
<div className="grid md:grid-cols-2 gap-6">
|
|
33
|
+
{/* 传统方式 - 痛点 */}
|
|
34
|
+
<Card className="border-2 border-red-100 bg-red-50/50">
|
|
35
|
+
<CardContent className="p-6">
|
|
36
|
+
<h3 className="text-lg font-semibold text-red-600 mb-4 flex items-center gap-2">
|
|
37
|
+
<X className="w-5 h-5" />
|
|
38
|
+
过去:传统方式
|
|
39
|
+
</h3>
|
|
40
|
+
<ul className="space-y-4">
|
|
41
|
+
<li className="flex items-start gap-3">
|
|
42
|
+
<div className="w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center flex-shrink-0">
|
|
43
|
+
<Search className="w-4 h-4 text-gray-600" />
|
|
44
|
+
</div>
|
|
45
|
+
<div>
|
|
46
|
+
<p className="font-medium text-gray-700">百度/Google 搜索</p>
|
|
47
|
+
<p className="text-sm text-gray-500">筛选答案,尝试各种方案</p>
|
|
48
|
+
</div>
|
|
49
|
+
</li>
|
|
50
|
+
<li className="flex items-start gap-3">
|
|
51
|
+
<div className="w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center flex-shrink-0">
|
|
52
|
+
<Clock className="w-4 h-4 text-gray-600" />
|
|
53
|
+
</div>
|
|
54
|
+
<div>
|
|
55
|
+
<p className="font-medium text-gray-700">记在本地笔记</p>
|
|
56
|
+
<p className="text-sm text-gray-500">下次遇到还得重头搜索</p>
|
|
57
|
+
</div>
|
|
58
|
+
</li>
|
|
59
|
+
<li className="flex items-start gap-3">
|
|
60
|
+
<div className="w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center flex-shrink-0">
|
|
61
|
+
<Users className="w-4 h-4 text-gray-600" />
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<p className="font-medium text-gray-700">经验无法共享</p>
|
|
65
|
+
<p className="text-sm text-gray-500">团队成员各自重复摸索</p>
|
|
66
|
+
</div>
|
|
67
|
+
</li>
|
|
68
|
+
</ul>
|
|
69
|
+
</CardContent>
|
|
70
|
+
</Card>
|
|
71
|
+
|
|
72
|
+
{/* 智能助手 - 爽点 */}
|
|
73
|
+
<Card className="border-2 border-green-100 bg-green-50/50">
|
|
74
|
+
<CardContent className="p-6">
|
|
75
|
+
<h3 className="text-lg font-semibold text-green-600 mb-4 flex items-center gap-2">
|
|
76
|
+
<Zap className="w-5 h-5" />
|
|
77
|
+
现在:智能助手
|
|
78
|
+
</h3>
|
|
79
|
+
<ul className="space-y-4">
|
|
80
|
+
<li className="flex items-start gap-3">
|
|
81
|
+
<div className="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center flex-shrink-0">
|
|
82
|
+
<Bot className="w-4 h-4 text-white" />
|
|
83
|
+
</div>
|
|
84
|
+
<div>
|
|
85
|
+
<p className="font-medium text-gray-700">告诉 AI 需求</p>
|
|
86
|
+
<p className="text-sm text-gray-500">自动分析并执行,返回结果</p>
|
|
87
|
+
</div>
|
|
88
|
+
</li>
|
|
89
|
+
<li className="flex items-start gap-3">
|
|
90
|
+
<div className="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center flex-shrink-0">
|
|
91
|
+
<FileText className="w-4 h-4 text-white" />
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
<p className="font-medium text-gray-700">一键保存知识</p>
|
|
95
|
+
<p className="text-sm text-gray-500">上传到市场,团队共享</p>
|
|
96
|
+
</div>
|
|
97
|
+
</li>
|
|
98
|
+
<li className="flex items-start gap-3">
|
|
99
|
+
<div className="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center flex-shrink-0">
|
|
100
|
+
<Download className="w-4 h-4 text-white" />
|
|
101
|
+
</div>
|
|
102
|
+
<div>
|
|
103
|
+
<p className="font-medium text-gray-700">下载复用经验</p>
|
|
104
|
+
<p className="text-sm text-gray-500">站在团队肩膀上解决问题</p>
|
|
105
|
+
</div>
|
|
106
|
+
</li>
|
|
107
|
+
</ul>
|
|
108
|
+
</CardContent>
|
|
109
|
+
</Card>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
{/* 流程图 */}
|
|
113
|
+
<div className="bg-gradient-to-r from-blue-50 via-purple-50 to-orange-50 rounded-xl p-6">
|
|
114
|
+
<h3 className="text-lg font-semibold text-center text-gray-800 mb-6">
|
|
115
|
+
知识沉淀与复用
|
|
116
|
+
</h3>
|
|
117
|
+
<div className="flex flex-wrap items-center justify-center gap-2 sm:gap-4">
|
|
118
|
+
<div className="flex items-center gap-2 bg-white px-4 py-3 rounded-lg shadow-sm">
|
|
119
|
+
<div className="w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center">
|
|
120
|
+
<Bot className="w-5 h-5 text-white" />
|
|
121
|
+
</div>
|
|
122
|
+
<span className="text-sm font-medium text-gray-700">解决问题</span>
|
|
123
|
+
</div>
|
|
124
|
+
<ArrowRight className="w-5 h-5 text-gray-400" />
|
|
125
|
+
<div className="flex items-center gap-2 bg-white px-4 py-3 rounded-lg shadow-sm">
|
|
126
|
+
<Upload className="w-5 h-5 text-purple-600" />
|
|
127
|
+
<span className="text-sm font-medium text-gray-700">上传市场</span>
|
|
128
|
+
</div>
|
|
129
|
+
<ArrowRight className="w-5 h-5 text-gray-400" />
|
|
130
|
+
<div className="flex items-center gap-2 bg-white px-4 py-3 rounded-lg shadow-sm">
|
|
131
|
+
<Download className="w-5 h-5 text-green-600" />
|
|
132
|
+
<span className="text-sm font-medium text-gray-700">下载复用</span>
|
|
133
|
+
</div>
|
|
134
|
+
<RefreshCw className="w-5 h-5 text-orange-500" />
|
|
135
|
+
</div>
|
|
136
|
+
<p className="text-center text-sm text-gray-500 mt-4">
|
|
137
|
+
将会话经验转化为知识,分享到市场供团队成员下载使用
|
|
138
|
+
</p>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<div className="fixed inset-0 z-50 bg-gradient-to-br from-slate-50 to-slate-100 overflow-auto">
|
|
145
|
+
{/* 顶部导航 */}
|
|
146
|
+
<header className="bg-white border-b h-14 flex items-center justify-between px-6 sticky top-0">
|
|
147
|
+
<div className="flex items-center gap-2">
|
|
148
|
+
<div className="w-8 h-8 rounded-md bg-blue-600 flex items-center justify-center">
|
|
149
|
+
<Bot className="h-5 w-5 text-white" />
|
|
150
|
+
</div>
|
|
151
|
+
<span className="font-semibold text-gray-900">智能工作助手</span>
|
|
152
|
+
</div>
|
|
153
|
+
<div className="flex items-center gap-3">
|
|
154
|
+
<Button variant="ghost" size="sm" onClick={goToLogin}>
|
|
155
|
+
登录
|
|
156
|
+
</Button>
|
|
157
|
+
</div>
|
|
158
|
+
</header>
|
|
159
|
+
|
|
160
|
+
{/* 主内容区 */}
|
|
161
|
+
<div className="max-w-4xl mx-auto pt-8 pb-12 px-4 sm:px-6">
|
|
162
|
+
<Card className="min-h-[500px]">
|
|
163
|
+
<CardContent className="p-6 sm:p-8">
|
|
164
|
+
{renderContent()}
|
|
165
|
+
</CardContent>
|
|
166
|
+
</Card>
|
|
167
|
+
|
|
168
|
+
{/* 行动按钮 */}
|
|
169
|
+
<div className="flex justify-center mt-8">
|
|
170
|
+
<Button
|
|
171
|
+
onClick={goToLogin}
|
|
172
|
+
size="lg"
|
|
173
|
+
className="text-lg px-8 py-6 bg-gradient-to-r from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700"
|
|
174
|
+
>
|
|
175
|
+
立即体验
|
|
176
|
+
<ArrowRight className="ml-2 h-5 w-5" />
|
|
177
|
+
</Button>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
);
|
|
182
|
+
}
|