Commit Graph
27 Commits
Author SHA1 Message Date
digua fdd0856b5d docs: clarify branch workflow 2026-08-04 17:29:09 +08:00
digua 750bfc03b8 docs: require feature branches for commits 2026-08-03 18:45:00 +08:00
digua 43c9229935 docs(test): define value-based testing rules 2026-08-01 16:41:30 +08:00
digua df5f335f53 docs(logging): clarify logging guidelines
Keep the agent guidance focused on decisions developers must make while leaving rotation and other automatic logger behavior to the implementation.
2026-08-01 13:19:41 +08:00
digua 69a2b981c7 fix(logging): preserve preload polling errors
Record background preload polling failures with the original Error and clarify that logging review severity and tests should follow user impact rather than mechanical rules.
2026-08-01 13:19:41 +08:00
digua 73c6de364e chore(web): add Web WASM development workflow 2026-07-20 17:24:55 +08:00
diguaandCursor 1e7aefe08b feat(import): add Rust native parsing kernels for WeFlow and ChatLab JSON
Add @openchatlab/parser-native (napi-rs v3) with a shared byte-level JSON
scanner and two format kernels. Parsing large exports is 4-10x faster in
real-data benchmarks. The native module is an optional local build; the
pure-TS parsers remain as automatic fallback when it is unavailable,
disabled via CHATLAB_DISABLE_NATIVE_PERF=1, or rejects off-spec files.

The ChatLab kernel also parses the members array structurally, fixing the
TS head-regex heuristic that silently dropped avatars/roles for files with
nested arrays or long member lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 22:49:38 +08:00
digua b33cbd065d docs(agent): add chatlab analyze skill 2026-07-04 15:12:50 +08:00
digua 733cd0db95 feat(records): filter chat records by member 2026-07-02 10:35:02 +08:00
digua 25b658e981 chore(tests): clarify runtime and regression rules 2026-06-27 15:54:08 +08:00
diguaandClaude Opus 4.8 7c21d1c879 feat(logging): add unified app logger with file rotation and global error capture
Build a shared appLogger (node-runtime) that all three runtimes write to a
single rolling logs/app.log (10 MB → rename to app.old.log). Replaces the
four independent hand-written loggers (app.log/api.log Electron wrappers)
with a unified entry point while leaving AiLogger/perf-logger intact.

Key additions:
- packages/node-runtime/src/logging/app-logger.ts: initAppLogger/appLogger
  singleton, INFO threshold by default (CHATLAB_LOG_LEVEL to override),
  atomic rename rotation, Error data auto-extracts message+stack
- Three-runtime init: Electron main, CLI Web (http/index.ts), CLI (run())
- Global crash capture: uncaughtException + unhandledRejection on all three
  Node runtimes now land in app.log scope 'crash'
- Fastify setErrorHandler fallback logs scope 'http' on CLI Web and Electron
  internal server for unexpected 5xx errors
- Frontend: window.onerror + unhandledrejection + Vue errorHandler feed into
  POST /_web/logs/report (scope 'web') with dedup+throttle
- AGENTS.md: logging rules section requiring key-path logs on new/changed features

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:28:09 +08:00
digua 6ec736c05a feat(export): simplify message export and support multiple formats 2026-06-10 22:18:20 +08:00
diguaandClaude Sonnet 4.6 f5e83748ff fix(ai): register execute_sql tool in Electron tool registry
sqlQueryTool (execute_sql) was listed in BUILTIN_TOOL_CATALOG and
available in the CLI AGENT_TOOL_REGISTRY, but was never imported or
registered in the Electron-specific TOOL_REGISTRY. Users who enabled
the tool via the assistant config panel would trigger a missing-tool
error at inference time.

Add sqlQueryTool to the Electron registry following the same
adaptSharedTool pattern used by all other analysis tools. Add a
catalog/registry drift guard test (name + category) covering all
BUILTIN_TOOL_CATALOG entries, enabled via
--experimental-test-module-mocks to mock Electron runtime deps.
Document the general-over-specific assertion rule in AGENTS.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 00:15:25 +08:00
digua 3f96d31819 docs: document data directory compatibility gate 2026-06-08 10:14:42 +08:00
digua 2111abae5f docs: refine test maintenance guidance 2026-06-08 10:14:42 +08:00
digua 2d88215d63 test: add default test runner 2026-06-08 10:14:42 +08:00
diguaandClaude Sonnet 4.6 33353be9e2 docs(agents): expand development guidelines in AGENTS.md
Add review/judgment principles, project map, test strategy,
commands/validation guide, code conventions, architecture boundaries,
compatibility/migration rules, and security/release checklist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 20:27:27 +08:00
digua a780517539 docs: add contributor development guide 2026-06-04 14:37:12 +08:00
digua 9e88dcbd09 feat(changelog): bundle changelogs locally 2026-05-26 23:19:47 +08:00
diguaandCursor dd3cb10414 refactor(services): unify CLI Web and Electron service layer
Extract shared business logic from monolithic web.ts into reusable
services in @openchatlab/node-runtime (session, member, index, summary,
export), using SessionRuntimeAdapter to abstract platform differences.
Split web.ts into 12 domain-specific route modules under routes/web/.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 10:20:39 +08:00
digua 1536e241fc docs: add versioning and commit scope conventions to AGENTS.md
- All distribution targets share root package.json version (lock-step)
- Commit scope: free-form for shared changes, platform scope (electron/
  cli/web) only when the change is platform-specific
2026-05-18 22:58:00 +08:00
digua 1294448959 refactor(electron): introduce ElectronPathProvider and convert modules to PathProvider
Create ElectronPathProvider implementing @openchatlab/core PathProvider interface,
and convert 12 modules from direct paths.ts imports to PathProvider-based access.

Key changes:
- New: ElectronPathProvider + path-context.ts singleton
- assistant/manager.ts: delegate to @openchatlab/node-runtime AssistantManager (394→115 lines)
- skills/manager.ts: delegate to @openchatlab/node-runtime SkillManagerCore (369→100 lines)
- 10 other modules: replace getXxxDir() imports with getPathProvider().getXxxDir()

Desktop-only modules (IPC, workerManager, i18n, index) intentionally kept as-is.
2026-05-18 19:25:12 +08:00
digua 17f7ebc094 docs: update 2026-05-15 22:30:18 +08:00
digua 50da84fe38 feat: 移除向量模型配置逻辑 2026-05-06 23:56:45 +08:00
digua 165ae83ba2 fix: 修复词库刷新与合并ID碰撞等问题 2026-04-15 00:10:28 +08:00
digua c7ad09b2d5 feat: 话题迁移至洞察 2026-04-15 00:10:28 +08:00
digua 4355344e35 docs: 新增AGENTS.md 2026-03-28 00:10:29 +08:00