@saluzi/saluzi-edu 0.2.35 → 0.2.36

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,5 +1,5 @@
1
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-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),g=m(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_=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}){return(0,C.jsxs)(`nav`,{className:`flex h-full w-64 flex-col border-r border-border bg-card`,children:[(0,C.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,children:[(0,C.jsx)(`h1`,{className:`font-display text-lg font-bold text-primary`,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)(g,{className:`h-3 w-3`}):(0,C.jsx)(_,{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:`add-dir`,step:3,title:`添加目录与基本对话`,commands:[`/add-dir`],description:`挂载项目目录,直接提问,AI 读代码、改文件、跑命令`,chapterPath:`docs/guide/conversation-basics`},{id:`commit`,step:4,title:`查看与提交代码`,commands:[`/diff`,`/commit`,`/commit-push-pr`],description:`预览改动、提交、推送并创建 PR 一条龙`,chapterPath:`docs/guide/getting-started`},{id:`context`,step:5,title:`上下文管理`,commands:[`/compact`,`/context`,`/clear`],description:`压缩长对话、可视化 token 占用、重置会话`,chapterPath:`docs/guide/context-tips`},{id:`cost`,step:6,title:`查看消耗`,commands:[`/cost`,`/usage`,`/stats`],description:`当前会话花费、账户配额、历史统计`},{id:`troubleshoot`,step:7,title:`排障`,commands:[`/doctor`,`/help`,`/permissions`,`/plan`],description:`诊断安装、查命令、调整权限、规划模式`},{id:`advanced`,step:8,title:`进阶探索`,commands:[`/codegraph`,`/oms:autopilot`,`/parade`],description:`CodeGraph 代码智能、OMS 工作流、桌面悬浮提示等 Saluzi 特色功能`,chapterPath:`docs/guide/codegraph`}];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)(h,{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}){let t=e.descriptionZh||e.description||`—`,n=e.whenToUseZh||e.whenToUse;return(0,C.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-lg border border-border bg-card p-4`,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,e.argumentHint?(0,C.jsx)(`span`,{className:`ml-auto rounded border border-border-light px-1.5 py-0.5 font-mono text-xs text-muted-foreground`,children:e.argumentHint}):null]}),(0,C.jsx)(`p`,{className:`text-sm text-foreground`,children:t}),n?(0,C.jsxs)(`p`,{className:S(`text-xs text-muted-foreground`),children:[(0,C.jsx)(`span`,{className:`font-medium`,children:`When to use: `}),n]}):null]})}function L(){return(0,C.jsxs)(`div`,{className:`parade-preview-root`,style:{margin:`24px 0`},children:[(0,C.jsx)(`style`,{children:R}),(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 R=`
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-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),g=m(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_=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}){return(0,C.jsxs)(`nav`,{className:`flex h-full w-64 flex-col border-r border-border bg-card`,children:[(0,C.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,children:[(0,C.jsx)(`h1`,{className:`font-display text-lg font-bold text-primary`,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)(g,{className:`h-3 w-3`}):(0,C.jsx)(_,{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:`commit`,step:4,title:`查看与提交代码`,commands:[`/diff`,`/commit`,`/commit-push-pr`],description:`预览改动、提交、推送并创建 PR 一条龙`,chapterPath:`docs/guide/commit-workflow`},{id:`context`,step:5,title:`上下文与项目记忆`,commands:[`/add-dir`,`/memory`,`/compact`],description:`挂载目录、SALUZI.md 项目记忆、个人偏好,让 AI 更懂你的项目`,chapterPath:`docs/guide/context-tips`},{id:`cost`,step:6,title:`查看消耗`,commands:[`/cost`,`/usage`,`/stats`],description:`当前会话花费、账户配额、历史统计`,chapterPath:`docs/guide/cost-usage`},{id:`troubleshoot`,step:7,title:`排障`,commands:[`/doctor`,`/help`,`/permissions`,`/plan`],description:`诊断安装、查命令、调整权限、规划模式`,chapterPath:`docs/guide/troubleshooting`},{id:`advanced`,step:8,title:`进阶探索:CodeGraph`,commands:[`/codegraph`],description:`本地代码知识图谱,符号搜索、调用链追踪、影响分析`,chapterPath:`docs/guide/codegraph`}];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)(h,{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}){let t=e.descriptionZh||e.description||`—`;return(0,C.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-lg border border-border bg-card p-4`,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:t})]})}function L(){return(0,C.jsxs)(`div`,{className:`parade-preview-root`,style:{margin:`24px 0`},children:[(0,C.jsx)(`style`,{children:R}),(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 R=`
3
3
  .parade-preview-root .pp-window {
4
4
  width: 100%;
5
5
  max-width: 320px;
@@ -163,4 +163,4 @@ import{c as e,l as t,o as n,s as r}from"./streamdown-nMT_aKRc.js";import{t as i}
163
163
  }
164
164
  `,z=(0,f.lazy)(async()=>({default:(await a(()=>import(`./streamdown-nMT_aKRc.js`).then(e=>e.n),__vite__mapDeps([0,1,2]))).Streamdown}));function B(e){let t=e.split(`
165
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 V=`::parade-preview::`;function H(e){let t=[],n=e.split(V);for(let e=0;e<n.length;e++)n[e]&&t.push({kind:`md`,content:B(n[e])}),e<n.length-1&&t.push({kind:`parade-preview`});return t}function U({chapter:e,path:t}){let n=e.frontmatter.title??t,r=(0,f.useMemo)(()=>H(e.content.replace(/^\{\/\*[\s\S]*?\*\/\}\s*\n/gm,``).replace(/^\{\/\*[\s\S]*?\*\/\}/gm,``)),[e.content]);return(0,C.jsxs)(`article`,{className:`mx-auto max-w-2xl px-10 py-16 sm:px-16 sm:py-20`,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:n}),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:r.map((e,t)=>e.kind===`parade-preview`?(0,C.jsx)(L,{},`pp-${t}`):(0,C.jsx)(z,{children:e.content},`md-${t}`))})})]})}var W=null;async function G(){if(W)return W;let e=await fetch(`./guide-data.json`);if(!e.ok)throw Error(`Failed to load guide-data.json: ${e.status}`);return W=await e.json(),W}function K(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)({kind:`home`});if((0,f.useEffect)(()=>{G().then(t).catch(e=>r(e.message??String(e)))},[]),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 o=e=>{a(e===`__commands__`?{kind:`commands`}:{kind:`chapter`,path:e})};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:i.kind===`chapter`?i.path:i.kind===`commands`?`__commands__`:null,onSelect:o}),(0,C.jsxs)(`main`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,C.jsx)(`header`,{className:`flex items-center justify-end border-b border-border bg-background/80 px-8 py-4 backdrop-blur-sm`,children:(0,C.jsx)(N,{})}),(0,C.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:i.kind===`home`?(0,C.jsx)(q,{data:e,onSelect:o}):i.kind===`commands`?(0,C.jsx)(J,{data:e}):(0,C.jsx)(Y,{data:e,path:i.path})})]})]})}function q({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)(h,{className:`h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-1`})]},e.path))??null})]})]})}function J({data:e}){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,` `,`条)。每个命令卡片包含名称、别名、描述与使用时机。`]})]}),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},e.name))})]},e.id))]})}function Y({data:e,path:t}){let n=e.chapters[t];return n?(0,C.jsx)(U,{chapter:n,path:t}):(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 X=document.getElementById(`root`);if(!X)throw Error(`root element not found`);(0,x.createRoot)(X).render((0,C.jsx)(f.StrictMode,{children:(0,C.jsx)(K,{})}));
166
+ `)}var V=`::parade-preview::`;function H(e){let t=[],n=e.split(V);for(let e=0;e<n.length;e++)n[e]&&t.push({kind:`md`,content:B(n[e])}),e<n.length-1&&t.push({kind:`parade-preview`});return t}function U({chapter:e,path:t,onNavigate:n}){let r=e.frontmatter.title??t,i=(0,f.useMemo)(()=>H(e.content.replace(/^\{\/\*[\s\S]*?\*\/\}\s*\n/gm,``).replace(/^\{\/\*[\s\S]*?\*\/\}/gm,``)),[e.content]);function a(e){if(!n)return null;if(e.startsWith(`docs/`))return e;let r=e.replace(/^\.?\.\//,``).replace(/^\.+\//,``);return r=r.replace(/\.(md|mdx)$/,``),r?`${t.split(`/`).slice(0,-1).join(`/`)}/${r}`:null}function o(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=a(r);i&&(e.preventDefault(),n(i))}return(0,C.jsxs)(`article`,{className:`mx-auto max-w-2xl px-10 py-16 sm:px-16 sm:py-20`,onClick:o,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:i.map((e,t)=>e.kind===`parade-preview`?(0,C.jsx)(L,{},`pp-${t}`):(0,C.jsx)(z,{children:e.content},`md-${t}`))})})]})}var W=null;async function G(){if(W)return W;let e=await fetch(`./guide-data.json`);if(!e.ok)throw Error(`Failed to load guide-data.json: ${e.status}`);return W=await e.json(),W}function K(){let[e,t]=(0,f.useState)(null),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)({kind:`home`});if((0,f.useEffect)(()=>{G().then(t).catch(e=>r(e.message??String(e)))},[]),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 o=e=>{a(e===`__commands__`?{kind:`commands`}:{kind:`chapter`,path:e})};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:i.kind===`chapter`?i.path:i.kind===`commands`?`__commands__`:null,onSelect:o}),(0,C.jsxs)(`main`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,C.jsx)(`header`,{className:`flex items-center justify-end border-b border-border bg-background/80 px-8 py-4 backdrop-blur-sm`,children:(0,C.jsx)(N,{})}),(0,C.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:i.kind===`home`?(0,C.jsx)(q,{data:e,onSelect:o}):i.kind===`commands`?(0,C.jsx)(J,{data:e}):(0,C.jsx)(Y,{data:e,path:i.path,onSelect:o})})]})]})}function q({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)(h,{className:`h-4 w-4 text-muted-foreground transition-transform group-hover:translate-x-1`})]},e.path))??null})]})]})}function J({data:e}){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,` `,`条)。每个卡片包含命令名称与描述,部分含别名。`]})]}),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},e.name))})]},e.id))]})}function Y({data:e,path:t,onSelect:n}){let r=e.chapters[t];return r?(0,C.jsx)(U,{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 X=document.getElementById(`root`);if(!X)throw Error(`root element not found`);(0,x.createRoot)(X).render((0,C.jsx)(f.StrictMode,{children:(0,C.jsx)(K,{})}));