Commit Graph
816 Commits
Author SHA1 Message Date
diguaandCursor 886642c1a4 feat: split message view into type/time analysis tabs with enriched profile cards
Split the monolithic MessageView into two focused modules:
- TypeAnalysisView: type distribution, text depth analysis, length distributions
- TimeAnalysisView: hourly/weekday/monthly/yearly distributions, member trend, heatmap, calendar

Each tab has a redesigned narrative profile card with rich insights:
- TypeProfileCard: date range, total messages, non-text breakdown pills, 4 metric cards
- TimeProfileCard: active days narrative, time personality labels (multi-dimensional), 4 metric cards

Also: reduce responseLatency font size in RelationshipView for better readability.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 10:28:29 +08:00
diguaandClaude Sonnet 4.6 affb7a50e4 fix(daemon): quote ExecStart argv to handle paths with spaces on Linux
Wraps each argument in double quotes when building the systemd unit's
ExecStart= line, so installs under paths containing spaces (e.g. home
directories with spaces, nvm paths) no longer cause systemd to
mis-tokenize the command and fail to start the service.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:19:42 +08:00
diguaandCursor 969406915f feat(ai): add confirmation dialog before regenerating all session indexes
Warn users that regeneration will clear all existing AI summaries.
Uses the same UModal pattern as other confirmation dialogs in settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 14:19:42 +08:00
diguaandCursor fdb6d8f648 feat(import): update demo data sources to 4 files
Switch from 2 demo files (group + private) to 4 files:
- demo-group.json
- demo-private-A-cuilan.json
- demo-private-B-wukong.json
- demo-private-C-spider.json

Update DemoImportResult.privateSessionId to privateSessionIds array
to support multiple private chat demos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 14:19:42 +08:00
diguaandCursor b3c2b20a9f fix(ai): make message editing safe against data loss and stale state
- insertMessageAfter: update active_message_id when appending to tail
  so the new reply is on the active path after reload
- editAndOverwriteAll: add hasConfig + abort checks before
  deleteMessagesFrom to prevent data loss when LLM is unconfigured or
  a concurrent request starts
- editCurrentRoundOnly: defer all DB mutations until after stream
  completes; on abort/error only in-memory state is restored
- sync in-memory parentId after relinking so follow-up edits send the
  correct historyLeafMessageId

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 14:19:42 +08:00
digua ce1065e295 docs(api): rename API import to API push 2026-05-30 14:19:42 +08:00
digua e78c8f9368 feat(ai): add fork conversation UI button on AI replies 2026-05-30 14:19:42 +08:00
diguaandCursor 6224ca996e refactor(ai): replace branching with edit-and-regenerate model
Remove the message branching/tree system in favor of a simpler editing model:
- Default: edit a message and only regenerate the current round's AI response
- Optional: overwrite all subsequent messages when editing

Key changes:
- Backend: add updateMessageContent, deleteAndRelinkMessage, insertMessageAfter,
  deleteMessagesFrom, forkConversation; remove createMessageBranch, switchMessageBranch
- Platform layer: add IPC/HTTP handlers for new methods across Electron and CLI
- Frontend store: refactor editMessageAndRegenerate with two modes
- UI: replace branch navigation with "overwrite subsequent" checkbox,
  auto-resizing edit textarea
- Fix insertMessageAfter missing debug_context from pendingDebugContextMap
- Update tests to cover new editing methods

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 14:19:42 +08:00
CEQ151 d3c62c4f9d feat(ai): support editable message branches 2026-05-30 14:19:42 +08:00
digua 3a8f61fdf0 fix(cli): start web dev backend with start command 2026-05-30 14:19:42 +08:00
diguaandClaude Sonnet 4.6 0e03295258 feat(cli): add daemon mode via start --daemon, stop, and status commands
- Replace 6-subcommand daemon group with simpler top-level design:
  chatlab start --daemon  install as system service (launchd/systemd)
  chatlab stop            uninstall service and disable auto-start
  chatlab status          show resident service status
