refactor(LLM CLI): 明確化 CLI 參數與驗證輸出
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import https from 'https';
|
||||
import { execFileSync } from 'child_process';
|
||||
|
||||
// 本 action 會連接自架 Gitea / OpenCode,部署環境可能使用內部 CA 或自簽憑證。
|
||||
// 對外部服務請優先使用預設 TLS 驗證;需要內部服務相容時才使用 getInsecureHttpsAgent()。
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
export const GITEA_TOKEN = process.env.GITEA_TOKEN || '';
|
||||
@@ -29,6 +31,7 @@ export function getInsecureHttpsAgent() {
|
||||
return (_insecureHttpsAgent ??= new https.Agent({ rejectUnauthorized: false }));
|
||||
}
|
||||
|
||||
// 過渡別名:既有呼叫端仍可用 OpenCode 語意名稱;新程式碼請直接使用 getInsecureHttpsAgent。
|
||||
export const getOpenCodeHttpsAgent = getInsecureHttpsAgent;
|
||||
|
||||
const CLI_CANDIDATES = [
|
||||
|
||||
Reference in New Issue
Block a user