mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
feat(cli): make clb web the primary web command
This commit is contained in:
1 parent
c6db9f0c4c
commit
47299a94cb
64 files changed
+264
-270
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Safe config field writer for `chatlab config set`.
|
||||
* Safe config field writer for `clb config set`.
|
||||
*
|
||||
* Wraps writeConfigField with guardrails: only schema-defined keys are accepted,
|
||||
* values are parsed by schema type, and the file is validated after writing with
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Wraps expensive analytics / NLP computations with the platform-agnostic
|
||||
* analytics cache (cacheDir/query/{sessionId}.cache.json). Used by both CLI Web
|
||||
* (`chatlab start`) and the Electron internal server so the two share one cache
|
||||
* (`clb web`) and the Electron internal server so the two share one cache
|
||||
* implementation. Validity is keyed to the product version plus the session DB
|
||||
* file fingerprint, so any release that changes query logic, and any import /
|
||||
* incremental import / member edit, transparently invalidates entries.
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@
|
||||
* Any write to the chat DB (import, incremental import, member merge/rename,
|
||||
* owner change, summary generation) changes the file and thus the fingerprint,
|
||||
* forcing a recompute. This makes the cache self-validating even across
|
||||
* processes — e.g. when `chatlab start` is serving while a separate
|
||||
* `chatlab import` mutates the same database file.
|
||||
* processes — e.g. when `clb web` is serving while a separate
|
||||
* `clb import` mutates the same database file.
|
||||
*/
|
||||
|
||||
import * as fs from 'fs'
|
||||
|
||||
Reference in new issue
Block a user