pybao-cli 1.4.62 → 1.4.64
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/dist/REPL-ADU4IURM.js +46 -0
- package/dist/{acp-4NYI6JJF.js → acp-NNC74LVQ.js} +29 -29
- package/dist/{agentsValidate-LYXNTHHB.js → agentsValidate-N2PRTFSW.js} +7 -7
- package/dist/{ask-3KUPARP2.js → ask-OMCYF7SB.js} +28 -28
- package/dist/{autoUpdater-5XZ6744S.js → autoUpdater-KTJOOCBF.js} +3 -3
- package/dist/{chunk-5DB2HLP3.js → chunk-2CELXL5Z.js} +17 -17
- package/dist/{chunk-5DB2HLP3.js.map → chunk-2CELXL5Z.js.map} +1 -1
- package/dist/{chunk-RA5TQSRT.js → chunk-35JFWNXQ.js} +1 -1
- package/dist/{chunk-LMLII7Q2.js → chunk-37BP5U6M.js} +1 -1
- package/dist/{chunk-6CTJEKOL.js → chunk-6N2MGB6O.js} +3 -3
- package/dist/{chunk-2YZZWT47.js → chunk-6WB73VIP.js} +3 -3
- package/dist/{chunk-WQTG6HED.js → chunk-7RRCPMNG.js} +144 -72
- package/dist/chunk-7RRCPMNG.js.map +7 -0
- package/dist/{chunk-4HE4XCHW.js → chunk-CFPCW6W7.js} +4 -4
- package/dist/{chunk-KIQXQLEB.js → chunk-CPIJT73E.js} +4 -4
- package/dist/{chunk-XFYI2VDM.js → chunk-DSIEFOTV.js} +2 -2
- package/dist/{chunk-5NB4DS5W.js → chunk-EXRF6SQY.js} +1 -1
- package/dist/{chunk-XMP3P7UJ.js → chunk-GN3ZKIK6.js} +1 -1
- package/dist/{chunk-3EZMZ34Z.js → chunk-HJ5SZ4TA.js} +1 -1
- package/dist/{chunk-R2IRQSJC.js → chunk-IFDY7DTL.js} +1 -1
- package/dist/{chunk-NRSUWZK4.js → chunk-KZTHNPPI.js} +3 -3
- package/dist/{chunk-CK2T76JI.js → chunk-LHNIA7TU.js} +4 -4
- package/dist/{chunk-FPUIG2DR.js → chunk-MLDL3JF6.js} +1 -1
- package/dist/{chunk-ZJIUQ235.js → chunk-OF4XXXQ3.js} +10 -3
- package/dist/{chunk-ZJIUQ235.js.map → chunk-OF4XXXQ3.js.map} +2 -2
- package/dist/{chunk-S5EJ7KCA.js → chunk-OHJ6K3RB.js} +2 -2
- package/dist/{chunk-ZUNHKV45.js → chunk-OXHRDN5X.js} +2 -2
- package/dist/{chunk-RDRKGYMZ.js → chunk-OZ6NCAGV.js} +2 -2
- package/dist/{chunk-FJJ6KZ7M.js → chunk-POWN423Y.js} +3 -3
- package/dist/{chunk-GM5ZJ7DT.js → chunk-RBHDCD2Z.js} +1 -1
- package/dist/{chunk-MDKDC5II.js → chunk-UHGE2VNM.js} +2 -2
- package/dist/{chunk-KYZ3A4WN.js → chunk-V4VOZJWR.js} +3 -3
- package/dist/{chunk-XGSY4SPL.js → chunk-VBLYYT4L.js} +3 -3
- package/dist/{chunk-DCVGTJDI.js → chunk-VDHPWKZV.js} +4 -4
- package/dist/{chunk-TNESUQAU.js → chunk-WEUXBNQB.js} +1 -1
- package/dist/{chunk-TNESUQAU.js.map → chunk-WEUXBNQB.js.map} +1 -1
- package/dist/{chunk-ZUR27DFA.js → chunk-WKFRDCMK.js} +1 -1
- package/dist/{chunk-3FXENPA3.js → chunk-WVYOCUBS.js} +3 -3
- package/dist/{chunk-ULOTS5TZ.js → chunk-XJ7FTO4Q.js} +2 -2
- package/dist/{cli-L7NI3IOT.js → cli-KSOAUNRJ.js} +87 -87
- package/dist/commands-WM7IIR65.js +50 -0
- package/dist/{config-ZNO3N5FZ.js → config-VMBOUVXO.js} +4 -4
- package/dist/{context-VDFTROLV.js → context-2ZGOMAC7.js} +6 -6
- package/dist/{customCommands-FKJZ22HA.js → customCommands-JSUSLJNY.js} +4 -4
- package/dist/{env-O6PWUAXR.js → env-J2YKO3AW.js} +2 -2
- package/dist/{file-KPRV3JOY.js → file-AEJWH3BT.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-B56E7A3E.js → llm-5RBAGTX5.js} +29 -29
- package/dist/{llmLazy-PLNA2YEW.js → llmLazy-GBSYY2PZ.js} +1 -1
- package/dist/{loader-JZCFB2Z4.js → loader-FJGRWSZ4.js} +4 -4
- package/dist/{lsp-LRWY5O2G.js → lsp-PVK7EZJT.js} +6 -6
- package/dist/{lspAnchor-7TGKJJ7D.js → lspAnchor-JS73KKBP.js} +6 -6
- package/dist/{mcp-SMNK5RS5.js → mcp-YXM66Q2G.js} +7 -7
- package/dist/{mentionProcessor-634SMOOJ.js → mentionProcessor-GOHXPZVX.js} +5 -5
- package/dist/{messages-FB4NUTHM.js → messages-4AVBQONO.js} +1 -1
- package/dist/{model-WH2Q6UZJ.js → model-ZVCXE44R.js} +5 -5
- package/dist/{openai-BV6QP4OA.js → openai-XSMFEM5F.js} +5 -5
- package/dist/{outputStyles-C6H6SVSA.js → outputStyles-KMLQ5API.js} +4 -4
- package/dist/{pluginRuntime-IRKARA7H.js → pluginRuntime-7URRA2OK.js} +6 -6
- package/dist/{pluginValidation-MVWDIOU3.js → pluginValidation-TZLMGK5Q.js} +6 -6
- package/dist/prompts-KLR3QT24.js +52 -0
- package/dist/{pybAgentSessionLoad-O2UIG72F.js → pybAgentSessionLoad-HMCWFUZR.js} +4 -4
- package/dist/{pybAgentSessionResume-HVLEWJDM.js → pybAgentSessionResume-JT6W67ZR.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-HJZ5DSEI.js → pybAgentStreamJsonSession-QFCZBOS4.js} +1 -1
- package/dist/{pybHooks-POMLIKQB.js → pybHooks-LF6OM4KC.js} +4 -4
- package/dist/query-DD7PQZQM.js +54 -0
- package/dist/{registry-ODXCQP6E.js → registry-OZAIBL65.js} +5 -5
- package/dist/{ripgrep-AQ7RJ4L2.js → ripgrep-ZECM5W56.js} +3 -3
- package/dist/{skillMarketplace-WY7FEZKV.js → skillMarketplace-CO2USHBI.js} +3 -3
- package/dist/{state-2EUXD6CF.js → state-QBXHDWLK.js} +2 -2
- package/dist/{theme-6HMN6U2N.js → theme-2BHFZVXU.js} +5 -5
- package/dist/{toolPermissionSettings-NDOV3POK.js → toolPermissionSettings-VTA3XZ3G.js} +6 -6
- package/dist/tools-WCNFHQ6U.js +51 -0
- package/dist/{userInput-OJ72YG7A.js → userInput-24DBRUI7.js} +30 -30
- package/package.json +1 -1
- package/dist/REPL-ATADQWNN.js +0 -46
- package/dist/chunk-WQTG6HED.js.map +0 -7
- package/dist/commands-TMYYMQUF.js +0 -50
- package/dist/prompts-VHQWDKSG.js +0 -52
- package/dist/query-2MIHVE7W.js +0 -54
- package/dist/tools-FVYTYAGD.js +0 -51
- /package/dist/{REPL-ATADQWNN.js.map → REPL-ADU4IURM.js.map} +0 -0
- /package/dist/{acp-4NYI6JJF.js.map → acp-NNC74LVQ.js.map} +0 -0
- /package/dist/{agentsValidate-LYXNTHHB.js.map → agentsValidate-N2PRTFSW.js.map} +0 -0
- /package/dist/{ask-3KUPARP2.js.map → ask-OMCYF7SB.js.map} +0 -0
- /package/dist/{autoUpdater-5XZ6744S.js.map → autoUpdater-KTJOOCBF.js.map} +0 -0
- /package/dist/{chunk-RA5TQSRT.js.map → chunk-35JFWNXQ.js.map} +0 -0
- /package/dist/{chunk-LMLII7Q2.js.map → chunk-37BP5U6M.js.map} +0 -0
- /package/dist/{chunk-6CTJEKOL.js.map → chunk-6N2MGB6O.js.map} +0 -0
- /package/dist/{chunk-2YZZWT47.js.map → chunk-6WB73VIP.js.map} +0 -0
- /package/dist/{chunk-4HE4XCHW.js.map → chunk-CFPCW6W7.js.map} +0 -0
- /package/dist/{chunk-KIQXQLEB.js.map → chunk-CPIJT73E.js.map} +0 -0
- /package/dist/{chunk-XFYI2VDM.js.map → chunk-DSIEFOTV.js.map} +0 -0
- /package/dist/{chunk-5NB4DS5W.js.map → chunk-EXRF6SQY.js.map} +0 -0
- /package/dist/{chunk-XMP3P7UJ.js.map → chunk-GN3ZKIK6.js.map} +0 -0
- /package/dist/{chunk-3EZMZ34Z.js.map → chunk-HJ5SZ4TA.js.map} +0 -0
- /package/dist/{chunk-R2IRQSJC.js.map → chunk-IFDY7DTL.js.map} +0 -0
- /package/dist/{chunk-NRSUWZK4.js.map → chunk-KZTHNPPI.js.map} +0 -0
- /package/dist/{chunk-CK2T76JI.js.map → chunk-LHNIA7TU.js.map} +0 -0
- /package/dist/{chunk-FPUIG2DR.js.map → chunk-MLDL3JF6.js.map} +0 -0
- /package/dist/{chunk-S5EJ7KCA.js.map → chunk-OHJ6K3RB.js.map} +0 -0
- /package/dist/{chunk-ZUNHKV45.js.map → chunk-OXHRDN5X.js.map} +0 -0
- /package/dist/{chunk-RDRKGYMZ.js.map → chunk-OZ6NCAGV.js.map} +0 -0
- /package/dist/{chunk-FJJ6KZ7M.js.map → chunk-POWN423Y.js.map} +0 -0
- /package/dist/{chunk-GM5ZJ7DT.js.map → chunk-RBHDCD2Z.js.map} +0 -0
- /package/dist/{chunk-MDKDC5II.js.map → chunk-UHGE2VNM.js.map} +0 -0
- /package/dist/{chunk-KYZ3A4WN.js.map → chunk-V4VOZJWR.js.map} +0 -0
- /package/dist/{chunk-XGSY4SPL.js.map → chunk-VBLYYT4L.js.map} +0 -0
- /package/dist/{chunk-DCVGTJDI.js.map → chunk-VDHPWKZV.js.map} +0 -0
- /package/dist/{chunk-ZUR27DFA.js.map → chunk-WKFRDCMK.js.map} +0 -0
- /package/dist/{chunk-3FXENPA3.js.map → chunk-WVYOCUBS.js.map} +0 -0
- /package/dist/{chunk-ULOTS5TZ.js.map → chunk-XJ7FTO4Q.js.map} +0 -0
- /package/dist/{cli-L7NI3IOT.js.map → cli-KSOAUNRJ.js.map} +0 -0
- /package/dist/{commands-TMYYMQUF.js.map → commands-WM7IIR65.js.map} +0 -0
- /package/dist/{config-ZNO3N5FZ.js.map → config-VMBOUVXO.js.map} +0 -0
- /package/dist/{context-VDFTROLV.js.map → context-2ZGOMAC7.js.map} +0 -0
- /package/dist/{customCommands-FKJZ22HA.js.map → customCommands-JSUSLJNY.js.map} +0 -0
- /package/dist/{env-O6PWUAXR.js.map → env-J2YKO3AW.js.map} +0 -0
- /package/dist/{file-KPRV3JOY.js.map → file-AEJWH3BT.js.map} +0 -0
- /package/dist/{llm-B56E7A3E.js.map → llm-5RBAGTX5.js.map} +0 -0
- /package/dist/{llmLazy-PLNA2YEW.js.map → llmLazy-GBSYY2PZ.js.map} +0 -0
- /package/dist/{loader-JZCFB2Z4.js.map → loader-FJGRWSZ4.js.map} +0 -0
- /package/dist/{lsp-LRWY5O2G.js.map → lsp-PVK7EZJT.js.map} +0 -0
- /package/dist/{lspAnchor-7TGKJJ7D.js.map → lspAnchor-JS73KKBP.js.map} +0 -0
- /package/dist/{mcp-SMNK5RS5.js.map → mcp-YXM66Q2G.js.map} +0 -0
- /package/dist/{mentionProcessor-634SMOOJ.js.map → mentionProcessor-GOHXPZVX.js.map} +0 -0
- /package/dist/{messages-FB4NUTHM.js.map → messages-4AVBQONO.js.map} +0 -0
- /package/dist/{model-WH2Q6UZJ.js.map → model-ZVCXE44R.js.map} +0 -0
- /package/dist/{openai-BV6QP4OA.js.map → openai-XSMFEM5F.js.map} +0 -0
- /package/dist/{outputStyles-C6H6SVSA.js.map → outputStyles-KMLQ5API.js.map} +0 -0
- /package/dist/{pluginRuntime-IRKARA7H.js.map → pluginRuntime-7URRA2OK.js.map} +0 -0
- /package/dist/{pluginValidation-MVWDIOU3.js.map → pluginValidation-TZLMGK5Q.js.map} +0 -0
- /package/dist/{prompts-VHQWDKSG.js.map → prompts-KLR3QT24.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-O2UIG72F.js.map → pybAgentSessionLoad-HMCWFUZR.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-HVLEWJDM.js.map → pybAgentSessionResume-JT6W67ZR.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-HJZ5DSEI.js.map → pybAgentStreamJsonSession-QFCZBOS4.js.map} +0 -0
- /package/dist/{pybHooks-POMLIKQB.js.map → pybHooks-LF6OM4KC.js.map} +0 -0
- /package/dist/{query-2MIHVE7W.js.map → query-DD7PQZQM.js.map} +0 -0
- /package/dist/{registry-ODXCQP6E.js.map → registry-OZAIBL65.js.map} +0 -0
- /package/dist/{ripgrep-AQ7RJ4L2.js.map → ripgrep-ZECM5W56.js.map} +0 -0
- /package/dist/{skillMarketplace-WY7FEZKV.js.map → skillMarketplace-CO2USHBI.js.map} +0 -0
- /package/dist/{state-2EUXD6CF.js.map → state-QBXHDWLK.js.map} +0 -0
- /package/dist/{theme-6HMN6U2N.js.map → theme-2BHFZVXU.js.map} +0 -0
- /package/dist/{toolPermissionSettings-NDOV3POK.js.map → toolPermissionSettings-VTA3XZ3G.js.map} +0 -0
- /package/dist/{tools-FVYTYAGD.js.map → tools-WCNFHQ6U.js.map} +0 -0
- /package/dist/{userInput-OJ72YG7A.js.map → userInput-24DBRUI7.js.map} +0 -0
|
@@ -3,13 +3,13 @@ const require = __pybCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getGlobalConfig,
|
|
5
5
|
saveGlobalConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V4VOZJWR.js";
|
|
7
7
|
import {
|
|
8
8
|
debug
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WKFRDCMK.js";
|
|
10
10
|
import {
|
|
11
11
|
logError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HJ5SZ4TA.js";
|
|
13
13
|
|
|
14
14
|
// src/utils/model/index.ts
|
|
15
15
|
import { memoize } from "lodash-es";
|
|
@@ -2,15 +2,15 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
loadSettingsWithLegacyFallback
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-35JFWNXQ.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WKFRDCMK.js";
|
|
9
9
|
import {
|
|
10
10
|
env,
|
|
11
11
|
getSessionRoot,
|
|
12
12
|
resolveXdgDataPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HJ5SZ4TA.js";
|
|
14
14
|
import {
|
|
15
15
|
__require
|
|
16
16
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -3,18 +3,18 @@ const require = __pybCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
formatValidationResult,
|
|
5
5
|
validatePluginOrMarketplacePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KZTHNPPI.js";
|
|
7
7
|
import {
|
|
8
8
|
loadPybAgentSessionMessages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IFDY7DTL.js";
|
|
10
10
|
import {
|
|
11
11
|
listPybAgentSessions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RBHDCD2Z.js";
|
|
13
13
|
import {
|
|
14
14
|
appendSessionCustomTitleRecord,
|
|
15
15
|
appendSessionJsonlFromMessage,
|
|
16
16
|
appendSessionTagRecord
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OZ6NCAGV.js";
|
|
18
18
|
import {
|
|
19
19
|
drainHookSystemPromptAdditions,
|
|
20
20
|
getHookTranscriptPath,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
runStopHooks,
|
|
27
27
|
runUserPromptSubmitHooks,
|
|
28
28
|
updateHookTranscriptForMessages
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VBLYYT4L.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_OUTPUT_STYLE,
|
|
32
32
|
getAvailableOutputStyles,
|
|
@@ -35,17 +35,18 @@ import {
|
|
|
35
35
|
getOutputStyleSystemPromptAdditions,
|
|
36
36
|
resolveOutputStyleName,
|
|
37
37
|
setCurrentOutputStyle
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-UHGE2VNM.js";
|
|
39
39
|
import {
|
|
40
40
|
fetchCustomModels,
|
|
41
41
|
getModelFeatures,
|
|
42
|
-
getSessionState
|
|
43
|
-
|
|
42
|
+
getSessionState,
|
|
43
|
+
setSessionState
|
|
44
|
+
} from "./chunk-OF4XXXQ3.js";
|
|
44
45
|
import {
|
|
45
46
|
queryLLM,
|
|
46
47
|
queryQuick,
|
|
47
48
|
verifyApiKey
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CPIJT73E.js";
|
|
49
50
|
import {
|
|
50
51
|
DEFAULT_TIMEOUT_MS,
|
|
51
52
|
FallbackToolUseRejectedMessage,
|
|
@@ -59,7 +60,7 @@ import {
|
|
|
59
60
|
listMCPServers,
|
|
60
61
|
loadMergedSettings,
|
|
61
62
|
normalizeSandboxRuntimeConfigFromSettings
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-CFPCW6W7.js";
|
|
63
64
|
import {
|
|
64
65
|
addMarketplace,
|
|
65
66
|
disableSkillPlugin,
|
|
@@ -72,11 +73,11 @@ import {
|
|
|
72
73
|
refreshMarketplaceAsync,
|
|
73
74
|
removeMarketplace,
|
|
74
75
|
uninstallSkillPlugin
|
|
75
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-37BP5U6M.js";
|
|
76
77
|
import {
|
|
77
78
|
loadToolPermissionContextFromDisk,
|
|
78
79
|
persistToolPermissionUpdateToDisk
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-POWN423Y.js";
|
|
80
81
|
import {
|
|
81
82
|
applyToolPermissionContextUpdate,
|
|
82
83
|
applyToolPermissionContextUpdates,
|
|
@@ -87,13 +88,13 @@ import {
|
|
|
87
88
|
generateSystemReminders,
|
|
88
89
|
resetReminderSession,
|
|
89
90
|
systemReminderService
|
|
90
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-DSIEFOTV.js";
|
|
91
92
|
import {
|
|
92
93
|
clearAgentCache,
|
|
93
94
|
getActiveAgents,
|
|
94
95
|
getAgentByType,
|
|
95
96
|
getAllAgents
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-XJ7FTO4Q.js";
|
|
97
98
|
import {
|
|
98
99
|
API_ERROR_MESSAGE_PREFIX,
|
|
99
100
|
CANCEL_MESSAGE,
|
|
@@ -124,7 +125,7 @@ import {
|
|
|
124
125
|
processUserInput,
|
|
125
126
|
reorderMessages,
|
|
126
127
|
stripSystemMessages
|
|
127
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-EXRF6SQY.js";
|
|
128
129
|
import {
|
|
129
130
|
getRequestStatus,
|
|
130
131
|
setRequestStatus,
|
|
@@ -154,7 +155,7 @@ import {
|
|
|
154
155
|
normalizeFilePath,
|
|
155
156
|
readTextContent,
|
|
156
157
|
writeTextContent
|
|
157
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-OHJ6K3RB.js";
|
|
158
159
|
import {
|
|
159
160
|
parseBlockEdits
|
|
160
161
|
} from "./chunk-QWIBSCDN.js";
|
|
@@ -164,18 +165,18 @@ import {
|
|
|
164
165
|
ParserRegistry,
|
|
165
166
|
initParser,
|
|
166
167
|
loadLanguage
|
|
167
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-VDHPWKZV.js";
|
|
168
169
|
import {
|
|
169
170
|
getSettingsFileCandidates,
|
|
170
171
|
loadSettingsWithLegacyFallback,
|
|
171
172
|
readSettingsFile
|
|
172
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-35JFWNXQ.js";
|
|
173
174
|
import {
|
|
174
175
|
getCustomCommandDirectories,
|
|
175
176
|
hasCustomCommands,
|
|
176
177
|
loadCustomCommands,
|
|
177
178
|
reloadCustomCommands
|
|
178
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-OXHRDN5X.js";
|
|
179
180
|
import {
|
|
180
181
|
getSessionPlugins
|
|
181
182
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -183,7 +184,7 @@ import {
|
|
|
183
184
|
ModelManager,
|
|
184
185
|
getModelManager,
|
|
185
186
|
isDefaultSlowAndCapableModel
|
|
186
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-6N2MGB6O.js";
|
|
187
188
|
import {
|
|
188
189
|
getCodeStyle,
|
|
189
190
|
getContext,
|
|
@@ -191,13 +192,13 @@ import {
|
|
|
191
192
|
getIsGit,
|
|
192
193
|
getProjectDocs,
|
|
193
194
|
getProjectStructureStatisticsBlock
|
|
194
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-LHNIA7TU.js";
|
|
195
196
|
import {
|
|
196
197
|
ripGrep
|
|
197
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-GN3ZKIK6.js";
|
|
198
199
|
import {
|
|
199
200
|
getTheme
|
|
200
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-MLDL3JF6.js";
|
|
201
202
|
import {
|
|
202
203
|
DEFAULT_GLOBAL_CONFIG,
|
|
203
204
|
enableConfigs,
|
|
@@ -210,7 +211,7 @@ import {
|
|
|
210
211
|
saveGlobalConfig,
|
|
211
212
|
setAllPointersToModel,
|
|
212
213
|
setModelPointer
|
|
213
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-V4VOZJWR.js";
|
|
214
215
|
import {
|
|
215
216
|
AbortError
|
|
216
217
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -219,7 +220,7 @@ import {
|
|
|
219
220
|
getCurrentRequest,
|
|
220
221
|
logUserFriendly,
|
|
221
222
|
markPhase
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-WKFRDCMK.js";
|
|
223
224
|
import {
|
|
224
225
|
ASCII_LOGO,
|
|
225
226
|
BunShell,
|
|
@@ -260,10 +261,10 @@ import {
|
|
|
260
261
|
setCwd,
|
|
261
262
|
shouldApplyToolOutputTruncation,
|
|
262
263
|
truncateToolOutput
|
|
263
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-HJ5SZ4TA.js";
|
|
264
265
|
import {
|
|
265
266
|
MACRO
|
|
266
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-WEUXBNQB.js";
|
|
267
268
|
import {
|
|
268
269
|
__export
|
|
269
270
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -444,7 +445,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
444
445
|
var getCommandPrefix = memoize(
|
|
445
446
|
async (command4, abortSignal) => {
|
|
446
447
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
447
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
448
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-5RBAGTX5.js");
|
|
448
449
|
const response = await queryQuick2({
|
|
449
450
|
systemPrompt,
|
|
450
451
|
userPrompt,
|
|
@@ -4246,7 +4247,7 @@ function formatParseError(error) {
|
|
|
4246
4247
|
return error instanceof Error ? error.message : String(error);
|
|
4247
4248
|
}
|
|
4248
4249
|
async function defaultGateQuery(args) {
|
|
4249
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4250
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-5RBAGTX5.js");
|
|
4250
4251
|
const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
|
|
4251
4252
|
const messages = [
|
|
4252
4253
|
{
|
|
@@ -6643,7 +6644,7 @@ var FileEditTool = {
|
|
|
6643
6644
|
const originalFileContent = currentFileContent;
|
|
6644
6645
|
let totalPatch = [];
|
|
6645
6646
|
const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
|
|
6646
|
-
const { findLspAnchor } = await import("./lspAnchor-
|
|
6647
|
+
const { findLspAnchor } = await import("./lspAnchor-JS73KKBP.js");
|
|
6647
6648
|
for (const op of editOperations) {
|
|
6648
6649
|
const normalizedSearch = normalizeLineEndings(op.search);
|
|
6649
6650
|
const normalizedReplace = normalizeLineEndings(op.replace);
|
|
@@ -11278,7 +11279,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
11278
11279
|
}
|
|
11279
11280
|
saveGlobalConfig(config2);
|
|
11280
11281
|
try {
|
|
11281
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
11282
|
+
const { resetAnthropicClient } = await import("./llm-5RBAGTX5.js");
|
|
11282
11283
|
resetAnthropicClient();
|
|
11283
11284
|
} catch {
|
|
11284
11285
|
}
|
|
@@ -15645,7 +15646,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
15645
15646
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
15646
15647
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
15647
15648
|
if (dirs.length === 0) return [];
|
|
15648
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
15649
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-7URRA2OK.js");
|
|
15649
15650
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
15650
15651
|
return errors;
|
|
15651
15652
|
}
|
|
@@ -16314,7 +16315,7 @@ async function call(onDone, context) {
|
|
|
16314
16315
|
ModelConfig,
|
|
16315
16316
|
{
|
|
16316
16317
|
onClose: () => {
|
|
16317
|
-
import("./model-
|
|
16318
|
+
import("./model-ZVCXE44R.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
16318
16319
|
reloadModelManager2();
|
|
16319
16320
|
triggerModelConfigChange();
|
|
16320
16321
|
onDone();
|
|
@@ -25194,7 +25195,7 @@ function useStatusLine() {
|
|
|
25194
25195
|
// src/ui/components/PromptInput.tsx
|
|
25195
25196
|
async function interpretHashCommand(input) {
|
|
25196
25197
|
try {
|
|
25197
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
25198
|
+
const { queryQuick: queryQuick2 } = await import("./llm-5RBAGTX5.js");
|
|
25198
25199
|
const systemPrompt = [
|
|
25199
25200
|
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
25200
25201
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
@@ -25553,7 +25554,7 @@ function PromptInput({
|
|
|
25553
25554
|
if (messages2.length) {
|
|
25554
25555
|
if (mode === "bash") {
|
|
25555
25556
|
onQuery(messages2, newAbortController).then(async () => {
|
|
25556
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
25557
|
+
const { getCwd: getCwd2 } = await import("./state-QBXHDWLK.js");
|
|
25557
25558
|
setCurrentPwd(getCwd2());
|
|
25558
25559
|
});
|
|
25559
25560
|
} else {
|
|
@@ -26463,6 +26464,24 @@ function startWatchingTaskList(listId) {
|
|
|
26463
26464
|
startFallbackWatcher(entry);
|
|
26464
26465
|
}
|
|
26465
26466
|
|
|
26467
|
+
// src/utils/session/finalizeTurn.ts
|
|
26468
|
+
function finalizeTurnAndFlushQueue() {
|
|
26469
|
+
setSessionState({ activeAbortController: null });
|
|
26470
|
+
setSessionState({ isProcessingTurn: false });
|
|
26471
|
+
setRequestStatus({ kind: "idle" });
|
|
26472
|
+
const state = getSessionState();
|
|
26473
|
+
if (state.isConsumingQueue) {
|
|
26474
|
+
setSessionState({ shouldFlushQueue: false });
|
|
26475
|
+
return { shouldFlushQueue: false };
|
|
26476
|
+
}
|
|
26477
|
+
if (state.queuedUserInputs.length === 0) {
|
|
26478
|
+
setSessionState({ shouldFlushQueue: false });
|
|
26479
|
+
return { shouldFlushQueue: false };
|
|
26480
|
+
}
|
|
26481
|
+
setSessionState({ shouldFlushQueue: true });
|
|
26482
|
+
return { shouldFlushQueue: true };
|
|
26483
|
+
}
|
|
26484
|
+
|
|
26466
26485
|
// src/utils/session/fileRecoveryCore.ts
|
|
26467
26486
|
var MAX_FILES_TO_RECOVER = 5;
|
|
26468
26487
|
var MAX_TOKENS_PER_FILE = 1e4;
|
|
@@ -27257,7 +27276,7 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
27257
27276
|
throw error;
|
|
27258
27277
|
}
|
|
27259
27278
|
} finally {
|
|
27260
|
-
|
|
27279
|
+
finalizeTurnAndFlushQueue();
|
|
27261
27280
|
}
|
|
27262
27281
|
}
|
|
27263
27282
|
async function* runToolUse(toolUse, siblingToolUseIDs, assistantMessage, canUseTool, toolUseContext, shouldSkipPermissionCheck) {
|
|
@@ -27682,16 +27701,11 @@ function applyQueuedEdit(args) {
|
|
|
27682
27701
|
return next;
|
|
27683
27702
|
}
|
|
27684
27703
|
function takeQueuedBatch(args) {
|
|
27685
|
-
const { entries,
|
|
27704
|
+
const { entries, windowMs } = args;
|
|
27686
27705
|
if (entries.length === 0) {
|
|
27687
27706
|
return { batch: null, remaining: entries };
|
|
27688
27707
|
}
|
|
27689
|
-
const
|
|
27690
|
-
const matching = entries.filter((entry) => entry.activeTurnId === targetId);
|
|
27691
|
-
if (matching.length === 0) {
|
|
27692
|
-
return { batch: null, remaining: entries };
|
|
27693
|
-
}
|
|
27694
|
-
const sorted = [...matching].sort((a, b) => a.queuedAt - b.queuedAt);
|
|
27708
|
+
const sorted = [...entries].sort((a, b) => a.queuedAt - b.queuedAt);
|
|
27695
27709
|
const first = sorted[0];
|
|
27696
27710
|
const batchEntries = [first];
|
|
27697
27711
|
let lastQueuedAt = first.queuedAt;
|
|
@@ -27711,7 +27725,6 @@ function takeQueuedBatch(args) {
|
|
|
27711
27725
|
return {
|
|
27712
27726
|
batch: {
|
|
27713
27727
|
entries: batchEntries,
|
|
27714
|
-
activeTurnId: first.activeTurnId,
|
|
27715
27728
|
mode: first.mode,
|
|
27716
27729
|
queuedAt: first.queuedAt
|
|
27717
27730
|
},
|
|
@@ -27719,29 +27732,54 @@ function takeQueuedBatch(args) {
|
|
|
27719
27732
|
};
|
|
27720
27733
|
}
|
|
27721
27734
|
function buildQueuedWrapper(args) {
|
|
27722
|
-
const turn = args.activeTurnId ?? "unknown";
|
|
27723
27735
|
const prefix = [
|
|
27724
27736
|
"<system-reminder>",
|
|
27725
27737
|
"\u7528\u6237\u521A\u8FFD\u52A0\u4E86\u4E00\u6761\u4EFB\u52A1\u6307\u4EE4\uFF0C\u53D1\u751F\u5728\u6A21\u578B\u8F93\u51FA\u671F\u95F4",
|
|
27726
27738
|
"</system-reminder>",
|
|
27727
27739
|
"<queued-user-message>",
|
|
27728
27740
|
`<queued-at>${args.queuedAt}</queued-at>`,
|
|
27729
|
-
"<queued-during>assistant_response</queued-during>"
|
|
27730
|
-
`<queued-after-turn>${turn}</queued-after-turn>`
|
|
27741
|
+
"<queued-during>assistant_response</queued-during>"
|
|
27731
27742
|
].join("\n");
|
|
27732
27743
|
const suffix = "</queued-user-message>";
|
|
27733
27744
|
return { prefix, suffix };
|
|
27734
27745
|
}
|
|
27735
27746
|
function wrapQueuedContent(args) {
|
|
27736
27747
|
const { prefix, suffix } = buildQueuedWrapper({
|
|
27737
|
-
queuedAt: args.queuedAt
|
|
27738
|
-
activeTurnId: args.activeTurnId
|
|
27748
|
+
queuedAt: args.queuedAt
|
|
27739
27749
|
});
|
|
27740
27750
|
return `${prefix}
|
|
27741
27751
|
${args.content}
|
|
27742
27752
|
${suffix}`;
|
|
27743
27753
|
}
|
|
27744
27754
|
|
|
27755
|
+
// src/utils/session/sessionQueue.ts
|
|
27756
|
+
import { randomUUID as randomUUID5 } from "crypto";
|
|
27757
|
+
var SessionQueue = class {
|
|
27758
|
+
constructor(state) {
|
|
27759
|
+
this.state = state;
|
|
27760
|
+
}
|
|
27761
|
+
enqueue(input) {
|
|
27762
|
+
const entry = {
|
|
27763
|
+
id: randomUUID5(),
|
|
27764
|
+
content: input.content,
|
|
27765
|
+
queuedAt: Date.now(),
|
|
27766
|
+
mode: input.mode
|
|
27767
|
+
};
|
|
27768
|
+
this.state.queuedUserInputs.push(entry);
|
|
27769
|
+
return entry;
|
|
27770
|
+
}
|
|
27771
|
+
flushOne() {
|
|
27772
|
+
if (this.state.isConsumingQueue) return null;
|
|
27773
|
+
if (this.state.queuedUserInputs.length === 0) return null;
|
|
27774
|
+
this.state.isConsumingQueue = true;
|
|
27775
|
+
try {
|
|
27776
|
+
return this.state.queuedUserInputs.shift() ?? null;
|
|
27777
|
+
} finally {
|
|
27778
|
+
this.state.isConsumingQueue = false;
|
|
27779
|
+
}
|
|
27780
|
+
}
|
|
27781
|
+
};
|
|
27782
|
+
|
|
27745
27783
|
// src/ui/components/binary-feedback/BinaryFeedback.tsx
|
|
27746
27784
|
import { default as React101, useCallback as useCallback15 } from "react";
|
|
27747
27785
|
|
|
@@ -28061,7 +28099,6 @@ async function getReasoningEffort(modelProfile, messages) {
|
|
|
28061
28099
|
}
|
|
28062
28100
|
|
|
28063
28101
|
// src/ui/screens/REPL.tsx
|
|
28064
|
-
import { randomUUID as randomUUID5 } from "crypto";
|
|
28065
28102
|
function REPL({
|
|
28066
28103
|
commands,
|
|
28067
28104
|
safeMode,
|
|
@@ -28099,8 +28136,12 @@ function REPL({
|
|
|
28099
28136
|
null
|
|
28100
28137
|
);
|
|
28101
28138
|
const [messages, setMessages2] = useState28(initialMessages ?? []);
|
|
28102
|
-
const [queuedMessages, setQueuedMessages] = useState28(
|
|
28103
|
-
|
|
28139
|
+
const [queuedMessages, setQueuedMessages] = useState28(
|
|
28140
|
+
() => getSessionState("queuedUserInputs")
|
|
28141
|
+
);
|
|
28142
|
+
const queuedMessagesRef = useRef13(
|
|
28143
|
+
getSessionState("queuedUserInputs")
|
|
28144
|
+
);
|
|
28104
28145
|
const [inputValue, setInputValue] = useState28("");
|
|
28105
28146
|
const [inputMode, setInputMode] = useState28(
|
|
28106
28147
|
"prompt"
|
|
@@ -28128,13 +28169,25 @@ function REPL({
|
|
|
28128
28169
|
);
|
|
28129
28170
|
const readFileTimestamps = useRef13({});
|
|
28130
28171
|
const queueMergeWindowMs = getGlobalConfig().queueMergeWindowMs ?? 500;
|
|
28172
|
+
const sessionQueue = useMemo26(
|
|
28173
|
+
() => new SessionQueue(getSessionState()),
|
|
28174
|
+
[]
|
|
28175
|
+
);
|
|
28131
28176
|
const updateQueuedMessages = useCallback16(
|
|
28132
28177
|
(next) => {
|
|
28178
|
+
setSessionState({ queuedUserInputs: next });
|
|
28133
28179
|
queuedMessagesRef.current = next;
|
|
28134
28180
|
setQueuedMessages(next);
|
|
28135
28181
|
},
|
|
28136
28182
|
[]
|
|
28137
28183
|
);
|
|
28184
|
+
const updateAbortController = useCallback16(
|
|
28185
|
+
(next) => {
|
|
28186
|
+
setAbortController(next);
|
|
28187
|
+
setSessionState({ activeAbortController: next });
|
|
28188
|
+
},
|
|
28189
|
+
[]
|
|
28190
|
+
);
|
|
28138
28191
|
const enqueueQueuedMessage = useCallback16(
|
|
28139
28192
|
(args) => {
|
|
28140
28193
|
if (args.replaceId) {
|
|
@@ -28148,16 +28201,10 @@ function REPL({
|
|
|
28148
28201
|
updateQueuedMessages(next);
|
|
28149
28202
|
return;
|
|
28150
28203
|
}
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
content: args.content,
|
|
28154
|
-
queuedAt: Date.now(),
|
|
28155
|
-
activeTurnId: getLastAssistantMessageId(messages),
|
|
28156
|
-
mode: args.mode
|
|
28157
|
-
};
|
|
28158
|
-
updateQueuedMessages([...queuedMessagesRef.current, entry]);
|
|
28204
|
+
sessionQueue.enqueue({ content: args.content, mode: args.mode });
|
|
28205
|
+
updateQueuedMessages([...getSessionState("queuedUserInputs")]);
|
|
28159
28206
|
},
|
|
28160
|
-
[
|
|
28207
|
+
[sessionQueue, updateQueuedMessages]
|
|
28161
28208
|
);
|
|
28162
28209
|
const dequeueQueuedMessageForEdit = useCallback16(
|
|
28163
28210
|
(currentEditId) => {
|
|
@@ -28178,10 +28225,9 @@ function REPL({
|
|
|
28178
28225
|
[]
|
|
28179
28226
|
);
|
|
28180
28227
|
const dequeueQueuedMessagesForNextTurn = useCallback16(
|
|
28181
|
-
async (
|
|
28228
|
+
async (_activeTurnId) => {
|
|
28182
28229
|
const { batch, remaining } = takeQueuedBatch({
|
|
28183
28230
|
entries: queuedMessagesRef.current,
|
|
28184
|
-
activeTurnId,
|
|
28185
28231
|
windowMs: queueMergeWindowMs
|
|
28186
28232
|
});
|
|
28187
28233
|
if (!batch) return null;
|
|
@@ -28189,8 +28235,7 @@ function REPL({
|
|
|
28189
28235
|
const combinedContent = batch.entries.length === 1 ? batch.entries[0].content : batch.entries.map((entry, index) => `${index + 1}) ${entry.content}`).join("\n");
|
|
28190
28236
|
const wrappedContent = batch.mode === "bash" ? combinedContent : wrapQueuedContent({
|
|
28191
28237
|
content: combinedContent,
|
|
28192
|
-
queuedAt: new Date(batch.queuedAt).toISOString()
|
|
28193
|
-
activeTurnId: batch.activeTurnId
|
|
28238
|
+
queuedAt: new Date(batch.queuedAt).toISOString()
|
|
28194
28239
|
});
|
|
28195
28240
|
const generatedMessages = await processUserInput(
|
|
28196
28241
|
wrappedContent,
|
|
@@ -28210,7 +28255,7 @@ function REPL({
|
|
|
28210
28255
|
isBypassPermissionsModeAvailable: !(safeMode ?? false)
|
|
28211
28256
|
})
|
|
28212
28257
|
},
|
|
28213
|
-
messageId:
|
|
28258
|
+
messageId: getLastAssistantMessageId(messages),
|
|
28214
28259
|
setForkConvoWithMessagesOnTheNextRender,
|
|
28215
28260
|
readFileTimestamps: readFileTimestamps.current,
|
|
28216
28261
|
abortController: abortController || new AbortController()
|
|
@@ -28235,6 +28280,17 @@ function REPL({
|
|
|
28235
28280
|
]
|
|
28236
28281
|
);
|
|
28237
28282
|
const { status: apiKeyStatus, reverify } = useApiKeyVerification();
|
|
28283
|
+
useEffect26(() => {
|
|
28284
|
+
const initialStatus = getRequestStatus();
|
|
28285
|
+
const initialBusy = initialStatus.kind !== "idle";
|
|
28286
|
+
setIsLoading(initialBusy);
|
|
28287
|
+
setSessionState({ isProcessingTurn: initialBusy });
|
|
28288
|
+
return subscribeRequestStatus((status) => {
|
|
28289
|
+
const busy = status.kind !== "idle";
|
|
28290
|
+
setIsLoading(busy);
|
|
28291
|
+
setSessionState({ isProcessingTurn: busy });
|
|
28292
|
+
});
|
|
28293
|
+
}, []);
|
|
28238
28294
|
function onCancel() {
|
|
28239
28295
|
if (!isLoading) {
|
|
28240
28296
|
return;
|
|
@@ -28290,7 +28346,7 @@ function REPL({
|
|
|
28290
28346
|
}
|
|
28291
28347
|
setIsLoading(true);
|
|
28292
28348
|
const newAbortController = new AbortController();
|
|
28293
|
-
|
|
28349
|
+
updateAbortController(newAbortController);
|
|
28294
28350
|
const model = new ModelManager(getGlobalConfig()).getModelName("main");
|
|
28295
28351
|
const newMessages = await processUserInput(
|
|
28296
28352
|
initialPrompt,
|
|
@@ -28366,6 +28422,14 @@ function REPL({
|
|
|
28366
28422
|
)) {
|
|
28367
28423
|
setMessages2((oldMessages) => [...oldMessages, message]);
|
|
28368
28424
|
}
|
|
28425
|
+
if (getSessionState("shouldFlushQueue")) {
|
|
28426
|
+
const queuedMessagesForNextTurn = await dequeueQueuedMessagesForNextTurn();
|
|
28427
|
+
setSessionState({ shouldFlushQueue: false });
|
|
28428
|
+
if (queuedMessagesForNextTurn && queuedMessagesForNextTurn.length > 0) {
|
|
28429
|
+
await onQuery(queuedMessagesForNextTurn);
|
|
28430
|
+
return;
|
|
28431
|
+
}
|
|
28432
|
+
}
|
|
28369
28433
|
} else {
|
|
28370
28434
|
addToHistory(initialPrompt);
|
|
28371
28435
|
}
|
|
@@ -28373,12 +28437,12 @@ function REPL({
|
|
|
28373
28437
|
getGlobalConfig().hasAcknowledgedCostThreshold || false
|
|
28374
28438
|
);
|
|
28375
28439
|
setIsLoading(false);
|
|
28376
|
-
|
|
28440
|
+
updateAbortController(null);
|
|
28377
28441
|
}
|
|
28378
28442
|
async function onQuery(newMessages, passedAbortController) {
|
|
28379
28443
|
const controllerToUse = passedAbortController || new AbortController();
|
|
28380
28444
|
if (!passedAbortController) {
|
|
28381
|
-
|
|
28445
|
+
updateAbortController(controllerToUse);
|
|
28382
28446
|
}
|
|
28383
28447
|
const isPybRequest = newMessages.length > 0 && newMessages[0].type === "user" && "options" in newMessages[0] && newMessages[0].options?.isPybRequest === true;
|
|
28384
28448
|
setMessages2((oldMessages) => [...oldMessages, ...newMessages]);
|
|
@@ -28387,7 +28451,7 @@ function REPL({
|
|
|
28387
28451
|
if (lastMessage.type === "user" && typeof lastMessage.message.content === "string") {
|
|
28388
28452
|
}
|
|
28389
28453
|
if (lastMessage.type === "assistant") {
|
|
28390
|
-
|
|
28454
|
+
updateAbortController(null);
|
|
28391
28455
|
setIsLoading(false);
|
|
28392
28456
|
return;
|
|
28393
28457
|
}
|
|
@@ -28445,6 +28509,14 @@ function REPL({
|
|
|
28445
28509
|
debug.error("REPL_PYB_SAVE_PROJECT_DOCS_ERROR", { error });
|
|
28446
28510
|
}
|
|
28447
28511
|
}
|
|
28512
|
+
if (getSessionState("shouldFlushQueue")) {
|
|
28513
|
+
const queuedMessagesForNextTurn = await dequeueQueuedMessagesForNextTurn();
|
|
28514
|
+
setSessionState({ shouldFlushQueue: false });
|
|
28515
|
+
if (queuedMessagesForNextTurn && queuedMessagesForNextTurn.length > 0) {
|
|
28516
|
+
await onQuery(queuedMessagesForNextTurn);
|
|
28517
|
+
return;
|
|
28518
|
+
}
|
|
28519
|
+
}
|
|
28448
28520
|
setIsLoading(false);
|
|
28449
28521
|
}
|
|
28450
28522
|
useCostSummary();
|
|
@@ -28714,7 +28786,7 @@ function REPL({
|
|
|
28714
28786
|
submitCount,
|
|
28715
28787
|
onSubmitCountChange: setSubmitCount,
|
|
28716
28788
|
setIsLoading,
|
|
28717
|
-
setAbortController,
|
|
28789
|
+
setAbortController: updateAbortController,
|
|
28718
28790
|
uiRefreshCounter,
|
|
28719
28791
|
onShowMessageSelector: () => setIsMessageSelectorVisible((prev) => !prev),
|
|
28720
28792
|
setForkConvoWithMessagesOnTheNextRender,
|
|
@@ -28970,7 +29042,7 @@ import { homedir as homedir8 } from "os";
|
|
|
28970
29042
|
// src/commands/agents/generation.ts
|
|
28971
29043
|
import { randomUUID as randomUUID7 } from "crypto";
|
|
28972
29044
|
async function generateAgentWithClaude(prompt) {
|
|
28973
|
-
const { queryModel } = await import("./llm-
|
|
29045
|
+
const { queryModel } = await import("./llm-5RBAGTX5.js");
|
|
28974
29046
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
28975
29047
|
|
|
28976
29048
|
Return your response as a JSON object with exactly these fields:
|