b89d51d9847e4d83dceb4ddab4a7c3a4e5947980
App.tsx was the single source of truth for token, fetch policy, 401 handling, and per-UIN config edit state — fetchApi was drilled into every page and LogsPage read localStorage directly to build its SSE URL, giving two parallel truths for the bearer token. Promote the closure to a deep ApiClient module (domain methods + request() escape hatch) injected via ApiProvider/useApi, and lift selectedUin/config/saveStatus into useOneBotInstanceConfig so ConfigPage is self-contained. normalizeOneBotConfig becomes a pure function. ConfigPage now guards UIN switches when the editor is dirty and refetches the server-normalised config after save. ConfigPage prop count drops from 7 to 1; App.tsx from 421 to 270 LOC.
❄️ SnowLuma
Next Remote Protocol Framework.
关于项目
项目处于开发初期,仅支持部分功能,高速迭代中,随时可能出现破坏性更新。
鸣谢
LagrangeV2 - Proto
NapCatQQ - Scaner/Packet
辅助编程
推荐 Opus4.6 + Gemini3.1pro 对本项目辅助开发
本项目大量使用Ai技术。
加入我们
Languages
TypeScript
98.9%
CSS
0.5%
JavaScript
0.5%