Enable native verbose logging via env var
Some checks failed
Build NapCat Artifacts / Build-Framework (push) Has been cancelled
Build NapCat Artifacts / Build-Shell (push) Has been cancelled

Read NAPCAT_ENABLE_VERBOSE_LOG at startup and call napi2nativeLoader.nativeExports.setVerbose(true) (if available) right after loading the wrapper so native verbose logging can be enabled via environment. Also includes an updated native .node binary.
This commit is contained in:
手瓜一十雪
2026-02-13 19:33:48 +08:00
parent f44aca9a2f
commit eb937b29e4
3 changed files with 4 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ permissions: write-all
env: env:
OPENROUTER_API_URL: https://91vip.futureppo.top/v1/chat/completions OPENROUTER_API_URL: https://91vip.futureppo.top/v1/chat/completions
OPENROUTER_MODEL: "glm-4.7" OPENROUTER_MODEL: "deepseek-v3.2-chat"
RELEASE_NAME: "NapCat" RELEASE_NAME: "NapCat"
jobs: jobs:

View File

@@ -401,7 +401,9 @@ export async function NCoreInitShell () {
await connectToNamedPipe(logger).catch(e => logger.logError('命名管道连接失败', e)); await connectToNamedPipe(logger).catch(e => logger.logError('命名管道连接失败', e));
} }
const wrapper = loadQQWrapper(basicInfoWrapper.QQMainPath, basicInfoWrapper.getFullQQVersion()); const wrapper = loadQQWrapper(basicInfoWrapper.QQMainPath, basicInfoWrapper.getFullQQVersion());
if (process.env['NAPCAT_ENABLE_VERBOSE_LOG'] === '1') {
napi2nativeLoader.nativeExports.setVerbose?.(true);
}
// wrapper.node 加载后立刻启用 Bypass可通过环境变量禁用 // wrapper.node 加载后立刻启用 Bypass可通过环境变量禁用
if (process.env['NAPCAT_DISABLE_BYPASS'] !== '1') { if (process.env['NAPCAT_DISABLE_BYPASS'] !== '1') {
const bypassEnabled = napi2nativeLoader.nativeExports.enableAllBypasses?.(); const bypassEnabled = napi2nativeLoader.nativeExports.enableAllBypasses?.();