@kaitranntt/ccs 7.34.1 → 7.35.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/dist/ccs.js +11 -0
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/cliproxy-executor.d.ts.map +1 -1
- package/dist/cliproxy/cliproxy-executor.js +23 -0
- package/dist/cliproxy/cliproxy-executor.js.map +1 -1
- package/dist/cliproxy/services/variant-settings.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-settings.js +5 -0
- package/dist/cliproxy/services/variant-settings.js.map +1 -1
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/config-command.js +14 -0
- package/dist/commands/config-command.js.map +1 -1
- package/dist/commands/config-image-analysis-command.d.ts +8 -0
- package/dist/commands/config-image-analysis-command.d.ts.map +1 -0
- package/dist/commands/config-image-analysis-command.js +174 -0
- package/dist/commands/config-image-analysis-command.js.map +1 -0
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +14 -0
- package/dist/commands/help-command.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/update-command.js +15 -5
- package/dist/commands/update-command.js.map +1 -1
- package/dist/config/unified-config-loader.d.ts +7 -1
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +157 -24
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +19 -0
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +21 -1
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/delegation/headless-executor.d.ts.map +1 -1
- package/dist/delegation/headless-executor.js +1 -1
- package/dist/delegation/headless-executor.js.map +1 -1
- package/dist/delegation/result-formatter.d.ts +0 -4
- package/dist/delegation/result-formatter.d.ts.map +1 -1
- package/dist/delegation/result-formatter.js +5 -16
- package/dist/delegation/result-formatter.js.map +1 -1
- package/dist/glmt/glmt-proxy.d.ts.map +1 -1
- package/dist/glmt/glmt-proxy.js +6 -2
- package/dist/glmt/glmt-proxy.js.map +1 -1
- package/dist/management/checks/image-analysis-check.d.ts +16 -0
- package/dist/management/checks/image-analysis-check.d.ts.map +1 -0
- package/dist/management/checks/image-analysis-check.js +140 -0
- package/dist/management/checks/image-analysis-check.js.map +1 -0
- package/dist/management/checks/index.d.ts +1 -0
- package/dist/management/checks/index.d.ts.map +1 -1
- package/dist/management/checks/index.js +5 -1
- package/dist/management/checks/index.js.map +1 -1
- package/dist/management/doctor.d.ts.map +1 -1
- package/dist/management/doctor.js +4 -0
- package/dist/management/doctor.js.map +1 -1
- package/dist/management/repair/auto-repair.d.ts.map +1 -1
- package/dist/management/repair/auto-repair.js +16 -0
- package/dist/management/repair/auto-repair.js.map +1 -1
- package/dist/ui/assets/{accounts-BROl36rt.js → accounts-b2F3ZAU8.js} +1 -1
- package/dist/ui/assets/{alert-dialog-Bc0CRwpK.js → alert-dialog-L3d8GDXi.js} +1 -1
- package/dist/ui/assets/{api-BTvodZ9c.js → api-BuyRFWlp.js} +1 -1
- package/dist/ui/assets/auth-section-BpICzMKK.js +1 -0
- package/dist/ui/assets/backups-section-CAqSh_mu.js +1 -0
- package/dist/ui/assets/{cliproxy-CL-Lk791.js → cliproxy-CcLAW8bB.js} +2 -2
- package/dist/ui/assets/cliproxy-control-panel-K7xiAvok.js +1 -0
- package/dist/ui/assets/{confirm-dialog-B0UGiTIr.js → confirm-dialog-OG_57rDw.js} +1 -1
- package/dist/ui/assets/{copilot-DoojagGr.js → copilot-NIAKmbdW.js} +2 -2
- package/dist/ui/assets/globalenv-section-DdsS7yEO.js +1 -0
- package/dist/ui/assets/health--QCS2yIj.js +1 -0
- package/dist/ui/assets/{icons-B_4flurP.js → icons-D5eAI-GR.js} +1 -1
- package/dist/ui/assets/{index-8_6THoWM.css → index-BL8DS7Z0.css} +1 -1
- package/dist/ui/assets/{index-Dhj9QHKA.js → index-BcClU15l.js} +1 -1
- package/dist/ui/assets/index-C2Cx0QB3.js +1 -0
- package/dist/ui/assets/{index-C8D32oPF.js → index-CxBjoBIe.js} +16 -16
- package/dist/ui/assets/index-D4NhXgPa.js +1 -0
- package/dist/ui/assets/index-Dl9qz9yj.js +1 -0
- package/dist/ui/assets/proxy-status-widget-BvGTE0sc.js +1 -0
- package/dist/ui/assets/shared-CBqyGf1c.js +1 -0
- package/dist/ui/assets/{switch-l6toeZhu.js → switch-Cl6oSNjg.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/config-manager.d.ts +11 -0
- package/dist/utils/config-manager.d.ts.map +1 -1
- package/dist/utils/config-manager.js +40 -1
- package/dist/utils/config-manager.js.map +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.d.ts +17 -0
- package/dist/utils/hooks/get-image-analysis-hook-env.d.ts.map +1 -0
- package/dist/utils/hooks/get-image-analysis-hook-env.js +42 -0
- package/dist/utils/hooks/get-image-analysis-hook-env.js.map +1 -0
- package/dist/utils/hooks/image-analyzer-hook-configuration.d.ts +17 -0
- package/dist/utils/hooks/image-analyzer-hook-configuration.d.ts.map +1 -0
- package/dist/utils/hooks/image-analyzer-hook-configuration.js +71 -0
- package/dist/utils/hooks/image-analyzer-hook-configuration.js.map +1 -0
- package/dist/utils/hooks/image-analyzer-hook-installer.d.ts +31 -0
- package/dist/utils/hooks/image-analyzer-hook-installer.d.ts.map +1 -0
- package/dist/utils/hooks/image-analyzer-hook-installer.js +149 -0
- package/dist/utils/hooks/image-analyzer-hook-installer.js.map +1 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.d.ts +24 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.d.ts.map +1 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.js +251 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.js.map +1 -0
- package/dist/utils/hooks/index.d.ts +11 -0
- package/dist/utils/hooks/index.d.ts.map +1 -0
- package/dist/utils/hooks/index.js +21 -0
- package/dist/utils/hooks/index.js.map +1 -0
- package/dist/utils/image-analysis/hook-installer.d.ts +19 -0
- package/dist/utils/image-analysis/hook-installer.d.ts.map +1 -0
- package/dist/utils/image-analysis/hook-installer.js +112 -0
- package/dist/utils/image-analysis/hook-installer.js.map +1 -0
- package/dist/utils/image-analysis/index.d.ts +7 -0
- package/dist/utils/image-analysis/index.d.ts.map +1 -0
- package/dist/utils/image-analysis/index.js +12 -0
- package/dist/utils/image-analysis/index.js.map +1 -0
- package/dist/utils/shell-executor.d.ts +1 -0
- package/dist/utils/shell-executor.d.ts.map +1 -1
- package/dist/utils/shell-executor.js +24 -1
- package/dist/utils/shell-executor.js.map +1 -1
- package/dist/utils/websearch/hook-config.d.ts +0 -4
- package/dist/utils/websearch/hook-config.d.ts.map +1 -1
- package/dist/utils/websearch/hook-config.js +2 -9
- package/dist/utils/websearch/hook-config.js.map +1 -1
- package/dist/utils/websearch/hook-installer.d.ts.map +1 -1
- package/dist/utils/websearch/hook-installer.js +2 -1
- package/dist/utils/websearch/hook-installer.js.map +1 -1
- package/dist/utils/websearch/profile-hook-injector.d.ts.map +1 -1
- package/dist/utils/websearch/profile-hook-injector.js +9 -3
- package/dist/utils/websearch/profile-hook-injector.js.map +1 -1
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/settings-routes.js +13 -8
- package/dist/web-server/routes/settings-routes.js.map +1 -1
- package/lib/hooks/image-analyzer-transformer.cjs +880 -0
- package/lib/prompts/image-analysis-default.txt +12 -0
- package/lib/prompts/image-analysis-document.txt +13 -0
- package/lib/prompts/image-analysis-screenshot.txt +13 -0
- package/package.json +3 -2
- package/dist/ui/assets/auth-section-CdJfwuku.js +0 -1
- package/dist/ui/assets/backups-section-C1QbR4iU.js +0 -1
- package/dist/ui/assets/cliproxy-control-panel-C67g3-lG.js +0 -1
- package/dist/ui/assets/globalenv-section-DWvTHsju.js +0 -1
- package/dist/ui/assets/health-kyBi8s6g.js +0 -1
- package/dist/ui/assets/index-Br2-kfvk.js +0 -1
- package/dist/ui/assets/index-CaHIXCeK.js +0 -1
- package/dist/ui/assets/index-DaeRFGpX.js +0 -1
- package/dist/ui/assets/proxy-status-widget-CRQnzDjM.js +0 -1
- package/dist/ui/assets/shared-CjMwFBIs.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-qEZD5MMp.js";import{r as a}from"./react-vendor-CNOkPC89.js";import{aM as A,aO as M,b as C,m as R,L as D,X as L,Y as $,Z as F,_ as K,$ as z}from"./index-CxBjoBIe.js";import{S as H}from"./switch-Cl6oSNjg.js";import{R as k,a1 as O,q as U,a3 as q,I as G}from"./icons-D5eAI-GR.js";import"./tanstack-De4wvi8X.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-C-pVd1--.js";import"./code-highlight-BRUf_pqB.js";const p={mode:"auto",tier_defaults:{opus:"high",sonnet:"medium",haiku:"low"},show_warnings:!0},T=1e4;function V(){const[n,i]=a.useState(null),[g,u]=a.useState(!0),[b,c]=a.useState(!1),[j,o]=a.useState(null),[v,s]=a.useState(!1),l=a.useRef(void 0),N=a.useCallback(async()=>{const r=new AbortController,m=setTimeout(()=>r.abort(),T);try{u(!0),o(null);const t=await fetch("/api/thinking",{signal:r.signal});if(clearTimeout(m),!t.ok)throw t.headers.get("content-type")?.includes("text/html")?new Error(`Server error (${t.status})`):new Error("Failed to load Thinking config");const x=await t.json();i(x.config||p),l.current=x.lastModified}catch(t){clearTimeout(m),t.name==="AbortError"?o("Request timeout - please try again"):o(t.message),i(p)}finally{u(!1)}return()=>r.abort()},[]),d=a.useCallback(async r=>{const m=n||p,t={...m,...r};i(t);const x=new AbortController,w=setTimeout(()=>x.abort(),T);try{c(!0),o(null);const f={...t,lastModified:l.current},h=await fetch("/api/thinking",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),signal:x.signal});if(clearTimeout(w),!h.ok){if(h.headers.get("content-type")?.includes("text/html"))throw new Error(`Server error (${h.status})`);const I=await h.json();throw h.status===409?new Error("Config changed by another session. Refreshing..."):new Error(I.error||"Failed to save")}const y=await h.json();i(y.config),l.current=y.lastModified,s(!0),setTimeout(()=>s(!1),1500)}catch(f){clearTimeout(w),i(m),f.name==="AbortError"?o("Request timeout - please try again"):(o(f.message),f.message.includes("another session")&&setTimeout(()=>N(),1e3))}finally{c(!1)}},[n,N]),S=a.useCallback(r=>{d({mode:r})},[d]),E=a.useCallback((r,m)=>{const t=n?.tier_defaults||p.tier_defaults;d({tier_defaults:{...t,[r]:m}})},[n,d]),_=a.useCallback(r=>{d({show_warnings:r})},[d]);return{config:n||p,loading:g,saving:b,error:j,success:v,fetchConfig:N,saveConfig:d,setMode:S,setTierDefault:E,setShowWarnings:_}}const W=[{value:"minimal",label:"Minimal (512 tokens)"},{value:"low",label:"Low (1K tokens)"},{value:"medium",label:"Medium (8K tokens)"},{value:"high",label:"High (24K tokens)"},{value:"xhigh",label:"Extra High (32K tokens)"},{value:"auto",label:"Auto (dynamic)"}];function ne(){const{config:n,loading:i,saving:g,error:u,success:b,fetchConfig:c,setMode:j,setTierDefault:o,setShowWarnings:v}=V();return a.useEffect(()=>{c()},[c]),i?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(k,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Loading..."})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${u||b?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[u&&e.jsx(A,{variant:"destructive",className:"py-2 shadow-lg",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"h-4 w-4"}),e.jsx(M,{children:u})]}),e.jsxs(C,{variant:"outline",size:"sm",onClick:c,className:"h-7 px-2 text-xs border-destructive/50 hover:bg-destructive/10",children:[e.jsx(k,{className:"w-3 h-3 mr-1"}),"Retry"]})]})}),b&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(U,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(R,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(q,{className:"w-5 h-5 text-primary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure extended thinking/reasoning for supported models."})]}),e.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800",children:[e.jsx(G,{className:"w-4 h-4 text-blue-600 dark:text-blue-400 shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:[e.jsx("p",{className:"font-medium",children:"Supported Providers"}),e.jsxs("ul",{className:"mt-1 space-y-0.5 text-blue-600 dark:text-blue-400",children:[e.jsxs("li",{children:["Thinking budget: ",e.jsx("strong",{children:"agy"}),", ",e.jsx("strong",{children:"gemini"})," (token-based)"]}),e.jsxs("li",{children:["Reasoning effort: ",e.jsx("strong",{children:"codex"})," (level-based: medium/high/xhigh)"]})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Thinking Mode"}),e.jsx("div",{className:"space-y-2",children:["auto","off","manual"].map(s=>e.jsxs("div",{className:`flex items-center justify-between p-4 rounded-lg cursor-pointer transition-colors ${n.mode===s?"bg-primary/10 border border-primary/30":"bg-muted/50 hover:bg-muted/80"}`,onClick:()=>j(s),children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium capitalize",children:s}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s==="auto"&&"Automatically set thinking based on model tier",s==="off"&&"Disable extended thinking",s==="manual"&&"Use --thinking flag to control manually"]})]}),e.jsx("div",{className:`w-4 h-4 rounded-full border-2 ${n.mode===s?"bg-primary border-primary":"border-muted-foreground/50"}`})]},s))})]}),n.mode==="auto"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Tier Defaults"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Default thinking level for each model tier when in auto mode."}),e.jsx("div",{className:"space-y-3",children:["opus","sonnet","haiku"].map(s=>e.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-muted/30",children:[e.jsx(D,{className:"w-20 capitalize font-medium",children:s}),e.jsxs(L,{value:n.tier_defaults[s],onValueChange:l=>o(s,l),disabled:g,children:[e.jsx($,{className:"flex-1",children:e.jsx(F,{})}),e.jsx(K,{children:W.map(l=>e.jsx(z,{value:l.value,children:l.label},l.value))})]})]},s))})]}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Show Warnings"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Display warnings when thinking values are clamped or adjusted"})]}),e.jsx(H,{checked:n.show_warnings??!0,onCheckedChange:v,disabled:g})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-muted/30",children:[e.jsx("h4",{className:"text-sm font-medium mb-2",children:"CLI Override"}),e.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:["Use ",e.jsx("code",{className:"px-1.5 py-0.5 rounded bg-muted",children:"--thinking"})," flag to override settings per session:"]}),e.jsxs("div",{className:"space-y-1 text-sm font-mono text-muted-foreground",children:[e.jsx("p",{children:"ccs gemini --thinking high"}),e.jsx("p",{children:"ccs agy --thinking 16384"}),e.jsx("p",{children:"ccs gemini --thinking off"})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(C,{variant:"outline",size:"sm",onClick:c,disabled:i||g,className:"w-full",children:[e.jsx(k,{className:`w-4 h-4 mr-2 ${i?"animate-spin":""}`}),"Refresh"]})})]})}export{ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-qEZD5MMp.js";import{r as i}from"./react-vendor-CNOkPC89.js";import{aP as T,aQ as $,I as F,aR as U,aM as _,aO as z,m as B,b as O}from"./index-CxBjoBIe.js";import{S as K}from"./switch-Cl6oSNjg.js";import{y as q,j as Y,V as D,Y as V,m as J,R as y,a1 as Q,q as X,aA as Z}from"./icons-D5eAI-GR.js";import"./tanstack-De4wvi8X.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-C-pVd1--.js";import"./code-highlight-BRUf_pqB.js";function ee(){const{state:s}=T(),a=$(),[d,l]=i.useState(""),[o,m]=i.useState(""),[f,h]=i.useState(!1),[j,u]=i.useState(!1),S=i.useCallback(async()=>{try{a.setWebSearchLoading(!0),a.setWebSearchError(null);const t=await fetch("/api/websearch");if(!t.ok)throw new Error("Failed to load WebSearch config");const r=await t.json();a.setWebSearchConfig(r)}catch(t){a.setWebSearchError(t.message)}finally{a.setWebSearchLoading(!1)}},[a]),v=i.useCallback(async()=>{try{a.setWebSearchStatusLoading(!0);const t=await fetch("/api/websearch/status");if(!t.ok)throw new Error("Failed to load status");const r=await t.json();a.setWebSearchStatus(r)}catch{}finally{a.setWebSearchStatusLoading(!1)}},[a]),g=i.useCallback(async t=>{const r=s.webSearchConfig;if(!r)return;const w={...r,...t};a.setWebSearchConfig(w);try{a.setWebSearchSaving(!0),a.setWebSearchError(null);const n=await fetch("/api/websearch",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(!n.ok){const k=await n.json();throw new Error(k.error||"Failed to save")}const C=await n.json();a.setWebSearchConfig(C.websearch),a.setWebSearchSuccess(!0),setTimeout(()=>a.setWebSearchSuccess(!1),1500)}catch(n){a.setWebSearchConfig(r),a.setWebSearchError(n.message)}finally{a.setWebSearchSaving(!1)}},[s.webSearchConfig,a]);i.useEffect(()=>{s.webSearchConfig&&(l(s.webSearchConfig.providers?.gemini?.model??"gemini-2.5-flash"),m(s.webSearchConfig.providers?.opencode?.model??"opencode/grok-code"))},[s.webSearchConfig]);const x=i.useCallback(async()=>{const t=s.webSearchConfig?.providers?.gemini?.model??"gemini-2.5-flash";if(d!==t){const r=s.webSearchConfig?.providers||{};await g({providers:{...r,gemini:{...r.gemini,model:d}}}),h(!0),setTimeout(()=>h(!1),2e3)}},[d,s.webSearchConfig,g]),p=i.useCallback(async()=>{const t=s.webSearchConfig?.providers?.opencode?.model??"opencode/grok-code";if(o!==t){const r=s.webSearchConfig?.providers||{};await g({providers:{...r,opencode:{...r.opencode,model:o}}}),u(!0),setTimeout(()=>u(!1),2e3)}},[o,s.webSearchConfig,g]);return{config:s.webSearchConfig,status:s.webSearchStatus,loading:s.webSearchLoading,statusLoading:s.webSearchStatusLoading,saving:s.webSearchSaving,error:s.webSearchError,success:s.webSearchSuccess,geminiModelInput:d,setGeminiModelInput:l,opencodeModelInput:o,setOpencodeModelInput:m,geminiModelSaved:f,opencodeModelSaved:j,fetchConfig:S,fetchStatus:v,saveConfig:g,saveGeminiModel:x,saveOpencodeModel:p}}function A({name:s,label:a,badge:d,badgeColor:l,enabled:o,installed:m,statusLoading:f,saving:h,onToggle:j,modelInput:u,setModelInput:S,onModelBlur:v,modelSaved:g,modelPlaceholder:x,showHint:p,setShowHint:t,installCmd:r,docsUrl:w,hintColor:n}){const C=l==="green"?"bg-green-500/10 text-green-600":l==="blue"?"bg-blue-500/10 text-blue-600":"bg-purple-500/10 text-purple-600",k=n==="amber"?"bg-amber-50 dark:bg-amber-900/20 text-amber-700 dark:text-amber-300":n==="blue"?"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300":"bg-purple-50 dark:bg-purple-900/20 text-purple-700 dark:text-purple-300",E=n==="amber"?"bg-amber-100 dark:bg-amber-900/40":n==="blue"?"bg-blue-100 dark:bg-blue-900/40":"bg-purple-100 dark:bg-purple-900/40",I=n==="amber"?"text-amber-600 dark:text-amber-400":n==="blue"?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400",M=s==="opencode"?"OpenCode":s.charAt(0).toUpperCase()+s.slice(1);return e.jsxs("div",{className:`rounded-lg border transition-colors ${o?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(q,{className:`w-5 h-5 ${o?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:s}),e.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded font-medium ${C}`,children:d}),m?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a})]})]}),e.jsx(K,{checked:o,onCheckedChange:j,disabled:h||!m})]}),o&&u!==void 0&&S&&v&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx(F,{value:u,onChange:W=>S(W.target.value),onBlur:v,placeholder:x,className:"h-8 text-sm font-mono",disabled:h}),g&&e.jsxs("span",{className:"flex items-center gap-1 text-green-600 dark:text-green-400 text-xs animate-in fade-in duration-200",children:[e.jsx(Y,{className:"w-3.5 h-3.5"}),"Saved"]})]})}),!m&&!f&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>t(!p),className:`flex items-center gap-2 text-sm hover:underline w-full py-2 ${I}`,children:[p?e.jsx(D,{className:"w-4 h-4"}):e.jsx(V,{className:"w-4 h-4"}),"How to install ",M," CLI"]}),p&&e.jsxs("div",{className:`mt-2 p-3 rounded-md text-sm ${k}`,children:[e.jsxs("p",{className:"mb-2",children:["Install globally"," ",d==="GROK_API_KEY"?"(requires xAI API key)":"(FREE tier available)",":"]}),e.jsx("code",{className:`text-sm px-2 py-1 rounded font-mono block mb-2 ${E}`,children:r}),e.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"hover:underline inline-flex items-center gap-1",children:[e.jsx(J,{className:"w-3 h-3"}),"View documentation"]})]})]})]})}function me(){const{config:s,status:a,loading:d,statusLoading:l,saving:o,error:m,success:f,geminiModelInput:h,setGeminiModelInput:j,opencodeModelInput:u,setOpencodeModelInput:S,geminiModelSaved:v,opencodeModelSaved:g,fetchConfig:x,fetchStatus:p,saveConfig:t,saveGeminiModel:r,saveOpencodeModel:w}=ee(),{fetchRawConfig:n}=U(),[C,k]=i.useState(!1),[E,I]=i.useState(!1),[M,W]=i.useState(!1);i.useEffect(()=>{x(),p(),n()},[x,p,n]);const N=s?.providers?.gemini?.enabled??!1,G=s?.providers?.grok?.enabled??!1,L=s?.providers?.opencode?.enabled??!1,R=()=>{const c=s?.providers||{},b=c.gemini?.enabled??!1;t({enabled:!b||G||L,providers:{...c,gemini:{...c.gemini,enabled:!b}}})},H=()=>{const c=s?.providers||{},b=c.grok?.enabled??!1;t({enabled:N||!b||L,providers:{...c,grok:{...c.grok,enabled:!b}}})},P=()=>{const c=s?.providers||{},b=c.opencode?.enabled??!1;t({enabled:N||G||!b,providers:{...c,opencode:{...c.opencode,enabled:!b}}})};return d?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(y,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Loading..."})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${m||f?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[m&&e.jsxs(_,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(Q,{className:"h-4 w-4"}),e.jsx(z,{children:m})]}),f&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(X,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(B,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"CLI-based web search for third-party profiles (gemini, codex, agy, etc.)"}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:N?"WebSearch enabled":"WebSearch disabled"}),l?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking status..."}):a?.readiness?e.jsx("p",{className:"text-sm text-muted-foreground",children:a.readiness.message}):null]}),e.jsx(O,{variant:"ghost",size:"sm",onClick:p,disabled:l,children:e.jsx(y,{className:`w-4 h-4 ${l?"animate-spin":""}`})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Providers"}),!a?.geminiCli&&!a?.opencodeCli&&!a?.grokCli&&!l&&e.jsxs("div",{className:"flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-lg text-center bg-muted/30",children:[e.jsx(Z,{className:"w-12 h-12 text-muted-foreground mb-3 opacity-30"}),e.jsx("p",{className:"font-medium text-foreground mb-1",children:"No providers configured"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Install CLI tools to enable web search providers"}),e.jsxs(O,{variant:"outline",size:"sm",onClick:p,children:[e.jsx(y,{className:"w-4 h-4 mr-2"}),"Check for providers"]})]}),e.jsx(A,{name:"gemini",label:"Google Gemini CLI (1000 req/day free)",badge:"FREE",badgeColor:"green",enabled:N,installed:a?.geminiCli?.installed??!1,statusLoading:l,saving:o,onToggle:R,modelInput:h,setModelInput:j,onModelBlur:r,modelSaved:v,modelPlaceholder:"gemini-2.5-flash",showHint:C,setShowHint:k,installCmd:"npm install -g @google/gemini-cli",docsUrl:"https://github.com/google-gemini/gemini-cli",hintColor:"amber"}),e.jsx(A,{name:"opencode",label:"OpenCode (web search via Zen)",badge:"FREE",badgeColor:"green",enabled:L,installed:a?.opencodeCli?.installed??!1,statusLoading:l,saving:o,onToggle:P,modelInput:u,setModelInput:S,onModelBlur:w,modelSaved:g,modelPlaceholder:"opencode/grok-code",showHint:E,setShowHint:I,installCmd:"curl -fsSL https://opencode.ai/install | bash",docsUrl:"https://github.com/sst/opencode",hintColor:"purple"}),e.jsx(A,{name:"grok",label:"xAI Grok CLI (web + X search)",badge:"GROK_API_KEY",badgeColor:"blue",enabled:G,installed:a?.grokCli?.installed??!1,statusLoading:l,saving:o,onToggle:H,showHint:M,setShowHint:W,installCmd:"npm install -g @vibe-kit/grok-cli",docsUrl:"https://github.com/superagent-ai/grok-cli",hintColor:"blue"})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(O,{variant:"outline",size:"sm",onClick:()=>{x(),n()},disabled:d||o,className:"w-full",children:[e.jsx(y,{className:`w-4 h-4 mr-2 ${d?"animate-spin":""}`}),"Refresh"]})})]})}export{me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-qEZD5MMp.js";import{r as y}from"./react-vendor-CNOkPC89.js";import{aT as W,az as J,aU as Z,aV as _,aW as ee,aX as se,aY as te,c as d,B as E,al as ae,E as ne,G as re,X as oe,Y as ie,Z as le,_ as ce,$ as de,b as T,T as xe,o as me,p as ue,ad as he}from"./index-CxBjoBIe.js";import{A as ge,a as pe,b as fe,c as be,d as je,e as ye,f as Ne,g as we}from"./alert-dialog-L3d8GDXi.js";import{u as q,a as ve,b as Ce,e as Se}from"./tanstack-De4wvi8X.js";import{t as V}from"./notifications-B2HqRBj7.js";import{a2 as ke,A as Pe,R as f,aF as Ve,aG as Ae,aH as Te,X as De,S as Ie,aI as Ue,aJ as $e,U as Ee,p as Re,j as qe,a1 as Fe,ao as Le,T as R,av as Me}from"./icons-D5eAI-GR.js";async function Be(){const s=await fetch("/api/cliproxy/sync/status");if(!s.ok){let n="Failed to fetch sync status";try{const t=await s.json();n=t.error||t.message||n}catch{}throw new Error(n)}return s.json()}async function Ke(){const s=new AbortController,n=setTimeout(()=>s.abort(),3e4);try{const t=await fetch("/api/cliproxy/sync",{method:"POST",headers:{"Content-Type":"application/json"},signal:s.signal});if(!t.ok){let a="Sync failed";try{const r=await t.json();a=r.error||r.message||a}catch{}throw new Error(a)}return t.json()}catch(t){throw t instanceof Error&&t.name==="AbortError"?new Error("Sync request timed out after 30 seconds"):t}finally{clearTimeout(n)}}function ze(){return q({queryKey:["cliproxy-sync-status"],queryFn:Be,refetchInterval:3e4,retry:1,staleTime:1e4})}function Qe(){const s=ve();return Ce({mutationFn:Ke,onSuccess:n=>{s.invalidateQueries({queryKey:["cliproxy-sync-status"]}),s.invalidateQueries({queryKey:["cliproxy-sync-preview"]}),n.syncedCount===0?V.info("No profiles to sync"):V.success(`Synced ${n.syncedCount} profile${n.syncedCount===1?"":"s"} to CLIProxy`)},onError:n=>{V.error(`Sync failed: ${n.message}`)}})}function A(s,n){const t=s.replace(/-\d+$/,"").split(".").map(Number),a=n.replace(/-\d+$/,"").split(".").map(Number);for(let r=0;r<3;r++){if((t[r]||0)>(a[r]||0))return!0;if((t[r]||0)<(a[r]||0))return!1}return!1}function Ge(s){if(!s)return"";const n=new Date(s).getTime(),a=Date.now()-n,r=Math.floor(a/(1e3*60*60)),i=Math.floor(a%(1e3*60*60)/(1e3*60));return r>0?`${r}h ${i}m`:`${i}m`}function He(s){if(!s)return"";const n=Date.now()-s,t=Math.floor(n/(1e3*60)),a=Math.floor(n/(1e3*60*60));return t<1?"just now":t<60?`${t}m ago`:`${a}h ago`}function N({icon:s,tooltip:n,onClick:t,disabled:a,isPending:r,className:i,variant:l="ghost"}){return e.jsxs(xe,{children:[e.jsx(me,{asChild:!0,children:e.jsx(T,{variant:l==="destructive-ghost"?"ghost":l,size:"sm",className:d("h-7 w-7 p-0",l==="destructive-ghost"&&"hover:bg-destructive/10 hover:text-destructive hover:border-destructive/30",i),onClick:t,disabled:a,children:r?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(s,{className:"w-3.5 h-3.5"})})}),e.jsx(ue,{side:"bottom",className:"text-xs",children:n})]})}function es(){const{data:s,isLoading:n}=W(),{data:t}=J(),{data:a,isLoading:r}=Z(),i=_(),l=ee(),w=se(),u=te(),{data:F}=ze(),{mutate:L,isPending:v}=Qe(),[h,D]=y.useState(!1),[g,M]=y.useState(""),[B,b]=y.useState(!1),[C,S]=y.useState(null),{data:K}=q({queryKey:["cliproxy-server-config"],queryFn:()=>he.cliproxyServer.get(),staleTime:3e4}),z=Se({mutationKey:["update-backend"]})>0,x=K?.remote,I=x?.enabled&&x?.host,p=s?.running??!1,k=i.isPending||l.isPending||w.isPending||u.isPending||z||v,Q=t?.hasUpdate??!1,m=t?.isStable===!1,U=t?.currentVersion,j=F?.configured??!1,G=j?"Sync Ready":"No Config",P=m?t?.maxStableVersion||a?.latestStable:t?.latestVersion,$=o=>{if(!o)return;const c=a?.maxStableVersion||"6.6.80";if(A(o,c)){S(o),b(!0);return}u.mutate({version:o})},H=()=>{C&&u.mutate({version:C,force:!0}),b(!1),S(null)},O=()=>{b(!1),S(null)},X=I?(()=>{const o=x.protocol||"http",c=x.port||(o==="https"?443:80);return o==="https"&&c===443||o==="http"&&c===80?x.host:`${x.host}:${c}`})():null;return I?e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors","border-blue-500/30 bg-blue-500/5"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ke,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm font-medium",children:"Remote Proxy"}),e.jsx(E,{variant:"secondary",className:"text-[10px] h-4 px-1.5 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:"Active"})]}),e.jsx(Pe,{className:"w-3 h-3 text-blue-600"})]}),e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[e.jsx("div",{className:"flex items-center gap-1 mb-1",children:e.jsx("span",{className:"font-mono",children:X})}),e.jsx("p",{className:"text-[10px] text-muted-foreground/70 leading-tight",children:"Traffic auto-routed to remote server"})]})]}):e.jsx(ae,{delayDuration:300,children:e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors",p?"border-green-500/30 bg-green-500/5":"border-muted bg-muted/30"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:d("w-2 h-2 rounded-full",p?"bg-green-500 animate-pulse":"bg-muted-foreground/30")}),e.jsx("span",{className:"text-sm font-medium",children:t?.backendLabel??"CLIProxy"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[n?e.jsx(f,{className:"w-3 h-3 animate-spin text-muted-foreground"}):p?e.jsxs(e.Fragment,{children:[e.jsx(N,{icon:v?f:Ve,tooltip:"Sync profiles to CLIProxy",onClick:()=>L(),disabled:!j||k,isPending:v}),e.jsx(N,{icon:Ae,tooltip:"Restart",onClick:()=>w.mutate(),disabled:k,isPending:w.isPending}),e.jsx(N,{icon:Te,tooltip:"Stop",onClick:()=>l.mutate(),disabled:k,isPending:l.isPending,variant:"destructive-ghost"})]}):null,e.jsx(N,{icon:h?De:Ie,tooltip:h?"Close":"Version settings",onClick:()=>D(!h),className:h?"bg-muted":void 0})]})]}),U&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[e.jsxs("span",{className:d("text-xs font-mono text-muted-foreground",m&&"text-amber-600 dark:text-amber-400"),children:["v",U]}),(Q||m)&&P&&e.jsxs(E,{variant:"secondary",className:d("text-[10px] h-4 px-1.5 gap-0.5 cursor-pointer transition-colors",m?"bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50":"bg-green-100 text-green-700 hover:bg-green-200 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50"),onClick:()=>$(P),title:`Click to ${m?"downgrade":"update"}`,children:[m?e.jsx(Ue,{className:"w-2.5 h-2.5"}):e.jsx($e,{className:"w-2.5 h-2.5"}),P]})]}),p&&s&&e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:["Port ",s.port]}),s.sessionCount!==void 0&&s.sessionCount>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ee,{className:"w-3 h-3"}),s.sessionCount," session",s.sessionCount!==1?"s":""]}),s.startedAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Re,{className:"w-3 h-3"}),Ge(s.startedAt)]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-xs",children:[j?e.jsx(qe,{className:"w-3 h-3 text-green-600 dark:text-green-400"}):e.jsx(Fe,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:d("text-xs",j?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:G})]}),e.jsx(ne,{open:h,onOpenChange:D,children:e.jsxs(re,{className:"mt-3 pt-3 border-t border-muted",children:[e.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-3",children:"Version Management"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(oe,{value:g,onValueChange:M,disabled:r,children:[e.jsx(ie,{className:"h-8 text-xs flex-1",children:e.jsx(le,{placeholder:"Select version to install..."})}),e.jsx(ce,{children:a?.versions.slice(0,20).map(o=>{const c=a?.maxStableVersion&&A(o,a.maxStableVersion);return e.jsx(de,{value:o,className:"text-xs",children:e.jsxs("span",{className:"flex items-center gap-2",children:["v",o,o===a.latestStable&&e.jsx("span",{className:"text-green-600 dark:text-green-400",children:"(stable)"}),c&&e.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"⚠"})]})},o)})})]}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1.5 px-3",onClick:()=>$(g),disabled:u.isPending||!g,children:[u.isPending?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Le,{className:"w-3.5 h-3.5"}),"Install"]})]}),g&&a?.maxStableVersion&&A(g,a.maxStableVersion)&&e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-amber-600 dark:text-amber-400",children:[e.jsx(R,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("span",{children:["Versions above ",a.maxStableVersion," have known issues"]})]}),t?.checkedAt&&e.jsxs("div",{className:"mt-2 text-[10px] text-muted-foreground/60",children:["Last checked ",He(t.checkedAt)]})]})}),!p&&e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not running"}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>i.mutate(),disabled:i.isPending,children:[i.isPending?e.jsx(f,{className:"w-3 h-3 animate-spin"}):e.jsx(Me,{className:"w-3 h-3"}),"Start"]})]}),e.jsx(ge,{open:B,onOpenChange:b,children:e.jsxs(pe,{children:[e.jsxs(fe,{children:[e.jsxs(be,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-5 h-5 text-amber-500"}),"Install Unstable Version?"]}),e.jsxs(je,{className:"space-y-2",children:[e.jsxs("p",{children:["You are about to install ",e.jsxs("strong",{children:["v",C]}),", which is above the maximum stable version"," ",e.jsxs("strong",{children:["v",a?.maxStableVersion||"6.6.80"]}),"."]}),e.jsx("p",{className:"text-amber-600 dark:text-amber-400",children:"This version has known stability issues and may cause unexpected behavior."}),e.jsx("p",{children:"Are you sure you want to proceed?"})]})]}),e.jsxs(ye,{children:[e.jsx(Ne,{onClick:O,children:"Cancel"}),e.jsx(we,{onClick:H,className:"bg-amber-500 hover:bg-amber-600 text-white",children:"Install Anyway"})]})]})})]})})}export{es as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./radix-ui-qEZD5MMp.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{aK as o,aL as m,aM as c,aN as x,aO as u,b as h,C as p,a as g}from"./index-CxBjoBIe.js";import{N as j,a0 as f,az as N,T as b}from"./icons-D5eAI-GR.js";import"./tanstack-De4wvi8X.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-C-pVd1--.js";import"./code-highlight-BRUf_pqB.js";function R(){const[t,i]=l.useState("commands"),{data:e}=o(),{data:n,isLoading:r}=m(t),d=[{id:"commands",label:"Commands",icon:j,count:e?.commands??0},{id:"skills",label:"Skills",icon:f,count:e?.skills??0},{id:"agents",label:"Agents",icon:N,count:e?.agents??0}];return s.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Shared Data"}),s.jsx("p",{className:"text-muted-foreground",children:"Commands, skills, and agents shared across Claude instances"})]}),e&&!e.symlinkStatus.valid&&s.jsxs(c,{variant:"warning",children:[s.jsx(b,{className:"h-4 w-4"}),s.jsx(x,{children:"Configuration Required"}),s.jsxs(u,{children:[e.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),s.jsx("div",{className:"flex gap-2 border-b pb-2",children:d.map(a=>s.jsxs(h,{variant:t===a.id?"default":"ghost",size:"sm",onClick:()=>i(a.id),className:"flex items-center gap-2",children:[s.jsx(a.icon,{className:"w-4 h-4"}),a.label," (",a.count,")"]},a.id))}),s.jsx("div",{className:"mt-4",children:r?s.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):n?.items.length===0?s.jsxs("div",{className:"text-muted-foreground",children:["No ",t," found"]}):s.jsx("div",{className:"grid gap-3",children:n?.items.map(a=>s.jsx(p,{children:s.jsxs(g,{children:[s.jsx("div",{className:"font-medium",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 font-mono truncate",children:a.path})]})},a.name))})})]})}export{R as SharedPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,a2 as s,a3 as n}from"./radix-ui-qEZD5MMp.js";import"./react-vendor-CNOkPC89.js";import{c as e}from"./index-
|
|
1
|
+
import{j as a,a2 as s,a3 as n}from"./radix-ui-qEZD5MMp.js";import"./react-vendor-CNOkPC89.js";import{c as e}from"./index-CxBjoBIe.js";function c({className:t,...r}){return a.jsx(s,{"data-slot":"switch",className:e("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:a.jsx(n,{"data-slot":"switch-thumb",className:e("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}export{c as S};
|
package/dist/ui/index.html
CHANGED
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap"
|
|
25
25
|
rel="stylesheet"
|
|
26
26
|
/>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-CxBjoBIe.js"></script>
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CNOkPC89.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/radix-ui-qEZD5MMp.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/tanstack-De4wvi8X.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/notifications-B2HqRBj7.js">
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/icons-
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/icons-D5eAI-GR.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/utils-CzKF5WmX.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/form-utils-C-pVd1--.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/code-highlight-BRUf_pqB.js">
|
|
36
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
36
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BL8DS7Z0.css">
|
|
37
37
|
</head>
|
|
38
38
|
<body>
|
|
39
39
|
<div id="root"></div>
|
|
@@ -9,6 +9,11 @@ export declare function getCcsHome(): string;
|
|
|
9
9
|
* @returns Path to .ccs directory
|
|
10
10
|
*/
|
|
11
11
|
export declare function getCcsDir(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Get CCS hooks directory (respects CCS_HOME for test isolation)
|
|
14
|
+
* @returns Path to hooks directory
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCcsHooksDir(): string;
|
|
12
17
|
/**
|
|
13
18
|
* Get config file path (legacy JSON path)
|
|
14
19
|
* @deprecated Use getActiveConfigPath() for mode-aware config path
|
|
@@ -45,4 +50,10 @@ export declare function loadConfigSafe(): Config;
|
|
|
45
50
|
* then falls back to config.json for backward compatibility.
|
|
46
51
|
*/
|
|
47
52
|
export declare function getSettingsPath(profile: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Get display name for a profile by reading ANTHROPIC_MODEL from settings
|
|
55
|
+
* @param profile - Profile name (glm, glmt, kimi, custom, etc.)
|
|
56
|
+
* @returns Formatted display name (e.g., 'GLM-4.7', 'Kimi', 'Custom-Model')
|
|
57
|
+
*/
|
|
58
|
+
export declare function getModelDisplayName(profile: string): string;
|
|
48
59
|
//# sourceMappingURL=config-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../src/utils/config-manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAY,QAAQ,EAAsC,MAAM,UAAU,CAAC;AAS1F;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAM5C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAmBnC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAa3D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAuDvC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAiFvD"}
|
|
1
|
+
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../src/utils/config-manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAY,QAAQ,EAAsC,MAAM,UAAU,CAAC;AAS1F;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAM5C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAmBnC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAa3D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAuDvC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAiFvD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2B3D"}
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getSettingsPath = exports.loadConfigSafe = exports.readConfig = exports.loadSettings = exports.loadConfig = exports.getActiveConfigPath = exports.getConfigPath = exports.getCcsDir = exports.getCcsHome = void 0;
|
|
26
|
+
exports.getModelDisplayName = exports.getSettingsPath = exports.loadConfigSafe = exports.readConfig = exports.loadSettings = exports.loadConfig = exports.getActiveConfigPath = exports.getConfigPath = exports.getCcsHooksDir = exports.getCcsDir = exports.getCcsHome = void 0;
|
|
27
27
|
const fs = __importStar(require("fs"));
|
|
28
28
|
const path = __importStar(require("path"));
|
|
29
29
|
const os = __importStar(require("os"));
|
|
@@ -50,6 +50,14 @@ function getCcsDir() {
|
|
|
50
50
|
return path.join(getCcsHome(), '.ccs');
|
|
51
51
|
}
|
|
52
52
|
exports.getCcsDir = getCcsDir;
|
|
53
|
+
/**
|
|
54
|
+
* Get CCS hooks directory (respects CCS_HOME for test isolation)
|
|
55
|
+
* @returns Path to hooks directory
|
|
56
|
+
*/
|
|
57
|
+
function getCcsHooksDir() {
|
|
58
|
+
return path.join(getCcsDir(), 'hooks');
|
|
59
|
+
}
|
|
60
|
+
exports.getCcsHooksDir = getCcsHooksDir;
|
|
53
61
|
/**
|
|
54
62
|
* Get config file path (legacy JSON path)
|
|
55
63
|
* @deprecated Use getActiveConfigPath() for mode-aware config path
|
|
@@ -250,4 +258,35 @@ function getSettingsPath(profile) {
|
|
|
250
258
|
return expandedPath;
|
|
251
259
|
}
|
|
252
260
|
exports.getSettingsPath = getSettingsPath;
|
|
261
|
+
/**
|
|
262
|
+
* Get display name for a profile by reading ANTHROPIC_MODEL from settings
|
|
263
|
+
* @param profile - Profile name (glm, glmt, kimi, custom, etc.)
|
|
264
|
+
* @returns Formatted display name (e.g., 'GLM-4.7', 'Kimi', 'Custom-Model')
|
|
265
|
+
*/
|
|
266
|
+
function getModelDisplayName(profile) {
|
|
267
|
+
if (!profile) {
|
|
268
|
+
return '';
|
|
269
|
+
}
|
|
270
|
+
const settingsPath = path.join(getCcsDir(), `${profile}.settings.json`);
|
|
271
|
+
try {
|
|
272
|
+
if (fs.existsSync(settingsPath)) {
|
|
273
|
+
const content = fs.readFileSync(settingsPath, 'utf8');
|
|
274
|
+
const settings = JSON.parse(content);
|
|
275
|
+
const model = settings.env?.ANTHROPIC_MODEL;
|
|
276
|
+
if (model) {
|
|
277
|
+
// Format: 'glm-4.7' -> 'GLM-4.7' (uppercase letters, preserve numbers)
|
|
278
|
+
return model
|
|
279
|
+
.split('-')
|
|
280
|
+
.map((part) => part.toUpperCase())
|
|
281
|
+
.join('-');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
catch {
|
|
286
|
+
// Fall through to default
|
|
287
|
+
}
|
|
288
|
+
// Fallback: profile name uppercase
|
|
289
|
+
return profile.toUpperCase();
|
|
290
|
+
}
|
|
291
|
+
exports.getModelDisplayName = getModelDisplayName;
|
|
253
292
|
//# sourceMappingURL=config-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../../src/utils/config-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,oCA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EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAChC,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAA2C,CAAC;YAC/E,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;YAE5C,IAAI,KAAK,EAAE,CAAC;gBACV,uEAAuE;gBACvE,OAAO,KAAK;qBACT,KAAK,CAAC,GAAG,CAAC;qBACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;qBACjC,IAAI,CAAC,GAAG,CAAC,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,0BAA0B;IAC5B,CAAC;IAED,mCAAmC;IACnC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC;AA3BD,kDA2BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Analysis Hook Environment Variables
|
|
3
|
+
*
|
|
4
|
+
* Provides environment variables for image analysis hook configuration.
|
|
5
|
+
* Hook routes image/PDF files through CLIProxy for vision analysis.
|
|
6
|
+
*
|
|
7
|
+
* @module utils/hooks/image-analysis-hook-env
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Get image analysis hook environment variables.
|
|
11
|
+
* These env vars control the hook's behavior via Claude Code hook system.
|
|
12
|
+
*
|
|
13
|
+
* @param provider - Current CLIProxy provider (e.g., 'agy', 'gemini', 'codex')
|
|
14
|
+
* @returns Environment variables for image analysis hook
|
|
15
|
+
*/
|
|
16
|
+
export declare function getImageAnalysisHookEnv(provider?: string): Record<string, string>;
|
|
17
|
+
//# sourceMappingURL=get-image-analysis-hook-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-image-analysis-hook-env.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/get-image-analysis-hook-env.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcjF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Image Analysis Hook Environment Variables
|
|
4
|
+
*
|
|
5
|
+
* Provides environment variables for image analysis hook configuration.
|
|
6
|
+
* Hook routes image/PDF files through CLIProxy for vision analysis.
|
|
7
|
+
*
|
|
8
|
+
* @module utils/hooks/image-analysis-hook-env
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.getImageAnalysisHookEnv = void 0;
|
|
12
|
+
const unified_config_loader_1 = require("../../config/unified-config-loader");
|
|
13
|
+
/**
|
|
14
|
+
* Serialize provider_models map to env var format: provider:model,provider:model
|
|
15
|
+
*/
|
|
16
|
+
function serializeProviderModels(providerModels) {
|
|
17
|
+
return Object.entries(providerModels)
|
|
18
|
+
.map(([provider, model]) => `${provider}:${model}`)
|
|
19
|
+
.join(',');
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get image analysis hook environment variables.
|
|
23
|
+
* These env vars control the hook's behavior via Claude Code hook system.
|
|
24
|
+
*
|
|
25
|
+
* @param provider - Current CLIProxy provider (e.g., 'agy', 'gemini', 'codex')
|
|
26
|
+
* @returns Environment variables for image analysis hook
|
|
27
|
+
*/
|
|
28
|
+
function getImageAnalysisHookEnv(provider) {
|
|
29
|
+
const config = (0, unified_config_loader_1.getImageAnalysisConfig)();
|
|
30
|
+
// Check if current provider has a vision model configured
|
|
31
|
+
const hasVisionModel = provider && config.provider_models[provider];
|
|
32
|
+
const skipImageAnalysis = !config.enabled || !hasVisionModel;
|
|
33
|
+
return {
|
|
34
|
+
CCS_IMAGE_ANALYSIS_ENABLED: config.enabled ? '1' : '0',
|
|
35
|
+
CCS_IMAGE_ANALYSIS_TIMEOUT: String(Number(config.timeout) || 60),
|
|
36
|
+
CCS_IMAGE_ANALYSIS_PROVIDER_MODELS: serializeProviderModels(config.provider_models),
|
|
37
|
+
CCS_CURRENT_PROVIDER: provider || '',
|
|
38
|
+
CCS_IMAGE_ANALYSIS_SKIP: skipImageAnalysis ? '1' : '0',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.getImageAnalysisHookEnv = getImageAnalysisHookEnv;
|
|
42
|
+
//# sourceMappingURL=get-image-analysis-hook-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-image-analysis-hook-env.js","sourceRoot":"","sources":["../../../src/utils/hooks/get-image-analysis-hook-env.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,8EAA4E;AAE5E;;GAEG;AACH,SAAS,uBAAuB,CAAC,cAAsC;IACrE,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC;SAClD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,uBAAuB,CAAC,QAAiB;IACvD,MAAM,MAAM,GAAG,IAAA,8CAAsB,GAAE,CAAC;IAExC,0DAA0D;IAC1D,MAAM,cAAc,GAAG,QAAQ,IAAI,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACpE,MAAM,iBAAiB,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,cAAc,CAAC;IAE7D,OAAO;QACL,0BAA0B,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QACtD,0BAA0B,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAChE,kCAAkC,EAAE,uBAAuB,CAAC,MAAM,CAAC,eAAe,CAAC;QACnF,oBAAoB,EAAE,QAAQ,IAAI,EAAE;QACpC,uBAAuB,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;KACvD,CAAC;AACJ,CAAC;AAdD,0DAcC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Analyzer Hook Configuration
|
|
3
|
+
*
|
|
4
|
+
* Manages hook configuration for image analysis in Claude settings.
|
|
5
|
+
*
|
|
6
|
+
* @module utils/hooks/image-analyzer-hook-config
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Get path to image analyzer hook
|
|
10
|
+
*/
|
|
11
|
+
export declare function getImageAnalyzerHookPath(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Get hook config for settings.json injection
|
|
14
|
+
* Timeout includes buffer for CLI overhead
|
|
15
|
+
*/
|
|
16
|
+
export declare function getImageAnalyzerHookConfig(): Record<string, unknown>;
|
|
17
|
+
//# sourceMappingURL=image-analyzer-hook-configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-analyzer-hook-configuration.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/image-analyzer-hook-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBpE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Image Analyzer Hook Configuration
|
|
4
|
+
*
|
|
5
|
+
* Manages hook configuration for image analysis in Claude settings.
|
|
6
|
+
*
|
|
7
|
+
* @module utils/hooks/image-analyzer-hook-config
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.getImageAnalyzerHookConfig = exports.getImageAnalyzerHookPath = void 0;
|
|
34
|
+
const path = __importStar(require("path"));
|
|
35
|
+
const unified_config_loader_1 = require("../../config/unified-config-loader");
|
|
36
|
+
const config_manager_1 = require("../config-manager");
|
|
37
|
+
// Hook file name
|
|
38
|
+
const IMAGE_ANALYZER_HOOK = 'image-analyzer-transformer.cjs';
|
|
39
|
+
/**
|
|
40
|
+
* Get path to image analyzer hook
|
|
41
|
+
*/
|
|
42
|
+
function getImageAnalyzerHookPath() {
|
|
43
|
+
return path.join((0, config_manager_1.getCcsHooksDir)(), IMAGE_ANALYZER_HOOK);
|
|
44
|
+
}
|
|
45
|
+
exports.getImageAnalyzerHookPath = getImageAnalyzerHookPath;
|
|
46
|
+
/**
|
|
47
|
+
* Get hook config for settings.json injection
|
|
48
|
+
* Timeout includes buffer for CLI overhead
|
|
49
|
+
*/
|
|
50
|
+
function getImageAnalyzerHookConfig() {
|
|
51
|
+
const hookPath = getImageAnalyzerHookPath();
|
|
52
|
+
const imageConfig = (0, unified_config_loader_1.getImageAnalysisConfig)();
|
|
53
|
+
// Add 5 second buffer to analysis timeout for hook execution overhead
|
|
54
|
+
const hookTimeout = imageConfig.timeout * 1000 + 5000;
|
|
55
|
+
return {
|
|
56
|
+
PreToolUse: [
|
|
57
|
+
{
|
|
58
|
+
matcher: 'Read',
|
|
59
|
+
hooks: [
|
|
60
|
+
{
|
|
61
|
+
type: 'command',
|
|
62
|
+
command: `node "${hookPath}"`,
|
|
63
|
+
timeout: hookTimeout,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
exports.getImageAnalyzerHookConfig = getImageAnalyzerHookConfig;
|
|
71
|
+
//# sourceMappingURL=image-analyzer-hook-configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-analyzer-hook-configuration.js","sourceRoot":"","sources":["../../../src/utils/hooks/image-analyzer-hook-configuration.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAC7B,8EAA4E;AAC5E,sDAAmD;AAEnD,iBAAiB;AACjB,MAAM,mBAAmB,GAAG,gCAAgC,CAAC;AAE7D;;GAEG;AACH,SAAgB,wBAAwB;IACtC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAA,+BAAc,GAAE,EAAE,mBAAmB,CAAC,CAAC;AAC1D,CAAC;AAFD,4DAEC;AAED;;;GAGG;AACH,SAAgB,0BAA0B;IACxC,MAAM,QAAQ,GAAG,wBAAwB,EAAE,CAAC;IAC5C,MAAM,WAAW,GAAG,IAAA,8CAAsB,GAAE,CAAC;IAE7C,sEAAsE;IACtE,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;IAEtD,OAAO;QACL,UAAU,EAAE;YACV;gBACE,OAAO,EAAE,MAAM;gBACf,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,SAAS,QAAQ,GAAG;wBAC7B,OAAO,EAAE,WAAW;qBACrB;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC;AArBD,gEAqBC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Analyzer Hook Installer
|
|
3
|
+
*
|
|
4
|
+
* Manages installation and uninstallation of the image analyzer hook.
|
|
5
|
+
* This hook intercepts Read tool calls and analyzes image files via CLIProxy.
|
|
6
|
+
*
|
|
7
|
+
* @module utils/hooks/image-analyzer-hook-installer
|
|
8
|
+
*/
|
|
9
|
+
export { getImageAnalyzerHookPath, getImageAnalyzerHookConfig, } from './image-analyzer-hook-configuration';
|
|
10
|
+
/**
|
|
11
|
+
* Check if image analyzer hook is installed
|
|
12
|
+
*/
|
|
13
|
+
export declare function hasImageAnalyzerHook(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Install image analyzer hook to ~/.ccs/hooks/
|
|
16
|
+
*
|
|
17
|
+
* This hook intercepts Read calls and analyzes images via CLIProxy.
|
|
18
|
+
*
|
|
19
|
+
* @returns true if hook installed successfully
|
|
20
|
+
*/
|
|
21
|
+
export declare function installImageAnalyzerHook(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Uninstall image analyzer hook from ~/.ccs/hooks/
|
|
24
|
+
*
|
|
25
|
+
* Note: Does NOT touch global ~/.claude/settings.json.
|
|
26
|
+
* Profile-specific hooks are removed when ~/.ccs/ is deleted.
|
|
27
|
+
*
|
|
28
|
+
* @returns true if hook uninstalled successfully
|
|
29
|
+
*/
|
|
30
|
+
export declare function uninstallImageAnalyzerHook(): boolean;
|
|
31
|
+
//# sourceMappingURL=image-analyzer-hook-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-analyzer-hook-installer.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/image-analyzer-hook-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,OAAO,EACL,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,qCAAqC,CAAC;AAK7C;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CA+DlD;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAwBpD"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Image Analyzer Hook Installer
|
|
4
|
+
*
|
|
5
|
+
* Manages installation and uninstallation of the image analyzer hook.
|
|
6
|
+
* This hook intercepts Read tool calls and analyzes image files via CLIProxy.
|
|
7
|
+
*
|
|
8
|
+
* @module utils/hooks/image-analyzer-hook-installer
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.uninstallImageAnalyzerHook = exports.installImageAnalyzerHook = exports.hasImageAnalyzerHook = exports.getImageAnalyzerHookConfig = exports.getImageAnalyzerHookPath = void 0;
|
|
35
|
+
const fs = __importStar(require("fs"));
|
|
36
|
+
const path = __importStar(require("path"));
|
|
37
|
+
const ui_1 = require("../ui");
|
|
38
|
+
const image_analyzer_hook_configuration_1 = require("./image-analyzer-hook-configuration");
|
|
39
|
+
const config_manager_1 = require("../config-manager");
|
|
40
|
+
const unified_config_loader_1 = require("../../config/unified-config-loader");
|
|
41
|
+
const image_analyzer_profile_hook_injector_1 = require("./image-analyzer-profile-hook-injector");
|
|
42
|
+
// Re-export from hook-configuration for backward compatibility
|
|
43
|
+
var image_analyzer_hook_configuration_2 = require("./image-analyzer-hook-configuration");
|
|
44
|
+
Object.defineProperty(exports, "getImageAnalyzerHookPath", { enumerable: true, get: function () { return image_analyzer_hook_configuration_2.getImageAnalyzerHookPath; } });
|
|
45
|
+
Object.defineProperty(exports, "getImageAnalyzerHookConfig", { enumerable: true, get: function () { return image_analyzer_hook_configuration_2.getImageAnalyzerHookConfig; } });
|
|
46
|
+
// Hook file name
|
|
47
|
+
const IMAGE_ANALYZER_HOOK = 'image-analyzer-transformer.cjs';
|
|
48
|
+
/**
|
|
49
|
+
* Check if image analyzer hook is installed
|
|
50
|
+
*/
|
|
51
|
+
function hasImageAnalyzerHook() {
|
|
52
|
+
return fs.existsSync((0, image_analyzer_hook_configuration_1.getImageAnalyzerHookPath)());
|
|
53
|
+
}
|
|
54
|
+
exports.hasImageAnalyzerHook = hasImageAnalyzerHook;
|
|
55
|
+
/**
|
|
56
|
+
* Install image analyzer hook to ~/.ccs/hooks/
|
|
57
|
+
*
|
|
58
|
+
* This hook intercepts Read calls and analyzes images via CLIProxy.
|
|
59
|
+
*
|
|
60
|
+
* @returns true if hook installed successfully
|
|
61
|
+
*/
|
|
62
|
+
function installImageAnalyzerHook() {
|
|
63
|
+
try {
|
|
64
|
+
const imageConfig = (0, unified_config_loader_1.getImageAnalysisConfig)();
|
|
65
|
+
// Skip if disabled
|
|
66
|
+
if (!imageConfig.enabled) {
|
|
67
|
+
if (process.env.CCS_DEBUG) {
|
|
68
|
+
console.error((0, ui_1.info)('Image analysis disabled - skipping hook install'));
|
|
69
|
+
}
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
// Ensure hooks directory exists
|
|
73
|
+
const hooksDir = (0, config_manager_1.getCcsHooksDir)();
|
|
74
|
+
if (!fs.existsSync(hooksDir)) {
|
|
75
|
+
fs.mkdirSync(hooksDir, { recursive: true, mode: 0o700 });
|
|
76
|
+
}
|
|
77
|
+
const hookPath = (0, image_analyzer_hook_configuration_1.getImageAnalyzerHookPath)();
|
|
78
|
+
// Find the bundled hook script
|
|
79
|
+
// In npm package: node_modules/ccs/lib/hooks/
|
|
80
|
+
// In development: lib/hooks/
|
|
81
|
+
const possiblePaths = [
|
|
82
|
+
path.join(__dirname, '..', '..', '..', 'lib', 'hooks', IMAGE_ANALYZER_HOOK),
|
|
83
|
+
path.join(__dirname, '..', '..', 'lib', 'hooks', IMAGE_ANALYZER_HOOK),
|
|
84
|
+
path.join(__dirname, '..', 'lib', 'hooks', IMAGE_ANALYZER_HOOK),
|
|
85
|
+
];
|
|
86
|
+
let sourcePath = null;
|
|
87
|
+
for (const p of possiblePaths) {
|
|
88
|
+
if (fs.existsSync(p)) {
|
|
89
|
+
sourcePath = p;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (!sourcePath) {
|
|
94
|
+
if (process.env.CCS_DEBUG) {
|
|
95
|
+
console.error((0, ui_1.warn)(`Image analyzer hook source not found: ${IMAGE_ANALYZER_HOOK}`));
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
// Copy hook to ~/.ccs/hooks/
|
|
100
|
+
fs.copyFileSync(sourcePath, hookPath);
|
|
101
|
+
fs.chmodSync(hookPath, 0o755);
|
|
102
|
+
if (process.env.CCS_DEBUG) {
|
|
103
|
+
console.error((0, ui_1.info)(`Installed image analyzer hook: ${hookPath}`));
|
|
104
|
+
}
|
|
105
|
+
// Note: Hook registration is handled by ensureProfileHooks() in image-analyzer-profile-injector.ts
|
|
106
|
+
// which writes to per-profile settings (~/.ccs/<profile>.settings.json)
|
|
107
|
+
// Global settings (~/.claude/settings.json) are NOT modified here
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (process.env.CCS_DEBUG) {
|
|
112
|
+
console.error((0, ui_1.warn)(`Failed to install image analyzer hook: ${error.message}`));
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.installImageAnalyzerHook = installImageAnalyzerHook;
|
|
118
|
+
/**
|
|
119
|
+
* Uninstall image analyzer hook from ~/.ccs/hooks/
|
|
120
|
+
*
|
|
121
|
+
* Note: Does NOT touch global ~/.claude/settings.json.
|
|
122
|
+
* Profile-specific hooks are removed when ~/.ccs/ is deleted.
|
|
123
|
+
*
|
|
124
|
+
* @returns true if hook uninstalled successfully
|
|
125
|
+
*/
|
|
126
|
+
function uninstallImageAnalyzerHook() {
|
|
127
|
+
try {
|
|
128
|
+
const hookPath = (0, image_analyzer_hook_configuration_1.getImageAnalyzerHookPath)();
|
|
129
|
+
if (fs.existsSync(hookPath)) {
|
|
130
|
+
fs.unlinkSync(hookPath);
|
|
131
|
+
if (process.env.CCS_DEBUG) {
|
|
132
|
+
console.error((0, ui_1.info)(`Uninstalled image analyzer hook: ${hookPath}`));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Remove migration marker (so fresh install re-runs migration)
|
|
136
|
+
(0, image_analyzer_profile_hook_injector_1.removeMigrationMarker)();
|
|
137
|
+
// Note: Do NOT call removeHookConfig() - global settings should not be touched.
|
|
138
|
+
// Per-profile hooks in ~/.ccs/*.settings.json are cleaned up when ~/.ccs/ is deleted.
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
if (process.env.CCS_DEBUG) {
|
|
143
|
+
console.error((0, ui_1.warn)(`Failed to uninstall image analyzer hook: ${error.message}`));
|
|
144
|
+
}
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.uninstallImageAnalyzerHook = uninstallImageAnalyzerHook;
|
|
149
|
+
//# sourceMappingURL=image-analyzer-hook-installer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-analyzer-hook-installer.js","sourceRoot":"","sources":["../../../src/utils/hooks/image-analyzer-hook-installer.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,8BAAmC;AACnC,2FAA+E;AAC/E,sDAAmD;AACnD,8EAA4E;AAC5E,iGAA+E;AAE/E,+DAA+D;AAC/D,yFAG6C;AAF3C,6IAAA,wBAAwB,OAAA;AACxB,+IAAA,0BAA0B,OAAA;AAG5B,iBAAiB;AACjB,MAAM,mBAAmB,GAAG,gCAAgC,CAAC;AAE7D;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO,EAAE,CAAC,UAAU,CAAC,IAAA,4DA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