feat: add declarative tmux pane command management
- Implement Redis-backed command state tracking - Use MD5 hashing to detect command changes in panes - Kill and restart pane commands only when necessary - Ensure bash is the parent process in each pane - Add pane reset and emptiness checks before command execution
This commit is contained in:
@@ -2,7 +2,7 @@ module gittools
|
||||
|
||||
import crypto.md5
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ pub fn (mut gs GitStructure) do(args_ ReposActionsArgs) !string {
|
||||
// means current dir
|
||||
args.path = os.getwd()
|
||||
mut curdiro := pathlib.get_dir(path: args.path, create: false)!
|
||||
mut parentpath := curdiro.parent_find('.git') or { pathlib.Path{} }
|
||||
// mut parentpath := curdiro.parent_find('.git') or { pathlib.Path{} }
|
||||
args.path = curdiro.path
|
||||
}
|
||||
if !os.exists(args.path) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module gittools
|
||||
|
||||
import freeflowuniverse.herolib.core.redisclient
|
||||
// import freeflowuniverse.herolib.core.redisclient
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import time
|
||||
// import time
|
||||
|
||||
// ReposGetArgs defines arguments to retrieve repositories from the git structure.
|
||||
// It includes filters by name, account, provider, and an option to clone a missing repo.
|
||||
|
||||
@@ -2,7 +2,7 @@ module gittools
|
||||
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
// import freeflowuniverse.herolib.core.pathlib
|
||||
|
||||
@[params]
|
||||
pub struct GitCloneArgs {
|
||||
@@ -40,17 +40,17 @@ pub fn (mut gitstructure GitStructure) clone(args GitCloneArgs) !&GitRepo {
|
||||
gitstructure.repos[key_] = &repo
|
||||
|
||||
if repo.exists() {
|
||||
console.print_green("Repository already exists at ${repo.path()}")
|
||||
console.print_green('Repository already exists at ${repo.path()}')
|
||||
// Load the existing repository status
|
||||
repo.load_internal() or {
|
||||
console.print_debug('Could not load existing repository status: ${err}')
|
||||
}
|
||||
return &repo
|
||||
}
|
||||
|
||||
|
||||
// Check if path exists but is not a git repository
|
||||
if os.exists(repo.path()) {
|
||||
return error("Path exists but is not a git repository: ${repo.path()}")
|
||||
return error('Path exists but is not a git repository: ${repo.path()}')
|
||||
}
|
||||
|
||||
if args.sshkey.len > 0 {
|
||||
|
||||
@@ -2,7 +2,7 @@ module gittools
|
||||
|
||||
import time
|
||||
import freeflowuniverse.herolib.ui.console
|
||||
import os
|
||||
// import os
|
||||
|
||||
@[params]
|
||||
pub struct StatusUpdateArgs {
|
||||
|
||||
Reference in New Issue
Block a user