Commit Graph
1068 Commits
Author SHA1 Message Date
venti1112 de7533ca81 fix:Fix the issue where quoting a message in replies was ineffective
Previous behavior:
Replies visually displayed a quote block, but the quoted content was blank or invalid, and clicking to jump to the original message also failed.

Fixed behavior:
The quote now correctly references the original message, displaying its actual content and enabling a functional jump to the quoted message.
2026-05-06 15:53:11 +08:00
DrSmoothl 682d40b239 build(native): strip Linux SnowLuma binaries
Replace the Linux x64 SnowLuma native binaries with stripped release builds.

Leave the websocket native binary unchanged.
2026-05-06 15:21:22 +08:00
Ventiの酒 4a92292e49 Merge branch 'SnowLuma:main' into main 2026-05-06 13:42:36 +08:00
手瓜一十雪 60189d9c1d Add typecheck CI job and package script
Introduce a `typecheck` job to GitHub Actions that sets up pnpm and Node.js (v22), installs dependencies, and runs `pnpm typecheck` on the workspace. Make the `build` job depend on `typecheck`. Also add a `typecheck` script (`tsc --noEmit`) to packages/websocket/package.json to enable package-level type checking. This ensures TypeScript errors are caught before the build runs.
2026-05-06 10:23:45 +08:00
venti1112 52f2528271 fix: use Get-CimInstance for GPU detection with wmic fallback to support modern Windows
Previous behavior: display adapter detection relied exclusively on wmic path Win32_VideoController. On recent Windows versions (e.g., Windows 11 24H2) where wmic is deprecated and disabled by default, this resulted in a complete failure to identify any display adapters.

Fixed behavior: added a new primary detection path using PowerShell’s Get-CimInstance Win32_VideoController, which is available and recommended on all modern Windows installations. The original wmic method is kept as an automatic fallback for older systems or environments where the CIM/PowerShell approach is unavailable. This restores GPU detection across a wide range of Windows versions without changing the public API or returned data structure.
2026-05-05 21:31:46 +08:00
venti1112 34a572f153 fix: fix reverse-ws reload/reconnect idempotency, preserve explicit no-token config values, and make WebUI config rendering consistent after refresh
Previous behavior: after editing an unreachable reverse-ws OneBot config entry, the new config took effect, but reconnect attempts could still target the old URL.
Fixed behavior: reconnect now only applies to currently active OneBot config entries; removed or changed old entries are no longer retried.

Previous behavior: after refreshing the WebUI, OneBot config entries for the same account were already loaded and active in backend, but appeared empty in the WebUI config page.
Fixed behavior: OneBot config API response shape is now unified and backward-compatible, so persisted OneBot config entries render correctly after WebUI refresh.

Previous behavior: no-token OneBot config entries could be automatically assigned a token during load/refresh.
Fixed behavior: fixed the issue where no-token config entries were auto-populated with tokens; OneBot config entry token values now strictly follow explicit user configuration (empty stays empty).

Previous behavior: after multiple reconnect failures for a reverse-ws OneBot config entry, multiple connections could be created concurrently when the target server came back.
Fixed behavior: added per-entry connection/reconnect deduplication so each OneBot config entry maintains only one active connection and one reconnect timer.
2026-05-05 17:15:13 +08:00
DrSmoothl 5746dc628f chore: fix ci fail 2026-05-05 00:43:29 +08:00
DrSmoothl 1426d7adb2 feat: add settings page and theme toggle component
- Implemented a new SettingsPage component for user preferences including appearance, behavior, and account security settings.
- Added a ThemeToggle component to switch between light, dark, and system modes.
- Created reusable UI components: AlertDialog, Avatar, Badge, Button, Card, Dialog, Input, Label, Progress, ScrollArea, Separator, Sheet, Skeleton, Tooltip.
- Introduced utility functions for class name merging and formatting bytes/uptime.
- Added a custom hook for media query handling
2026-05-05 00:39:52 +08:00
DrSmoothl f52a84d53f feat: optimize group member fetching to prevent excessive OIDB call 2026-05-04 15:23:30 +08:00
DrSmoothl d6a22d62ae chore: move native bondle to packages/runtime folder 2026-05-03 18:25:20 +08:00
手瓜一十雪 69b8dd7165 Revert "Probe and reconnect to existing hooks"
This reverts commit f04ec3ec36.
2026-05-03 16:51:07 +08:00
手瓜一十雪 f04ec3ec36 Probe and reconnect to existing hooks
Add a lightweight pipe liveness probe and use it to detect/reconnect to existing SnowLuma hooks instead of always re-injecting. Introduces PROBE_TIMEOUT_MS (400ms) and QqHookClient.probePipe(pid, timeout) which quickly checks if the control pipe accepts a connection (no hello exchange). HookManager now parallel-probes freshly-enumerated processes (probeAndSeed) and fast-checks before injecting in loadProcess; positive hits mark the state as injected with method="reconnect" and avoid redundant injection. Also deduplicate login notifications in handleLoginState (skip if already logged in with the same UIN) and adjust the loginState emission ordering in QqHookClient.
2026-05-03 16:49:06 +08:00
手瓜一十雪 82c1721466 CI: add matrix builds & cross-platform packaging
Restructure GitHub Actions to build Windows and Linux matrix targets and produce platform-specific artifacts.

