refactor: format and adjust log levels

This commit is contained in:
sxyazi 2023-10-23 16:07:08 +08:00
parent 52e0746f30
commit bfc1dcb4f6
No known key found for this signature in database
43 changed files with 66 additions and 75 deletions

View File

@ -1,9 +1,9 @@
use std::{env, path::{Path, PathBuf}, sync::atomic::{AtomicBool, Ordering}}; use std::{env, path::{Path, PathBuf}, sync::atomic::{AtomicBool, Ordering}};
use anyhow::{anyhow, Result}; use anyhow::{anyhow, Result};
use yazi_config::PREVIEW;
use ratatui::prelude::Rect; use ratatui::prelude::Rect;
use tokio::{fs, sync::mpsc::UnboundedSender}; use tokio::{fs, sync::mpsc::UnboundedSender};
use yazi_config::PREVIEW;
use yazi_shared::RoCell; use yazi_shared::RoCell;
use super::{Iterm2, Kitty}; use super::{Iterm2, Kitty};

View File

@ -1,9 +1,9 @@
use std::{path::Path, sync::Arc}; use std::{path::Path, sync::Arc};
use anyhow::Result; use anyhow::Result;
use yazi_config::PREVIEW;
use image::{imageops::FilterType, DynamicImage, ImageFormat}; use image::{imageops::FilterType, DynamicImage, ImageFormat};
use tokio::fs; use tokio::fs;
use yazi_config::PREVIEW;
use yazi_shared::Term; use yazi_shared::Term;
pub struct Image; pub struct Image;

View File

@ -34,7 +34,7 @@ unicode-width = "^0"
yazi-prebuild = "^0" yazi-prebuild = "^0"
# Logging # Logging
tracing = "^0" tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] }
[target."cfg(windows)".dependencies] [target."cfg(windows)".dependencies]
clipboard-win = "^4" clipboard-win = "^4"

View File

@ -1,6 +1,6 @@
use yazi_config::keymap::KeymapLayer;
use crossterm::terminal::WindowSize; use crossterm::terminal::WindowSize;
use ratatui::prelude::Rect; use ratatui::prelude::Rect;
use yazi_config::keymap::KeymapLayer;
use yazi_shared::Term; use yazi_shared::Term;
use crate::{help::Help, input::Input, manager::Manager, select::Select, tasks::Tasks, which::Which, Position}; use crate::{help::Help, input::Input, manager::Manager, select::Select, tasks::Tasks, which::Which, Position};

View File

@ -1,9 +1,9 @@
use std::{collections::BTreeMap, ffi::OsString}; use std::{collections::BTreeMap, ffi::OsString};
use anyhow::Result; use anyhow::Result;
use yazi_config::{keymap::{Exec, KeymapLayer}, open::Opener};
use crossterm::event::KeyEvent; use crossterm::event::KeyEvent;
use tokio::sync::{mpsc::{self, UnboundedSender}, oneshot}; use tokio::sync::{mpsc::{self, UnboundedSender}, oneshot};
use yazi_config::{keymap::{Exec, KeymapLayer}, open::Opener};
use yazi_shared::{InputError, RoCell, Url}; use yazi_shared::{InputError, RoCell, Url};
use super::{files::FilesOp, input::InputOpt, select::SelectOpt}; use super::{files::FilesOp, input::InputOpt, select::SelectOpt};

View File

