diff --git a/tiles/src/core/account/atproto.rs b/tiles/src/core/account/atproto.rs index a8b1975..57e8db6 100644 --- a/tiles/src/core/account/atproto.rs +++ b/tiles/src/core/account/atproto.rs @@ -394,7 +394,7 @@ pub async fn share_session( let base_encoded_at_url = data_encoding::BASE64.encode(url.as_bytes()); - let shareable_base_url = format!("https://tiles.run/share/{}", base_encoded_at_url); + let shareable_base_url = format!("https://chat.tiles.run/share/{}", base_encoded_at_url); let shareable_url = if is_private { format!( diff --git a/tiles/src/core/plugin.rs b/tiles/src/core/plugin.rs index 1254779..00fa674 100644 --- a/tiles/src/core/plugin.rs +++ b/tiles/src/core/plugin.rs @@ -84,7 +84,7 @@ fn install_from_local_source(local_path: PathBuf) -> Result { std::fs::create_dir_all(&tmp_path) .context("Failed to create temporary plugins directory")?; - let output = if local_path.ends_with(".zip") { + let output = if local_path.extension().is_some_and(|ext| ext == "zip") { Command::new("unzip") .arg(&local_path) .arg("-d") diff --git a/tiles/src/repl.rs b/tiles/src/repl.rs index 6b7912f..835f2c1 100644 --- a/tiles/src/repl.rs +++ b/tiles/src/repl.rs @@ -694,6 +694,12 @@ async fn start_repl(modelfile: &Modelfile, _run_args: &RunArgs, db_conn: &Dbconn } } + // This is to prevent the session name being messeup if user starts + // with skills. Pi unfurls skills command to entire skill doc.So we + // cant put that as session name. + if !repl_session.session_started { + repl_session.session_snapshot.name = input.clone(); + }; // Reads the output from Pi and process and responds to the repl let mut reader = BufReader::new(&mut pi_stdout).lines(); @@ -1426,6 +1432,7 @@ fn save_agent_session( model: repl_session.current_modelname.clone(), messages: vec![], }; + //TODO: We need to these at the `message_end` event maybe, need to check for msg in agent_end_event.messages { //TODO: could avoid this cloning here let msg_copy = msg.clone(); @@ -1436,11 +1443,10 @@ fn save_agent_session( create_session( &db_conn.chat, &repl_session.session_id, - &input, + &repl_session.session_snapshot.name, ¤t_user.user_id, )?; repl_session.session_started = true; - repl_session.session_snapshot.name = input.clone(); None } else { repl_session.last_chat_id.clone()