- .github/workflows/dev-build.yml: split cleanup/build jobs, add matrix (win-x64, linux-x64), set SNOWLUMA_TARGET for builds, produce full and -lite archives (.zip on Windows, .tar.gz on Linux), unify upload step and ensure errors when artifacts missing.
- .github/workflows/release.yml: convert release build to matrix, produce platform archives, download/collect artifacts, generate multi-platform release notes (bash), and create the GitHub release with both .zip and .tar.gz assets.
- packages/core/vite.config.ts: add fs import and SNOWLUMA_TARGET handling, pick platform-specific runtime files (launcher.bat or launcher.sh), enumerate native files per target, fail CI if expected native binaries are missing, and copy native files into dist/native.
- packages/runtime/launcher.sh: add a portable launcher for Linux that prefers a bundled node binary or falls back to PATH and execs index.mjs.

These changes enable cross-target CI packaging and enforce that native binaries are present before releasing.
2026-05-03 16:20:39 +08:00
DrSmoothl df73f58598 fix: dll path do not work on Linux/UNIX systems 2026-05-03 16:00:14 +08:00
手瓜一十雪 8ca616ec3a Preserve ESC in logger to allow ANSI colors
Adjust logger sanitization to keep the ESC (0x1B) character so ANSI color sequences produced by render() reach the terminal. The regex was refined from removing all ASCII control chars to excluding ESC, while still stripping other control characters (including BEL) to prevent unwanted system beeps and control behavior. Comment updated to reflect this rationale.
2026-05-03 15:53:41 +08:00
手瓜一十雪 252a65b833 Add @snowluma/websocket TS package and integrate
Introduce an in-tree TypeScript WebSocket package (@snowluma/websocket): move JS websocket implementation into packages/websocket/src (client, server, websocket, extensions, native, index) and add package.json + tsconfig. Replace direct 'ws' dependency in core with the workspace package and update runtime manifest/description. Implement a native addon loader for platform-specific binaries, add typings/refinements across client/server/websocket (more strict types, handshake parsing, permessage-deflate plumbing, buffer/raw data handling), and wire WebSocketClient as the package default export while exposing internal types. Update vite config to bundle the new package and copy only platform-target native binaries into dist/native. Remove legacy JS entrypoints and native loader, and adjust imports/usages in core (ws-transport) to accept broader raw data types.
2026-05-03 15:49:42 +08:00
手瓜一十雪 5fb969da7c Add WebSocket package with client/server & native
Introduce a new WebSocket package implementing RFC6455 functionality and permessage-deflate support. Adds core connection handling (packages/websocket/websocket.js), client wrapper (client.js), server and upgrade handling (server.js), extensions (permessage-deflate) and helpers (extensions.js), an index and native loader (native.js). Also include prebuilt native addon binaries for multiple platforms and integration points to use the native Parser and frame builder. The server supports handleUpgrade, subprotocol negotiation, and verifyClient hooks; the client performs handshakes and queues sends until open. Error handling, UTF-8 validation, close/ping/pong control frames, and max-payload checks are implemented.
2026-05-03 15:32:44 +08:00
手瓜一十雪 39f1672b29 Migrate project to pnpm monorepo
Restructure the repository into a pnpm workspace under packages/ (core, webui, runtime). Move source files for core and webui into packages/*, add package manifests for @snowluma/core and @snowluma/runtime, and remove the old launcher package.json. Update root package.json to be a monorepo controller (scripts delegate to pnpm filters, set packageManager and Node engine). Configure build outputs to emit into the repo-root dist/ (vite config changes) so the existing release pipeline continues to work. Add .npmrc with mirrors, expand .gitignore for monorepo layout, add tsconfig base and package-level tsconfigs, and add vitest config for the core package. Adjust injector native search paths and update tests import paths to the new package layout. Small CI/workflow comment added to clarify build behavior and README updated with monorepo structure and common commands.
2026-05-03 14:02:29 +08:00