Commit Graph
108 Commits
Author SHA1 Message Date
CEQ151 15470444e5 feat(ai): improve chart runtime UX 2026-06-05 11:12:42 +08:00
digua 483907f1ac release: v0.24.1 2026-06-04 14:44:48 +08:00
digua fbfe635838 release: v0.24.0 2026-06-03 13:37:02 +08:00
digua 3ff9437510 chore(tsconfig): align node type-check projects 2026-06-02 15:41:21 +08:00
diguaandCursor cd3ae8c5ba feat(auth): harden auth security and add remember-me login
Improve auth hook security: restructure URL classification to fix
/_web/* bypass when requireAuth is active, use HMAC-SHA256 for constant-
time token comparison, remove dead webModeEnabled code.

Improve frontend auth flow: extract initializeApp() with watch-based
re-init after login, add getToken callback for real-time store reads,
unify SSE 401 handling via fetchWithAuth, switch default storage to
sessionStorage, add router guard consuming meta.public.

Add "Remember this device" checkbox on login page with dual
localStorage/sessionStorage strategy and safety warning.

Add 23 unit tests for auth hook matrix and http client.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 15:41:21 +08:00
digua a6039d95ab release: v0.23.1 2026-06-01 11:23:00 +08:00
digua 066564c64e release: v0.23.0 2026-05-31 14:01:13 +08:00
digua 8e01121b7a release: v0.22.1 2026-05-29 15:07:02 +08:00
digua 1aee8133a3 release: v0.22.0 2026-05-26 23:29:34 +08:00
digua ab90e06089 chore(docs): isolate docs workspace dependencies 2026-05-23 23:59:40 +08:00
digua c8d218251d feat(docs): add standalone VitePress docs site 2026-05-23 23:38:02 +08:00
diguaandClaude Sonnet 4.6 8564db7241 release: v0.21.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 16:37:59 +08:00
digua b984b79bc9 release: v0.21.0 2026-05-22 14:45:17 +08:00
digua eebb428dd3 release: v0.20.0 2026-05-19 23:59:11 +08:00
digua b1427e2422 feat(cli): add tsup build pipeline for npm publishing
- Rename package to `chatlab-cli`, version 0.1.0
- Add tsup config with ESM output, bundle @openchatlab/* + stream-json
- Update bin/chatlab.js from stub to actual entry point
- Unify version reading via src/version.ts (CLI/MCP/HTTP API)
- Add publishing fields: type, files, engines, publishConfig, keywords
- Move @openchatlab/* to devDependencies (bundled into dist/)
- Add better-sqlite3 to dependencies, @node-rs/jieba to optionalDependencies
- Fix --web default path for bundled dist/ directory structure
2026-05-19 21:46:00 +08:00
digua 78e41a65b5 refactor: migrate CLI from packages/server to apps/cli
Move the CLI application from packages/server/ to apps/cli/ to align
with the monorepo convention (apps/ for deployable applications,
packages/ for shared libraries). Rename package to @openchatlab/chatlab.

Also fix a bug in ensureToken() that used raw string manipulation to
write config.toml, causing duplicate token fields that corrupted the
TOML file. This led to config parse failures and user_data_dir being
overwritten with defaults. Now uses writeConfigField() for safe writes.
2026-05-19 21:33:00 +08:00
digua c08a465116 chore(electron): remove Linux desktop build targets
Linux users will be served by the upcoming CLI package instead.
2026-05-19 19:17:59 +08:00
digua 9099b15ce6 chore(deps): upgrade vite toolchain 2026-05-19 18:39:14 +08:00
digua 2bcbb84711 feat: add interactive dev mode selector (pnpm dev)
Adds a zero-dependency Node.js script with arrow-key selection
for choosing between Desktop (Electron), Web (CLI serve + frontend),
Server Only (API backend), and Frontend-only dev modes.

Remembers last selection in node_modules/.cache/dev-mode.
2026-05-19 00:35:00 +08:00
digua b12c07dc32 refactor: extract Electron shell to apps/desktop/
Move Electron-specific code (main, preload, shared) and configs
(electron.vite, electron-builder) into apps/desktop/ to prepare
for multi-platform support (Web Browser standalone).

- Create apps/desktop/ with dedicated package.json and tsconfig
- Split Electron deps (electron, electron-updater, better-sqlite3,
  etc.) from shared frontend deps in root package.json
- Declare better-sqlite3 and @node-rs/jieba in packages/node-runtime
- Add stream-json to packages/parser where it belongs
- Update all path aliases (@electron/* → apps/desktop/*) in tsconfig,
  vite configs, and relative imports in preload/main
- Keep slim root tsconfig.node.json as shared base for packages
- Update CI/CD release workflow for new directory layout
- Fix pre-existing type errors (pi-ai Model generic, SQLLabTab
  LLMChatStreamChunk, filter.test.ts empty methods)
2026-05-19 00:31:00 +08:00
digua e5dc1fcb9b fix(dev): tsx watch not detecting workspace package changes
tsx watch's symlink-based file watching doesn't trigger on changes to
pnpm workspace packages (tsx#221). Add --include flags for packages/core
and packages/node-runtime source directories to both dev:serve script
and vite.web.config.mts auto-serve plugin. Extract long command to
scripts/dev-serve.sh for cleaner package.json.
2026-05-18 22:43:00 +08:00
digua 653bd966fa fix: dev native startup issues 2026-05-15 18:54:50 +08:00
digua 347c7d69dd refactor(electron): migrate all pi-ai/pi-agent-core imports to node-runtime
- Convert 20 tool definition files to import Type/AgentTool from
  @openchatlab/node-runtime instead of direct pi-* packages
- Migrate compression, summary, RAG, LLM config, and IPC modules
  to use node-runtime re-exports (completeSimple, streamSimple, etc.)
- Remove @mariozechner/pi-agent-core and @mariozechner/pi-ai from
  root package.json — now only node-runtime depends on them directly
- Electron is now fully decoupled from pi-* direct imports
2026-05-14 23:46:13 +08:00
digua 700b4266f3 fix(web): session index, CORS proxy, demo guard, and dev script improvements
- Add session index endpoints (generate-index, clear-index) with writable db
- Add window.sessionApi shims for web mode (getStats, generate, getSessions, etc.)
- Fix CORS: add Vite dev proxy for chatlab.fun, centralize CHATLAB_SITE_BASE
- Guard DemoImportButton: show fallback message in web mode
- Use tsx watch for dev:serve hot-reloading
- Reorganize dev scripts: dev:app (web frontend), dev:serve (backend), dev:web (both)
2026-05-13 21:51:27 +08:00
digua 4053b7c77f refactor(dev): reorganize dev scripts and port assignments
- dev: Electron only (renderer port 3400, unchanged)
- dev:app: Web frontend only (port 3100)
- dev:serve: Backend only (chatlab serve, default port 3110)
- dev:web: Web frontend + backend auto-start (3100 + 3110)
- Revert electron.vite.config.ts to original (no extra plugins)
- chatlabServePlugin gated by CHATLAB_AUTO_SERVE env var
2026-05-13 21:25:57 +08:00
digua 17855858d7 feat(web): add standalone Web Vite build configuration
Phase 3A.2: Create vite.web.config.mts for building the CLI serve
Web SPA independently from the Electron build pipeline.

- __IS_ELECTRON__ = false, __IS_BROWSER_STANDALONE__ = false
- Output to dist-web/ (gitignored)
- Dev proxy: /_web and /api -> localhost:3400 (chatlab serve)
- Resolve aliases for @electron/shared and @electron/preload
  (type-only imports, erased at build time)
- npm scripts: dev:web, build:web
- Same manualChunks strategy as Electron renderer build
2026-05-13 19:56:14 +08:00
digua 4e7ba91409 release: v0.19.0 2026-05-07 00:02:51 +08:00
digua 5fc7b5670c feat: 支持上下文自动压缩和新增相关配置 2026-05-06 23:56:45 +08:00
digua 70a164502e release: v0.18.4 2026-04-29 00:06:34 +08:00
digua 9eb20da030 release: v0.18.3 2026-04-28 00:15:33 +08:00
digua b28b763249 release: v0.18.2 2026-04-27 00:00:05 +08:00
digua 120eb93c23 release: v0.18.1 2026-04-24 22:39:32 +08:00
digua 0f4a0da536 feat: 迁移至ChatLab组织 2026-04-24 22:33:56 +08:00
digua 31f595a7d7 release: v0.18.0 2026-04-23 00:08:35 +08:00
digua 2944f92e05 release: v0.17.5 2026-04-21 00:09:52 +08:00
digua 1f0e1a85d8 feat: 使用原生逻辑替换node-machine-id依赖以解决部分Linux无法修改API密钥的问题(resolve #145) 2026-04-21 00:01:03 +08:00
digua 0be921effb release: v0.17.4 2026-04-19 21:55:30 +08:00
digua cb10785aa0 release: v0.17.3 2026-04-17 23:50:12 +08:00
digua 0c2732177d release: v0.17.2 2026-04-15 00:19:50 +08:00
digua dd88c499b3 release: v0.17.1 2026-04-13 09:44:56 +08:00
digua 9285d17cc3 release: v0.17.0 2026-04-12 00:59:50 +08:00
digua bf2b69b69d release: v0.16.0 2026-04-10 01:36:50 +08:00
digua df1bccca2e release: v0.15.0 2026-04-08 23:24:00 +08:00
digua 5c97a154f3 fix(ci): align packaging workflow with Node 24 and pnpm 2026-04-08 23:07:48 +08:00
digua 12941c4a1e chore: 升级到node24 2026-04-08 09:40:58 +08:00
digua a0155b5f68 chore: 支持Linux打包 2026-04-07 23:43:01 +08:00
digua e86df09371 release: v0.14.2 2026-04-07 00:19:38 +08:00
digua a8c3b032a7 test: add reusable e2e launcher smoke framework and scripts 2026-04-06 22:24:49 +08:00
digua a8e404244f release: v0.14.1 2026-04-02 23:36:11 +08:00
digua 48c88aa6d5 release: v0.14.0 2026-03-28 00:18:49 +08:00