mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-19 22:14:46 +00:00
Merge remote-tracking branch 'origin/dev' into feat/login-auth
This commit is contained in:
commit
759d43c8f7
6 files changed
+103
-12
No files matched your search
@@ -21,7 +21,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
# Cancel in-progress runs for same PR (safe now since auto-trigger is only on opened)
|
# Simple concurrency: one review per PR at a time
|
||||||
|
# With track_progress disabled, no bot comments are posted during review
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ai-review-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
|
group: ai-review-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -92,7 +93,7 @@ jobs:
|
|||||||
anthropic_api_key: ${{ secrets.CLIPROXY_API_KEY }}
|
anthropic_api_key: ${{ secrets.CLIPROXY_API_KEY }}
|
||||||
github_token: ${{ steps.app-token.outputs.token }}
|
github_token: ${{ steps.app-token.outputs.token }}
|
||||||
path_to_claude_code_executable: /home/github-runner/.local/bin/claude
|
path_to_claude_code_executable: /home/github-runner/.local/bin/claude
|
||||||
track_progress: ${{ github.event_name != 'workflow_dispatch' }}
|
track_progress: false # Disabled - no progress comments, just final review
|
||||||
prompt: |
|
prompt: |
|
||||||
ultrathink
|
ultrathink
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,31 @@
|
|||||||
|
## [7.18.3](https://github.com/kaitranntt/ccs/compare/v7.18.2...v7.18.3) (2026-01-13)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** simplify AI review workflow by disabling progress tracking ([4ef2d48](https://github.com/kaitranntt/ccs/commit/4ef2d4848cf12d197ba1f8cd5dac66b55c82c8be))
|
||||||
|
* **ci:** simplify AI review workflow by disabling progress tracking ([#323](https://github.com/kaitranntt/ccs/issues/323)) ([39b37ca](https://github.com/kaitranntt/ccs/commit/39b37caa892f8b723f003c8ed0c6d8f2fe96d799))
|
||||||
|
|
||||||
|
## [7.18.2](https://github.com/kaitranntt/ccs/compare/v7.18.1...v7.18.2) (2026-01-13)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** isolate concurrency groups by comment author ([3163509](https://github.com/kaitranntt/ccs/commit/316350905233d776968f53732974a77997513f24))
|
||||||
|
* **ci:** isolate concurrency groups by comment author ([#322](https://github.com/kaitranntt/ccs/issues/322)) ([1d33012](https://github.com/kaitranntt/ccs/commit/1d33012b4e5ad02bac63f9b559f64c3efdf26044))
|
||||||
|
|
||||||
|
## [7.18.1](https://github.com/kaitranntt/ccs/compare/v7.18.0...v7.18.1) (2026-01-13)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ci:** add explicit instruction to post review as PR comment ([85f6bc0](https://github.com/kaitranntt/ccs/commit/85f6bc07d44f54673163ad4fed6045a37ccabad0))
|
||||||
|
* **ci:** exclude bot comments from triggering AI review ([ce70617](https://github.com/kaitranntt/ccs/commit/ce70617ee94645399ba05af581240a696ca9cfed))
|
||||||
|
* **ci:** prevent self-cancelling AI review workflow ([120aca4](https://github.com/kaitranntt/ccs/commit/120aca466d646ee1c770b2712a0d2742d5dd62d6))
|
||||||
|
* **ci:** prevent self-cancelling AI review workflow ([#321](https://github.com/kaitranntt/ccs/issues/321)) ([fa1899f](https://github.com/kaitranntt/ccs/commit/fa1899f4611d570b2a8bf5e1a5342d5392466263))
|
||||||
|
* **delegation:** improve profile discovery and CI workflow ([#310](https://github.com/kaitranntt/ccs/issues/310)) ([affdaea](https://github.com/kaitranntt/ccs/commit/affdaead80c3635f49ef562cac81bde8db0cab23))
|
||||||
|
* **delegation:** only check profiles defined in config.yaml ([0075248](https://github.com/kaitranntt/ccs/commit/0075248273e2d4912c4e277deebd6e668c5b3466))
|
||||||
|
* **doctor:** use dynamic profile discovery for delegation check ([f88ad8e](https://github.com/kaitranntt/ccs/commit/f88ad8e78198302f68ee0b420075d704ab01d8ff))
|
||||||
|
* **ui:** improve sidebar navigation for collapsible menu items ([12b68f9](https://github.com/kaitranntt/ccs/commit/12b68f9f136c3529ac976eaec9e8903b43185e89))
|
||||||
|
* **ui:** improve sidebar navigation for collapsible menu items ([#313](https://github.com/kaitranntt/ccs/issues/313)) ([e2e2ecd](https://github.com/kaitranntt/ccs/commit/e2e2ecda3c1948fb90f9b47b1e31782ef30cc31f))
|
||||||
|
|
||||||
## [7.18.0](https://github.com/kaitranntt/ccs/compare/v7.17.0...v7.18.0) (2026-01-08)
|
## [7.18.0](https://github.com/kaitranntt/ccs/compare/v7.17.0...v7.18.0) (2026-01-08)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -109,10 +109,14 @@ bun run validate # Step 3: Final check (must pass)
|
|||||||
| Command | Help Handler Location |
|
| Command | Help Handler Location |
|
||||||
|---------|----------------------|
|
|---------|----------------------|
|
||||||
| `ccs --help` | `src/commands/help-command.ts` |
|
| `ccs --help` | `src/commands/help-command.ts` |
|
||||||
|
| `ccs api --help` | `src/commands/api-command.ts` → `showHelp()` |
|
||||||
|
| `ccs cleanup --help` | `src/commands/cleanup-command.ts` → `printHelp()` |
|
||||||
| `ccs cliproxy --help` | `src/commands/cliproxy-command.ts` → `showHelp()` |
|
| `ccs cliproxy --help` | `src/commands/cliproxy-command.ts` → `showHelp()` |
|
||||||
| `ccs auth --help` | `src/commands/auth-command.ts` |
|
| `ccs config --help` | `src/commands/config-command.ts` → `showHelp()` |
|
||||||
| `ccs api --help` | `src/commands/api-command.ts` |
|
| `ccs copilot --help` | `src/commands/copilot-command.ts` → `handleHelp()` |
|
||||||
| `ccs copilot --help` | `src/commands/copilot-command.ts` |
|
| `ccs doctor --help` | `src/commands/doctor-command.ts` → `showHelp()` |
|
||||||
|
| `ccs migrate --help` | `src/commands/migrate-command.ts` → `printMigrateHelp()` |
|
||||||
|
| `ccs setup --help` | `src/commands/setup-command.ts` → `showHelp()` |
|
||||||
|
|
||||||
**Note:** `lib/ccs` and `lib/ccs.ps1` are bootstrap wrappers only—they delegate to Node.js and contain no help text.
|
**Note:** `lib/ccs` and `lib/ccs.ps1` are bootstrap wrappers only—they delegate to Node.js and contain no help text.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kaitranntt/ccs",
|
"name": "@kaitranntt/ccs",
|
||||||
"version": "7.18.0-dev.5",
|
"version": "7.18.3-dev.1",
|
||||||
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
|
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cli",
|
"cli",
|
||||||
|
|||||||
+2
-2
@@ -340,8 +340,8 @@ async function main(): Promise<void> {
|
|||||||
|
|
||||||
// Special case: doctor command
|
// Special case: doctor command
|
||||||
if (firstArg === 'doctor' || firstArg === '--doctor') {
|
if (firstArg === 'doctor' || firstArg === '--doctor') {
|
||||||
const shouldFix = args.includes('--fix') || args.includes('-f');
|
const restArgs = args.slice(args.indexOf(firstArg) + 1);
|
||||||
await handleDoctorCommand(shouldFix);
|
await handleDoctorCommand(restArgs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,22 +4,80 @@
|
|||||||
* Handle doctor command for CCS.
|
* Handle doctor command for CCS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { initUI, header, dim, color, subheader } from '../utils/ui';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show help for doctor command
|
||||||
|
*/
|
||||||
|
function showHelp(): void {
|
||||||
|
console.log('');
|
||||||
|
console.log(header('ccs doctor'));
|
||||||
|
console.log('');
|
||||||
|
console.log(' Run health diagnostics on CCS installation.');
|
||||||
|
console.log('');
|
||||||
|
|
||||||
|
console.log(subheader('Usage:'));
|
||||||
|
console.log(` ${color('ccs doctor', 'command')} [options]`);
|
||||||
|
console.log('');
|
||||||
|
|
||||||
|
console.log(subheader('Options:'));
|
||||||
|
console.log(` ${color('--fix, -f', 'command')} Attempt to auto-fix detected issues`);
|
||||||
|
console.log(` ${color('--help, -h', 'command')} Show this help message`);
|
||||||
|
console.log('');
|
||||||
|
|
||||||
|
console.log(subheader('Checks performed:'));
|
||||||
|
console.log(` ${dim('-')} Config files (config.yaml, config.json)`);
|
||||||
|
console.log(` ${dim('-')} CLIProxy installation and process status`);
|
||||||
|
console.log(` ${dim('-')} OAuth port availability (8085, 1455, 51121)`);
|
||||||
|
console.log(` ${dim('-')} Symlink integrity (shared settings)`);
|
||||||
|
console.log(` ${dim('-')} Profile configuration validity`);
|
||||||
|
console.log('');
|
||||||
|
|
||||||
|
console.log(subheader('Auto-fix capabilities:'));
|
||||||
|
console.log(` ${dim('-')} Kill zombie CLIProxy processes`);
|
||||||
|
console.log(` ${dim('-')} Free blocked OAuth callback ports`);
|
||||||
|
console.log(` ${dim('-')} Regenerate outdated CLIProxy config`);
|
||||||
|
console.log(` ${dim('-')} Restore broken shared settings symlinks`);
|
||||||
|
console.log('');
|
||||||
|
|
||||||
|
console.log(subheader('Examples:'));
|
||||||
|
console.log(
|
||||||
|
` $ ${color('ccs doctor', 'command')} ${dim('# Run diagnostics (read-only)')}`
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
` $ ${color('ccs doctor --fix', 'command')} ${dim('# Run diagnostics and fix issues')}`
|
||||||
|
);
|
||||||
|
console.log('');
|
||||||
|
|
||||||
|
console.log(subheader('Exit codes:'));
|
||||||
|
console.log(` ${color('0', 'command')} All checks passed`);
|
||||||
|
console.log(` ${color('1', 'command')} One or more checks failed`);
|
||||||
|
console.log('');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle doctor command
|
* Handle doctor command
|
||||||
* @param shouldFix - If true, attempt to fix detected issues
|
* @param args - Command line arguments
|
||||||
*/
|
*/
|
||||||
export async function handleDoctorCommand(shouldFix = false): Promise<void> {
|
export async function handleDoctorCommand(args: string[]): Promise<void> {
|
||||||
|
await initUI();
|
||||||
|
|
||||||
|
if (args.includes('--help') || args.includes('-h')) {
|
||||||
|
showHelp();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const shouldFix = args.includes('--fix') || args.includes('-f');
|
||||||
|
|
||||||
const DoctorModule = await import('../management/doctor');
|
const DoctorModule = await import('../management/doctor');
|
||||||
const Doctor = DoctorModule.default;
|
const Doctor = DoctorModule.default;
|
||||||
const doctor = new Doctor();
|
const doctor = new Doctor();
|
||||||
|
|
||||||
await doctor.runAllChecks();
|
await doctor.runAllChecks();
|
||||||
|
|
||||||
// Attempt to fix issues if --fix flag provided
|
|
||||||
if (shouldFix) {
|
if (shouldFix) {
|
||||||
await doctor.fixIssues();
|
await doctor.fixIssues();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit with error code if unhealthy
|
|
||||||
process.exit(doctor.isHealthy() ? 0 : 1);
|
process.exit(doctor.isHealthy() ? 0 : 1);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user