nolo-cli 0.100.0-alpha.1 → 0.100.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/README.md +1 -1
- package/{_executeModel-UM3TAOM3.js → _executeModel-WLFACVFR.js} +74 -67
- package/action-PNPQLJHG.js +20 -0
- package/{addContentAction-O7R66HEX.js → addContentAction-RBOUD7SJ.js} +12 -11
- package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-IODCR6TB.js} +18 -19
- package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-EFWZSSZA.js} +47 -42
- package/{agentEmailCommands-IYEMKJR3.js → agentEmailCommands-XQMUAB4R.js} +97 -87
- package/agentListCommands-EDV4RJ4D.js +742 -0
- package/{agentMachineCommands-E3IKDCBZ.js → agentMachineCommands-UOEI4TPN.js} +48 -43
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-IRNZXVGE.js} +1 -1
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
- package/agentRecordCommands-BIV7NMQZ.js +138 -0
- package/agentRunCommand-SY7N2BDL.js +167 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
- package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-SXYAKX3A.js} +48 -39
- package/{agentSlice-B7KLSPJV.js → agentSlice-WBSSBKBB.js} +14 -13
- package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-GTTBG53T.js} +46 -41
- package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-ZZCHUJAT.js} +46 -41
- package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-GZLLGY7Z.js} +46 -41
- package/{appGetCommands-SFAPP5PB.js → appGetCommands-ZRLWHJ3C.js} +46 -41
- package/{appListCommands-EKUBDRUO.js → appListCommands-OHARWLIL.js} +46 -41
- package/{authCommand-F4EFRRX6.js → authCommand-NHDLY3IB.js} +118 -24
- package/{authCommands-RGOGCPP6.js → authCommands-UDBJVSZU.js} +7 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-MAR5LPAC.js} +10 -8
- package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
- package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
- package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
- package/{chunk-ABQYVJBJ.js → chunk-46Y5D2BZ.js} +5 -5
- package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
- package/{chunk-H62HCIUP.js → chunk-4FFUDT6D.js} +24 -21
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-IIVGDG4I.js → chunk-4YSOUKUR.js} +13 -7
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/chunk-5J3PYNUP.js +255 -0
- package/{chunk-UIZCMBT3.js → chunk-5LTAPGPV.js} +10 -10
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
- package/{chunk-DNCEALKX.js → chunk-7MMSLEPA.js} +22 -29
- package/{chunk-L5UXH3B2.js → chunk-7TKWCTSY.js} +22 -6
- package/chunk-A4SQRTZ6.js +15 -0
- package/{chunk-7S4YWN7P.js → chunk-ADBZWMFB.js} +4 -4
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
- package/{chunk-KFFZBS5O.js → chunk-CHNCM7EF.js} +11 -9
- package/chunk-CHOZJMJS.js +78 -0
- package/chunk-CJN5OERD.js +13545 -0
- package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-MYUU2OIZ.js → chunk-DNHENQ3T.js} +23 -28
- package/chunk-DZ7R5V3Y.js +164 -0
- package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
- package/{chunk-V4MJDUSR.js → chunk-E73ON47R.js} +2 -2
- package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-FUANZCER.js → chunk-F3NUFVSP.js} +24 -5
- package/{chunk-HJUYAD4A.js → chunk-FJ5BGMNM.js} +5 -5
- package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
- package/{chunk-6IG4XSS6.js → chunk-FY7DCYW7.js} +88 -17
- package/{chunk-6VFARHZW.js → chunk-G53AA7RW.js} +934 -1091
- package/{chunk-J4MOO56S.js → chunk-GARACBQB.js} +10 -2
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-NA2YVRDF.js → chunk-GUYEMTRK.js} +551 -516
- 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-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
- package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
- package/{chunk-A2G4JCCZ.js → chunk-KLUBZL6X.js} +1 -1
- package/{chunk-4OEFYTWL.js → chunk-LKERWYPX.js} +67 -48
- package/{chunk-OEVAY4J6.js → chunk-LNVJHIGA.js} +18 -20
- package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
- package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-NWENLDMM.js +42 -0
- package/{chunk-AEOE4Z6Q.js → chunk-NZWAO6LH.js} +13 -15
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-Q7UVOSGX.js → chunk-ODTDLPBV.js} +20 -11
- package/chunk-OW4APERY.js +870 -0
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-EKXNDUWE.js → chunk-OYPMWCIQ.js} +67 -45
- package/{chunk-TOP2VXOR.js → chunk-PCF3QU5Q.js} +5 -5
- package/chunk-PH275YDS.js +7881 -0
- package/{chunk-WV42OMV7.js → chunk-PTDYOADJ.js} +8 -8
- package/{chunk-5H7KJX7J.js → chunk-SEB5HAUU.js} +5 -5
- package/{chunk-6D6VBVEW.js → chunk-SNMQMOD2.js} +80 -14
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-Z77CRGTW.js → chunk-TVCAR26G.js} +1 -1
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
- package/{chunk-JGLUFHZG.js → chunk-U6IGAJT4.js} +47 -67
- package/{chunk-RG6JBBX5.js → chunk-U7XXEI5R.js} +166 -13
- package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
- package/chunk-UJXNKP5V.js +760 -0
- package/{chunk-UKZDAFYT.js → chunk-UM4PH574.js} +6 -10
- package/{chunk-GEPUP7OO.js → chunk-UVKDJUTL.js} +3 -3
- package/{chunk-ZCYXJSTU.js → chunk-V5OWQOJZ.js} +19 -88
- package/{chunk-NA35QHCF.js → chunk-V7Y6KRAH.js} +1 -1
- package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
- package/{chunk-JRQFUXY7.js → chunk-VEYL5MO5.js} +99 -22
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
- package/{chunk-BP4XNZRM.js → chunk-W72ISAKC.js} +4 -4
- package/{chunk-DHDMC6FO.js → chunk-WCGC6S77.js} +14 -9
- package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
- package/{chunk-GTXHENTD.js → chunk-X34KOYU2.js} +873 -227
- package/{chunk-HVURBGF3.js → chunk-XFUBXRVI.js} +6 -6
- package/{chunk-3QWE3CFY.js → chunk-XIRXOUBV.js} +19 -17
- package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
- package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
- package/{chunk-ETI2NYVF.js → chunk-YPOPJAKN.js} +4 -4
- package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
- package/chunk-YV25TM3R.js +780 -0
- package/{chunk-X4N6F4VS.js → chunk-Z56IK6UT.js} +29 -78
- package/chunk-ZRAU6T47.js +56 -0
- package/commandRegistry-NKJIYWXB.js +833 -0
- package/{contentThunks-TFZIJAUK.js → contentThunks-F2BNWOZV.js} +36 -34
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-FF3MPCIU.js → createAgentAutomationAction-5N2NRNR7.js} +38 -36
- package/createDialogAction-DSEG4L5Y.js +69 -0
- package/{createPageAction-33ZEWWTG.js → createPageAction-K32FYQPE.js} +45 -42
- package/{chunk-LCX62BV6.js → cursorProvider-YGGNMVWX.js} +2496 -9897
- package/{dbSlice-XVWBAGYN.js → dbSlice-Q25STFGJ.js} +11 -10
- package/{deleteFile-YG6QMJLU.js → deleteFile-AJ2EZMHT.js} +7 -6
- package/{dialogCommands-5J56DFWN.js → dialogCommands-LF7PLYAD.js} +49 -45
- package/{dialogSlice-QDMNWIA5.js → dialogSlice-4GBOUTGL.js} +40 -33
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-NQR3S7A4.js} +48 -43
- package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-V3IAQ2HT.js} +49 -44
- package/{docReadCommands-HOSVSBDJ.js → docReadCommands-GDX4CLSU.js} +47 -42
- package/{docStore-TEB62I7A.js → docStore-ZTYSP3YE.js} +16 -12
- package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-QMYXWQOU.js} +48 -43
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-I5ICDDHM.js} +5 -5
- package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
- package/{handleSendMessageAction-ABLLW47K.js → handleSendMessageAction-XFZH2TQS.js} +110 -86
- package/index.js +87 -884
- package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-ZHZ3KXDM.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
- package/{machineCommands-IX7TOATI.js → machineCommands-KMU3D5I5.js} +91 -81
- package/machineWsRunDispatch-6GJ5YOSW.js +154 -0
- package/{memberThunks-QGFLFVCI.js → memberThunks-R75S3RWP.js} +20 -18
- package/{models-T3SG6MJ5.js → models-ZPU5EDF4.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-TEBH7FDX.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
- package/{read-COE3ZYR6.js → read-SRQMNO26.js} +7 -6
- package/{readDocTool-5USN4A6V.js → readDocTool-RC3JUNJ2.js} +5 -3
- package/{readlineWorkspace-KZNVDXAK.js → readlineWorkspace-ZMNRQXMC.js} +2704 -2060
- package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-46XQV5Q7.js} +21 -25
- package/{runAgentClientLoop-7WPY36JC.js → runAgentClientLoop-URRDZ5WG.js} +75 -69
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-J4V5ADQF.js} +15 -13
- package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-UHHV2QZW.js} +22 -26
- package/{chunk-AFUORTY4.js → settingThunks-PPZZZOWN.js} +226 -940
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-NKJVJCQQ.js → spaceCommands-2P2X37MC.js} +51 -46
- package/{streamAgentChatTurn-PCKWJVSK.js → streamAgentChatTurn-YPUYKXDX.js} +206 -105
- package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-A2TMVGAE.js} +18 -19
- package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
- package/tools-M5ENXZRJ.js +116 -0
- package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-Q65IBDGO.js} +24 -21
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-6QWA2RRC.js → updateDialogTitleAction-7PNUE23W.js} +82 -44
- package/action-YVYQEAAV.js +0 -31
- package/agentListCommands-KMS675GZ.js +0 -406
- package/agentRecordCommands-OSWVOMZE.js +0 -128
- package/agentRunCommand-CE5WBXBP.js +0 -155
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-7ZM7QWC6.js +0 -186
- package/chunk-BZPERCRA.js +0 -19009
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/createDialogAction-I2TXOWUI.js +0 -65
- package/machineWsRunDispatch-OOZS2DG5.js +0 -144
- package/settingSlice-ZQZVUPKK.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-JU7UHNZ4.js +0 -110
- package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
- 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-5LTAPGPV.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-OYPMWCIQ.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-GUYEMTRK.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";
|
|
@@ -35,15 +38,15 @@ import {
|
|
|
35
38
|
messageStreamEnd,
|
|
36
39
|
messageStreaming,
|
|
37
40
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-CJN5OERD.js";
|
|
39
42
|
import {
|
|
40
43
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CHNCM7EF.js";
|
|
42
45
|
import {
|
|
43
46
|
addActiveController,
|
|
44
47
|
removeActiveController,
|
|
45
48
|
tokenUsageLiveUpdate
|
|
46
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-BZ7NPA6G.js";
|
|
47
50
|
import {
|
|
48
51
|
accumulateToolCallDelta,
|
|
49
52
|
createThinkParserState,
|
|
@@ -56,39 +59,39 @@ import {
|
|
|
56
59
|
import {
|
|
57
60
|
EMPTY_ASSISTANT_REPAIR_PROMPT,
|
|
58
61
|
getModelInfo
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-LKERWYPX.js";
|
|
63
|
+
import {
|
|
64
|
+
write
|
|
65
|
+
} from "./chunk-4FFUDT6D.js";
|
|
60
66
|
import {
|
|
61
67
|
getApiEndpoint
|
|
62
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-3BXNTXYI.js";
|
|
63
69
|
import {
|
|
64
70
|
toErrorMessage
|
|
65
71
|
} from "./chunk-HNMXYYJR.js";
|
|
66
72
|
import {
|
|
67
|
-
|
|
68
|
-
} from "./chunk-
|
|
73
|
+
extractCustomId
|
|
74
|
+
} from "./chunk-M2EJHDJP.js";
|
|
69
75
|
import {
|
|
70
|
-
|
|
71
|
-
} from "./chunk-
|
|
76
|
+
isRecord
|
|
77
|
+
} from "./chunk-KUG52IAP.js";
|
|
78
|
+
import {
|
|
79
|
+
selectCurrentServer
|
|
80
|
+
} from "./chunk-NWENLDMM.js";
|
|
72
81
|
import {
|
|
73
82
|
createDialogMessageKeyAndId,
|
|
74
83
|
dialogMessageKey,
|
|
75
84
|
toTrimmedString
|
|
76
|
-
} from "./chunk-
|
|
77
|
-
import {
|
|
78
|
-
extractCustomId
|
|
79
|
-
} from "./chunk-M2EJHDJP.js";
|
|
85
|
+
} from "./chunk-3AH7LNUB.js";
|
|
80
86
|
import {
|
|
81
87
|
createAsyncThunk
|
|
82
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-VY6VFGKR.js";
|
|
83
89
|
import {
|
|
84
90
|
isAbortError
|
|
85
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-HIM3FCLF.js";
|
|
86
92
|
import {
|
|
87
93
|
selectIdentityToken
|
|
88
94
|
} from "./chunk-SEJ5OS6F.js";
|
|
89
|
-
import {
|
|
90
|
-
isRecord
|
|
91
|
-
} from "./chunk-KUG52IAP.js";
|
|
92
95
|
import {
|
|
93
96
|
asTrimmedString
|
|
94
97
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -275,7 +278,7 @@ async function persistToolMessage(dispatch, message, options = {}) {
|
|
|
275
278
|
}
|
|
276
279
|
throw err;
|
|
277
280
|
}
|
|
278
|
-
const { controller: _controller, ...rest } = message;
|
|
281
|
+
const { controller: _controller, dialogId: _dialogId, ...rest } = message;
|
|
279
282
|
const isStreaming = options.isStreaming !== void 0 ? options.isStreaming : Boolean(rest.isStreaming);
|
|
280
283
|
try {
|
|
281
284
|
const writeRequest = dispatch(
|
|
@@ -661,6 +664,9 @@ var handleToolCalls = createAsyncThunk(
|
|
|
661
664
|
const runningToolMessage = {
|
|
662
665
|
id: runningToolMessageId,
|
|
663
666
|
dbKey: runningToolDbKey,
|
|
667
|
+
// Explicit identity: tool results belong to the run's dialog, and the
|
|
668
|
+
// message-key parse is ambiguous once a message id contains "-msg-".
|
|
669
|
+
dialogId,
|
|
664
670
|
role: "tool",
|
|
665
671
|
content: JSON.stringify({ pending: true }),
|
|
666
672
|
toolCallId,
|
|
@@ -794,61 +800,6 @@ var handleToolCalls = createAsyncThunk(
|
|
|
794
800
|
}
|
|
795
801
|
);
|
|
796
802
|
|
|
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
803
|
// packages/ai/chat/accumulateToolCallChunks.ts
|
|
853
804
|
function accumulateToolCallChunks(currentAccumulatedCalls, toolCallChunks) {
|
|
854
805
|
const accumulator = {
|
|
@@ -1348,6 +1299,7 @@ async function persistInvalidToolCallResults(invalidCalls, ctx, startIndex) {
|
|
|
1348
1299
|
const toolMessage = {
|
|
1349
1300
|
id: runningToolMessageId,
|
|
1350
1301
|
dbKey: runningToolDbKey,
|
|
1302
|
+
dialogId: ctx.dialogId,
|
|
1351
1303
|
role: "tool",
|
|
1352
1304
|
content: selfHealContent,
|
|
1353
1305
|
toolCallId: callId,
|
|
@@ -1839,7 +1791,6 @@ export {
|
|
|
1839
1791
|
filterAndCleanMessages,
|
|
1840
1792
|
persistToolMessages,
|
|
1841
1793
|
handleToolCalls,
|
|
1842
|
-
parseApiError,
|
|
1843
1794
|
updateTotalUsage,
|
|
1844
1795
|
readStreamChunk,
|
|
1845
1796
|
sendOpenAICompletionsRequest
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addLeadingZeros,
|
|
3
|
+
requiredArgs,
|
|
4
|
+
toDate
|
|
5
|
+
} from "./chunk-4LCOCOR5.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/date-fns/esm/formatISO/index.js
|
|
8
|
+
function formatISO(date, options) {
|
|
9
|
+
var _options$format, _options$representati;
|
|
10
|
+
requiredArgs(1, arguments);
|
|
11
|
+
var originalDate = toDate(date);
|
|
12
|
+
if (isNaN(originalDate.getTime())) {
|
|
13
|
+
throw new RangeError("Invalid time value");
|
|
14
|
+
}
|
|
15
|
+
var format = String((_options$format = options === null || options === void 0 ? void 0 : options.format) !== null && _options$format !== void 0 ? _options$format : "extended");
|
|
16
|
+
var representation = String((_options$representati = options === null || options === void 0 ? void 0 : options.representation) !== null && _options$representati !== void 0 ? _options$representati : "complete");
|
|
17
|
+
if (format !== "extended" && format !== "basic") {
|
|
18
|
+
throw new RangeError("format must be 'extended' or 'basic'");
|
|
19
|
+
}
|
|
20
|
+
if (representation !== "date" && representation !== "time" && representation !== "complete") {
|
|
21
|
+
throw new RangeError("representation must be 'date', 'time', or 'complete'");
|
|
22
|
+
}
|
|
23
|
+
var result = "";
|
|
24
|
+
var tzOffset = "";
|
|
25
|
+
var dateDelimiter = format === "extended" ? "-" : "";
|
|
26
|
+
var timeDelimiter = format === "extended" ? ":" : "";
|
|
27
|
+
if (representation !== "time") {
|
|
28
|
+
var day = addLeadingZeros(originalDate.getDate(), 2);
|
|
29
|
+
var month = addLeadingZeros(originalDate.getMonth() + 1, 2);
|
|
30
|
+
var year = addLeadingZeros(originalDate.getFullYear(), 4);
|
|
31
|
+
result = "".concat(year).concat(dateDelimiter).concat(month).concat(dateDelimiter).concat(day);
|
|
32
|
+
}
|
|
33
|
+
if (representation !== "date") {
|
|
34
|
+
var offset = originalDate.getTimezoneOffset();
|
|
35
|
+
if (offset !== 0) {
|
|
36
|
+
var absoluteOffset = Math.abs(offset);
|
|
37
|
+
var hourOffset = addLeadingZeros(Math.floor(absoluteOffset / 60), 2);
|
|
38
|
+
var minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);
|
|
39
|
+
var sign = offset < 0 ? "+" : "-";
|
|
40
|
+
tzOffset = "".concat(sign).concat(hourOffset, ":").concat(minuteOffset);
|
|
41
|
+
} else {
|
|
42
|
+
tzOffset = "Z";
|
|
43
|
+
}
|
|
44
|
+
var hour = addLeadingZeros(originalDate.getHours(), 2);
|
|
45
|
+
var minute = addLeadingZeros(originalDate.getMinutes(), 2);
|
|
46
|
+
var second = addLeadingZeros(originalDate.getSeconds(), 2);
|
|
47
|
+
var separator = result === "" ? "" : "T";
|
|
48
|
+
var time = [hour, minute, second].join(timeDelimiter);
|
|
49
|
+
result = "".concat(result).concat(separator).concat(time).concat(tzOffset);
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
formatISO
|
|
56
|
+
};
|