Implement embedded Git synchronization TUI

This commit is contained in:
Hermes Agent
2026-08-10 10:39:31 +00:00
parent ce3e4a9f79
commit 1850846696
8 changed files with 1402 additions and 36 deletions

View File

@@ -35,6 +35,7 @@ pub enum AuthenticationEvent {
pub enum AuthenticationTarget {
Entry(String),
Workflow(Box<WorkflowSubmission>),
Git(ironstorage::command::GitRequest),
}
struct AuthenticationCompletion {
@@ -79,6 +80,10 @@ impl AuthenticationCoordinator {
self.request(AuthenticationTarget::Workflow(submission));
}
pub fn request_git(&mut self, request: ironstorage::command::GitRequest) {
self.request(AuthenticationTarget::Git(request));
}
fn request(&mut self, target: AuthenticationTarget) {
self.generation = self.generation.wrapping_add(1);
let generation = self.generation;
@@ -199,6 +204,19 @@ impl AsyncExecutor {
.push(task);
}
pub fn progress_reporter(
&self,
token: RequestToken,
) -> impl Fn(ironstorage::git::GitProgressPhase) + Send + Sync + 'static {
let sender = self.sender.clone();
move |phase| {
let _ignored = sender.send(AsyncResult {
token,
payload: Ok(AsyncPayload::GitProgress(phase)),
});
}
}
pub fn drain(&self) -> impl Iterator<Item = AsyncResult> + '_ {
self.receiver.try_iter()
}