nolo-cli 0.16.0 → 0.18.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-AVCA2NAV.js → _executeModel-X5PCIZN6.js} +50 -44
- package/{action-F5JACQBG.js → action-LT7BRFLK.js} +10 -9
- package/{addContentAction-AQXEYRBE.js → addContentAction-PL3KKBDH.js} +9 -8
- package/{addDialogAgentAction-EJHHJZWW.js → addDialogAgentAction-FCMSKYAF.js} +8 -7
- package/{agentDeleteCommand-QW5PUMDQ.js → agentDeleteCommand-2BZDQV36.js} +32 -29
- package/{agentEmailCommands-4ORVLGVQ.js → agentEmailCommands-2QJDGRMB.js} +62 -56
- package/{agentListCommands-YWBYRTYC.js → agentListCommands-6VEPTKBI.js} +31 -28
- package/{agentMachineCommands-JSQW4FOA.js → agentMachineCommands-NVVHNWYI.js} +30 -27
- package/{agentPullCommand-6HWUT3SW.js → agentPullCommand-ZZGU5KOY.js} +4 -4
- package/{agentRecordCommands-AASIWOBT.js → agentRecordCommands-4GGRDMD4.js} +57 -51
- package/{agentRunCommand-TB5BHXUH.js → agentRunCommand-XOLQNKBZ.js} +63 -54
- package/{agentRunControl-6ADXVYMR.js → agentRunControl-Y5AFH5PQ.js} +24 -1
- package/{agentRuntimeLocal-QNPNJRVH.js → agentRuntimeLocal-7WYWCGL4.js} +25 -22
- package/{agentSlice-RUNXC62Y.js → agentSlice-EAXPGEYV.js} +9 -8
- package/appDeleteCommands-77KR2RJ4.js +127 -0
- package/appDeployCommands-K7CAHGBI.js +166 -0
- package/appDeployStatusCommands-4OEKLTBT.js +147 -0
- package/appGetCommands-VM2WDLAZ.js +122 -0
- package/appListCommands-GX6BBA6U.js +125 -0
- package/{authCommand-YFTR3347.js → authCommand-DY6UUL6O.js} +16 -9
- package/{authCommands-YXGOXNBZ.js → authCommands-XTBV7OFZ.js} +6 -5
- package/{chunk-DPAB4FQ7.js → chunk-23FZYPLC.js} +1608 -212
- package/{chunk-LPEUV5RE.js → chunk-34WPV75U.js} +23 -2
- package/{chunk-XPC5C7BK.js → chunk-3ND52WIL.js} +2 -2
- package/{chunk-SOTZ6RDN.js → chunk-3Q7WHGCB.js} +1 -1
- package/{chunk-3OIRVWXA.js → chunk-3ZX7PERL.js} +10 -1
- package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
- package/{chunk-6N4KODMN.js → chunk-4T5F7YZQ.js} +1 -1
- package/chunk-7BUYEZ6U.js +671 -0
- package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
- package/{chunk-IGXREZW2.js → chunk-AHCY2S2I.js} +1 -1
- package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
- package/{chunk-MTU75CZ2.js → chunk-B5TOXZAK.js} +1 -1
- package/{chunk-AUURUT6L.js → chunk-BV4VEE3W.js} +264 -424
- package/{chunk-FRV6A633.js → chunk-CZ6NYQTV.js} +13 -4
- package/{chunk-PCTUYVUM.js → chunk-DFCFMCY6.js} +10 -3
- package/{chunk-JTMNCCWF.js → chunk-DKZFOK24.js} +16 -87
- package/chunk-DL6EPNIK.js +50 -0
- package/{chunk-ZQBL7LIC.js → chunk-EDV7EBOI.js} +317 -216
- package/{chunk-IWLUTMYX.js → chunk-ELT65PZW.js} +2 -2
- package/chunk-FQZZLA3C.js +223 -0
- package/{chunk-55NSNCFM.js → chunk-FXUSIQC2.js} +1 -1
- package/{chunk-MR6ISAGB.js → chunk-G5U6LDLG.js} +6 -6
- package/chunk-GFUIQ4RY.js +136 -0
- package/{chunk-NVEWUJVX.js → chunk-HEGV7BH3.js} +1 -1
- package/{chunk-BEBNFWDU.js → chunk-HWW2M4SN.js} +3 -3
- package/{chunk-4L2OJPCU.js → chunk-I2ZJKTG5.js} +58 -8
- package/{chunk-Z5JQNBNY.js → chunk-IYEXFJPC.js} +34 -15
- package/{setDialogExtraReferencesAction-LR6MSIXO.js → chunk-JLA4FXYC.js} +2 -17
- package/chunk-KFEVY3ST.js +255 -0
- package/{chunk-4FX6NVDW.js → chunk-L4F3I4SR.js} +3 -136
- package/{chunk-XBS2WYJ2.js → chunk-LLWKHDG4.js} +1 -1
- package/{chunk-3WGLLTK4.js → chunk-LSFAWXKC.js} +100 -3
- package/{chunk-6EVITP2G.js → chunk-MHSGJW4Z.js} +2 -251
- package/{chunk-O6W2O2DA.js → chunk-MKA6QE5E.js} +6 -2
- package/{chunk-DGEYDWEZ.js → chunk-MPVYDS7I.js} +3 -3
- package/{chunk-KFHN5NGJ.js → chunk-MVQ4TBSD.js} +1 -1
- package/{chunk-AVVZUXXC.js → chunk-N54HIJVJ.js} +34 -13
- package/{chunk-EHLHSX7R.js → chunk-OK6YSWLH.js} +9 -2
- package/{chunk-33BJUVK4.js → chunk-PIZYJVHQ.js} +5 -5
- package/{chunk-RLCXU7A5.js → chunk-PJSV3IZ5.js} +1 -1
- package/{chunk-7UKFVQ5W.js → chunk-R35XMF6F.js} +126 -41
- package/{chunk-OOSFSFMA.js → chunk-R5V5G73M.js} +2 -0
- package/{chunk-S2LXHNHG.js → chunk-REA4JLBH.js} +6 -6
- package/chunk-RQN4SEKL.js +107 -0
- package/{chunk-EABWT43X.js → chunk-RVOUXDFU.js} +5 -5
- package/{chunk-NSCHQQPU.js → chunk-SCTYAHYK.js} +470 -325
- package/{chunk-JTINRTBT.js → chunk-SKDNBYZK.js} +2 -2
- package/{chunk-M43KDE25.js → chunk-SWDPIPOY.js} +2 -8
- package/{chunk-KMQPSTMJ.js → chunk-TRT4I4UD.js} +2 -2
- package/{chunk-66X4VSRC.js → chunk-UAIVG4J6.js} +42 -2
- package/{chunk-3663CXZN.js → chunk-UBHAWFQ6.js} +143 -31
- package/{chunk-YJKXGHJ6.js → chunk-UGUW3FHG.js} +4 -4
- package/{chunk-P3RIAYGG.js → chunk-V3ED5AWK.js} +3 -3
- package/chunk-V5R4NZP2.js +78 -0
- package/{chunk-4IJYA27C.js → chunk-VDXCXCXH.js} +1 -1
- package/{chunk-MYMMNKYL.js → chunk-VNAEBGDK.js} +156 -6
- package/{chunk-FY233ZFU.js → chunk-VYHDJEQD.js} +110 -192
- package/{chunk-W4NVOSFF.js → chunk-WFHXMLHZ.js} +1 -1
- package/{chunk-H33743XH.js → chunk-WJRJDX2W.js} +1 -1
- package/chunk-X4Q4UZEY.js +26 -0
- package/{chunk-RPDGJO4D.js → chunk-XHG22OEX.js} +4 -4
- package/{chunk-DVRHHFEA.js → chunk-XMLRJUU5.js} +1 -1
- package/{chunk-3S2VOMIF.js → chunk-XRZJGPFI.js} +7 -7
- package/{chunk-GSINCD4P.js → chunk-YGW4G5W5.js} +25 -12
- package/chunk-ZZ2MH7LE.js +84 -0
- package/{cliExecutor-K3F7DMRO.js → cliExecutor-DNE7TCC4.js} +2 -2
- package/codingSkills-36KN5NQT.js +48 -0
- package/{createAgentAutomationAction-FNHPSKKO.js → createAgentAutomationAction-GNFF524X.js} +20 -19
- package/{createDialogAction-TZCVQ3NU.js → createDialogAction-RB55KCLO.js} +22 -21
- package/{createPageAction-EIGZ3BKT.js → createPageAction-Y7343GLU.js} +26 -25
- package/{db-HCJ5PRB5.js → db-W3O47YGF.js} +38 -12
- package/{dbSlice-7KQH6GOU.js → dbSlice-CGSRFJN3.js} +8 -7
- package/{deleteFile-WPWVZE4B.js → deleteFile-WDZ3VM7B.js} +3 -3
- package/{dialogCommands-FO77J5DQ.js → dialogCommands-IAZK6YHQ.js} +30 -27
- package/{dialogSlice-MM5U4KE2.js → dialogSlice-UQAXF23P.js} +20 -19
- package/{docCreateCommands-I3BS3AZI.js → docCreateCommands-I2EWZGCI.js} +33 -28
- package/{docDeleteCommands-Q2OPV52P.js → docDeleteCommands-IZ45UZKG.js} +32 -27
- package/{docReadCommands-YOOFACYZ.js → docReadCommands-R6Z4QJYU.js} +31 -26
- package/{docStore-NGYQ2JTR.js → docStore-5HOJ4D7D.js} +21 -20
- package/{docUpdateCommands-2B32ITHN.js → docUpdateCommands-2LRBKQPY.js} +32 -27
- package/{fetchMessages-KTNM7QAR.js → fetchMessages-BMGVZVSE.js} +4 -3
- package/{getPricing-P4XRJRZB.js → getPricing-G7DLAST6.js} +3 -3
- package/{handleSendMessageAction-JRZWWBKP.js → handleSendMessageAction-Q4HY35WX.js} +21 -20
- package/index.js +95 -64
- package/{localDialogRead-2VRI24F4.js → localDialogRead-4H3QJFLW.js} +2 -2
- package/{localRuntimeDb-LGDF6FQP.js → localRuntimeDb-THJZGAOJ.js} +1 -1
- package/{machineCommands-WRWF2ICZ.js → machineCommands-PKBPQKTY.js} +63 -57
- package/{machineWsRunDispatch-ZX7Q3TWZ.js → machineWsRunDispatch-UZAW4OXJ.js} +55 -49
- package/{models-WQ5N4OJM.js → models-DJFSJ7SW.js} +2 -2
- package/package.json +1 -1
- package/queryRunOverlay-O4LOMMPO.js +161 -0
- package/{read-CN3TNXIP.js → read-3FMPZPER.js} +3 -3
- package/{readDocTool-WF3675ED.js → readDocTool-VSYHKK3V.js} +1 -1
- package/{readlineWorkspace-ZTGRGW46.js → readlineWorkspace-Y2RDOFZG.js} +762 -218
- package/{removeDialogAgentAction-YDHBFEGI.js → removeDialogAgentAction-OAGA2G3U.js} +10 -9
- package/{runAgentClientLoop-JZCOP7LG.js → runAgentClientLoop-NBPIKJ6J.js} +44 -38
- package/runOverlayPresentation-ZO4VCWEU.js +11 -0
- package/{runtimeDoctorCommands-THIHX2SY.js → runtimeDoctorCommands-E2OUORHK.js} +6 -6
- package/setDialogExtraReferencesAction-JZEXA5SL.js +27 -0
- package/{setPrimaryDialogAgentAction-IIVDCY5C.js → setPrimaryDialogAgentAction-4ZUQQKDG.js} +26 -17
- package/{settingSlice-O23YDK2O.js → settingSlice-7MNKHZ6R.js} +9 -8
- package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
- package/{spaceCommands-VV4GTPQK.js → spaceCommands-DHCZ7J5I.js} +31 -28
- package/{spaceSlice-DRWWZJP7.js → spaceSlice-ZXLLG3CR.js} +20 -19
- package/{streamAgentChatTurn-Y6WGATQR.js → streamAgentChatTurn-L3YW6LSB.js} +98 -57
- package/{tableCommands-3P7MJ3PF.js → tableCommands-BEQAGE4I.js} +1 -1
- package/{tools-PUNBY3AH.js → tools-ECGXR5QF.js} +33 -28
- package/{tuiSummaryLlmCaller-F64WLSAF.js → tuiSummaryLlmCaller-OMSCNHXA.js} +6 -5
- package/types-ZSTJ7MPR.js +7 -0
- package/{updateDialogTitleAction-YSR4TCMB.js → updateDialogTitleAction-HQ2EUDFT.js} +23 -22
- package/{chunk-O4BU24WZ.js → chunk-6Y7A3OQQ.js} +3 -3
- package/{chunk-CMKUBIGW.js → chunk-X7W4TNB4.js} +3 -3
- package/{localRuntimeAuthority-TEGCOWX4.js → localRuntimeAuthority-4IXJCHZ7.js} +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
patch,
|
|
3
3
|
read
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XRZJGPFI.js";
|
|
5
5
|
import {
|
|
6
6
|
DEVICE_LOCAL_OWNER_ID,
|
|
7
7
|
isDeviceLocalSpaceBody,
|
|
8
8
|
selectIdentityUserId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XMLRJUU5.js";
|
|
10
10
|
|
|
11
11
|
// packages/create/space/spaceKeys.ts
|
|
12
12
|
var SEPARATOR = "-";
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// packages/ai/tools/agent/agentRunDisplayHelpers.ts
|
|
2
|
+
function getAgentRunStatusIcon(status) {
|
|
3
|
+
switch (status) {
|
|
4
|
+
case "running":
|
|
5
|
+
case "pending":
|
|
6
|
+
return "\u23F3";
|
|
7
|
+
case "done":
|
|
8
|
+
return "\u2713";
|
|
9
|
+
case "failed":
|
|
10
|
+
case "timeout":
|
|
11
|
+
return "\u2717";
|
|
12
|
+
case "killed":
|
|
13
|
+
case "cancelled":
|
|
14
|
+
case "cancelling":
|
|
15
|
+
return "\u{1F6D1}";
|
|
16
|
+
case "orphaned":
|
|
17
|
+
return "\u{1F47B}";
|
|
18
|
+
case "not_found":
|
|
19
|
+
default:
|
|
20
|
+
return "?";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
var DEFAULT_LABELS = {
|
|
24
|
+
runStatus: "Run status",
|
|
25
|
+
runStarted: "Run started",
|
|
26
|
+
runStopped: "Run stopped",
|
|
27
|
+
runFinished: "Run finished",
|
|
28
|
+
logTail: "Log tail:",
|
|
29
|
+
runs: (count) => `Runs (${count})`
|
|
30
|
+
};
|
|
31
|
+
function resolveLabels(labels) {
|
|
32
|
+
return {
|
|
33
|
+
runStatus: labels?.runStatus ?? DEFAULT_LABELS.runStatus,
|
|
34
|
+
runStarted: labels?.runStarted ?? DEFAULT_LABELS.runStarted,
|
|
35
|
+
runStopped: labels?.runStopped ?? DEFAULT_LABELS.runStopped,
|
|
36
|
+
runFinished: labels?.runFinished ?? DEFAULT_LABELS.runFinished,
|
|
37
|
+
logTail: labels?.logTail ?? DEFAULT_LABELS.logTail,
|
|
38
|
+
runs: labels?.runs ?? DEFAULT_LABELS.runs
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function shortRunId(runId) {
|
|
42
|
+
const trimmed = typeof runId === "string" ? runId.trim() : "";
|
|
43
|
+
if (!trimmed) return "";
|
|
44
|
+
const segments = trimmed.split("-").filter(Boolean);
|
|
45
|
+
let pick = segments[segments.length - 1] ?? trimmed;
|
|
46
|
+
if (pick.length < 4 && segments.length >= 2) pick = segments.slice(-2).join("-");
|
|
47
|
+
if (!pick) pick = trimmed;
|
|
48
|
+
return pick.length > 8 ? pick.slice(-8) : pick;
|
|
49
|
+
}
|
|
50
|
+
function clipText(text, max) {
|
|
51
|
+
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
52
|
+
return collapsed.length > max ? `${collapsed.slice(0, max - 1)}\u2026` : collapsed;
|
|
53
|
+
}
|
|
54
|
+
function formatDuration(ms) {
|
|
55
|
+
const totalSec = Math.max(0, Math.floor(ms / 1e3));
|
|
56
|
+
if (totalSec < 60) return `${totalSec}s`;
|
|
57
|
+
const totalMin = Math.floor(totalSec / 60);
|
|
58
|
+
if (totalMin < 60) return `${totalMin}m${String(totalSec % 60).padStart(2, "0")}s`;
|
|
59
|
+
return `${Math.floor(totalMin / 60)}h${String(totalMin % 60).padStart(2, "0")}m`;
|
|
60
|
+
}
|
|
61
|
+
function formatRunAge(timing, now = Date.now()) {
|
|
62
|
+
const startedAt = timing?.startedAt;
|
|
63
|
+
if (typeof startedAt !== "number" || !Number.isFinite(startedAt) || startedAt <= 0) {
|
|
64
|
+
return "";
|
|
65
|
+
}
|
|
66
|
+
const end = typeof timing?.finishedAt === "number" && Number.isFinite(timing.finishedAt) && timing.finishedAt > 0 ? timing.finishedAt : now;
|
|
67
|
+
return formatDuration(end - startedAt);
|
|
68
|
+
}
|
|
69
|
+
function formatIdentityRow(agentName, runId) {
|
|
70
|
+
const parts = [];
|
|
71
|
+
if (!isAgentNameFallback(agentName)) parts.push(agentName);
|
|
72
|
+
const short = shortRunId(runId);
|
|
73
|
+
if (short) parts.push(`#${short}`);
|
|
74
|
+
return parts.join(" ");
|
|
75
|
+
}
|
|
76
|
+
function isAgentNameFallback(agentName) {
|
|
77
|
+
const trimmed = typeof agentName === "string" ? agentName.trim() : "";
|
|
78
|
+
return !trimmed || trimmed === "agent";
|
|
79
|
+
}
|
|
80
|
+
function resolveRunLabel(run) {
|
|
81
|
+
for (const candidate of [run.agentName, run.name, run.agentKey, run.runId]) {
|
|
82
|
+
if (typeof candidate === "string" && !isAgentNameFallback(candidate)) {
|
|
83
|
+
return candidate.trim();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return "agent";
|
|
87
|
+
}
|
|
88
|
+
function formatStartRunCard(agentName, status = "running", opts) {
|
|
89
|
+
const L = resolveLabels(opts?.labels);
|
|
90
|
+
const icon = getAgentRunStatusIcon(status);
|
|
91
|
+
const lines = [L.runStarted];
|
|
92
|
+
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
93
|
+
if (identity) {
|
|
94
|
+
lines.push(` agent ${identity}`);
|
|
95
|
+
}
|
|
96
|
+
lines.push(` status ${icon} ${status}`);
|
|
97
|
+
const task = opts?.task?.trim();
|
|
98
|
+
if (task) {
|
|
99
|
+
lines.push(` task ${clipText(task, TASK_PREVIEW_MAX)}`);
|
|
100
|
+
}
|
|
101
|
+
return lines.join("\n");
|
|
102
|
+
}
|
|
103
|
+
var TASK_PREVIEW_MAX = 72;
|
|
104
|
+
var NOTE_PREVIEW_MAX = 72;
|
|
105
|
+
function formatProgressRow(toolCallCount, lastToolNames) {
|
|
106
|
+
const parts = [];
|
|
107
|
+
if (typeof toolCallCount === "number" && Number.isFinite(toolCallCount)) {
|
|
108
|
+
parts.push(`${toolCallCount} tools`);
|
|
109
|
+
}
|
|
110
|
+
if (lastToolNames && lastToolNames.length > 0) {
|
|
111
|
+
parts.push(lastToolNames.join(", "));
|
|
112
|
+
}
|
|
113
|
+
return parts.join(" \xB7 ");
|
|
114
|
+
}
|
|
115
|
+
function formatStatusRunCard(agentName, status = "running", opts) {
|
|
116
|
+
const L = resolveLabels(opts?.labels);
|
|
117
|
+
const icon = getAgentRunStatusIcon(status);
|
|
118
|
+
const age = formatRunAge(opts?.timing, opts?.now);
|
|
119
|
+
const lines = [L.runStatus, ` ${icon} ${status}${age ? ` ${age}` : ""}`];
|
|
120
|
+
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
121
|
+
if (identity) {
|
|
122
|
+
lines.push(` agent ${identity}`);
|
|
123
|
+
}
|
|
124
|
+
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames);
|
|
125
|
+
if (progress) {
|
|
126
|
+
lines.push(` tools ${progress}`);
|
|
127
|
+
}
|
|
128
|
+
const note = opts?.lastAssistantText?.trim();
|
|
129
|
+
if (note) {
|
|
130
|
+
lines.push(` note ${clipText(note, NOTE_PREVIEW_MAX)}`);
|
|
131
|
+
}
|
|
132
|
+
if (opts?.errorMessage?.trim()) {
|
|
133
|
+
lines.push(` error ${opts.errorMessage.trim()}`);
|
|
134
|
+
}
|
|
135
|
+
if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
|
|
136
|
+
lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
|
|
137
|
+
}
|
|
138
|
+
return lines.join("\n");
|
|
139
|
+
}
|
|
140
|
+
function runShowsLogTail(status) {
|
|
141
|
+
return status === "failed" || status === "timeout";
|
|
142
|
+
}
|
|
143
|
+
function shouldShowLogTail(status, includeLogTail, logLines) {
|
|
144
|
+
if (includeLogTail === false) return false;
|
|
145
|
+
if (!logLines || logLines.length === 0) return false;
|
|
146
|
+
return runShowsLogTail(status);
|
|
147
|
+
}
|
|
148
|
+
function formatFinishedRunCard(agentName, status, opts) {
|
|
149
|
+
const L = resolveLabels(opts?.labels);
|
|
150
|
+
const icon = getAgentRunStatusIcon(status);
|
|
151
|
+
const age = formatRunAge(opts?.timing, opts?.now);
|
|
152
|
+
const summary = [status, age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames)].filter(Boolean).join(" \xB7 ");
|
|
153
|
+
const lines = [L.runFinished, ` ${icon} ${summary}`];
|
|
154
|
+
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
155
|
+
if (identity) {
|
|
156
|
+
lines.push(` agent ${identity}`);
|
|
157
|
+
}
|
|
158
|
+
const note = opts?.lastAssistantText?.trim();
|
|
159
|
+
if (note) {
|
|
160
|
+
lines.push(` note ${clipText(note, NOTE_PREVIEW_MAX)}`);
|
|
161
|
+
}
|
|
162
|
+
if (opts?.errorMessage?.trim()) {
|
|
163
|
+
lines.push(` error ${opts.errorMessage.trim()}`);
|
|
164
|
+
}
|
|
165
|
+
if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
|
|
166
|
+
lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
|
|
167
|
+
}
|
|
168
|
+
return lines.join("\n");
|
|
169
|
+
}
|
|
170
|
+
function formatStopRunCard(status = "killed", labels) {
|
|
171
|
+
const L = resolveLabels(labels);
|
|
172
|
+
const icon = getAgentRunStatusIcon(status);
|
|
173
|
+
return `${L.runStopped}
|
|
174
|
+
${icon} ${status}`;
|
|
175
|
+
}
|
|
176
|
+
function formatListRunsCard(runs, labels) {
|
|
177
|
+
const L = resolveLabels(labels);
|
|
178
|
+
const lines = [L.runs(runs.length)];
|
|
179
|
+
for (const run of runs) {
|
|
180
|
+
const status = run.status ?? "\u2014";
|
|
181
|
+
const icon = getAgentRunStatusIcon(status);
|
|
182
|
+
lines.push(` ${icon} ${resolveRunLabel(run)}`);
|
|
183
|
+
}
|
|
184
|
+
return lines.join("\n");
|
|
185
|
+
}
|
|
186
|
+
function formatNotFoundRunCard(labels) {
|
|
187
|
+
const L = resolveLabels(labels);
|
|
188
|
+
return `${L.runStatus}
|
|
189
|
+
? not_found`;
|
|
190
|
+
}
|
|
191
|
+
var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
192
|
+
"done",
|
|
193
|
+
"failed",
|
|
194
|
+
"timeout",
|
|
195
|
+
"killed",
|
|
196
|
+
"cancelled",
|
|
197
|
+
// orphaned: pid gone but the run record was still "running" — the process
|
|
198
|
+
// died (killed/OOM/crashed) before writing its own terminal status. Treated
|
|
199
|
+
// as terminal by all display/filter/GC consumers.
|
|
200
|
+
"orphaned"
|
|
201
|
+
]);
|
|
202
|
+
function isAgentRunTerminalStatus(status) {
|
|
203
|
+
return typeof status === "string" && AGENT_RUN_TERMINAL_STATUSES.has(status);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
getAgentRunStatusIcon,
|
|
208
|
+
shortRunId,
|
|
209
|
+
clipText,
|
|
210
|
+
formatDuration,
|
|
211
|
+
formatRunAge,
|
|
212
|
+
isAgentNameFallback,
|
|
213
|
+
resolveRunLabel,
|
|
214
|
+
formatStartRunCard,
|
|
215
|
+
TASK_PREVIEW_MAX,
|
|
216
|
+
formatStatusRunCard,
|
|
217
|
+
runShowsLogTail,
|
|
218
|
+
formatFinishedRunCard,
|
|
219
|
+
formatStopRunCard,
|
|
220
|
+
formatListRunsCard,
|
|
221
|
+
formatNotFoundRunCard,
|
|
222
|
+
isAgentRunTerminalStatus
|
|
223
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCTYAHYK.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
7
|
-
import {
|
|
8
|
-
require_react
|
|
9
|
-
} from "./chunk-3ASDTTEI.js";
|
|
10
7
|
import {
|
|
11
8
|
toErrorMessage
|
|
12
9
|
} from "./chunk-HNMXYYJR.js";
|
|
10
|
+
import {
|
|
11
|
+
require_react
|
|
12
|
+
} from "./chunk-3ASDTTEI.js";
|
|
13
13
|
import {
|
|
14
14
|
patch,
|
|
15
15
|
readAndWait
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XRZJGPFI.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-Y7343GLU.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildSkillDocMarkdown
|
|
3
|
+
} from "./chunk-VC6OZXO5.js";
|
|
4
|
+
|
|
5
|
+
// packages/cli/docPageHelpers.ts
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import { ulid } from "ulid";
|
|
8
|
+
function getCliArg(args, flag) {
|
|
9
|
+
const idx = args.indexOf(flag);
|
|
10
|
+
return idx !== -1 ? args[idx + 1] : void 0;
|
|
11
|
+
}
|
|
12
|
+
function readBodyArg(args, fallback = "") {
|
|
13
|
+
const bodyFile = getCliArg(args, "--body-file");
|
|
14
|
+
if (bodyFile !== void 0) {
|
|
15
|
+
return readFileSync(bodyFile, "utf8");
|
|
16
|
+
}
|
|
17
|
+
return getCliArg(args, "--body") ?? fallback;
|
|
18
|
+
}
|
|
19
|
+
function textToSlate(text) {
|
|
20
|
+
return text.split("\n").map((line) => ({
|
|
21
|
+
type: "paragraph",
|
|
22
|
+
children: [{ text: line }]
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
function createPageId() {
|
|
26
|
+
return ulid();
|
|
27
|
+
}
|
|
28
|
+
function buildPageKey(userId, pageId) {
|
|
29
|
+
return `page-${userId}-${pageId}`;
|
|
30
|
+
}
|
|
31
|
+
function buildPageRecord(args) {
|
|
32
|
+
const { dbKey, pageId, title, spaceId, content, existing, meta, slateData } = args;
|
|
33
|
+
const now = Date.now();
|
|
34
|
+
const createdAt = typeof existing?.createdAt === "number" ? existing.createdAt : now;
|
|
35
|
+
const created = typeof existing?.created === "string" ? existing.created : new Date(createdAt).toISOString();
|
|
36
|
+
const nextRecord = {
|
|
37
|
+
...existing ?? {},
|
|
38
|
+
id: existing?.id ?? pageId,
|
|
39
|
+
dbKey,
|
|
40
|
+
type: "page",
|
|
41
|
+
title,
|
|
42
|
+
spaceId,
|
|
43
|
+
content,
|
|
44
|
+
updatedAt: now,
|
|
45
|
+
createdAt,
|
|
46
|
+
created
|
|
47
|
+
};
|
|
48
|
+
if (meta !== void 0) {
|
|
49
|
+
if (meta === null) {
|
|
50
|
+
delete nextRecord.meta;
|
|
51
|
+
} else {
|
|
52
|
+
nextRecord.meta = meta;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (slateData !== void 0) {
|
|
56
|
+
if (slateData === null) {
|
|
57
|
+
delete nextRecord.slateData;
|
|
58
|
+
} else {
|
|
59
|
+
nextRecord.slateData = slateData;
|
|
60
|
+
}
|
|
61
|
+
} else if (!existing?.slateData) {
|
|
62
|
+
nextRecord.slateData = textToSlate(content);
|
|
63
|
+
}
|
|
64
|
+
return nextRecord;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// packages/cli/docSkillHelpers.ts
|
|
68
|
+
function normalizeSkillSeed(input) {
|
|
69
|
+
return input.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g, "-").replace(/^-+|-+$/g, "");
|
|
70
|
+
}
|
|
71
|
+
function deterministicId(prefix, seed) {
|
|
72
|
+
let h = 2166136261;
|
|
73
|
+
for (let i = 0; i < seed.length; i++) {
|
|
74
|
+
h ^= seed.charCodeAt(i);
|
|
75
|
+
h = h * 16777619 >>> 0;
|
|
76
|
+
}
|
|
77
|
+
const suffix = h.toString(36).toUpperCase().padStart(14, "0");
|
|
78
|
+
return (prefix + suffix).slice(0, 26);
|
|
79
|
+
}
|
|
80
|
+
function buildSkillDocId(input) {
|
|
81
|
+
return deterministicId("01SK", normalizeSkillSeed(input) || input);
|
|
82
|
+
}
|
|
83
|
+
function buildSkillPageKey(userId, skillId) {
|
|
84
|
+
return buildPageKey(userId, skillId);
|
|
85
|
+
}
|
|
86
|
+
function buildSkillPageRecord(args) {
|
|
87
|
+
const {
|
|
88
|
+
dbKey,
|
|
89
|
+
skillId,
|
|
90
|
+
title,
|
|
91
|
+
spaceId,
|
|
92
|
+
body,
|
|
93
|
+
skillConfig,
|
|
94
|
+
evalConfig,
|
|
95
|
+
workflowConfig,
|
|
96
|
+
existing
|
|
97
|
+
} = args;
|
|
98
|
+
return {
|
|
99
|
+
...buildPageRecord({
|
|
100
|
+
dbKey,
|
|
101
|
+
pageId: skillId,
|
|
102
|
+
title,
|
|
103
|
+
spaceId,
|
|
104
|
+
content: buildSkillDocMarkdown({
|
|
105
|
+
body,
|
|
106
|
+
skillConfig,
|
|
107
|
+
evalConfig,
|
|
108
|
+
workflowConfig
|
|
109
|
+
}),
|
|
110
|
+
existing,
|
|
111
|
+
meta: {
|
|
112
|
+
...existing?.meta ?? {},
|
|
113
|
+
kind: "skill",
|
|
114
|
+
skillConfig,
|
|
115
|
+
...evalConfig ? { evalConfig } : {},
|
|
116
|
+
...workflowConfig ? { workflowConfig } : {}
|
|
117
|
+
},
|
|
118
|
+
slateData: null
|
|
119
|
+
})
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function parseJsonArg(raw, fallback) {
|
|
123
|
+
if (raw === void 0) return fallback;
|
|
124
|
+
return JSON.parse(raw);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export {
|
|
128
|
+
readBodyArg,
|
|
129
|
+
createPageId,
|
|
130
|
+
buildPageKey,
|
|
131
|
+
buildPageRecord,
|
|
132
|
+
buildSkillDocId,
|
|
133
|
+
buildSkillPageKey,
|
|
134
|
+
buildSkillPageRecord,
|
|
135
|
+
parseJsonArg
|
|
136
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HEGV7BH3.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DFCFMCY6.js";
|
|
8
8
|
import {
|
|
9
9
|
toSafeAgentSummary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3ZX7PERL.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/agentListHelpers.ts
|
|
13
13
|
function parseAgentRecordId(privateKey, explicitId) {
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MODEL_LOOKUP_MAP
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
ALL_MODELS
|
|
6
|
-
} from "./chunk-XBS2WYJ2.js";
|
|
3
|
+
} from "./chunk-UAIVG4J6.js";
|
|
7
4
|
import {
|
|
8
5
|
addContentAction
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ELT65PZW.js";
|
|
7
|
+
import {
|
|
8
|
+
ALL_MODELS
|
|
9
|
+
} from "./chunk-LLWKHDG4.js";
|
|
10
10
|
import {
|
|
11
11
|
upload
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XRZJGPFI.js";
|
|
13
|
+
import {
|
|
14
|
+
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
|
|
15
|
+
PUBLIC_KIMI_K26_IMAGE_AGENT_KEY
|
|
16
|
+
} from "./chunk-3ND52WIL.js";
|
|
13
17
|
import {
|
|
14
18
|
getRuntimeServerContext
|
|
15
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XMLRJUU5.js";
|
|
16
20
|
import {
|
|
17
21
|
API_ENDPOINTS
|
|
18
22
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -539,6 +543,50 @@ function planCompression(input) {
|
|
|
539
543
|
};
|
|
540
544
|
}
|
|
541
545
|
|
|
546
|
+
// packages/agent-runtime/autoExecutionProfiles.ts
|
|
547
|
+
var createProfile = (input) => ({
|
|
548
|
+
id: input.id,
|
|
549
|
+
tier: input.tier,
|
|
550
|
+
legacyAgentKey: input.legacyAgentKey,
|
|
551
|
+
key: input.legacyAgentKey,
|
|
552
|
+
name: input.name,
|
|
553
|
+
provider: "nolo",
|
|
554
|
+
model: input.model,
|
|
555
|
+
apiSource: "platform",
|
|
556
|
+
useServerProxy: true,
|
|
557
|
+
rawRecord: {
|
|
558
|
+
dbKey: input.legacyAgentKey,
|
|
559
|
+
isPublic: true,
|
|
560
|
+
provider: "nolo",
|
|
561
|
+
model: input.model,
|
|
562
|
+
apiSource: "platform",
|
|
563
|
+
useServerProxy: true
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
var FLASH_PROFILE = createProfile({
|
|
567
|
+
id: "builtin:auto:deepseek-v4-flash",
|
|
568
|
+
tier: "flash",
|
|
569
|
+
legacyAgentKey: PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
|
|
570
|
+
name: "DeepSeek V4 Flash",
|
|
571
|
+
model: "deepseek-v4-flash"
|
|
572
|
+
});
|
|
573
|
+
var IMAGE_PROFILE = createProfile({
|
|
574
|
+
id: "builtin:auto:kimi-k2.6",
|
|
575
|
+
tier: "image",
|
|
576
|
+
legacyAgentKey: PUBLIC_KIMI_K26_IMAGE_AGENT_KEY,
|
|
577
|
+
name: "Kimi K2.6",
|
|
578
|
+
model: "kimi-k2.6"
|
|
579
|
+
});
|
|
580
|
+
var AUTO_EXECUTION_PROFILES = {
|
|
581
|
+
flash: FLASH_PROFILE,
|
|
582
|
+
balanced: { ...FLASH_PROFILE, tier: "balanced" },
|
|
583
|
+
quality: { ...FLASH_PROFILE, tier: "quality" },
|
|
584
|
+
image: IMAGE_PROFILE
|
|
585
|
+
};
|
|
586
|
+
var DEFAULT_AUTO_EXECUTION_TIER = "flash";
|
|
587
|
+
var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUTION_TIER];
|
|
588
|
+
var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
|
|
589
|
+
|
|
542
590
|
export {
|
|
543
591
|
planContextUsage,
|
|
544
592
|
estimateTokenCount,
|
|
@@ -548,5 +596,7 @@ export {
|
|
|
548
596
|
buildDatabaseFileContentUrl,
|
|
549
597
|
serializeMessageContent,
|
|
550
598
|
normalizeAssistantContentBuffer,
|
|
551
|
-
planCompression
|
|
599
|
+
planCompression,
|
|
600
|
+
DEFAULT_AUTO_EXECUTION_PROFILE,
|
|
601
|
+
resolveAutoExecutionProfile
|
|
552
602
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
prepareAndPersistMessage,
|
|
4
4
|
uiAskChoiceFunc,
|
|
5
5
|
uiAskChoiceFunctionSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SCTYAHYK.js";
|
|
7
7
|
import {
|
|
8
8
|
require_date_fns
|
|
9
9
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
PLATFORM_HOSTED_GLM_52_MODEL,
|
|
15
15
|
PLATFORM_HOSTED_GLM_PRICE,
|
|
16
16
|
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MKA6QE5E.js";
|
|
18
18
|
import {
|
|
19
19
|
read,
|
|
20
20
|
readAndWait,
|
|
21
21
|
removeCachedEntity,
|
|
22
22
|
upsertSSREntity,
|
|
23
23
|
write
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XRZJGPFI.js";
|
|
25
25
|
import {
|
|
26
26
|
createAgentKey,
|
|
27
27
|
createDialogKey,
|
|
@@ -30,10 +30,13 @@ import {
|
|
|
30
30
|
dialogMessageRange,
|
|
31
31
|
memoryOwnerRange,
|
|
32
32
|
memorySubjectKindRange
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6Y7A3OQQ.js";
|
|
34
34
|
import {
|
|
35
35
|
selectIdentityUserId
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XMLRJUU5.js";
|
|
37
|
+
import {
|
|
38
|
+
isDevelopment
|
|
39
|
+
} from "./chunk-R5V5G73M.js";
|
|
37
40
|
import {
|
|
38
41
|
asTrimmedString
|
|
39
42
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -333,11 +336,18 @@ function resolveAgentMemoryPolicy(input) {
|
|
|
333
336
|
}
|
|
334
337
|
function buildMemorySubjectsForAgent(input) {
|
|
335
338
|
const policy = input.policy ?? resolveAgentMemoryPolicy({ agentKey: input.agentKey });
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
const result = [];
|
|
340
|
+
const agentSubject = input.memorySubjectId?.trim();
|
|
341
|
+
if (agentSubject) {
|
|
342
|
+
result.push({ subjectType: "agent", subjectId: agentSubject });
|
|
343
|
+
}
|
|
344
|
+
if (policy.includeUserSubject && input.userId) {
|
|
345
|
+
result.push({ subjectType: "user", subjectId: input.userId });
|
|
346
|
+
}
|
|
347
|
+
if (input.spaceId) {
|
|
348
|
+
result.push({ subjectType: "space", subjectId: input.spaceId });
|
|
349
|
+
}
|
|
350
|
+
return result;
|
|
341
351
|
}
|
|
342
352
|
|
|
343
353
|
// packages/ai/memory/recentRelationshipRecap.ts
|
|
@@ -832,7 +842,9 @@ var notifyUserDataUpdated = () => {
|
|
|
832
842
|
};
|
|
833
843
|
var createDialogAction = async (args, thunkApi) => {
|
|
834
844
|
const {
|
|
835
|
-
cybots,
|
|
845
|
+
cybots: requestedCybots = [],
|
|
846
|
+
agentMode: requestedAgentMode,
|
|
847
|
+
autoRoute,
|
|
836
848
|
category,
|
|
837
849
|
spaceId: explicitSpaceId,
|
|
838
850
|
inheritFromDialogKey,
|
|
@@ -846,6 +858,8 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
846
858
|
} = args;
|
|
847
859
|
const { dispatch: dispatchRaw, getState, extra } = thunkApi;
|
|
848
860
|
const dispatch = dispatchRaw;
|
|
861
|
+
const agentMode = requestedAgentMode ?? (requestedCybots.length > 0 ? "fixed" : "auto");
|
|
862
|
+
const cybots = agentMode === "auto" ? [] : requestedCybots;
|
|
849
863
|
const agentKey = cybots[0];
|
|
850
864
|
const currentUserId = selectIdentityUserId(getState()) ?? null;
|
|
851
865
|
const isDeviceLocalDialog = isLocalOwnerDialogAgents(cybots);
|
|
@@ -861,6 +875,7 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
861
875
|
} catch {
|
|
862
876
|
}
|
|
863
877
|
const readAgentConfig = async () => {
|
|
878
|
+
if (!agentKey) return null;
|
|
864
879
|
const existing = await dispatch(
|
|
865
880
|
readAndWait({
|
|
866
881
|
dbKey: agentKey,
|
|
@@ -884,9 +899,9 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
884
899
|
).unwrap();
|
|
885
900
|
return recoveredBuiltinAgent;
|
|
886
901
|
};
|
|
887
|
-
const canSkipAgentConfigRead = !!skipAgentConfigRead && !!args.skipGreeting && !!titleOverride;
|
|
902
|
+
const canSkipAgentConfigRead = agentMode === "auto" || !!skipAgentConfigRead && !!args.skipGreeting && !!titleOverride;
|
|
888
903
|
const agentConfig = canSkipAgentConfigRead ? null : await readAgentConfig();
|
|
889
|
-
if (!agentConfig && !canSkipAgentConfigRead) {
|
|
904
|
+
if (agentMode === "fixed" && !agentConfig && !canSkipAgentConfigRead) {
|
|
890
905
|
throw new Error(`Agent with key ${agentKey} not found.`);
|
|
891
906
|
}
|
|
892
907
|
const shouldUseRelationshipGreeting = shouldUseRecentRelationshipRecap({
|
|
@@ -909,7 +924,8 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
909
924
|
agentKey,
|
|
910
925
|
currentSpaceId: explicitSpaceId
|
|
911
926
|
}).catch(() => ({ recap: null, reason: "no-db", sourceDialogKey: void 0 })) : null;
|
|
912
|
-
if (typeof window !== "undefined" && recentRelationshipRecapResolution && process
|
|
927
|
+
if (typeof window !== "undefined" && recentRelationshipRecapResolution && // 浏览器端没有 process:走 app/utils/env 的安全读法。
|
|
928
|
+
isDevelopment) {
|
|
913
929
|
console.debug("[dialog] recent relationship recap", {
|
|
914
930
|
agentKey,
|
|
915
931
|
userId,
|
|
@@ -919,7 +935,7 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
919
935
|
});
|
|
920
936
|
}
|
|
921
937
|
const time = (0, import_date_fns.format)(/* @__PURE__ */ new Date(), "MM-dd HH:mm");
|
|
922
|
-
const title = titleOverride || (agentConfig?.name || "Agent") + " " + time;
|
|
938
|
+
const title = titleOverride || (agentMode === "auto" ? "\u65B0\u5BF9\u8BDD" : agentConfig?.name || "Agent") + " " + time;
|
|
923
939
|
const spaceId = explicitSpaceId;
|
|
924
940
|
const dialogPath = createDialogKey(userId);
|
|
925
941
|
const dialogId = extractCustomId(dialogPath);
|
|
@@ -954,7 +970,10 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
954
970
|
id: dialogId,
|
|
955
971
|
dbKey: dialogPath,
|
|
956
972
|
userId,
|
|
973
|
+
agentMode,
|
|
957
974
|
cybots,
|
|
975
|
+
...agentMode === "fixed" && agentKey ? { primaryAgentKey: agentKey } : {},
|
|
976
|
+
...agentMode === "auto" && autoRoute ? { autoRoute } : {},
|
|
958
977
|
title,
|
|
959
978
|
type: "dialog" /* DIALOG */,
|
|
960
979
|
createdAt: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date()),
|