@saluzi/saluzi-edu 0.2.64 → 0.2.66

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.
@@ -1,167 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/streamdown-nMT_aKRc.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/shiki-CMaUdEs0.js"])))=>i.map(i=>d[i]);
2
- import{c as e,l as t,o as n,s as r}from"./streamdown-nMT_aKRc.js";import{t as i}from"./vendor-BU1MXatO.js";import{Ja as a}from"./shiki-CMaUdEs0.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var o=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),s=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),c=e=>{let t=s(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),u=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},d={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},f=t(),p=(0,f.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,f.createElement)(`svg`,{ref:c,...d,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:l(`lucide`,i),...!a&&!u(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,f.createElement)(e,t)),...Array.isArray(a)?a:[a]])),m=(e,t)=>{let n=(0,f.forwardRef)(({className:n,...r},i)=>(0,f.createElement)(p,{ref:i,iconNode:t,className:l(`lucide-${o(c(e))}`,`lucide-${e}`,n),...r}));return n.displayName=c(e),n},h=m(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),g=m(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),_=m(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ee=m(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),v=m(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),y=m(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),b=m(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),x=i();function S(...t){return r(e(t))}var C=n();function w({navigation:e,selected:t,onSelect:n,onHome:r}){return(0,C.jsxs)(`nav`,{className:`flex h-full w-64 flex-col border-r border-border bg-card`,children:[(0,C.jsx)(`div`,{className:`flex h-16 items-center border-b border-border px-4`,children:(0,C.jsxs)(`button`,{type:`button`,onClick:()=>r?.(),title:`返回首页`,className:`block text-left transition-opacity hover:opacity-80`,children:[(0,C.jsx)(`h1`,{className:`font-display text-lg font-bold `+(t===null?`text-primary`:`text-primary/80`),children:`Saluzi Guide`}),(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`使用指南`})]})}),(0,C.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-2 py-2`,children:[(0,C.jsx)(T,{label:`命令宝典`,isActive:t===`__commands__`,onClick:()=>n(`__commands__`)}),(0,C.jsx)(`div`,{className:`my-2 border-t border-border-light`}),e.map(e=>(0,C.jsx)(E,{group:e,selected:t,onSelect:n},e.group))]})]})}function T({label:e,isActive:t,onClick:n}){return(0,C.jsx)(`button`,{type:`button`,onClick:n,className:S(`w-full rounded-md px-3 py-1.5 text-left text-sm transition-colors`,t?`bg-primary text-primary-foreground`:`text-foreground hover:bg-muted`),children:e})}function E({group:e,selected:t,onSelect:n}){let[r,i]=(0,f.useState)(!0);return(0,C.jsxs)(`div`,{className:`mb-1`,children:[(0,C.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`flex w-full items-center gap-1 px-2 py-1.5 text-left text-xs font-semibold uppercase text-muted-foreground hover:text-foreground`,children:[r?(0,C.jsx)(_,{className:`h-3 w-3`}):(0,C.jsx)(ee,{className:`h-3 w-3`}),e.group]}),r?(0,C.jsx)(`div`,{className:`ml-2 border-l border-border-light pl-2`,children:D(e.pages).map(e=>(0,C.jsx)(T,{label:e.title??e.path??``,isActive:t===e.path,onClick:()=>e.path&&n(e.path)},e.path))}):null]})}function D(e){let t=[];for(let n of e)n.path?t.push({title:n.title??n.path,path:n.path}):n.pages?t.push(...D(n.pages)):n.group&&t.push({title:n.group,path:void 0});return t}var O=`saluzi-guide-theme`;function k(){return typeof window>`u`?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function A(){return typeof window>`u`?`system`:localStorage.getItem(O)??`system`}function j(e){let t=e===`system`?k():e,n=document.documentElement;n.classList.remove(`light`,`dark`),n.classList.add(t)}function M(){let[e,t]=(0,f.useState)(A);return(0,f.useEffect)(()=>{j(e),e===`system`?localStorage.removeItem(O):localStorage.setItem(O,e)},[e]),(0,f.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>j(`system`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[e]),{theme:e,setTheme:t,resolved:e===`system`?k():e}}function N(){let{theme:e,setTheme:t}=M();return(0,C.jsx)(`div`,{className:`inline-flex items-center gap-1 rounded-md border border-border bg-card p-1`,children:[{id:`light`,icon:b,label:`Light`},{id:`dark`,icon:y,label:`Dark`},{id:`system`,icon:v,label:`Auto`}].map(({id:n,icon:r,label:i})=>(0,C.jsx)(`button`,{type:`button`,onClick:()=>t(n),"aria-label":i,"aria-pressed":e===n,className:S(`inline-flex h-7 w-7 items-center justify-center rounded-sm transition-colors`,e===n?`bg-primary text-primary-foreground`:`text-muted-foreground hover:text-foreground`),children:(0,C.jsx)(r,{className:`h-4 w-4`})},n))})}var P=[{id:`login`,step:1,title:`首次登录`,commands:[`/login`],description:`登录 Saluzi 账户或设置 API Key`,chapterPath:`docs/guide/getting-started`},{id:`model`,step:2,title:`选择与切换模型`,commands:[`/model`,`/effort`,`/mom`],description:`切换 Max/Pro/Std,调节推理深度,使用 MOM 混合模型`,chapterPath:`docs/guide/model-selection`},{id:`conversation`,step:3,title:`对话基础与多轮交互`,commands:[`/compact`,`/resume`,`/rewind`,`/export`],description:`第一次提问、多轮对话、流式输出、对话压缩与导出恢复`,chapterPath:`docs/guide/conversation-basics`},{id:`shortcuts`,step:4,title:`快捷键与模式切换`,commands:[`Shift+Tab`,`Ctrl+C`,`/keybindings`],description:`一键打断、切换计划模式、搜历史输入;不合手还能自定义按键`,chapterPath:`docs/guide/keyboard-shortcuts`},{id:`commit`,step:5,title:`查看与提交代码`,commands:[`/diff`,`/commit`,`/commit-push-pr`],description:`预览改动、提交、推送并创建 PR 一条龙`,chapterPath:`docs/guide/commit-workflow`},{id:`context`,step:6,title:`上下文与项目记忆`,commands:[`/add-dir`,`/memory`,`/compact`],description:`挂载目录、SALUZI.md 项目记忆、个人偏好,让 AI 更懂你的项目`,chapterPath:`docs/guide/context-tips`},{id:`cost`,step:7,title:`查看消耗`,commands:[`/cost`,`/stats`],description:`当前会话花费与历史统计`,chapterPath:`docs/guide/cost-usage`},{id:`troubleshoot`,step:8,title:`排障`,commands:[`/doctor`,`/help`,`/permissions`,`/plan`],description:`诊断安装、查命令、调整权限、规划模式`,chapterPath:`docs/guide/troubleshooting`}];function F({workflow:e,onSelect:t}){return(0,C.jsxs)(`button`,{type:`button`,onClick:()=>e.chapterPath&&t?.(e.chapterPath),className:S(`group flex w-full flex-col gap-2 rounded-xl border border-border bg-card p-5 text-left`,`transition-shadow hover:shadow-md`,!e.chapterPath&&`cursor-default`),disabled:!e.chapterPath,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(`span`,{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary text-sm font-semibold text-primary-foreground`,children:e.step}),(0,C.jsx)(`h3`,{className:`font-display text-base font-semibold text-foreground`,children:e.title}),e.chapterPath&&(0,C.jsx)(g,{className:`ml-auto h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-1`})]}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.commands.map(e=>(0,C.jsx)(`code`,{className:`rounded-md border border-border-light bg-background px-2 py-0.5 font-mono text-xs text-foreground`,children:e},e))})]})}function I({command:e,onSelect:t}){let n=e.descriptionZh||e.description||`—`,r=!!e.detail,i=r&&t,a=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsxs)(`code`,{className:`font-mono text-sm font-semibold text-primary`,children:[`/`,e.name]}),e.aliases?.length?(0,C.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`alias: `,e.aliases.map(e=>`/${e}`).join(`, `)]}):null]}),(0,C.jsx)(`p`,{className:`text-sm text-foreground`,children:n}),r?(0,C.jsxs)(`span`,{className:`mt-0.5 inline-flex items-center gap-1 text-xs font-medium text-primary`,children:[`查看详情`,(0,C.jsx)(g,{className:`h-3 w-3 transition-transform group-hover:translate-x-0.5`})]}):null]}),o=`group flex w-full flex-col gap-1.5 rounded-lg border border-border bg-card p-4 text-left transition-shadow`+(i?` hover:shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-primary`:``);return i?(0,C.jsx)(`button`,{type:`button`,className:o,onClick:()=>t?.(e.name),children:a}):(0,C.jsx)(`div`,{className:o,children:a})}function L({preview:e}){let t=e.kind===`floating`,n=e.kind===`pane`;return(0,C.jsxs)(`div`,{className:`my-4`,children:[(0,C.jsx)(`p`,{className:`mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`面板预览 · Panel Preview`}),(0,C.jsxs)(`div`,{className:S(`overflow-hidden rounded-lg border border-border bg-[#0b0e14] shadow-sm`,t&&`rotate-[0.3deg] shadow-md`),children:[n?(0,C.jsxs)(`div`,{className:`flex items-stretch border-b border-white/10 bg-white/5`,children:[(0,C.jsx)(`div`,{className:`w-1.5 shrink-0 bg-primary`}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5`,children:[(0,C.jsx)(`span`,{className:`font-mono text-xs font-semibold text-foreground`,children:e.title}),e.subtitle?(0,C.jsx)(`span`,{className:`ml-2 font-mono text-xs text-muted-foreground`,children:e.subtitle}):null]})]}):(0,C.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-white/10 bg-white/5 px-3 py-1.5`,children:[(0,C.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,C.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#ff5f56]`}),(0,C.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#ffbd2e]`}),(0,C.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[#27c93f]`})]}),(0,C.jsx)(`span`,{className:`ml-1 font-mono text-xs font-semibold text-foreground`,children:e.title}),e.subtitle?(0,C.jsx)(`span`,{className:`ml-2 font-mono text-xs text-muted-foreground`,children:e.subtitle}):null]}),(0,C.jsx)(`div`,{className:S(`font-mono text-[13px] leading-relaxed`,`px-4 py-3`),children:e.lines.map((e,t)=>(0,C.jsx)(R,{line:e},t))}),e.footer?(0,C.jsx)(`div`,{className:`border-t border-white/10 bg-white/5 px-3 py-1.5`,children:(0,C.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.footer})}):null]})]})}function R({line:e}){switch(e.type){case`heading`:return(0,C.jsx)(`div`,{className:`mt-2 mb-1 font-bold text-primary`,children:e.text});case`text`:return(0,C.jsx)(`div`,{className:`text-foreground`,children:e.text});case`dim`:return(0,C.jsx)(`div`,{className:`text-muted-foreground`,children:e.text});case`code`:return(0,C.jsx)(`div`,{className:`rounded bg-white/5 px-2 py-0.5 text-[#7dd3fc]`,children:e.text});case`success`:return(0,C.jsx)(`div`,{className:`text-[#27c93f]`,children:e.text});case`warn`:return(0,C.jsx)(`div`,{className:`text-[#ffbd2e]`,children:e.text});case`divider`:return(0,C.jsx)(`div`,{className:`my-1 border-t border-white/10`});case`kv`:return(0,C.jsxs)(`div`,{className:`text-foreground`,children:[(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),e.value?(0,C.jsx)(`span`,{className:`mx-1 text-muted-foreground`,children:`:`}):null,e.value?(0,C.jsx)(`span`,{className:`text-foreground`,children:e.value}):null]});case`item`:return(0,C.jsxs)(`div`,{className:S(`flex items-center gap-2 rounded px-2 py-0.5`,e.focused?`bg-primary text-primary-foreground`:`text-foreground hover:bg-white/5`),children:[(0,C.jsx)(`span`,{className:e.focused?`text-primary-foreground`:`text-muted-foreground`,children:e.focused?`❯`:` `}),(0,C.jsx)(`span`,{children:e.text})]});default:return null}}function z({title:e,children:t}){return(0,C.jsxs)(`section`,{className:`mb-10`,children:[(0,C.jsx)(`h2`,{className:`mb-3 font-display text-lg font-semibold text-primary`,children:e}),(0,C.jsx)(`div`,{className:`text-sm leading-relaxed text-foreground`,children:t})]})}function B({command:e,onBack:t}){let n=e.detail,r=e.descriptionZh||e.description,i=n?.summary||r||`—`;return(0,C.jsxs)(`div`,{className:`mx-auto max-w-3xl px-10 py-12 sm:px-14 sm:py-16`,children:[(0,C.jsxs)(`button`,{type:`button`,onClick:t,className:`mb-8 inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:[(0,C.jsx)(h,{className:`h-4 w-4`}),`返回命令宝典`]}),(0,C.jsxs)(`header`,{className:`mb-10 border-b border-border pb-8`,children:[(0,C.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Command`}),(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,C.jsxs)(`code`,{className:`font-mono text-3xl font-bold text-foreground`,children:[`/`,e.name]}),e.aliases?.length?(0,C.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.aliases.map(e=>(0,C.jsxs)(`span`,{className:`rounded-full border border-border-light bg-muted px-2.5 py-0.5 font-mono text-xs text-muted-foreground`,children:[`/`,e]},e))}):null]}),(0,C.jsx)(`p`,{className:`mt-4 font-serif text-base leading-relaxed text-muted-foreground`,children:i})]}),n?(0,C.jsxs)(C.Fragment,{children:[n.panelPreview?(0,C.jsx)(L,{preview:n.panelPreview}):null,(0,C.jsx)(z,{title:`使用场景`,children:n.scenario}),(0,C.jsx)(z,{title:`使用方式`,children:n.usage}),n.parameters?.length?(0,C.jsx)(z,{title:`参数说明`,children:(0,C.jsx)(`dl`,{className:`space-y-3`,children:n.parameters.map(e=>(0,C.jsxs)(`div`,{className:`rounded-lg border border-border-light bg-card p-3`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsx)(`code`,{className:`font-mono text-sm font-semibold text-foreground`,children:e.name}),e.required?(0,C.jsx)(`span`,{className:`rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-primary`,children:`必填`}):(0,C.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 text-[10px] font-semibold uppercase text-muted-foreground`,children:`可选`}),e.default?(0,C.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`默认:`,(0,C.jsx)(`code`,{className:`font-mono`,children:e.default})]}):null]}),(0,C.jsx)(`p`,{className:`mt-1.5 text-sm text-foreground`,children:e.description}),e.example?(0,C.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`示例:`,(0,C.jsx)(`code`,{className:`font-mono text-foreground`,children:e.example})]}):null]},e.name))})}):(0,C.jsx)(z,{title:`参数说明`,children:(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`该命令无参数。`})}),n.examples?.length?(0,C.jsx)(z,{title:`示例`,children:(0,C.jsx)(`ul`,{className:`space-y-3`,children:n.examples.map(e=>(0,C.jsxs)(`li`,{className:`rounded-lg border border-border-light bg-card p-3`,children:[(0,C.jsx)(`code`,{className:`block font-mono text-sm text-primary`,children:e.command}),(0,C.jsx)(`p`,{className:`mt-1 text-sm text-foreground`,children:e.description})]},e.command))})}):null,n.tips?.length?(0,C.jsx)(z,{title:`小贴士`,children:(0,C.jsx)(`ul`,{className:`space-y-1.5`,children:n.tips.map((e,t)=>(0,C.jsxs)(`li`,{className:`flex gap-2 text-sm text-foreground`,children:[(0,C.jsx)(`span`,{className:`text-primary`,children:`·`}),(0,C.jsx)(`span`,{children:e})]},t))})}):null]}):(0,C.jsx)(z,{title:`使用方式`,children:(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`该命令暂无详细说明。`})})]})}function V(){return(0,C.jsxs)(`div`,{className:`parade-preview-root`,style:{margin:`24px 0`},children:[(0,C.jsx)(`style`,{children:H}),(0,C.jsxs)(`div`,{className:`pp-window`,children:[(0,C.jsx)(`div`,{className:`pp-cube-stage`,children:(0,C.jsx)(`div`,{className:`pp-cube`})}),(0,C.jsxs)(`div`,{className:`pp-panel`,children:[(0,C.jsxs)(`div`,{className:`pp-counts-row`,children:[(0,C.jsx)(`span`,{className:`pp-running-count`,children:`2`}),(0,C.jsx)(`span`,{className:`pp-counts-sep`,children:`/`}),(0,C.jsxs)(`span`,{className:`pp-waiting-pill`,children:[(0,C.jsx)(`span`,{className:`pp-dot`}),`1`]})]}),(0,C.jsxs)(`div`,{className:`pp-sessions`,children:[(0,C.jsx)(`div`,{className:`pp-session-row`,children:`cli · coding auth module`}),(0,C.jsx)(`div`,{className:`pp-session-row`,children:`cli · review PR #42`}),(0,C.jsx)(`div`,{className:`pp-session-row pp-blocked`,children:`cli · waiting approval`})]}),(0,C.jsx)(`div`,{className:`pp-ws-status`})]})]}),(0,C.jsx)(`div`,{className:`pp-caption`,children:`示意图 · 实际数据来自当前会话`})]})}var H=`
3
- .parade-preview-root .pp-window {
4
- width: 100%;
5
- max-width: 320px;
6
- aspect-ratio: 220 / 130;
7
- display: flex;
8
- border-radius: 10px;
9
- overflow: hidden;
10
- background: #15121f;
11
- box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(139, 92, 246, 0.18);
12
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
13
- color: #e7e3f4;
14
- user-select: none;
15
- }
16
- .parade-preview-root .pp-cube-stage {
17
- flex: 0 0 43%;
18
- position: relative;
19
- background:
20
- radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.35) 0%, transparent 60%),
21
- linear-gradient(180deg, #1d1830 0%, #15121f 100%);
22
- display: flex;
23
- align-items: center;
24
- justify-content: center;
25
- border-right: 1px solid rgba(139, 92, 246, 0.18);
26
- perspective: 200px;
27
- }
28
- .parade-preview-root .pp-cube-stage::after {
29
- content: '';
30
- position: absolute;
31
- inset: 14px;
32
- border: 1px solid rgba(139, 92, 246, 0.12);
33
- border-radius: 8px;
34
- pointer-events: none;
35
- }
36
- .parade-preview-root .pp-cube {
37
- width: 22px;
38
- height: 22px;
39
- position: relative;
40
- transform-style: preserve-3d;
41
- transform: rotateX(-28deg) rotateY(45deg);
42
- animation: pp-cube-spin 8s linear infinite;
43
- background: rgba(139, 92, 246, 0.45);
44
- border: 1px solid #8B5CF6;
45
- }
46
- .parade-preview-root .pp-cube::before,
47
- .parade-preview-root .pp-cube::after {
48
- content: '';
49
- position: absolute;
50
- inset: 0;
51
- }
52
- .parade-preview-root .pp-cube::before {
53
- transform: rotateY(90deg) translateZ(11px);
54
- background: rgba(167, 139, 250, 0.55);
55
- border: 1px solid #a78bfa;
56
- }
57
- .parade-preview-root .pp-cube::after {
58
- transform: rotateX(90deg) translateZ(11px);
59
- background: rgba(109, 40, 217, 0.4);
60
- border: 1px solid #6d28d9;
61
- }
62
- @keyframes pp-cube-spin {
63
- from { transform: rotateX(-28deg) rotateY(0deg); }
64
- to { transform: rotateX(-28deg) rotateY(360deg); }
65
- }
66
- @media (prefers-reduced-motion: reduce) {
67
- .parade-preview-root .pp-cube { animation: none; }
68
- }
69
- .parade-preview-root .pp-panel {
70
- flex: 1;
71
- padding: 12px 14px 10px;
72
- display: flex;
73
- flex-direction: column;
74
- gap: 8px;
75
- background: linear-gradient(180deg, #1d1830 0%, #15121f 100%);
76
- position: relative;
77
- }
78
- .parade-preview-root .pp-counts-row {
79
- display: flex;
80
- align-items: baseline;
81
- gap: 8px;
82
- }
83
- .parade-preview-root .pp-running-count {
84
- font-size: 28px;
85
- font-weight: 700;
86
- line-height: 1;
87
- color: #a78bfa;
88
- letter-spacing: -0.5px;
89
- font-variant-numeric: tabular-nums;
90
- }
91
- .parade-preview-root .pp-counts-sep {
92
- font-size: 14px;
93
- color: #5c5575;
94
- font-weight: 300;
95
- }
96
- .parade-preview-root .pp-waiting-pill {
97
- display: inline-flex;
98
- align-items: center;
99
- gap: 4px;
100
- padding: 2px 7px;
101
- border-radius: 9px;
102
- background: rgba(251, 191, 36, 0.12);
103
- color: #fbbf24;
104
- font-size: 11px;
105
- font-weight: 600;
106
- line-height: 1.3;
107
- font-variant-numeric: tabular-nums;
108
- }
109
- .parade-preview-root .pp-waiting-pill .pp-dot {
110
- width: 5px;
111
- height: 5px;
112
- border-radius: 50%;
113
- background: #fbbf24;
114
- box-shadow: 0 0 4px #fbbf24;
115
- }
116
- .parade-preview-root .pp-sessions {
117
- flex: 1;
118
- display: flex;
119
- flex-direction: column;
120
- gap: 3px;
121
- min-height: 0;
122
- }
123
- .parade-preview-root .pp-session-row {
124
- font-size: 10.5px;
125
- line-height: 1.35;
126
- color: #9b94b8;
127
- padding: 2px 0 2px 14px;
128
- position: relative;
129
- font-variant-numeric: tabular-nums;
130
- overflow: hidden;
131
- text-overflow: ellipsis;
132
- white-space: nowrap;
133
- }
134
- .parade-preview-root .pp-session-row::before {
135
- content: '';
136
- position: absolute;
137
- left: 0;
138
- top: 50%;
139
- transform: translateY(-50%);
140
- width: 4px;
141
- height: 4px;
142
- border-radius: 50%;
143
- background: #8B5CF6;
144
- }
145
- .parade-preview-root .pp-session-row.pp-blocked { color: #c9a96a; }
146
- .parade-preview-root .pp-session-row.pp-blocked::before { background: #fbbf24; }
147
- .parade-preview-root .pp-ws-status {
148
- position: absolute;
149
- bottom: 5px;
150
- right: 6px;
151
- width: 6px;
152
- height: 6px;
153
- border-radius: 50%;
154
- background: #4ade80;
155
- box-shadow: 0 0 4px #4ade80;
156
- }
157
- .parade-preview-root .pp-caption {
158
- margin-top: 8px;
159
- font-size: 12px;
160
- color: #9b94b8;
161
- text-align: center;
162
- font-style: italic;
163
- }
164
- `,U=(0,f.lazy)(async()=>({default:(await a(()=>import(`./streamdown-nMT_aKRc.js`).then(e=>e.n),__vite__mapDeps([0,1,2]))).Streamdown}));function W(e){let t=e.split(`
165
- `),n=[],r=!1,i=``;for(let e=0;e<t.length;e++){let a=t[e],o=a.trim(),s=/^(`{3}|~{3})/.exec(o);if(s){r?o.startsWith(i.repeat(3))&&(r=!1,i=``):(r=!0,i=s[1][0]),n.push(a);continue}if(r){n.push(a);continue}if(o===``||/^#{1,6} /.test(o)||o.startsWith(`|`)||/^[-*+]\s/.test(o)||/^\d+\.\s/.test(o)||o.startsWith(`>`)||/^(-{3,}|\*{3,}|_{3,})$/.test(o)||o.startsWith("```")){n.push(a);continue}let c=(n[n.length-1]??``).trim();c!==``&&!/^#{1,6} /.test(c)&&!c.startsWith(`|`)&&!/^[-*+]\s/.test(c)&&!/^\d+\.\s/.test(c)&&!c.startsWith(`>`)&&!/^(-{3,}|\*{3,}|_{3,})$/.test(c)&&!c.startsWith("```")&&n.push(``),n.push(a)}return n.join(`
166
- `)}var G=`::parade-preview::`;function K(e){return e.replace(/[*_`~]/g,``).replace(/[^\p{L}\p{N}\s-]/gu,``).trim().toLowerCase().replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)}function q(e){let t=e.split(`
167
- `),n=[],r=!1,i=``;for(let e of t){let t=e.trim(),a=/^(`{3}|~{3})/.exec(t);if(a){r?t.startsWith(i.repeat(3))&&(r=!1,i=``):(r=!0,i=a[1][0]);continue}if(r)continue;let o=/^(#{2,3})\s+(.+?)\s*$/.exec(t);if(!o)continue;let s=o[1].length,c=o[2],l=K(c);l&&n.push({level:s,text:c,slug:l})}let a=new Map;return n.map(e=>{let t=a.get(e.slug)??0;return a.set(e.slug,t+1),t===0?e:{...e,slug:`${e.slug}-${t}`}})}function J(e){let t=[],n=e.split(G);for(let e=0;e<n.length;e++)n[e]&&t.push({kind:`md`,content:W(n[e])}),e<n.length-1&&t.push({kind:`parade-preview`});return t}function Y({chapter:e,path:t,onNavigate:n}){let r=e.frontmatter.title??t,i=(0,f.useRef)(null),a=(0,f.useRef)(null),[o,s]=(0,f.useState)(null),c=(0,f.useMemo)(()=>J(e.content.replace(/^\{\/\*[\s\S]*?\*\/\}\s*\n/gm,``).replace(/^\{\/\*[\s\S]*?\*\/\}/gm,``)),[e.content]),l=(0,f.useMemo)(()=>q(e.content),[e.content]);(0,f.useEffect)(()=>{if(!i.current||l.length===0)return;let e=i.current,t=()=>{e.querySelectorAll(`h2, h3`).forEach((e,t)=>{let n=l[t];n&&(e.id!==n.slug&&(e.id=n.slug),e.style.scrollMarginTop!==`5rem`&&(e.style.scrollMarginTop=`5rem`))})};t();let n=new MutationObserver(()=>t());return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[l,c]),(0,f.useEffect)(()=>{if(!i.current)return;let e=i.current.parentElement;for(;e&&getComputedStyle(e).overflowY!==`auto`;)e=e.parentElement;a.current=e},[]),(0,f.useEffect)(()=>{let e=a.current;if(!e||l.length===0)return;let t=()=>{let t=e.scrollTop,n=null;for(let e of l){let r=document.getElementById(e.slug);if(r)if(r.offsetTop-120<=t)n=e;else break}s(n?.slug??null)};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[l]);function u(e){if(!n)return null;if(e.startsWith(`docs/`))return e;let r=e.replace(/^(?:\.\.\/|\.\/|\/)+/,``);return r=r.replace(/\.(md|mdx)$/,``),r?`${t.split(`/`).slice(0,-1).join(`/`)}/${r}`:null}function d(e){if(!n)return;let t=e.target.closest(`a`);if(!t)return;let r=t.getAttribute(`href`);if(!r||/^(https?:|mailto:|#)/.test(r))return;let i=u(r);i&&(e.preventDefault(),n(i))}function p(e){let t=document.getElementById(e);if(t){t.scrollIntoView({behavior:`smooth`,block:`start`}),s(e);return}let n=0,r=window.setInterval(()=>{n+=1;let t=document.getElementById(e);t?(window.clearInterval(r),t.scrollIntoView({behavior:`smooth`,block:`start`}),s(e)):n>=20&&window.clearInterval(r)},50)}let m=l.length>=2;return(0,C.jsx)(`div`,{className:`mx-auto max-w-5xl px-6 py-12 sm:px-10 sm:py-16`,children:(0,C.jsxs)(`div`,{className:`flex gap-10`,children:[(0,C.jsxs)(`article`,{ref:i,className:`min-w-0 max-w-2xl flex-1 px-2 sm:px-4`,onClick:d,children:[(0,C.jsxs)(`header`,{className:`mb-12 border-b border-border pb-8`,children:[(0,C.jsx)(`h1`,{className:`font-display text-4xl font-bold leading-tight tracking-tight text-foreground`,children:r}),e.frontmatter.description?(0,C.jsx)(`p`,{className:`mt-4 font-serif text-lg leading-relaxed text-muted-foreground`,children:e.frontmatter.description}):null,e.frontmatter.keywords?.length?(0,C.jsx)(`div`,{className:`mt-6 flex flex-wrap gap-2`,children:e.frontmatter.keywords.map(e=>(0,C.jsx)(`span`,{className:`rounded-full border border-border-light bg-muted px-3 py-1 text-xs font-medium text-muted-foreground`,children:e},e))}):null]}),(0,C.jsx)(`div`,{className:`chapter-content max-w-none`,children:(0,C.jsx)(f.Suspense,{fallback:(0,C.jsx)(`div`,{className:`py-8 text-sm text-muted-foreground`,children:`Loading content…`}),children:c.map((e,t)=>e.kind===`parade-preview`?(0,C.jsx)(V,{},`pp-${t}`):(0,C.jsx)(U,{children:e.content},`md-${t}`))})})]}),m?(0,C.jsx)(`aside`,{className:`sticky top-4 hidden h-[calc(100vh-2rem)] w-56 shrink-0 self-start overflow-y-auto lg:block`,children:(0,C.jsxs)(`nav`,{"aria-label":`章节目录`,children:[(0,C.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`本章目录`}),(0,C.jsx)(`ul`,{className:`space-y-1 border-l border-border-light`,children:l.map(e=>{let t=o===e.slug;return(0,C.jsx)(`li`,{className:e.level===3?`ml-3`:``,children:(0,C.jsx)(`button`,{type:`button`,onClick:()=>p(e.slug),className:`block w-full border-l-2 py-1 pl-3 text-left text-xs leading-relaxed transition-colors `+(t?`border-primary text-primary`:`border-transparent text-muted-foreground hover:text-foreground`),style:{marginLeft:`-1px`},children:e.text})},e.slug)})})]})}):null]})})}var X=null;async function Z(){if(X)return X;let e=await fetch(`./guide-data.json`);if(!e.ok)throw Error(`Failed to load guide-data.json: ${e.status}`);return X=await e.json(),X}function Q(){let e=window.location.hash.replace(/^#\/?/,``);if(!e)return{kind:`home`};if(e===`commands`)return{kind:`commands`};if(e.startsWith(`commands/`)){let t=e.slice(9);return t?{kind:`command`,name:t}:{kind:`commands`}}return{kind:`chapter`,path:e}}function te(e){return e.kind===`home`?`#/`:e.kind===`commands`?`#/commands`:e.kind===`command`?`#/commands/${e.name}`:`#/${e.path}`}function ne(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)(()=>Q()),o=(0,f.useRef)(null),s=(0,f.useRef)(!1);if((0,f.useEffect)(()=>{Z().then(t).catch(e=>r(e.message??String(e)))},[]),(0,f.useEffect)(()=>{let e=()=>a(Q());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,f.useEffect)(()=>{o.current?.scrollTo(0,0)},[i]),n)return(0,C.jsx)(`div`,{className:`flex h-screen items-center justify-center`,children:(0,C.jsxs)(`div`,{className:`max-w-md rounded-xl border border-destructive bg-card p-8 text-center`,children:[(0,C.jsx)(`h1`,{className:`font-display text-xl font-bold text-destructive`,children:`加载失败`}),(0,C.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:n}),(0,C.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[`请确认 guide-data.json 已生成(运行 `,(0,C.jsx)(`code`,{children:`npm run build:guide`}),`)。`]})]})});if(!e)return(0,C.jsx)(`div`,{className:`flex h-screen items-center justify-center text-muted-foreground`,children:`Loading guide…`});let c=e=>{window.location.hash!==e&&(window.history.pushState(null,``,e),s.current=!0)},l=e=>{c(te(e)),a(e)},u=e=>{if(e===`__commands__`){l({kind:`commands`});return}l({kind:`chapter`,path:e})},d=e=>{l({kind:`command`,name:e})},p=()=>{l({kind:`commands`})},m=()=>{l({kind:`home`})},h=()=>{s.current&&window.history.length>1?window.history.back():p()},g=i.kind===`chapter`?i.path:i.kind===`commands`||i.kind===`command`?`__commands__`:null;return(0,C.jsxs)(`div`,{className:`flex h-screen w-screen overflow-hidden bg-background text-foreground`,children:[(0,C.jsx)(w,{navigation:e.navigation,selected:g,onSelect:u,onHome:m}),(0,C.jsxs)(`main`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,C.jsx)(`header`,{className:`flex h-16 items-center justify-end border-b border-border bg-background/80 px-8 backdrop-blur-sm`,children:(0,C.jsx)(N,{})}),(0,C.jsx)(`div`,{ref:o,className:`flex-1 overflow-y-auto`,children:i.kind===`home`?(0,C.jsx)(re,{data:e,onSelect:u}):i.kind===`commands`?(0,C.jsx)(ie,{data:e,onSelectCommand:d}):i.kind===`command`?(0,C.jsx)(ae,{data:e,name:i.name,onBack:h}):(0,C.jsx)(oe,{data:e,path:i.path,onSelect:u})})]})]})}function re({data:e,onSelect:t}){return(0,C.jsxs)(`div`,{className:`mx-auto max-w-5xl px-10 py-16 sm:px-16 sm:py-20`,children:[(0,C.jsxs)(`header`,{className:`mb-16`,children:[(0,C.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Saluzi Guide`}),(0,C.jsx)(`h1`,{className:`font-display text-5xl font-bold leading-tight tracking-tight text-foreground`,children:`使用指南`}),(0,C.jsx)(`p`,{className:`mt-5 max-w-2xl font-serif text-lg leading-relaxed text-muted-foreground`,children:`Terminal-native agentic coding system · 终端原生的 AI 编程系统。 从新手入门到 Saluzi 特色,按你的节奏探索。`})]}),(0,C.jsxs)(`section`,{className:`mb-20`,children:[(0,C.jsxs)(`div`,{className:`mb-8 flex items-baseline justify-between border-b border-border pb-3`,children:[(0,C.jsx)(`h2`,{className:`font-display text-2xl font-semibold text-foreground`,children:`新手 Top 8 工作流`}),(0,C.jsx)(`span`,{className:`text-xs uppercase tracking-wider text-muted-foreground`,children:`按推荐顺序`})]}),(0,C.jsx)(`div`,{className:`grid grid-cols-1 gap-5 md:grid-cols-2`,children:P.map(e=>(0,C.jsx)(F,{workflow:e,onSelect:t},e.id))})]}),(0,C.jsxs)(`section`,{children:[(0,C.jsxs)(`div`,{className:`mb-8 flex items-baseline justify-between border-b border-border pb-3`,children:[(0,C.jsx)(`h2`,{className:`font-display text-2xl font-semibold text-foreground`,children:`Saluzi 特色`}),(0,C.jsx)(`span`,{className:`text-xs uppercase tracking-wider text-muted-foreground`,children:`saluzi 独有`})]}),(0,C.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:e.navigation.find(e=>e.group===`Saluzi 特色`)?.pages.flatMap(e=>e.pages?e.pages:[e]).filter(e=>e.path).map(e=>(0,C.jsxs)(`button`,{type:`button`,onClick:()=>e.path&&t(e.path),className:`group flex items-center justify-between rounded-xl border border-border bg-card p-4 text-left transition-shadow hover:shadow-md`,children:[(0,C.jsx)(`span`,{className:`font-display text-base font-medium text-foreground`,children:e.title??e.path}),(0,C.jsx)(g,{className:`h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-1`})]},e.path))??null})]})]})}function ie({data:e,onSelectCommand:t}){let n=Object.values(e.commands).filter(e=>e.detail).length;return(0,C.jsxs)(`div`,{className:`mx-auto max-w-4xl px-10 py-16 sm:px-14 sm:py-20`,children:[(0,C.jsxs)(`header`,{className:`mb-14 border-b border-border pb-8`,children:[(0,C.jsx)(`p`,{className:`mb-3 text-xs font-semibold uppercase tracking-[0.2em] text-primary`,children:`Command Dictionary`}),(0,C.jsx)(`h1`,{className:`font-display text-4xl font-bold tracking-tight text-foreground`,children:`命令宝典`}),(0,C.jsxs)(`p`,{className:`mt-4 font-serif text-base leading-relaxed text-muted-foreground`,children:[`按分类列出所有可用命令(共 `,Object.keys(e.commands).length,` 条,其中 `,n,` `,`条含详解)。点击任意命令卡片查看命令名、简介、使用场景、使用方式与参数说明。`]})]}),e.categories.map(e=>(0,C.jsxs)(`section`,{className:`mb-14`,children:[(0,C.jsx)(`h2`,{className:`mb-6 font-display text-xl font-semibold text-primary`,children:e.titleZh??e.title}),(0,C.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:e.commands.map(e=>(0,C.jsx)(I,{command:e,onSelect:t},e.name))})]},e.id))]})}function ae({data:e,name:t,onBack:n}){let r=e.commands[t];return r?(0,C.jsx)(B,{command:r,onBack:n}):(0,C.jsxs)(`div`,{className:`mx-auto max-w-2xl px-10 py-16`,children:[(0,C.jsx)(`button`,{type:`button`,onClick:n,className:`mb-6 text-sm text-muted-foreground hover:text-foreground`,children:`← 返回命令宝典`}),(0,C.jsx)(`h1`,{className:`font-display text-3xl font-bold text-foreground`,children:`未找到命令`}),(0,C.jsxs)(`p`,{className:`mt-3 font-mono text-sm text-muted-foreground`,children:[`/`,t]}),(0,C.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`该命令可能已移除或重命名。`})]})}function oe({data:e,path:t,onSelect:n}){let r=e.chapters[t];return r?(0,C.jsx)(Y,{chapter:r,path:t,onNavigate:n}):(0,C.jsxs)(`div`,{className:`mx-auto max-w-2xl px-10 py-16`,children:[(0,C.jsx)(`h1`,{className:`font-display text-3xl font-bold text-foreground`,children:`未找到章节`}),(0,C.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:`该章节可能已移除或重命名。`})]})}var $=document.getElementById(`root`);if(!$)throw Error(`root element not found`);(0,x.createRoot)($).render((0,C.jsx)(f.StrictMode,{children:(0,C.jsx)(ne,{})}));