mirror of
http://192.168.0.88:13333/lywsvip/openclaw-zero-token.git
synced 2026-05-20 01:55:02 +08:00
Web model fixes: - ChatGPT: update send button selectors for 2026 UI - Gemini: use innerText instead of textContent, tighten response selectors - Kimi: fix Connect binary protocol parser (only accept append/set ops) - Qwen CN: add credentials:"include" to fix 403 signature error - Perplexity: rewrite client with Playwright native keyboard API, only send last user message instead of full system prompt - DeepSeek: fix tool_call regex, add data.v array handling, XML argument fallback, JUNK_TOKENS Unicode variants E2E test suite (scripts/): - Two-phase runner: TUI first (L2 HTTP + L3 WebSocket), then WebUI (L5 Playwright) - Anti-ban: adaptive delay with provider interleaving - Message pool: 20 natural CN/EN messages, random selection - HTML report output to reports/ Other: - Simplify chat UI: remove session/agent selector, keep only model selector - onboard webauth: auto-exit after auth completes (process.exit) - Move vitest config to scripts/ directory Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
971 B
TypeScript
29 lines
971 B
TypeScript
import path from "node:path";
|
||
import { fileURLToPath } from "node:url";
|
||
import { defineConfig } from "vitest/config";
|
||
|
||
const scriptsDir = fileURLToPath(new URL(".", import.meta.url));
|
||
const root = path.resolve(scriptsDir, "..");
|
||
const pluginSdkDist = path.resolve(root, "dist/plugin-sdk");
|
||
|
||
/** 仅跑 Zero Token web stream 相关单元测试,不依赖 browser-playwright 与主 vitest 多项目配置。 */
|
||
export default defineConfig({
|
||
resolve: {
|
||
// extensions/browser(被若干 web-stream 间接引用)使用 openclaw/plugin-sdk/*;
|
||
// 根包未在 node_modules 下挂名为 openclaw 的链接时,Vite 需显式别名到 dist。
|
||
alias: [
|
||
{
|
||
find: /^openclaw\/plugin-sdk\/(.+)$/,
|
||
replacement: `${pluginSdkDist}/$1.js`,
|
||
},
|
||
],
|
||
},
|
||
test: {
|
||
environment: "node",
|
||
include: [
|
||
"src/zero-token/streams/web-stream-factories.test.ts",
|
||
"src/zero-token/streams/doubao-web-stream.test.ts",
|
||
],
|
||
},
|
||
});
|