Compare commits

...
6 Commits
Author SHA1 Message Date
手瓜一十雪 a6a0b408af Update QQ x64 download URL in release workflow
AI RELEASE NapCat / Build-LiteLoader (push) Canceled after 0s
AI RELEASE NapCat / Build-Shell (push) Canceled after 0s
AI RELEASE NapCat / Download-QNX64 (push) Canceled after 0s
AI RELEASE NapCat / release-napcat (push) Canceled after 0s
Changed the QQ x64 config JS URL to use a proxy service instead of the direct CDN link in the auto-release workflow. This may help bypass access restrictions or improve reliability.
2025-11-14 12:37:32 +08:00
手瓜一十雪 e9856ac80f Refactor version API to GetNapCatVersion endpoint
AI RELEASE NapCat / Build-LiteLoader (push) Canceled after 0s
AI RELEASE NapCat / Build-Shell (push) Canceled after 0s
AI RELEASE NapCat / Download-QNX64 (push) Canceled after 0s
AI RELEASE NapCat / release-napcat (push) Canceled after 0s
Replaces the PackageInfo API and related frontend usage with a dedicated GetNapCatVersion endpoint that returns only the NapCat version string. Updates backend handler, helper, types, router, and frontend components to use the new API for improved clarity and separation of concerns.
2025-11-14 12:10:57 +08:00
手瓜一十雪 f553f9dc8d fix: webui version 2025-11-14 11:51:23 +08:00
手瓜一十雪 5608638e9a Update OpenRouter API URL and model in workflow
AI RELEASE NapCat / Build-LiteLoader (push) Canceled after 0s
AI RELEASE NapCat / Build-Shell (push) Canceled after 0s
AI RELEASE NapCat / Download-QNX64 (push) Canceled after 0s
AI RELEASE NapCat / release-napcat (push) Canceled after 0s
Changed the OpenRouter API endpoint and model in the auto-release GitHub Actions workflow to use new values. This may reflect a migration to a different service or model for automated releases.
2025-11-13 21:02:28 +08:00
手瓜一十雪 a53c20767a Update artifact zipping to exclude parent folder
AI RELEASE NapCat / Build-LiteLoader (push) Canceled after 0s
AI RELEASE NapCat / Build-Shell (push) Canceled after 0s
AI RELEASE NapCat / Download-QNX64 (push) Canceled after 0s
AI RELEASE NapCat / release-napcat (push) Canceled after 0s
Changed the zip commands in the auto-release workflow to zip the contents of each artifact directory rather than the directory itself. This ensures the resulting zip files do not include an extra parent folder.
2025-11-13 20:59:31 +08:00
手瓜一十雪 a92bef5b33 Update release note prompt and workflow wording
Clarified instructions in release_note_prompt.txt to use the provided version number and updated the example version. Modified auto-release.yml to specify '当前真正的版本' in the user content for improved clarity.
2025-11-13 20:54:19 +08:00
9 changed files with 27 additions and 27 deletions

No files matched your search

