@kaitranntt/ccs 7.25.0-dev.2 → 7.26.0-dev.1

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.
Files changed (97) hide show
  1. package/dist/cliproxy/auth/oauth-process.js +1 -1
  2. package/dist/cliproxy/auth/oauth-process.js.map +1 -1
  3. package/dist/cliproxy/binary/extractor.d.ts +2 -2
  4. package/dist/cliproxy/binary/extractor.d.ts.map +1 -1
  5. package/dist/cliproxy/binary/extractor.js +4 -3
  6. package/dist/cliproxy/binary/extractor.js.map +1 -1
  7. package/dist/cliproxy/binary/index.d.ts +1 -1
  8. package/dist/cliproxy/binary/index.d.ts.map +1 -1
  9. package/dist/cliproxy/binary/index.js +2 -1
  10. package/dist/cliproxy/binary/index.js.map +1 -1
  11. package/dist/cliproxy/binary/installer.d.ts +5 -4
  12. package/dist/cliproxy/binary/installer.d.ts.map +1 -1
  13. package/dist/cliproxy/binary/installer.js +29 -17
  14. package/dist/cliproxy/binary/installer.js.map +1 -1
  15. package/dist/cliproxy/binary/lifecycle.d.ts.map +1 -1
  16. package/dist/cliproxy/binary/lifecycle.js +11 -8
  17. package/dist/cliproxy/binary/lifecycle.js.map +1 -1
  18. package/dist/cliproxy/binary/tar-extractor.d.ts +2 -1
  19. package/dist/cliproxy/binary/tar-extractor.d.ts.map +1 -1
  20. package/dist/cliproxy/binary/tar-extractor.js +3 -3
  21. package/dist/cliproxy/binary/tar-extractor.js.map +1 -1
  22. package/dist/cliproxy/binary/types.d.ts +14 -2
  23. package/dist/cliproxy/binary/types.d.ts.map +1 -1
  24. package/dist/cliproxy/binary/types.js +19 -3
  25. package/dist/cliproxy/binary/types.js.map +1 -1
  26. package/dist/cliproxy/binary/version-cache.d.ts +28 -22
  27. package/dist/cliproxy/binary/version-cache.d.ts.map +1 -1
  28. package/dist/cliproxy/binary/version-cache.js +57 -34
  29. package/dist/cliproxy/binary/version-cache.js.map +1 -1
  30. package/dist/cliproxy/binary/version-checker.d.ts +9 -3
  31. package/dist/cliproxy/binary/version-checker.d.ts.map +1 -1
  32. package/dist/cliproxy/binary/version-checker.js +21 -14
  33. package/dist/cliproxy/binary/version-checker.js.map +1 -1
  34. package/dist/cliproxy/binary/zip-extractor.d.ts +2 -1
  35. package/dist/cliproxy/binary/zip-extractor.d.ts.map +1 -1
  36. package/dist/cliproxy/binary/zip-extractor.js +3 -3
  37. package/dist/cliproxy/binary/zip-extractor.js.map +1 -1
  38. package/dist/cliproxy/binary-manager.d.ts +9 -7
  39. package/dist/cliproxy/binary-manager.d.ts.map +1 -1
  40. package/dist/cliproxy/binary-manager.js +28 -20
  41. package/dist/cliproxy/binary-manager.js.map +1 -1
  42. package/dist/cliproxy/cliproxy-executor.d.ts.map +1 -1
  43. package/dist/cliproxy/cliproxy-executor.js +5 -4
  44. package/dist/cliproxy/cliproxy-executor.js.map +1 -1
  45. package/dist/cliproxy/service-manager.d.ts.map +1 -1
  46. package/dist/cliproxy/service-manager.js +6 -1
  47. package/dist/cliproxy/service-manager.js.map +1 -1
  48. package/dist/cliproxy/services/binary-service.d.ts +6 -6
  49. package/dist/cliproxy/services/binary-service.d.ts.map +1 -1
  50. package/dist/cliproxy/services/binary-service.js +54 -22
  51. package/dist/cliproxy/services/binary-service.js.map +1 -1
  52. package/dist/cliproxy/session-tracker.d.ts +4 -1
  53. package/dist/cliproxy/session-tracker.d.ts.map +1 -1
  54. package/dist/cliproxy/session-tracker.js +3 -1
  55. package/dist/cliproxy/session-tracker.js.map +1 -1
  56. package/dist/cliproxy/types.d.ts +2 -0
  57. package/dist/cliproxy/types.d.ts.map +1 -1
  58. package/dist/cliproxy/types.js.map +1 -1
  59. package/dist/commands/cliproxy-command.d.ts.map +1 -1
  60. package/dist/commands/cliproxy-command.js +25 -15
  61. package/dist/commands/cliproxy-command.js.map +1 -1
  62. package/dist/config/unified-config-loader.d.ts.map +1 -1
  63. package/dist/config/unified-config-loader.js +4 -0
  64. package/dist/config/unified-config-loader.js.map +1 -1
  65. package/dist/ui/assets/{accounts-DmDtOjgI.js → accounts-BYfQeTA6.js} +1 -1
  66. package/dist/ui/assets/{alert-dialog-BRQuLTE0.js → alert-dialog-DGjVA_Uj.js} +1 -1
  67. package/dist/ui/assets/{api-D8s9_3Vf.js → api-DmLp-ND3.js} +1 -1
  68. package/dist/ui/assets/auth-section-C-C_RMle.js +1 -0
  69. package/dist/ui/assets/{backups-section-CD8WE3jo.js → backups-section-AzCxgUvG.js} +1 -1
  70. package/dist/ui/assets/{cliproxy-control-panel-CL1taFji.js → cliproxy-control-panel-RmOVbKr6.js} +1 -1
  71. package/dist/ui/assets/cliproxy-h3UI8QIj.js +3 -0
  72. package/dist/ui/assets/{confirm-dialog-BrDkVCMB.js → confirm-dialog-bZJEGhEI.js} +1 -1
  73. package/dist/ui/assets/{copilot-CeZzCZ47.js → copilot-CxkALDlE.js} +3 -3
  74. package/dist/ui/assets/{globalenv-section-CU9L9qj2.js → globalenv-section-DYPwLCNS.js} +1 -1
  75. package/dist/ui/assets/{health-CxRN4wo5.js → health-C6iPCd_W.js} +1 -1
  76. package/dist/ui/assets/{icons-TP-W6wBb.js → icons-MT_USDDP.js} +1 -1
  77. package/dist/ui/assets/index-B5IsIOBu.js +1 -0
  78. package/dist/ui/assets/{index-5SlpA5l0.js → index-BlVXK64-.js} +1 -1
  79. package/dist/ui/assets/{index-BjlrUl8j.css → index-CRayOc33.css} +1 -1
  80. package/dist/ui/assets/{index-B8SMrsmS.js → index-Cf2meAdk.js} +1 -1
  81. package/dist/ui/assets/{index-5ld5FlA0.js → index-Dr15Z3bF.js} +14 -14
  82. package/dist/ui/assets/{index-DoymmWw8.js → index-olYTFpLH.js} +1 -1
  83. package/dist/ui/assets/proxy-status-widget-dJTrfLpq.js +1 -0
  84. package/dist/ui/assets/{shared-XYu0X19W.js → shared-Dc93zyHo.js} +1 -1
  85. package/dist/ui/assets/{switch-BUYlYaJx.js → switch-C-PwUmyB.js} +1 -1
  86. package/dist/ui/assets/{tanstack-C1q4365B.js → tanstack-ChZysrI1.js} +2 -2
  87. package/dist/ui/index.html +4 -4
  88. package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
  89. package/dist/web-server/routes/cliproxy-stats-routes.js +14 -2
  90. package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
  91. package/dist/web-server/routes/proxy-routes.d.ts.map +1 -1
  92. package/dist/web-server/routes/proxy-routes.js +3 -2
  93. package/dist/web-server/routes/proxy-routes.js.map +1 -1
  94. package/package.json +1 -1
  95. package/dist/ui/assets/auth-section-6c47NtRw.js +0 -1
  96. package/dist/ui/assets/cliproxy-B8mhLLOW.js +0 -3
  97. package/dist/ui/assets/index-74OuxlYT.js +0 -1
