Commit Graph
95 Commits
Author SHA1 Message Date
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
digua 6d5e6f6e7a feat: 支持API导出 2026-03-28 00:10:29 +08:00
digua 9247a295b9 release: v0.13.0 2026-03-17 22:31:50 +08:00
digua f646415c37 chore: 优化构建分包策略 2026-03-17 22:31:35 +08:00
digua 7a1a9fc2b1 feat: 聊天对话支持使用技能 2026-03-16 00:27:55 +08:00
digua c6aaa733ae release: v0.12.1 2026-02-28 10:51:59 +08:00
digua b9daae8cb4 chore: remove @ai-sdk dependencies and legacy LLM service implementations
- Remove @ai-sdk/google, @ai-sdk/openai, ai packages from dependencies
- Delete SDK-based service files: gemini.ts, openai-compatible.ts, sdkUtils.ts
- Clean up unused types from llm/types.ts (ChatMessage, ChatOptions, LLMConfig, ILLMService, etc.)
2026-02-26 21:05:08 +08:00
n-WN 284118ca21 feat(agent): add session-based context timeline and runtime status 2026-02-23 19:17:25 +08:00
digua bc6c385c39 chore: 更新项目描述 2026-02-20 11:38:10 +08:00
digua 0988aad607 release: v0.11.2 2026-02-15 11:16:39 +08:00
digua a8a5084521 release: v0.11.0 2026-02-13 14:53:16 +08:00
digua 1b8bbb6e49 feat: 主进程配置国际化 2026-02-13 14:15:38 +08:00
digua d4f5c58f90 chore: i18n构建配置 2026-02-13 14:15:38 +08:00
digua f3ba043140 refactor: format with eslint & prettier 2026-02-13 14:15:38 +08:00