mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 20:46:28 +01:00
fix(workspaces): preserve detached work and journaled Git sources
Reject retained worktree paths and orphan indexes before branch-only import. Revalidate the source path from interrupted migration journals. Use the cleanup producer command formatter for clean user-owned removal receipts. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
b28f72ef44
commit
16a646ba7a
6 files changed
+88
-23
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { formatCommandForDisplay } from "./workspace-command-display.js";
|
||||
import { notifyStatusCardIssueChange } from "./status-card-notifications.js";
|
||||
import { insertIssueComment } from "./issue-comment-writes.js";
|
||||
import { restoreGitWorkspaceContents } from "./git-workspace-contents.js";
|
||||
@@ -834,12 +835,6 @@ function resolveConfiguredPath(value: string, baseDir: string): string {
|
||||
return path.resolve(baseDir, value);
|
||||
}
|
||||
|
||||
function formatCommandForDisplay(command: string, args: string[]) {
|
||||
return [command, ...args]
|
||||
.map((part) => (/^[A-Za-z0-9_./:-]+$/.test(part) ? part : JSON.stringify(part)))
|
||||
.join(" ");
|
||||
}
|
||||
|
||||
function trimToLastBytes(value: string, limit: number) {
|
||||
const byteLength = Buffer.byteLength(value, "utf8");
|
||||
if (byteLength <= limit) return value;
|
||||
|
||||
Reference in new issue
Block a user