loki-mode 9.65.0 → 9.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/completion-council.sh +18 -1
- package/autonomy/lib/done-recognition.sh +12 -0
- package/autonomy/loki +101 -9
- package/autonomy/run.sh +38 -7
- package/dashboard/__init__.py +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/v10/ARCHITECT-CUTS.md +89 -0
- package/docs/v10/BOARD.md +52 -31
- package/docs/v10/METRICS.md +57 -0
- package/docs/v10/PROGRESS.md +9 -0
- package/loki-ts/dist/loki.js +2 -2
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-Oyx-w2Ch.js → AdminPage-ChUvLzkF.js} +1 -1
- package/web-app/dist/assets/{Avatar-D60m65JB.js → Avatar-Dpy96tAc.js} +1 -1
- package/web-app/dist/assets/{Badge-CqfZNaem.js → Badge-BOHHYZTu.js} +1 -1
- package/web-app/dist/assets/{Button-BqjzE4fz.js → Button-B_XqEF7a.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-Czk7o_ou.js → CockpitPage-C0z5QwNJ.js} +1 -1
- package/web-app/dist/assets/{ComparePage-BEfTrTb1.js → ComparePage-KWL6acQk.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-BrLk5nkO.js → ErrorBoundary-BbyBJ4ZP.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-9vEpi5ir.js → EvidenceReceiptPanel-Btblkwfr.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-D6izZx0w.js → GitHubIssuesPanel-7Bi1t04Q.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-BTkG2FgA.js → GitHubPRsPanel-BxZtNprq.js} +1 -1
- package/web-app/dist/assets/{HomePage-nsr4kpN1.js → HomePage-BxDh3-CD.js} +1 -1
- package/web-app/dist/assets/{LoginPage-BVblQrr9.js → LoginPage-DpXq4rQe.js} +1 -1
- package/web-app/dist/assets/{MagicPage-CmnSyLq7.js → MagicPage-DP2k0ioE.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-BVfwU81j.js → MetricsPage-Dus04BUR.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-AYQ6uqqI.js → NotFoundPage--54yr9Cy.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-DMnbw9X9.js → ProjectPage-Cs6LOI7R.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-CNVTAF2N.js → ProjectsPage-5cpa0X1d.js} +1 -1
- package/web-app/dist/assets/SettingsPage-Duc5ApRj.js +10 -0
- package/web-app/dist/assets/{ShowcasePage-2dBCjLXn.js → ShowcasePage-C1wrPZgl.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-Djo6IE4u.js → SystemSettingsPage-CoD3LARj.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-CY8p-yxD.js → TeamsPage-GuQ4YDV5.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-B6iFgH6t.js → TemplatesPage-CvWecmzl.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-B3yzZe-h.js → TerminalOutput-DFZw34kD.js} +1 -1
- package/web-app/dist/assets/{activity-CNfAjtRv.js → activity-BvHkXBYj.js} +1 -1
- package/web-app/dist/assets/{bell-CMETsHPH.js → bell-Bw2j-HI7.js} +1 -1
- package/web-app/dist/assets/{bot-C9kXvk1i.js → bot-BRuEmshQ.js} +1 -1
- package/web-app/dist/assets/{check-BRK-zLB5.js → check-B5uToWdF.js} +1 -1
- package/web-app/dist/assets/{chevron-left-CxI5uD4g.js → chevron-left-D-tXeEPI.js} +1 -1
- package/web-app/dist/assets/{circle-alert-CVFRPWpv.js → circle-alert-p3-Bg3sx.js} +1 -1
- package/web-app/dist/assets/{clock-CLYV8a_x.js → clock-CJc_91vp.js} +1 -1
- package/web-app/dist/assets/{cloud-CiISiIOa.js → cloud-lhmojUN8.js} +1 -1
- package/web-app/dist/assets/{code-xml-DHsgqwV-.js → code-xml-DMvQ2jw1.js} +1 -1
- package/web-app/dist/assets/{database-DbvUqtz3.js → database-EdwkplCN.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-Ct0lRPHw.js → dollar-sign-BQiPo9Co.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-D1sjFEh7.js → file-code-corner-CXUzs2z1.js} +1 -1
- package/web-app/dist/assets/{file-plus-DnmX18Fi.js → file-plus-hS0xkTL5.js} +1 -1
- package/web-app/dist/assets/{globe-bSpDNgoA.js → globe-B6Xk69Fj.js} +1 -1
- package/web-app/dist/assets/{hammer-Bj41Kvlq.js → hammer-B_evoVEr.js} +1 -1
- package/web-app/dist/assets/{index-CxajNJVu.js → index-XZrgDphJ.js} +2 -2
- package/web-app/dist/assets/{layers-BNtBwYER.js → layers-Bb295b4u.js} +1 -1
- package/web-app/dist/assets/{loader-circle-YY_VZofG.js → loader-circle-C8cKZhjP.js} +1 -1
- package/web-app/dist/assets/{lock-rpjEPVoC.js → lock-DcC9B8sE.js} +1 -1
- package/web-app/dist/assets/{package-desXU6XA.js → package-BFz4FYcR.js} +1 -1
- package/web-app/dist/assets/{plus-7AoOU-I9.js → plus-aS4YpFPG.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-oNj-Xn4B.js → refresh-cw-B9_ksndc.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-DeiFjfVO.js → rotate-ccw-CBogZEoT.js} +1 -1
- package/web-app/dist/assets/{scroll-text-Q9AzWiNV.js → scroll-text-DMGgO6uq.js} +1 -1
- package/web-app/dist/assets/{server-DKgVwfek.js → server-CsEqUM8R.js} +1 -1
- package/web-app/dist/assets/{shield-alert-G6x-bS-I.js → shield-alert-Btnj6tmQ.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-Qhk0yvw0.js → thumbs-up-C_NLSPqa.js} +1 -1
- package/web-app/dist/assets/{trash-2-D23gvznl.js → trash-2-zqZc9cSK.js} +1 -1
- package/web-app/dist/assets/{trending-down-CSQClPrr.js → trending-down-BGQh2rVE.js} +1 -1
- package/web-app/dist/assets/{trending-up-sjMSd1wc.js → trending-up-C31TrzUt.js} +1 -1
- package/web-app/dist/assets/{upload-Dchovhld.js → upload-CLwWKjCG.js} +1 -1
- package/web-app/dist/assets/{usePolling-DwLceXwF.js → usePolling-8wwOP53Y.js} +1 -1
- package/web-app/dist/assets/{user-BqZM8CmD.js → user-DUkbxibF.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/web-app/dist/assets/SettingsPage-D1_qasFD.js +0 -10
package/web-app/dist/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
10
|
-
<script type="module" crossorigin src="/lab/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/lab/assets/index-XZrgDphJ.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/lab/assets/index-BfQ0f3-S.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body class="bg-background text-ink font-sans antialiased">
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{c as st,j as e,r as t,y as he,a as ne,z as at,$ as nt,K as ot,I as it,m as lt,E as rt}from"./index-CxajNJVu.js";import{E as ct,R as dt}from"./rotate-ccw-DeiFjfVO.js";import{H as ut}from"./hammer-Bj41Kvlq.js";import{C as xt}from"./cloud-CiISiIOa.js";import{L as mt}from"./loader-circle-YY_VZofG.js";import{C as pt}from"./check-BRK-zLB5.js";import{C as ft}from"./circle-alert-CVFRPWpv.js";/**
|
|
2
|
-
* @license lucide-react v0.577.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ht=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],bt=st("code",ht);function j({label:n,description:r,value:l,onChange:h,disabled:u=!1}){const g=`toggle-${n.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("label",{htmlFor:g,className:"text-sm font-medium text-[#36342E] cursor-pointer",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsx("button",{id:g,type:"button",role:"switch","aria-checked":l,"aria-label":n,disabled:u,onClick:()=>h(!l),className:["relative inline-flex h-6 w-11 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#553DE9]",l?"bg-[#553DE9]":"bg-[#ECEAE3]",u?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:e.jsx("span",{"aria-hidden":"true",className:["pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow-sm transform transition-transform duration-200",l?"translate-x-5":"translate-x-0"].join(" ")})})]})}function f({label:n,description:r,options:l,value:h,onChange:u,disabled:g=!1}){const v=`select-${n.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("div",{className:"flex items-center justify-between py-3",children:[e.jsxs("div",{className:"flex-1 mr-4",children:[e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsx("select",{id:v,value:h,onChange:x=>u(x.target.value),disabled:g,"aria-label":n,className:["px-3 py-1.5 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] min-w-[140px]",g?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:l.map(x=>e.jsx("option",{value:x.value,children:x.label},x.value))})]})}function xe({label:n,description:r,min:l,max:h,value:u,onChange:g,step:v=1,unit:x="",disabled:y=!1}){const w=`slider-${n.replace(/\s+/g,"-").toLowerCase()}`,N=(u-l)/(h-l)*100;return e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:w,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsxs("span",{className:"text-sm font-mono text-[#553DE9] min-w-[48px] text-right",children:[u,x]})]}),e.jsx("input",{id:w,type:"range",min:l,max:h,step:v,value:u,onChange:A=>g(Number(A.target.value)),disabled:y,"aria-label":n,"aria-valuemin":l,"aria-valuemax":h,"aria-valuenow":u,className:"w-full h-2 rounded-full appearance-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",style:{background:`linear-gradient(to right, #553DE9 0%, #553DE9 ${N}%, #ECEAE3 ${N}%, #ECEAE3 100%)`}}),e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsxs("span",{className:"text-[11px] text-[#939084]",children:[l,x]}),e.jsxs("span",{className:"text-[11px] text-[#939084]",children:[h,x]})]})]})}function oe({label:n,description:r,type:l="text",value:h,onChange:u,placeholder:g,disabled:v=!1}){const x=`input-${n.replace(/\s+/g,"-").toLowerCase()}`,[y,w]=t.useState(!1),N=l==="password",A=N&&y?"text":l;return e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"mb-1.5",children:[e.jsx("label",{htmlFor:x,className:"text-sm font-medium text-[#36342E]",children:n}),r&&e.jsx("p",{className:"text-xs text-[#6B6960] mt-0.5",children:r})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:x,type:A,value:h,onChange:C=>u(C.target.value),placeholder:g,disabled:v,"aria-label":n,className:["w-full px-3 py-2 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] placeholder:text-[#939084]",N&&"pr-10",v?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" ")}),N&&e.jsx("button",{type:"button",onClick:()=>w(!y),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-[#939084] hover:text-[#36342E] transition-colors","aria-label":y?"Hide password":"Show password",children:y?e.jsx(ct,{size:16}):e.jsx(he,{size:16})})]})]})}function gt({label:n,className:r=""}){return n?e.jsxs("div",{className:`flex items-center gap-3 ${r}`,children:[e.jsx("span",{className:"flex-1 border-t border-[#ECEAE3] dark:border-[#2A2A30]"}),e.jsx("span",{className:"text-xs text-muted font-medium",children:n}),e.jsx("span",{className:"flex-1 border-t border-[#ECEAE3] dark:border-[#2A2A30]"})]}):e.jsx("hr",{className:`border-t border-[#ECEAE3] dark:border-[#2A2A30] ${r}`})}const be="pl_settings_";function o(n,r){try{const l=localStorage.getItem(`${be}${n}`);return l===null?r:JSON.parse(l)}catch{return r}}function i(n,r){try{localStorage.setItem(`${be}${n}`,JSON.stringify(r))}catch{}}const me=[{id:"general",label:"General",icon:at},{id:"appearance",label:"Appearance",icon:nt},{id:"editor",label:"Editor",icon:bt},{id:"build",label:"Build",icon:ut},{id:"providers",label:"Providers",icon:xt},{id:"shortcuts",label:"Keyboard Shortcuts",icon:ot},{id:"accessibility",label:"Accessibility",icon:he},{id:"about",label:"About",icon:it}],pe=[{id:"claude",name:"Claude",description:"Anthropic Claude Code -- full features (Opus 4.7 default, 1M context)",models:["claude-opus-4-7","claude-sonnet-4-6","claude-haiku-4-5-20251001"],defaultModel:"claude-opus-4-7"},{id:"codex",name:"Codex",description:"OpenAI Codex CLI -- degraded mode",models:["gpt-5.3-codex","o3","o4-mini"],defaultModel:"gpt-5.3-codex"},{id:"gemini",name:"Gemini",description:"Google Gemini CLI -- degraded mode",models:["gemini-3-pro-medium","gemini-2.5-flash","gemini-2.5-pro"],defaultModel:"gemini-3-pro-medium"},{id:"cline",name:"Cline",description:"VS Code extension -- sequential mode",models:["claude-opus-4-7","claude-sonnet-4-6","gpt-4.1"],defaultModel:"claude-opus-4-7"},{id:"aider",name:"Aider",description:"Terminal-based pair programming",models:["claude-opus-4-7","claude-sonnet-4-6","gpt-4.1","ollama_chat/deepseek-coder"],defaultModel:"claude-opus-4-7"}],vt=typeof navigator<"u"&&/Mac/.test(navigator.userAgent),E=vt?"Cmd":"Ctrl",fe=[{action:"Save file",keys:`${E}+S`,category:"File"},{action:"Quick open file",keys:`${E}+P`,category:"File"},{action:"Command palette",keys:`${E}+K`,category:"Navigation"},{action:"Toggle terminal",keys:`${E}+\``,category:"Navigation"},{action:"Start / stop build",keys:`${E}+B`,category:"Build"},{action:"Show keyboard shortcuts",keys:`${E}+?`,category:"Help"},{action:"Close modals",keys:"Escape",category:"Navigation"},{action:"Focus search",keys:`${E}+F`,category:"Navigation"},{action:"Toggle sidebar",keys:`${E}+\\`,category:"Navigation"},{action:"New project",keys:`${E}+N`,category:"File"},{action:"Go to settings",keys:`${E}+,`,category:"Navigation"}];function d({children:n}){return e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[#939084] mb-3 mt-6 first:mt-0",children:n})}function b(){return e.jsx(gt,{className:"my-1"})}function kt(){var ue;const[n,r]=t.useState("general"),[l,h]=t.useState(()=>o("projectDir","~/projects")),[u,g]=t.useState(()=>o("autoSave",!0)),[v,x]=t.useState(()=>o("autoSaveInterval","15")),[y,w]=t.useState(()=>o("language","en")),[N,A]=t.useState(()=>o("telemetry",!1)),[C,ge]=t.useState(()=>{const a=localStorage.getItem("pl_theme");return a==="light"||a==="dark"?a:"system"}),[B,ve]=t.useState(()=>o("accentColor","purple")),[M,je]=t.useState(()=>o("fontSize","medium")),[T,Ee]=t.useState(()=>o("sidebarPosition","left")),[H,ye]=t.useState(()=>o("compactMode",!1)),[G,Ne]=t.useState(()=>o("animationLevel","full")),[$,Ce]=t.useState(()=>o("editorFont","JetBrains Mono")),[I,Se]=t.useState(()=>o("editorFontSize",14)),[O,we]=t.useState(()=>o("tabSize","2")),[_,ke]=t.useState(()=>o("wordWrap",!0)),[V,Ae]=t.useState(()=>o("lineNumbers",!0)),[W,Fe]=t.useState(()=>o("minimap",!0)),[K,Pe]=t.useState(()=>o("bracketMatching",!0)),[q,De]=t.useState(()=>o("defaultProvider","claude")),[J,Le]=t.useState(()=>o("maxIterations",25)),[U,Be]=t.useState(()=>o("qualityStrictness","standard")),[Q,Me]=t.useState(()=>o("autoDeploy",!1)),[X,$e]=t.useState(()=>o("budgetLimit","")),[Y,Ie]=t.useState(()=>o("buildNotifications",!0)),[Z,ze]=t.useState(()=>o("providerKeys",{})),[ee,Re]=t.useState(()=>o("providerModels",{})),[z,Te]=t.useState(()=>o("providerPriority",["claude","codex","gemini","cline","aider"])),[ie,le]=t.useState(null),[R,te]=t.useState({}),[F,He]=t.useState(()=>o("highContrast",!1)),[P,Ge]=t.useState(()=>o("focusIndicator","default")),[k,Oe]=t.useState(()=>o("motionPref","full")),[se,_e]=t.useState(()=>o("screenReaderAnnouncements",!0)),[D,Ve]=t.useState(()=>o("fontScaling","100")),[re,We]=t.useState(""),[L,ce]=t.useState("");t.useEffect(()=>{i("projectDir",l)},[l]),t.useEffect(()=>{i("autoSave",u)},[u]),t.useEffect(()=>{i("autoSaveInterval",v)},[v]),t.useEffect(()=>{i("language",y)},[y]),t.useEffect(()=>{i("telemetry",N)},[N]),t.useEffect(()=>{if(C==="system"){const a=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",a),localStorage.removeItem("pl_theme")}else document.documentElement.classList.toggle("dark",C==="dark"),localStorage.setItem("pl_theme",C)},[C]),t.useEffect(()=>{i("accentColor",B)},[B]),t.useEffect(()=>{i("fontSize",M)},[M]),t.useEffect(()=>{i("sidebarPosition",T)},[T]),t.useEffect(()=>{i("compactMode",H)},[H]),t.useEffect(()=>{i("animationLevel",G)},[G]),t.useEffect(()=>{i("editorFont",$)},[$]),t.useEffect(()=>{i("editorFontSize",I)},[I]),t.useEffect(()=>{i("tabSize",O)},[O]),t.useEffect(()=>{i("wordWrap",_)},[_]),t.useEffect(()=>{i("lineNumbers",V)},[V]),t.useEffect(()=>{i("minimap",W)},[W]),t.useEffect(()=>{i("bracketMatching",K)},[K]),t.useEffect(()=>{i("defaultProvider",q)},[q]),t.useEffect(()=>{i("maxIterations",J)},[J]),t.useEffect(()=>{i("qualityStrictness",U)},[U]),t.useEffect(()=>{i("autoDeploy",Q)},[Q]),t.useEffect(()=>{i("budgetLimit",X)},[X]),t.useEffect(()=>{i("buildNotifications",Y)},[Y]),t.useEffect(()=>{i("providerKeys",Z)},[Z]),t.useEffect(()=>{i("providerModels",ee)},[ee]),t.useEffect(()=>{i("providerPriority",z)},[z]),t.useEffect(()=>{i("highContrast",F)},[F]),t.useEffect(()=>{i("focusIndicator",P)},[P]),t.useEffect(()=>{i("motionPref",k)},[k]),t.useEffect(()=>{i("screenReaderAnnouncements",se)},[se]),t.useEffect(()=>{i("fontScaling",D)},[D]),t.useEffect(()=>{const a=parseInt(D,10);return document.documentElement.style.fontSize=`${15*a/100}px`,()=>{document.documentElement.style.fontSize=""}},[D]),t.useEffect(()=>{document.documentElement.classList.toggle("high-contrast",F)},[F]),t.useEffect(()=>{document.documentElement.classList.toggle("reduce-motion",k==="reduced"),document.documentElement.classList.toggle("no-motion",k==="none")},[k]),t.useEffect(()=>{document.documentElement.classList.toggle("enhanced-focus",P==="enhanced")},[P]),t.useEffect(()=>{ne.getStatus().then(a=>We(a.version||"")).catch(()=>{})},[]);const Ke=t.useCallback(async a=>{le(a),te(c=>{const s={...c};return delete s[a],s});try{await ne.setProvider(a);const c=await ne.getCurrentProvider();te(s=>({...s,[a]:c.provider===a?{ok:!0,message:"Set as default in ~/.loki/config.json"}:{ok:!1,message:`Server reports default is still ${c.provider}`}}))}catch(c){te(s=>({...s,[a]:{ok:!1,message:c instanceof Error?c.message:"Could not set default"}}))}finally{le(null)}},[]),de=t.useCallback((a,c)=>{Te(s=>{const m=s.indexOf(a);if(m===-1)return s;const S=c==="up"?m-1:m+1;if(S<0||S>=s.length)return s;const p=[...s];return[p[m],p[S]]=[p[S],p[m]],p})},[]);function qe(){switch(n){case"general":return e.jsx(Je,{});case"appearance":return e.jsx(Ue,{});case"editor":return e.jsx(Qe,{});case"build":return e.jsx(Xe,{});case"providers":return e.jsx(Ye,{});case"shortcuts":return e.jsx(Ze,{});case"accessibility":return e.jsx(et,{});case"about":return e.jsx(tt,{});default:return null}}function Je(){return e.jsxs("div",{children:[e.jsx(d,{children:"Project"}),e.jsx(oe,{label:"Default project directory",description:"New projects will be created in this directory",value:l,onChange:h,placeholder:"~/projects"}),e.jsx(b,{}),e.jsx(d,{children:"Saving"}),e.jsx(j,{label:"Auto-save",description:"Automatically save files when modified",value:u,onChange:g}),e.jsx(f,{label:"Auto-save interval",description:"How often to auto-save open files",options:[{value:"5",label:"5 seconds"},{value:"15",label:"15 seconds"},{value:"30",label:"30 seconds"},{value:"60",label:"60 seconds"}],value:v,onChange:x,disabled:!u}),e.jsx(b,{}),e.jsx(d,{children:"Preferences"}),e.jsx(f,{label:"Language",description:"Interface language",options:[{value:"en",label:"English"}],value:y,onChange:w}),e.jsx(j,{label:"Telemetry",description:"Help improve Purple Lab by sending anonymous usage data",value:N,onChange:A})]})}function Ue(){const a=[{id:"purple",color:"#553DE9",label:"Purple"},{id:"blue",color:"#2563EB",label:"Blue"},{id:"green",color:"#059669",label:"Green"},{id:"orange",color:"#D97706",label:"Orange"},{id:"pink",color:"#DB2777",label:"Pink"}],c={small:"text-xs",medium:"text-sm",large:"text-base"};return e.jsxs("div",{children:[e.jsx(d,{children:"Theme"}),e.jsxs("div",{className:"py-3",children:[e.jsx("label",{className:"text-sm font-medium text-[#36342E] block mb-3",children:"Color theme"}),e.jsx("div",{className:"flex gap-3",children:["light","dark","system"].map(s=>e.jsxs("button",{type:"button",onClick:()=>ge(s),className:["flex-1 flex flex-col items-center gap-2 p-3 rounded-lg border-2 transition-colors",C===s?"border-[#553DE9] bg-[#553DE9]/5":"border-[#ECEAE3] hover:border-[#553DE9]/30"].join(" "),"aria-pressed":C===s,children:[e.jsxs("div",{className:["w-full h-12 rounded border flex items-end px-1.5 pb-1.5 gap-1",s==="dark"?"bg-[#1A1A1E] border-[#2A2A30]":s==="light"?"bg-white border-[#ECEAE3]":"bg-gradient-to-r from-white to-[#1A1A1E] border-[#ECEAE3]"].join(" "),children:[e.jsx("div",{className:`w-2 h-4 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`}),e.jsx("div",{className:`w-4 h-3 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`}),e.jsx("div",{className:`w-3 h-5 rounded-sm ${s==="dark"?"bg-[#2A2A30]":"bg-[#ECEAE3]"}`})]}),e.jsx("span",{className:"text-xs font-medium text-[#36342E] capitalize",children:s})]},s))})]}),e.jsx(b,{}),e.jsx(d,{children:"Accent color"}),e.jsx("div",{className:"py-3",children:e.jsx("div",{className:"flex gap-3",children:a.map(s=>e.jsxs("button",{type:"button",onClick:()=>ve(s.id),className:"flex flex-col items-center gap-1.5 group","aria-label":s.label,"aria-pressed":B===s.id,children:[e.jsx("div",{className:["w-8 h-8 rounded-full transition-all",B===s.id?"ring-2 ring-offset-2 ring-[#553DE9] scale-110":"group-hover:scale-105"].join(" "),style:{backgroundColor:s.color}}),e.jsx("span",{className:"text-[11px] text-[#6B6960]",children:s.label})]},s.id))})}),e.jsx(b,{}),e.jsx(d,{children:"Layout"}),e.jsx(f,{label:"Font size",description:"Base font size for the interface",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}],value:M,onChange:je}),e.jsx("div",{className:"pl-4 pb-2",children:e.jsx("span",{className:`${c[M]} text-[#6B6960] italic`,children:"The quick brown fox jumps over the lazy dog."})}),e.jsx(f,{label:"Sidebar position",description:"Which side the navigation sidebar appears on",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],value:T,onChange:Ee}),e.jsx(j,{label:"Compact mode",description:"Reduce padding and spacing throughout the interface",value:H,onChange:ye}),e.jsx(f,{label:"Animations",description:"Control interface transition animations",options:[{value:"full",label:"Full"},{value:"reduced",label:"Reduced"},{value:"none",label:"None"}],value:G,onChange:Ne})]})}function Qe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Font"}),e.jsx(f,{label:"Font family",description:"Font used in the code editor",options:[{value:"JetBrains Mono",label:"JetBrains Mono"},{value:"Fira Code",label:"Fira Code"},{value:"Source Code Pro",label:"Source Code Pro"},{value:"Consolas",label:"Consolas"}],value:$,onChange:Ce}),e.jsx(xe,{label:"Font size",description:"Size of text in the code editor",min:12,max:24,value:I,onChange:Se,unit:"px"}),e.jsxs("div",{className:"my-3 rounded-lg border border-[#ECEAE3] overflow-hidden",children:[e.jsx("div",{className:"bg-[#FAF9F6] px-3 py-1.5 border-b border-[#ECEAE3]",children:e.jsx("span",{className:"text-[11px] text-[#939084]",children:"Preview"})}),e.jsx("div",{className:"bg-white p-4",children:e.jsx("pre",{className:"text-[#36342E] leading-relaxed",style:{fontFamily:`"${$}", monospace`,fontSize:`${I}px`},children:`function greet(name) {
|
|
7
|
-
return \`Hello, \${name}!\`;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
greet("world");`})})]}),e.jsx(b,{}),e.jsx(d,{children:"Formatting"}),e.jsx(f,{label:"Tab size",description:"Number of spaces per tab",options:[{value:"2",label:"2 spaces"},{value:"4",label:"4 spaces"},{value:"8",label:"8 spaces"}],value:O,onChange:we}),e.jsx(j,{label:"Word wrap",description:"Wrap long lines to fit the editor width",value:_,onChange:ke}),e.jsx(b,{}),e.jsx(d,{children:"Display"}),e.jsx(j,{label:"Line numbers",description:"Show line numbers in the gutter",value:V,onChange:Ae}),e.jsx(j,{label:"Minimap",description:"Show a miniature overview of the file",value:W,onChange:Fe}),e.jsx(j,{label:"Bracket matching",description:"Highlight matching brackets",value:K,onChange:Pe})]})}function Xe(){return e.jsxs("div",{children:[e.jsx(d,{children:"Provider"}),e.jsx(f,{label:"Default provider",description:"AI provider to use for new builds",options:pe.map(a=>({value:a.id,label:a.name})),value:q,onChange:De}),e.jsx(b,{}),e.jsx(d,{children:"Execution"}),e.jsx(xe,{label:"Max iterations",description:"Maximum number of RARV iterations per build",min:5,max:50,value:J,onChange:Le,step:5}),e.jsx(f,{label:"Quality gate strictness",description:"How strict the quality gates are during builds",options:[{value:"relaxed",label:"Relaxed"},{value:"standard",label:"Standard"},{value:"strict",label:"Strict"}],value:U,onChange:Be}),e.jsx(b,{}),e.jsx(d,{children:"Automation"}),e.jsx(j,{label:"Auto-deploy on success",description:"Automatically deploy when build completes successfully",value:Q,onChange:Me}),e.jsx(oe,{label:"Budget limit",description:"Maximum spend per build (leave empty for unlimited)",type:"number",value:X,onChange:$e,placeholder:"e.g. 10.00"}),e.jsx(j,{label:"Build notifications",description:"Show browser notifications for build events",value:Y,onChange:Ie})]})}function Ye(){return e.jsxs("div",{children:[e.jsx(d,{children:"Configured providers"}),e.jsx("div",{className:"flex flex-col gap-4 mt-2",children:z.map((a,c)=>{var m,S;const s=pe.find(p=>p.id===a);return s?e.jsxs("div",{className:"border border-[#ECEAE3] rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center rounded-full bg-[#553DE9]/10 text-[#553DE9] text-xs font-bold",children:c+1}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-[#36342E]",children:s.name}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:s.description})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",onClick:()=>de(s.id,"up"),disabled:c===0,className:"px-2 py-1 text-xs text-[#6B6960] hover:text-[#36342E] disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Move ${s.name} up`,children:"Up"}),e.jsx("button",{type:"button",onClick:()=>de(s.id,"down"),disabled:c===z.length-1,className:"px-2 py-1 text-xs text-[#6B6960] hover:text-[#36342E] disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Move ${s.name} down`,children:"Down"})]})]}),e.jsx(oe,{label:"API key",type:"password",value:Z[s.id]||"",onChange:p=>ze(ae=>({...ae,[s.id]:p})),placeholder:`Enter ${s.name} API key`}),e.jsx(f,{label:"Model",options:s.models.map(p=>({value:p,label:p})),value:ee[s.id]||s.defaultModel,onChange:p=>Re(ae=>({...ae,[s.id]:p}))}),e.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[e.jsxs("button",{type:"button",onClick:()=>Ke(s.id),disabled:ie!==null,title:"Writes the default provider to ~/.loki/config.json. Does not test a connection.",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] rounded-lg transition-colors disabled:opacity-50",children:[ie===s.id?e.jsx(mt,{size:12,className:"animate-spin"}):null,"Set as default (~/.loki/config.json)"]}),((m=R[s.id])==null?void 0:m.ok)===!0&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#059669]",children:[e.jsx(pt,{size:12})," ",R[s.id].message]}),((S=R[s.id])==null?void 0:S.ok)===!1&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#C45B5B] break-all",children:[e.jsx(ft,{size:12,className:"flex-shrink-0"})," ",R[s.id].message]})]})]},s.id):null})}),e.jsx("div",{className:"mt-4 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsxs("p",{className:"text-xs text-[#6B6960]",children:["The order, API keys and models on this page are saved in this browser only; builds do not read them. Provider failover is configured with ",e.jsx("code",{children:"loki failover --chain"}),'. "Set as default" is the only action here that writes to the server (the provider field in ~/.loki/config.json).']})})]})}function Ze(){const a=L?fe.filter(s=>s.action.toLowerCase().includes(L.toLowerCase())||s.keys.toLowerCase().includes(L.toLowerCase())||s.category.toLowerCase().includes(L.toLowerCase())):fe,c=[...new Set(a.map(s=>s.category))];return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(lt,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[#939084]"}),e.jsx("input",{type:"text",value:L,onChange:s=>ce(s.target.value),placeholder:"Search shortcuts...",className:"w-full pl-8 pr-3 py-2 text-sm border border-[#ECEAE3] rounded-lg bg-white text-[#36342E] focus:border-[#553DE9] focus:outline-none focus:ring-1 focus:ring-[#553DE9] placeholder:text-[#939084]","aria-label":"Search keyboard shortcuts"})]}),e.jsxs("button",{type:"button",onClick:()=>ce(""),className:"inline-flex items-center gap-1.5 px-3 py-2 text-xs text-[#6B6960] hover:text-[#36342E] border border-[#ECEAE3] rounded-lg hover:bg-[#F8F4F0] transition-colors",children:[e.jsx(dt,{size:12}),"Reset to defaults"]})]}),c.map(s=>e.jsxs("div",{children:[e.jsx(d,{children:s}),e.jsx("div",{className:"flex flex-col",children:a.filter(m=>m.category===s).map(m=>e.jsxs("div",{className:"flex items-center justify-between py-2.5 px-2 rounded-lg hover:bg-[#FAF9F6]",children:[e.jsx("span",{className:"text-sm text-[#36342E]",children:m.action}),e.jsx("kbd",{className:"px-2.5 py-1 text-xs font-mono bg-[#FAF9F6] border border-[#ECEAE3] rounded-md text-[#6B6960]",children:m.keys})]},m.action))})]},s)),e.jsx("div",{className:"mt-6 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsxs("p",{className:"text-xs text-[#6B6960]",children:["Press ",e.jsxs("kbd",{className:"px-1.5 py-0.5 text-[11px] font-mono bg-white border border-[#ECEAE3] rounded",children:[E,"+?"]})," anywhere to see keyboard shortcuts."]})})]})}function et(){return e.jsxs("div",{children:[e.jsx(d,{children:"Vision"}),e.jsx(j,{label:"High contrast mode",description:"Increase contrast for text and UI elements",value:F,onChange:He}),e.jsx(f,{label:"Focus indicators",description:"Visibility of keyboard focus outlines",options:[{value:"default",label:"Default"},{value:"enhanced",label:"Enhanced (thicker, more visible)"}],value:P,onChange:Ge}),e.jsx(f,{label:"Font scaling",description:"Scale all text in the interface",options:[{value:"100",label:"100%"},{value:"125",label:"125%"},{value:"150",label:"150%"}],value:D,onChange:Ve}),e.jsx(b,{}),e.jsx(d,{children:"Motion"}),e.jsx(f,{label:"Motion preference",description:"Control animations and transitions",options:[{value:"full",label:"Full -- all animations enabled"},{value:"reduced",label:"Reduced -- minimal animations"},{value:"none",label:"None -- no animations"}],value:k,onChange:Oe}),e.jsx(b,{}),e.jsx(d,{children:"Screen reader"}),e.jsx(j,{label:"Screen reader announcements",description:"Enable additional ARIA live region announcements",value:se,onChange:_e}),e.jsx("div",{className:"mt-6 p-3 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3]",children:e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Purple Lab is designed to work with assistive technologies. All interactive elements include proper ARIA labels and keyboard navigation support. If you encounter accessibility issues, please report them via the About section."})})]})}function tt(){return e.jsxs("div",{children:[e.jsx(d,{children:"Purple Lab"}),e.jsxs("div",{className:"py-3",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#553DE9] flex items-center justify-center",children:e.jsx("span",{className:"text-white font-heading font-bold text-lg",children:"PL"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-heading font-bold text-[#36342E]",children:"Purple Lab"}),e.jsx("p",{className:"text-xs text-[#6B6960]",children:"Powered by Loki Mode"})]})]}),e.jsxs("div",{className:"border border-[#ECEAE3] rounded-lg divide-y divide-[#ECEAE3]",children:[re&&e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Version"}),e.jsxs("span",{className:"text-sm font-mono font-medium text-[#36342E]",children:["v",re]})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"Build date"}),e.jsx("span",{className:"text-sm font-mono text-[#36342E]",children:"2026-03-24"})]}),e.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{className:"text-sm text-[#6B6960]",children:"License"}),e.jsx("span",{className:"text-sm text-[#36342E]",children:"BUSL-1.1"})]})]})]}),e.jsx(b,{}),e.jsx(d,{children:"Links"}),e.jsx("div",{className:"flex flex-col gap-1 py-2",children:[{label:"Documentation",href:"https://www.autonomi.dev/docs"},{label:"GitHub",href:"https://github.com/asklokesh/loki-mode"},{label:"Changelog",href:"https://github.com/asklokesh/loki-mode/blob/main/CHANGELOG.md"},{label:"Report a bug",href:"https://github.com/asklokesh/loki-mode/issues/new"}].map(a=>e.jsxs("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-[#36342E] hover:bg-[#FAF9F6] transition-colors group",children:[e.jsx("span",{children:a.label}),e.jsx(rt,{size:14,className:"text-[#939084] group-hover:text-[#553DE9] transition-colors"})]},a.label))}),e.jsx(b,{}),e.jsx(d,{children:"Updates"}),e.jsx("div",{className:"py-3",children:e.jsx("button",{type:"button",onClick:()=>{window.open("https://github.com/asklokesh/loki-mode/releases","_blank")},className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium border border-[#553DE9] text-[#553DE9] hover:bg-[#E8E4FD] rounded-lg transition-colors",children:"Check for updates"})})]})}return e.jsxs("div",{className:"flex h-full min-h-0",children:[e.jsx("nav",{className:"w-56 flex-shrink-0 border-r border-[#ECEAE3] bg-[#FAF9F6] overflow-y-auto","aria-label":"Settings categories",children:e.jsxs("div",{className:"px-4 py-5",children:[e.jsx("h1",{className:"font-heading text-lg font-bold text-[#36342E] mb-4",children:"Settings"}),e.jsx("ul",{className:"flex flex-col gap-0.5",children:me.map(a=>{const c=n===a.id;return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>r(a.id),className:["flex items-center gap-2.5 w-full px-3 py-2 text-sm rounded-lg transition-colors text-left",c?"bg-[#553DE9]/10 text-[#553DE9] font-medium":"text-[#36342E] hover:bg-[#F8F4F0]"].join(" "),"aria-current":c?"page":void 0,children:[e.jsx(a.icon,{size:16}),e.jsx("span",{children:a.label})]})},a.id)})})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"max-w-[640px] mx-auto px-8 py-6",children:[e.jsx("h2",{className:"font-heading text-base font-bold text-[#36342E] mb-1",children:(ue=me.find(a=>a.id===n))==null?void 0:ue.label}),e.jsxs("p",{className:"text-xs text-[#6B6960] mb-6",children:[n==="general"&&"Manage general application preferences",n==="appearance"&&"Customize the look and feel of Purple Lab",n==="editor"&&"Configure the code editor behavior and display",n==="build"&&"Control build execution and automation settings",n==="providers"&&"Configure AI provider connections and fallback chain",n==="shortcuts"&&"View and manage keyboard shortcuts",n==="accessibility"&&"Adjust accessibility and assistive technology options",n==="about"&&"Version information and useful links"]}),n!=="shortcuts"&&n!=="about"&&e.jsx("p",{className:"mb-6 -mt-3 px-3 py-2 rounded-lg bg-[#FAF9F6] border border-[#ECEAE3] text-xs text-[#6B6960]",children:"Saved in this browser only. Builds and the server do not read these settings."}),qe()]})})]})}export{kt as default};
|