Luxe 0.1.3: your sessions on your phone, joinable sessions, and nested AGENTS.md
- luxe remote puts the sessions on your computer in reach of your own phone or tablet over Tailscale: write, steer, answer prompts, send photos, browse files, diffs and GitHub, with a paired device and your own Tailscale login. - luxe join lets another program on the same machine join a running session over the RPC protocol. - An AGENTS.md in a subfolder reaches the model the first time it works there. - Long sessions stay fast: no stall before each model call, lighter memory, cheaper drawing. - A session is open in one Luxe at a time, web_search shares results across its phrasings, and a grep glob starting with ! excludes. The CHANGELOG has the full list.
This commit is contained in:
@@ -105,6 +105,30 @@ fn legacy_luxe_config_dir() -> Option<PathBuf> {
|
||||
legacy_config(env)
|
||||
}
|
||||
|
||||
/// Where a running Luxe leaves the way in to its session: `$LUXE_RUNTIME_DIR`, else `luxe` under a
|
||||
/// folder only this user can open.
|
||||
///
|
||||
/// That is `$XDG_RUNTIME_DIR` on Linux and `$TMPDIR` on macOS, both private to the user. Linux's
|
||||
/// `$TMPDIR`, when set at all, is usually the shared `/tmp`, so it is never used; without a private
|
||||
/// folder, and on Windows, it is `run` under [`luxe_state_dir`].
|
||||
pub fn luxe_runtime_dir() -> PathBuf {
|
||||
runtime_in(env, cfg!(target_os = "macos")).unwrap_or_else(|| luxe_state_dir().join("run"))
|
||||
}
|
||||
|
||||
/// [`luxe_runtime_dir`] under the lookup `var`, or `None` for the state-directory fallback.
|
||||
fn runtime_in(var: impl Fn(&str) -> Option<String>, macos: bool) -> Option<PathBuf> {
|
||||
let var = |name: &str| var(name).filter(|value| !value.trim().is_empty());
|
||||
if let Some(explicit) = var("LUXE_RUNTIME_DIR") {
|
||||
return Some(PathBuf::from(explicit));
|
||||
}
|
||||
let private = match macos {
|
||||
true => var("TMPDIR"),
|
||||
false if cfg!(windows) => None,
|
||||
false => var("XDG_RUNTIME_DIR"),
|
||||
};
|
||||
Some(PathBuf::from(private?).join("luxe"))
|
||||
}
|
||||
|
||||
/// Luxe's own cache directory, `luxe` under [`cache_dir`].
|
||||
pub fn luxe_cache_dir() -> PathBuf {
|
||||
cache_dir().join("luxe")
|
||||
|
||||
Reference in New Issue
Block a user