Skip to content
Closed
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exclude = [
"apps/api",
"apps/bot",
"apps/web",
"plugins/cli2",
"plugins/db",
"plugins/export",
]
Expand Down
1 change: 0 additions & 1 deletion apps/desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ mod supervisor;
use ext::*;
use store::*;

use tauri::Manager;
use tauri_plugin_permissions::{Permission, PermissionsPluginExt};
use tauri_plugin_windows::{AppWindow, WindowsPluginExt};

Expand Down
2 changes: 1 addition & 1 deletion crates/analytics/src/posthog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl PosthogClient {
distinct_id: &str,
payload: &PropertiesPayload,
) -> Result<(), Error> {
let mut e = Event::new("$set", &distinct_id.to_string());
let mut e = Event::new("$set", distinct_id);
e.set_timestamp(chrono::Utc::now().naive_utc());

if !payload.set.is_empty() {
Expand Down
8 changes: 3 additions & 5 deletions crates/tiptap/src/from_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ fn unescape_markdown(md: &str) -> String {
let mut chars = md.chars().peekable();

while let Some(c) = chars.next() {
if c == '\\' {
if let Some(&next) = chars.peek() {
if is_markdown_escapable(next) {
if c == '\\'
&& let Some(&next) = chars.peek()
&& is_markdown_escapable(next) {
result.push(next);
chars.next();
continue;
}
}
}
result.push(c);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn sanitize_filename(name: &str) -> String {
.to_string()
}

fn group_by_session_id<'a, T, F>(items: &'a [T], get_id: F) -> HashMap<&'a str, Vec<&'a T>>
fn group_by_session_id<T, F>(items: &[T], get_id: F) -> HashMap<&str, Vec<&T>>
where
F: Fn(&T) -> &str,
{
Expand Down Expand Up @@ -138,14 +138,13 @@ fn collect_session_ops(base_dir: &Path, data: &Collection) -> Result<Vec<FileOp>
});

// transcript.json (if exists)
if let Some(transcripts) = transcripts.get(sid) {
if let Some(t) = transcripts.first() {
if let Some(transcripts) = transcripts.get(sid)
&& let Some(t) = transcripts.first() {
ops.push(FileOp::Write {
path: dir.join(files::TRANSCRIPT),
content: build_transcript_json(t),
});
}
}

// _memo.md (if user has notes)
ops.extend(build_memo_op(&dir, session));
Expand Down
7 changes: 3 additions & 4 deletions plugins/fs-db/src/migrations/v1_0_2_nightly_1_from_v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn sanitize_filename(name: &str) -> String {
.to_string()
}

fn group_by_session_id<'a, T, F>(items: &'a [T], get_id: F) -> HashMap<&'a str, Vec<&'a T>>
fn group_by_session_id<T, F>(items: &[T], get_id: F) -> HashMap<&str, Vec<&T>>
where
F: Fn(&T) -> &str,
{
Expand Down Expand Up @@ -135,14 +135,13 @@ fn collect_session_ops(base_dir: &Path, data: &Collection) -> Result<Vec<FileOp>
content: build_meta_json(session, session_participants, &session_tags),
});

if let Some(transcripts) = transcripts.get(sid) {
if let Some(t) = transcripts.first() {
if let Some(transcripts) = transcripts.get(sid)
&& let Some(t) = transcripts.first() {
ops.push(FileOp::Write {
path: dir.join(files::TRANSCRIPT),
content: build_transcript_json(t),
});
}
}

ops.extend(build_memo_op(&dir, session));

Expand Down
11 changes: 4 additions & 7 deletions plugins/fs-db/src/version/macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ pub fn parse(name: &str) -> Version {

let mut version_str = format!("{major}.{minor}.{patch}");

if let Some(&tag) = parts.get(3) {
if PRERELEASE_TAGS.contains(&tag) {
if let Some(&num) = parts.get(4) {
if num.chars().all(|c| c.is_ascii_digit()) {
if let Some(&tag) = parts.get(3)
&& PRERELEASE_TAGS.contains(&tag)
&& let Some(&num) = parts.get(4)
&& num.chars().all(|c| c.is_ascii_digit()) {
version_str.push_str(&format!("-{tag}.{num}"));
}
}
}
}

version_str.parse().unwrap()
}
Expand Down
5 changes: 2 additions & 3 deletions plugins/listener/src/actors/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,8 @@ fn sync_file(path: &std::path::Path) {
}

fn sync_dir(path: &std::path::Path) {
if let Some(parent) = path.parent() {
if let Ok(dir) = File::open(parent) {
if let Some(parent) = path.parent()
&& let Ok(dir) = File::open(parent) {
let _ = dir.sync_all();
}
}
}