Retire Convex paths and standardize local-first Pi runtime

This commit is contained in:
Agent Board
2026-07-29 01:49:53 +08:00
parent 26ff1a9c9a
commit a40fa25ae6
85 changed files with 1653 additions and 3971 deletions
@@ -765,21 +765,7 @@ function startTreeShellRuntime() {
scheduleRefresh();
return true;
}
if (sourceKind === "convex_workspace") {
for (const item of deletableItems) {
const documentId = getFileTreeRowDocumentId(item);
await sendCommand({
action: "delete",
workspaceId,
documentId,
});
applyRemovedDocumentLocally(documentId);
}
if (!deletableItems.every((item) => !fileTreeRowById.has(item.rowId))) {
scheduleRefresh();
}
return true;
}
// non-local sources removed; only local_folder path above
postToHost("tree.filetree.delete", {
workspaceId,
rowIds: deletableItems.map((item) => item.rowId),
@@ -823,21 +809,8 @@ function startTreeShellRuntime() {
copy: fileTreeClipboard.action === "copy",
});
if (!accepted) return;
if (sourceKind === "convex_workspace") {
const sourceRowIds = filterRedundantFileTreeRowIds(fileTreeClipboard.rowIds);
for (const rowId of sourceRowIds) {
const sourceItem = fileTreeRowById.get(rowId);
const documentId = getFileTreeRowDocumentId(sourceItem);
if (!documentId) continue;
await sendCommand({
action: fileTreeClipboard.action === "copy" ? "copy" : "move",
workspaceId,
documentId,
parentId: target.documentId || null,
targetParentId: target.documentId || null,
sortOrder: 0,
});
}
if (false) {
// paste: local_folder only
if (fileTreeClipboard.action === "cut") {
fileTreeClipboard = { action: null, rowIds: [] };
}
@@ -1944,7 +1917,7 @@ function startTreeShellRuntime() {
target: { documentId },
payload: { documentId },
});
if (sourceKind === "convex_workspace" && applyCreatedDocumentLocally(result, parentId, title)) {
if (sourceKind === "local_folder" && applyCreatedDocumentLocally(result, parentId, title)) {
if (mode === "filetree") {
beginInlineRename("filetree", `doc:${documentId}`);
} else {