diff --git a/apps/demo/src/App.tsx b/apps/demo/src/App.tsx index 09a25f04..41368c03 100644 --- a/apps/demo/src/App.tsx +++ b/apps/demo/src/App.tsx @@ -1,11 +1,5 @@ -import { useLocation } from "react-router-dom"; - -import { DesignSystemShell } from "./app/design-system-shell"; import { FullScreenApp } from "./app/full-screen-app"; -import { isFullScreenPath } from "./app/route-matches"; export default function App() { - const location = useLocation(); - - return isFullScreenPath(location.pathname) ? : ; + return ; } diff --git a/apps/demo/src/app/design-system-shell.tsx b/apps/demo/src/app/design-system-shell.tsx deleted file mode 100644 index fcf50f01..00000000 --- a/apps/demo/src/app/design-system-shell.tsx +++ /dev/null @@ -1,193 +0,0 @@ -import { - GitHubIcon, - NavigationMenu, - NavigationMenuButton, - NavigationMenuItem, - NavigationMenuLabel, - NavigationMenuList, - NexuLogoIcon, - Sidebar, - SidebarContent, - SidebarFooter, - SidebarHeader, -} from "@nexu-design/ui-web"; -import { - ChevronUp, - CircleHelp, - Clock, - Globe, - Monitor, - PanelLeft, - PanelLeftClose, - Play, - Route as RouteIcon, - Sparkles, - Users, - Wrench, -} from "lucide-react"; -import { useState } from "react"; -import { NavLink, Navigate, Route, Routes, useLocation } from "react-router-dom"; - -import { CommentSystem } from "../components/CommentSystem"; -import { ProductRouteElements } from "./routes/product-routes"; - -const PRODUCT_NAV = [ - { to: "/demo", label: "Product Demo", icon: Play }, - { to: "/journey", label: "User Journey", icon: RouteIcon }, - { to: "/app/sessions", label: "Sessions", icon: Monitor }, - { to: "/app/team", label: "团队协作", icon: Users }, - { to: "/app/clone", label: "分身搭建", icon: Wrench }, - { to: "/app/automation", label: "Automation", icon: Clock }, - { to: "/app/skills", label: "Skills", icon: Sparkles }, -]; - -function NavSection({ - title, - items, - collapsed, -}: { - title: string; - items: typeof PRODUCT_NAV; - collapsed: boolean; -}) { - const location = useLocation(); - - const isSelected = (to: string) => - location.pathname === to || location.pathname.startsWith(`${to}/`); - - return ( - - {!collapsed && {title}} - - {items.map(({ to, label, icon: Icon }) => ( - - - - - {!collapsed && label} - - - - ))} - - - ); -} - -export function DesignSystemShell() { - const [collapsed, setCollapsed] = useState(false); - - return ( - <> -
- - {collapsed ? ( - - - - ) : ( - - -
-
Nexu
-
Product Demo
-
- -
- )} - - -
- -
-
- - {!collapsed && ( -
-
- - - - -
- -
- )} - - - {collapsed ? ( - - ) : ( - - )} - -
- -
- - {ProductRouteElements()} - } /> - } /> - -
-
- - - ); -} diff --git a/apps/demo/src/app/route-matches.ts b/apps/demo/src/app/route-matches.ts deleted file mode 100644 index f4d65b58..00000000 --- a/apps/demo/src/app/route-matches.ts +++ /dev/null @@ -1,24 +0,0 @@ -const fullScreenExactPaths = new Set([ - "/openclaw/workspace", - "/openclaw/welcome", - "/openclaw/invite", - "/openclaw/onboarding", - "/openclaw/whatsapp-qr", - "/openclaw/privacy", - "/openclaw/terms", - "/openclaw/channels", - "/openclaw/pricing", - "/openclaw/usage", - "/openclaw/rewards", - "/openclaw/changelog", -]); - -export function isFullScreenPath(pathname: string) { - return ( - fullScreenExactPaths.has(pathname) || - pathname.startsWith("/openclaw/auth") || - pathname.startsWith("/openclaw/changelog/") || - pathname.startsWith("/openclaw/skill/") || - pathname.startsWith("/openclaw/growth-demo") - ); -} diff --git a/apps/demo/src/app/routes/product-routes.tsx b/apps/demo/src/app/routes/product-routes.tsx deleted file mode 100644 index ed2d3fd6..00000000 --- a/apps/demo/src/app/routes/product-routes.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { Navigate, Route } from "react-router-dom"; - -import JourneyPage from "../../pages/journey/JourneyPage"; -import AutomationPage from "../../pages/product/AutomationPage"; -import CloneBuilderPage from "../../pages/product/CloneBuilderPage"; -import ProductDemoPage from "../../pages/product/ProductDemoPage"; -import ProductLayout from "../../pages/product/ProductLayout"; -import SessionsPage from "../../pages/product/SessionsPage"; -import SkillsPage from "../../pages/product/SkillsPage"; -import TeamPage from "../../pages/product/TeamPage"; - -export function ProductRouteElements() { - return ( - <> - } /> - } /> - } /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - ); -} diff --git a/apps/demo/src/pages/LandingParts.tsx b/apps/demo/src/pages/LandingParts.tsx deleted file mode 100644 index e6b26607..00000000 --- a/apps/demo/src/pages/LandingParts.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import { - Collapsible, - CollapsibleContent, - CollapsibleTrigger, - ConversationMessage, -} from "@nexu-design/ui-web"; -import { CheckCircle2, ChevronDown, type LucideIcon } from "lucide-react"; -import { type ReactNode, useState } from "react"; - -export function ChatMsg({ - from, - name, - children, -}: { - from: "clone" | "user" | "other"; - name?: string; - children: ReactNode; -}) { - if (from === "user") { - return ( -
- - {children} - -
- ); - } - return ( -
- - {from === "clone" ? "😊" : (name?.[0] ?? "?")} -
- } - bubbleClassName="bg-surface-2 px-3 py-2 text-[13px]" - meta={name && from === "other" ? name : undefined} - > - {children} - - - ); -} - -export function ChatWindow({ - title, - badge, - children, -}: { - title: string; - badge?: string; - children: ReactNode; -}) { - return ( -
-
-
- 😊 -
- {title} - {badge && ( - - {badge} - - )} -
-
-
{children}
-
- ); -} - -export function ChatDivider({ text }: { text: string }) { - return
—— {text} ——
; -} - -export function ScenarioSection({ - tag, - tagIcon: Icon, - title, - desc, - features, - chatContent, - reverse, -}: { - tag: string; - tagIcon: LucideIcon; - title: string; - desc: string; - features: string[]; - chatContent: ReactNode; - reverse?: boolean; -}) { - const textBlock = ( -
-
- {tag} -
-

{title}

-

{desc}

-
- {features.map((f) => ( -
- {f} -
- ))} -
-
- ); - - const first = reverse ? chatContent : textBlock; - const second = reverse ? textBlock : chatContent; - - return ( -
-
-
{first}
-
{second}
-
-
- ); -} - -export function SectionHeading({ - tag, - title, - desc, -}: { - tag?: string; - title: string; - desc?: string; -}) { - return ( -
- {tag && ( -
- {tag} -
- )} -

{title}

- {desc && ( -

{desc}

- )} -
- ); -} - -export function FAQItem({ q, a }: { q: string; a: string }) { - const [open, setOpen] = useState(false); - return ( - - - {q} - - - - {a} - - - ); -} diff --git a/apps/demo/src/pages/LandingPreview.tsx b/apps/demo/src/pages/LandingPreview.tsx deleted file mode 100644 index 2e8258b3..00000000 --- a/apps/demo/src/pages/LandingPreview.tsx +++ /dev/null @@ -1,1105 +0,0 @@ -import { Button } from "@nexu-design/ui-web"; -import { - ArrowRight, - BarChart3, - Brain, - Check, - Crown, - GitPullRequest, - MessageSquare, - Rss, - Send, - Shield, - Sparkles, - Star, - Target, - UserPlus, - Users, - X, - Zap, -} from "lucide-react"; -import { - ChatDivider, - ChatMsg, - ChatWindow, - FAQItem, - ScenarioSection, - SectionHeading, -} from "./LandingParts"; -import ChatCardGroup from "./product/ChatCards"; -import type { ChatCard } from "./product/sessionsData"; - -const LANDING_CARDS: Record = { - scenario1a: [ - { - type: "skill", - title: "深度调研", - status: "success", - body: "✓ 检索 23 篇文章 + 5 个竞品官网\n✓ 生成竞品分析报告", - path: "skills/web-research/SKILL.md", - meta: "耗时 15s · 自动调用", - }, - ], - scenario1b: [ - { - type: "file", - title: "竞品分析报告", - status: "success", - body: "8,200 字 · 3 个关键发现\n记忆壁垒 · IM 入口 · 团队协作", - path: "artifacts/research/竞品分析.md", - diff: { added: 128, removed: 0 }, - actions: [{ label: "打开编辑", primary: true }], - }, - { - type: "memory", - title: "记住了 3 个关键结论", - status: "success", - body: "记忆壁垒是核心 · IM 优于独立 App · 团队协作驱动付费", - meta: "记忆 +3 · 自动归档", - }, - ], - scenario1c: [ - { - type: "file", - title: "产品方案 v1", - status: "success", - body: "基于竞品分析 + 你的 12 条历史偏好\n自动引用了之前的决策记录", - path: "artifacts/prds/产品方案.md", - diff: { added: 86, removed: 0 }, - actions: [{ label: "打开编辑", primary: true }, { label: "分享" }], - }, - ], - scenario2a: [ - { - type: "skill", - title: "竞品监控", - status: "success", - body: "✓ 能力已激活\n✓ 监控 Linear / Notion / Cursor", - path: "skills/competitor-watch/SKILL.md", - actions: [{ label: "查看配置" }], - }, - { - type: "automation", - title: "每日竞品扫描", - status: "success", - body: "⏰ cron: 每天 09:00\n有更新推送飞书 + 保存分析报告", - path: "automation/competitor-scan.yaml", - meta: "下次触发:明天 09:00", - actions: [{ label: "测试执行" }], - }, - ], - scenario2b: [ - { - type: "automation", - title: "每周 Sprint 回顾", - status: "success", - body: "⏰ cron: 每周五 18:00\n自动汇总本周产出 + 推送到群", - path: "automation/weekly-review.yaml", - meta: "2 个自动任务已上线", - actions: [{ label: "查看全部", primary: true }], - }, - ], - scenario3a: [ - { - type: "automation", - title: "📊 今日战况复盘", - status: "success", - body: "✅ 完成 12 个任务,写了 3 份文档\n🧠 新记住 5 件事,默契度 → 78%", - meta: "自动推送 · 每天 21:00", - }, - { - type: "skill", - title: "⚡ 竞品监控发现", - status: "warning", - body: "Notion 发布了 AI 新功能\n分析报告已准备好", - actions: [{ label: "查看分析", primary: true }], - }, - { - type: "memory", - title: "🔔 记忆冲突提醒", - status: "warning", - body: "发现 3 条记忆有矛盾,需要你来定夺", - actions: [{ label: "处理", primary: true }], - }, - ], - scenario3b: [ - { - type: "file", - title: "Notion AI 新功能分析", - status: "success", - body: "Notion 采用嵌入式 AI 方案\n对我们的启示:记忆 + 能力组合是差异化优势", - path: "artifacts/research/notion-ai-update.md", - diff: { added: 42, removed: 0 }, - actions: [{ label: "打开", primary: true }], - }, - ], - scenario4a: [ - { - type: "memory", - title: "已记住", - status: "success", - body: '"搜索结果页加相关推荐"\n归入产品想法 · 标签:搜索优化', - path: "memory/ideas/search-recommendations.md", - meta: "记忆 +1 · 默契度 +0.5%", - }, - ], - scenario4b: [ - { - type: "file", - title: "搜索优化方案", - status: "success", - body: "混合搜索 + 相关推荐\n参考了你过去 17 条相关记忆", - path: "artifacts/prds/search-optimization.md", - diff: { added: 64, removed: 0 }, - actions: [{ label: "打开编辑", primary: true }], - }, - { - type: "memory", - title: "默契度提升", - status: "success", - body: "记忆关联命中 · 默契度 +1% → 79%", - meta: "跨越 2 个月的记忆关联", - }, - ], -}; - -export default function LandingPreview() { - return ( -
- {/* ───── Nav ───── */} - - - {/* ───── Hero ───── */} -
-
-
-
-
-
-
- 😊 -
-
-
- Lv.3 -
-
-

- People quit. Clones don't. -
- - 为你的龙虾打造一间赛博办公室 — 世界首个人与分身共存的办公协作网络 - -

-

- 每个人有一个分身 — 记住你说过的每句话,帮你做事,和团队协作。 -
- 人走了,分身留下,知识永不流失。 -

-
- - -
-
- ✓ 免费开始 - ✓ 无需信用卡 - ✓ 邀请同事立减 50% -
-
-
- - {/* ───── Logo / Trust Bar ───── */} -
-
-
- 已有数万知识工作者在使用 -
-
- {["ByteBuilder", "NextStudio", "锐思科技", "CloudStack", "DataPulse", "创见设计"].map( - (name) => ( - - {name} - - ), - )} -
-
-
- - {/* ───── Pain → Solution ───── */} -
- -
- {[ - { - before: "每次用 AI 都要重新解释背景", - after: "分身记住你说过的一切,新人继承分身第一天就有前任的判断力", - }, - { - before: "AI 只能等你问,不会主动帮忙", - after: "分身主动推送日报、代问进度、自动站会 — 人与分身共存", - }, - { - before: "想做一件事要切换 5 个工具", - after: "一句话告诉分身,它调用技能帮你搞定 — 人做决策,分身做执行", - }, - { - before: "灵感和决策散落在各处", - after: "所有记忆、文档、资料都帮你整理好", - }, - { - before: "每个 AI 工具都是单点,无法串联", - after: "数千种能力自由组合,自动任务全天运转", - }, - { - before: "对话结束后什么也没留下", - after: "每次对话都帮你沉淀文档、记忆和知识", - }, - ].map((p) => ( -
-
-
- -
-
-
-
{p.before}
-
-
- -
- {p.after} -
-
-
- ))} -
-
- -
-
-
- - {/* ───── Your Clone's Workspace ───── */} -
- -
-
-
你的分身空间
- {[ - { - icon: "🧬", - name: "身份档案", - desc: "性格、角色、头像、声音…… 分身了解你是谁", - }, - { - icon: "👥", - name: "联系人", - desc: "你的同事、朋友、客户…… 分身记得每个人", - }, - { - icon: "🧠", - name: "记忆库", - desc: "223 条记忆 — 你说过的想法、决策、偏好全都记住", - }, - { - icon: "📁", - name: "文档和产出", - desc: "报告、方案、设计稿、表格…… 分身帮你整理归档", - }, - { - icon: "📚", - name: "知识库", - desc: "参考资料、竞品信息、行业报告…… 随时调用", - }, - { - icon: "💬", - name: "对话记录", - desc: "每次聊天的完整记录和上传的资料", - }, - { - icon: "⚡", - name: "自动任务", - desc: "定时日报、竞品监控、周报…… 分身自动执行", - }, - { - icon: "🔧", - name: "能力清单", - desc: "数千种能力 — 写报告、做分析、跑数据……", - }, - ].map((item) => ( -
- {item.icon} - {item.name} - — {item.desc} -
- ))} -
-
-
-
-
- 218 份资料 · 今天新增 6 份 -
- 支持任意内容:文档 · 表格 · 设计稿 · 图片 · 音视频 · PDF -
-
-
-
- -
-
-
- - {/* ───── Scenario 1: Just Tell It ───── */} - - 帮我做一份 AI 赛道的竞品分析 - 收到,让我帮你搞定 📂 -
- -
- 报告完成 ✅ 8,200 字,3 个关键发现 -
- -
- 不错,基于这个写一份产品方案 -
- -
- - } - /> - -
-
-
- - {/* ───── Scenario 2: Abilities & Auto Tasks ───── */} - - 帮我设一个竞品监控,每天自动跑 - 好的,帮你设置 ⚡ -
- -
- 再加一个每周五自动生成周报 -
- -
- - } - /> - -
-
-
- - {/* ───── Scenario 3: Daily Updates ───── */} - -
- -
- 展开竞品分析看看 -
- -
- - } - /> - -
-
-
- - {/* ───── Scenario 4: Memory & Growth ───── */} - - 对了,搜索结果页可以加个相关推荐 -
- -
- - - 主人,你 2 个月前提过"搜索加相关推荐"。这周刚好在做搜索优化,要不要一起做了? - - 我都忘了!好,帮我写个方案 -
- -
- - } - /> - -
-
-
- - {/* ───── Scenario 5: Team Collaboration & Virality ───── */} - - @分身 帮我问下李四 Gateway 进度 - - 已替你询问李四的分身 🤝 -
-
- - → 你的分身 → 李四的分身 → 自动获取进度 - -
-
- 李四反馈:Gateway 重构完成 65%,卡在第三方 SDK 适配,预计延迟 2 天。 -
-
- 已自动更新 Sprint 状态 ✅ -
- - 这个分身太方便了,我也想要一个! - - - ✨ 欢迎加入! -
- 王五,点击下方链接 3 分钟激活你的专属分身 👇 -
- refly.ai/invite/team-abc123 -
- - } - /> - -
-
-
- - {/* ───── Agent-Native Workspace ───── */} -
- - - {/* Invite Flow */} -
-
- {[ - { - step: "1", - icon: UserPlus, - title: "邀请同事", - desc: "发送链接或在群里 @分身邀请", - color: "text-info", - }, - { - step: "2", - icon: Sparkles, - title: "3 分钟激活", - desc: "同事在 IM 里完成 onboarding", - color: "text-clone", - }, - { - step: "3", - icon: GitPullRequest, - title: "分身互联", - desc: "分身之间自动建立协作通道", - color: "text-success", - }, - { - step: "4", - icon: Zap, - title: "效率飞轮", - desc: "团队越大,每个分身越强", - color: "text-warning", - }, - ].map((s, i) => ( -
- {i < 3 && ( -
- )} -
- -
-
{s.title}
-
{s.desc}
-
- ))} -
-
- - {/* Team capabilities grid */} -
- {[ - { - icon: Target, - title: "OKR + Sprint 联动", - desc: "团队目标自动拆解到每个人的分身,Sprint 进度实时汇总。不用开会就能掌握全局。", - badge: "自动追踪", - }, - { - icon: Send, - title: "分身代理沟通", - desc: '"帮我问李四进度" — 你的分身自动找李四的分身,结果直接返回。不打扰同事,不等回复。', - badge: "零等待", - }, - { - icon: BarChart3, - title: "团队 Insights", - desc: '自然语言查询团队数据:"Sprint 3 有什么风险?" — 分身分析所有人的任务和进度,给出建议。', - badge: "AI 分析", - }, - { - icon: Shield, - title: "共享知识库", - desc: "团队记忆自动沉淀:决策、方案、竞品情报。新人入职,分身一读就懂团队上下文。", - badge: "壁垒沉淀", - }, - { - icon: Rss, - title: "IM 卡片协作", - desc: "所有操作以交互式卡片出现在群聊中:审批、对齐、报告、提醒。在聊天里完成一切。", - badge: "飞书/Slack", - }, - { - icon: Crown, - title: "裂变增长", - desc: "群聊里每张卡片都是入口。同事看到你的分身在干活 → 点击 → 3 分钟获得自己的分身。", - badge: "k-factor >1", - }, - ].map((item) => ( -
-
-
- -
- - {item.badge} - -
-
{item.title}
-
{item.desc}
-
- ))} -
- - {/* Team invite CTA */} -
-
-
- 带上你的团队,一起 10x -
-
- 邀请 3 位同事加入,每人免费获得 Pro 版 30 天体验 -
-
- -
-
- -
-
-
- - {/* ───── How it works ───── */} -
- -
- {[ - { - step: "01", - title: "加个好友", - desc: "在飞书/Slack 里添加机器人,或直接打开网页版。30 秒搞定。", - }, - { - step: "02", - title: "聊几句就上岗", - desc: "分身会问你几个问题——做什么工作、喜欢什么风格。不是填表,是聊天。3 分钟搞定。", - }, - { - step: "03", - title: "越用越懂你", - desc: "记住你的一切、主动帮你干活、每天看它做了什么。用得越久越离不开。", - }, - ].map((s, i) => ( -
- {i < 2 && ( -
- )} -
{s.step}
-

{s.title}

-

{s.desc}

-
- ))} -
-
- -
-
-
- - {/* ───── Killer Numbers ───── */} -
-
- {[ - { num: "数千+", label: "种能力", sub: "产品/研发/运营/设计全覆盖" }, - { - num: "5", - label: "个平台", - sub: "飞书 · Slack · 网页 · WhatsApp · API", - }, - { num: "10x", label: "团队效率", sub: "分身代理沟通 + 自动对齐" }, - { num: "82%", label: "续费率", sub: "用了 30 天的团队都不想停" }, - ].map((n) => ( -
-
- {n.num} -
-
{n.label}
-
{n.sub}
-
- ))} -
-
- -
-
-
- - {/* ───── Comparison ───── */} -
- -
- - - - - - - - - - - - {( - [ - ["记得住,越用越懂你", true, "shallow", false, "shallow"], - ["有自己的知识库和工作空间", true, false, false, false], - ["数千种能力,自由组合", true, "plugin", "limited", true], - ["自动任务(定时 + 条件触发)", true, false, false, true], - ["每日动态 + 主动提醒", true, false, false, "limited"], - ["住在飞书/Slack 里直接用", true, false, false, true], - ["团队群协作,天然传播", true, false, "limited", "limited"], - ["等级 + 默契度成长体系", true, false, false, false], - ["3 分钟上手", true, true, false, false], - ] as [ - string, - boolean | string, - boolean | string, - boolean | string, - boolean | string, - ][] - ).map(([feature, refly, chatgpt, notion, coze]) => ( - - - {[ - ["Refly", refly], - ["ChatGPT", chatgpt], - ["Notion", notion], - ["Coze", coze], - ].map(([name, val]) => ( - - ))} - - ))} - -
能力nexuChatGPT - Notion AI - - Coze/扣子 -
{feature as string} - {val === true ? ( - - ) : val === false ? ( - - ) : ( - - {{ - shallow: "浅层", - plugin: "需插件", - limited: "有限", - }[val as string] ?? val} - - )} -
-
-
- -
-
-
- - {/* ───── Social Proof ───── */} -
- -
- {[ - { - quote: - "我的分身记得我 3 个月前随口说的一个想法,上周竟然主动提醒我可以做了。太神了。", - who: "独立开发者", - title: "@IndieHacker", - days: 87, - }, - { - quote: - "每天打开看分身昨晚做了什么,比刷朋友圈有意义。竞品监控已经帮我发现了两次重要机会。", - who: "产品经理", - title: "PM @ SaaS", - days: 62, - }, - { - quote: "让分身帮我写产品方案,它先做了竞品调研再写。比实习生靠谱。", - who: "创业公司 CEO", - title: "CEO & Founder", - days: 45, - }, - { - quote: - "团队 5 个人,每人一个分身,开会前它已经帮我汇总了所有人的进度。群里一发,大家都想加。", - who: "技术负责人", - title: "Tech Lead", - days: 93, - }, - { - quote: "做了一个客户跟进的自动任务,现在每周自动提醒我跟进,一个客户都不漏。", - who: "销售负责人", - title: "Sales", - days: 38, - }, - { - quote: "分身里已经有 500 多条记忆了。默契度 82%,它比我自己还了解我的偏好。", - who: "自由设计师", - title: "Freelancer", - days: 186, - }, - ].map((t) => ( -
-
- {[1, 2, 3, 4, 5].map((s) => ( - - ))} -
-

"{t.quote}"

-
-
- {t.who[0]} -
-
-
{t.who}
-
- {t.title} · 使用 {t.days} 天 -
-
-
-
- ))} -
-
- -
-
-
- - {/* ───── FAQ ───── */} -
- -
- - - - - - - - -
-
- -
-
-
- - {/* ───── Pricing ───── */} -
- -
- {[ - { - name: "基础版", - price: "免费", - sub: "", - items: ["分身上岗", "500 能量/月", "3 种能力", "基础记忆", "每日动态"], - cta: "免费开始", - hl: false, - }, - { - name: "专业版", - price: "¥29", - sub: "/月", - items: [ - "分身全力以赴", - "5,000 能量/月", - "无限能力 + 自定义", - "完整记忆 + 成长体系", - "自动任务", - "飞书深度整合", - "主动提醒", - "优先模型", - ], - cta: "解锁完整分身", - hl: true, - }, - { - name: "团队版", - price: "¥19", - sub: "/人/月", - items: ["专业版全部", "团队共享知识库", "分身间协作", "团队管理后台", "群聊协作"], - cta: "团队一起用", - hl: false, - }, - ].map((p) => ( -
- {p.hl && ( -
- 推荐 -
- )} -
{p.name}
-
- - {p.price} - - {p.sub} -
-
- {p.items.map((item) => ( -
- {item} -
- ))} -
- -
- ))} -
-
- 还可以单独购买能量包:¥10 = 1,000 能量 -
-
- - {/* ───── Final CTA ───── */} -
-
-
-