+2 -2
View File
@@ -26,9 +26,9 @@
额外约束:
- 语言简体中文,面向最终用户
下面为真实示例,请完全参考
下面为真实示例,请完全参考(第一行版本号必须使用用户提供的版本号,例如 v4.9.5)
# V?.?.?
# V4.9.0
[使用文档](https://napneko.github.io/)
## Windows 一键包
+11 -10
View File
@@ -9,8 +9,8 @@ on:
permissions: write-all
env:
OPENROUTER_API_URL: https://openrouter.ai/api/v1/chat/completions
OPENROUTER_MODEL: "openrouter/auto"
OPENROUTER_API_URL: https://91vip.futureppo.top/v1/chat/completions
OPENROUTER_MODEL: "kimi-k2-0905-turbo"
RELEASE_NAME: "NapCat"
jobs:
@@ -88,7 +88,8 @@ jobs:
# -----------------------------
# 1) 下载 QQ x64
# -----------------------------
JS_URL="https://cdn-go.cn/qq-web/im.qq.com_new/latest/rainbow/windowsConfig.js"
# JS_URL="https://cdn-go.cn/qq-web/im.qq.com_new/latest/rainbow/windowsConfig.js"
JS_URL="https://slave.docadan488.workers.dev/proxy?url=https://cdn-go.cn/qq-web/im.qq.com_new/latest/rainbow/windowsConfig.js"
NT_URL=$(curl -fsSL "$JS_URL" | grep -oP '"ntDownloadX64Url"\s*:\s*"\K[^"]+')
QQ_ZIP="$(basename "$NT_URL")"
aria2c -x16 -s16 -k1M -o "$QQ_ZIP" "$NT_URL"
@@ -159,11 +160,11 @@ jobs:
- name: Zip Artifacts
run: |
cd artifacts
[ -d NapCat.Framework ] && zip -qr ../NapCat.Framework.zip -r NapCat.Framework
[ -d NapCat.Shell ] && zip -qr ../NapCat.Shell.zip -r NapCat.Shell
[ -d NapCat.Shell.Windows.Node ] && zip -qr ../NapCat.Shell.Windows.Node.zip -r NapCat.Shell.Windows.Node
cd ..
cd artifacts
[ -d NapCat.Framework ] && (cd NapCat.Framework && zip -qr ../../NapCat.Framework.zip .)
[ -d NapCat.Shell ] && (cd NapCat.Shell && zip -qr ../../NapCat.Shell.zip .)
[ -d NapCat.Shell.Windows.Node ] && (cd NapCat.Shell.Windows.Node && zip -qr ../../NapCat.Shell.Windows.Node.zip .)
cd ..
- name: Generate release note via OpenRouter
env:
@@ -216,13 +217,13 @@ jobs:
SYSTEM_PROMPT=$(<"$PROMPT_FILE")
# 构建用户内容
USER_CONTENT="当前版本: $CURRENT_TAG\n提交列表:\n$COMMITS"
USER_CONTENT="当前真正的版本: $CURRENT_TAG\n提交列表:\n$COMMITS"
# 构建请求 JSON
BODY=$(jq -n \
--arg system "$SYSTEM_PROMPT" \
--arg user "$USER_CONTENT" \
'{model: env.OPENROUTER_MODEL, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.2, max_tokens:800}')
'{model: env.OPENROUTER_MODEL, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.3, max_tokens:800}')
echo "=== OpenRouter request body ==="
echo "$BODY" | jq .
@@ -4,9 +4,9 @@ import { WebUiDataRuntime } from '@/napcat-webui-backend/helper/Data';
import { sendSuccess } from '@/napcat-webui-backend/utils/response';
import { WebUiConfig } from '@/napcat-webui-backend/index';
export const PackageInfoHandler: RequestHandler = (_, res) => {
const data = WebUiDataRuntime.getPackageJson();
sendSuccess(res, data);
export const GetNapCatVersion: RequestHandler = (_, res) => {
const data = WebUiDataRuntime.GetNapCatVersion();
sendSuccess(res, { version: data });
};
export const QQVersionHandler: RequestHandler = (_, res) => {
@@ -1,6 +1,6 @@
import type { LoginRuntimeType } from '../types/data';
import packageJson from '../../../../package.json';
import store from 'napcat-common/src/store';
import { napCatVersion } from 'napcat-common/src/version';
const LoginRuntime: LoginRuntimeType = {
LoginCurrentTime: Date.now(),
@@ -30,12 +30,11 @@ const LoginRuntime: LoginRuntimeType = {
QQLoginList: [],
NewQQLoginList: [],
},
packageJson,
NapCatVersion: napCatVersion,
WebUiConfigQuickFunction: async () => {
},
};
export const WebUiDataRuntime = {
setWebUiTokenChangeCallback (func: (token: string) => Promise<void>): void {
LoginRuntime.onWebUiTokenChange = func;
@@ -130,8 +129,8 @@ export const WebUiDataRuntime = {
return LoginRuntime.NapCatHelper.onOB11ConfigChanged(ob11);
} as LoginRuntimeType['NapCatHelper']['onOB11ConfigChanged'],
getPackageJson () {
return LoginRuntime.packageJson;
GetNapCatVersion () {
return LoginRuntime.NapCatVersion;
},
setQQVersion (version: string) {
@@ -1,12 +1,12 @@
import { Router } from 'express';
import { GetThemeConfigHandler, PackageInfoHandler, QQVersionHandler, SetThemeConfigHandler } from '../api/BaseInfo';
import { GetThemeConfigHandler, GetNapCatVersion, QQVersionHandler, SetThemeConfigHandler } from '../api/BaseInfo';
import { StatusRealTimeHandler } from '@/napcat-webui-backend/api/Status';
import { GetProxyHandler } from '../api/Proxy';
const router = Router();
// router: 获取nc的package.json信息
router.get('/QQVersion', QQVersionHandler);
router.get('/PackageInfo', PackageInfoHandler);
router.get('/GetNapCatVersion', GetNapCatVersion);
router.get('/GetSysStatusRealTime', StatusRealTimeHandler);
router.get('/proxy', GetProxyHandler);
router.get('/Theme', GetThemeConfigHandler);
+1 -1
View File
@@ -18,5 +18,5 @@ interface LoginRuntimeType {
QQLoginList: string[];
NewQQLoginList: LoginListItem[];
};
packageJson: object;
NapCatVersion: string;
}
@@ -201,7 +201,7 @@ const NapCatVersion = () => {
data: packageData,
loading: packageLoading,
error: packageError,
} = useRequest(WebUIManager.getPackageInfo);
} = useRequest(WebUIManager.GetNapCatVersion);
const currentVersion = packageData?.version;
@@ -42,9 +42,9 @@ export default class WebUIManager {
return data.data as ServerResponse<T>;
}
public static async getPackageInfo () {
public static async GetNapCatVersion () {
const { data } =
await serverRequest.get<ServerResponse<PackageInfo>>('/base/PackageInfo');
await serverRequest.get<ServerResponse<PackageInfo>>('/base/GetNapCatVersion');
return data.data;
}
@@ -19,7 +19,7 @@ import logo from '@/assets/images/logo.png';
import WebUIManager from '@/controllers/webui_manager';
function VersionInfo () {
const { data, loading, error } = useRequest(WebUIManager.getPackageInfo);
const { data, loading, error } = useRequest(WebUIManager.GetNapCatVersion);
return (
<div className='flex items-center gap-2 text-2xl font-bold'>
<div className='flex items-center gap-2'>