@@ -1 +1 @@
1
- import{j as e}from"./radix-ui-DP8--cuX.js";import{r as a}from"./react-vendor-CNOkPC89.js";import{aL as A,aN as L,b as C,m as M,L as R,X as D,Y as $,Z as F,_ as K,$ as z}from"./index-5ld5FlA0.js";import{S as H}from"./switch-BUYlYaJx.js";import{a5 as k,$ as U,p as O,a1 as G,I as V}from"./icons-TP-W6wBb.js";import"./tanstack-C1q4365B.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 W(){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 q=[{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}=W();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(U,{className:"h-4 w-4"}),e.jsx(L,{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(O,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(M,{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(G,{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(V,{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(R,{className:"w-20 capitalize font-medium",children:s}),e.jsxs(D,{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:q.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};
1
+ import{j as e}from"./radix-ui-DP8--cuX.js";import{r as a}from"./react-vendor-CNOkPC89.js";import{aF as A,aH as M,b as C,m as R,L as D,X as L,Y as $,Z as F,_ as H,$ as K}from"./index-Dr15Z3bF.js";import{S as z}from"./switch-C-PwUmyB.js";import{a5 as k,$ as U,p as O,a1 as G,I as V}from"./icons-MT_USDDP.js";import"./tanstack-ChZysrI1.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 W(){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 q=[{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}=W();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(U,{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(O,{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(G,{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(V,{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(H,{children:q.map(l=>e.jsx(K,{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(z,{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};