nolo-cli 0.73.0-alpha.1 → 0.73.0
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-YCKNRHGK.js → _executeModel-L4LCNFID.js} +15 -15
- package/{agentDeleteCommand-FSIMTL4K.js → agentDeleteCommand-COEAQ4NI.js} +10 -10
- package/{agentEmailCommands-NB4LKSYO.js → agentEmailCommands-JGAV4CY4.js} +20 -19
- package/{agentListCommands-2YWZYH52.js → agentListCommands-LKSEO2CX.js} +13 -13
- package/{agentMachineCommands-KY64CTJQ.js → agentMachineCommands-CJTIHC4J.js} +10 -10
- package/{agentRecordCommands-QSMNZZJG.js → agentRecordCommands-AJU74C7D.js} +20 -19
- package/{agentRunCommand-J46VK6FV.js → agentRunCommand-UHKKYRTL.js} +21 -20
- package/{agentRuntimeLocal-O6DZDTK4.js → agentRuntimeLocal-FOR7RUGO.js} +10 -10
- package/{agentSlice-SLXBJ4NO.js → agentSlice-43ORUHTC.js} +1 -1
- package/{appDeleteCommands-HIJNWSK7.js → appDeleteCommands-FFS2TFI6.js} +11 -11
- package/{appDeployCommands-XULV2ZN6.js → appDeployCommands-OEDNTUTL.js} +11 -11
- package/{appDeployStatusCommands-ETY4Z7K6.js → appDeployStatusCommands-6GMLQMNZ.js} +11 -11
- package/{appGetCommands-M253LKDA.js → appGetCommands-KENXRWWU.js} +11 -11
- package/{appListCommands-XYFXJMNP.js → appListCommands-RH3LPDOI.js} +11 -11
- package/{chatQueueReduxAdapter-QM2VAX2O.js → chatQueueReduxAdapter-F3IRDXDQ.js} +2 -2
- package/chromeCommands-VOIRNJBL.js +499 -0
- package/chromeOpsCommands-M7DPCX2T.js +258 -0
- package/{chunk-RZXW3OQR.js → chunk-3AYN7JOX.js} +99 -14
- package/{chunk-RFUMIH4D.js → chunk-6S3P22RD.js} +23 -7
- package/{chunk-ZFCKTVS5.js → chunk-7QHSEMMD.js} +2 -2
- package/{chunk-CJ23A7U4.js → chunk-AFG4XK2P.js} +25 -16
- package/{chunk-Q6FF2MCK.js → chunk-BOYUESO7.js} +1 -1
- package/{chunk-3Q6IRFKW.js → chunk-BWVFOBTO.js} +5586 -355
- package/{chunk-ZLPA7K55.js → chunk-CPSZJBLK.js} +1 -1
- package/{chunk-2QDDKFG5.js → chunk-CQ3WA2NE.js} +77 -0
- package/{chunk-B62OSA77.js → chunk-D6XYLSOS.js} +1 -1
- package/{chunk-O5BQBXPT.js → chunk-DAIOZ3ZO.js} +66 -120
- package/{chunk-JWO3RQSH.js → chunk-DUJWWUGV.js} +1 -1
- package/{chunk-EDKF7RX4.js → chunk-EOARMOVD.js} +2 -0
- package/{chunk-T7PQFKJU.js → chunk-FNGAF7C4.js} +2 -2
- package/{chunk-OVIWUKZU.js → chunk-GEH7MMBB.js} +1 -1
- package/{chunk-IZVGS7I4.js → chunk-IHTVDCWH.js} +2 -2
- package/{chunk-KZNSQBYS.js → chunk-J4R5XRX5.js} +43 -39
- package/{chunk-72I27DY3.js → chunk-JQBONKAV.js} +2 -2
- package/{chunk-YCDWJX45.js → chunk-KC5FAHVS.js} +1 -1
- package/{chunk-3U3EA3BO.js → chunk-KVDUCO4Q.js} +3 -3
- package/{chunk-AUKZOZFG.js → chunk-NRALD3CC.js} +2 -2
- package/{chunk-TVCEQO7Z.js → chunk-PEIXE6MU.js} +2 -2
- package/{chunk-HXAINXPQ.js → chunk-QC5LGHYP.js} +1 -1
- package/chunk-QCZX4FTW.js +242 -0
- package/{chunk-26Q7BEUX.js → chunk-QNWHWBB7.js} +5 -5
- package/{chunk-CHF7R74H.js → chunk-QQ7SX52C.js} +5 -5
- package/{chunk-BUWJ35JI.js → chunk-QQBO3LQW.js} +25 -11
- package/{chunk-Q4OT2DC7.js → chunk-WL2RKIBF.js} +1 -1
- package/{chunk-IDZTNRP2.js → chunk-X7HHHIOZ.js} +10 -2
- package/{chunk-NO5V2FJH.js → chunk-XKNBWXDH.js} +3 -3
- package/{chunk-FPTQQSS6.js → chunk-YWG6EMH3.js} +23 -2
- package/{chunk-V3ZKNK5D.js → chunk-ZVN6I33J.js} +5 -5
- package/{contentThunks-L25U6PGY.js → contentThunks-FSQPOFYG.js} +3 -3
- package/{createAgentAutomationAction-AVO4SGAB.js → createAgentAutomationAction-VCHDRJ6X.js} +3 -3
- package/{createDialogAction-CRM7655J.js → createDialogAction-KZM5IE4P.js} +4 -4
- package/{createPageAction-MZBXQPMN.js → createPageAction-IGMXJOY3.js} +3 -3
- package/{dialogCommands-PE5FEFJ5.js → dialogCommands-WLE4ZHK3.js} +11 -11
- package/{dialogSlice-DVUADIHJ.js → dialogSlice-YBTC3GAW.js} +2 -2
- package/{docCreateCommands-IPDFZVPG.js → docCreateCommands-LIZEUYKH.js} +10 -10
- package/{docDeleteCommands-VQ4Y66CM.js → docDeleteCommands-SSZWXPT6.js} +11 -11
- package/{docReadCommands-PD33VV27.js → docReadCommands-IUEKS6JR.js} +10 -10
- package/{docStore-OREDKMJV.js → docStore-SDPT23I6.js} +1 -1
- package/{docUpdateCommands-CGUQ2JY3.js → docUpdateCommands-R4CGESVN.js} +10 -10
- package/{handleSendMessageAction-4EZCK5L4.js → handleSendMessageAction-356IDG72.js} +2 -2
- package/index.js +108 -48
- package/{machineCommands-LILMX4Q6.js → machineCommands-H6F3GXOE.js} +19 -18
- package/{machineWsRunDispatch-CS5WKOMR.js → machineWsRunDispatch-MB55UMT5.js} +19 -18
- package/package.json +1 -1
- package/{readlineWorkspace-TNCGQG3G.js → readlineWorkspace-WOZVBRMC.js} +52 -33
- package/{runAgentClientLoop-DLBWIW7B.js → runAgentClientLoop-DKUUFUKT.js} +13 -13
- package/{spaceCommands-Y47DDAQD.js → spaceCommands-3XCQ2RRJ.js} +10 -10
- package/{streamAgentChatTurn-PC75F4UN.js → streamAgentChatTurn-FHZZCANP.js} +16 -16
- package/{tools-F5DJNXLT.js → tools-QZJX3BIC.js} +10 -8
- package/{tuiSummaryLlmCaller-J5BEPLW5.js → tuiSummaryLlmCaller-3Z24VUWM.js} +2 -2
- package/{updateCommands-AJYSD73Y.js → updateCommands-Y363MC3L.js} +2 -2
- package/{updateDialogTitleAction-IHI6S2PU.js → updateDialogTitleAction-JJPNGTAP.js} +3 -3
|
@@ -160,6 +160,82 @@ function hasParsableObjectArguments(raw) {
|
|
|
160
160
|
return false;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
+
var STRICT_JSON_STRING_TOKEN = /^"(?:[^"\\\u0000-\u001F]|\\["\\/bfnrt]|\\u[0-9A-Fa-f]{4})*"$/;
|
|
164
|
+
function isStrictJsonStringToken(value) {
|
|
165
|
+
if (!STRICT_JSON_STRING_TOKEN.test(value)) return false;
|
|
166
|
+
try {
|
|
167
|
+
return typeof JSON.parse(value) === "string";
|
|
168
|
+
} catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function closersOf(openStack) {
|
|
173
|
+
return openStack.slice().reverse().map((ch) => ch === "{" ? "}" : "]").join("");
|
|
174
|
+
}
|
|
175
|
+
function scanJsonForTailRepair(input) {
|
|
176
|
+
const stack = [];
|
|
177
|
+
let inString = false;
|
|
178
|
+
let escaped = false;
|
|
179
|
+
let lastCommaOutsideString = null;
|
|
180
|
+
for (let i = 0; i < input.length; i += 1) {
|
|
181
|
+
const ch = input[i];
|
|
182
|
+
if (inString) {
|
|
183
|
+
if (escaped) escaped = false;
|
|
184
|
+
else if (ch === "\\") escaped = true;
|
|
185
|
+
else if (ch === '"') inString = false;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if (ch === '"') {
|
|
189
|
+
inString = true;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (ch === "{" || ch === "[") {
|
|
193
|
+
stack.push(ch);
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (ch === "}" || ch === "]") {
|
|
197
|
+
const open = stack.pop();
|
|
198
|
+
if (open !== (ch === "}" ? "{" : "[")) return null;
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
if (ch === ",") {
|
|
202
|
+
lastCommaOutsideString = { index: i, closers: closersOf(stack) };
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return { inString, closers: closersOf(stack), lastCommaOutsideString };
|
|
207
|
+
}
|
|
208
|
+
function repairTruncatedToolArguments(raw) {
|
|
209
|
+
if (typeof raw !== "string") return null;
|
|
210
|
+
const withoutTrailingSpace = raw.replace(/\s+$/, "");
|
|
211
|
+
const endsWithComma = withoutTrailingSpace.endsWith(",");
|
|
212
|
+
const trimmed = endsWithComma ? withoutTrailingSpace.slice(0, -1).replace(/\s+$/, "") : withoutTrailingSpace;
|
|
213
|
+
if (trimmed === "" || trimmed.endsWith(",")) return null;
|
|
214
|
+
const scan = scanJsonForTailRepair(trimmed);
|
|
215
|
+
if (!scan || scan.inString) return null;
|
|
216
|
+
const lastChar = trimmed[trimmed.length - 1];
|
|
217
|
+
const tailIsCompleteToken = endsWithComma || lastChar === '"' || lastChar === "}" || lastChar === "]";
|
|
218
|
+
if (!tailIsCompleteToken) return null;
|
|
219
|
+
const candidates = [trimmed + scan.closers];
|
|
220
|
+
const lastComma = scan.lastCommaOutsideString;
|
|
221
|
+
if (lastComma && lastComma.index > 0) {
|
|
222
|
+
const tailAfterComma = trimmed.slice(lastComma.index + 1).trim();
|
|
223
|
+
if (isStrictJsonStringToken(tailAfterComma)) {
|
|
224
|
+
const head = trimmed.slice(0, lastComma.index);
|
|
225
|
+
candidates.push(head + lastComma.closers);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
for (const candidate of candidates) {
|
|
229
|
+
try {
|
|
230
|
+
const parsed = JSON.parse(candidate);
|
|
231
|
+
if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) && Object.keys(parsed).length > 0) {
|
|
232
|
+
return candidate;
|
|
233
|
+
}
|
|
234
|
+
} catch {
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
163
239
|
function downgradeUnparsableToolCalls(messages) {
|
|
164
240
|
if (!Array.isArray(messages) || messages.length === 0) {
|
|
165
241
|
return { messages, downgraded: 0 };
|
|
@@ -218,5 +294,6 @@ function downgradeUnparsableToolCalls(messages) {
|
|
|
218
294
|
export {
|
|
219
295
|
sanitizeForOutbound,
|
|
220
296
|
hasParsableObjectArguments,
|
|
297
|
+
repairTruncatedToolArguments,
|
|
221
298
|
downgradeUnparsableToolCalls
|
|
222
299
|
};
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
initReactI18next,
|
|
10
10
|
instance,
|
|
11
11
|
toast
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-J4R5XRX5.js";
|
|
13
13
|
import {
|
|
14
14
|
require_date_fns
|
|
15
15
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -72,7 +72,8 @@ import {
|
|
|
72
72
|
scheduleWriteReplication
|
|
73
73
|
} from "./chunk-3RAG2NAD.js";
|
|
74
74
|
import {
|
|
75
|
-
createClientLogger
|
|
75
|
+
createClientLogger,
|
|
76
|
+
isAbortError
|
|
76
77
|
} from "./chunk-QOKAKDPE.js";
|
|
77
78
|
import {
|
|
78
79
|
selectIdentityUserId
|
|
@@ -102,6 +103,7 @@ var import_date_fns2 = __toESM(require_date_fns(), 1);
|
|
|
102
103
|
import { ulid as ulid3 } from "ulid";
|
|
103
104
|
|
|
104
105
|
// packages/render/table/fetchAndCacheTableRows.ts
|
|
106
|
+
var TABLE_ROWS_FETCH_TIMEOUT_MS = 5e3;
|
|
105
107
|
var getRowTimestamp = (row) => {
|
|
106
108
|
if (!row || typeof row !== "object") return 0;
|
|
107
109
|
return asOptionalPositiveFiniteNumber(Date.parse(row.updatedAt ?? "")) ?? asOptionalPositiveFiniteNumber(Date.parse(row.createdAt ?? "")) ?? 0;
|
|
@@ -155,46 +157,63 @@ var loadLocalTableRows = async (db, tenantId, tableId) => {
|
|
|
155
157
|
}
|
|
156
158
|
return rows;
|
|
157
159
|
};
|
|
158
|
-
var fetchTableRowsFromServer = async (server, tenantId, tableId, headers) => {
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
160
|
+
var fetchTableRowsFromServer = async (server, tenantId, tableId, headers, fetchImpl = fetch) => {
|
|
161
|
+
const controller = new AbortController();
|
|
162
|
+
const timeoutId = setTimeout(
|
|
163
|
+
() => controller.abort(),
|
|
164
|
+
TABLE_ROWS_FETCH_TIMEOUT_MS
|
|
165
|
+
);
|
|
166
|
+
try {
|
|
167
|
+
const res = await fetchImpl(`${server}/rpc/listTableRows`, {
|
|
168
|
+
method: "POST",
|
|
169
|
+
headers,
|
|
170
|
+
body: JSON.stringify({
|
|
171
|
+
tenantId,
|
|
172
|
+
tableId,
|
|
173
|
+
includeDeleted: true,
|
|
174
|
+
envelope: TABLE_SYNC_ENVELOPE
|
|
175
|
+
}),
|
|
176
|
+
signal: controller.signal
|
|
177
|
+
});
|
|
178
|
+
if (!res.ok) {
|
|
179
|
+
let msg = `\u52A0\u8F7D\u8868 ${tableId} \u884C\u5931\u8D25\uFF08${res.status}\uFF09`;
|
|
180
|
+
try {
|
|
181
|
+
const err2 = await res.json();
|
|
182
|
+
if (err2 && typeof err2.message === "string") {
|
|
183
|
+
msg = err2.message;
|
|
184
|
+
}
|
|
185
|
+
} catch {
|
|
175
186
|
}
|
|
176
|
-
|
|
187
|
+
throw new Error(msg);
|
|
188
|
+
}
|
|
189
|
+
const data = await res.json();
|
|
190
|
+
if (Array.isArray(data)) {
|
|
191
|
+
return {
|
|
192
|
+
rows: data,
|
|
193
|
+
deletedRows: [],
|
|
194
|
+
tableMeta: null,
|
|
195
|
+
complete: false
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (!data || typeof data !== "object" || !Array.isArray(data.rows)) {
|
|
199
|
+
throw new Error("\u670D\u52A1\u5668\u8FD4\u56DE\u683C\u5F0F\u9519\u8BEF\uFF1A\u9884\u671F\u4E3A\u6570\u7EC4");
|
|
177
200
|
}
|
|
178
|
-
throw new Error(msg);
|
|
179
|
-
}
|
|
180
|
-
const data = await res.json();
|
|
181
|
-
if (Array.isArray(data)) {
|
|
182
201
|
return {
|
|
183
|
-
rows: data,
|
|
184
|
-
deletedRows: [],
|
|
185
|
-
tableMeta: null,
|
|
186
|
-
complete:
|
|
202
|
+
rows: data.rows,
|
|
203
|
+
deletedRows: Array.isArray(data.deletedRows) ? data.deletedRows : [],
|
|
204
|
+
tableMeta: data.tableMeta ?? null,
|
|
205
|
+
complete: data.complete === true
|
|
187
206
|
};
|
|
207
|
+
} catch (err2) {
|
|
208
|
+
if (isAbortError(err2)) {
|
|
209
|
+
throw new Error(
|
|
210
|
+
`\u52A0\u8F7D\u8868 ${tableId} \u884C\u8D85\u65F6\uFF1A${server} \u5728 ${TABLE_ROWS_FETCH_TIMEOUT_MS / 1e3}s \u5185\u65E0\u54CD\u5E94`
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
throw err2;
|
|
214
|
+
} finally {
|
|
215
|
+
clearTimeout(timeoutId);
|
|
188
216
|
}
|
|
189
|
-
if (!data || typeof data !== "object" || !Array.isArray(data.rows)) {
|
|
190
|
-
throw new Error("\u670D\u52A1\u5668\u8FD4\u56DE\u683C\u5F0F\u9519\u8BEF\uFF1A\u9884\u671F\u4E3A\u6570\u7EC4");
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
rows: data.rows,
|
|
194
|
-
deletedRows: Array.isArray(data.deletedRows) ? data.deletedRows : [],
|
|
195
|
-
tableMeta: data.tableMeta ?? null,
|
|
196
|
-
complete: data.complete === true
|
|
197
|
-
};
|
|
198
217
|
};
|
|
199
218
|
var cacheMergedTableRows = async (db, mergedRows) => {
|
|
200
219
|
if (!db) return;
|
|
@@ -252,7 +271,8 @@ var fetchAndCacheTableRows = async ({
|
|
|
252
271
|
tenantId,
|
|
253
272
|
tableId,
|
|
254
273
|
token,
|
|
255
|
-
remoteServers = []
|
|
274
|
+
remoteServers = [],
|
|
275
|
+
fetchImpl = fetch
|
|
256
276
|
}) => {
|
|
257
277
|
const headers = {
|
|
258
278
|
"Content-Type": "application/json"
|
|
@@ -263,7 +283,7 @@ var fetchAndCacheTableRows = async ({
|
|
|
263
283
|
const localRows = await loadLocalTableRows(db, tenantId, tableId);
|
|
264
284
|
const remoteResults = await Promise.allSettled(
|
|
265
285
|
remoteServers.map(
|
|
266
|
-
(server) => fetchTableRowsFromServer(server, tenantId, tableId, headers)
|
|
286
|
+
(server) => fetchTableRowsFromServer(server, tenantId, tableId, headers, fetchImpl)
|
|
267
287
|
)
|
|
268
288
|
);
|
|
269
289
|
const fulfilledRemoteSnapshots = remoteResults.filter(
|
|
@@ -367,43 +387,6 @@ function reorderColumnInMeta(meta, input, deps) {
|
|
|
367
387
|
buildMeta(meta, reorderList(meta.columns, fromIndex, toIndex), deps.nowIso)
|
|
368
388
|
);
|
|
369
389
|
}
|
|
370
|
-
function renameColumnInMeta(meta, rows, input, deps) {
|
|
371
|
-
const { oldName } = input;
|
|
372
|
-
const { nowIso } = deps;
|
|
373
|
-
const newName = input.newName.trim();
|
|
374
|
-
if (!newName) {
|
|
375
|
-
return err("\u65B0\u7684\u5B57\u6BB5\u540D\u4E0D\u80FD\u4E3A\u7A7A");
|
|
376
|
-
}
|
|
377
|
-
if (!meta.columns.some((c) => c.name === oldName)) {
|
|
378
|
-
return err(`\u5B57\u6BB5 ${oldName} \u4E0D\u5B58\u5728`);
|
|
379
|
-
}
|
|
380
|
-
if (meta.columns.some((c) => c.name === newName)) {
|
|
381
|
-
return err(`\u5B57\u6BB5 ${newName} \u5DF2\u5B58\u5728`);
|
|
382
|
-
}
|
|
383
|
-
const newColumns = meta.columns.map(
|
|
384
|
-
(c) => c.name === oldName ? { ...c, name: newName } : c
|
|
385
|
-
);
|
|
386
|
-
const rowPatches = rows.filter((row) => hasOwn(row, oldName)).map((row) => ({
|
|
387
|
-
dbKey: row.dbKey,
|
|
388
|
-
changes: {
|
|
389
|
-
[newName]: row[oldName],
|
|
390
|
-
[oldName]: null,
|
|
391
|
-
updatedAt: nowIso
|
|
392
|
-
}
|
|
393
|
-
}));
|
|
394
|
-
const newRows = rows.map((row) => {
|
|
395
|
-
if (!hasOwn(row, oldName)) {
|
|
396
|
-
return row;
|
|
397
|
-
}
|
|
398
|
-
const { [oldName]: oldValue, ...rest } = row;
|
|
399
|
-
return { ...rest, [newName]: oldValue, updatedAt: nowIso };
|
|
400
|
-
});
|
|
401
|
-
return ok({
|
|
402
|
-
...buildMeta(meta, newColumns, nowIso),
|
|
403
|
-
rows: newRows,
|
|
404
|
-
rowPatches
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
390
|
function renameColumnLabelInMeta(meta, input, deps) {
|
|
408
391
|
const { columnId } = input;
|
|
409
392
|
const label = input.label.trim();
|
|
@@ -460,7 +443,13 @@ import { ulid as ulid2 } from "ulid";
|
|
|
460
443
|
instance.use(initReactI18next).init({
|
|
461
444
|
...i18nBaseConfig,
|
|
462
445
|
lng: "zh-CN" /* ZH_CN */,
|
|
463
|
-
fallbackLng:
|
|
446
|
+
fallbackLng: {
|
|
447
|
+
["en" /* EN */]: ["en" /* EN */],
|
|
448
|
+
["zh-CN" /* ZH_CN */]: ["zh-CN" /* ZH_CN */, "en" /* EN */],
|
|
449
|
+
["zh-Hant" /* ZH_HANT */]: ["zh-Hant" /* ZH_HANT */, "zh-CN" /* ZH_CN */, "en" /* EN */],
|
|
450
|
+
["ja" /* JA */]: ["ja" /* JA */, "en" /* EN */],
|
|
451
|
+
default: ["en" /* EN */]
|
|
452
|
+
},
|
|
464
453
|
compatibilityJSON: "v3"
|
|
465
454
|
});
|
|
466
455
|
var client_default = instance;
|
|
@@ -1189,49 +1178,6 @@ var reorderColumn = createTableCommand(
|
|
|
1189
1178
|
}
|
|
1190
1179
|
}
|
|
1191
1180
|
);
|
|
1192
|
-
var renameColumn = createTableCommand(
|
|
1193
|
-
"table/renameColumn",
|
|
1194
|
-
async (args, { dispatch } = {}) => {
|
|
1195
|
-
const { tenantId, tableId, oldName, newName } = args;
|
|
1196
|
-
const meta = state.currentTable;
|
|
1197
|
-
if (!meta || meta.tenantId !== tenantId || meta.tableId !== tableId) {
|
|
1198
|
-
throw new Error("\u5F53\u524D\u6CA1\u6709\u52A0\u8F7D\u5BF9\u5E94\u7684\u8868\u5B9A\u4E49");
|
|
1199
|
-
}
|
|
1200
|
-
const result = renameColumnInMeta(
|
|
1201
|
-
meta,
|
|
1202
|
-
state.rows,
|
|
1203
|
-
{ oldName, newName },
|
|
1204
|
-
{ nowIso: (0, import_date_fns2.formatISO)(/* @__PURE__ */ new Date()) }
|
|
1205
|
-
);
|
|
1206
|
-
if (!result.ok) {
|
|
1207
|
-
throw new Error(result.error);
|
|
1208
|
-
}
|
|
1209
|
-
const { meta: nextMeta, metaChanges, rows: newRows, rowPatches } = result.value;
|
|
1210
|
-
setState((s) => ({ ...s, error: null }));
|
|
1211
|
-
try {
|
|
1212
|
-
if (dispatch) {
|
|
1213
|
-
await Promise.all(
|
|
1214
|
-
rowPatches.map((p) => safeDispatch(dispatch, patch(p)))
|
|
1215
|
-
);
|
|
1216
|
-
await safeDispatch(
|
|
1217
|
-
dispatch,
|
|
1218
|
-
patch({ dbKey: meta.dbKey, changes: metaChanges })
|
|
1219
|
-
);
|
|
1220
|
-
}
|
|
1221
|
-
setState((s) => ({
|
|
1222
|
-
...s,
|
|
1223
|
-
currentTable: nextMeta,
|
|
1224
|
-
rows: newRows,
|
|
1225
|
-
isInitialized: true
|
|
1226
|
-
}));
|
|
1227
|
-
return { meta: nextMeta, rows: newRows };
|
|
1228
|
-
} catch (e) {
|
|
1229
|
-
const msg = e?.message || "\u91CD\u547D\u540D\u5B57\u6BB5\u5931\u8D25";
|
|
1230
|
-
setState((s) => ({ ...s, error: msg }));
|
|
1231
|
-
throw e;
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
);
|
|
1235
1181
|
var renameColumnLabel = createTableCommand(
|
|
1236
1182
|
"table/renameColumnLabel",
|
|
1237
1183
|
async (args, { dispatch } = {}) => {
|
|
@@ -14,6 +14,7 @@ var buildResponseGuidelines = (isMobile) => {
|
|
|
14
14
|
\u5F53\u524D\u5904\u4E8E\u7A84\u5C4F\u6216\u7EC8\u7AEF\u89C6\u56FE\uFF0C\u91C7\u7528\u7D27\u51D1\u3001\u9AD8\u626B\u63CF\u7387\u6392\u7248\uFF1A\u7ED3\u8BBA/\u5173\u952E\u72B6\u6001\u7F6E\u9876\uFF0C\u77ED\u6BB5\u843D\uFF082-4 \u53E5\uFF09\u5E76\u4FDD\u6301\u7A7A\u884C\uFF0C\u62D2\u7EDD\u6587\u5B57\u5899\u3002
|
|
15
15
|
- \u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
|
|
16
16
|
- **\u8868\u683C\u964D\u7EA7**\uFF1A\u4E25\u7981\u4F7F\u7528 \u22654 \u5217\u7684\u5927\u5BBD\u8868\uFF08\u7A84\u5C4F/\u7EC8\u7AEF\u6298\u884C\u4E25\u91CD\u9519\u4F4D\uFF09\uFF0C\u6539\u7528\u952E\u503C\u6E05\u5355\u6216\u7EB5\u5411\u5361\u7247\u3002
|
|
17
|
+
- **\u56FE\u8868\u8868\u8FBE**\uFF1A\u6D41\u7A0B\u3001\u65F6\u5E8F\u3001\u72B6\u6001\u8FC1\u79FB\u3001\u7C7B/\u5B9E\u4F53\u5173\u7CFB\u7B49\u7ED3\u6784\u5316\u5185\u5BB9\u7528 \`\`\`mermaid \u4EE3\u7801\u5757\uFF08\u652F\u6301\u7684\u5BA2\u6237\u7AEF\u4F1A\u6E32\u67D3\u4E3A\u56FE\uFF09\uFF0C\u4E0D\u8981\u7528 ASCII \u624B\u7ED8\u6216\u957F\u6BB5\u6587\u5B57\u786C\u63CF\u8FF0\uFF1B\u4E00\u6B65\u6D41\u7A0B\u4E0D\u5FC5\u753B\u56FE\u3002
|
|
17
18
|
- \u514B\u5236\u5206\u5272\u7EBF\uFF08\u4EC5\u5927\u4E3B\u9898\u5207\u6362\u6216\u7ED3\u8BBA\u524D\uFF0C\u524D\u540E\u7559\u7A7A\u884C\uFF09\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF1B\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\u4E14\u907F\u514D\u6A2A\u5411\u8D85\u957F\u884C\uFF1B\u514B\u5236 Emoji\u3002`;
|
|
18
19
|
}
|
|
19
20
|
return `${RESPONSE_BEHAVIOR_GUIDELINES}
|
|
@@ -22,6 +23,7 @@ var buildResponseGuidelines = (isMobile) => {
|
|
|
22
23
|
\u5F53\u524D\u5904\u4E8E\u5927\u5C4F\u89C6\u56FE\uFF1A\u5C42\u6B21\u6E05\u6670\u7684\u5168\u666F\u7ED3\u6784\uFF0C\u91CD\u8981\u6A21\u5757\u7528\u4E8C\u7EA7/\u4E09\u7EA7\u6807\u9898\u5212\u5206\uFF1B\u6BB5\u843D 2-4 \u53E5\u5E76\u7559\u7A7A\u884C\uFF0C\u76F4\u5954\u4E3B\u9898\u3002
|
|
23
24
|
- \u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
|
|
24
25
|
- **\u8868\u683C\u4E0E\u5BF9\u6BD4**\uFF1A\u5BBD\u5C4F\u4E0B\u53EF\u9002\u5EA6\u4F7F\u7528 Markdown \u591A\u5217\u8868\u683C\u505A\u65B9\u6848\u5BF9\u6BD4\u3001\u53C2\u6570\u6C47\u603B\u6216\u77E9\u9635\u5206\u6790\u3002
|
|
26
|
+
- **\u56FE\u8868\u8868\u8FBE**\uFF1A\u6D41\u7A0B\u3001\u65F6\u5E8F\u3001\u72B6\u6001\u8FC1\u79FB\u3001\u7C7B/\u5B9E\u4F53\u5173\u7CFB\u7B49\u7ED3\u6784\u5316\u5185\u5BB9\u7528 \`\`\`mermaid \u4EE3\u7801\u5757\uFF08\u652F\u6301\u7684\u5BA2\u6237\u7AEF\u4F1A\u6E32\u67D3\u4E3A\u56FE\uFF09\uFF0C\u6BD4\u957F\u6BB5\u6587\u5B57\u66F4\u6E05\u695A\uFF1B\u7B80\u5355\u5185\u5BB9\u4E0D\u5FC5\u753B\u56FE\u3002
|
|
25
27
|
- \u53EF\u5C55\u793A\u66F4\u5B8C\u6574\u7684\u4EE3\u7801\u4E0A\u4E0B\u6587\u4E0E\u591A\u6B65\u6267\u884C\u793A\u4F8B\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF0C\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\uFF1B\u514B\u5236\u5206\u5272\u7EBF\u4E0E Emoji\u3002`;
|
|
26
28
|
};
|
|
27
29
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WL2RKIBF.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchWithTransientRetry
|
|
13
13
|
} from "./chunk-5XTOKQLW.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
boundSummaryText,
|
|
31
31
|
buildDialogReadEnvelope,
|
|
32
32
|
projectDialogReadForAgent
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZVN6I33J.js";
|
|
34
34
|
import {
|
|
35
35
|
toErrorMessage
|
|
36
36
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -326,7 +326,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
326
326
|
).unwrap();
|
|
327
327
|
if (dbSpaceId) {
|
|
328
328
|
try {
|
|
329
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
329
|
+
const { updateContentTitle } = await import("./contentThunks-FSQPOFYG.js");
|
|
330
330
|
await dispatch(
|
|
331
331
|
updateContentTitle({
|
|
332
332
|
spaceId: dbSpaceId,
|
|
@@ -365,7 +365,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
async function createDocState(args, thunkApi) {
|
|
368
|
-
const { createPageAction } = await import("./createPageAction-
|
|
368
|
+
const { createPageAction } = await import("./createPageAction-IGMXJOY3.js");
|
|
369
369
|
return createPageAction(args, thunkApi);
|
|
370
370
|
}
|
|
371
371
|
function subscribe(listener) {
|