chore: ARTEX 初始化

ARTEX — AI 自主渗透测试系统(Go 后端 + Next.js 前端,单二进制内嵌)。

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Autumn-27andClaude Opus 4.8 committed 2026-07-26 04:27:45 -04:00
commit 0ef8561411
287 files changed
+70178

No files matched your search

@@ -0,0 +1,27 @@
"use client";
import { setClientCookie } from "../cookie.client";
import { setLocalStorageValue } from "../local-storage.client";
import { PREFERENCE_PERSISTENCE, type PreferenceKey } from "./preferences-config";
export async function persistPreference(key: PreferenceKey, value: string) {
const mode = PREFERENCE_PERSISTENCE[key];
switch (mode) {
case "none":
return;
// 静态导出无 Node 服务端,server-cookie 退化为浏览器 cookie(写入语义等价)。
case "server-cookie":
case "client-cookie":
setClientCookie(key, value);
return;
case "localStorage":
setLocalStorageValue(key, value);
return;
default:
return;
}
}