nolo-cli 0.263.0-alpha.1 → 0.264.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-GZEGNZDC.js → _executeModel-YQNZNR2Y.js} +15 -15
- package/{agentDeleteCommand-PYQFS2IO.js → agentDeleteCommand-S5FVPYKT.js} +13 -13
- package/{agentEmailCommands-MSPYHNQA.js → agentEmailCommands-ZEFMGVKM.js} +14 -14
- package/{agentMachineCommands-HHH7DR26.js → agentMachineCommands-COJD2KPZ.js} +2 -2
- package/{agentRecordCommands-ANOOR7DX.js → agentRecordCommands-JZ35AC5A.js} +14 -14
- package/{agentRun-P6GEVWAT.js → agentRun-UIO43TUG.js} +14 -14
- package/{agentRunCommand-SF4QKUF2.js → agentRunCommand-ATLKKD6O.js} +15 -15
- package/{agentSlice-NWSWCYRW.js → agentSlice-HHNKNNYM.js} +1 -1
- package/{chunk-6S4VPBSW.js → chunk-4RUQ2PFX.js} +4 -4
- package/{chunk-L4KZCAIJ.js → chunk-4UNN45DS.js} +5 -5
- package/{chunk-KUZSTAE3.js → chunk-7422ZLGL.js} +7 -7
- package/{chunk-KTK64ZZN.js → chunk-7E6YXSFZ.js} +2 -2
- package/{chunk-JUMQJSQF.js → chunk-DALXH7BG.js} +211 -177
- package/{chunk-OV47NSYQ.js → chunk-DBCWXGOC.js} +8 -8
- package/{chunk-DPFHC2DK.js → chunk-DBEOW57U.js} +2 -2
- package/{chunk-YSYTCIFN.js → chunk-EBH4RFJ6.js} +216 -33
- package/{chunk-5MGXBQ3H.js → chunk-EODBQPRM.js} +2 -2
- package/{chunk-BUO76CEE.js → chunk-HXEO5DNV.js} +2 -2
- package/chunk-JDMWYVUF.js +449 -0
- package/{chunk-WWE3TYSA.js → chunk-LTQ6ECCF.js} +3 -3
- package/{chunk-ZMOKHBV5.js → chunk-LYPJYBE5.js} +2 -2
- package/{chunk-OLJSB44A.js → chunk-MALPQFGT.js} +6 -6
- package/{chunk-QAUBNGF2.js → chunk-OKPOQGQJ.js} +3 -3
- package/{chunk-6KA4XDEI.js → chunk-PDSXYHNI.js} +2 -2
- package/{chunk-QHSF7SPP.js → chunk-QAU6KM2U.js} +1 -1
- package/{chunk-ZZOXGB2Z.js → chunk-QAW6BEWQ.js} +6 -6
- package/{chunk-Z7TB2J74.js → chunk-T3MWVUBE.js} +1 -1
- package/{chunk-JTRU7WEG.js → chunk-TGVVE5BA.js} +177 -44
- package/{chunk-PJVJIDTH.js → chunk-TKLBBR7P.js} +3 -3
- package/{chunk-CQNGHKSG.js → chunk-U7OULUMF.js} +3 -3
- package/{chunk-WJ5IXN23.js → chunk-ZCMAKAZM.js} +1 -1
- package/{chunk-XCPC4RXE.js → chunk-ZSZBHRLP.js} +4 -4
- package/{cliExecutor-Z62UBJ5S.js → cliExecutor-N3445G2Z.js} +1 -1
- package/{commandRegistry-ZEZY7MPW.js → commandRegistry-ENNFT77C.js} +18 -18
- package/{contentThunks-N3DDKRNJ.js → contentThunks-ERA42OXW.js} +4 -4
- package/{createAgentAutomationAction-W3B6KOIW.js → createAgentAutomationAction-DMD2VDPI.js} +4 -4
- package/{createDialogAction-V6WA7USR.js → createDialogAction-3SPOJQAK.js} +5 -5
- package/{createPageAction-P2HDHBCU.js → createPageAction-AVXUMZVT.js} +5 -5
- package/{deleteDbKey-TDXLWHVF.js → deleteDbKey-KV6MYBAI.js} +5 -5
- package/{dialogSlice-TEV6XXOO.js → dialogSlice-Q7H2YVNO.js} +2 -2
- package/{docStore-OVBEONC7.js → docStore-GWPFDV6Y.js} +1 -1
- package/{handleSendMessageAction-5GZ44SKK.js → handleSendMessageAction-FHGUFT2X.js} +9 -9
- package/{hostCredentialCreate-WOLFFVCM.js → hostCredentialCreate-2VEYBXJV.js} +14 -14
- package/index.js +3 -3
- package/{localAutomationCommands-L333FJPR.js → localAutomationCommands-XSK7SM7I.js} +1 -1
- package/{localAutomationRuntime-CIHGJBSC.js → localAutomationRuntime-5WBO7HGQ.js} +1 -1
- package/{localRuntimeAdapter-6WNR7IYN.js → localRuntimeAdapter-Y6H6XRIH.js} +13 -13
- package/{machineCommands-CP7NCD6O.js → machineCommands-RVB5OG2X.js} +16 -16
- package/{machineWsRunDispatch-YIAY2LPK.js → machineWsRunDispatch-Y5SJGCEE.js} +14 -14
- package/{memberThunks-TD76IFGA.js → memberThunks-NEZRAW5K.js} +18 -175
- package/package.json +1 -1
- package/{projectArchive-KJRBIY3O.js → projectArchive-WE3VVPZ2.js} +5 -5
- package/{readlineWorkspace-2PLTEZDM.js → readlineWorkspace-ZH5FGDMI.js} +18 -18
- package/{runAgentClientLoop-IBWSCK2D.js → runAgentClientLoop-2SFASHDS.js} +13 -13
- package/{streamAgentChatTurn-JAAROGLD.js → streamAgentChatTurn-KOUWITHH.js} +15 -15
- package/{tools-TCOYT5DJ.js → tools-WN4AVSNS.js} +10 -10
- package/{updateDialogTitleAction-O3TRFRIH.js → updateDialogTitleAction-XOSLNRT3.js} +4 -4
- package/chunk-EHFDVQF5.js +0 -247
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-MVOZ22RZ.js";
|
|
14
14
|
import {
|
|
15
15
|
deleteDbKey
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4RUQ2PFX.js";
|
|
17
17
|
import {
|
|
18
18
|
formatWorkContextWriteNotice
|
|
19
19
|
} from "./chunk-WDWZPASX.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
applyFetchSpaceFulfilled,
|
|
22
22
|
fetchAuthoritativeRemoteSpace,
|
|
23
23
|
selectSpaceRemoteAuth
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZCMAKAZM.js";
|
|
25
25
|
import {
|
|
26
26
|
ToolResultError,
|
|
27
27
|
ZOHO_MAIL_TOOL_NAMES,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
toolRunUpdated,
|
|
41
41
|
uiCardFallback,
|
|
42
42
|
waitForAbortableDelay
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ZSZBHRLP.js";
|
|
44
44
|
import {
|
|
45
45
|
isGatewayHttpStatus
|
|
46
46
|
} from "./chunk-NF64D32W.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from "./chunk-P62DHV4F.js";
|
|
52
52
|
import {
|
|
53
53
|
createDocState
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-7E6YXSFZ.js";
|
|
55
55
|
import {
|
|
56
56
|
applyPageContentMutation,
|
|
57
57
|
readDocFunc,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
createDialogAction,
|
|
65
65
|
uiAskChoiceFunc,
|
|
66
66
|
uiAskChoiceFunctionSchema
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-HXEO5DNV.js";
|
|
68
68
|
import {
|
|
69
69
|
DEFAULT_COLLAPSED_CATEGORIES,
|
|
70
70
|
addContentToSpace,
|
|
@@ -79,14 +79,17 @@ import {
|
|
|
79
79
|
updateContentCategory,
|
|
80
80
|
updateContentTitle,
|
|
81
81
|
writeStoredCollapsedCategories
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-TGVVE5BA.js";
|
|
83
83
|
import {
|
|
84
|
+
MAX_DB_MUTATE_OPS,
|
|
84
85
|
addMemberSpace,
|
|
85
86
|
getAllMemberSpaces,
|
|
86
87
|
getCurrentSpaceId,
|
|
87
88
|
getCurrentSpaceIdRaw,
|
|
88
89
|
getCurrentSpaceRaw,
|
|
89
90
|
getViewMode,
|
|
91
|
+
isRemoteAccountSpace,
|
|
92
|
+
mutateDbOps,
|
|
90
93
|
removeMemberSpace,
|
|
91
94
|
setCurrentSpace,
|
|
92
95
|
setCurrentSpaceBoth,
|
|
@@ -94,9 +97,12 @@ import {
|
|
|
94
97
|
setMembershipLoading,
|
|
95
98
|
setMembershipRejected,
|
|
96
99
|
setViewMode,
|
|
100
|
+
spCatKey,
|
|
101
|
+
spMetaKey,
|
|
102
|
+
syncLocalSpaceEntityCache,
|
|
97
103
|
updateCurrentSpaceIfMatch,
|
|
98
104
|
updateMemberSpaceName
|
|
99
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-JDMWYVUF.js";
|
|
100
106
|
import {
|
|
101
107
|
buildDatabaseFileContentUrl,
|
|
102
108
|
resolveDialogAgentMode,
|
|
@@ -105,13 +111,13 @@ import {
|
|
|
105
111
|
selectCurrentDialogConfig,
|
|
106
112
|
selectCurrentDialogId,
|
|
107
113
|
selectMsgById
|
|
108
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-DBCWXGOC.js";
|
|
109
115
|
import {
|
|
110
116
|
createAgent,
|
|
111
117
|
runLlm,
|
|
112
118
|
streamAgentChatTurn,
|
|
113
119
|
updateAgent
|
|
114
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-TKLBBR7P.js";
|
|
115
121
|
import {
|
|
116
122
|
createActionAsyncThunk,
|
|
117
123
|
createPlainAsyncThunk
|
|
@@ -3294,15 +3300,40 @@ var addCategory = createPlainAsyncThunk(
|
|
|
3294
3300
|
order: finalOrder,
|
|
3295
3301
|
updatedAt: nowISO
|
|
3296
3302
|
};
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
+
let updatedSpaceData;
|
|
3304
|
+
if (isRemoteAccountSpace(spaceData, rootState)) {
|
|
3305
|
+
const res = await mutateDbOps(rootState, [
|
|
3306
|
+
{
|
|
3307
|
+
op: "put",
|
|
3308
|
+
key: spCatKey(spaceId, newCategoryId),
|
|
3309
|
+
value: { name: name.trim(), order: finalOrder }
|
|
3303
3310
|
}
|
|
3304
|
-
|
|
3305
|
-
|
|
3311
|
+
]);
|
|
3312
|
+
const effectiveUpdatedAt = res?.applied?.[0]?.updatedAt ?? Date.now();
|
|
3313
|
+
const effectiveCat = {
|
|
3314
|
+
name: newCategory.name,
|
|
3315
|
+
order: finalOrder,
|
|
3316
|
+
updatedAt: effectiveUpdatedAt
|
|
3317
|
+
};
|
|
3318
|
+
updatedSpaceData = await syncLocalSpaceEntityCache(thunkAPI, spaceKey, {
|
|
3319
|
+
...spaceData,
|
|
3320
|
+
categories: {
|
|
3321
|
+
...spaceData.categories ?? {},
|
|
3322
|
+
[newCategoryId]: effectiveCat
|
|
3323
|
+
},
|
|
3324
|
+
updatedAt: effectiveUpdatedAt
|
|
3325
|
+
});
|
|
3326
|
+
} else {
|
|
3327
|
+
updatedSpaceData = await dispatch(
|
|
3328
|
+
patch({
|
|
3329
|
+
dbKey: spaceKey,
|
|
3330
|
+
changes: {
|
|
3331
|
+
categories: { [newCategoryId]: newCategory },
|
|
3332
|
+
updatedAt: nowISO
|
|
3333
|
+
}
|
|
3334
|
+
})
|
|
3335
|
+
).unwrap();
|
|
3336
|
+
}
|
|
3306
3337
|
const currentCollapsedCategories = getCollapsedCategories();
|
|
3307
3338
|
const collapsedCategories = {
|
|
3308
3339
|
...currentCollapsedCategories,
|
|
@@ -3356,9 +3387,39 @@ var deleteCategory = createPlainAsyncThunk(
|
|
|
3356
3387
|
}
|
|
3357
3388
|
if (contentsChanged) changes.contents = contentsPatch;
|
|
3358
3389
|
}
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3390
|
+
let updatedSpaceData;
|
|
3391
|
+
if (isRemoteAccountSpace(spaceData, rootState)) {
|
|
3392
|
+
const res = await mutateDbOps(rootState, [
|
|
3393
|
+
{ op: "tombstone", key: spCatKey(spaceId, categoryId) }
|
|
3394
|
+
]);
|
|
3395
|
+
const effectiveUpdatedAt = res?.applied?.[0]?.updatedAt ?? Date.now();
|
|
3396
|
+
const nextCategories = { ...spaceData.categories ?? {} };
|
|
3397
|
+
delete nextCategories[categoryId];
|
|
3398
|
+
let nextContents = spaceData.contents;
|
|
3399
|
+
if (spaceData.contents) {
|
|
3400
|
+
const updatedContents = { ...spaceData.contents };
|
|
3401
|
+
let touched = false;
|
|
3402
|
+
for (const key2 in updatedContents) {
|
|
3403
|
+
if (updatedContents[key2]?.categoryId === categoryId) {
|
|
3404
|
+
const copy = { ...updatedContents[key2], updatedAt: effectiveUpdatedAt };
|
|
3405
|
+
delete copy.categoryId;
|
|
3406
|
+
updatedContents[key2] = copy;
|
|
3407
|
+
touched = true;
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
if (touched) nextContents = updatedContents;
|
|
3411
|
+
}
|
|
3412
|
+
updatedSpaceData = await syncLocalSpaceEntityCache(thunkAPI, spaceKey, {
|
|
3413
|
+
...spaceData,
|
|
3414
|
+
categories: nextCategories,
|
|
3415
|
+
...nextContents !== void 0 ? { contents: nextContents } : {},
|
|
3416
|
+
updatedAt: effectiveUpdatedAt
|
|
3417
|
+
});
|
|
3418
|
+
} else {
|
|
3419
|
+
updatedSpaceData = await dispatch(
|
|
3420
|
+
patch({ dbKey: spaceKey, changes })
|
|
3421
|
+
).unwrap();
|
|
3422
|
+
}
|
|
3362
3423
|
const collapsedCategories = { ...getCollapsedCategories() };
|
|
3363
3424
|
delete collapsedCategories[categoryId];
|
|
3364
3425
|
setCollapsedCategories(collapsedCategories, spaceId);
|
|
@@ -3393,19 +3454,46 @@ var updateCategoryName = createPlainAsyncThunk(
|
|
|
3393
3454
|
throw new Error("\u6307\u5B9A\u7684\u5206\u7C7B\u4E0D\u5B58\u5728\u3002");
|
|
3394
3455
|
}
|
|
3395
3456
|
const nowISO = (/* @__PURE__ */ new Date()).toISOString();
|
|
3457
|
+
const nextCategory = {
|
|
3458
|
+
...existingCategory,
|
|
3459
|
+
name: trimmedName,
|
|
3460
|
+
updatedAt: nowISO
|
|
3461
|
+
};
|
|
3396
3462
|
const changes = {
|
|
3397
3463
|
categories: {
|
|
3398
|
-
[categoryId]:
|
|
3399
|
-
...existingCategory,
|
|
3400
|
-
name: trimmedName,
|
|
3401
|
-
updatedAt: nowISO
|
|
3402
|
-
}
|
|
3464
|
+
[categoryId]: nextCategory
|
|
3403
3465
|
},
|
|
3404
3466
|
updatedAt: nowISO
|
|
3405
3467
|
};
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3468
|
+
let updatedSpaceData;
|
|
3469
|
+
const rootState = getState();
|
|
3470
|
+
if (isRemoteAccountSpace(spaceData, rootState)) {
|
|
3471
|
+
const res = await mutateDbOps(rootState, [
|
|
3472
|
+
{
|
|
3473
|
+
op: "patch",
|
|
3474
|
+
key: spCatKey(spaceId, categoryId),
|
|
3475
|
+
value: { name: trimmedName }
|
|
3476
|
+
}
|
|
3477
|
+
]);
|
|
3478
|
+
const effectiveUpdatedAt = res?.applied?.[0]?.updatedAt ?? Date.now();
|
|
3479
|
+
const effectiveCat = {
|
|
3480
|
+
...nextCategory,
|
|
3481
|
+
name: trimmedName,
|
|
3482
|
+
updatedAt: effectiveUpdatedAt
|
|
3483
|
+
};
|
|
3484
|
+
updatedSpaceData = await syncLocalSpaceEntityCache(thunkAPI, spaceKey, {
|
|
3485
|
+
...spaceData,
|
|
3486
|
+
categories: {
|
|
3487
|
+
...spaceData.categories ?? {},
|
|
3488
|
+
[categoryId]: effectiveCat
|
|
3489
|
+
},
|
|
3490
|
+
updatedAt: effectiveUpdatedAt
|
|
3491
|
+
});
|
|
3492
|
+
} else {
|
|
3493
|
+
updatedSpaceData = await dispatch(
|
|
3494
|
+
patch({ dbKey: spaceKey, changes })
|
|
3495
|
+
).unwrap();
|
|
3496
|
+
}
|
|
3409
3497
|
syncCurrentSpace(spaceId, updatedSpaceData);
|
|
3410
3498
|
return { spaceId, updatedSpaceData };
|
|
3411
3499
|
}
|
|
@@ -3457,9 +3545,65 @@ var reorderCategories = createPlainAsyncThunk(
|
|
|
3457
3545
|
categories: updatedCategoriesChanges,
|
|
3458
3546
|
updatedAt: nowISO
|
|
3459
3547
|
};
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3548
|
+
let updatedSpaceData;
|
|
3549
|
+
if (isRemoteAccountSpace(spaceData, stateRoot)) {
|
|
3550
|
+
const changedCats = Object.entries(updatedCategoriesChanges).filter(
|
|
3551
|
+
([catId, cat]) => cat && currentCategories[catId]?.order !== cat.order
|
|
3552
|
+
);
|
|
3553
|
+
if (changedCats.length === 0) {
|
|
3554
|
+
return { spaceId, updatedSpaceData: spaceData };
|
|
3555
|
+
}
|
|
3556
|
+
const nowMs = Date.now();
|
|
3557
|
+
const mergedCategories = { ...currentCategories };
|
|
3558
|
+
let maxUpdatedAt = 0;
|
|
3559
|
+
let committedCount = 0;
|
|
3560
|
+
try {
|
|
3561
|
+
for (let offset = 0; offset < changedCats.length; offset += MAX_DB_MUTATE_OPS) {
|
|
3562
|
+
const chunk = changedCats.slice(offset, offset + MAX_DB_MUTATE_OPS);
|
|
3563
|
+
const res = await mutateDbOps(
|
|
3564
|
+
stateRoot,
|
|
3565
|
+
chunk.map(([catId, cat]) => ({
|
|
3566
|
+
op: "patch",
|
|
3567
|
+
key: spCatKey(spaceId, catId),
|
|
3568
|
+
value: { order: cat.order }
|
|
3569
|
+
}))
|
|
3570
|
+
);
|
|
3571
|
+
const appliedByKey = new Map(
|
|
3572
|
+
(res?.applied ?? []).map((item) => [item.key, item.updatedAt])
|
|
3573
|
+
);
|
|
3574
|
+
for (const [catId, cat] of chunk) {
|
|
3575
|
+
const serverTs = appliedByKey.get(spCatKey(spaceId, catId));
|
|
3576
|
+
const ts = typeof serverTs === "number" ? serverTs : nowMs;
|
|
3577
|
+
if (ts > maxUpdatedAt) maxUpdatedAt = ts;
|
|
3578
|
+
mergedCategories[catId] = {
|
|
3579
|
+
...currentCategories[catId],
|
|
3580
|
+
order: cat.order,
|
|
3581
|
+
updatedAt: ts
|
|
3582
|
+
};
|
|
3583
|
+
}
|
|
3584
|
+
committedCount += chunk.length;
|
|
3585
|
+
}
|
|
3586
|
+
} catch (err) {
|
|
3587
|
+
if (committedCount > 0) {
|
|
3588
|
+
const partialSpace = await syncLocalSpaceEntityCache(thunkAPI, spaceKey, {
|
|
3589
|
+
...spaceData,
|
|
3590
|
+
categories: mergedCategories,
|
|
3591
|
+
updatedAt: maxUpdatedAt || nowMs
|
|
3592
|
+
});
|
|
3593
|
+
syncCurrentSpace(spaceId, partialSpace);
|
|
3594
|
+
}
|
|
3595
|
+
throw err;
|
|
3596
|
+
}
|
|
3597
|
+
updatedSpaceData = await syncLocalSpaceEntityCache(thunkAPI, spaceKey, {
|
|
3598
|
+
...spaceData,
|
|
3599
|
+
categories: mergedCategories,
|
|
3600
|
+
updatedAt: maxUpdatedAt || nowMs
|
|
3601
|
+
});
|
|
3602
|
+
} else {
|
|
3603
|
+
updatedSpaceData = await dispatch(
|
|
3604
|
+
patch({ dbKey: spaceKey, changes })
|
|
3605
|
+
).unwrap();
|
|
3606
|
+
}
|
|
3463
3607
|
syncCurrentSpace(spaceId, updatedSpaceData);
|
|
3464
3608
|
return { spaceId, updatedSpaceData };
|
|
3465
3609
|
}
|
|
@@ -4677,7 +4821,7 @@ async function deleteDialogsFunc(args, thunkApi) {
|
|
|
4677
4821
|
const deletedDialogIds = [];
|
|
4678
4822
|
const deletedDialogKeys = [];
|
|
4679
4823
|
const failures = [];
|
|
4680
|
-
const { deleteDbKey: deleteDbKey2 } = await import("./deleteDbKey-
|
|
4824
|
+
const { deleteDbKey: deleteDbKey2 } = await import("./deleteDbKey-KV6MYBAI.js");
|
|
4681
4825
|
for (const target of targets) {
|
|
4682
4826
|
try {
|
|
4683
4827
|
await thunkApi.dispatch(deleteDbKey2(target.dbKey));
|
|
@@ -5734,7 +5878,46 @@ var updateSpaceAction = async (input, thunkAPI) => {
|
|
|
5734
5878
|
const now = Date.now();
|
|
5735
5879
|
changes.updatedAt = now;
|
|
5736
5880
|
const patchChanges = { ...normalizedChanges, updatedAt: now };
|
|
5881
|
+
const hasRemoteFields = changes.name !== void 0 || changes.description !== void 0 || changes.visibility !== void 0;
|
|
5737
5882
|
let updatedSpaceData;
|
|
5883
|
+
if (hasRemoteFields && isRemoteAccountSpace(spaceData, state)) {
|
|
5884
|
+
const trimmedDescription = typeof changes.description === "string" ? changes.description.trim().slice(0, 1e3) : void 0;
|
|
5885
|
+
let apiRes;
|
|
5886
|
+
try {
|
|
5887
|
+
apiRes = await mutateDbOps(state, [
|
|
5888
|
+
{
|
|
5889
|
+
op: "patch",
|
|
5890
|
+
key: spMetaKey(spaceId),
|
|
5891
|
+
value: {
|
|
5892
|
+
...changes.name !== void 0 ? { name: changes.name } : {},
|
|
5893
|
+
...trimmedDescription !== void 0 ? { description: trimmedDescription } : {},
|
|
5894
|
+
...changes.visibility !== void 0 ? { visibility: changes.visibility } : {}
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
]);
|
|
5898
|
+
} catch (apiError) {
|
|
5899
|
+
throw new Error(`\u66F4\u65B0\u7A7A\u95F4\u8BBE\u7F6E\u5931\u8D25: ${toErrorMessage(apiError)}`);
|
|
5900
|
+
}
|
|
5901
|
+
const effectiveUpdatedAt = apiRes?.applied?.[0]?.updatedAt ?? now;
|
|
5902
|
+
const nextLocalSpace = {
|
|
5903
|
+
...spaceData,
|
|
5904
|
+
...normalizedChanges,
|
|
5905
|
+
...trimmedDescription !== void 0 ? { description: trimmedDescription } : {},
|
|
5906
|
+
updatedAt: effectiveUpdatedAt
|
|
5907
|
+
};
|
|
5908
|
+
for (const [k, v] of Object.entries(normalizedChanges)) {
|
|
5909
|
+
if (v === null) delete nextLocalSpace[k];
|
|
5910
|
+
}
|
|
5911
|
+
updatedSpaceData = await syncLocalSpaceEntityCache(
|
|
5912
|
+
thunkAPI,
|
|
5913
|
+
spaceKey,
|
|
5914
|
+
nextLocalSpace
|
|
5915
|
+
);
|
|
5916
|
+
return {
|
|
5917
|
+
updatedSpace: updatedSpaceData,
|
|
5918
|
+
spaceId
|
|
5919
|
+
};
|
|
5920
|
+
}
|
|
5738
5921
|
try {
|
|
5739
5922
|
updatedSpaceData = await dispatch(
|
|
5740
5923
|
patch({
|
|
@@ -19677,7 +19860,7 @@ async function updateDocFunc(args, thunkApi) {
|
|
|
19677
19860
|
allowSkillMetadataWrite: false
|
|
19678
19861
|
});
|
|
19679
19862
|
await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
|
|
19680
|
-
const { getDocState, applyExternalDocUpdate } = await import("./docStore-
|
|
19863
|
+
const { getDocState, applyExternalDocUpdate } = await import("./docStore-GWPFDV6Y.js");
|
|
19681
19864
|
if (getDocState().pageKey === id) {
|
|
19682
19865
|
applyExternalDocUpdate({
|
|
19683
19866
|
slateData: finalSlateData,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LYPJYBE5.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DBCWXGOC.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
10
|
} from "./chunk-SVKWZ3EG.js";
|