@kaitranntt/ccs 6.0.0-dev.2 → 6.0.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/VERSION +1 -1
- package/dist/cliproxy/cliproxy-executor.d.ts.map +1 -1
- package/dist/cliproxy/cliproxy-executor.js +75 -129
- package/dist/cliproxy/cliproxy-executor.js.map +1 -1
- package/dist/ui/assets/{accounts-BfRSUzvC.js → accounts-CZmhPg-s.js} +1 -1
- package/dist/ui/assets/{analytics-ClDxRP9x.js → analytics-BeHvdYDb.js} +1 -1
- package/dist/ui/assets/{api-DyJHhCv0.js → api-BJE0UHIr.js} +1 -1
- package/dist/ui/assets/{card-CrGAcUkx.js → card-CB1ifO1P.js} +1 -1
- package/dist/ui/assets/cliproxy-B7L-XME_.js +1 -0
- package/dist/ui/assets/{cliproxy-control-panel-Cu7DgEPx.js → cliproxy-control-panel-D4MuMEOJ.js} +1 -1
- package/dist/ui/assets/{code-editor-D0YjMRQO.js → code-editor-DxoT483F.js} +1 -1
- package/dist/ui/assets/{health-Rretog4H.js → health-Dl8j1bVN.js} +1 -1
- package/dist/ui/assets/{icons-D6DaLbNh.js → icons-Dzu62U5U.js} +1 -1
- package/dist/ui/assets/index-Arbf-zPY.js +46 -0
- package/dist/ui/assets/index-B2VhinkK.css +1 -0
- package/dist/ui/assets/{settings-B7OFU9lZ.js → settings-D3HNz4K7.js} +1 -1
- package/dist/ui/assets/shared-DiXNS0L2.js +1 -0
- package/dist/ui/index.html +3 -3
- package/package.json +1 -1
- package/dist/cliproxy/session-tracker.d.ts +0 -54
- package/dist/cliproxy/session-tracker.d.ts.map +0 -1
- package/dist/cliproxy/session-tracker.js +0 -228
- package/dist/cliproxy/session-tracker.js.map +0 -1
- package/dist/ui/assets/cliproxy-Zr4pFy6O.js +0 -1
- package/dist/ui/assets/index-B2PFll-u.js +0 -46
- package/dist/ui/assets/index-DTVwRqgB.css +0 -1
- package/dist/ui/assets/providers/iflow.png +0 -0
- package/dist/ui/assets/shared-qGCa7mu2.js +0 -1
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Session Tracker for CLIProxy Multi-Instance Support
|
|
4
|
-
*
|
|
5
|
-
* Manages reference counting for shared CLIProxy instances.
|
|
6
|
-
* Multiple CCS sessions can share a single proxy on the same port.
|
|
7
|
-
* Proxy only terminates when ALL sessions exit (count reaches 0).
|
|
8
|
-
*
|
|
9
|
-
* Lock file format: ~/.ccs/cliproxy/sessions.json
|
|
10
|
-
* {
|
|
11
|
-
* "port": 8317,
|
|
12
|
-
* "pid": 12345, // CLIProxy process PID
|
|
13
|
-
* "sessions": ["abc123", "def456"], // Active session IDs
|
|
14
|
-
* "startedAt": "2024-01-01T00:00:00Z"
|
|
15
|
-
* }
|
|
16
|
-
*/
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.cleanupOrphanedSessions = exports.hasActiveSessions = exports.getSessionCount = exports.unregisterSession = exports.registerSession = exports.getExistingProxy = void 0;
|
|
42
|
-
const fs = __importStar(require("fs"));
|
|
43
|
-
const path = __importStar(require("path"));
|
|
44
|
-
const crypto = __importStar(require("crypto"));
|
|
45
|
-
const config_generator_1 = require("./config-generator");
|
|
46
|
-
/** Generate unique session ID */
|
|
47
|
-
function generateSessionId() {
|
|
48
|
-
return crypto.randomBytes(8).toString('hex');
|
|
49
|
-
}
|
|
50
|
-
/** Get path to session lock file */
|
|
51
|
-
function getSessionLockPath() {
|
|
52
|
-
return path.join((0, config_generator_1.getCliproxyDir)(), 'sessions.json');
|
|
53
|
-
}
|
|
54
|
-
/** Read session lock file (returns null if not exists or invalid) */
|
|
55
|
-
function readSessionLock() {
|
|
56
|
-
const lockPath = getSessionLockPath();
|
|
57
|
-
try {
|
|
58
|
-
if (!fs.existsSync(lockPath)) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
const content = fs.readFileSync(lockPath, 'utf-8');
|
|
62
|
-
const lock = JSON.parse(content);
|
|
63
|
-
// Validate structure
|
|
64
|
-
if (typeof lock.port !== 'number' ||
|
|
65
|
-
typeof lock.pid !== 'number' ||
|
|
66
|
-
!Array.isArray(lock.sessions)) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return lock;
|
|
70
|
-
}
|
|
71
|
-
catch {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/** Write session lock file */
|
|
76
|
-
function writeSessionLock(lock) {
|
|
77
|
-
const lockPath = getSessionLockPath();
|
|
78
|
-
const dir = path.dirname(lockPath);
|
|
79
|
-
if (!fs.existsSync(dir)) {
|
|
80
|
-
fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
81
|
-
}
|
|
82
|
-
fs.writeFileSync(lockPath, JSON.stringify(lock, null, 2), { mode: 0o600 });
|
|
83
|
-
}
|
|
84
|
-
/** Delete session lock file */
|
|
85
|
-
function deleteSessionLock() {
|
|
86
|
-
const lockPath = getSessionLockPath();
|
|
87
|
-
try {
|
|
88
|
-
if (fs.existsSync(lockPath)) {
|
|
89
|
-
fs.unlinkSync(lockPath);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
catch {
|
|
93
|
-
// Ignore errors on cleanup
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/** Check if a PID is still running */
|
|
97
|
-
function isProcessRunning(pid) {
|
|
98
|
-
try {
|
|
99
|
-
// Sending signal 0 checks if process exists without killing it
|
|
100
|
-
process.kill(pid, 0);
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
catch {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Check if there's an existing proxy running that we can reuse.
|
|
109
|
-
* Returns the existing lock if proxy is healthy, null otherwise.
|
|
110
|
-
*/
|
|
111
|
-
function getExistingProxy(port) {
|
|
112
|
-
const lock = readSessionLock();
|
|
113
|
-
if (!lock) {
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
// Verify port matches
|
|
117
|
-
if (lock.port !== port) {
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
// Verify proxy process is still running
|
|
121
|
-
if (!isProcessRunning(lock.pid)) {
|
|
122
|
-
// Proxy crashed - clean up stale lock
|
|
123
|
-
deleteSessionLock();
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
return lock;
|
|
127
|
-
}
|
|
128
|
-
exports.getExistingProxy = getExistingProxy;
|
|
129
|
-
/**
|
|
130
|
-
* Register a new session with the proxy.
|
|
131
|
-
* Call this when starting a new CCS session that will use an existing proxy.
|
|
132
|
-
* @returns Session ID for this session
|
|
133
|
-
*/
|
|
134
|
-
function registerSession(port, proxyPid) {
|
|
135
|
-
const sessionId = generateSessionId();
|
|
136
|
-
const existingLock = readSessionLock();
|
|
137
|
-
if (existingLock && existingLock.port === port && existingLock.pid === proxyPid) {
|
|
138
|
-
// Add to existing sessions
|
|
139
|
-
existingLock.sessions.push(sessionId);
|
|
140
|
-
writeSessionLock(existingLock);
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
// Create new lock (first session for this proxy)
|
|
144
|
-
const newLock = {
|
|
145
|
-
port,
|
|
146
|
-
pid: proxyPid,
|
|
147
|
-
sessions: [sessionId],
|
|
148
|
-
startedAt: new Date().toISOString(),
|
|
149
|
-
};
|
|
150
|
-
writeSessionLock(newLock);
|
|
151
|
-
}
|
|
152
|
-
return sessionId;
|
|
153
|
-
}
|
|
154
|
-
exports.registerSession = registerSession;
|
|
155
|
-
/**
|
|
156
|
-
* Unregister a session from the proxy.
|
|
157
|
-
* @returns true if this was the last session (proxy should be killed)
|
|
158
|
-
*/
|
|
159
|
-
function unregisterSession(sessionId) {
|
|
160
|
-
const lock = readSessionLock();
|
|
161
|
-
if (!lock) {
|
|
162
|
-
// No lock file - assume we're the only session
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
// Remove this session from the list
|
|
166
|
-
const index = lock.sessions.indexOf(sessionId);
|
|
167
|
-
if (index !== -1) {
|
|
168
|
-
lock.sessions.splice(index, 1);
|
|
169
|
-
}
|
|
170
|
-
// Check if any sessions remain
|
|
171
|
-
if (lock.sessions.length === 0) {
|
|
172
|
-
// Last session - clean up lock file
|
|
173
|
-
deleteSessionLock();
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
// Other sessions still active - keep proxy running
|
|
177
|
-
writeSessionLock(lock);
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
exports.unregisterSession = unregisterSession;
|
|
181
|
-
/**
|
|
182
|
-
* Get current session count for the proxy.
|
|
183
|
-
*/
|
|
184
|
-
function getSessionCount() {
|
|
185
|
-
const lock = readSessionLock();
|
|
186
|
-
if (!lock) {
|
|
187
|
-
return 0;
|
|
188
|
-
}
|
|
189
|
-
return lock.sessions.length;
|
|
190
|
-
}
|
|
191
|
-
exports.getSessionCount = getSessionCount;
|
|
192
|
-
/**
|
|
193
|
-
* Check if proxy has any active sessions.
|
|
194
|
-
* Used to determine if a "zombie" proxy should be killed.
|
|
195
|
-
*/
|
|
196
|
-
function hasActiveSessions() {
|
|
197
|
-
const lock = readSessionLock();
|
|
198
|
-
if (!lock) {
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
// Verify proxy is still running
|
|
202
|
-
if (!isProcessRunning(lock.pid)) {
|
|
203
|
-
deleteSessionLock();
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
return lock.sessions.length > 0;
|
|
207
|
-
}
|
|
208
|
-
exports.hasActiveSessions = hasActiveSessions;
|
|
209
|
-
/**
|
|
210
|
-
* Clean up orphaned sessions (when proxy crashes).
|
|
211
|
-
* Called on startup to ensure clean state.
|
|
212
|
-
*/
|
|
213
|
-
function cleanupOrphanedSessions(port) {
|
|
214
|
-
const lock = readSessionLock();
|
|
215
|
-
if (!lock) {
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
// If port doesn't match, this lock is for a different proxy
|
|
219
|
-
if (lock.port !== port) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
// If proxy is dead, clean up lock
|
|
223
|
-
if (!isProcessRunning(lock.pid)) {
|
|
224
|
-
deleteSessionLock();
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
exports.cleanupOrphanedSessions = cleanupOrphanedSessions;
|
|
228
|
-
//# sourceMappingURL=session-tracker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-tracker.js","sourceRoot":"","sources":["../../src/cliproxy/session-tracker.ts"],"names":[],"mappings":";AAAA;;;;;;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vKzT.js";import{u as ge}from"./tanstack-DZ3a6J0N.js";import{o as _,p as fe,q as H,r as ve,D as Y,s as Z,t as J,v as X,w as ee,B as o,c as k,x as B,L as V,I as se,y as je,z as Ne,A as we,E as ye,F as be,G as Ce,H as Se,J as Ae,K as ke,e as Pe,S as De,M as E,N as te,b as ae}from"./index-B2PFll-u.js";import{C as U,a as $}from"./card-CrGAcUkx.js";import{t as T,a as K,L as ne,a4 as G,O as Me,k as P,l as Fe,a5 as L,m as ie,v as R,Z as re,a6 as de,X as ce,n as Oe}from"./icons-D6DaLbNh.js";import"./form-utils-CKETQmt9.js";const M={agy:{provider:"agy",displayName:"Antigravity",defaultModel:"gemini-claude-opus-4-5-thinking",models:[{id:"gemini-claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",description:"Most capable, extended thinking"},{id:"gemini-claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",description:"Balanced with extended thinking"},{id:"gemini-claude-sonnet-4-5",name:"Claude Sonnet 4.5",description:"Fast and capable"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",description:"Google latest model via Antigravity"}]},gemini:{provider:"gemini",displayName:"Gemini",defaultModel:"gemini-2.5-pro",models:[{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",tier:"paid",description:"Latest model, requires paid Google account"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:"Stable, works with free Google account"}]},codex:{provider:"codex",displayName:"Codex",defaultModel:"gpt-5.1-codex-max",models:[{id:"gpt-5.1-codex-max",name:"Codex Max (5.1)",description:"Most capable Codex model",presetMapping:{default:"gpt-5.1-codex-max",opus:"gpt-5.1-codex-max-high",sonnet:"gpt-5.1-codex-max",haiku:"gpt-5.1-codex-mini-high"}},{id:"gpt-5.2",name:"GPT 5.2",description:"Latest GPT model",presetMapping:{default:"gpt-5.2",opus:"gpt-5.2",sonnet:"gpt-5.2",haiku:"gpt-5.2"}},{id:"gpt-5.1-codex-mini",name:"Codex Mini",description:"Fast and efficient Codex model"}]},qwen:{provider:"qwen",displayName:"Qwen",defaultModel:"qwen-coder-plus",models:[{id:"qwen-coder-plus",name:"Qwen Coder Plus",description:"Alibaba code-focused model"},{id:"qwen-max",name:"Qwen Max",description:"Most capable Qwen model"}]},iflow:{provider:"iflow",displayName:"iFlow",defaultModel:"iflow-default",models:[{id:"iflow-default",name:"iFlow Default",description:"Default iFlow model"}]}},W=[{id:"gemini",name:"Google Gemini",description:"Gemini Pro/Flash models"},{id:"codex",name:"OpenAI Codex",description:"GPT-4 and codex models"},{id:"agy",name:"Antigravity",description:"Antigravity AI models"},{id:"qwen",name:"Alibaba Qwen",description:"Qwen Code models"},{id:"iflow",name:"iFlow",description:"iFlow AI models"}];function Le({open:i,onClose:u}){const[a,n]=l.useState("provider"),[d,h]=l.useState(""),[r,v]=l.useState(null),[x,f]=l.useState(""),[j,S]=l.useState(""),[F,N]=l.useState(!1),[w,b]=l.useState(!1),[m,C]=l.useState(!1),{data:A,refetch:p}=_(),c=fe(),g=H(),{privacyMode:D}=ve(),y=A?.authStatus.find(s=>s.provider===d)?.accounts||[];l.useEffect(()=>{if(!i){const s=setTimeout(()=>{n("provider"),h(""),v(null),f(""),S(""),N(!1),C(!1)},0);return()=>clearTimeout(s)}},[i]),l.useEffect(()=>{if(a==="auth"&&y.length>0&&!m){const s=setTimeout(()=>{n("account")},0);return()=>clearTimeout(s)}},[a,y,m]);const t=async s=>{await navigator.clipboard.writeText(s),N(!0),setTimeout(()=>N(!1),2e3)},O=async()=>{b(!0),await p(),b(!1)},le=()=>{g.mutate({provider:d},{onSuccess:s=>{s.account&&(v(s.account),n("variant")),p()}})},oe=s=>{h(s),(A?.authStatus.find(he=>he.provider===s)?.accounts||[]).length===0?n("auth"):n("account")},me=s=>{v(s),n("variant")},ue=async()=>{if(!(!x||!d))try{await c.mutateAsync({name:x,provider:d,model:j||void 0,account:r?.id}),n("success")}catch(s){console.error("Failed to create variant:",s)}},Q=`ccs ${d} --auth --add`,q=["provider","auth","variant","success"],xe=(s=>s==="account"?1:q.indexOf(s))(a),pe=s=>{if(!s&&(a==="success"||a==="provider")){u();return}};return e.jsx(Y,{open:i,onOpenChange:pe,children:e.jsxs(Z,{className:"sm:max-w-lg",onPointerDownOutside:s=>{a!=="success"&&a!=="provider"&&s.preventDefault()},onEscapeKeyDown:s=>{(g.isPending||c.isPending)&&s.preventDefault()},children:[e.jsxs(J,{children:[e.jsxs(X,{className:"flex items-center gap-2",children:[e.jsx(T,{className:"w-5 h-5 text-primary"}),"Quick Setup Wizard"]}),e.jsxs(ee,{children:[a==="provider"&&"Select a provider to get started",a==="auth"&&"Authenticate with your provider",a==="account"&&"Select which account to use",a==="variant"&&"Create your custom variant",a==="success"&&"Setup complete!"]})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[a==="provider"&&e.jsx("div",{className:"grid gap-2",children:W.map(s=>e.jsxs("button",{onClick:()=>oe(s.id),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s.description})]}),e.jsx(K,{className:"w-4 h-4 text-muted-foreground"})]},s.id))}),a==="auth"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-center space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Authenticate with ",W.find(s=>s.id===d)?.name," to add an account"]}),e.jsx(o,{onClick:le,disabled:g.isPending,className:"w-full gap-2",size:"lg",children:g.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"w-4 h-4"}),"Authenticate in Browser"]})}),g.isPending&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete the OAuth flow in your browser..."})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or use terminal"})})]}),e.jsx(U,{children:e.jsxs($,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Me,{className:"w-4 h-4"}),"Run this command in your terminal:"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 px-3 py-2 bg-muted rounded-md font-mono text-sm",children:Q}),e.jsx(o,{variant:"outline",size:"icon",onClick:()=>t(Q),children:F?e.jsx(P,{className:"w-4 h-4 text-green-500"}):e.jsx(Fe,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(o,{variant:"ghost",onClick:()=>n("provider"),disabled:g.isPending,children:[e.jsx(L,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs(o,{variant:"outline",onClick:O,disabled:w||g.isPending,children:[e.jsx(ie,{className:`w-4 h-4 mr-2 ${w?"animate-spin":""}`}),w?"Checking...":"Refresh Status"]})]})]}),a==="account"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Select an account (",y.length,")"]}),e.jsx("div",{className:"grid gap-2",children:y.map(s=>e.jsxs("button",{type:"button",onClick:()=>me(s),className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center",children:e.jsx(R,{className:"w-4 h-4 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsx("div",{className:k("font-medium",D&&B),children:s.email||s.id}),s.isDefault&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"Default account"})]})]}),e.jsx(K,{className:"w-4 h-4 text-muted-foreground"})]},s.id))}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or"})})]}),e.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 p-3 border-2 border-dashed border-primary/50 rounded-lg hover:border-primary hover:bg-primary/5 transition-colors text-left",onClick:()=>{C(!0),n("auth")},children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(G,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-primary",children:"Add new account"}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Authenticate with a different account"})]})]}),e.jsx("div",{className:"flex items-center justify-between pt-2",children:e.jsxs(o,{variant:"ghost",onClick:()=>n("provider"),children:[e.jsx(L,{className:"w-4 h-4 mr-2"}),"Back"]})})]}),a==="variant"&&e.jsxs("div",{className:"space-y-4",children:[r&&e.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted/50 rounded-md text-sm",children:[e.jsx(R,{className:"w-4 h-4"}),e.jsxs("span",{children:["Using:"," ",e.jsx("span",{className:k(D&&B),children:r.email||r.id})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"variant-name",children:"Variant Name *"}),e.jsx(se,{id:"variant-name",value:x,onChange:s=>f(s.target.value),placeholder:"e.g., my-gemini, g3, flash"}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Use this name to invoke: ccs ",x||"<name>",' "prompt"']})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{children:"Model"}),e.jsxs(je,{value:j,onValueChange:S,children:[e.jsx(Ne,{children:e.jsx(we,{placeholder:"Select a model"})}),e.jsx(ye,{children:M[d]?.models.map(s=>e.jsx(be,{value:s.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:s.name}),s.description&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["- ",s.description]})]})},s.id))})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Default: ",M[d]?.defaultModel||"provider default"]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsxs(o,{variant:"ghost",onClick:()=>y.length>0?n("account"):n("provider"),children:[e.jsx(L,{className:"w-4 h-4 mr-2"}),"Back"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{variant:"ghost",onClick:u,children:"Skip"}),e.jsx(o,{onClick:ue,disabled:!x||c.isPending,children:c.isPending?"Creating...":"Create Variant"})]})]}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"Skip if you just wanted to add an account without creating a variant"})]}),a==="success"&&e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-16 h-16 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center",children:e.jsx(P,{className:"w-8 h-8 text-green-600 dark:text-green-400"})})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-lg",children:"Variant Created!"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Your custom variant is ready to use"})]}),e.jsx(U,{children:e.jsxs($,{className:"p-4 space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Usage:"}),e.jsxs("code",{className:"block px-3 py-2 bg-muted rounded-md font-mono text-sm",children:["ccs ",x,' "your prompt here"']})]})}),e.jsx(o,{onClick:u,className:"w-full",children:"Done"})]})]}),e.jsx("div",{className:"flex justify-center gap-1 pt-2",children:q.map((s,z)=>e.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${xe>=z?"bg-primary":"bg-muted"}`},s))})]})})}function Ve({open:i,onClose:u,provider:a,displayName:n}){const[d,h]=l.useState(""),r=H(),v=()=>{r.mutate({provider:a,nickname:d.trim()||void 0},{onSuccess:()=>{h(""),u()}})},x=f=>{!f&&!r.isPending&&(h(""),u())};return e.jsx(Y,{open:i,onOpenChange:x,children:e.jsxs(Z,{className:"sm:max-w-md",children:[e.jsxs(J,{children:[e.jsxs(X,{children:["Add ",n," Account"]}),e.jsx(ee,{children:"Click the button below to authenticate a new account. A browser window will open for OAuth."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"nickname",children:"Nickname (optional)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(se,{id:"nickname",value:d,onChange:f=>h(f.target.value),placeholder:"e.g., work, personal",disabled:r.isPending,className:"flex-1"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"A friendly name to identify this account. Auto-generated from email if left empty."})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[e.jsx(o,{variant:"ghost",onClick:u,disabled:r.isPending,children:"Cancel"}),e.jsx(o,{onClick:v,disabled:r.isPending,children:r.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),"Authenticating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"w-4 h-4 mr-2"}),"Authenticate"]})})]}),r.isPending&&e.jsx("p",{className:"text-sm text-center text-muted-foreground",children:"Complete the OAuth flow in your browser..."})]})]})})}function Ge({status:i,isSelected:u,onSelect:a}){const n=i.accounts?.length||0;return e.jsxs("button",{className:k("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors cursor-pointer text-left",u?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:a,children:[e.jsx(te,{provider:i.provider,size:"md"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:i.displayName}),n>0&&e.jsx(ae,{variant:"secondary",className:"text-[10px] h-4 px-1",children:n})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:i.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"w-3 h-3 text-green-600"}),e.jsx("span",{className:"text-xs text-green-600",children:"Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not connected"})]})})]})]})}function Re({variant:i,parentAuth:u,isSelected:a,onSelect:n,onDelete:d,isDeleting:h}){return e.jsxs("button",{className:k("group w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer text-left pl-6",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:n,children:[e.jsxs("div",{className:"relative",children:[e.jsx(te,{provider:i.provider,size:"sm"}),e.jsx(de,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-muted-foreground"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm truncate",children:i.name}),e.jsx(ae,{variant:"outline",className:"text-[9px] h-4 px-1",children:"variant"})]}),e.jsx("div",{className:"flex items-center gap-1.5 mt-0.5",children:u?.authenticated?e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"w-3 h-3 text-green-600"}),e.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["via ",i.provider]})]}):e.jsxs(e.Fragment,{children:[e.jsx(ce,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Parent not connected"})]})})]}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 hover:text-destructive",onClick:r=>{r.stopPropagation(),d()},disabled:h,children:e.jsx(Oe,{className:"w-3 h-3"})})]})}function Te({onSetup:i}){return e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20",children:e.jsxs("div",{className:"text-center max-w-md px-8",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mx-auto mb-6",children:e.jsx(re,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"CCS Profile Manager"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Manage OAuth authentication, account preferences, and model selection for CLIProxy providers. Configure how CCS routes requests to different AI backends."}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-6",children:["For live usage stats and real-time monitoring, visit the"," ",e.jsx("a",{href:"/cliproxy/control-panel",className:"text-primary hover:underline",children:"Control Panel"}),"."]}),e.jsxs(o,{onClick:i,className:"gap-2",children:[e.jsx(T,{className:"w-4 h-4"}),"Quick Setup"]})]})})}function We(){const i=ge(),{data:u,isLoading:a}=_(),{data:n,isFetching:d}=Ce(),h=Se(),r=Ae(),v=ke(),[x,f]=l.useState(null),[j,S]=l.useState(null),[F,N]=l.useState(!1),[w,b]=l.useState(null),m=u?.authStatus||[],C=n?.variants||[],A=l.useMemo(()=>j?null:x&&m.some(t=>t.provider===x)?x:m.length>0?m[0].provider:null,[x,j,m]),p=m.find(t=>t.provider===A),c=C.find(t=>t.name===j),g=c?m.find(t=>t.provider===c.provider):void 0,D=()=>{i.invalidateQueries({queryKey:["cliproxy"]}),i.invalidateQueries({queryKey:["cliproxy-auth"]})},I=t=>{f(t),S(null)},y=t=>{S(t),f(null)};return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex",children:[e.jsxs("div",{className:"w-64 border-r flex flex-col bg-muted/30",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:"CLIProxy"})]}),e.jsx(o,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:D,disabled:d,children:e.jsx(ie,{className:k("w-4 h-4",d&&"animate-spin")})})]}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"CCS-level account management"}),e.jsxs(o,{variant:"default",size:"sm",className:"w-full gap-2",onClick:()=>N(!0),children:[e.jsx(T,{className:"w-4 h-4"}),"Quick Setup"]})]}),e.jsx(Pe,{className:"flex-1",children:e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2",children:"Providers"}),a?e.jsx("div",{className:"space-y-2 px-2",children:[1,2,3,4].map(t=>e.jsx(De,{className:"h-14 w-full rounded-lg"},t))}):e.jsx("div",{className:"space-y-1",children:m.map(t=>e.jsx(Ge,{status:t,isSelected:A===t.provider,onSelect:()=>I(t.provider)},t.provider))}),C.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-3 py-2 mt-4 flex items-center gap-1.5",children:[e.jsx(de,{className:"w-3 h-3"}),"Variants"]}),e.jsx("div",{className:"space-y-1",children:C.map(t=>e.jsx(Re,{variant:t,parentAuth:m.find(O=>O.provider===t.provider),isSelected:j===t.name,onSelect:()=>y(t.name),onDelete:()=>v.mutate(t.name),isDeleting:v.isPending},t.name))})]})]})}),e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[m.length," provider",m.length!==1?"s":""]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"w-3 h-3 text-green-600"}),m.filter(t=>t.authenticated).length," connected"]})]})})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background",children:c&&g?e.jsx(E,{provider:c.name,displayName:`${c.name} (${c.provider} variant)`,authStatus:g,catalog:M[c.provider],logoProvider:c.provider,onAddAccount:()=>b({provider:c.provider,displayName:g.displayName}),onSetDefault:t=>h.mutate({provider:c.provider,accountId:t}),onRemoveAccount:t=>r.mutate({provider:c.provider,accountId:t}),isRemovingAccount:r.isPending}):p?e.jsx(E,{provider:p.provider,displayName:p.displayName,authStatus:p,catalog:M[p.provider],onAddAccount:()=>b({provider:p.provider,displayName:p.displayName}),onSetDefault:t=>h.mutate({provider:p.provider,accountId:t}),onRemoveAccount:t=>r.mutate({provider:p.provider,accountId:t}),isRemovingAccount:r.isPending}):e.jsx(Te,{onSetup:()=>N(!0)})}),e.jsx(Le,{open:F,onClose:()=>N(!1)}),e.jsx(Ve,{open:w!==null,onClose:()=>b(null),provider:w?.provider||"",displayName:w?.displayName||""})]})}export{We as CliproxyPage};
|