ompgui 0.4.0 → 0.4.2
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -2
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.js +3 -2
- package/.next/required-server-files.json +3 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -2
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/omp-version/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/web-auth/session/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +4 -4
- package/.next/server/app/login.segments/_full.segment.rsc +4 -4
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/page.js +3 -3
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +2 -2
- package/.next/server/chunks/1671.js +1 -1
- package/.next/server/chunks/3798.js +1 -1
- package/.next/server/chunks/4445.js +1 -1
- package/.next/server/chunks/6209.js +1 -1
- package/.next/server/chunks/6465.js +1 -1
- package/.next/server/chunks/7834.js +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/4315-9e1f7675d0f49d8b.js +1 -0
- package/.next/static/chunks/6522.07d01cfb1ad3768e.js +1 -0
- package/.next/static/chunks/app/login/page-529e71a823982db0.js +1 -0
- package/.next/static/chunks/app/{page-60629bbe3fe259ef.js → page-0d51c0ee4910e024.js} +6 -6
- package/.next/static/chunks/{webpack-11f7dad1df4f814f.js → webpack-d5d95f150515a23a.js} +1 -1
- package/README.ja.md +28 -28
- package/README.ko.md +28 -28
- package/README.md +28 -28
- package/README.zh-CN.md +28 -28
- package/bin/node-version.js +1 -1
- package/bin/omp-web-options.js +1 -85
- package/bin/omp-web.js +1 -153
- package/bin/ompgui-options.js +24 -0
- package/bin/ompgui-security.test.mjs +8 -0
- package/bin/ompgui.js +31 -0
- package/next.config.ts +1 -0
- package/package.json +6 -6
- package/.next/static/chunks/4315-50f4eb7d435d214a.js +0 -1
- package/.next/static/chunks/6522.a49bd5d1f0532830.js +0 -1
- package/.next/static/chunks/app/login/page-e9ec076f136fb627.js +0 -1
- /package/.next/static/{YAZYeEe1KDqN7al9eJ-PR → VBxoKAa50kI5B1rMOpGl3}/_buildManifest.js +0 -0
- /package/.next/static/{YAZYeEe1KDqN7al9eJ-PR → VBxoKAa50kI5B1rMOpGl3}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6522],{74519:(e,t,i)=>{i.d(t,{Dx:()=>h,mm:()=>f,qc:()=>x});var n=i(95155),s=i(66763),o=i(99537);let a=(0,o.A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var l=i(12651);let r=(0,o.A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);var d=i(86272),c=i(90710);let p=(0,o.A)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]);var g=i(82749),u=i(4315);let h=[{id:"general",label:"Interface & Behavior",description:"UI preferences, completion sound, submission mode",Icon:s.A},{id:"safety",label:"Safety & Approvals",description:"Tool safety rules, YOLO mode, terminal permissions",Icon:a},{id:"models",label:"AI Model Defaults",description:"Reasoning budget, verbosity, personality, scratchpad",Icon:l.A},{id:"providers",label:"API Keys & Providers",description:"Connected OAuth accounts, API keys, and model registry",Icon:r},{id:"intelligence",label:"Agent & Intelligence",description:"Advisor, memory, autolearn, compaction and retry",Icon:d.A},{id:"agents",label:"Agents & Subagents",description:"Configured subagents, model routing, prewalk, and advisor",Icon:c.A},{id:"mcp",label:"Extensions & Tools",description:"MCP servers, managed skills, and OMP plugins",Icon:p},{id:"system",label:"System & Updates",description:"App updates, runtime version, and active session restart",Icon:g.A}],x=e=>"skills"===e||"plugins"===e||"extensions"===e?"mcp":e;function f({active:e,onSelect:t,workspaceReady:i=!0,layout:s="vertical"}){let{t:o}=(0,u.s9)(),a=x(e),l=(e,n)=>{let s=h.filter(e=>!(e.needsWorkspace&&!i)),o=null;if(("ArrowRight"===e.key||"ArrowDown"===e.key)&&(o=n+1),("ArrowLeft"===e.key||"ArrowUp"===e.key)&&(o=n-1),"Home"===e.key&&(o=0),"End"===e.key&&(o=s.length-1),null!==o){e.preventDefault();let i=s[o]??s[n];i&&t(i.id)}};return"vertical"===s?(0,n.jsx)("nav",{"aria-label":"Settings sections",role:"tablist","aria-orientation":"vertical",style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 8px",width:230,flexShrink:0,borderRight:"1px solid var(--border)",background:"var(--bg-panel)",overflowY:"auto"},children:h.map(({id:e,label:s,description:r,Icon:d,needsWorkspace:c},p)=>{let g=e===a,u=!!(c&&!i),h=o(`settingsTabs.${e}`)||s,x=o(`settingsTabs.${e}Desc`)||r;return(0,n.jsxs)("button",{type:"button",role:"tab",id:`settings-tab-${e}`,"aria-selected":g,"aria-controls":`settings-panel-${e}`,tabIndex:g?0:-1,disabled:u,onClick:()=>t(e),onKeyDown:e=>l(e,p),style:{display:"flex",alignItems:"flex-start",gap:10,padding:"9px 10px",border:"none",borderRadius:"var(--radius-control)",background:g?"var(--bg-selected)":"transparent",color:g?"var(--text)":u?"var(--text-dim)":"var(--text-muted)",cursor:u?"not-allowed":"pointer",opacity:u?.5:1,textAlign:"left",transition:"background var(--dur-fast), color var(--dur-fast)",width:"100%"},children:[(0,n.jsx)(d,{size:16,"aria-hidden":"true",style:{marginTop:2,flexShrink:0,color:g?"var(--accent)":"currentColor"}}),(0,n.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,n.jsx)("div",{style:{fontSize:12.5,fontWeight:g?600:500,lineHeight:1.3,color:g?"var(--text)":"inherit"},children:h}),(0,n.jsx)("div",{style:{fontSize:10.5,color:"var(--text-dim)",lineHeight:1.3,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:x})]})]},e)})}):(0,n.jsx)("nav",{"aria-label":"Settings sections",role:"tablist",style:{display:"flex",gap:3,padding:"7px 12px",borderBottom:"1px solid var(--border)",background:"var(--bg-panel)",flexShrink:0,overflowX:"auto"},children:h.map(({id:e,label:s,description:r,Icon:d,needsWorkspace:c},p)=>{let g=e===a,u=!!(c&&!i),h=o(`settingsTabs.${e}`)||s,x=o(`settingsTabs.${e}Desc`)||r;return(0,n.jsxs)("button",{type:"button",role:"tab",id:`settings-tab-${e}`,"aria-selected":g,"aria-controls":`settings-panel-${e}`,"aria-label":`${h}: ${x}`,title:x,tabIndex:g?0:-1,disabled:u,onClick:()=>t(e),onKeyDown:e=>l(e,p),style:{display:"inline-flex",alignItems:"flex-start",gap:5,padding:"6px 9px",border:"none",borderRadius:"var(--radius-control)",background:g?"var(--bg-selected)":"transparent",color:g?"var(--text)":"var(--text-muted)",cursor:u?"not-allowed":"pointer",opacity:u?.45:1,fontSize:12,whiteSpace:"nowrap",textAlign:"left",minWidth:150},children:[(0,n.jsx)(d,{size:13,"aria-hidden":"true"}),(0,n.jsxs)("span",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[(0,n.jsx)("span",{style:{fontWeight:g?600:500},children:h}),(0,n.jsx)("span",{style:{maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",color:"var(--text-muted)",fontSize:10,fontWeight:400,lineHeight:1.25},children:x})]})]},e)})})}},76522:(e,t,i)=>{i.r(t),i.d(t,{SettingsConfig:()=>N});var n=i(95155),s=i(12115),o=i(35893),a=i(37206),l=i(82749),r=i(65377),d=i(35484),c=i(86272),p=i(99314),g=i(92298);let u=(0,i(99537).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var h=i(31590),x=i(30808),f=i(74519),v=i(4315),b=i(7834);let m=()=>(0,n.jsx)("div",{role:"status",style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-muted)",fontSize:12},children:"Loading settings…"}),y=(0,a.default)(()=>Promise.all([i.e(5199),i.e(3274)]).then(i.bind(i,33274)).then(e=>e.ModelsConfig),{loadableGenerated:{webpack:()=>[33274]},loading:m}),C=(0,a.default)(()=>i.e(9981).then(i.bind(i,99981)).then(e=>e.SkillsConfig),{loadableGenerated:{webpack:()=>[99981]},loading:m}),j=(0,a.default)(()=>i.e(2201).then(i.bind(i,42201)).then(e=>e.PluginsConfig),{loadableGenerated:{webpack:()=>[42201]},loading:m}),k=(0,a.default)(()=>i.e(4473).then(i.bind(i,24473)).then(e=>e.McpConfig),{loadableGenerated:{webpack:()=>[24473]},loading:m}),S=(0,a.default)(()=>i.e(7570).then(i.bind(i,87570)).then(e=>e.AgentsConfig),{loadableGenerated:{webpack:()=>[87570]},ssr:!1}),w={minHeight:32,padding:"4px 28px 4px 10px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg)",color:"var(--text)",fontSize:12,cursor:"pointer",appearance:"none",WebkitAppearance:"none",MozAppearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 8px center",outline:"none",colorScheme:"dark light"},M={background:"var(--bg-panel)",color:"var(--text)"},A={fontSize:10,padding:"1px 6px",borderRadius:4,background:"var(--bg-subtle)",color:"var(--text-muted)",fontWeight:500};function P(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}let D=(0,s.createContext)(null),T=[{tab:"general",section:"Interface & Behavior",label:"Keep tool calls collapsed",description:"Show only compact headers while tools execute.",scope:"UI"},{tab:"general",section:"Interface & Behavior",label:"Completion sound",description:"Play a tone when the agent completes a run.",scope:"UI"},{tab:"general",section:"Interface & Behavior",label:"Message during active run",description:"What composer does on submit while agent runs. Steer interrupts; Queue follow-up delivers after finish.",scope:"UI"},{tab:"safety",section:"Tool Safety & Approvals",label:"Approval Mode",description:"Choose when OMP asks before tool calls.",scope:"Native OMP"},{tab:"safety",section:"Tool Safety & Approvals",label:"Bash Override",description:"Override default approval policy specifically for terminal commands.",scope:"Native OMP"},{tab:"safety",section:"Tool Safety & Approvals",label:"Extension Tool Requests",description:"Automatically approve extension tool authorization requests.",scope:"Native OMP"},{tab:"models",section:"AI Model Defaults",label:"Reasoning",description:"Default effort level for thinking-capable models.",scope:"Native OMP"},{tab:"models",section:"AI Model Defaults",label:"Verbosity",description:"Response detail level for supporting providers.",scope:"Native OMP"},{tab:"models",section:"AI Model Defaults",label:"Personality",description:"Style included in OMP's system prompt.",scope:"Native OMP"},{tab:"models",section:"AI Model Defaults",label:"Thinking Blocks",description:"Hide model reasoning from output view.",scope:"Native OMP"},{tab:"models",section:"AI Model Defaults",label:"External Thinking",description:"Private scratchpad reasoning via think tool.",scope:"Native OMP"},{tab:"intelligence",section:"Advisor Review",label:"Enable Advisor",description:"Enable Advisor for new sessions with the advisor role.",scope:"Native OMP"},{tab:"intelligence",section:"Advisor Review",label:"Advisor Backlog",description:"Wait briefly when advisor falls behind.",scope:"Native OMP"},{tab:"intelligence",section:"Advisor Review",label:"Review Subagents",description:"Apply Advisor passive review to subagent tasks.",scope:"Native OMP"},{tab:"intelligence",section:"Context Compaction",label:"Automatic Compaction",description:"Compact context before model context limit is hit.",scope:"Native OMP"},{tab:"intelligence",section:"Context Compaction",label:"Continue After Compaction",description:"Resume task execution after compaction completes.",scope:"Native OMP"},{tab:"intelligence",section:"Context Compaction",label:"Maintenance Strategy",description:"Select algorithm used to reduce context pressure.",scope:"Native OMP"},{tab:"intelligence",section:"Context Compaction",label:"Compact Mid-Turn",description:"Check context limits between tool execution steps.",scope:"Native OMP"},{tab:"intelligence",section:"Memory & Auto-Learn",label:"Memory Backend",description:"Where durable knowledge is stored across sessions.",scope:"Native OMP"},{tab:"intelligence",section:"Memory & Auto-Learn",label:"Enable Auto-Learn",description:"Capture reusable lessons after completed runs.",scope:"Native OMP"},{tab:"intelligence",section:"Memory & Auto-Learn",label:"Private Capture Turn",description:"Run private lesson-capture turn at completion.",scope:"Native OMP"},{tab:"intelligence",section:"Memory & Auto-Learn",label:"Memory Scope",description:"Scoping for Mnemopi knowledge storage.",scope:"Native OMP"},{tab:"intelligence",section:"Memory & Auto-Learn",label:"Recall on Session Start",description:"Load relevant memories into first turn.",scope:"Native OMP"},{tab:"intelligence",section:"Memory & Auto-Learn",label:"Retain Completed Turns",description:"Store completed conversation turns in memory.",scope:"Native OMP"},{tab:"intelligence",section:"Automatic Retry",label:"Automatic Retry",description:"Retry failed turns automatically.",scope:"Native OMP"},{tab:"intelligence",section:"Automatic Retry",label:"Max Attempts",description:"Retry limit before giving up.",scope:"Native OMP"},{tab:"intelligence",section:"Automatic Retry",label:"Model Fallback",description:"Fall back to alternative model when retries exhaust.",scope:"Native OMP"},{tab:"mcp",section:"Extensions & Tools",label:"Load Project MCP Servers",description:"Allow project-root MCP configuration to be discovered.",scope:"Native OMP"},{tab:"mcp",section:"Extensions & Tools",label:"Render MCP Markdown",description:"Render non-JSON MCP results as Markdown in transcript.",scope:"Native OMP"},{tab:"mcp",section:"Extensions & Tools",label:"MCP Resource Updates",description:"Inject server resource updates into conversation.",scope:"Native OMP"}];function O({results:e,query:t,onSelect:i}){return(0,n.jsxs)("div",{style:{flex:1,minHeight:0,overflowY:"auto",background:"var(--bg)",padding:16,display:"flex",flexDirection:"column",gap:10},children:[(0,n.jsx)("div",{style:{fontSize:12.5,color:"var(--text-muted)"},children:0===e.length?`No settings match “${t}”.`:`${e.length} result${1===e.length?"":"s"} for “${t}”.`}),e.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>i(e),style:{textAlign:"left",display:"flex",flexDirection:"column",gap:4,padding:"10px 12px",border:"1px solid var(--border)",borderRadius:"var(--radius-card)",background:"var(--bg-panel)",color:"var(--text)",cursor:"pointer",transition:"border-color var(--dur-fast), background var(--dur-fast)"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,n.jsx)("span",{style:{fontSize:12.5,fontWeight:600},children:e.label}),"category"===e.kind&&(0,n.jsx)("span",{style:A,children:"Section"}),e.scope&&(0,n.jsx)("span",{style:A,children:e.scope})]}),(0,n.jsx)("div",{style:{fontSize:11,color:"var(--text-muted)",lineHeight:1.45},children:e.description}),e.section&&(0,n.jsx)("div",{style:{fontSize:10,color:"var(--text-dim)"},children:e.section})]},e.id))]})}function z({checked:e,onChange:t,disabled:i}){return(0,n.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:i,onClick:()=>t(!e),style:{position:"relative",display:"inline-flex",alignItems:"center",width:36,height:20,borderRadius:10,border:"none",background:e?"var(--accent)":"var(--border)",cursor:i?"not-allowed":"pointer",transition:"background var(--dur-fast)",padding:2,flexShrink:0},children:(0,n.jsx)("span",{style:{width:16,height:16,borderRadius:8,background:"#fff",transform:e?"translateX(16px)":"translateX(0px)",transition:"transform var(--dur-fast)",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}})})}function R({label:e,description:t,scope:i,children:o}){let a=(0,s.useRef)(null),l=(0,s.useContext)(D),r=null!==l&&l===P(e);return(0,s.useEffect)(()=>{r&&a.current&&a.current.scrollIntoView({behavior:"smooth",block:"center"})},[r]),(0,n.jsxs)("div",{ref:a,"data-search-id":P(e),style:{minWidth:0,padding:"12px 14px",border:"1px solid var(--border)",borderRadius:"var(--radius-card)",background:"var(--bg-panel)",display:"flex",flexDirection:"column",gap:8,transition:"box-shadow var(--dur-fast), border-color var(--dur-fast)",...r?{borderColor:"var(--accent)",boxShadow:"0 0 0 2px var(--accent)"}:{}},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,n.jsx)("span",{style:{fontSize:12.5,fontWeight:600,color:"var(--text)"},children:e}),i&&(0,n.jsx)("span",{style:A,children:i})]}),(0,n.jsx)("span",{style:{flexShrink:0},children:o})]}),(0,n.jsx)("span",{style:{color:"var(--text-muted)",fontSize:11,lineHeight:1.45},children:t})]})}function N({activeTab:e,advisorEnabled:t,onAdvisorChange:i,toolCallsDefaultCollapsed:a,onToolCallsDefaultCollapsedChange:m,cwd:A,sessionId:I,onModelsSaved:E,onPluginsReloaded:W,onOmpUpdateAvailabilityChange:H,onSelectTab:L,onClose:$}){let U=(0,h.a)(),{t:B}=(0,v.s9)(),V=null!==A,[F,q]=(0,s.useState)(""),[G,Y]=(0,s.useState)(null),[K,_]=(0,s.useState)(()=>(0,o.v)()),[J,X]=(0,s.useState)(()=>{try{let e=window.localStorage.getItem("omp-sound-enabled");return null===e||"true"===e}catch{return!0}}),[Q,Z]=(0,s.useState)(null),[ee,et]=(0,s.useState)(!0),[ei,en]=(0,s.useState)(null),[es,eo]=(0,s.useState)(!0),[ea,el]=(0,s.useState)(!1),[er,ed]=(0,s.useState)(null),[ec,ep]=(0,s.useState)(null),[eg,eu]=(0,s.useState)(null),[eh,ex]=(0,s.useState)(0),[ef,ev]=(0,s.useState)(()=>new Set(["general",e]));(0,s.useEffect)(()=>{ev(t=>t.has(e)?t:new Set([...t,e]))},[e]),(0,s.useEffect)(()=>{fetch("/api/omp-settings").then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>ep(e.settings??{})).catch(e=>eu(e instanceof Error?e.message:String(e)))},[]);let eb=(0,s.useRef)(null),em=(0,s.useRef)(!1),ey=(0,s.useCallback)(e=>{ep(e),eu(null),eb.current=e,em.current||(em.current=!0,ex(e=>e+1),(async()=>{try{for(;null!==eb.current;){let e=eb.current;eb.current=null;try{let t=await fetch("/api/omp-settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:e})}),i=await t.json();if(!t.ok||i.error)throw Error(i.error||`HTTP ${t.status}`);null===eb.current&&ep(i.settings??e)}catch(e){eu(e instanceof Error?e.message:String(e));break}}}finally{em.current=!1,ex(e=>Math.max(0,e-1))}})())},[]),eC=()=>eb.current??ec??{},ej=e=>{ey({...eC(),...e})},ek=(e,t)=>{let i=eb.current??ec?.[e]??{};ey({...eC(),[e]:{...i,...t}})},eS=e=>{let t=eb.current??ec??{},i=t.tools??{};ey({...t,tools:{...i,approval:{...i.approval??{},...e}}})},ew=(0,s.useCallback)(async()=>{et(!0),ed(null);try{let e=await fetch("/api/omp-update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"check"})}),t=await e.json();if(!e.ok||t.error)throw Error(t.error||`HTTP ${e.status}`);Z(t),H(t.updateAvailable)}catch(e){ed(e instanceof Error?e.message:String(e))}finally{et(!1)}},[H]);(0,s.useEffect)(()=>{ew()},[ew]);let eM=(0,s.useCallback)(async(e=!1)=>{eo(!0);try{let t=await fetch(e?"/api/app-update?force=1":"/api/app-update"),i=await t.json();if(!t.ok||i.error)throw Error(i.error||`HTTP ${t.status}`);en(i)}catch(e){ed(e instanceof Error?e.message:String(e))}finally{eo(!1)}},[]);(0,s.useEffect)(()=>{eM()},[eM]);let eA=(0,s.useCallback)(async()=>{el(!0);try{let e=await fetch("/api/omp-update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"restart"})}),t=await e.json();if(!e.ok||t.error)throw Error(t.error||`HTTP ${e.status}`);ed(B("settingsConfig.restartSuccess",{count:t.sessionsRestarted??0}))}catch(e){ed(e instanceof Error?e.message:String(e))}finally{el(!1)}},[B]),eP=(0,f.qc)(e),eD=F.trim().toLowerCase(),eT=eD.length>0,eO=(0,s.useMemo)(()=>{if(!eD)return[];let e=[];for(let t of f.Dx)`${t.label} ${t.description}`.toLowerCase().includes(eD)&&e.push({id:`tab-${t.id}`,kind:"category",tab:t.id,label:t.label,description:t.description});for(let t of T)`${t.label} ${t.description} ${t.section}`.toLowerCase().includes(eD)&&e.push({id:P(t.label),kind:"setting",tab:t.tab,label:t.label,description:t.description,scope:t.scope,section:t.section});return e},[eD]),ez=(0,s.useCallback)(e=>{L(e.tab),Y("setting"===e.kind?e.id:null),q("")},[L]);return(0,n.jsx)(x.lG,{open:!0,onOpenChange:e=>{e||$()},children:(0,n.jsxs)(x.Cf,{ariaLabel:"Settings",style:{width:U?"calc(100vw - 16px)":940,maxWidth:"calc(100vw - 16px)",height:U?"calc(100dvh - 16px)":"82vh",maxHeight:"calc(100dvh - 16px)",padding:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,n.jsxs)("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:14,padding:"12px 18px",borderBottom:"1px solid var(--border)",background:"var(--bg-panel)"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,n.jsx)(x.L3,{style:{fontSize:16,margin:0,fontWeight:600},children:B("settingsConfig.title")}),eh>0?(0,n.jsxs)("span",{style:{fontSize:11,color:"var(--accent)",padding:"2px 8px",borderRadius:10,background:"var(--bg-subtle)",display:"inline-flex",alignItems:"center",gap:4},children:[(0,n.jsx)(l.A,{size:11,className:"spin","aria-hidden":"true"})," ",B("settingsConfig.saving")]}):(0,n.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",padding:"2px 8px",borderRadius:10,background:"var(--bg-subtle)"},children:B("settingsConfig.autoSaved")})]}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flex:1,maxWidth:360,justifyContent:"flex-end"},children:[(0,n.jsxs)("div",{style:{position:"relative",width:"100%",maxWidth:260},children:[(0,n.jsx)(r.A,{size:13,"aria-hidden":"true",style:{position:"absolute",left:9,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"}}),(0,n.jsx)("input",{type:"text","aria-label":B("settingsConfig.searchAria"),placeholder:B("settingsConfig.searchPlaceholder"),value:F,onChange:e=>q(e.target.value),onKeyDown:e=>{"Escape"===e.key&&(q(""),Y(null),e.target.blur())},style:{width:"100%",height:28,padding:"0 8px 0 28px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg)",color:"var(--text)",fontSize:12,outline:"none"}})]}),(0,n.jsx)("button",{type:"button",onClick:$,"aria-label":B("settingsConfig.close"),style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontSize:20,lineHeight:1,padding:"2px 6px"},children:"\xd7"})]})]}),(0,n.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:U?"column":"row",overflow:"hidden"},children:eT?(0,n.jsx)(O,{results:eO,query:F.trim(),onSelect:ez}):(0,n.jsxs)(D.Provider,{value:G,children:[U?(0,n.jsx)(f.mm,{active:eP,onSelect:L,workspaceReady:V,layout:"horizontal"}):(0,n.jsx)(f.mm,{active:eP,onSelect:L,workspaceReady:V,layout:"vertical"}),(0,n.jsxs)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",overflowY:"auto",background:"var(--bg)"},children:[eg&&(0,n.jsxs)("div",{role:"alert",style:{margin:16,padding:"10px 14px",borderRadius:"var(--radius-card)",background:"var(--bg-panel)",border:"1px solid var(--status-error)",color:"var(--status-error)",fontSize:12,display:"flex",alignItems:"center",gap:8},children:[(0,n.jsx)(d.A,{size:14,"aria-hidden":"true"})," ",eg]}),"general"===eP&&(0,n.jsxs)("div",{role:"tabpanel",id:"settings-panel-general","aria-labelledby":"settings-tab-general",style:{padding:20,display:"flex",flexDirection:"column",gap:16},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:14,fontWeight:600,margin:0},children:B("settingsConfig.generalTitle")}),(0,n.jsx)("p",{style:{margin:"4px 0 0",fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.generalDescription")})]}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.toolCallsCollapsed"),description:B("settingsConfig.toolCallsCollapsedDesc"),scope:"UI",children:(0,n.jsx)(z,{checked:a,onChange:m})}),(0,n.jsx)(R,{label:B("settingsConfig.completionSound"),description:B("settingsConfig.completionSoundDesc"),scope:"UI",children:(0,n.jsx)(z,{checked:J,onChange:e=>{X(e);try{localStorage.setItem("omp-sound-enabled",String(e))}catch{}window.dispatchEvent(new CustomEvent("omp-sound-pref-change",{detail:e}))}})})]}),(0,n.jsx)(R,{label:B("settingsConfig.submitBehavior"),description:B("settingsConfig.submitBehaviorDesc"),scope:"UI",children:(0,n.jsxs)("select",{style:w,value:K,onChange:e=>{let t=e.target.value;(0,o.t)(t),_(t)},children:[(0,n.jsx)("option",{value:"steer",style:M,children:B("settingsConfig.steerCurrent")}),(0,n.jsx)("option",{value:"queue",style:M,children:B("settingsConfig.queueFollowUp")})]})})]}),"agents"===eP&&(0,n.jsx)(S,{cwd:A??void 0,onSaved:E,isMobile:U}),"safety"===eP&&(0,n.jsxs)("div",{role:"tabpanel",id:"settings-panel-safety","aria-labelledby":"settings-tab-safety",style:{padding:20,display:"flex",flexDirection:"column",gap:16},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:14,fontWeight:600,margin:0},children:B("settingsConfig.safetyTitle")}),(0,n.jsx)("p",{style:{margin:"4px 0 0",fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.safetyDescription")})]}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.approvalMode"),description:B("settingsConfig.approvalModeDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.tools?.approvalMode??"yolo",onChange:e=>ek("tools",{approvalMode:e.target.value}),children:[(0,n.jsx)("option",{value:"always-ask",style:M,children:B("settingsConfig.approvalAlwaysAsk")}),(0,n.jsx)("option",{value:"write",style:M,children:B("settingsConfig.approvalWrite")}),(0,n.jsx)("option",{value:"yolo",style:M,children:B("settingsConfig.approvalYolo")})]})}),(0,n.jsx)(R,{label:B("settingsConfig.bashApproval"),description:B("settingsConfig.bashApprovalDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.tools?.approval?.bash??"prompt",onChange:e=>eS({bash:e.target.value}),children:[(0,n.jsx)("option",{value:"allow",style:M,children:B("settingsConfig.allow")}),(0,n.jsx)("option",{value:"prompt",style:M,children:B("settingsConfig.alwaysAsk")}),(0,n.jsx)("option",{value:"deny",style:M,children:B("settingsConfig.deny")})]})}),(0,n.jsx)(R,{label:B("settingsConfig.extensionApproval"),description:B("settingsConfig.extensionApprovalDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.tools?.approval?.extension??"prompt",onChange:e=>eS({extension:e.target.value}),children:[(0,n.jsx)("option",{value:"prompt",style:M,children:B("settingsConfig.askEveryTime")}),(0,n.jsx)("option",{value:"allow",style:M,children:B("settingsConfig.autoApprove")})]})})]})]}),("models"===e||"models"===eP)&&(0,n.jsxs)("div",{role:"tabpanel",id:"settings-panel-models","aria-labelledby":"settings-tab-models",style:{padding:20,display:"flex",flexDirection:"column",gap:16},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:14,fontWeight:600,margin:0},children:B("settingsConfig.modelsTitle")}),(0,n.jsx)("p",{style:{margin:"4px 0 0",fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.modelsDescription")})]}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.reasoning"),description:B("settingsConfig.reasoningDesc"),scope:"Native OMP",children:(0,n.jsx)("select",{style:w,value:ec?.defaultThinkingLevel??"high",onChange:e=>ej({defaultThinkingLevel:e.target.value}),children:["auto","minimal","low","medium","high","xhigh","max"].map(e=>(0,n.jsx)("option",{value:e,style:M,children:e},e))})}),(0,n.jsx)(R,{label:B("settingsConfig.verbosity"),description:B("settingsConfig.verbosityDesc"),scope:"Native OMP",children:(0,n.jsx)("select",{style:w,value:ec?.textVerbosity??"medium",onChange:e=>ej({textVerbosity:e.target.value}),children:["low","medium","high"].map(e=>(0,n.jsx)("option",{value:e,style:M,children:e},e))})}),(0,n.jsx)(R,{label:B("settingsConfig.personality"),description:B("settingsConfig.personalityDesc"),scope:"Native OMP",children:(0,n.jsx)("select",{style:w,value:ec?.personality??"default",onChange:e=>ej({personality:e.target.value}),children:["default","friendly","pragmatic","none"].map(e=>(0,n.jsx)("option",{value:e,style:M,children:e},e))})}),(0,n.jsx)(R,{label:B("settingsConfig.hideThinking"),description:B("settingsConfig.hideThinkingDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.hideThinkingBlock??!1,onChange:e=>ej({hideThinkingBlock:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.externalThinking"),description:B("settingsConfig.externalThinkingDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.externalThinking??!1,onChange:e=>ej({externalThinking:e})})})]})]}),(ef.has("providers")||ef.has("models"))&&(0,n.jsx)("div",{role:"tabpanel",id:"settings-panel-providers","aria-labelledby":"settings-tab-providers",style:{display:"providers"===eP||"providers"===e?"flex":"none",height:"100%",minHeight:0,flexDirection:"column"},children:(0,n.jsx)(y,{embedded:!0,onClose:$,onSaved:E})}),"intelligence"===eP&&(0,n.jsxs)("div",{role:"tabpanel",id:"settings-panel-intelligence","aria-labelledby":"settings-tab-intelligence",style:{padding:20,display:"flex",flexDirection:"column",gap:18},children:[(0,n.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13,fontWeight:600},children:[(0,n.jsx)(c.A,{size:14,"aria-hidden":"true",style:{color:"var(--accent)"}})," ",B("settingsConfig.advisorReview")]}),(0,n.jsx)("p",{style:{margin:0,color:"var(--text-muted)",fontSize:12},children:B("settingsConfig.advisorReviewDesc")}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.enableAdvisor"),description:B("settingsConfig.enableAdvisorDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.advisor?.enabled??t,onChange:e=>{i(e),ek("advisor",{enabled:e})}})}),(ec?.advisor?.enabled??t)&&(0,n.jsx)(R,{label:B("settingsConfig.advisorBacklog"),description:B("settingsConfig.advisorBacklogDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.advisor?.syncBacklog??"off",onChange:e=>ek("advisor",{syncBacklog:e.target.value}),children:[(0,n.jsx)("option",{value:"off",style:M,children:B("settingsConfig.backlogOff")}),(0,n.jsx)("option",{value:"1",style:M,children:B("settingsConfig.backlog1")}),(0,n.jsx)("option",{value:"3",style:M,children:B("settingsConfig.backlog3")}),(0,n.jsx)("option",{value:"5",style:M,children:B("settingsConfig.backlog5")})]})})]}),(ec?.advisor?.enabled??t)&&(0,n.jsx)(R,{label:B("settingsConfig.reviewSubagents"),description:B("settingsConfig.reviewSubagentsDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.advisor?.subagents??!1,onChange:e=>ek("advisor",{subagents:e})})})]}),(0,n.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:10,borderTop:"1px solid var(--border)",paddingTop:16},children:[(0,n.jsx)("div",{style:{fontSize:13,fontWeight:600},children:B("settingsConfig.contextCompaction")}),(0,n.jsx)("p",{style:{margin:0,color:"var(--text-muted)",fontSize:12},children:B("settingsConfig.contextCompactionDesc")}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.autoCompaction"),description:B("settingsConfig.autoCompactionDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.compaction?.enabled??!0,onChange:e=>ek("compaction",{enabled:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.autoContinueCompaction"),description:B("settingsConfig.autoContinueCompactionDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.compaction?.autoContinue??!0,onChange:e=>ek("compaction",{autoContinue:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.compactionStrategy"),description:B("settingsConfig.compactionStrategyDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.compaction?.strategy??"snapcompact",onChange:e=>ek("compaction",{strategy:e.target.value}),children:[(0,n.jsx)("option",{value:"snapcompact",style:M,children:"Snapcompact"}),(0,n.jsx)("option",{value:"handoff",style:M,children:"Handoff"}),(0,n.jsx)("option",{value:"context-full",style:M,children:"Context full"}),(0,n.jsx)("option",{value:"shake",style:M,children:"Shake"}),(0,n.jsx)("option",{value:"off",style:M,children:"Off"})]})}),(0,n.jsx)(R,{label:B("settingsConfig.compactMidTurn"),description:B("settingsConfig.compactMidTurnDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.compaction?.midTurnEnabled??!0,onChange:e=>ek("compaction",{midTurnEnabled:e})})})]})]}),(0,n.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:10,borderTop:"1px solid var(--border)",paddingTop:16},children:[(0,n.jsx)("div",{style:{fontSize:13,fontWeight:600},children:B("settingsConfig.memoryAndAutoLearn")}),(0,n.jsx)("p",{style:{margin:0,color:"var(--text-muted)",fontSize:12},children:B("settingsConfig.memoryAndAutoLearnDesc")}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.memoryBackend"),description:B("settingsConfig.memoryBackendDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.memory?.backend??"mnemopi",onChange:e=>ek("memory",{backend:e.target.value}),children:[(0,n.jsx)("option",{value:"off",style:M,children:B("settingsConfig.backlogOff")}),(0,n.jsx)("option",{value:"local",style:M,children:B("settingsConfig.memoryLocal")}),(0,n.jsx)("option",{value:"mnemopi",style:M,children:B("settingsConfig.memoryMnemopi")}),(0,n.jsx)("option",{value:"hindsight",style:M,children:B("settingsConfig.memoryHindsight")})]})}),(0,n.jsx)(R,{label:B("settingsConfig.enableAutolearn"),description:B("settingsConfig.enableAutolearnDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.autolearn?.enabled??!0,onChange:e=>ek("autolearn",{enabled:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.privateCaptureTurn"),description:B("settingsConfig.privateCaptureTurnDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.autolearn?.autoContinue??!0,onChange:e=>ek("autolearn",{autoContinue:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.memoryScope"),description:B("settingsConfig.memoryScopeDesc"),scope:"Native OMP",children:(0,n.jsxs)("select",{style:w,value:ec?.mnemopi?.scoping??"per-project",onChange:e=>ek("mnemopi",{scoping:e.target.value}),children:[(0,n.jsx)("option",{value:"per-project",style:M,children:B("settingsConfig.scopePerProject")}),(0,n.jsx)("option",{value:"per-project-tagged",style:M,children:B("settingsConfig.scopePerProjectTagged")}),(0,n.jsx)("option",{value:"global",style:M,children:B("settingsConfig.scopeGlobal")})]})}),(0,n.jsx)(R,{label:B("settingsConfig.autoRecall"),description:B("settingsConfig.autoRecallDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.mnemopi?.autoRecall??!0,onChange:e=>ek("mnemopi",{autoRecall:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.autoRetain"),description:B("settingsConfig.autoRetainDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.mnemopi?.autoRetain??!0,onChange:e=>ek("mnemopi",{autoRetain:e})})})]})]}),(0,n.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:10,borderTop:"1px solid var(--border)",paddingTop:16},children:[(0,n.jsx)("div",{style:{fontSize:13,fontWeight:600},children:B("settingsConfig.autoRetry")}),(0,n.jsx)("p",{style:{margin:0,color:"var(--text-muted)",fontSize:12},children:B("settingsConfig.autoRetryDesc")}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.enableRetry"),description:B("settingsConfig.enableRetryDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.retry?.enabled??!0,onChange:e=>ek("retry",{enabled:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.maxAttempts"),description:B("settingsConfig.maxAttemptsDesc"),scope:"Native OMP",children:(0,n.jsx)("select",{style:w,value:String(ec?.retry?.maxRetries??2),onChange:e=>ek("retry",{maxRetries:Number(e.target.value)}),children:[0,1,2,3,4,5].map(e=>(0,n.jsx)("option",{value:e,style:M,children:e},e))})}),(0,n.jsx)(R,{label:B("settingsConfig.modelFallback"),description:B("settingsConfig.modelFallbackDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.retry?.modelFallback??!1,onChange:e=>ek("retry",{modelFallback:e})})})]})]})]}),(ef.has("mcp")||ef.has("skills")||ef.has("plugins"))&&(0,n.jsxs)("div",{role:"tabpanel",id:"settings-panel-mcp","aria-labelledby":"settings-tab-mcp",style:{display:"mcp"===eP?"flex":"none",height:"100%",minHeight:0,flexDirection:"column",overflowY:"auto",padding:20,gap:16},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:14,fontWeight:600,margin:0},children:B("settingsConfig.mcpTitle")}),(0,n.jsx)("p",{style:{margin:"4px 0 0",fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.mcpDescription")})]}),A&&(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:U?"1fr":"repeat(2, minmax(0, 1fr))",gap:10},children:[(0,n.jsx)(R,{label:B("settingsConfig.loadProjectMcp"),description:B("settingsConfig.loadProjectMcpDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.mcp?.enableProjectConfig??!0,onChange:e=>ek("mcp",{enableProjectConfig:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.renderMcpMarkdown"),description:B("settingsConfig.renderMcpMarkdownDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.mcp?.renderMarkdownResults??!0,onChange:e=>ek("mcp",{renderMarkdownResults:e})})}),(0,n.jsx)(R,{label:B("settingsConfig.mcpResourceUpdates"),description:B("settingsConfig.mcpResourceUpdatesDesc"),scope:"Native OMP",children:(0,n.jsx)(z,{checked:ec?.mcp?.notifications??!1,onChange:e=>ek("mcp",{notifications:e})})})]}),(0,n.jsx)(k,{cwd:A,sessionId:I}),!A&&(0,n.jsx)("p",{style:{margin:0,color:"var(--text-muted)",fontSize:12},children:B("settingsConfig.noWorkspaceMcpHint")})]}),A&&ef.has("skills")&&(0,n.jsx)("div",{role:"tabpanel",id:"settings-panel-skills","aria-labelledby":"settings-tab-skills",style:{display:"skills"===e?"flex":"none",height:"100%",minHeight:0,flexDirection:"column"},children:(0,n.jsx)(C,{embedded:!0,cwd:A,onClose:$})}),A&&ef.has("plugins")&&(0,n.jsx)("div",{role:"tabpanel",id:"settings-panel-plugins","aria-labelledby":"settings-tab-plugins",style:{display:"plugins"===e?"flex":"none",height:"100%",minHeight:0,flexDirection:"column"},children:(0,n.jsx)(j,{embedded:!0,cwd:A,sessionId:I,onClose:$,onReloaded:W})}),"system"===eP&&(0,n.jsxs)("div",{role:"tabpanel",id:"settings-panel-system","aria-labelledby":"settings-tab-system",style:{padding:20,display:"flex",flexDirection:"column",gap:18},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{style:{fontSize:14,fontWeight:600,margin:0},children:B("settingsConfig.systemUpdates")}),(0,n.jsx)("p",{style:{margin:"4px 0 0",fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.systemUpdatesDescription")})]}),(0,n.jsxs)("section",{style:{padding:14,border:"1px solid var(--border)",borderRadius:"var(--radius-card)",background:"var(--bg-panel)",display:"flex",flexDirection:"column",gap:10},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{fontSize:13,fontWeight:600},children:B("settingsConfig.appLabel")}),(0,n.jsx)("div",{style:{marginTop:4,color:ei?.updateAvailable?"var(--accent)":"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:12},children:es?B("settingsConfig.checkingUpdates"):ei?.updateAvailable?B("appShell.updateVersion",{current:ei.currentVersion??"?",available:ei.availableVersion??"?"}):ei?.currentVersion?B("settingsConfig.upToDate",{version:ei.currentVersion}):B("settingsConfig.versionUnavailable")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void eM(!0),disabled:es,"aria-label":B("settingsConfig.checkAppUpdates"),style:{padding:"6px 10px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"transparent",color:"var(--text)",cursor:es?"wait":"pointer",fontSize:12,display:"inline-flex",alignItems:"center",gap:5},children:[(0,n.jsx)(l.A,{size:13,"aria-hidden":"true"})," ",B("settingsConfig.refresh")]})]}),ei?.updateAvailable&&(0,n.jsxs)("div",{style:{marginTop:6,padding:"10px 12px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg)",display:"flex",flexDirection:"column",gap:6},children:[(0,n.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.runAppUpdateCommand")}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,n.jsx)("code",{style:{flex:1,fontFamily:"var(--font-mono)",fontSize:12,color:"var(--accent)",wordBreak:"break-all"},children:ei.updateCommand||"npm install -g ompgui"}),(0,n.jsxs)("button",{type:"button",onClick:()=>{(0,b.D)(ei.updateCommand||"npm install -g ompgui").then(()=>ed(B("appShell.commandCopied"))).catch(()=>ed(B("appShell.commandCopyFailed")))},style:{display:"inline-flex",alignItems:"center",gap:5,padding:"4px 8px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg-subtle)",color:"var(--text)",cursor:"pointer",fontSize:11},children:[(0,n.jsx)(p.A,{size:12,"aria-hidden":"true"})," ",B("appShell.copyCommand")]})]})]})]}),(0,n.jsxs)("section",{style:{padding:14,border:"1px solid var(--border)",borderRadius:"var(--radius-card)",background:"var(--bg-panel)",display:"flex",flexDirection:"column",gap:10},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{fontSize:13,fontWeight:600},children:B("settingsConfig.ompLabel")}),(0,n.jsx)("div",{style:{marginTop:4,color:Q?.updateAvailable?"var(--accent)":"var(--text-muted)",fontFamily:"var(--font-mono)",fontSize:12},children:ee?B("settingsConfig.checkingUpdates"):Q?.updateAvailable?B("appShell.updateVersion",{current:Q.currentVersion??"?",available:Q.availableVersion??"?"}):Q?.currentVersion?B("settingsConfig.upToDate",{version:Q.currentVersion}):B("settingsConfig.versionUnavailable")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void ew(),disabled:ee,"aria-label":B("settingsConfig.checkOmpUpdates"),style:{padding:"6px 10px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"transparent",color:"var(--text)",cursor:ee?"wait":"pointer",fontSize:12,display:"inline-flex",alignItems:"center",gap:5},children:[(0,n.jsx)(l.A,{size:13,"aria-hidden":"true"})," ",B("settingsConfig.refresh")]})]}),Q?.updateAvailable&&(0,n.jsxs)("div",{style:{marginTop:6,padding:"10px 12px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg)",display:"flex",flexDirection:"column",gap:6},children:[(0,n.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)"},children:B("settingsConfig.runOmpUpdateCommand")}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,n.jsx)("code",{style:{flex:1,fontFamily:"var(--font-mono)",fontSize:12,color:"var(--accent)",wordBreak:"break-all"},children:Q.updateCommand||"omp update"}),(0,n.jsxs)("button",{type:"button",onClick:()=>{(0,b.D)(Q.updateCommand||"omp update").then(()=>ed(B("appShell.commandCopied"))).catch(()=>ed(B("appShell.commandCopyFailed")))},style:{display:"inline-flex",alignItems:"center",gap:5,padding:"4px 8px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg-subtle)",color:"var(--text)",cursor:"pointer",fontSize:11},children:[(0,n.jsx)(p.A,{size:12,"aria-hidden":"true"})," ",B("appShell.copyCommand")]})]})]}),(0,n.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:6},children:[(0,n.jsxs)("button",{type:"button",onClick:()=>void eA(),disabled:ea,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"7px 12px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",background:"var(--bg-subtle)",color:"var(--text)",cursor:ea?"wait":"pointer",fontSize:12},children:[(0,n.jsx)(g.A,{size:13,"aria-hidden":"true"})," ",ea?B("settingsConfig.restarting"):B("settingsConfig.restartSessions")]}),(0,n.jsxs)("a",{href:"https://github.com/can1357/oh-my-pi/releases",target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"7px 12px",border:"1px solid var(--border)",borderRadius:"var(--radius-control)",color:"var(--text-muted)",textDecoration:"none",fontSize:12},children:[(0,n.jsx)(u,{size:13,"aria-hidden":"true"})," ",B("settingsConfig.changelog")]})]}),er&&(0,n.jsx)("p",{role:"status",style:{margin:"4px 0 0",color:"var(--text-muted)",fontSize:12,lineHeight:1.5},children:er})]})]})]})]})})]})})}},92298:(e,t,i)=>{i.d(t,{A:()=>n});let n=(0,i(99537).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{18731:(e,r,t)=>{Promise.resolve().then(t.bind(t,77397))},77397:(e,r,t)=>{"use strict";t.d(r,{LoginForm:()=>s});var a=t(95155);let o=(0,t(99537).A)("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);var i=t(12115);function s(){let[e,r]=(0,i.useState)(""),[t,s]=(0,i.useState)(null),[n,l]=(0,i.useState)(!1);async function d(r){r.preventDefault(),l(!0),s(null);try{if(!(await fetch("/api/web-auth/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})})).ok)return void s("Incorrect password. Please try again.");window.location.assign("/")}catch{s("Could not sign in. Please check your connection and try again.")}finally{l(!1)}}return(0,a.jsx)("main",{style:{flex:1,display:"grid",placeItems:"center",padding:20,background:"var(--bg)"},children:(0,a.jsxs)("section",{"aria-labelledby":"login-title",style:{width:"min(100%, 380px)",padding:"32px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:"var(--radius-modal)",boxShadow:"var(--shadow-modal)"},children:[(0,a.jsx)("div",{style:{width:40,height:40,display:"grid",placeItems:"center",borderRadius:"50%",background:"var(--user-bg)",color:"var(--accent)",marginBottom:20},children:(0,a.jsx)(o,{size:19,"aria-hidden":"true"})}),(0,a.jsx)("h1",{id:"login-title",className:"display-serif",style:{margin:0,fontSize:28,lineHeight:1.1,color:"var(--text)"},children:"Welcome back"}),(0,a.jsx)("p",{style:{margin:"10px 0 24px",color:"var(--text-muted)",fontSize:13,lineHeight:1.5},children:"Enter the password for this omp web workspace."}),(0,a.jsxs)("form",{onSubmit:d,style:{display:"grid",gap:14},children:[(0,a.jsxs)("label",{htmlFor:"web-password",style:{display:"grid",gap:6,color:"var(--text-muted)",fontSize:12,fontWeight:600},children:["Password",(0,a.jsx)("input",{id:"web-password",type:"password",value:e,onChange:e=>r(e.target.value),autoComplete:"current-password",autoFocus:!0,required:!0,"aria-invalid":!!t||void 0,"aria-describedby":t?"password-error":void 0,style:{width:"100%",padding:"9px 10px",border:`1px solid ${t?"var(--status-error)":"var(--border)"}`,borderRadius:"var(--radius-control)",background:"var(--bg)",color:"var(--text)",fontSize:14,outline:"none",boxShadow:"none"}})]}),t&&(0,a.jsx)("p",{id:"password-error",role:"alert",style:{margin:0,color:"var(--status-error)",fontSize:12},children:t}),(0,a.jsx)("button",{type:"submit",disabled:n,style:{minHeight:36,border:0,borderRadius:"var(--radius-control)",background:"var(--accent-strong)",color:"var(--on-accent)",fontWeight:600,cursor:n?"wait":"pointer",opacity:n?.7:1},children:n?"Unlocking…":"Unlock workspace"})]})]})})}},99537:(e,r,t)=>{"use strict";t.d(r,{A:()=>d});var a=t(12115);let o=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),i=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)};var s={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"};let n=(0,a.createContext)({}),l=(0,a.forwardRef)(({color:e,size:r,strokeWidth:t,absoluteStrokeWidth:i,className:l="",children:d,iconNode:c,...u},h)=>{let{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:b=!1,color:w="currentColor",className:m=""}=(0,a.useContext)(n)??{},y=i??b?24*Number(t??g)/Number(r??p):t??g;return(0,a.createElement)("svg",{ref:h,...s,width:r??p??s.width,height:r??p??s.height,stroke:e??w,strokeWidth:y,className:o("lucide",m,l),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,r])=>(0,a.createElement)(e,r)),...Array.isArray(d)?d:[d]])}),d=(e,r)=>{let t=(0,a.forwardRef)(({className:t,...s},n)=>(0,a.createElement)(l,{ref:n,iconNode:r,className:o(`lucide-${i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...s}));return t.displayName=i(e),t}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=18731)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|