Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).

## [0.7.7] - 2026-07-27

### Added
- Workspace: auto-refresh file tree on external changes (recursive directory watcher with 500ms debounce, matching Obsidian's behavior)
- Preview: in-app image/PDF preview using Tauri asset protocol (ImagePreview with zoom/pan, PdfPreview component)
- File tree: show non-markdown files (images, PDFs, etc.) in sidebar
- Editor: image attachment persistence with configurable attachment folder
- Chat: render tool calls chronologically and improve visual hierarchy
- Discovery: LLM-assisted candidate confirmation (Spec 11)

### Changed
- Refactor (tauri): split `lib.rs` into domain modules (`workspace_init`, `workspace_files`, `workspace_watchers`, `thought_commands`, `discovery_commands`), reducing it from 2528 to 528 lines (under the 800-line threshold)
- macOS: increase spacing between traffic lights and sidebar toggle

### Fixed
- Editor: remove excessive `min-height` (10rem) on code blocks in markdown editor that caused large blank areas for single-line snippets
- AI: preserve conversation state across sidebar view switches (keep `AiConversationSessionProvider` and `RightPanelShell` mounted with `display:none` so streaming listeners and message state survive navigation)
- Chat: open links in system browser instead of crashing the webview
- macOS: re-center traffic lights in toolbar (y: 15 → 18)

## [0.7.6] - 2026-07-15

### Added
Expand Down
14 changes: 12 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "knowforge",
"private": true,
"version": "0.7.6",
"version": "0.7.7",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -27,6 +27,7 @@
"@milkdown/utils": "^7.20.0",
"@tauri-apps/api": "~2.11.0",
"@tauri-apps/plugin-dialog": "~2.7.0",
"@tauri-apps/plugin-opener": "~2.5.0",
"d3-force": "^3.0.0",
"github-slugger": "^2.0.0",
"i18next": "^26.0.4",
Expand Down
62 changes: 61 additions & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "knowforge"
version = "0.7.6"
version = "0.7.7"
description = "Knowforge desktop app"
authors = ["caichangqing"]
edition = "2024"
Expand All @@ -18,9 +18,10 @@ tauri-build = { version = "2.6", features = [] }

[dependencies]
# 与前端 @tauri-apps/api 保持同一 minor(Tauri CLI 会校验),勿只写 major=2 导致与 npm 漂移
tauri = { version = "2.11", features = ["macos-private-api"] }
tauri = { version = "2.11", features = ["macos-private-api", "protocol-asset"] }
tauri-plugin-dialog = "2.7"
tauri-plugin-notification = "2"
tauri-plugin-opener = "2.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
url = "2.5"
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"core:window:allow-start-dragging",
"core:window:allow-toggle-maximize",
"dialog:default",
"notification:default"
"notification:default",
"opener:default"
]
}
10 changes: 10 additions & 0 deletions src-tauri/src/ai_conversations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ struct PersistedMessageDisk {
skill_name: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
tool_calls: Option<Value>,
/// Ordered content blocks for chronological rendering (thinking -> tool call -> thinking -> ...)
#[serde(default, skip_serializing_if = "Option::is_none")]
content_blocks: Option<Value>,
}

/// 会话级「想法聚焦」上下文(磁盘与 LLM 字段对齐)
Expand Down Expand Up @@ -305,6 +308,9 @@ pub struct PersistedMessageIn {
pub skill_name: Option<String>,
#[serde(default)]
pub tool_calls: Option<Value>,
/// Ordered content blocks for chronological rendering (thinking -> tool call -> thinking -> ...)
#[serde(default)]
pub content_blocks: Option<Value>,
}

#[derive(Debug, Clone, Deserialize)]
Expand Down Expand Up @@ -365,6 +371,7 @@ fn validate_messages_for_save(msgs: &[PersistedMessageIn]) -> Result<Vec<Persist
skill_id: m.skill_id.clone(),
skill_name: m.skill_name.clone(),
tool_calls: m.tool_calls.clone(),
content_blocks: m.content_blocks.clone(),
});
}
Ok(out)
Expand Down Expand Up @@ -651,6 +658,7 @@ mod tests {
skill_id: None,
skill_name: None,
tool_calls: None,
content_blocks: None,
},
PersistedMessageIn {
id: "a1".to_string(),
Expand All @@ -661,6 +669,7 @@ mod tests {
skill_id: None,
skill_name: None,
tool_calls: None,
content_blocks: None,
},
],
set_as_active: Some(true),
Expand Down Expand Up @@ -691,6 +700,7 @@ mod tests {
skill_id: None,
skill_name: None,
tool_calls: None,
content_blocks: None,
}];
assert_eq!(compute_title_from_messages(&msgs), "New chat");
}
Expand Down
Loading