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
57 changes: 36 additions & 21 deletions Cargo.lock

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

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ owhisper-config = { path = "owhisper/owhisper-config", package = "owhisper-confi
owhisper-interface = { path = "owhisper/owhisper-interface", package = "owhisper-interface" }
owhisper-model = { path = "owhisper/owhisper-model", package = "owhisper-model" }

tauri = "2.7"
tauri-build = "2.3"
tauri = "2.8"
tauri-build = "2.4"
tauri-nspanel = { git = "https://github.com/ahkohd/tauri-nspanel", branch = "v2" }
tauri-plugin = "2.3"
tauri-plugin = "2.4"
tauri-plugin-clipboard-manager = "2.3"
tauri-plugin-deep-link = "2.4"
tauri-plugin-dialog = "2.3"
Expand All @@ -97,6 +97,7 @@ tauri-plugin-http = { version = "2.5", features = ["unsafe-headers"] }
tauri-plugin-keygen = { git = "https://github.com/bagindo/tauri-plugin-keygen", branch = "v2" }
tauri-plugin-machine-uid = "0.1.1"
tauri-plugin-opener = "2.5"
tauri-plugin-sentry = { version = "0.4.1" }
tauri-plugin-shell = "2.3"
tauri-plugin-store = "2.4"

Expand All @@ -118,6 +119,7 @@ tauri-plugin-sse = { path = "plugins/sse" }
tauri-plugin-store2 = { path = "plugins/store2" }
tauri-plugin-task = { path = "plugins/task" }
tauri-plugin-template = { path = "plugins/template" }
tauri-plugin-tracing = { path = "plugins/tracing" }
tauri-plugin-tray = { path = "plugins/tray" }
tauri-plugin-webhook = { path = "plugins/webhook" }
tauri-plugin-windows = { path = "plugins/windows" }
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@hypr/plugin-task": "workspace:^",
"@hypr/plugin-template": "workspace:^",
"@hypr/plugin-windows": "workspace:^",
"@hypr/plugin-tracing": "workspace:^",
"@hypr/tiptap": "workspace:^",
"@hypr/ui": "workspace:^",
"@hypr/utils": "workspace:^",
Expand Down
15 changes: 7 additions & 8 deletions apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,30 @@ tauri-plugin-sse = { workspace = true }
tauri-plugin-store2 = { workspace = true }
tauri-plugin-task = { workspace = true }
tauri-plugin-template = { workspace = true }
tauri-plugin-tracing = { workspace = true }
tauri-plugin-tray = { workspace = true }
tauri-plugin-webhook = { workspace = true }
tauri-plugin-windows = { workspace = true }

tauri = { workspace = true, features = ["specta", "macos-private-api"] }
tauri-plugin-autostart = "2"
tauri-plugin-autostart = "2.5"
tauri-plugin-clipboard-manager = { workspace = true }
tauri-plugin-deep-link = { workspace = true }
tauri-plugin-dialog = { workspace = true }
tauri-plugin-fs = { workspace = true, features = ["watch"] }
tauri-plugin-global-shortcut = "2"
tauri-plugin-global-shortcut = "2.3"
tauri-plugin-http = { workspace = true }
tauri-plugin-keygen = { workspace = true }
tauri-plugin-os = "2"
tauri-plugin-os = "2.3"
tauri-plugin-prevent-default = { version = "1.2", features = ["unstable-windows"] }
tauri-plugin-process = "2"
tauri-plugin-sentry = { version = "0.4.1", features = ["tracing"] }
tauri-plugin-process = "2.3"
tauri-plugin-sentry = { workspace = true, features = ["tracing"] }
tauri-plugin-shell = { workspace = true }
tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
tauri-plugin-store = { workspace = true }
tauri-plugin-updater = "2"
tauri-plugin-window-state = "2"
tauri-plugin-updater = "2.9"

tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "chrono"] }

specta = { workspace = true }
specta-typescript = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
{ "url": "http://**" }
]
},
"dialog:allow-save"
"dialog:allow-save",
"tracing:default"
]
}
18 changes: 1 addition & 17 deletions apps/desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,10 @@ use store::*;
use tauri_plugin_opener::OpenerExt;
use tauri_plugin_windows::{HyprWindow, WindowsPluginExt};

use tracing_subscriber::{
fmt, prelude::__tracing_subscriber_SubscriberExt, util::SubscriberInitExt, EnvFilter,
};