- 给你的龙虾一间赛博办公室 -

-

- 免费开始,3 分钟上手。员工会辞职,分身不会。 -

-
- - -
-
- {["😊", "🤝", "😄", "💻", "🎨", "🚀", "✨"].map((emoji) => ( -
- {emoji} -
- ))} -
-
12,000+ 团队 · 89,536 人已加入
-
-
- - {/* ───── Footer ───── */} -
-
-
-
- N -
- nexu — People quit. Clones don't. -
-
- - - -
-
-
-
- ); -} diff --git a/apps/demo/src/pages/journey/JourneyPage.tsx b/apps/demo/src/pages/journey/JourneyPage.tsx deleted file mode 100644 index afeb7cd2..00000000 --- a/apps/demo/src/pages/journey/JourneyPage.tsx +++ /dev/null @@ -1,182 +0,0 @@ -import { Button, Stepper, StepperItem, StepperSeparator } from "@nexu-design/ui-web"; -import { - ArrowLeft, - ArrowRight, - Crown, - Eye, - Globe, - Link2, - MessageSquare, - Monitor, - User, - Users, - X, - Zap, -} from "lucide-react"; -import { useCallback, useEffect, useState } from "react"; -import { useNavigate } from "react-router-dom"; -import StepAutomation from "./StepAutomation"; -import StepClone from "./StepClone"; -import StepIM from "./StepIM"; -import StepLanding from "./StepLanding"; -import StepOnboarding from "./StepOnboarding"; -import StepPreview from "./StepPreview"; -import StepSession from "./StepSession"; -import StepTeam from "./StepTeam"; -import StepUpgrade from "./StepUpgrade"; - -const STEPS = [ - { id: "landing", label: "Landing Page", icon: Globe, desc: "龙虾的赛博办公室" }, - { id: "onboarding", label: "Onboarding", icon: MessageSquare, desc: "分身初始化" }, - { id: "clone", label: "分身入口", icon: User, desc: "产品主界面" }, - { id: "session", label: "Session", icon: Monitor, desc: "对话交互" }, - { id: "automation", label: "Automation & Skills", icon: Zap, desc: "自动化 + 能力" }, - { id: "team", label: "团队协作", icon: Users, desc: "人与分身共存的办公协作网络" }, - { id: "im", label: "IM 接入", icon: Link2, desc: "飞书 / Slack" }, - { id: "preview", label: "接入预览", icon: Eye, desc: "最终效果" }, - { id: "upgrade", label: "解锁超能力", icon: Crown, desc: "升级 + 邀请团队" }, -] as const; - -const STEP_COMPONENTS = [ - StepLanding, - StepOnboarding, - StepClone, - StepSession, - StepAutomation, - StepTeam, - StepIM, - StepPreview, - StepUpgrade, -]; - -export default function JourneyPage() { - const [currentStep, setCurrentStep] = useState(0); - const [direction, setDirection] = useState<"next" | "prev">("next"); - const [animating, setAnimating] = useState(false); - const navigate = useNavigate(); - - const goTo = useCallback( - (idx: number, dir: "next" | "prev") => { - if (animating || idx < 0 || idx >= STEPS.length) return; - setDirection(dir); - setAnimating(true); - setTimeout(() => { - setCurrentStep(idx); - setAnimating(false); - }, 250); - }, - [animating], - ); - - const next = useCallback(() => goTo(currentStep + 1, "next"), [currentStep, goTo]); - const prev = useCallback(() => goTo(currentStep - 1, "prev"), [currentStep, goTo]); - - useEffect(() => { - const handler = (e: KeyboardEvent) => { - if (e.key === "ArrowRight" || e.key === "ArrowDown") next(); - if (e.key === "ArrowLeft" || e.key === "ArrowUp") prev(); - if (e.key === "Escape") navigate("/overview"); - }; - window.addEventListener("keydown", handler); - return () => window.removeEventListener("keydown", handler); - }, [next, prev, navigate]); - - const StepComponent = STEP_COMPONENTS[currentStep]; - const isFirst = currentStep === 0; - const isLast = currentStep === STEPS.length - 1; - - return ( -
- {/* Top bar */} -
- - - - {STEPS.map((step, i) => { - const status = - i < currentStep ? "completed" : i === currentStep ? "current" : "pending"; - - return [ - goTo(i, i > currentStep ? "next" : "prev")}> - {step.label} - - } - className="min-w-[84px]" - />, - i < STEPS.length - 1 ? ( - - ) : null, - ]; - })} - - -
- {currentStep + 1} / {STEPS.length} -
-
- - {/* Step content */} -
-
-
- -
-
-
- - {/* Bottom nav */} -
- - -
{STEPS[currentStep].desc}
- - -
-
- ); -} diff --git a/apps/demo/src/pages/journey/StepAutomation.tsx b/apps/demo/src/pages/journey/StepAutomation.tsx deleted file mode 100644 index 240b3685..00000000 --- a/apps/demo/src/pages/journey/StepAutomation.tsx +++ /dev/null @@ -1,458 +0,0 @@ -import { Button } from "@nexu-design/ui-web"; -import { - BarChart3, - Bell, - Brain, - Calendar, - CheckCircle, - Clock, - Code, - Download, - FileText, - Mail, - MessageSquare, - MoreHorizontal, - Pause, - Plus, - Search, - Shield, - Sparkles, - Star, - ToggleRight, - TrendingUp, - Users, - Wrench, - Zap, -} from "lucide-react"; -import { useState } from "react"; -import ChatCardGroup from "../product/ChatCards"; -import type { ChatCard } from "../product/sessionsData"; - -type View = "automation" | "skills"; - -const TEMPLATES = [ - { name: "每日邮件摘要", icon: Mail, color: "bg-info-subtle text-info" }, - { name: "竞品监测", icon: Search, color: "bg-clone/10 text-clone" }, - { name: "周五回顾", icon: BarChart3, color: "bg-success-subtle text-success" }, - { name: "安全自审", icon: Shield, color: "bg-danger-subtle text-danger" }, - { name: "增长日报", icon: TrendingUp, color: "bg-warning-subtle text-warning" }, - { name: "灵感方案", icon: Sparkles, color: "bg-clone/10 text-clone" }, -]; - -const TASKS = [ - { - name: "今日战况复盘", - cron: "每天 22:00", - icon: Brain, - enabled: true, - lastRun: "今天 22:00", - stats: "扫荡 7,660 条 · 评论 21 次", - }, - { name: "早间日报", cron: "每天 08:30", icon: Calendar, enabled: true, lastRun: "今天 08:30" }, - { - name: "Action Item 检查", - cron: "每天 3 次", - icon: CheckCircle, - enabled: true, - lastRun: "今天 15:00", - stats: "检查 7 项 · 已完成 3", - }, - { name: "记忆周报", cron: "每周日 20:00", icon: Brain, enabled: true, lastRun: "上周日" }, - { name: "TODO 提醒", cron: "每天 10:00/15:00", icon: Bell, enabled: true, lastRun: "今天 10:00" }, - { name: "联系人扫描", cron: "每周一 09:00", icon: Users, enabled: true, lastRun: "上周一" }, -]; - -const PROACTIVE_RULES = [ - { name: "灵感关联", trigger: "用户记录新想法时", example: '"3 天前说的 X 跟这个想法很像"' }, - { name: "截止日预警", trigger: "待办距截止 < 24h", example: '"数据库迁移今天到期"' }, - { name: "上下文衔接", trigger: "新对话开始时", example: '"昨天的 PRD 还没完成,要继续吗?"' }, - { name: "知识沉淀", trigger: "对话中出现重要决策", example: "自动保存 PostgreSQL 选型决策" }, - { name: "对方承诺追踪", trigger: "会议中对方承诺行动项", example: '"王浩今天的 demo 还没更新"' }, -]; - -const SKILLS = [ - { - name: "Memory & Notes", - desc: "自动记忆管理,知识沉淀", - icon: FileText, - installed: true, - installs: "12.4k", - }, - { - name: "Task Manager", - desc: "待办创建、追踪、提醒", - icon: BarChart3, - installed: true, - installs: "11.2k", - }, - { - name: "Web Research", - desc: "联网搜索 + 信息整理", - icon: Search, - installed: true, - installs: "10.1k", - }, - { - name: "Code Automation", - desc: "代码生成、PR、自动化", - icon: Code, - installed: true, - installs: "8.3k", - }, - { - name: "Daily Digest", - desc: "每日日程 + 待办汇总", - icon: FileText, - installed: true, - installs: "9.8k", - }, -]; - -const RECOMMENDED = [ - { - name: "Contact Intelligence", - desc: "联系人健康评分 + 关系管理", - icon: Users, - installs: "7.2k", - }, - { name: "Advisory Board", desc: "多 Agent 辩论 → 综合建议", icon: Brain, installs: "3.8k" }, - { name: "PRD Generator", desc: "需求文档生成与迭代", icon: FileText, installs: "6.7k" }, - { name: "Security Auditor", desc: "多视角安全审查 + 告警", icon: Shield, installs: "3.2k" }, -]; - -const AUTOMATION_CARD_EXAMPLES: ChatCard[] = [ - { - type: "automation", - title: "今日战况复盘", - status: "running", - body: "正在扫描 7,660 条对话和 21 份文档...", - path: "automation/daily-digest.yaml", - meta: "定时触发 · 每天 22:00", - }, - { - type: "file", - title: "日报已生成", - status: "success", - body: "完成 12 个任务 · 3 份文档 · 5 条新记忆", - path: "artifacts/reports/daily-report-0223.md", - diff: { added: 89, removed: 0 }, - actions: [{ label: "查看日报", primary: true }, { label: "推送飞书" }], - }, -]; - -const SKILL_CARD_EXAMPLE: ChatCard[] = [ - { - type: "skill", - title: "Web Research", - status: "success", - body: "联网搜索 + 信息整理 · 已安装", - meta: "10.1k 安装 · 官方认证", - actions: [{ label: "配置", primary: true }, { label: "查看文档" }], - }, -]; - -export default function StepAutomation() { - const [view, setView] = useState("automation"); - - return ( -
- {/* View toggle */} -
- - -
- - {view === "automation" ? ( -
- {/* Stats */} -
- {[ - { label: "活跃任务", value: "8", icon: Clock, color: "text-info" }, - { label: "主动规则", value: "7", icon: Brain, color: "text-clone" }, - { label: "今日触发", value: "14", icon: Zap, color: "text-success" }, - { label: "成功率", value: "96%", icon: CheckCircle, color: "text-success" }, - ].map((s) => ( -
- -
{s.value}
-
{s.label}
-
- ))} -
- - {/* Templates */} -
-
- - - Start with a template - -
-
- {TEMPLATES.map((t) => ( - - ))} -
-
- - {/* Active tasks */} -
-
- - - Active automations - - - {TASKS.length} - -
-
- {TASKS.map((task) => ( -
-
- -
-
-
- {task.name} - - {task.cron} - -
-
- 上次运行:{task.lastRun} -
- {task.stats && ( -
- {task.stats} -
- )} -
-
- - -
-
- ))} -
-
- - {/* Proactive rules */} -
-
- - Proactive Rules -
-
- {PROACTIVE_RULES.map((rule) => ( -
- -
-
- {rule.name} - · {rule.trigger} -
-
- {rule.example} -
-
- -
- ))} -
-
- - {/* Card preview — what automation outputs look like */} -
-
- - - Session 中的卡片产出 - - - 预览 - -
-
-
-
- 😊 -
- - 分身执行自动化后产出卡片 → - -
- -
-
-
- ) : ( -
- {/* Installed */} -
-

Skills

-

- Give your clone superpowers — teach it new skills. -

- -
- - Installed {SKILLS.length} - - Featured - - Explore 12 - -
- -
- {SKILLS.map((s) => ( -
-
- -
-
-
- {s.name} - -
-
{s.desc}
-
- - {s.installs} - -
- ))} -
-
- - {/* Recommended */} -
-
- - - Recommended for you - -
-
- {RECOMMENDED.map((s) => ( -
-
- -
-
-
{s.name}
-
{s.desc}
-
- -
- ))} -
-
- - {/* Skill card preview */} -
-
- - - Session 中的技能卡片 - - - 预览 - -
-
- -
-
- - {/* Builder tools */} -
- - -
-
- )} -
- ); -} diff --git a/apps/demo/src/pages/journey/StepClone.tsx b/apps/demo/src/pages/journey/StepClone.tsx deleted file mode 100644 index eb210057..00000000 --- a/apps/demo/src/pages/journey/StepClone.tsx +++ /dev/null @@ -1,579 +0,0 @@ -import { Button } from "@nexu-design/ui-web"; -import { - Activity, - Brain, - ChevronRight, - Database, - FileText, - Globe, - MessageSquare, - Pencil, - Phone, - Plus, - Rss, - Send, - Shield, - Wrench, -} from "lucide-react"; -import { useState } from "react"; -import ChatCardGroup from "../product/ChatCards"; -import type { ChatCard } from "../product/sessionsData"; - -const SOUL_FILES = [ - { label: "角色", value: "全栈工程师 · 产品经理" }, - { label: "领域", value: "Web 开发 · AI 应用 · SaaS" }, - { label: "沟通", value: "简洁直接 · 技术术语用英文" }, - { label: "习惯", value: "晚上效率高 · 先做难的 · 迭代快" }, -]; - -const WORLDVIEW = [ - { icon: "🎯", label: "产品哲学", value: "用户体验 > 功能数量" }, - { icon: "⚡", label: "技术观", value: "实用主义,先跑起来再优化" }, - { icon: "🧭", label: "决策原则", value: '"这让分身更懂用户了吗?"' }, -]; - -type FeedItemType = "automation" | "session" | "skill" | "memory" | "proactive" | "team"; - -const FEED_ITEMS: { - type: FeedItemType; - icon: string; - title: string; - desc: string; - time: string; - files?: number; - memories?: number; -}[] = [ - { - type: "proactive", - icon: "📊", - title: "今日战况复盘已生成", - desc: "完成 12 个任务,生成 3 份文档,新增 5 条记忆", - time: "22:00", - files: 3, - memories: 5, - }, - { - type: "team", - icon: "🤝", - title: "张三的分身查询了你的任务进度", - desc: "分身已自动回复 Gateway 重构时间线", - time: "14:30", - }, - { - type: "automation", - icon: "⚡", - title: "竞品监控触发 — Notion 发布 AI 更新", - desc: "已自动生成竞品分析摘要并存入 artifacts", - time: "18:30", - files: 1, - }, - { - type: "session", - icon: "💬", - title: "注册流程优化方案完成", - desc: "基于 OAuth 选型,生成完整 PRD + 流程图", - time: "16:45", - files: 2, - memories: 1, - }, - { - type: "memory", - icon: "🧠", - title: "记忆整理完成 — 发现 3 条冲突", - desc: "自动整理本周 23 条记忆,建议确认 3 条变更", - time: "14:00", - memories: 23, - }, -]; - -const FEED_TYPE_STYLES: Record = { - automation: "bg-blue-500/10 text-blue-600", - session: "bg-emerald-500/10 text-emerald-600", - skill: "bg-purple-500/10 text-purple-600", - memory: "bg-amber-500/10 text-amber-600", - proactive: "bg-orange-500/10 text-orange-600", - team: "bg-cyan-500/10 text-cyan-600", -}; - -// Sample ChatCards to preview how feed items appear as cards in sessions -const FEED_CARD_PREVIEWS: ChatCard[] = [ - { - type: "automation", - title: "今日战况复盘", - status: "success", - body: "✓ 扫描 3 个活跃 Session\n✓ 生成日报并推送到飞书群", - path: "artifacts/reports/daily-digest-0221.md", - meta: "cron: 每天 22:00", - }, - { - type: "collaboration", - title: "李四分身回复:Gateway 进度", - status: "success", - body: "整体进度:15%\nAPI 路由层已完成,中间件迁移进行中", - path: "contacts/李四-后端.md", - meta: "Proxy 回复 · 2 分钟", - }, - { - type: "file", - title: "注册流程优化 PRD", - status: "success", - body: "方案 A:Google OAuth + 飞书扫码\n预计注册转化率提升 40%", - path: "artifacts/prds/注册流程优化.md", - diff: { added: 48, removed: 0 }, - }, -]; - -const CHANNELS_NATIVE = [ - { - name: "Email", - icon: "📧", - status: "connected", - desc: "tom@refly.ai · IMAP 已配置", - badge: "零安装", - }, - { - name: "SMS", - icon: "💬", - status: "connected", - desc: "+86 138****7890 · Twilio", - badge: "零安装", - }, - { - name: "WhatsApp", - icon: "📱", - status: "pending", - desc: "待绑定手机号", - badge: "零安装", - }, -]; - -const CHANNELS_IM = [ - { - name: "飞书", - icon: "🐦", - status: "connected", - desc: "Bot 已上线 · 主渠道", - }, - { - name: "Slack", - icon: "💼", - status: "connected", - desc: "OAuth 已授权 · 3 个 Channel", - }, - { name: "Telegram", icon: "✈️", status: "pending", desc: "待配置 Bot Token" }, - { name: "Discord", icon: "🎮", status: "off", desc: "即将支持" }, - { name: "企业微信", icon: "🏢", status: "off", desc: "即将支持" }, -]; - -const MEMORY_CATEGORIES = [ - { id: "ideas", label: "想法", icon: "💡", count: 31 }, - { id: "tone", label: "口吻", icon: "🗣️", count: 8 }, - { id: "preferences", label: "喜好", icon: "⭐", count: 24 }, - { id: "habits", label: "习惯", icon: "🔄", count: 15 }, - { id: "status", label: "近况", icon: "📍", count: 12 }, - { id: "goals", label: "目标", icon: "🎯", count: 18 }, - { id: "worldview", label: "世界观", icon: "🌏", count: 9 }, - { id: "decisions", label: "决策", icon: "⚖️", count: 18 }, - { id: "facts", label: "事实", icon: "📎", count: 67 }, -]; - -const MEMORY_SAMPLE = [ - { category: "ideas", content: 'AI 视为"赛博合伙人"的协作理念', icon: "💡" }, - { - category: "decisions", - content: "PostgreSQL + TypeORM 替代 MongoDB", - icon: "⚖️", - }, - { - category: "preferences", - content: "喜欢运动,乒乓球和跑步,影视达人", - icon: "⭐", - }, -]; - -type TabId = "feeds" | "channels" | "memory"; - -export default function StepClone() { - const [activeTab, setActiveTab] = useState("feeds"); - - const TABS: { id: TabId; label: string; icon: typeof Rss }[] = [ - { id: "feeds", label: "Feeds", icon: Rss }, - { id: "channels", label: "Channels", icon: MessageSquare }, - { id: "memory", label: "Memory", icon: Database }, - ]; - - return ( -
-
-

