nolo-cli 0.106.0-alpha.1 → 0.106.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/README.md +1 -1
- package/{_executeModel-C5ZUOC7O.js → _executeModel-EP6HAX3W.js} +77 -69
- package/action-GVA5ARSJ.js +20 -0
- package/{addContentAction-O7R66HEX.js → addContentAction-NZZNAVCB.js} +13 -12
- package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-5HVGEIXI.js} +19 -20
- package/{agentDeleteCommand-YB3S2LPY.js → agentDeleteCommand-M25A6UGB.js} +118 -43
- package/{agentEmailCommands-YBCBTG6X.js → agentEmailCommands-RUL4NL64.js} +99 -89
- package/agentListCommands-KSPFKHFO.js +741 -0
- package/{agentMachineCommands-QHYLBTVW.js → agentMachineCommands-IHBB6PHD.js} +48 -44
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-ND4S2Q6Q.js} +97 -2
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
- package/agentRecordCommands-7OKIBN6H.js +138 -0
- package/agentRunCommand-GBKJTQQU.js +167 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
- package/{agentRuntimeLocal-FRUE5P2V.js → agentRuntimeLocal-E5HXZNXZ.js} +44 -40
- package/{agentSlice-7OEXULAY.js → agentSlice-7T3ZLYET.js} +15 -14
- package/{appDeleteCommands-JPWTSFID.js → appDeleteCommands-TTJUYTQN.js} +46 -42
- package/{appDeployCommands-YCVY2UYO.js → appDeployCommands-65WYK2TQ.js} +46 -42
- package/{appDeployStatusCommands-JMCEIKTI.js → appDeployStatusCommands-U4XESYYG.js} +46 -42
- package/{appGetCommands-EXWT3QAE.js → appGetCommands-VNHZZC4D.js} +46 -42
- package/{appListCommands-PKRLSWRE.js → appListCommands-O667ZEU6.js} +46 -42
- package/{authCommand-F4EFRRX6.js → authCommand-SUHHTVHA.js} +118 -24
- package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-PUGT65WS.js} +11 -9
- package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
- package/{chunk-ZNV445LB.js → chunk-2NGKYC3L.js} +29 -9
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
- package/{chunk-XA2FJW4L.js → chunk-3SXZ6SUC.js} +11 -9
- package/{chunk-UKZDAFYT.js → chunk-3VKDWQMJ.js} +6 -10
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
- package/{chunk-PQFHGD77.js → chunk-4VDS344D.js} +161 -14
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-GQBOR3G6.js → chunk-5F7UKMLN.js} +8 -4
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-YCJN2RA3.js → chunk-6AIURTE7.js} +20 -11
- package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-S4VLC46A.js → chunk-AM4G3LDJ.js} +66 -54
- package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
- package/{chunk-TJGWNDGO.js → chunk-AZB6HR4I.js} +846 -276
- package/{chunk-L5UXH3B2.js → chunk-BIH7KCDJ.js} +58 -9
- package/{chunk-UZGQNTVW.js → chunk-BPLIXNC6.js} +8 -6
- package/chunk-CEQ75WPL.js +915 -0
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-GPCZ7UXG.js → chunk-DBKRC5O2.js} +1 -1
- package/chunk-DJ3JABG5.js +7990 -0
- package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
- package/{chunk-UOBDA2JS.js → chunk-DSXRVBTA.js} +118 -90
- package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
- package/{chunk-HJUYAD4A.js → chunk-EBS4FKW4.js} +5 -5
- package/{chunk-LC43IGO4.js → chunk-EHGIEGLI.js} +834 -962
- package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-TOP2VXOR.js → chunk-FJKZSR5P.js} +5 -5
- package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
- package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
- package/{chunk-ZCYXJSTU.js → chunk-GMP3NBAA.js} +65 -95
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-OIVSQH2O.js → chunk-GU7DC2TD.js} +300 -5
- package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
- package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
- package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
- package/{chunk-RJXZDT2P.js → chunk-HNA5KV37.js} +23 -28
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-ACTMNVHM.js → chunk-I5YMDACN.js} +1 -1
- package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
- package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
- package/{chunk-Q67DOFOO.js → chunk-IYIXAIEB.js} +199 -92
- package/{chunk-BP4XNZRM.js → chunk-JIXGJTBU.js} +4 -4
- package/{chunk-OEVAY4J6.js → chunk-JWNBEIME.js} +18 -20
- package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
- package/{chunk-JZL6EHZR.js → chunk-LGWABBTZ.js} +47 -67
- package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
- package/{chunk-GEPUP7OO.js → chunk-LOPP5VT6.js} +3 -3
- package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
- package/chunk-LWLNLZC5.js +265 -0
- package/{chunk-BNGW5ASC.js → chunk-LYLO5U3H.js} +15 -2
- package/{chunk-4OEFYTWL.js → chunk-MJ3CRU77.js} +85 -50
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-NA35QHCF.js → chunk-NTNKA5VL.js} +1 -1
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-NWENLDMM.js +42 -0
- package/chunk-O7SVKKLY.js +875 -0
- package/{chunk-FM2YTE6D.js → chunk-OAXBDMT7.js} +1 -1
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-EYAQT56M.js → chunk-ODTBO4W6.js} +9 -6
- package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
- package/{chunk-EEGDMATE.js → chunk-OQ5IVGCV.js} +86 -81
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-KQ4ONNQD.js → chunk-OYTWDOQV.js} +155 -8
- package/{chunk-JRQFUXY7.js → chunk-OZ2IIIRP.js} +99 -22
- package/{chunk-WV42OMV7.js → chunk-PFLF4R4E.js} +8 -8
- package/{chunk-J4MOO56S.js → chunk-QDH32WF5.js} +10 -2
- package/{chunk-3DII57IT.js → chunk-QVAWUJAJ.js} +1 -1
- package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
- package/{chunk-6OZ36FXI.js → chunk-SJ7CUF65.js} +22 -4
- package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
- package/{chunk-ETI2NYVF.js → chunk-SYEBIZOF.js} +4 -4
- package/{chunk-J3WULTWA.js → chunk-TLKXNTQJ.js} +19 -17
- package/chunk-TLYSGGPG.js +15 -0
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/chunk-UM7TA3K4.js +1008 -0
- package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
- package/chunk-VBQGO5NX.js +164 -0
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
- package/chunk-VYKXIHRP.js +13692 -0
- package/chunk-VZLO4XJD.js +17 -0
- package/{chunk-DNCEALKX.js → chunk-WMWYWYK2.js} +22 -29
- package/{chunk-H56FOERC.js → chunk-XDQ7PHU3.js} +567 -684
- package/{chunk-AEOE4Z6Q.js → chunk-XGOHDYM2.js} +39 -15
- package/{chunk-53HEEOTT.js → chunk-XLWMNFBZ.js} +83 -16
- package/{chunk-V4MJDUSR.js → chunk-YFU5EELM.js} +2 -2
- package/{chunk-IUTWFZOX.js → chunk-YQFLBS6A.js} +68 -46
- package/chunk-YV25TM3R.js +780 -0
- package/chunk-ZRAU6T47.js +56 -0
- package/{chunk-5H7KJX7J.js → chunk-ZVGXD7UJ.js} +5 -5
- package/{chunk-H62HCIUP.js → chunk-ZYM73IHG.js} +36 -22
- package/commandRegistry-6QIAUQDS.js +833 -0
- package/{contentThunks-AZVYDLM4.js → contentThunks-5DDMUQ7B.js} +39 -36
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-V55DNYCE.js → createAgentAutomationAction-NQ6AZM42.js} +40 -37
- package/createDialogAction-QZ6X4A7O.js +70 -0
- package/{createPageAction-I3HH23O3.js → createPageAction-NCGEJBVK.js} +47 -43
- package/{chunk-GDNQO3QR.js → cursorProvider-YGGNMVWX.js} +2751 -10172
- package/{dbSlice-XVWBAGYN.js → dbSlice-RCZ7NRAF.js} +12 -11
- package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
- package/{dialogCommands-YVMHDEOX.js → dialogCommands-OGQLEF63.js} +49 -46
- package/{dialogSlice-LVJ67QWE.js → dialogSlice-GIKNUHNW.js} +57 -37
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-7UTWDYJU.js → docCreateCommands-RW6LNYT6.js} +48 -44
- package/{docDeleteCommands-GG6BJ4PS.js → docDeleteCommands-Z742TRNY.js} +49 -45
- package/{docReadCommands-QHMQVSLP.js → docReadCommands-5DIGA42Y.js} +47 -43
- package/{docStore-UJNL6SBT.js → docStore-6GUOZH52.js} +17 -13
- package/{docUpdateCommands-QPL6IVUK.js → docUpdateCommands-ZFZ2QEVK.js} +48 -44
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
- package/{getPricing-LUSEABA6.js → getPricing-QVSNUFZ6.js} +4 -4
- package/{handleSendMessageAction-CCL7ETCL.js → handleSendMessageAction-B2VXOLMM.js} +109 -42
- package/index.js +87 -884
- package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
- package/{machineCommands-2QNINBNI.js → machineCommands-AI3N7JHQ.js} +93 -83
- package/machineWsRunDispatch-RPF2D6VV.js +154 -0
- package/{memberThunks-QGFLFVCI.js → memberThunks-YICJI4IS.js} +20 -18
- package/{models-T3SG6MJ5.js → models-FTNFVO3D.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-OJJXQ7NM.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-DXFBDCGQ.js} +11 -7
- package/{read-COE3ZYR6.js → read-XMBM52Y4.js} +8 -7
- package/{readDocTool-5USN4A6V.js → readDocTool-LAQHKCVT.js} +5 -3
- package/{readlineWorkspace-4GULS23D.js → readlineWorkspace-EPUCVZ73.js} +2594 -2030
- package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-HDUI2MU3.js} +22 -26
- package/{runAgentClientLoop-MUMLW2SA.js → runAgentClientLoop-OXQMDGAN.js} +78 -71
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-ADBVOP4O.js} +16 -14
- package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-PXVXQJ62.js} +23 -27
- package/{chunk-AFUORTY4.js → settingThunks-G2MJRKUE.js} +226 -940
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-BMXKR7H6.js → spaceCommands-Z662QYY6.js} +51 -47
- package/{streamAgentChatTurn-6EOS5PNG.js → streamAgentChatTurn-YJYEJHP7.js} +214 -114
- package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-Z3RZACGF.js} +19 -20
- package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
- package/tools-GHI3WBEI.js +117 -0
- package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-WTC6GCQC.js} +25 -23
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-4YUVCBDU.js → updateDialogTitleAction-GJCNWTPY.js} +84 -45
- package/action-YVYQEAAV.js +0 -31
- package/agentListCommands-3GWH4E4G.js +0 -410
- package/agentRecordCommands-P76DPWKV.js +0 -128
- package/agentRunCommand-EQPL4F4K.js +0 -156
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-ZBDDI2E5.js +0 -186
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-PUOC4YRO.js +0 -394
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-WC6UUQ2C.js +0 -20923
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/createDialogAction-H6URYLIZ.js +0 -65
- package/machineWsRunDispatch-S3XXOKR7.js +0 -144
- package/settingSlice-ZQZVUPKK.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-4AJZHAK3.js +0 -110
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AM4G3LDJ.js";
|
|
9
9
|
import {
|
|
10
10
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
11
11
|
buildInvalidToolCallSelfHealResult,
|
|
12
12
|
parseToolCallArguments,
|
|
13
13
|
performFetchRequest,
|
|
14
14
|
sanitizeOutboundMessages
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YQFLBS6A.js";
|
|
16
16
|
import {
|
|
17
17
|
createSSEParser,
|
|
18
18
|
createToolRunId,
|
|
@@ -23,10 +23,13 @@ import {
|
|
|
23
23
|
toolRunSetPending,
|
|
24
24
|
toolRunStarted,
|
|
25
25
|
toolRunSucceeded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XDQ7PHU3.js";
|
|
27
27
|
import {
|
|
28
28
|
getPublicImageAgentMode
|
|
29
29
|
} from "./chunk-VIDPVFP3.js";
|
|
30
|
+
import {
|
|
31
|
+
parseApiError
|
|
32
|
+
} from "./chunk-OCZKATRC.js";
|
|
30
33
|
import {
|
|
31
34
|
getCurrentSpaceId
|
|
32
35
|
} from "./chunk-ZJ7UHBJS.js";
|
|
@@ -34,16 +37,17 @@ import {
|
|
|
34
37
|
addToolMessage,
|
|
35
38
|
messageStreamEnd,
|
|
36
39
|
messageStreaming,
|
|
40
|
+
toolResultNeedsUserConfirmation,
|
|
37
41
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-VYKXIHRP.js";
|
|
39
43
|
import {
|
|
40
44
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3SXZ6SUC.js";
|
|
42
46
|
import {
|
|
43
47
|
addActiveController,
|
|
44
48
|
removeActiveController,
|
|
45
49
|
tokenUsageLiveUpdate
|
|
46
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-VBG7GWWR.js";
|
|
47
51
|
import {
|
|
48
52
|
accumulateToolCallDelta,
|
|
49
53
|
createThinkParserState,
|
|
@@ -56,39 +60,39 @@ import {
|
|
|
56
60
|
import {
|
|
57
61
|
EMPTY_ASSISTANT_REPAIR_PROMPT,
|
|
58
62
|
getModelInfo
|
|
59
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-MJ3CRU77.js";
|
|
64
|
+
import {
|
|
65
|
+
write
|
|
66
|
+
} from "./chunk-ZYM73IHG.js";
|
|
60
67
|
import {
|
|
61
68
|
getApiEndpoint
|
|
62
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-GU7DC2TD.js";
|
|
63
70
|
import {
|
|
64
71
|
toErrorMessage
|
|
65
72
|
} from "./chunk-HNMXYYJR.js";
|
|
66
73
|
import {
|
|
67
|
-
|
|
68
|
-
} from "./chunk-
|
|
74
|
+
extractCustomId
|
|
75
|
+
} from "./chunk-M2EJHDJP.js";
|
|
69
76
|
import {
|
|
70
|
-
|
|
71
|
-
} from "./chunk-
|
|
77
|
+
isRecord
|
|
78
|
+
} from "./chunk-KUG52IAP.js";
|
|
79
|
+
import {
|
|
80
|
+
selectCurrentServer
|
|
81
|
+
} from "./chunk-NWENLDMM.js";
|
|
72
82
|
import {
|
|
73
83
|
createDialogMessageKeyAndId,
|
|
74
84
|
dialogMessageKey,
|
|
75
85
|
toTrimmedString
|
|
76
|
-
} from "./chunk-
|
|
77
|
-
import {
|
|
78
|
-
extractCustomId
|
|
79
|
-
} from "./chunk-M2EJHDJP.js";
|
|
86
|
+
} from "./chunk-OKGVNZTL.js";
|
|
80
87
|
import {
|
|
81
88
|
createAsyncThunk
|
|
82
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-VY6VFGKR.js";
|
|
83
90
|
import {
|
|
84
91
|
isAbortError
|
|
85
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-HIM3FCLF.js";
|
|
86
93
|
import {
|
|
87
94
|
selectIdentityToken
|
|
88
95
|
} from "./chunk-SEJ5OS6F.js";
|
|
89
|
-
import {
|
|
90
|
-
isRecord
|
|
91
|
-
} from "./chunk-KUG52IAP.js";
|
|
92
96
|
import {
|
|
93
97
|
asTrimmedString
|
|
94
98
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -275,7 +279,7 @@ async function persistToolMessage(dispatch, message, options = {}) {
|
|
|
275
279
|
}
|
|
276
280
|
throw err;
|
|
277
281
|
}
|
|
278
|
-
const { controller: _controller, ...rest } = message;
|
|
282
|
+
const { controller: _controller, dialogId: _dialogId, ...rest } = message;
|
|
279
283
|
const isStreaming = options.isStreaming !== void 0 ? options.isStreaming : Boolean(rest.isStreaming);
|
|
280
284
|
try {
|
|
281
285
|
const writeRequest = dispatch(
|
|
@@ -391,6 +395,49 @@ function applyResponsesUsageFields(target, chunk) {
|
|
|
391
395
|
}
|
|
392
396
|
}
|
|
393
397
|
|
|
398
|
+
// packages/ai/tools/stripModelConfirmationFlags.ts
|
|
399
|
+
var CONFIRMATION_INPUT_KEYS = {
|
|
400
|
+
self_evolution_requires_confirmation: "__confirmedSelfEvolution",
|
|
401
|
+
agent_update_requires_confirmation: "__confirmedSelfEvolution",
|
|
402
|
+
media_job_start_requires_confirmation: "__confirmedMediaJobStart"
|
|
403
|
+
};
|
|
404
|
+
function stripModelConfirmationFlags(value) {
|
|
405
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
406
|
+
return Object.fromEntries(
|
|
407
|
+
Object.entries(value).filter(
|
|
408
|
+
([key]) => !key.startsWith("__confirmed")
|
|
409
|
+
)
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
var MODEL_DIALOG_BINDING_STRIPPED_TOOLS = /* @__PURE__ */ new Set([
|
|
413
|
+
"mediaJobTool",
|
|
414
|
+
"transcribe",
|
|
415
|
+
"translate",
|
|
416
|
+
"exportDocument",
|
|
417
|
+
"readArtifact"
|
|
418
|
+
]);
|
|
419
|
+
var TRUSTED_ONLY_MODEL_INPUT_KEYS = /* @__PURE__ */ new Set(["confirmationToken", "expectedExecutionRevision"]);
|
|
420
|
+
function stripModelToolArgs(canonicalToolName, value) {
|
|
421
|
+
const base = stripModelConfirmationFlags(value);
|
|
422
|
+
if (!base || typeof base !== "object" || Array.isArray(base)) return base;
|
|
423
|
+
const withoutTrustedOnlyKeys = Object.fromEntries(
|
|
424
|
+
Object.entries(base).filter(
|
|
425
|
+
([key]) => !TRUSTED_ONLY_MODEL_INPUT_KEYS.has(key)
|
|
426
|
+
)
|
|
427
|
+
);
|
|
428
|
+
if (!MODEL_DIALOG_BINDING_STRIPPED_TOOLS.has(canonicalToolName)) {
|
|
429
|
+
return withoutTrustedOnlyKeys;
|
|
430
|
+
}
|
|
431
|
+
if (!withoutTrustedOnlyKeys || typeof withoutTrustedOnlyKeys !== "object" || Array.isArray(withoutTrustedOnlyKeys)) {
|
|
432
|
+
return withoutTrustedOnlyKeys;
|
|
433
|
+
}
|
|
434
|
+
return Object.fromEntries(
|
|
435
|
+
Object.entries(withoutTrustedOnlyKeys).filter(
|
|
436
|
+
([key]) => key !== "dialogId" && key !== "autoApproveCredits"
|
|
437
|
+
)
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
394
441
|
// packages/chat/messages/toolThunks.ts
|
|
395
442
|
var TOOL_ARGS_SENTINELS = [
|
|
396
443
|
"<|tool_calls_section_end|>",
|
|
@@ -414,6 +461,23 @@ var defaultSummary = (toolName, status) => {
|
|
|
414
461
|
if (status === "failed") return `\u274C ${toolName} \u6267\u884C\u5931\u8D25`;
|
|
415
462
|
return `\u2705 ${toolName} \u6267\u884C\u5B8C\u6210`;
|
|
416
463
|
};
|
|
464
|
+
var RAW_DATA_FALLBACK_MAX_TOTAL_BYTES = 4e3;
|
|
465
|
+
var RAW_DATA_FALLBACK_MAX_HEAD_BYTES = 1e3;
|
|
466
|
+
var RAW_DATA_FALLBACK_MAX_TAIL_BYTES = 2500;
|
|
467
|
+
var buildRawDataLlmContextFallback = (rawData, toolCallId) => {
|
|
468
|
+
const serialized = typeof rawData === "string" ? rawData.trim() : rawData === void 0 ? "" : JSON.stringify(rawData);
|
|
469
|
+
if (!serialized) return void 0;
|
|
470
|
+
const clipped = clipHeadAndTail(serialized, {
|
|
471
|
+
maxHeadBytes: RAW_DATA_FALLBACK_MAX_HEAD_BYTES,
|
|
472
|
+
maxTailBytes: RAW_DATA_FALLBACK_MAX_TAIL_BYTES,
|
|
473
|
+
maxTotalBytes: RAW_DATA_FALLBACK_MAX_TOTAL_BYTES,
|
|
474
|
+
// 完整 rawData 已随 tool message content 原样落盘,无需另写临时日志;
|
|
475
|
+
// 浏览器 stub 本就忽略该选项。
|
|
476
|
+
saveTempLog: false,
|
|
477
|
+
...toolCallId ? { toolCallId } : {}
|
|
478
|
+
});
|
|
479
|
+
return asOptionalTrimmedString(clipped.content);
|
|
480
|
+
};
|
|
417
481
|
var processToolData = createAsyncThunk(
|
|
418
482
|
"message/processToolData",
|
|
419
483
|
async (args, thunkApi) => {
|
|
@@ -446,7 +510,8 @@ var processToolData = createAsyncThunk(
|
|
|
446
510
|
}
|
|
447
511
|
}
|
|
448
512
|
const activity = isRecord(toolArgs) && isRecord(toolArgs._activity) ? toolArgs._activity : void 0;
|
|
449
|
-
const
|
|
513
|
+
const withoutActivity = isRecord(toolArgs) && Object.prototype.hasOwnProperty.call(toolArgs, "_activity") ? (({ _activity: _ignored, ...rest }) => rest)(toolArgs) : toolArgs;
|
|
514
|
+
const executionToolArgs = stripModelToolArgs(canonicalName, withoutActivity);
|
|
450
515
|
const inputSummary = JSON.stringify(executionToolArgs).slice(0, 400);
|
|
451
516
|
toolRunStarted({
|
|
452
517
|
id: toolRunId,
|
|
@@ -473,6 +538,7 @@ var processToolData = createAsyncThunk(
|
|
|
473
538
|
const toolPayload = {
|
|
474
539
|
toolName: canonicalName,
|
|
475
540
|
status: "pending",
|
|
541
|
+
interaction,
|
|
476
542
|
input: executionToolArgs,
|
|
477
543
|
rawToolCall: toolCall,
|
|
478
544
|
toolRunId,
|
|
@@ -534,19 +600,28 @@ var processToolData = createAsyncThunk(
|
|
|
534
600
|
});
|
|
535
601
|
const rawData = toolResult?.rawData ?? toolResult;
|
|
536
602
|
const llmContext = asOptionalTrimmedString(toolResult?.llmContext);
|
|
537
|
-
const
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
603
|
+
const displayData = asOptionalTrimmedString(toolResult?.displayData);
|
|
604
|
+
const awaitingUserConfirmation = toolResultNeedsUserConfirmation(canonicalName, rawData);
|
|
605
|
+
const summary = displayData || defaultSummary(canonicalName, awaitingUserConfirmation ? "pending" : "succeeded");
|
|
606
|
+
const llmContextFallback = llmContext || displayData || awaitingUserConfirmation ? void 0 : buildRawDataLlmContextFallback(rawData, toolCallId);
|
|
607
|
+
const effectiveLlmContext = llmContext ?? llmContextFallback;
|
|
608
|
+
if (!awaitingUserConfirmation) {
|
|
609
|
+
toolRunSucceeded({
|
|
610
|
+
id: toolRunId,
|
|
611
|
+
outputSummary: summary
|
|
612
|
+
});
|
|
613
|
+
} else {
|
|
614
|
+
toolRunSetPending({ id: toolRunId });
|
|
615
|
+
}
|
|
542
616
|
const toolPayload = {
|
|
543
617
|
toolName: canonicalName,
|
|
544
|
-
status: "succeeded",
|
|
618
|
+
status: awaitingUserConfirmation ? "pending" : "succeeded",
|
|
619
|
+
interaction,
|
|
545
620
|
input: executionToolArgs,
|
|
546
621
|
rawToolCall: toolCall,
|
|
547
622
|
toolRunId,
|
|
548
623
|
summary,
|
|
549
|
-
...
|
|
624
|
+
...effectiveLlmContext ? { llmContext: effectiveLlmContext } : {},
|
|
550
625
|
...activity ? { activity } : {}
|
|
551
626
|
};
|
|
552
627
|
const isUiAskChoice = canonicalName === "ask_user";
|
|
@@ -564,11 +639,11 @@ var processToolData = createAsyncThunk(
|
|
|
564
639
|
} catch (e) {
|
|
565
640
|
const errorMessage = toErrorMessage(e);
|
|
566
641
|
const structured = getToolResultErrorData(e);
|
|
567
|
-
const
|
|
568
|
-
if (
|
|
642
|
+
const confirmationKey = structured?.code ? CONFIRMATION_INPUT_KEYS[structured.code] : void 0;
|
|
643
|
+
if (confirmationKey) {
|
|
569
644
|
const confirmedInput = {
|
|
570
645
|
...executionToolArgs ?? {},
|
|
571
|
-
|
|
646
|
+
[confirmationKey]: true
|
|
572
647
|
};
|
|
573
648
|
const summary2 = typeof structured?.displayData === "string" && structured.displayData.trim() || `\u26A0\uFE0F ${canonicalName} \u9700\u8981\u786E\u8BA4\u540E\u6267\u884C`;
|
|
574
649
|
toolRunStarted({
|
|
@@ -584,6 +659,7 @@ var processToolData = createAsyncThunk(
|
|
|
584
659
|
const toolPayload2 = {
|
|
585
660
|
toolName: canonicalName,
|
|
586
661
|
status: "pending",
|
|
662
|
+
interaction: "confirm",
|
|
587
663
|
input: confirmedInput,
|
|
588
664
|
rawToolCall: toolCall,
|
|
589
665
|
toolRunId,
|
|
@@ -592,7 +668,11 @@ var processToolData = createAsyncThunk(
|
|
|
592
668
|
};
|
|
593
669
|
return {
|
|
594
670
|
toolCallId,
|
|
595
|
-
rawResult: structured?.rawData !== void 0 ? structured.rawData :
|
|
671
|
+
rawResult: structured?.rawData !== void 0 ? structured.rawData : (
|
|
672
|
+
// 按实际确认码回填(此分支内 code 必在 CONFIRMATION_INPUT_KEYS 中),
|
|
673
|
+
// 不再对所有工具写死 self_evolution 文案。
|
|
674
|
+
{ error: structured?.code }
|
|
675
|
+
),
|
|
596
676
|
summary: summary2,
|
|
597
677
|
toolName: canonicalName,
|
|
598
678
|
toolRunId,
|
|
@@ -661,6 +741,9 @@ var handleToolCalls = createAsyncThunk(
|
|
|
661
741
|
const runningToolMessage = {
|
|
662
742
|
id: runningToolMessageId,
|
|
663
743
|
dbKey: runningToolDbKey,
|
|
744
|
+
// Explicit identity: tool results belong to the run's dialog, and the
|
|
745
|
+
// message-key parse is ambiguous once a message id contains "-msg-".
|
|
746
|
+
dialogId,
|
|
664
747
|
role: "tool",
|
|
665
748
|
content: JSON.stringify({ pending: true }),
|
|
666
749
|
toolCallId,
|
|
@@ -794,61 +877,6 @@ var handleToolCalls = createAsyncThunk(
|
|
|
794
877
|
}
|
|
795
878
|
);
|
|
796
879
|
|
|
797
|
-
// packages/ai/chat/parseApiError.ts
|
|
798
|
-
async function parseApiError(response) {
|
|
799
|
-
const errorBody = await response.text();
|
|
800
|
-
const truncateErrorMessage = (message, maxChars = 320) => message.length <= maxChars ? message : `${message.slice(0, maxChars)}\u2026`;
|
|
801
|
-
const isContextOverflow = (message) => /maximum context length|context length|context_length_exceeded|requested about .*tokens|too many tokens/i.test(message);
|
|
802
|
-
let defaultMessage = `\u72B6\u6001\u7801 ${response.status} ${response.statusText}`;
|
|
803
|
-
let errorMessage = defaultMessage;
|
|
804
|
-
let errorCode = `E${response.status}`;
|
|
805
|
-
try {
|
|
806
|
-
const errorJson = JSON.parse(errorBody);
|
|
807
|
-
errorMessage = errorJson?.error?.message || errorJson?.message || errorJson?.msg || errorBody || defaultMessage;
|
|
808
|
-
errorCode = errorJson?.error?.code || errorJson?.code || errorCode;
|
|
809
|
-
} catch (_e) {
|
|
810
|
-
if (errorBody) {
|
|
811
|
-
errorMessage = errorBody;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
switch (response.status) {
|
|
815
|
-
case 400:
|
|
816
|
-
if (isContextOverflow(errorMessage) || isContextOverflow(errorBody) || errorCode === "UPSTREAM_400") {
|
|
817
|
-
return "\u4E0A\u4E0B\u6587\u8FC7\u957F\uFF1A\u672C\u8F6E\u6D88\u606F\u6216\u5DE5\u5177\u7ED3\u679C\u592A\u5927\u3002\u8BF7\u7F29\u5C0F\u8303\u56F4\uFF0C\u6216\u5148\u8BFB\u53D6\u66F4\u5C0F\u7247\u6BB5\u540E\u518D\u7EE7\u7EED\u3002";
|
|
818
|
-
}
|
|
819
|
-
if (errorCode === "MISSING_PROVIDER_API_KEY") {
|
|
820
|
-
return truncateErrorMessage(errorMessage);
|
|
821
|
-
}
|
|
822
|
-
if (errorMessage && errorMessage !== defaultMessage) {
|
|
823
|
-
return `\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}`;
|
|
824
|
-
}
|
|
825
|
-
return "\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165";
|
|
826
|
-
case 413:
|
|
827
|
-
return "\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927\uFF1A\u8BF7\u51CF\u5C11\u4E00\u6B21\u53D1\u9001\u7684\u6D88\u606F\u3001\u6587\u4EF6\u6216\u5DE5\u5177\u7ED3\u679C\u3002";
|
|
828
|
-
case 401:
|
|
829
|
-
switch (errorCode) {
|
|
830
|
-
case "AUTH_TOKEN_EXPIRED":
|
|
831
|
-
return "\u767B\u5F55\u72B6\u6001\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
|
|
832
|
-
case "AUTH_ACCOUNT_INVALID":
|
|
833
|
-
return "\u8D26\u6237\u65E0\u6548\u6216\u5DF2\u88AB\u505C\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458";
|
|
834
|
-
case "AUTH_NO_TOKEN":
|
|
835
|
-
return "\u672A\u68C0\u6D4B\u5230\u767B\u5F55\u72B6\u6001\uFF0C\u8BF7\u5148\u767B\u5F55";
|
|
836
|
-
case "AUTH_INVALID_TOKEN":
|
|
837
|
-
return "\u767B\u5F55\u51ED\u8BC1\u65E0\u6548\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
|
|
838
|
-
case "AUTH_TOKEN_NOT_ACTIVE":
|
|
839
|
-
return "\u4EE4\u724C\u5C1A\u672A\u751F\u6548\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
|
|
840
|
-
default:
|
|
841
|
-
return errorMessage && errorMessage !== `\u72B6\u6001\u7801 401 Unauthorized` ? `\u8BA4\u8BC1\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}` : "\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55";
|
|
842
|
-
}
|
|
843
|
-
case 503:
|
|
844
|
-
return errorMessage && errorMessage !== `\u72B6\u6001\u7801 503 Service Unavailable` ? truncateErrorMessage(errorMessage) : "\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
|
|
845
|
-
case 504:
|
|
846
|
-
return "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5";
|
|
847
|
-
default:
|
|
848
|
-
return `API\u8BF7\u6C42\u5931\u8D25: ${truncateErrorMessage(errorMessage)}`;
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
|
|
852
880
|
// packages/ai/chat/accumulateToolCallChunks.ts
|
|
853
881
|
function accumulateToolCallChunks(currentAccumulatedCalls, toolCallChunks) {
|
|
854
882
|
const accumulator = {
|
|
@@ -1348,6 +1376,7 @@ async function persistInvalidToolCallResults(invalidCalls, ctx, startIndex) {
|
|
|
1348
1376
|
const toolMessage = {
|
|
1349
1377
|
id: runningToolMessageId,
|
|
1350
1378
|
dbKey: runningToolDbKey,
|
|
1379
|
+
dialogId: ctx.dialogId,
|
|
1351
1380
|
role: "tool",
|
|
1352
1381
|
content: selfHealContent,
|
|
1353
1382
|
toolCallId: callId,
|
|
@@ -1839,7 +1868,6 @@ export {
|
|
|
1839
1868
|
filterAndCleanMessages,
|
|
1840
1869
|
persistToolMessages,
|
|
1841
1870
|
handleToolCalls,
|
|
1842
|
-
parseApiError,
|
|
1843
1871
|
updateTotalUsage,
|
|
1844
1872
|
readStreamChunk,
|
|
1845
1873
|
sendOpenAICompletionsRequest
|
|
@@ -100,7 +100,17 @@ var DEFAULT_LABELS = {
|
|
|
100
100
|
runStopped: "Run stopped",
|
|
101
101
|
runFinished: "Run finished",
|
|
102
102
|
logTail: "Log tail:",
|
|
103
|
-
runs: (count) => `Runs (${count})
|
|
103
|
+
runs: (count) => `Runs (${count})`,
|
|
104
|
+
toolCount: (count) => `${count} tools`,
|
|
105
|
+
statusWord: (status) => status,
|
|
106
|
+
rows: {
|
|
107
|
+
agent: "agent ",
|
|
108
|
+
status: "status ",
|
|
109
|
+
tools: "tools ",
|
|
110
|
+
note: "note ",
|
|
111
|
+
error: "error ",
|
|
112
|
+
task: "task "
|
|
113
|
+
}
|
|
104
114
|
};
|
|
105
115
|
function resolveLabels(labels) {
|
|
106
116
|
return {
|
|
@@ -109,7 +119,10 @@ function resolveLabels(labels) {
|
|
|
109
119
|
runStopped: labels?.runStopped ?? DEFAULT_LABELS.runStopped,
|
|
110
120
|
runFinished: labels?.runFinished ?? DEFAULT_LABELS.runFinished,
|
|
111
121
|
logTail: labels?.logTail ?? DEFAULT_LABELS.logTail,
|
|
112
|
-
runs: labels?.runs ?? DEFAULT_LABELS.runs
|
|
122
|
+
runs: labels?.runs ?? DEFAULT_LABELS.runs,
|
|
123
|
+
toolCount: labels?.toolCount ?? DEFAULT_LABELS.toolCount,
|
|
124
|
+
statusWord: labels?.statusWord ?? DEFAULT_LABELS.statusWord,
|
|
125
|
+
rows: { ...DEFAULT_LABELS.rows, ...labels?.rows ?? {} }
|
|
113
126
|
};
|
|
114
127
|
}
|
|
115
128
|
function shortRunId(runId) {
|
|
@@ -165,21 +178,21 @@ function formatStartRunCard(agentName, status = "running", opts) {
|
|
|
165
178
|
const lines = [L.runStarted];
|
|
166
179
|
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
167
180
|
if (identity) {
|
|
168
|
-
lines.push(` agent
|
|
181
|
+
lines.push(` ${L.rows.agent}${identity}`);
|
|
169
182
|
}
|
|
170
|
-
lines.push(` status
|
|
183
|
+
lines.push(` ${L.rows.status}${icon} ${L.statusWord(status)}`);
|
|
171
184
|
const task = opts?.task?.trim();
|
|
172
185
|
if (task) {
|
|
173
|
-
lines.push(` task
|
|
186
|
+
lines.push(` ${L.rows.task}${clipText(task, TASK_PREVIEW_MAX)}`);
|
|
174
187
|
}
|
|
175
188
|
return lines.join("\n");
|
|
176
189
|
}
|
|
177
190
|
var TASK_PREVIEW_MAX = 72;
|
|
178
191
|
var NOTE_PREVIEW_MAX = 72;
|
|
179
|
-
function formatProgressRow(toolCallCount, lastToolNames) {
|
|
192
|
+
function formatProgressRow(toolCallCount, lastToolNames, labels = DEFAULT_LABELS) {
|
|
180
193
|
const parts = [];
|
|
181
194
|
if (typeof toolCallCount === "number" && Number.isFinite(toolCallCount)) {
|
|
182
|
-
parts.push(
|
|
195
|
+
parts.push(labels.toolCount(toolCallCount));
|
|
183
196
|
}
|
|
184
197
|
if (lastToolNames && lastToolNames.length > 0) {
|
|
185
198
|
parts.push(lastToolNames.join(", "));
|
|
@@ -190,21 +203,21 @@ function formatStatusRunCard(agentName, status = "running", opts) {
|
|
|
190
203
|
const L = resolveLabels(opts?.labels);
|
|
191
204
|
const icon = getAgentRunStatusIcon(status);
|
|
192
205
|
const age = formatRunAge(opts?.timing, opts?.now);
|
|
193
|
-
const lines = [L.runStatus, ` ${icon} ${status}${age ? ` ${age}` : ""}`];
|
|
206
|
+
const lines = [L.runStatus, ` ${icon} ${L.statusWord(status)}${age ? ` ${age}` : ""}`];
|
|
194
207
|
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
195
208
|
if (identity) {
|
|
196
|
-
lines.push(` agent
|
|
209
|
+
lines.push(` ${L.rows.agent}${identity}`);
|
|
197
210
|
}
|
|
198
|
-
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames);
|
|
211
|
+
const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L);
|
|
199
212
|
if (progress) {
|
|
200
|
-
lines.push(` tools
|
|
213
|
+
lines.push(` ${L.rows.tools}${progress}`);
|
|
201
214
|
}
|
|
202
215
|
const note = opts?.lastAssistantText?.trim();
|
|
203
216
|
if (note) {
|
|
204
|
-
lines.push(` note
|
|
217
|
+
lines.push(` ${L.rows.note}${clipText(note, NOTE_PREVIEW_MAX)}`);
|
|
205
218
|
}
|
|
206
219
|
if (opts?.errorMessage?.trim()) {
|
|
207
|
-
lines.push(` error
|
|
220
|
+
lines.push(` ${L.rows.error}${opts.errorMessage.trim()}`);
|
|
208
221
|
}
|
|
209
222
|
if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
|
|
210
223
|
lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
|
|
@@ -223,11 +236,11 @@ function formatFinishedRunCard(agentName, status, opts) {
|
|
|
223
236
|
const L = resolveLabels(opts?.labels);
|
|
224
237
|
const icon = getAgentRunStatusIcon(status);
|
|
225
238
|
const age = formatRunAge(opts?.timing, opts?.now);
|
|
226
|
-
const summary = [status, age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames)].filter(Boolean).join(" \xB7 ");
|
|
239
|
+
const summary = [L.statusWord(status), age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L)].filter(Boolean).join(" \xB7 ");
|
|
227
240
|
const lines = [L.runFinished, ` ${icon} ${summary}`];
|
|
228
241
|
const identity = formatIdentityRow(agentName, opts?.runId);
|
|
229
242
|
if (identity) {
|
|
230
|
-
lines.push(` agent
|
|
243
|
+
lines.push(` ${L.rows.agent}${identity}`);
|
|
231
244
|
}
|
|
232
245
|
const note = opts?.lastAssistantText?.trim();
|
|
233
246
|
if (note) {
|
|
@@ -245,7 +258,7 @@ function formatStopRunCard(status = "killed", labels) {
|
|
|
245
258
|
const L = resolveLabels(labels);
|
|
246
259
|
const icon = getAgentRunStatusIcon(status);
|
|
247
260
|
return `${L.runStopped}
|
|
248
|
-
${icon} ${status}`;
|
|
261
|
+
${icon} ${L.statusWord(status)}`;
|
|
249
262
|
}
|
|
250
263
|
function formatListRunsCard(runs, labels) {
|
|
251
264
|
const L = resolveLabels(labels);
|
|
@@ -260,7 +273,7 @@ function formatListRunsCard(runs, labels) {
|
|
|
260
273
|
function formatNotFoundRunCard(labels) {
|
|
261
274
|
const L = resolveLabels(labels);
|
|
262
275
|
return `${L.runStatus}
|
|
263
|
-
? not_found`;
|
|
276
|
+
? ${L.statusWord("not_found")}`;
|
|
264
277
|
}
|
|
265
278
|
var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
266
279
|
"done",
|
|
@@ -276,6 +289,24 @@ var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
|
|
|
276
289
|
function isAgentRunTerminalStatus(status) {
|
|
277
290
|
return typeof status === "string" && AGENT_RUN_TERMINAL_STATUSES.has(status);
|
|
278
291
|
}
|
|
292
|
+
function formatAgentListCard(agents, maxDisplay = 8) {
|
|
293
|
+
const total = agents.length;
|
|
294
|
+
const lines = [`Agents (${total})`];
|
|
295
|
+
const visible = agents.slice(0, maxDisplay);
|
|
296
|
+
for (const agent of visible) {
|
|
297
|
+
const star = agent.isFavorite ? "\u2605" : " ";
|
|
298
|
+
const own = agent.isOwned ? "\u25CE" : " ";
|
|
299
|
+
const name = agent.name || "(unnamed)";
|
|
300
|
+
const model = agent.model || "\u2014";
|
|
301
|
+
const source = agent.apiSource || agent.provider || agent.cliProvider || "\u2014";
|
|
302
|
+
const key = agent.agentKey || "(agentKey unavailable)";
|
|
303
|
+
lines.push(`${star}${own} ${name} ${model} ${source} ${key}`);
|
|
304
|
+
}
|
|
305
|
+
if (total > maxDisplay) {
|
|
306
|
+
lines.push(`\u2026 +${total - maxDisplay} more`);
|
|
307
|
+
}
|
|
308
|
+
return lines.join("\n");
|
|
309
|
+
}
|
|
279
310
|
|
|
280
311
|
export {
|
|
281
312
|
buildDelegatedTaskContent,
|
|
@@ -295,5 +326,6 @@ export {
|
|
|
295
326
|
formatStopRunCard,
|
|
296
327
|
formatListRunsCard,
|
|
297
328
|
formatNotFoundRunCard,
|
|
298
|
-
isAgentRunTerminalStatus
|
|
329
|
+
isAgentRunTerminalStatus,
|
|
330
|
+
formatAgentListCard
|
|
299
331
|
};
|
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
} from "./chunk-UAD2WT54.js";
|
|
8
8
|
import {
|
|
9
9
|
toTimestampMs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZYM73IHG.js";
|
|
11
|
+
import {
|
|
12
|
+
isTombstoneRecord
|
|
13
|
+
} from "./chunk-D2MDMY2M.js";
|
|
11
14
|
import {
|
|
12
15
|
fetchFromServer,
|
|
13
16
|
getAllServers
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HIM3FCLF.js";
|
|
15
18
|
import {
|
|
16
19
|
selectIdentityToken,
|
|
17
20
|
selectIdentityUserId
|
|
18
21
|
} from "./chunk-SEJ5OS6F.js";
|
|
19
|
-
import {
|
|
20
|
-
isTombstoneRecord
|
|
21
|
-
} from "./chunk-GBRG75BQ.js";
|
|
22
22
|
import {
|
|
23
23
|
__toESM
|
|
24
24
|
} from "./chunk-4VNS5WPM.js";
|