mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
feat(ocm-move): plan worktree mirror targets and stream move progress (#345)
* feat(ocm-move): plan worktree mirror targets and stream move progress - Plan/ensure mirror targets per branch via new internal endpoints, creating a worktree repo when the target branch is not checked out in the source repo - Skip branches checked out in other worktrees during bundle import and reset/clean before checkout on both server and CLI - Rewrite workspace paths in message.updated events when replaying moved sessions - Stream live move progress (bundle, upload, import, patch, replay) in the TUI - Prefer branch-matched repos when moving sessions and share push-divergence descriptions * chore(ocm-cli): bump version to 0.2.7 * fix(ocm): harden worktree mirror synchronization * fix(ocm): protect active branch during branchless pull
This commit is contained in:
1 parent
4ed3460759
commit
68d586f183
23 files changed
+2026
-158
No files matched your search
@@ -1,4 +1,4 @@
|
||||
const FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
|
||||
export const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
|
||||
|
||||
export function formatBytes(bytes: number): string {
|
||||
if (bytes < 1024) {
|
||||
@@ -42,8 +42,8 @@ export function createProgressReporter(
|
||||
if (isTTY) {
|
||||
if (t - lastRenderAt < 80) return
|
||||
lastRenderAt = t
|
||||
out.write(`\r\x1b[K${label}: ${FRAMES[frameIndex]} ${formatBytes(bytes)}`)
|
||||
frameIndex = (frameIndex + 1) % FRAMES.length
|
||||
out.write(`\r\x1b[K${label}: ${SPINNER_FRAMES[frameIndex]} ${formatBytes(bytes)}`)
|
||||
frameIndex = (frameIndex + 1) % SPINNER_FRAMES.length
|
||||
} else {
|
||||
if (t - lastNonTtyTickAt < 1000) return
|
||||
lastNonTtyTickAt = t
|
||||
|
||||
Reference in new issue
Block a user