- Drop temporary background process layer; daemon = system service only
- Store port/host meta in ~/.chatlab/daemon.json for status display
- Fix --no-open description: Web UI still runs, only browser is suppressed
- Update quick-start docs (cn/en/tw) to reflect new commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:19:42 +08:00
diguaandClaude Sonnet 4.6 6cdc040ce8 feat(cli): replace serve/web commands with unified start command
- Add `chatlab start` with --headless (API-only) and --no-open flags
- Remove redundant `serve` and `web` commands
- Update fetch adapter comments to reference chatlab start
- Add chatlab start usage examples to quick-start docs (cn/en/tw)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:19:42 +08:00
digua 8e01121b7a release: v0.22.1 v0.22.1 2026-05-29 15:07:02 +08:00
diguaandClaude Opus 4.8 a653b5be6d docs: restructure docs nav and move quick-start under usage
- Move quick-start.md to usage/ across cn/en/tw
- Switch locale index pages from home to doc layout
- Add Baidu analytics script and adjust nav doc links

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:35:48 +08:00
digua 45dfa5026f fix(session-index): honor selected session IDs in CLI batch summary generation 2026-05-27 23:47:27 +08:00
digua 46204db9b8 fix(ai): revalidate credentials when base URL changes in openai-compat mode 2026-05-27 23:47:27 +08:00
digua 61380f53cc style(ui): optimize chat record list density and message bubble style 2026-05-27 23:47:27 +08:00
diguaandCursor 88ab0ae172 fix(ai): correct apiKeySet detection and prevent stale key reuse
- Fix apiKeySet reporting false positives for local no-key configs by
  resolving the actual key via resolveApiKey and excluding placeholders
- Prevent editing a config from reusing an incompatible API key when
  provider or connection mode has changed
- Pass summary strategy to single-session generation for consistency

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 23:47:27 +08:00
digua a9b8599417 refactor(i18n): move session index keys from storage to ai namespace 2026-05-27 23:47:27 +08:00
diguaandCursor 6faeee3042 fix(ui): make batch summary stop button respond immediately
Previously clicking stop would only take effect after the current LLM
request finished. Now the UI state updates instantly while the in-flight
request completes silently in the background.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 23:47:27 +08:00
diguaandCursor 6727ff609c feat(ai): add summary strategy with brief and standard detail levels
Support two summary strategies (brief/standard) for AI-generated session
summaries. Users can choose their preferred detail level in Settings > AI >
Session Index. Standard (default) produces richer summaries covering people,
events, and key details.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 23:47:27 +08:00
diguaandCursor eaff16d555 fix(cli): wire up batch summary generation in CLI Web to fix page freeze
- Implement generateSummary/checkCanGenerateSummary in FetchSessionIndexAdapter
  via existing HTTP endpoints instead of stubs that returned instantly
- Add checkCanGenerate service function in summary-service.ts
- Add POST /_web/sessions/:id/summaries/check-can-generate route

The page froze because stub methods returned synchronously, causing a tight
loop of hundreds of Vue reactive updates without any network delay.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 23:47:27 +08:00
diguaandCursor 63e101feb4 fix(cli): fix third-party service misidentified as local when editing in CLI Web
- Add apiKeySet field to GET /_web/ai/llm/configs response
- Allow saving in edit mode without re-entering API key when key already set
- Skip API key validation on save when editing with existing key unchanged
- Show edit-mode placeholder hint on API Key input
- Add missing customModels/disableThinking/isReasoningModel to CLI route types

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 23:47:27 +08:00
digua 1aee8133a3 release: v0.22.0 v0.22.0 2026-05-26 23:29:34 +08:00
digua bc3871c9b1 fix(settings): remove broken web update action 2026-05-26 23:19:47 +08:00
digua 8a54568cd4 style(ui): optimize sidebar density and enhance dark mode contrast for tab selectors 2026-05-26 23:19:47 +08:00
digua 3565cad5a9 feat(sidebar): add logo and update toggle icon to panel-right 2026-05-26 23:19:47 +08:00
digua d2c0edd389 fix(cli): continue web serve after data warning 2026-05-26 23:19:47 +08:00
digua 44e0517890 fix(home): restore shared quick start buttons 2026-05-26 23:19:47 +08:00
diguaandClaude Sonnet 4.6 7738b47ab7 refactor: migrate documentation links from chatlab.fun to docs.chatlab.fun
Update links pointing to documentation pages (usage guides, format specs,
troubleshooting, API docs) across README, source code, and i18n files to
use docs.chatlab.fun. Main site links (homepage, roadmap, community,
assets) remain unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 23:19:47 +08:00
digua c736fdc93b fix(cli): disable web self update execution 2026-05-26 23:19:47 +08:00
diguaandClaude Sonnet 4.6 5a524b8abf fix: correct i18n key path and replace deprecated ECharts api.style()
- ChatExplorer.vue: fix `ai.assistant.systemPrompt` → `ai.assistant.config.systemPrompt`
  (missing 'config' level in key path caused vue-i18n missing-key warnings)
- OverviewIdentityCard.vue: replace deprecated `api.style()` with
  `api.visual('color')` + literal style object (ECharts 6.x deprecation)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 23:19:47 +08:00