分身搭建

-

- 配置你的数字分身 — 所有信息存储在分身的大脑中,越用越懂你 -

-
- -
- {/* Left: PersonaPanel (condensed, product-aligned) */} -
-
-
-
- 😊 -
-
- Lv.3 -
-
-
我的分身
-
全栈工程师
-
-
- 在线 · 已陪伴 49 天 -
- - - -
-
- 对齐率 - 78% -
-
-
-
-
-
- -
- {[ - { v: "1,770", l: "轮次" }, - { v: "162", l: "文件" }, - { v: "223", l: "记忆" }, - { v: "6", l: "联系人" }, - ].map((s) => ( -
-
{s.v}
-
{s.l}
-
- ))} -
- -
-
- - - 人设特质 - -
-
- {SOUL_FILES.map((f) => ( -
-
- {f.label} -
-
- {f.value} -
- -
- ))} -
-
- -
-
- - - 世界观 - -
-
- {WORLDVIEW.map((w) => ( -
- {w.icon} -
-
{w.label}
-
{w.value}
-
-
- ))} -
-
-
- - {/* Right: Tab-based content */} -
-
- {TABS.map((t) => ( - - ))} -
- - {activeTab === "feeds" && ( - <> -
-
- - -
-
- -
-
- - 今日活跃 - 12 项 -
-
-
- - 7 文件 -
-
-
- - 14 记忆 -
-
- -
- {FEED_ITEMS.map((item) => ( -
-
- {item.icon} -
-
- - {item.type} - - {item.time} -
-

{item.title}

-

{item.desc}

-
- {item.files != null && ( - - {item.files} - - )} - {item.memories != null && ( - - {item.memories} - - )} - - 查看详情 - -
-
-
-
- ))} -
- -
-
- Feed 中的活动会以卡片形式出现在 Session 中: -
- -
- -
- -
- - )} - - {activeTab === "channels" && ( -
-
-
-
- -
- 原生渠道 - - 零安装 - -
-
- 无需下载 App — 发消息即可启动分身 -
-
- {CHANNELS_NATIVE.map((ch) => ( -
- {ch.icon} -
-
- - {ch.name} - - {ch.badge && ( - - {ch.badge} - - )} -
-
{ch.desc}
-
- {ch.status === "connected" && ( - - 已连接 - - )} - {ch.status === "pending" && ( - - 配置 - - )} -
- ))} -
-
- -
-
-
- -
- IM 平台 -
-
- {CHANNELS_IM.map((ch) => ( -
- {ch.icon} -
- {ch.name} - {ch.desc} -
- {ch.status === "connected" && ( - - 已连接 - - )} - {ch.status === "pending" && ( - - 配置 - - )} - {ch.status === "off" && ( - 即将支持 - )} -
- ))} -
-
- - -
- )} - - {activeTab === "memory" && ( -
-
- {MEMORY_CATEGORIES.map((cat) => ( - - ))} -
- -
- {MEMORY_SAMPLE.map((m) => ( -
-
- {m.icon} - - {MEMORY_CATEGORIES.find((c) => c.id === m.category)?.label} - -
-
- {m.content} -
-
- ))} -
- - -
- )} -
-
-
- ); -} diff --git a/apps/demo/src/pages/journey/StepIM.tsx b/apps/demo/src/pages/journey/StepIM.tsx deleted file mode 100644 index a968f632..00000000 --- a/apps/demo/src/pages/journey/StepIM.tsx +++ /dev/null @@ -1,425 +0,0 @@ -import { Button } from "@nexu-design/ui-web"; -import { - Check, - CheckCircle, - Globe, - Link2, - MessageSquare, - Phone, - Plus, - RefreshCw, - Settings, - Sparkles, -} from "lucide-react"; -import ChatCardGroup from "../product/ChatCards"; -import type { ChatCard } from "../product/sessionsData"; - -type ChannelCategory = "native" | "im"; - -interface Channel { - name: string; - icon: string; - status: "connected" | "pending" | "coming"; - desc: string; - badge: string | null; - category: ChannelCategory; - stats: { - rounds: number; - files: number; - memories: number; - contacts: number; - } | null; - recent?: { type: string; label: string; time: string }[]; - highlight?: string; - steps?: string[]; - stepsDone?: number; -} - -const NATIVE_CHANNELS: Channel[] = [ - { - name: "Email", - icon: "📧", - status: "connected", - desc: "tom@refly.ai · IMAP/SMTP 已配置", - badge: "零安装", - category: "native", - stats: { rounds: 342, files: 28, memories: 45, contacts: 8 }, - recent: [ - { - type: "file", - label: "分身回复了投资人 Alex 的 follow-up", - time: "1 小时前", - }, - { type: "memory", label: "从邮件中提取了合作意向备忘", time: "3 小时前" }, - ], - highlight: "发邮件给分身 = 启动一个 Session。附件自动存入 artifacts,关键信息记入 memory。", - }, - { - name: "SMS / iMessage", - icon: "💬", - status: "connected", - desc: "+86 138****7890 · Twilio 接入", - badge: "零安装", - category: "native", - stats: { rounds: 87, files: 5, memories: 23, contacts: 3 }, - recent: [ - { - type: "memory", - label: "短信指令:帮我查下明天的日程", - time: "30 分钟前", - }, - { type: "file", label: "分身回复了日程摘要", time: "30 分钟前" }, - ], - highlight: "给分身发短信,随时随地发指令。无需打开任何 App,最原生的交互方式。", - }, - { - name: "WhatsApp", - icon: "📱", - status: "pending", - desc: "待绑定手机号 · Meta API", - badge: "零安装", - category: "native", - stats: null, - recent: [], - highlight: "全球 20 亿用户的即时通讯。给分身的 WhatsApp 号发消息就能开始工作。", - }, -]; - -const IM_CHANNELS: Channel[] = [ - { - name: "飞书", - icon: "🐦", - status: "connected", - desc: "Bot 已上线 · WebSocket 活跃", - badge: "主渠道", - category: "im", - stats: { rounds: 1247, files: 89, memories: 156, contacts: 5 }, - recent: [ - { type: "memory", label: "记录了 OAuth 选型决策", time: "20 分钟前" }, - { type: "file", label: "生成了注册流程 PRD", time: "2 小时前" }, - ], - steps: ["创建飞书机器人", "填写 App ID + Secret", "选择权限范围", "部署完成"], - stepsDone: 4, - }, - { - name: "Slack", - icon: "💼", - status: "connected", - desc: "OAuth 已授权 · 3 个 Channel", - badge: null, - category: "im", - stats: { rounds: 523, files: 34, memories: 67, contacts: 3 }, - recent: [{ type: "file", label: "更新了竞品分析报告", time: "昨天" }], - steps: ["安装 Slack App", "OAuth 授权", "选择 Channel", "部署完成"], - stepsDone: 4, - }, - { - name: "Telegram", - icon: "✈️", - status: "pending", - desc: "待配置 Bot Token", - badge: null, - category: "im", - stats: null, - recent: [], - steps: ["创建 Telegram Bot", "填写 Bot Token", "设置 Webhook", "部署完成"], - stepsDone: 0, - }, - { - name: "Discord", - icon: "🎮", - status: "coming", - desc: "即将支持", - badge: "敬请期待", - category: "im", - stats: null, - recent: [], - steps: [], - stepsDone: 0, - }, - { - name: "企业微信", - icon: "🏢", - status: "coming", - desc: "即将支持", - badge: "敬请期待", - category: "im", - stats: null, - recent: [], - steps: [], - stepsDone: 0, - }, -]; - -// Sample card for email/SMS session preview -const EMAIL_SESSION_CARDS: ChatCard[] = [ - { - type: "file", - title: "投资人 Alex follow-up 回复", - status: "success", - body: "已根据你的记忆起草回复,附上最新产品进展和 demo 链接。", - path: "artifacts/emails/investor-alex-followup.md", - meta: "来自 Email · 1 小时前", - actions: [{ label: "查看邮件", primary: true }], - }, -]; - -function StatBadge({ - icon, - label, - value, -}: { - icon: string; - label: string; - value: number; -}) { - return ( -
- {icon} - {value.toLocaleString()} - {label} -
- ); -} - -function ChannelCard({ ch }: { ch: Channel }) { - return ( -
-
-
- {ch.icon} -
-
-
- {ch.name} - {ch.badge && ( - - {ch.badge} - - )} -
-
{ch.desc}
-
-
- {ch.status === "connected" && ( - - 已连接 - - )} - {ch.status === "pending" && ( - - )} - {ch.status === "coming" && 即将支持} -
-
- - {/* Native channel highlight */} - {ch.highlight && ( -
-
- - {ch.highlight} -
-
- )} - - {ch.stats && ( -
-
- - - - -
- {ch.recent && ch.recent.length > 0 && ( -
- {ch.recent.map((r) => ( -
- {r.type === "memory" ? "🧠" : "📄"} - {r.label} - {r.time} -
- ))} -
- )} -
- )} - - {ch.status === "pending" && ch.steps && ch.steps.length > 0 && ( -
-
-
配置步骤
-
- {ch.steps.map((step, i) => ( -
- {i < (ch.stepsDone ?? 0) ? ( - - ) : ( -
- )} - - {step} - -
- ))} -
- -
-
- )} -
- ); -} - -export default function StepIM() { - return ( -
-
-

接入 IM / 飞书

-

- 让分身住在你常用的工具里 — 在哪都能用,记忆跨平台同步 -

-
- - {/* Integration flow diagram */} -
-
- 接入流程(以飞书为例) -
-
- {["创建机器人", "配置权限", "填写凭证", "测试连接", "上线运行"].map((step, i) => ( -
-
-
- {i < 4 ? : i + 1} -
- - {step} - -
- {i < 4 &&
} -
- ))} -
-
- - 飞书已连接 - - · Bot 名称:Refly 分身 · WebSocket 活跃 · 延迟 < 200ms - -
-
- - {/* Native channels section */} -
-
-
- -
- 原生渠道 - - 零安装 - -
-
- 无需下载任何 App — 每个手机都有短信和邮件。发一条消息就能启动分身工作。 -
-
- {NATIVE_CHANNELS.map((ch) => ( - - ))} -
-
- - {/* IM platforms section */} -
-
-
- -
- IM 平台 - 团队协作 · 群聊 · 卡片交互 -
-
- {IM_CHANNELS.map((ch) => ( - - ))} -
-
- - {/* Card preview: session from email/SMS */} -
-
邮件/短信 会话示例
-
- -
-
- - - - {/* Key features */} -
- {[ - { - icon: RefreshCw, - label: "跨平台同步", - desc: "飞书说的话,网页也记得", - }, - { icon: Globe, label: "多端同时在线", desc: "网页 + IM 同时使用" }, - { - icon: MessageSquare, - label: "群聊协作", - desc: "在群里帮你汇总进度", - }, - { icon: Phone, label: "零安装接入", desc: "邮件/短信 发一条即启动" }, - ].map((f) => ( -
- -
{f.label}
-
{f.desc}
-
- ))} -
-
- ); -} diff --git a/apps/demo/src/pages/journey/StepLanding.tsx b/apps/demo/src/pages/journey/StepLanding.tsx deleted file mode 100644 index 3604d6a3..00000000 --- a/apps/demo/src/pages/journey/StepLanding.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import LandingPreview from "../LandingPreview"; - -export default function StepLanding() { - return ; -} diff --git a/apps/demo/src/pages/journey/StepOnboarding.tsx b/apps/demo/src/pages/journey/StepOnboarding.tsx deleted file mode 100644 index b75abae1..00000000 --- a/apps/demo/src/pages/journey/StepOnboarding.tsx +++ /dev/null @@ -1,598 +0,0 @@ -import { Button } from "@nexu-design/ui-web"; -import { - ArrowRight, - Brain, - Check, - CheckCircle, - ChevronRight, - Database, - Globe, - Link2, - MessageSquare, - RefreshCw, - Send, - Shield, - Sparkles, - Upload, - UserPlus, - Users, - Wrench, -} from "lucide-react"; -import { useState } from "react"; -import ChatCardGroup from "../product/ChatCards"; -import type { ChatCard } from "../product/sessionsData"; - -const STEPS = [ - { id: "persona", label: "基础人设", icon: Shield, status: "done" as const }, - { id: "worldview", label: "世界观", icon: Globe, status: "done" as const }, - { id: "memory", label: "记忆导入", icon: Database, status: "active" as const }, - { id: "integrations", label: "渠道授权", icon: Link2, status: "pending" as const }, - { id: "skills", label: "能力配置", icon: Sparkles, status: "pending" as const }, - { id: "knowledge", label: "知识库", icon: Brain, status: "pending" as const }, - { id: "team", label: "团队协作", icon: Users, status: "pending" as const }, -]; - -interface ChatMsg { - from: "clone" | "user" | "system"; - content: string; - widget?: "integrations" | "skills" | "upload" | "progress" | "team"; -} - -const MESSAGES: ChatMsg[] = [ - { from: "system", content: "🎉 分身初始化 · 持续对话" }, - { - from: "clone", - content: - "你好!我是你的数字分身 😊\n\n让我先了解你,这样我才能更好地帮你。我们可以随时聊,不用一次搞定 — 你说到哪儿算哪儿,之后随时回来补充。", - }, - { - from: "clone", - content: - "先来最基础的:\n\n1. 你希望我叫你什么?\n2. 你主要做什么工作?(角色/领域)\n3. 你希望我用什么风格跟你沟通?(正式/轻松/技术范/随意聊)", - }, - { - from: "user", - content: - "叫我 Tom,我是产品经理 + 技术合伙人,做 AI SaaS 方向。沟通风格要简洁直接,技术术语可以直接用英文。", - }, - { - from: "clone", - content: - "明白了 Tom 👋\n\n已记录:\n✅ 称呼:Tom\n✅ 角色:产品经理 + 技术合伙人\n✅ 领域:AI SaaS\n✅ 沟通风格:简洁直接 · 技术术语用英文\n\n接下来我想了解你的价值观和做事原则 — 这样我做决策时才不会跑偏。", - }, - { - from: "clone", - content: - '你做产品和技术决策时,有没有几条核心原则?\n比如"用户体验优先"、"先跑起来再说"、"不过度工程化"之类的。', - }, - { - from: "user", - content: - '有的:\n1. 用户体验 > 功能数量\n2. 实用主义,先跑起来再优化\n3. 判断标准是"这让分身更懂用户了吗?"\n4. 直说结论不说废话', - }, - { - from: "clone", - content: - '非常清晰 ✅ 已存入世界观:\n\n🎯 产品哲学:用户体验 > 功能数量\n⚡ 技术观:实用主义,先跑起来再优化\n🧭 决策标准:"这让分身更懂用户了吗?"\n💬 沟通准则:直说结论不说废话\n\n现在最关键的一步 — 让我获取你已有的记忆和内容。有几个方式可以快速导入:', - }, - { - from: "clone", - content: - "你可以:\n\n📎 **直接上传文件** — 简历、笔记、文档、项目资料等,我会自动提取关键信息\n\n🔗 **授权已有工具** — 连接你日常用的工具,我会从中学习你的习惯和偏好\n\n💬 **继续跟我聊** — 聊你最近在做的事、你的想法和计划,我边聊边记\n\n想先从哪个开始?", - widget: "integrations", - }, -]; - -const ONBOARDING_CARDS: ChatCard[] = [ - { - type: "memory", - title: "人设特质已记录", - status: "success", - body: "角色:产品经理 + 技术合伙人\n领域:AI SaaS · 沟通风格:简洁直接", - path: ".soul/identity.md", - }, - { - type: "memory", - title: "世界观已存入", - status: "success", - body: "产品哲学:用户体验 > 功能数量\n技术观:实用主义 · 沟通准则:直说结论", - path: ".soul/values.md", - }, -]; - -interface IntegrationItem { - name: string; - icon: string; - desc: string; - status: "connected" | "available" | "coming"; - importable: string; -} - -const INTEGRATIONS: IntegrationItem[] = [ - { - name: "飞书", - icon: "🐦", - desc: "消息、文档、日历、审批", - status: "connected", - importable: "1,247 条消息 · 89 文档", - }, - { - name: "Slack", - icon: "💬", - desc: "频道消息、DM、Threads", - status: "connected", - importable: "523 条消息 · 34 文档", - }, - { - name: "Notion", - icon: "📝", - desc: "页面、数据库、知识库", - status: "available", - importable: "导入 Notion 工作空间", - }, - { - name: "Gmail", - icon: "📧", - desc: "邮件内容、联系人", - status: "available", - importable: "扫描重要邮件和联系人", - }, - { - name: "GitHub", - icon: "🐙", - desc: "代码仓库、Issues、PR", - status: "available", - importable: "导入项目上下文", - }, - { - name: "Linear", - icon: "🔵", - desc: "Issues、Sprint、Roadmap", - status: "available", - importable: "同步项目进度", - }, - { - name: "n8n", - icon: "⚡", - desc: "自动化工作流", - status: "available", - importable: "导入现有工作流", - }, - { - name: "Google Calendar", - icon: "📅", - desc: "日程、会议", - status: "available", - importable: "同步日历和会议", - }, - { name: "Figma", icon: "🎨", desc: "设计稿、评论", status: "coming", importable: "即将支持" }, - { name: "WeChat", icon: "💚", desc: "微信对话", status: "coming", importable: "即将支持" }, -]; - -interface SkillOption { - name: string; - desc: string; - icon: string; - recommended: boolean; - selected: boolean; -} - -const SKILL_DEFAULTS: SkillOption[] = [ - { name: "记忆管理", desc: "自动记忆、知识沉淀", icon: "🧠", recommended: true, selected: true }, - { name: "任务管理", desc: "待办创建、追踪、提醒", icon: "✅", recommended: true, selected: true }, - { name: "每日汇报", desc: "晨间日报 + 日程提醒", icon: "📋", recommended: true, selected: true }, - { name: "联网搜索", desc: "实时搜索 + 信息整理", icon: "🔍", recommended: true, selected: true }, - { name: "代码助手", desc: "代码生成、PR、审查", icon: "💻", recommended: false, selected: false }, - { name: "文档写作", desc: "PRD、方案、报告生成", icon: "📄", recommended: false, selected: true }, - { name: "竞品监控", desc: "定期扫描竞品动态", icon: "📊", recommended: false, selected: false }, - { - name: "会议纪要", - desc: "录音转写 + Action Items", - icon: "🎙️", - recommended: false, - selected: false, - }, - { name: "邮件管理", desc: "邮件分类 + 摘要", icon: "📬", recommended: false, selected: false }, - { name: "社交媒体", desc: "内容发布 + 互动", icon: "📱", recommended: false, selected: false }, -]; - -const INVITE_LIST = [ - { name: "张三", channel: "飞书", icon: "👨‍💻", status: "joined" as const }, - { name: "李四", channel: "飞书", icon: "🧑‍💻", status: "joined" as const }, - { name: "王五", channel: "Slack", icon: "👩‍🎨", status: "invited" as const }, - { name: "赵六", channel: "飞书", icon: "👩‍💼", status: "pending" as const }, -]; - -function IntegrationsWidget() { - const [expanded, setExpanded] = useState(false); - const shown = expanded ? INTEGRATIONS : INTEGRATIONS.slice(0, 4); - - return ( -
-
- {shown.map((item) => ( -
-
- {item.icon} - {item.name} - {item.status === "connected" && ( - - )} - {item.status === "coming" && ( - 即将 - )} -
-
{item.desc}
- {item.status === "connected" && ( -
- {item.importable} -
- )} - {item.status === "available" && ( - - )} -
- ))} -
- {!expanded && INTEGRATIONS.length > 4 && ( - - )} -
- ); -} - -function SkillsWidget() { - const [skills, setSkills] = useState(SKILL_DEFAULTS); - const toggle = (name: string) => { - setSkills((prev) => prev.map((s) => (s.name === name ? { ...s, selected: !s.selected } : s))); - }; - - return ( -
-
- {skills.map((s) => ( - - ))} -
-
- 已选 {skills.filter((s) => s.selected).length} 个能力 · 之后随时可在 Skills 页面调整 -
-
- ); -} - -function UploadWidget() { - return ( -
- -
拖拽文件到这里,或点击上传
-
- 支持 PDF、Word、Excel、Markdown、代码、图片、音视频等 -
-
- {["简历", "笔记", "项目文档", "会议录音"].map((tag) => ( - - {tag} - - ))} -
-
- ); -} - -function TeamSetupWidget() { - const joined = INVITE_LIST.filter((m) => m.status === "joined").length; - - return ( -
-
-
- 团队成员 - - {joined}/{INVITE_LIST.length} 已加入 - -
-
- {INVITE_LIST.map((m) => ( -
- {m.icon} - {m.name} - {m.channel} - {m.status === "joined" ? ( - - ) : m.status === "invited" ? ( - - 已邀请 - - ) : ( - - 待邀请 - - )} -
- ))} -
- -
-
-
🤖 团队分身网络
-
- 当团队成员加入后,你的分身可以: -
-
- {[ - "📋 自动生成每日站会汇总", - "🔍 代你查询其他成员任务进度", - "⚠️ 检测依赖风险并主动发起对齐", - "📊 生成团队 Sprint 报告", - ].map((item) => ( -
- {item} -
- ))} -
-
-
- ); -} - -function ProgressWidget() { - const items = [ - { label: "基础人设", done: true, detail: "称呼、角色、沟通风格" }, - { label: "世界观", done: true, detail: "4 条核心原则" }, - { label: "记忆导入", done: false, detail: "0 条记忆 · 0 文件" }, - { label: "渠道授权", done: false, detail: "2 已连接 · 8 可连接" }, - { label: "能力配置", done: false, detail: "4 个推荐能力" }, - { label: "知识库", done: false, detail: "等待导入" }, - { label: "团队协作", done: false, detail: "2/4 成员已加入" }, - ]; - const doneCount = items.filter((i) => i.done).length; - const pct = Math.round((doneCount / items.length) * 100); - - return ( -
-
- 初始化进度 - {pct}% -
-
-
-
-
- {items.map((item) => ( -
- {item.done ? ( - - ) : ( -
- )} - - {item.label} - - {item.detail} -
- ))} -
-
- ); -} - -// Active widget state to toggle inline widgets -type ActiveWidget = "integrations" | "skills" | "upload" | "team" | "progress" | null; - -export default function StepOnboarding() { - const [input, setInput] = useState(""); - const [activeWidget, setActiveWidget] = useState("integrations"); - - return ( -
-
- {/* Header */} -
-
- 😊 -
-
-
- 分身初始化 - - 常驻对话 - -
-
随时回来继续聊 · 越聊越懂你
-
-
- - {/* Step indicator */} -
-
- {STEPS.map((step, i) => ( -
-
- {step.status === "done" ? : } - {step.label} -
- {i < STEPS.length - 1 && ( - - )} -
- ))} -
-
- - {/* Chat */} -
- {MESSAGES.map((msg) => ( -
- {msg.from === "system" ? ( -
-
- {msg.content} -
-
- ) : msg.from === "user" ? ( -
-
- {msg.content} -
-
- ) : ( -
-
- 😊 -
-
-
- {msg.content} -
- {msg.widget === "integrations" && activeWidget === "integrations" && ( - - )} - {msg.widget === "integrations" && activeWidget === "skills" && } - {msg.widget === "integrations" && activeWidget === "upload" && } - {msg.widget === "integrations" && activeWidget === "team" && ( - - )} - {msg.widget === "integrations" && activeWidget === "progress" && ( - - )} -
-
- )} -
- ))} - - {/* Memory cards */} -
- -
- - {/* Quick actions */} -
- 快捷操作: - {[ - { label: "授权工具", icon: Link2, widget: "integrations" as const }, - { label: "上传文件", icon: Upload, widget: "upload" as const }, - { label: "选择能力", icon: Sparkles, widget: "skills" as const }, - { label: "邀请团队", icon: Users, widget: "team" as const }, - { label: "查看进度", icon: Wrench, widget: "progress" as const }, - ].map((action) => ( - - ))} -
-
- - {/* Input area */} -
-
-