VS Code companion (#461)

* Init port discovery

* Fmt

* Remove unused

* Fmt

* Simplify

* Container lookup API

* Isolated task details

* Fmt

* Lint and format

* Lint
This commit is contained in:
Louis Knight-Webb
2025-08-13 18:10:19 +01:00
committed by GitHub
parent e970a6eb75
commit 141e1686fd
13 changed files with 319 additions and 68 deletions

View File

@@ -8,6 +8,7 @@ pub mod diff;
pub mod log_msg;
pub mod msg_store;
pub mod path;
pub mod port_file;
pub mod response;
pub mod sentry;
pub mod shell;

View File

@@ -0,0 +1,12 @@
use std::{env, path::PathBuf};
use tokio::fs;
pub async fn write_port_file(port: u16) -> std::io::Result<PathBuf> {
let dir = env::temp_dir().join("vibe-kanban");
let path = dir.join("vibe-kanban.port");
tracing::debug!("Writing port {} to {:?}", port, path);
fs::create_dir_all(&dir).await?;
fs::write(&path, port.to_string()).await?;
Ok(path)
}