mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-08-26 07:31:09 +00:00
Dependency cleanup (#100)
* Sort all Cargo.toml deps for less conflicts * Move relative path deps to workspace * Standardize workspace imports * Rename ‘client’ to ‘logos-chat’ * Cleanups
This commit is contained in:
@@ -5,7 +5,7 @@ use std::sync::mpsc;
|
||||
|
||||
use anyhow::Result;
|
||||
use arboard::Clipboard;
|
||||
use client::{ConversationIdOwned, DeliveryService};
|
||||
use logos_chat::{ChatClient, ConversationIdOwned, DeliveryService};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::utils::now;
|
||||
@@ -42,7 +42,7 @@ pub struct AppState {
|
||||
}
|
||||
|
||||
pub struct ChatApp<D: DeliveryService> {
|
||||
pub client: client::ChatClient<D>,
|
||||
pub client: ChatClient<D>,
|
||||
inbound: mpsc::Receiver<Vec<u8>>,
|
||||
pub state: AppState,
|
||||
/// Ephemeral command output — not persisted, cleared on chat switch.
|
||||
@@ -55,7 +55,7 @@ pub struct ChatApp<D: DeliveryService> {
|
||||
|
||||
impl<D: DeliveryService + 'static> ChatApp<D> {
|
||||
pub fn new(
|
||||
client: client::ChatClient<D>,
|
||||
client: ChatClient<D>,
|
||||
inbound: mpsc::Receiver<Vec<u8>>,
|
||||
user_name: &str,
|
||||
data_dir: &Path,
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::sync::mpsc;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use clap::{Parser, ValueEnum};
|
||||
use client::DeliveryService;
|
||||
use logos_chat::DeliveryService;
|
||||
|
||||
use app::ChatApp;
|
||||
|
||||
@@ -105,9 +105,9 @@ fn run<D: DeliveryService + 'static>(
|
||||
.context("db path contains non-UTF-8 characters")?
|
||||
.to_string();
|
||||
|
||||
let client = client::ChatClient::open(
|
||||
let client = logos_chat::ChatClient::open(
|
||||
cli.name.clone(),
|
||||
client::StorageConfig::Encrypted {
|
||||
logos_chat::StorageConfig::Encrypted {
|
||||
path: db_str,
|
||||
key: "chat-cli".to_string(),
|
||||
},
|
||||
@@ -160,9 +160,9 @@ fn run_logos_delivery(cli: Cli) -> Result<()> {
|
||||
.to_str()
|
||||
.context("db path contains non-UTF-8 characters")?
|
||||
.to_string();
|
||||
client::ChatClient::open(
|
||||
logos_chat::ChatClient::open(
|
||||
cli.name.clone(),
|
||||
client::StorageConfig::Encrypted {
|
||||
logos_chat::StorageConfig::Encrypted {
|
||||
path: db_str,
|
||||
key: "chat-cli".to_string(),
|
||||
},
|
||||
@@ -171,7 +171,7 @@ fn run_logos_delivery(cli: Cli) -> Result<()> {
|
||||
.map_err(|e| anyhow::anyhow!("{e:?}"))
|
||||
.context("failed to open persistent client")?
|
||||
}
|
||||
None => client::ChatClient::new(cli.name.clone(), delivery),
|
||||
None => logos_chat::ChatClient::new(cli.name.clone(), delivery),
|
||||
};
|
||||
|
||||
let mut app = ChatApp::new(client, inbound, &cli.name, &data_dir)?;
|
||||
|
||||
@@ -6,7 +6,7 @@ use std::sync::mpsc;
|
||||
use std::thread;
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use client::{AddressedEnvelope, DeliveryService};
|
||||
use logos_chat::{AddressedEnvelope, DeliveryService};
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum FileTransportError {
|
||||
|
||||
@@ -18,7 +18,7 @@ use std::time::Duration;
|
||||
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD as BASE64;
|
||||
use client::{AddressedEnvelope, DeliveryService};
|
||||
use logos_chat::{AddressedEnvelope, DeliveryService};
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use wrapper::LogosNodeCtx;
|
||||
|
||||
@@ -16,7 +16,7 @@ use ratatui::{
|
||||
widgets::{Block, Borders, List, ListItem, Paragraph, Wrap},
|
||||
};
|
||||
|
||||
use client::DeliveryService;
|
||||
use logos_chat::DeliveryService;
|
||||
|
||||
use crate::app::ChatApp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user