#[tokio::main]
pub async fn main() {
tauri::async_runtime::set(tokio::runtime::Handle::current());

{
let env_filter = EnvFilter::try_from_default_env()
.unwrap_or_else(|_| EnvFilter::new("info"))
.add_directive("ort=warn".parse().unwrap());

tracing_subscriber::Registry::default()
.with(fmt::layer())
.with(env_filter)
.with(tauri_plugin_sentry::sentry::integrations::tracing::layer())
.init();
}

let sentry_client = tauri_plugin_sentry::sentry::init((
{
#[cfg(not(debug_assertions))]
Expand Down Expand Up @@ -76,6 +60,7 @@ pub async fn main() {
.plugin(tauri_plugin_sse::init())
.plugin(tauri_plugin_misc::init())
.plugin(tauri_plugin_db::init())
.plugin(tauri_plugin_tracing::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_store::Builder::default().build())
.plugin(tauri_plugin_store2::init())
Expand All @@ -93,7 +78,6 @@ pub async fn main() {
.plugin(tauri_plugin_obsidian::init())
.plugin(tauri_plugin_sfx::init())
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_window_state::Builder::default().build())
.plugin(tauri_plugin_deep_link::init())
.plugin(tauri_plugin_auth::init())
.plugin(tauri_plugin_clipboard_manager::init())
Expand Down
42 changes: 29 additions & 13 deletions apps/desktop/src/components/settings/views/help-feedback.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
import { Trans } from "@lingui/react/macro";
import { openUrl } from "@tauri-apps/plugin-opener";
import { openPath, openUrl } from "@tauri-apps/plugin-opener";
import { Book, Bug, ExternalLinkIcon, MessageSquare } from "lucide-react";

import { commands as tracingCommands } from "@hypr/plugin-tracing";

export default function HelpFeedback() {
const handleOpenFeedback = () => {
openUrl("https://hyprnote.canny.io/feature-requests");
};

const handleOpenDocs = () => {
// You can update this URL to your actual documentation
openUrl("https://hyprnote.com/docs");
openUrl("https://docs.hyprnote.com");
};

const handleReportBug = () => {
// You can update this URL to your bug reporting page
openUrl("https://hyprnote.canny.io/bugs");
};

const handleOpenLogs = () => {
tracingCommands.logsDir().then((logsDir) => {
openPath(logsDir);
});
};

return (
<div className="space-y-6">
<div>
Expand Down Expand Up @@ -81,16 +87,26 @@ export default function HelpFeedback() {
</div>
<ExternalLinkIcon className="h-4 w-4 text-gray-400" />
</button>
</div>
</div>

<div className="pt-6 border-t">
<h3 className="text-sm font-medium text-gray-700 mb-2">
<Trans>About</Trans>
</h3>
<p className="text-sm text-gray-500">
<Trans>Hyprnote - Your intelligent note-taking companion</Trans>
</p>
{/* Logs */}
<button
onClick={handleOpenLogs}
className="w-full flex items-center justify-between p-4 bg-white rounded-lg border hover:bg-gray-50 transition-colors"
>
<div className="flex items-center gap-3">
<Bug className="h-5 w-5 text-gray-600" />
<div className="text-left">
<div className="font-medium">
<Trans>Logs</Trans>
</div>
<div className="text-sm text-gray-500">
<Trans>View logs</Trans>
</div>
</div>
</div>
<ExternalLinkIcon className="h-4 w-4 text-gray-400" />
</button>
</div>
</div>
</div>
);
Expand Down
2 changes: 2 additions & 0 deletions crates/detect/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub struct InstalledApp {
pub bundle_path: String,
}

#[cfg(target_os = "macos")]
pub fn list_installed_apps() -> Vec<InstalledApp> {
let app_dirs = [
"/Applications",
Expand Down Expand Up @@ -43,6 +44,7 @@ pub fn list_installed_apps() -> Vec<InstalledApp> {
apps
}

#[cfg(target_os = "macos")]
fn get_app_info(app_path: &std::path::Path) -> Option<InstalledApp> {
let info_plist_path = app_path.join("Contents/Info.plist");

Expand Down
2 changes: 1 addition & 1 deletion crates/whisper-local/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl Whisper {
.join(" ");

if !full_text.is_empty() {
tracing::info!(text = ?full_text, "transcribe_completed");
tracing::info!(text_length = full_text.len(), "transcribe_completed");
self.dynamic_prompt = full_text;
}

Expand Down
17 changes: 17 additions & 0 deletions plugins/tracing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/.vs
.DS_Store
.Thumbs.db
*.sublime*
.idea/
debug.log
package-lock.json
.vscode/settings.json
yarn.lock

/.tauri
/target
Cargo.lock
node_modules/

dist-js
dist
30 changes: 30 additions & 0 deletions plugins/tracing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "tauri-plugin-tracing"
version = "0.1.0"
authors = ["You"]
edition = "2021"
exclude = ["/js", "/node_modules"]
links = "tauri-plugin-tracing"
description = ""

[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }

[dev-dependencies]
specta-typescript = { workspace = true }

[dependencies]
tauri = { workspace = true, features = ["tray-icon", "image-png"] }
tauri-specta = { workspace = true, features = ["derive", "typescript"] }

tauri-plugin-sentry = { workspace = true, features = ["tracing"] }

dirs = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
specta = { workspace = true, features = ["derive"] }
thiserror = { workspace = true }

tracing = { workspace = true }
tracing-appender = { version = "0.2" }
tracing-subscriber = { workspace = true, features = ["env-filter", "chrono"] }
5 changes: 5 additions & 0 deletions plugins/tracing/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const COMMANDS: &[&str] = &["logs_dir"];

fn main() {
tauri_plugin::Builder::new(COMMANDS).build();
}
Loading
Loading