mirror of
https://github.com/robcholz/vibebox.git
synced 2026-05-30 07:59:28 +02:00
fix: removed the hardcode codex and claude form ssh.sh
This commit is contained in:
+10
-1
@@ -27,7 +27,7 @@ use crate::{
|
||||
|
||||
const SSH_KEY_NAME: &str = "ssh_key";
|
||||
pub(crate) const SERIAL_LOG_NAME: &str = "serial.log";
|
||||
const DEFAULT_SSH_USER: &str = "vibecoder";
|
||||
pub(crate) const DEFAULT_SSH_USER: &str = "vibecoder";
|
||||
const SSH_CONNECT_RETRIES: usize = 30;
|
||||
const SSH_CONNECT_DELAY_MS: u64 = 500;
|
||||
const SSH_SETUP_SCRIPT: &str = include_str!("ssh.sh");
|
||||
@@ -181,6 +181,15 @@ pub fn read_instance_vm_ip(
|
||||
Ok(config.and_then(|cfg| cfg.vm_ipv4))
|
||||
}
|
||||
|
||||
pub fn read_instance_ssh_user(
|
||||
instance_dir: &Path,
|
||||
) -> Result<Option<String>, Box<dyn std::error::Error>> {
|
||||
let config = read_instance_config(instance_dir)?;
|
||||
Ok(config
|
||||
.map(|cfg| cfg.ssh_user)
|
||||
.filter(|user| !user.trim().is_empty()))
|
||||
}
|
||||
|
||||
pub fn touch_last_active(instance_dir: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut config = load_or_create_instance_config(instance_dir)?;
|
||||
let now = OffsetDateTime::now_utc().format(&Rfc3339)?;
|
||||
|
||||
Reference in New Issue
Block a user