@ -1,7 +1,7 @@
use std::path::Path; use std::path::Path;
use yazi_config::PREVIEW;
use tokio::process::Command; use tokio::process::Command;
use yazi_config::PREVIEW;
use yazi_shared::PeekError; use yazi_shared::PeekError;
pub async fn ffmpegthumbnailer(src: &Path, dest: &Path, skip: usize) -> Result<(), PeekError> { pub async fn ffmpegthumbnailer(src: &Path, dest: &Path, skip: usize) -> Result<(), PeekError> {

View File

@ -1,9 +1,9 @@
use std::{path::Path, process::Stdio}; use std::{path::Path, process::Stdio};
use anyhow::Result; use anyhow::Result;
use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command};
use yazi_config::PREVIEW; use yazi_config::PREVIEW;
use yazi_shared::PeekError; use yazi_shared::PeekError;
use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command};
pub async fn jq(path: &Path, skip: usize, limit: usize) -> Result<String, PeekError> { pub async fn jq(path: &Path, skip: usize, limit: usize) -> Result<String, PeekError> {
let mut child = Command::new("jq") let mut child = Command::new("jq")

View File

@ -3,8 +3,8 @@ use std::path::Path;
use anyhow::anyhow; use anyhow::anyhow;
use serde::Deserialize; use serde::Deserialize;
use serde_json::Value; use serde_json::Value;
use yazi_shared::PeekError;
use tokio::process::Command; use tokio::process::Command;
use yazi_shared::PeekError;
#[derive(Debug)] #[derive(Debug)]
pub enum LsarAttr { pub enum LsarAttr {

View File

@ -1,9 +1,9 @@
use std::{path::Path, sync::Arc}; use std::{path::Path, sync::Arc};
use yazi_adaptor::Image;
use regex::Regex; use regex::Regex;
use yazi_shared::PeekError;
use tokio::process::Command; use tokio::process::Command;
use yazi_adaptor::Image;
use yazi_shared::PeekError;
pub async fn pdftoppm(src: &Path, dest: impl AsRef<Path>, skip: usize) -> Result<(), PeekError> { pub async fn pdftoppm(src: &Path, dest: impl AsRef<Path>, skip: usize) -> Result<(), PeekError> {
let output = Command::new("pdftoppm") let output = Command::new("pdftoppm")

View File

@ -1,8 +1,8 @@
use std::process::Stdio; use std::process::Stdio;
use anyhow::Result; use anyhow::Result;
use yazi_shared::Url;
use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command, sync::mpsc::{self, UnboundedReceiver}}; use tokio::{io::{AsyncBufReadExt, BufReader}, process::Command, sync::mpsc::{self, UnboundedReceiver}};
use yazi_shared::Url;
use crate::files::File; use crate::files::File;

View File

@ -1,8 +1,8 @@
use std::process::Stdio; use std::process::Stdio;
use anyhow::Result; use anyhow::Result;
use yazi_shared::Url;
use tokio::{process::Command, sync::oneshot::{self, Receiver}}; use tokio::{process::Command, sync::oneshot::{self, Receiver}};
use yazi_shared::Url;
pub struct ZoxideOpt { pub struct ZoxideOpt {
pub cwd: Url, pub cwd: Url,

View File

@ -1,8 +1,8 @@
use std::{borrow::Cow, collections::BTreeMap, ffi::OsStr, fs::Metadata}; use std::{borrow::Cow, collections::BTreeMap, ffi::OsStr, fs::Metadata};
use anyhow::Result; use anyhow::Result;
use yazi_shared::Url;
use tokio::fs; use tokio::fs;
use yazi_shared::Url;
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct File { pub struct File {

View File

@ -1,9 +1,9 @@
use std::{collections::{BTreeMap, BTreeSet}, mem, ops::Deref, sync::atomic::Ordering}; use std::{collections::{BTreeMap, BTreeSet}, mem, ops::Deref, sync::atomic::Ordering};
use anyhow::Result; use anyhow::Result;
use tokio::{fs, select, sync::mpsc::{self, UnboundedReceiver}};
use yazi_config::{manager::SortBy, MANAGER}; use yazi_config::{manager::SortBy, MANAGER};
use yazi_shared::Url; use yazi_shared::Url;
use tokio::{fs, select, sync::mpsc::{self, UnboundedReceiver}};
use super::{File, FilesSorter, FILES_TICKET}; use super::{File, FilesSorter, FILES_TICKET};

View File

@ -1,6 +1,6 @@
use unicode_width::UnicodeWidthStr;
use yazi_config::{keymap::{Control, Key, KeymapLayer}, KEYMAP}; use yazi_config::{keymap::{Control, Key, KeymapLayer}, KEYMAP};
use yazi_shared::Term; use yazi_shared::Term;
use unicode_width::UnicodeWidthStr;
use super::HELP_MARGIN; use super::HELP_MARGIN;
use crate::{emit, input::Input}; use crate::{emit, input::Input};

View File

@ -1,8 +1,8 @@
use std::{fs::File, io::BufReader, sync::OnceLock}; use std::{fs::File, io::BufReader, sync::OnceLock};
use anyhow::Result; use anyhow::Result;
use yazi_config::THEME;
use syntect::{dumps::from_uncompressed_data, highlighting::{Theme, ThemeSet}, parsing::SyntaxSet}; use syntect::{dumps::from_uncompressed_data, highlighting::{Theme, ThemeSet}, parsing::SyntaxSet};
use yazi_config::THEME;
static SYNTECT_SYNTAX: OnceLock<SyntaxSet> = OnceLock::new(); static SYNTECT_SYNTAX: OnceLock<SyntaxSet> = OnceLock::new();
static SYNTECT_THEME: OnceLock<Theme> = OnceLock::new(); static SYNTECT_THEME: OnceLock<Theme> = OnceLock::new();

View File

@ -1,10 +1,10 @@
use std::ops::Range; use std::ops::Range;
use yazi_config::keymap::Key;
use crossterm::event::KeyCode; use crossterm::event::KeyCode;
use yazi_shared::{CharKind, InputError};
use tokio::sync::mpsc::UnboundedSender; use tokio::sync::mpsc::UnboundedSender;
use unicode_width::UnicodeWidthStr; use unicode_width::UnicodeWidthStr;
use yazi_config::keymap::Key;
use yazi_shared::{CharKind, InputError};
use super::{mode::InputMode, op::InputOp, InputOpt, InputSnap, InputSnaps}; use super::{mode::InputMode, op::InputOp, InputOpt, InputSnap, InputSnaps};
use crate::{external, Position}; use crate::{external, Position};

View File

@ -1,7 +1,7 @@
use std::path::PathBuf; use std::path::PathBuf;
use yazi_shared::Url;
use tokio::fs::{self}; use tokio::fs::{self};
use yazi_shared::Url;
use crate::{emit, files::{File, FilesOp}, input::InputOpt, manager::Manager}; use crate::{emit, files::{File, FilesOp}, input::InputOpt, manager::Manager};

View File

@ -1,9 +1,9 @@
use std::{collections::BTreeSet, ffi::OsStr, io::{stdout, BufWriter, Write}, path::PathBuf}; use std::{collections::BTreeSet, ffi::OsStr, io::{stdout, BufWriter, Write}, path::PathBuf};
use anyhow::{anyhow, bail, Result}; use anyhow::{anyhow, bail, Result};
use tokio::{fs::{self, OpenOptions}, io::{stdin, AsyncReadExt, AsyncWriteExt}};
use yazi_config::{OPEN, PREVIEW}; use yazi_config::{OPEN, PREVIEW};
use yazi_shared::{max_common_root, Defer, Term, Url}; use yazi_shared::{max_common_root, Defer, Term, Url};
use tokio::{fs::{self, OpenOptions}, io::{stdin, AsyncReadExt, AsyncWriteExt}};
use crate::{emit, external::{self, ShellOpt}, files::{File, FilesOp}, input::InputOpt, manager::Manager, Event, BLOCKER}; use crate::{emit, external::{self, ShellOpt}, files::{File, FilesOp}, input::InputOpt, manager::Manager, Event, BLOCKER};

View File

@ -3,9 +3,9 @@ use std::{collections::BTreeSet, sync::Arc, time::Duration};
use indexmap::IndexMap; use indexmap::IndexMap;
use notify::{event::{MetadataKind, ModifyKind}, EventKind, RecommendedWatcher, RecursiveMode, Watcher as _Watcher}; use notify::{event::{MetadataKind, ModifyKind}, EventKind, RecommendedWatcher, RecursiveMode, Watcher as _Watcher};
use parking_lot::RwLock; use parking_lot::RwLock;
use yazi_shared::Url;
use tokio::{fs, pin, sync::mpsc::{self, UnboundedReceiver}}; use tokio::{fs, pin, sync::mpsc::{self, UnboundedReceiver}};
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
use yazi_shared::Url;
use crate::{emit, external, files::{File, Files, FilesOp}}; use crate::{emit, external, files::{File, Files, FilesOp}};

View File

@ -1,10 +1,10 @@
use std::{sync::atomic::Ordering, time::Duration}; use std::{sync::atomic::Ordering, time::Duration};
use tokio::{pin, task::JoinHandle};
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
use yazi_adaptor::ADAPTOR; use yazi_adaptor::ADAPTOR;
use yazi_config::MANAGER; use yazi_config::MANAGER;
use yazi_shared::{MimeKind, PeekError, Url, MIME_DIR}; use yazi_shared::{MimeKind, PeekError, Url, MIME_DIR};
use tokio::{pin, task::JoinHandle};
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
use super::{Provider, INCR}; use super::{Provider, INCR};
use crate::{emit, files::{Files, FilesOp}}; use crate::{emit, files::{Files, FilesOp}};

View File

@ -1,12 +1,12 @@
use std::{io::BufRead, path::Path, sync::atomic::{AtomicUsize, Ordering}}; use std::{io::BufRead, path::Path, sync::atomic::{AtomicUsize, Ordering}};
use yazi_adaptor::ADAPTOR;
use anyhow::anyhow; use anyhow::anyhow;
use yazi_config::{MANAGER, PREVIEW};
use futures::TryFutureExt; use futures::TryFutureExt;
use yazi_shared::{MimeKind, PeekError};
use syntect::{easy::HighlightFile, util::as_24_bit_terminal_escaped}; use syntect::{easy::HighlightFile, util::as_24_bit_terminal_escaped};
use tokio::fs; use tokio::fs;
use yazi_adaptor::ADAPTOR;
use yazi_config::{MANAGER, PREVIEW};
use yazi_shared::{MimeKind, PeekError};
use super::PreviewData; use super::PreviewData;
use crate::{external, highlighter}; use crate::{external, highlighter};

View File

@ -1,9 +1,9 @@
use std::time::Duration; use std::time::Duration;
use yazi_config::keymap::{Exec, KeymapLayer};
use yazi_shared::{Debounce, InputError};
use tokio::pin; use tokio::pin;
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt}; use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
use yazi_config::keymap::{Exec, KeymapLayer};
use yazi_shared::{Debounce, InputError};
use crate::{emit, input::InputOpt, tab::{Finder, FinderCase, Tab}}; use crate::{emit, input::InputOpt, tab::{Finder, FinderCase, Tab}};

View File

@ -1,5 +1,5 @@
use yazi_config::MANAGER;
use ratatui::layout::Rect; use ratatui::layout::Rect;
use yazi_config::MANAGER;
use yazi_shared::Url; use yazi_shared::Url;
use crate::{emit, files::{File, Files, FilesOp}, Step}; use crate::{emit, files::{File, Files, FilesOp}, Step};

View File

@ -1,10 +1,10 @@
use std::{ffi::OsStr, sync::Arc, time::Duration}; use std::{ffi::OsStr, sync::Arc, time::Duration};
use yazi_config::{open::Opener, TASKS};
use futures::{future::BoxFuture, FutureExt}; use futures::{future::BoxFuture, FutureExt};
use parking_lot::RwLock; use parking_lot::RwLock;
use yazi_shared::{unique_path, Throttle, Url};
use tokio::{fs, select, sync::{mpsc::{self, UnboundedReceiver}, oneshot}, time::sleep}; use tokio::{fs, select, sync::{mpsc::{self, UnboundedReceiver}, oneshot}, time::sleep};
use yazi_config::{open::Opener, TASKS};
use yazi_shared::{unique_path, Throttle, Url};
use super::{workers::{File, FileOpDelete, FileOpLink, FileOpPaste, FileOpTrash, Precache, PrecacheOpMime, PrecacheOpSize, Process, ProcessOpOpen}, Running, TaskOp, TaskStage, TasksProgress}; use super::{workers::{File, FileOpDelete, FileOpLink, FileOpPaste, FileOpTrash, Precache, PrecacheOpMime, PrecacheOpSize, Process, ProcessOpOpen}, Running, TaskOp, TaskStage, TasksProgress};
use crate::emit; use crate::emit;

View File

@ -1,11 +1,11 @@
use std::{collections::{BTreeMap, HashMap, HashSet}, ffi::OsStr, io::{stdout, Write}, path::Path, sync::Arc}; use std::{collections::{BTreeMap, HashMap, HashSet}, ffi::OsStr, io::{stdout, Write}, path::Path, sync::Arc};
use yazi_config::{manager::SortBy, open::Opener, OPEN};
use crossterm::terminal::{disable_raw_mode, enable_raw_mode}; use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
use serde::Serialize; use serde::Serialize;
use yazi_shared::{Defer, MimeKind, Term, Url};
use tokio::{io::{stdin, AsyncReadExt}, select, sync::mpsc, time}; use tokio::{io::{stdin, AsyncReadExt}, select, sync::mpsc, time};
use tracing::trace; use tracing::debug;
use yazi_config::{manager::SortBy, open::Opener, OPEN};
use yazi_shared::{Defer, MimeKind, Term, Url};
use super::{running::Running, task::TaskSummary, Scheduler, TASKS_PADDING, TASKS_PERCENT}; use super::{running::Running, task::TaskSummary, Scheduler, TASKS_PADDING, TASKS_PERCENT};
use crate::{emit, files::{File, Files}, input::InputOpt, Event, BLOCKER}; use crate::{emit, files::{File, Files}, input::InputOpt, Event, BLOCKER};
@ -160,7 +160,7 @@ impl Tasks {
for u in src { for u in src {
let to = dest.join(u.file_name().unwrap()); let to = dest.join(u.file_name().unwrap());
if force && u == &to { if force && u == &to {
trace!("file_cut: same file, skipping {:?}", to); debug!("file_cut: same file, skipping {:?}", to);
} else { } else {
self.scheduler.file_cut(u.clone(), to, force); self.scheduler.file_cut(u.clone(), to, force);
} }
@ -172,7 +172,7 @@ impl Tasks {
for u in src { for u in src {
let to = dest.join(u.file_name().unwrap()); let to = dest.join(u.file_name().unwrap());
if force && u == &to { if force && u == &to {
trace!("file_copy: same file, skipping {:?}", to); debug!("file_copy: same file, skipping {:?}", to);
} else { } else {
self.scheduler.file_copy(u.clone(), to, force); self.scheduler.file_copy(u.clone(), to, force);
} }
@ -184,7 +184,7 @@ impl Tasks {
for u in src { for u in src {
let to = dest.join(u.file_name().unwrap()); let to = dest.join(u.file_name().unwrap());
if force && *u == to { if force && *u == to {
trace!("file_link: same file, skipping {:?}", to); debug!("file_link: same file, skipping {:?}", to);
} else { } else {
self.scheduler.file_link(u.clone(), to, relative, force); self.scheduler.file_link(u.clone(), to, relative, force);
} }

View File

@ -1,11 +1,11 @@
use std::{borrow::Cow, collections::VecDeque, fs::Metadata, path::{Path, PathBuf}}; use std::{borrow::Cow, collections::VecDeque, fs::Metadata, path::{Path, PathBuf}};
use anyhow::Result; use anyhow::Result;
use yazi_config::TASKS;
use futures::{future::BoxFuture, FutureExt}; use futures::{future::BoxFuture, FutureExt};
use yazi_shared::{calculate_size, copy_with_progress, path_relative_to, Url};
use tokio::{fs, io::{self, ErrorKind::{AlreadyExists, NotFound}}, sync::mpsc}; use tokio::{fs, io::{self, ErrorKind::{AlreadyExists, NotFound}}, sync::mpsc};
use tracing::trace; use tracing::warn;
use yazi_config::TASKS;
use yazi_shared::{calculate_size, copy_with_progress, path_relative_to, Url};
use crate::tasks::TaskOp; use crate::tasks::TaskOp;
@ -94,7 +94,7 @@ impl File {
} }
Ok(n) => self.sch.send(TaskOp::Adv(task.id, 0, n))?, Ok(n) => self.sch.send(TaskOp::Adv(task.id, 0, n))?,
Err(e) if e.kind() == NotFound => { Err(e) if e.kind() == NotFound => {
trace!("Paste task partially done: {:?}", task); warn!("Paste task partially done: {:?}", task);
break; break;
} }
// Operation not permitted (os error 1) // Operation not permitted (os error 1)

View File

@ -1,11 +1,11 @@
use std::{collections::{BTreeMap, BTreeSet}, sync::Arc}; use std::{collections::{BTreeMap, BTreeSet}, sync::Arc};
use yazi_adaptor::Image;
use anyhow::Result; use anyhow::Result;
use yazi_config::PREVIEW;
use parking_lot::Mutex; use parking_lot::Mutex;
use yazi_shared::{calculate_size, Throttle, Url};
use tokio::{fs, sync::mpsc}; use tokio::{fs, sync::mpsc};
use yazi_adaptor::Image;
use yazi_config::PREVIEW;
use yazi_shared::{calculate_size, Throttle, Url};
use crate::{emit, external, files::FilesOp, tasks::TaskOp}; use crate::{emit, external, files::FilesOp, tasks::TaskOp};

View File

@ -25,7 +25,7 @@ tokio = { version = "^1", features = [ "parking_lot" ] }
unicode-width = "^0" unicode-width = "^0"
# Logging # Logging
tracing = "^0" tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] }
tracing-appender = "^0" tracing-appender = "^0"
tracing-subscriber = "^0" tracing-subscriber = "^0"

View File

@ -1,6 +1,5 @@
use yazi_core::{emit, input::InputMode, tab::FinderCase, Ctx};
use yazi_config::{keymap::{Control, Exec, Key, KeymapLayer}, KEYMAP}; use yazi_config::{keymap::{Control, Exec, Key, KeymapLayer}, KEYMAP};
use yazi_core::{emit, input::InputMode, tab::FinderCase, Ctx};
use yazi_shared::{optional_bool, Url}; use yazi_shared::{optional_bool, Url};
pub(super) struct Executor; pub(super) struct Executor;

View File

@ -1,7 +1,6 @@
use yazi_core::Ctx;
use yazi_config::THEME;
use ratatui::{layout::{self, Constraint}, prelude::{Buffer, Direction, Rect}, widgets::{List, ListItem, Widget}}; use ratatui::{layout::{self, Constraint}, prelude::{Buffer, Direction, Rect}, widgets::{List, ListItem, Widget}};
use yazi_config::THEME;
use yazi_core::Ctx;
pub(super) struct Bindings<'a> { pub(super) struct Bindings<'a> {
cx: &'a Ctx, cx: &'a Ctx,

View File

@ -1,7 +1,6 @@
use yazi_core::Ctx;
use yazi_config::THEME;
use ratatui::{buffer::Buffer, layout::{self, Rect}, prelude::{Constraint, Direction}, widgets::{Clear, Paragraph, Widget}}; use ratatui::{buffer::Buffer, layout::{self, Rect}, prelude::{Constraint, Direction}, widgets::{Clear, Paragraph, Widget}};
use yazi_config::THEME;
use yazi_core::Ctx;
use super::Bindings; use super::Bindings;

View File

@ -1,9 +1,9 @@
use yazi_core::{input::InputMode, Ctx};
use std::ops::Range; use std::ops::Range;
use ansi_to_tui::IntoText; use ansi_to_tui::IntoText;
use yazi_config::THEME;
use ratatui::{buffer::Buffer, layout::Rect, text::{Line, Text}, widgets::{Block, BorderType, Borders, Clear, Paragraph, Widget}}; use ratatui::{buffer::Buffer, layout::Rect, text::{Line, Text}, widgets::{Block, BorderType, Borders, Clear, Paragraph, Widget}};
use yazi_config::THEME;
use yazi_core::{input::InputMode, Ctx};
use yazi_shared::Term; use yazi_shared::Term;
pub(crate) struct Input<'a> { pub(crate) struct Input<'a> {

View File

@ -1,7 +1,7 @@
use anyhow::{Context, Result}; use anyhow::{Context, Result};
use yazi_config::BOOT;
use tracing_appender::non_blocking::WorkerGuard; use tracing_appender::non_blocking::WorkerGuard;
use tracing_subscriber::{fmt, prelude::__tracing_subscriber_SubscriberExt, Registry}; use tracing_subscriber::{fmt, prelude::__tracing_subscriber_SubscriberExt, Registry};
use yazi_config::BOOT;
pub(super) struct Logs; pub(super) struct Logs;

View File

@ -1,7 +1,6 @@
use yazi_core::Ctx;
use yazi_config::THEME;
use ratatui::{buffer::Buffer, layout::Rect, widgets::{Block, BorderType, Borders, Clear, List, ListItem, Widget}}; use ratatui::{buffer::Buffer, layout::Rect, widgets::{Block, BorderType, Borders, Clear, List, ListItem, Widget}};
use yazi_config::THEME;
use yazi_core::Ctx;
pub(crate) struct Select<'a> { pub(crate) struct Select<'a> {
cx: &'a Ctx, cx: &'a Ctx,

View File

@ -1,9 +1,8 @@
use yazi_core::Event;
use anyhow::Result; use anyhow::Result;
use crossterm::event::{Event as CrosstermEvent, EventStream, KeyEvent, KeyEventKind}; use crossterm::event::{Event as CrosstermEvent, EventStream, KeyEvent, KeyEventKind};
use futures::StreamExt; use futures::StreamExt;
use tokio::{select, sync::{mpsc::{self, UnboundedReceiver, UnboundedSender}, oneshot}, task::JoinHandle}; use tokio::{select, sync::{mpsc::{self, UnboundedReceiver, UnboundedSender}, oneshot}, task::JoinHandle};
use yazi_core::Event;
pub(super) struct Signals { pub(super) struct Signals {
tx: UnboundedSender<Event>, tx: UnboundedSender<Event>,

View File

@ -1,7 +1,6 @@
use yazi_core::{tasks::TASKS_PERCENT, Ctx};
use yazi_config::THEME;
use ratatui::{buffer::Buffer, layout::{self, Alignment, Constraint, Direction, Rect}, text::Line, widgets::{Block, BorderType, Borders, List, ListItem, Padding, Widget}}; use ratatui::{buffer::Buffer, layout::{self, Alignment, Constraint, Direction, Rect}, text::Line, widgets::{Block, BorderType, Borders, List, ListItem, Padding, Widget}};
use yazi_config::THEME;
use yazi_core::{tasks::TASKS_PERCENT, Ctx};
use super::Clear; use super::Clear;

View File

@ -1,7 +1,6 @@
use yazi_core::Ctx;
use yazi_config::THEME;
use ratatui::{layout, prelude::{Buffer, Constraint, Direction, Rect}, widgets::{Block, Clear, Widget}}; use ratatui::{layout, prelude::{Buffer, Constraint, Direction, Rect}, widgets::{Block, Clear, Widget}};
use yazi_config::THEME;
use yazi_core::Ctx;
use super::Side; use super::Side;

View File

@ -1,5 +1,5 @@
use yazi_config::{keymap::Control, THEME};
use ratatui::{prelude::{Buffer, Rect}, text::{Line, Span}, widgets::{Block, List, ListItem, Padding, Widget}}; use ratatui::{prelude::{Buffer, Rect}, text::{Line, Span}, widgets::{Block, List, ListItem, Padding, Widget}};
use yazi_config::{keymap::Control, THEME};
pub(super) struct Side<'a> { pub(super) struct Side<'a> {
times: usize, times: usize,

View File

@ -18,5 +18,5 @@ ansi-to-tui = "^3"
anyhow = "^1" anyhow = "^1"
mlua = { version = "^0", features = [ "luajit52", "vendored", "serialize" ] } mlua = { version = "^0", features = [ "luajit52", "vendored", "serialize" ] }
ratatui = "^0" ratatui = "^0"
tracing = "^0" tracing = { version = "^0", features = [ "max_level_debug", "release_max_level_warn" ] }
unicode-width = "^0" unicode-width = "^0"

View File

@ -1,7 +1,6 @@
use yazi_core::{preview::PreviewData, Ctx};
use ansi_to_tui::IntoText; use ansi_to_tui::IntoText;
use ratatui::{buffer::Buffer, layout::Rect, widgets::{Paragraph, Widget}}; use ratatui::{buffer::Buffer, layout::Rect, widgets::{Paragraph, Widget}};
use yazi_core::{preview::PreviewData, Ctx};
use super::Folder; use super::Folder;

View File

@ -1,5 +1,5 @@
use yazi_config::theme::Color;
use mlua::{AnyUserData, FromLua, Lua, Table, UserData, UserDataMethods, Value}; use mlua::{AnyUserData, FromLua, Lua, Table, UserData, UserDataMethods, Value};
use yazi_config::theme::Color;
use super::Style; use super::Style;
use crate::{GLOBALS, LUA}; use crate::{GLOBALS, LUA};

View File

@ -1,6 +1,6 @@
use anyhow::Result; use anyhow::Result;
use yazi_config::PLUGINS;
use mlua::{Lua, Table}; use mlua::{Lua, Table};
use yazi_config::PLUGINS;
use yazi_shared::RoCell; use yazi_shared::RoCell;
use crate::{bindings, components, layout, utils}; use crate::{bindings, components, layout, utils};

View File

@ -1,6 +1,5 @@
use yazi_core::Ctx;
pub use mlua::Scope; pub use mlua::Scope;
use yazi_core::Ctx;
use crate::{bindings, GLOBALS, LUA}; use crate::{bindings, GLOBALS, LUA};