WorkBuddy、CodeBuddy 桌面端增强助手:签到猫猫旅行成长计划查询、多账号独立备份、点切即用;免打扰模式让 AI 无人值守跑长任务;跨账号会话迁移、异常中断自动续接;暂存/快捷提示词;毛玻璃主题与更多实用功能。
import { build } from 'esbuild';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const dir = path.dirname(fileURLToPath(import.meta.url));
const notices = ['react','react-dom','scheduler','react-hot-toast','goober'].map(name => `${name}\n${fs.readFileSync(path.join(dir,'node_modules',name,'LICENSE'),'utf8')}`).join('\n\n');
const output = path.resolve(dir,'../../scripts/toast-runtime.js');
await build({ absWorkingDir:dir,entryPoints:['entry.jsx'],outfile:output,bundle:true,minify:true,format:'iife',platform:'browser',target:['chrome110'],define:{'process.env.NODE_ENV':'"production"'},alias:{goober:path.join(dir,'goober-scoped.js')},legalComments:'eof',
banner:{js:'/* Generated by tools/toast-runtime/build.mjs; React 18.3.1 / react-hot-toast 2.6.0. */\nwindow.__wbsToastRuntime?.destroy();'},
});
fs.appendFileSync(output,'\n/* Third-party licenses:\n'+notices.replaceAll('*/','* /')+'\n*/\n');