digua 8ae8ff6cda fix(cli): avoid shell for file manager actions 2026-05-26 23:19:47 +08:00
digua 19a45f9e5f fix: protect self update and migration retry 2026-05-26 23:19:47 +08:00
diguaandClaude Sonnet 4.6 e05016c512 refactor(settings): move session index to AI settings and reorder tabs
Move SessionIndexSection from StorageTab to AISettingsTab (placed above
export settings), rename label from "会话管理" to "会话索引" across all
locales, swap automation tab before data management tab, and simplify
StorageTab by removing its now-unnecessary SubTabs navigation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 23:19:47 +08:00
diguaandClaude Sonnet 4.6 10a2677d74 feat(home): refactor import area and add API/auto-sync import methods
Restructure import components into dedicated import/ directory with new
ImportTabSelector, ApiImportCard, and AutoSyncCard components. Add demo
import, entry animation, and tutorial links to home page. Update i18n
translations for all locales. Add chatApi init guard in registry and
defaultPath to DataDirInfo preload interface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 23:19:47 +08:00
diguaandCursor 6c3d36e7df feat(ai): upgrade pi-ai from @mariozechner 0.54 to @earendil-works 0.74
- Replace @mariozechner/pi-ai and pi-agent-core with @earendil-works scope
- Adapt to AgentTool.execute() params type change (Record → unknown)
- Migrate Agent constructor to use initialState for systemPrompt/tools/messages
- Update onPayload callback signature to include model parameter
- Filter finalMessages with isPiMessage() for new AgentMessage union type
- Use state.errorMessage instead of deprecated state.error

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 23:19:47 +08:00
diguaandCursor 0ba9ae04a6 chore: migrate workspace packages to ESM
- Add "type": "module" to all workspace package.json files
- Replace __dirname with import.meta.url-based resolveCliPath() helper
- Convert stream-json/stream-chain CJS named imports to default + destructure
  for ESM compatibility
- Use createRequire() for @node-rs/jieba native module loading in ESM context

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 23:19:47 +08:00
digua 83151fd8e7 fix(cli): improve update checker with async cache, keypress UX, and dev bypass 2026-05-26 23:19:47 +08:00
digua a105d7ab8e feat(cli): implement update checking and auto-update for CLI and CLI Web 2026-05-26 23:19:47 +08:00
diguaandCursor 1a35d2bb9a fix(cli): add merge API shims for CLI Web batch manage
CLI Web was missing chatApi.exportSessionsToTempFiles,
chatApi.cleanupTempExportFiles and the entire mergeApi shim,
causing "not a function" errors when merging sessions in
Settings > Data Management.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 23:19:47 +08:00
diguaandCursor 6ec03d330f fix(electron): prevent unified migration from reverting data dir changes
The unified directory migration (needsUnifiedDirMigration) would
re-trigger after a user changed their data directory, overwriting
config.toml back to the old Electron path.

Root cause: no persistent flag tracking whether the migration had
already completed. If old databases remained (cleanup failure or
timing), it would re-detect and re-run.

Fix:
- Add `electron_migration_done` flag to config.toml [data] section
- Set flag after migrateToUnifiedDirs succeeds and in setCustomDataDir
- Check flag at start of needsUnifiedDirMigration to skip if done
- Add "migrate to default" button when data is at non-default path
- Fix NLP directory path: move from userDataDir to systemDir (~/.chatlab/nlp)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 23:19:47 +08:00
diguaandCursor 8819dff62c feat(cli): implement storage management for CLI Web
CLI Web's Settings > Storage Management was completely non-functional
(stub cacheApi returning empty data). This adds real HTTP endpoints
and wires the frontend to use them.

Backend (cache.ts):
- GET /_web/cache/info — scan databases/ai/cache/logs directory sizes
- POST /_web/cache/clear — clear cache or logs directory (allowlist)
- POST /_web/cache/open-dir — open directory in system file manager
- GET /_web/cache/data-dir — return current data directory path
- GET /_web/cache/latest-import-log — find latest import log file

Frontend:
- Replace cacheApi stubs with real HTTP calls in registry.ts
- Hide data directory migration UI in CLI Web (IS_ELECTRON guard)
- Add "Open Root Dir" button for ~/.chatlab/ in header area

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 23:19:47 +08:00
digua 9e88dcbd09 feat(changelog): bundle changelogs locally 2026-05-26 23:19:47 +08:00
digua ab90e06089 chore(docs): isolate docs workspace dependencies 2026-05-23 23:59:40 +08:00
digua 7a6d0e9586 docs: restructure public documentation site 2026-05-23 23:38:02 +08:00
digua c8d218251d feat(docs): add standalone VitePress docs site 2026-05-23 23:38:02 +08:00
digua 2d714857ef chore(changelog): move release changelogs out of docs 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>
v0.21.1
2026-05-23 16:37:59 +08:00
diguaandClaude Sonnet 4.6 fa123bab49 fix: keep forced index modal open on generation failure
Move auto-close logic from finally to success path so the modal
remains open for retry when generate() fails in force mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 16:28:50 +08:00