mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-03 00:17:47 +00:00
chore(sync): merge main into dev after release [skip ci]
# Conflicts: # package.json
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
## [7.7.1](https://github.com/kaitranntt/ccs/compare/v7.7.0...v7.7.1) (2025-12-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **health:** correct CLIProxy port detection on macOS/Linux ([d1a0ebe](https://github.com/kaitranntt/ccs/commit/d1a0ebee61b8987df85c328d359967e46d1e5226))
|
||||
* **health:** use prefix matching for Linux process name truncation ([91e7b9f](https://github.com/kaitranntt/ccs/commit/91e7b9f93787e5b2d45bffdaed75e75c151281e4))
|
||||
|
||||
## [7.7.0](https://github.com/kaitranntt/ccs/compare/v7.6.0...v7.7.0) (2025-12-25)
|
||||
|
||||
### Features
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kaitranntt/ccs",
|
||||
"version": "7.7.0-dev.5",
|
||||
"version": "7.7.1",
|
||||
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
||||
+5
-10
@@ -38,7 +38,7 @@ export async function getPortProcess(port: number): Promise<PortProcess | null>
|
||||
*/
|
||||
async function getPortProcessUnix(port: number): Promise<PortProcess | null> {
|
||||
try {
|
||||
const { stdout } = await execAsync(`lsof -i :${port} -sTCP:LISTEN -t -F pcn`, {
|
||||
const { stdout } = await execAsync(`lsof -i :${port} -sTCP:LISTEN -F pcn`, {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
@@ -111,22 +111,17 @@ async function getPortProcessWindows(port: number): Promise<PortProcess | null>
|
||||
|
||||
/**
|
||||
* Check if process is CLIProxy
|
||||
* Uses prefix matching to handle Linux kernel's 15-char process name truncation
|
||||
* (e.g., 'cli-proxy-api-plus' becomes 'cli-proxy-api-p' in lsof/ps output)
|
||||
*/
|
||||
export function isCLIProxyProcess(process: PortProcess | null): boolean {
|
||||
if (!process) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Match cli-proxy, cli-proxy.exe, cliproxy, cliproxy.exe, cli-proxy-api
|
||||
const name = process.processName.toLowerCase();
|
||||
return [
|
||||
'cli-proxy',
|
||||
'cli-proxy.exe',
|
||||
'cliproxy',
|
||||
'cliproxy.exe',
|
||||
'cli-proxy-api',
|
||||
'cli-proxy-api.exe',
|
||||
].includes(name);
|
||||
// All CLIProxy variants start with 'cli-proxy' or 'cliproxy'
|
||||
return name.startsWith('cli-proxy') || name.startsWith('cliproxy');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user