Skip to content

release: 合并 v0.1.2(CodeBuddy 采集与体验) - #1

Merged
CodeHourra merged 5 commits into
masterfrom
release/v0.1.2
Mar 22, 2026
Merged

CodeHourra merged 5 commits into
masterfrom
release/v0.1.2

Conversation

@CodeHourra

@CodeHourra CodeHourra commented Mar 22, 2026 •

Copy link
Copy Markdown
Owner

摘要

  • 合并 release/v0.1.2 至 master,包含 CodeBuddy 采集、CHANGELOG 与 CI 配置等。
  • 合并后可在 master 上打 tag v0.1.2(若 tag 已指向本分支提交,可跳过或移动 tag,见下方说明)。

CI

本 PR 附带 .github/workflows/ci.yml(PR/master 构建检查)与 release.yml(推送 v*.*.* tag 时创建 GitHub Release)。

合并后建议

  1. 合并本 PR。
  2. 若尚未存在远端 tag:git tag v0.1.2 <merge-commit> 并 git push origin v0.1.2。

Made with Cursor


Note

Medium Risk
Adds a new CodeBuddy ingestion path, config auto-migration, and additional session metadata persisted to SQLite, which can impact sync correctness and how sessions are displayed. CI/release workflow additions are low risk but will affect repo automation on PRs/tags.

Overview
Adds CodeBuddy (CodeBuddyExtension) conversation import end-to-end: a new Rust collector that scans extension directories, parses index.json + messages/*.json (including legacy formats), derives project grouping, and emits an analysis_title for better pre-analysis display.

Plumbs analysis_title through normalization → scheduler → SQLite writes/updates (new insert arg and update_session_resync_metadata), and updates the UI to prefer this title in list/detail (and adjusts tool tag parsing to support broader tool names).

Updates config handling to include a default disabled codebuddy-cli source, auto-append it on upgrade, and migrate old ~/.codebuddy scan paths on load/save; adds docs/changelogs, bumps app versions to 0.1.2, and introduces GitHub Actions CI + tag-based Release workflows.

Written by Cursor Bugbot for commit a8cc873. This will update automatically on new commits. Configure here.

stevelliu and others added 4 commits March 22, 2026 19:58
- 新增 codebuddy_cli 采集器:扫描 ~/.codebuddy/projects 下 JSONL
- 配置默认第三源 codebuddy-cli(默认关闭),旧配置启动时自动补全
- 设置页说明与 CHANGELOG、app-changelog 同步

关联计划:docs/plans/2026-03-22-v0.1.2-tasks.md

Made-with: Cursor
- 重写 codebuddy.rs:从 CodeBuddyExtension/Data 下递归扫描会话叶目录,
  解析 index.json + messages/*.json,支持多种消息内容格式(字符串/text块/旧版数组)
- 删除旧版 codebuddy_cli.rs(基于 ~/.codebuddy JSONL 的方案已废弃)
- config.rs:默认扫描路径改为 CodeBuddyExtension 根目录(macOS/Linux),
  启动时自动迁移 ~/.codebuddy 旧路径并写回 config.toml
- sessions 表新增 analysis_title 字段,采集阶段即可提供可读标题
- 前端:SessionCard/SessionDetailView 优先展示 analysisTitle,
  ChatReplay 工具名正则兼容含 _/./ - 等字符
- SettingsModal:n-switch 使用受控值避免状态不同步
- CHANGELOG 整合 v0.1.1/0.1.2 并新增 v0.1.3 说明
- 新增文档:CodeBuddy 会话记录提取逻辑、SQLite 数据模型

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 将版本号更新至 0.1.2,新增 CodeBuddy 数据源支持及配置迁移功能
- 优化会话分组和对话回放体验
- 修正 CodeBuddy 存储路径对齐问题,确保兼容旧版数据
- 整理并更新文档,确保用户了解新功能和修复内容

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

session.project_path.as_deref(),
session.project_name.as_deref(),
session.analysis_title.as_deref(),
)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resync overwrites analysis title with NULL for non-CodeBuddy sources

Medium Severity

When a Claude Code or Cursor session gains new messages and triggers a resync, update_session_resync_metadata unconditionally sets analysis_title to the value from NormalizedSession.analysis_title, which is always None for these sources. This overwrites any analysis_title previously written by update_session_analysis_meta during the analysis step (used for low/none-value sessions). The SQL UPDATE ... SET analysis_title = ?4 with a NULL parameter destroys the stored title. The previous code only called update_session_message_count, which did not touch analysis_title.

Additional Locations (1)
Fix in Cursor Fix in Web

continue;
}
let text = fs::read_to_string(&msg_file).ok()?;
let raw: Value = serde_json::from_str(&text).ok()?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early return in loop prevents checking subsequent user messages

Low Severity

In try_extract_project_from_first_user_message, the .ok()? calls on fs::read_to_string and serde_json::from_str propagate None out of the entire function rather than continuing the loop. If a single message file is unreadable or has malformed JSON, the function returns None instead of trying subsequent user messages, causing the session to lose its project path and name unnecessarily.

Fix in Cursor Fix in Web

…ends None

- Updated `update_session_resync_metadata` to use COALESCE for analysis_title, preventing it from being overwritten with NULL during resync.
- Added tests to ensure that existing analysis_title is retained when None is provided, and updated when a valid title is sent.
- Documented the issue and solution in a new markdown file to clarify the behavior and prevent future regressions.
@cursor

cursor Bot commented Mar 22, 2026

Copy link
Copy Markdown

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@CodeHourra
CodeHourra merged commit 6e8a526 into master Mar 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant