nolo-cli 0.12.0-alpha.1 → 0.12.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-MWAY74HA.js → _executeModel-4F7VZR5U.js} +24 -23
- package/{action-RAXNQQKC.js → action-OTOWUMPW.js} +3 -3
- package/{addContentAction-ZHI7TVV3.js → addContentAction-JGBUVR7K.js} +2 -2
- package/{addDialogAgentAction-JWXPKXNC.js → addDialogAgentAction-V6CL2UCF.js} +1 -1
- package/{agentDeleteCommand-LXR5A5FV.js → agentDeleteCommand-MMRSG6AB.js} +15 -14
- package/{agentEmailCommands-DXRAP7BB.js → agentEmailCommands-YFVKOGM7.js} +28 -27
- package/{agentListCommands-ZFMS5ZLY.js → agentListCommands-2PZHIQ3I.js} +16 -15
- package/{agentMachineCommands-ZJLYVV52.js → agentMachineCommands-55UUZNHF.js} +17 -16
- package/{agentRecordCommands-DFS626TB.js → agentRecordCommands-BTP3OAPL.js} +28 -27
- package/{agentRunCommand-GWBIE2TS.js → agentRunCommand-AA4QLRQZ.js} +29 -28
- package/{agentRuntimeLocal-YNZSHMZC.js → agentRuntimeLocal-QDJCBXM2.js} +12 -11
- package/{agentSlice-T2PXOEPQ.js → agentSlice-6JAJOU3X.js} +2 -2
- package/{chunk-G3B356GF.js → chunk-2BVGERJ2.js} +67 -3
- package/{chunk-WWU275LU.js → chunk-3MI5LDDU.js} +2 -2
- package/{chunk-OPZYGHUC.js → chunk-3WGLLTK4.js} +59 -1
- package/{chunk-EBH7G34M.js → chunk-3XF6LCCN.js} +2 -2
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-ZR4VHQ5D.js → chunk-5S4SWV5G.js} +38 -26
- package/{chunk-JUN3HFMN.js → chunk-5V524MHX.js} +25 -15
- package/{chunk-JZDIW766.js → chunk-ARSC56DC.js} +1 -1
- package/{chunk-3QKO4EHV.js → chunk-AS3ZQ3O2.js} +16 -25
- package/{chunk-43UD5ZP7.js → chunk-B4KT7RN2.js} +4 -4
- package/{chunk-YTQLJYLB.js → chunk-C3BFP57W.js} +95 -2
- package/{chunk-QCA3EPYK.js → chunk-CGDQDXKZ.js} +1 -1
- package/{chunk-7MYHLZ3F.js → chunk-DPFWKRHG.js} +1 -1
- package/{chunk-LHSJMY5V.js → chunk-EIMX5ER5.js} +3 -3
- package/{chunk-AM53Q2SD.js → chunk-FSUZIGIG.js} +28 -39
- package/{chunk-4GBNEA5B.js → chunk-H5Y2H2N6.js} +1 -1
- package/{chunk-S73OEOHH.js → chunk-JFANOO7I.js} +3 -15
- package/{chunk-OCDEWRE2.js → chunk-JKWWVF2I.js} +1 -1
- package/{chunk-WTYKCU4W.js → chunk-JU7J7EAV.js} +37 -37
- package/{chunk-5ITRDSHY.js → chunk-KWBH4RAL.js} +57 -18
- package/{chunk-6OVCRC72.js → chunk-LUKQQJFL.js} +39 -2
- package/{chunk-DRMGJFGQ.js → chunk-MG6BVV3T.js} +31 -17
- package/{chunk-RSEUHW6T.js → chunk-MQRZ5QUH.js} +1 -1
- package/{chunk-RZ735TLX.js → chunk-MZHSAPZP.js} +167 -20
- package/{chunk-OPKKB25T.js → chunk-O4FOPRCP.js} +1 -1
- package/{chunk-S3UTETIC.js → chunk-OGGHETUE.js} +19 -4
- package/{chunk-4EH7AR52.js → chunk-OPM2DE2J.js} +1 -1
- package/{chunk-UG3WOFU6.js → chunk-QJSTNKJY.js} +1 -1
- package/{chunk-DE5BA4O6.js → chunk-QUHUVG6Y.js} +2 -2
- package/{chunk-YDCZVUFP.js → chunk-RQSOAMPJ.js} +16 -0
- package/{chunk-ZPFRLGIZ.js → chunk-RUGEW4P7.js} +70 -37
- package/{chunk-6LMFFG3K.js → chunk-RWO5DGXI.js} +2 -2
- package/{chunk-4BTHUYMY.js → chunk-TA7VKOHU.js} +23 -9
- package/{chunk-MEVCDATU.js → chunk-TQYYGE6G.js} +3 -3
- package/{chunk-TSKWE74T.js → chunk-TYPHUVK5.js} +13 -1
- package/{chunk-RNQ5BLR2.js → chunk-VBSWHE5W.js} +1 -1
- package/{chunk-NITP2JDG.js → chunk-VKG4HXYV.js} +1 -1
- package/{chunk-3HHTVM6G.js → chunk-WVTBAALN.js} +1 -1
- package/{chunk-GPZM7QH6.js → chunk-Y5P3ZRGC.js} +4 -4
- package/{chunk-GDBCUWQ3.js → chunk-YUMYYXPI.js} +31 -167
- package/{createAgentAutomationAction-G32GKDGV.js → createAgentAutomationAction-4NY4JLOK.js} +9 -8
- package/{createDialogAction-TISANRZK.js → createDialogAction-I5WUWFJ6.js} +10 -9
- package/{createPageAction-O7KOYNV4.js → createPageAction-HFTIQ7TW.js} +9 -8
- package/{dbSlice-WDP2ZZHK.js → dbSlice-J4PUZ6Y5.js} +1 -1
- package/{dialogCommands-6JPB3YQY.js → dialogCommands-SVXRJFZS.js} +16 -15
- package/{dialogSlice-PRHHYSP5.js → dialogSlice-35LA3ZRG.js} +9 -8
- package/{docCreateCommands-75E6TZNN.js → docCreateCommands-Z7RIAYKQ.js} +15 -14
- package/{docDeleteCommands-EJHLN7LW.js → docDeleteCommands-NEYHUVZF.js} +16 -15
- package/{docReadCommands-RJYBC4FS.js → docReadCommands-I4US2SDE.js} +15 -14
- package/{docStore-H5VWKT5D.js → docStore-3CP2IO6M.js} +10 -9
- package/{docUpdateCommands-MG4CNISV.js → docUpdateCommands-UU5HQBRP.js} +15 -14
- package/{getPricing-6TOZXPAU.js → getPricing-UGDJHI7M.js} +2 -2
- package/{handleSendMessageAction-QTUGICSZ.js → handleSendMessageAction-FWTLQGOZ.js} +9 -8
- package/index.js +36 -36
- package/{machineCommands-MAV7M3TK.js → machineCommands-STHZKBDJ.js} +28 -27
- package/{machineWsRunDispatch-ZOEGTKHC.js → machineWsRunDispatch-7YHT4TPT.js} +27 -26
- package/package.json +1 -1
- package/{readlineWorkspace-SWQKC7ZS.js → readlineWorkspace-OMRWYMB6.js} +203 -75
- package/{removeDialogAgentAction-GTX5AN54.js → removeDialogAgentAction-XUZYQBV4.js} +3 -3
- package/{runAgentClientLoop-P25HACXX.js → runAgentClientLoop-FP2K33ZO.js} +20 -19
- package/{setDialogExtraReferencesAction-WFQ63KYO.js → setDialogExtraReferencesAction-PTAIFKGM.js} +1 -1
- package/{setPrimaryDialogAgentAction-P57FXTSU.js → setPrimaryDialogAgentAction-HRFTDB44.js} +3 -3
- package/{settingSlice-CK5YZGNI.js → settingSlice-VGRJUSE5.js} +2 -2
- package/{skillDiscovery-ZYHSX7VD.js → skillDiscovery-6M2BZUFN.js} +1 -1
- package/{spaceCommands-6O5EFEM5.js → spaceCommands-GN73BCOB.js} +15 -14
- package/{spaceSlice-4EXTYXS4.js → spaceSlice-WTFNKOVA.js} +11 -8
- package/{streamAgentChatTurn-Q3FJAHG2.js → streamAgentChatTurn-HBAQQVNK.js} +244 -26
- package/{tools-AHNQE4GP.js → tools-TPQYTLQZ.js} +15 -14
- package/{tuiSummaryLlmCaller-TXLF4MEI.js → tuiSummaryLlmCaller-XDC7WG4K.js} +6 -4
- package/{updateDialogTitleAction-XZDVLKVX.js → updateDialogTitleAction-AWXNPUQJ.js} +9 -8
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
normalizeDialogRecord,
|
|
4
4
|
readDialogSnapshot,
|
|
5
5
|
sortDialogs
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OPM2DE2J.js";
|
|
7
7
|
import {
|
|
8
8
|
ANSI_ESCAPE_REGEX,
|
|
9
9
|
CLI_AUTO_TIER_AGENT_KEYS,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
visibleWidth,
|
|
58
58
|
wrapTextToLines,
|
|
59
59
|
wrapTranscriptLine
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-RUGEW4P7.js";
|
|
61
61
|
import "./chunk-3QAF2LTL.js";
|
|
62
62
|
import "./chunk-6HYVJV7B.js";
|
|
63
63
|
import {
|
|
@@ -65,18 +65,18 @@ import {
|
|
|
65
65
|
listLocalCachedAgents,
|
|
66
66
|
listRemoteAgents,
|
|
67
67
|
listRemoteAgentsAcrossServers
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-QUHUVG6Y.js";
|
|
69
69
|
import "./chunk-ID4G2MAR.js";
|
|
70
70
|
import {
|
|
71
71
|
listUserRecordsFromServers
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-O4FOPRCP.js";
|
|
73
73
|
import {
|
|
74
74
|
createCliLocalRuntimeAdapter,
|
|
75
75
|
initCliLocale,
|
|
76
76
|
parseCliLocale,
|
|
77
77
|
setCliLocale,
|
|
78
78
|
t
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-KWBH4RAL.js";
|
|
80
80
|
import "./chunk-TOILAPLH.js";
|
|
81
81
|
import "./chunk-CMKUBIGW.js";
|
|
82
82
|
import "./chunk-JBTJAPUF.js";
|
|
@@ -86,23 +86,23 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
queryUserRecords,
|
|
88
88
|
readDbRecord
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import "./chunk-
|
|
89
|
+
} from "./chunk-CGDQDXKZ.js";
|
|
90
|
+
import "./chunk-VBSWHE5W.js";
|
|
91
91
|
import {
|
|
92
92
|
resolveCliAgentKeyInput
|
|
93
93
|
} from "./chunk-VHBWHNVT.js";
|
|
94
94
|
import "./chunk-LTRXGFMS.js";
|
|
95
|
-
import "./chunk-
|
|
95
|
+
import "./chunk-QJSTNKJY.js";
|
|
96
96
|
import "./chunk-ATNTHIZI.js";
|
|
97
97
|
import "./chunk-JEXVIMYZ.js";
|
|
98
98
|
import {
|
|
99
99
|
prepareTools
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import "./chunk-
|
|
100
|
+
} from "./chunk-C3BFP57W.js";
|
|
101
|
+
import "./chunk-H5Y2H2N6.js";
|
|
102
102
|
import {
|
|
103
103
|
expandEnabledPacks
|
|
104
|
-
} from "./chunk-
|
|
105
|
-
import "./chunk-
|
|
104
|
+
} from "./chunk-MZHSAPZP.js";
|
|
105
|
+
import "./chunk-RQSOAMPJ.js";
|
|
106
106
|
import "./chunk-OOIN7HSO.js";
|
|
107
107
|
import "./chunk-KQHGZWSV.js";
|
|
108
108
|
import "./chunk-IVAOVLM7.js";
|
|
@@ -110,58 +110,60 @@ import "./chunk-3LY4F7SV.js";
|
|
|
110
110
|
import "./chunk-VP4WJWKW.js";
|
|
111
111
|
import "./chunk-63W5N6P3.js";
|
|
112
112
|
import "./chunk-VF4K2QE6.js";
|
|
113
|
-
import "./chunk-
|
|
114
|
-
import "./chunk-
|
|
113
|
+
import "./chunk-TQYYGE6G.js";
|
|
114
|
+
import "./chunk-2BVGERJ2.js";
|
|
115
115
|
import "./chunk-VC6OZXO5.js";
|
|
116
116
|
import "./chunk-OWOHNGCN.js";
|
|
117
117
|
import {
|
|
118
118
|
extractReferenceKeysFromMessage
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-FSUZIGIG.js";
|
|
120
120
|
import {
|
|
121
121
|
buildBuiltinSummaryContent
|
|
122
122
|
} from "./chunk-V2J635L5.js";
|
|
123
123
|
import "./chunk-MRC4Q34M.js";
|
|
124
124
|
import "./chunk-MTU75CZ2.js";
|
|
125
125
|
import "./chunk-CWMSB67P.js";
|
|
126
|
-
import "./chunk-
|
|
127
|
-
import "./chunk-
|
|
126
|
+
import "./chunk-Y5P3ZRGC.js";
|
|
127
|
+
import "./chunk-RWO5DGXI.js";
|
|
128
128
|
import "./chunk-Z4NR32XR.js";
|
|
129
129
|
import "./chunk-M76ECQRD.js";
|
|
130
130
|
import {
|
|
131
131
|
buildSkillDiscoveryContextBlock
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-AS3ZQ3O2.js";
|
|
133
133
|
import "./chunk-WZSRQNQG.js";
|
|
134
134
|
import {
|
|
135
135
|
buildLocalWorkspaceOpenAiTools,
|
|
136
136
|
buildLocalWorkspaceToolset,
|
|
137
137
|
getProcessRegistry
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-MG6BVV3T.js";
|
|
139
139
|
import "./chunk-ZNFJWEN4.js";
|
|
140
|
-
import "./chunk-
|
|
140
|
+
import "./chunk-5S4SWV5G.js";
|
|
141
141
|
import "./chunk-NCGFB7NN.js";
|
|
142
142
|
import {
|
|
143
143
|
readCommandActionGatePayload,
|
|
144
144
|
resolveAgentImageInputSupport
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-
|
|
145
|
+
} from "./chunk-TA7VKOHU.js";
|
|
146
|
+
import "./chunk-3WGLLTK4.js";
|
|
147
147
|
import {
|
|
148
148
|
buildCurrentTimeBlock,
|
|
149
149
|
buildIdentityBlock,
|
|
150
150
|
buildRuntimeGuidanceBlocks
|
|
151
|
-
} from "./chunk-
|
|
152
|
-
import "./chunk-
|
|
151
|
+
} from "./chunk-LUKQQJFL.js";
|
|
152
|
+
import "./chunk-TYPHUVK5.js";
|
|
153
153
|
import {
|
|
154
154
|
canonicalizeToolNames
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-B4KT7RN2.js";
|
|
156
156
|
import {
|
|
157
157
|
DEFAULT_CONTEXT_WINDOW,
|
|
158
|
-
clipCompactText,
|
|
159
158
|
estimateTokenCount,
|
|
160
159
|
getModelContextWindow,
|
|
161
160
|
planCompression,
|
|
162
161
|
serializeMessageContent
|
|
163
|
-
} from "./chunk-
|
|
164
|
-
import
|
|
162
|
+
} from "./chunk-JFANOO7I.js";
|
|
163
|
+
import {
|
|
164
|
+
clipCompactText
|
|
165
|
+
} from "./chunk-5MMAK75Q.js";
|
|
166
|
+
import "./chunk-OGGHETUE.js";
|
|
165
167
|
import "./chunk-PDL2AV3E.js";
|
|
166
168
|
import "./chunk-JZPBVBIY.js";
|
|
167
169
|
import "./chunk-BYXBJQAS.js";
|
|
@@ -197,12 +199,12 @@ import {
|
|
|
197
199
|
} from "./chunk-IDZTNRP2.js";
|
|
198
200
|
import "./chunk-IKXL2HZ3.js";
|
|
199
201
|
import "./chunk-524BDL33.js";
|
|
200
|
-
import "./chunk-
|
|
201
|
-
import "./chunk-
|
|
202
|
+
import "./chunk-DPFWKRHG.js";
|
|
203
|
+
import "./chunk-JU7J7EAV.js";
|
|
202
204
|
import "./chunk-Y5GCAMGP.js";
|
|
203
205
|
import "./chunk-KX6YBIHG.js";
|
|
204
|
-
import "./chunk-
|
|
205
|
-
import "./chunk-
|
|
206
|
+
import "./chunk-WVTBAALN.js";
|
|
207
|
+
import "./chunk-VKG4HXYV.js";
|
|
206
208
|
import "./chunk-WPHL6ALY.js";
|
|
207
209
|
import "./chunk-O4BU24WZ.js";
|
|
208
210
|
import "./chunk-I42VC5KR.js";
|
|
@@ -1070,6 +1072,27 @@ function createInitialAskChoiceState(questions) {
|
|
|
1070
1072
|
};
|
|
1071
1073
|
}
|
|
1072
1074
|
function askChoiceReducer(state, action) {
|
|
1075
|
+
if (action.type === "HYDRATE_QUESTIONS") {
|
|
1076
|
+
if (state.phase !== "active") return state;
|
|
1077
|
+
const newQuestions = action.questions;
|
|
1078
|
+
if (newQuestions.length <= state.questionStates.length) {
|
|
1079
|
+
if (newQuestions.length === state.questions.length) return state;
|
|
1080
|
+
return { ...state, questions: newQuestions };
|
|
1081
|
+
}
|
|
1082
|
+
const appended = newQuestions.slice(state.questionStates.length).map(() => ({
|
|
1083
|
+
cursorIndex: 0,
|
|
1084
|
+
selectedIds: [],
|
|
1085
|
+
pickedId: null,
|
|
1086
|
+
otherText: "",
|
|
1087
|
+
otherFocused: false
|
|
1088
|
+
}));
|
|
1089
|
+
return {
|
|
1090
|
+
...state,
|
|
1091
|
+
questions: newQuestions,
|
|
1092
|
+
questionStates: [...state.questionStates, ...appended],
|
|
1093
|
+
activeIndex: Math.min(state.activeIndex, newQuestions.length - 1)
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1073
1096
|
if (state.phase !== "active") return state;
|
|
1074
1097
|
switch (action.type) {
|
|
1075
1098
|
case "CANCEL":
|
|
@@ -1343,6 +1366,7 @@ async function runAskChoiceDialog(args) {
|
|
|
1343
1366
|
typeof args.bottomRow === "function" ? args.bottomRow() : args.bottomRow ?? 0
|
|
1344
1367
|
);
|
|
1345
1368
|
let lastBottomRow = 0;
|
|
1369
|
+
let scrolledHeadroom = false;
|
|
1346
1370
|
let unanchoredCursorLift = 0;
|
|
1347
1371
|
const restoreUnanchoredCursor = () => {
|
|
1348
1372
|
if (unanchoredCursorLift <= 0) return;
|
|
@@ -1356,6 +1380,14 @@ async function runAskChoiceDialog(args) {
|
|
|
1356
1380
|
const canPosition = outputIsTty(output) && typeof output.write === "function";
|
|
1357
1381
|
if (bottomAnchored && canPosition) {
|
|
1358
1382
|
const anchorRow = resolveBottomRow();
|
|
1383
|
+
if (!scrolledHeadroom) {
|
|
1384
|
+
const ttyRows = typeof output === "object" && output !== null && "rows" in output && typeof output.rows === "number" ? output.rows : 24;
|
|
1385
|
+
const scrollN = Math.min(lineCount, Math.max(0, ttyRows - 1));
|
|
1386
|
+
if (scrollN > 0) {
|
|
1387
|
+
output.write(`\x1B[${scrollN}S`);
|
|
1388
|
+
}
|
|
1389
|
+
scrolledHeadroom = true;
|
|
1390
|
+
}
|
|
1359
1391
|
clearAnchoredLines(
|
|
1360
1392
|
output,
|
|
1361
1393
|
lastBottomRow > 0 ? lastBottomRow : anchorRow,
|
|
@@ -1651,6 +1683,36 @@ function createActivityIndicator(deps) {
|
|
|
1651
1683
|
}
|
|
1652
1684
|
return null;
|
|
1653
1685
|
};
|
|
1686
|
+
let agentRunSnapshot = null;
|
|
1687
|
+
const updateAgentRun = (snapshot) => {
|
|
1688
|
+
agentRunSnapshot = snapshot;
|
|
1689
|
+
deps.onRepaint();
|
|
1690
|
+
};
|
|
1691
|
+
const clearAgentRun = () => {
|
|
1692
|
+
agentRunSnapshot = null;
|
|
1693
|
+
deps.onRepaint();
|
|
1694
|
+
};
|
|
1695
|
+
const getAgentRun = () => agentRunSnapshot;
|
|
1696
|
+
const getActivityLines = (colorEnabled = resolveCliColorEnabled()) => {
|
|
1697
|
+
const lines = [];
|
|
1698
|
+
const baseView = getView();
|
|
1699
|
+
if (baseView) {
|
|
1700
|
+
const elapsed = Math.max(0, baseView.elapsedSec);
|
|
1701
|
+
const elapsedStr = `${elapsed}s`;
|
|
1702
|
+
const stopHint = t("stopHint");
|
|
1703
|
+
if (!colorEnabled) {
|
|
1704
|
+
lines.push(`${baseView.frame} ${baseView.label} (${elapsedStr}) \xB7 ${stopHint}`);
|
|
1705
|
+
} else {
|
|
1706
|
+
lines.push(
|
|
1707
|
+
themeText(baseView.frame, "accent") + " " + themeText(baseView.label, "muted") + themeText(` (${elapsedStr})`, "chrome") + themeText(` \xB7 ${stopHint}`, "chrome")
|
|
1708
|
+
);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
if (agentRunSnapshot) {
|
|
1712
|
+
lines.push(...formatAgentRunPanelLines(agentRunSnapshot, colorEnabled));
|
|
1713
|
+
}
|
|
1714
|
+
return lines.length > 0 ? lines : null;
|
|
1715
|
+
};
|
|
1654
1716
|
const stop = () => {
|
|
1655
1717
|
if (timer !== null) {
|
|
1656
1718
|
clearIntervalFn(timer);
|
|
@@ -1662,8 +1724,69 @@ function createActivityIndicator(deps) {
|
|
|
1662
1724
|
fallbackStartedAt = 0;
|
|
1663
1725
|
lastActivityAt = 0;
|
|
1664
1726
|
stopping = false;
|
|
1727
|
+
agentRunSnapshot = null;
|
|
1728
|
+
};
|
|
1729
|
+
return {
|
|
1730
|
+
report,
|
|
1731
|
+
updateAgentRun,
|
|
1732
|
+
clearAgentRun,
|
|
1733
|
+
getAgentRun,
|
|
1734
|
+
getView,
|
|
1735
|
+
getActivityLines,
|
|
1736
|
+
markStopping,
|
|
1737
|
+
isStopping,
|
|
1738
|
+
stop
|
|
1665
1739
|
};
|
|
1666
|
-
|
|
1740
|
+
}
|
|
1741
|
+
function formatAgentRunPanelLines(snapshot, colorEnabled) {
|
|
1742
|
+
const lines = [];
|
|
1743
|
+
const name = snapshot.agentName || "sub-agent";
|
|
1744
|
+
const runId = snapshot.runId ? ` (${snapshot.runId.slice(0, 8)})` : "";
|
|
1745
|
+
const status = snapshot.status || "running";
|
|
1746
|
+
let statusSymbol = "\u231B";
|
|
1747
|
+
let statusColor = "warning";
|
|
1748
|
+
if (status === "completed" || status === "finished" || status === "success") {
|
|
1749
|
+
statusSymbol = "\u2713";
|
|
1750
|
+
statusColor = "success";
|
|
1751
|
+
} else if (status === "killed" || status === "cancelled" || status === "failed" || status === "stopped") {
|
|
1752
|
+
statusSymbol = "\u{1F534}";
|
|
1753
|
+
statusColor = "danger";
|
|
1754
|
+
}
|
|
1755
|
+
const pollPart = snapshot.polls !== void 0 ? ` (polls: ${snapshot.polls})` : "";
|
|
1756
|
+
const errPart = snapshot.errorMessage ? ` \xB7 ${snapshot.errorMessage}` : "";
|
|
1757
|
+
if (!colorEnabled) {
|
|
1758
|
+
lines.push(`\u{1F916} Sub-Agent: ${name}${runId} \xB7 ${statusSymbol} ${status}${pollPart}${errPart}`);
|
|
1759
|
+
} else {
|
|
1760
|
+
const botIcon = themeText("\u{1F916}", "accent", true);
|
|
1761
|
+
const labelText = themeText(" Sub-Agent: ", "muted", true);
|
|
1762
|
+
const nameText = themeText(`${name}${runId}`, "chrome", true);
|
|
1763
|
+
const statusText = themeText(` \xB7 ${statusSymbol} ${status}`, statusColor, true);
|
|
1764
|
+
const pollsText = pollPart ? themeText(pollPart, "chrome") : "";
|
|
1765
|
+
const errorText = errPart ? themeText(errPart, "danger") : "";
|
|
1766
|
+
lines.push(`${botIcon}${labelText}${nameText}${statusText}${pollsText}${errorText}`);
|
|
1767
|
+
}
|
|
1768
|
+
let logLine;
|
|
1769
|
+
if (snapshot.logTail) {
|
|
1770
|
+
const trimmed = snapshot.logTail.trim();
|
|
1771
|
+
if (trimmed) {
|
|
1772
|
+
const parts = trimmed.split(/\r?\n/);
|
|
1773
|
+
logLine = parts[parts.length - 1];
|
|
1774
|
+
}
|
|
1775
|
+
} else if (snapshot.logLines && snapshot.logLines.length > 0) {
|
|
1776
|
+
logLine = snapshot.logLines[snapshot.logLines.length - 1];
|
|
1777
|
+
}
|
|
1778
|
+
if (logLine && logLine.trim()) {
|
|
1779
|
+
const cleanLog = logLine.trim();
|
|
1780
|
+
if (!colorEnabled) {
|
|
1781
|
+
lines.push(` \u2514 Log: ${cleanLog}`);
|
|
1782
|
+
} else {
|
|
1783
|
+
const branchChar = themeText(" \u2514 ", "muted");
|
|
1784
|
+
const logTag = themeText("Log: ", "muted");
|
|
1785
|
+
const logContent = themeText(cleanLog, "chrome");
|
|
1786
|
+
lines.push(`${branchChar}${logTag}${logContent}`);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
return lines;
|
|
1667
1790
|
}
|
|
1668
1791
|
|
|
1669
1792
|
// packages/ai/agent/utils/sortUtils.ts
|
|
@@ -4100,9 +4223,10 @@ function createFixedInput(output, config) {
|
|
|
4100
4223
|
if (completions.length > 0) {
|
|
4101
4224
|
sections.push(fitAnsiLine(dimCliText(completions.join(" "), colorEnabled), cols));
|
|
4102
4225
|
}
|
|
4103
|
-
const
|
|
4104
|
-
|
|
4105
|
-
|
|
4226
|
+
const rawActivity = config.getActivityLines ? config.getActivityLines() : config.getActivityLine ? config.getActivityLine() : null;
|
|
4227
|
+
const activityLines = Array.isArray(rawActivity) ? rawActivity.filter((line) => line !== null && line !== void 0) : typeof rawActivity === "string" && rawActivity.length > 0 ? [rawActivity] : [];
|
|
4228
|
+
for (const actLine of activityLines) {
|
|
4229
|
+
sections.push(fitAnsiLine(actLine.replace(/\r?\n/g, " "), cols));
|
|
4106
4230
|
}
|
|
4107
4231
|
const rule = colorEnabled ? `\x1B[2m${themeColorSequence("chrome")}${"\u2500".repeat(cols)}\x1B[0m` : "\u2500".repeat(cols);
|
|
4108
4232
|
sections.push(rule);
|
|
@@ -4160,7 +4284,7 @@ function createFixedInput(output, config) {
|
|
|
4160
4284
|
}
|
|
4161
4285
|
const text = sections.join("\n");
|
|
4162
4286
|
const lines = sections.length;
|
|
4163
|
-
const headerRows = (completions.length > 0 ? 1 : 0) + 2 +
|
|
4287
|
+
const headerRows = (completions.length > 0 ? 1 : 0) + 2 + activityLines.length + queueLines.length;
|
|
4164
4288
|
return { text, lines, cursorCol, cursorRow: headerRows + cursorRow };
|
|
4165
4289
|
};
|
|
4166
4290
|
const repaintAt = (buffer, cursorPos) => {
|
|
@@ -4958,7 +5082,7 @@ async function startTuiWorkspace(options) {
|
|
|
4958
5082
|
if (fixedInput.active && !fixedInput.isPaused()) {
|
|
4959
5083
|
output.write("\x1B[?2026h\x1B[?25l");
|
|
4960
5084
|
try {
|
|
4961
|
-
fixedInput.repaint(buffer);
|
|
5085
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
4962
5086
|
} finally {
|
|
4963
5087
|
output.write("\x1B[?25h\x1B[?2026l");
|
|
4964
5088
|
}
|
|
@@ -4976,7 +5100,7 @@ async function startTuiWorkspace(options) {
|
|
|
4976
5100
|
fixedInput.resumeFromDialog();
|
|
4977
5101
|
flushPendingRender();
|
|
4978
5102
|
renderHistoryToOutput();
|
|
4979
|
-
fixedInput.repaint(buffer);
|
|
5103
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
4980
5104
|
},
|
|
4981
5105
|
getInputLines: () => fixedInput.getInputLines(),
|
|
4982
5106
|
isPaused: () => fixedInput.isPaused()
|
|
@@ -5001,7 +5125,7 @@ async function startTuiWorkspace(options) {
|
|
|
5001
5125
|
output.write("\x1B[?2026h\x1B[?25l");
|
|
5002
5126
|
try {
|
|
5003
5127
|
renderHistory(output, history, fixedInput.getInputLines());
|
|
5004
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5128
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5005
5129
|
} finally {
|
|
5006
5130
|
output.write("\x1B[?25h\x1B[?2026l");
|
|
5007
5131
|
}
|
|
@@ -5065,7 +5189,7 @@ ${t("copyViewHint")}
|
|
|
5065
5189
|
fixedInput.resumeFromDialog();
|
|
5066
5190
|
flushPendingRender();
|
|
5067
5191
|
renderHistoryToOutput();
|
|
5068
|
-
fixedInput.repaint(buffer);
|
|
5192
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
5069
5193
|
}
|
|
5070
5194
|
return true;
|
|
5071
5195
|
};
|
|
@@ -5080,7 +5204,7 @@ ${t("copyViewHint")}
|
|
|
5080
5204
|
appendToCurrentTurn(history, message);
|
|
5081
5205
|
finalizeCurrentTurn(history);
|
|
5082
5206
|
renderHistoryToOutput();
|
|
5083
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5207
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5084
5208
|
startTurn(history, "assistant");
|
|
5085
5209
|
const agentOutput = isInteractiveInput(input) ? createHistoryOutputStream(history, () => {
|
|
5086
5210
|
scheduleRender();
|
|
@@ -5120,7 +5244,14 @@ ${t("copyViewHint")}
|
|
|
5120
5244
|
abortSignal: activeTurnAbort.signal,
|
|
5121
5245
|
pastedTextStore: pasteStore,
|
|
5122
5246
|
explicitAgentSwitch,
|
|
5123
|
-
activityReporter
|
|
5247
|
+
activityReporter,
|
|
5248
|
+
onAgentRunStatus: (snapshot) => {
|
|
5249
|
+
if (snapshot) {
|
|
5250
|
+
activityIndicator.updateAgentRun(snapshot);
|
|
5251
|
+
} else {
|
|
5252
|
+
activityIndicator.clearAgentRun();
|
|
5253
|
+
}
|
|
5254
|
+
}
|
|
5124
5255
|
}
|
|
5125
5256
|
);
|
|
5126
5257
|
const wasForceStopped = forcedStopEpoch === myEpoch;
|
|
@@ -5146,7 +5277,7 @@ ${t("copyViewHint")}
|
|
|
5146
5277
|
finalizeCurrentTurn(history);
|
|
5147
5278
|
flushPendingRender();
|
|
5148
5279
|
renderHistoryToOutput();
|
|
5149
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5280
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5150
5281
|
}
|
|
5151
5282
|
if (wasAborted) {
|
|
5152
5283
|
if (runResult.pendingToolName) {
|
|
@@ -5206,7 +5337,7 @@ ${t("copyViewHint")}
|
|
|
5206
5337
|
appendToCurrentTurn(history, text);
|
|
5207
5338
|
finalizeCurrentTurn(history);
|
|
5208
5339
|
renderHistoryToOutput();
|
|
5209
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5340
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5210
5341
|
};
|
|
5211
5342
|
const runSubmittedLine = async (line, actionGateHandler, confirmDestructiveAction) => {
|
|
5212
5343
|
if (!line.trim()) return false;
|
|
@@ -5220,7 +5351,7 @@ ${t("copyViewHint")}
|
|
|
5220
5351
|
appendToCurrentTurn(history, line.trim());
|
|
5221
5352
|
finalizeCurrentTurn(history);
|
|
5222
5353
|
renderHistoryToOutput();
|
|
5223
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5354
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5224
5355
|
}
|
|
5225
5356
|
if (result.output) {
|
|
5226
5357
|
emitCommandOutput(result.output);
|
|
@@ -5263,6 +5394,14 @@ ${t("copyViewHint")}
|
|
|
5263
5394
|
dialogKey: compactResult.dialogKey,
|
|
5264
5395
|
dialogLabel: compactResult.dialogId
|
|
5265
5396
|
};
|
|
5397
|
+
output.write(
|
|
5398
|
+
`${t(
|
|
5399
|
+
compactResult.summaryGenerated ? "compactDone" : "compactDoneNoSummary",
|
|
5400
|
+
result.action.dialogId,
|
|
5401
|
+
compactResult.dialogId
|
|
5402
|
+
)}
|
|
5403
|
+
`
|
|
5404
|
+
);
|
|
5266
5405
|
} catch (error) {
|
|
5267
5406
|
output.write(
|
|
5268
5407
|
`[nolo] Compact failed: ${toErrorMessage(error)}
|
|
@@ -5355,7 +5494,7 @@ ${t("copyViewHint")}
|
|
|
5355
5494
|
leaveAltScreen(output);
|
|
5356
5495
|
}
|
|
5357
5496
|
renderHistoryToOutput();
|
|
5358
|
-
fixedInput.repaint(buffer);
|
|
5497
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
5359
5498
|
}
|
|
5360
5499
|
if (result.action?.type === "copy-view") {
|
|
5361
5500
|
const opened = await openCopyView();
|
|
@@ -5529,7 +5668,7 @@ ${stderrText.trim()}
|
|
|
5529
5668
|
${err.message}` : ""}`
|
|
5530
5669
|
);
|
|
5531
5670
|
}
|
|
5532
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5671
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5533
5672
|
}
|
|
5534
5673
|
return false;
|
|
5535
5674
|
};
|
|
@@ -5539,7 +5678,6 @@ ${err.message}` : ""}`
|
|
|
5539
5678
|
let busy = false;
|
|
5540
5679
|
let done = false;
|
|
5541
5680
|
let resolveDone = null;
|
|
5542
|
-
let cursorPos2 = 0;
|
|
5543
5681
|
fixedInput = createFixedInput(output, {
|
|
5544
5682
|
getStatusLine: () => {
|
|
5545
5683
|
let base = renderStatusLine(state);
|
|
@@ -5557,17 +5695,7 @@ ${err.message}` : ""}`
|
|
|
5557
5695
|
}
|
|
5558
5696
|
return base;
|
|
5559
5697
|
},
|
|
5560
|
-
|
|
5561
|
-
const view = activityIndicator.getView();
|
|
5562
|
-
if (view === null) return null;
|
|
5563
|
-
const colorEnabled = resolveCliColorEnabled();
|
|
5564
|
-
const elapsed = formatElapsedSeconds(view.elapsedSec);
|
|
5565
|
-
const stopHint = t("stopHint");
|
|
5566
|
-
if (!colorEnabled) {
|
|
5567
|
-
return `${view.frame} ${view.label} (${elapsed}) \xB7 ${stopHint}`;
|
|
5568
|
-
}
|
|
5569
|
-
return themeText(view.frame, "accent") + " " + themeText(view.label, "muted") + themeText(` (${elapsed})`, "chrome") + themeText(` \xB7 ${stopHint}`, "chrome");
|
|
5570
|
-
},
|
|
5698
|
+
getActivityLines: () => activityIndicator.getActivityLines(resolveCliColorEnabled()),
|
|
5571
5699
|
getQueueLines: () => {
|
|
5572
5700
|
if (!chatQueueBinding || chatQueueBinding.queueLength() === 0) return [];
|
|
5573
5701
|
const colorEnabled = resolveCliColorEnabled();
|
|
@@ -5583,13 +5711,13 @@ ${err.message}` : ""}`
|
|
|
5583
5711
|
fixedInput.init();
|
|
5584
5712
|
const paintFrame = (draft) => {
|
|
5585
5713
|
renderHistoryToOutput();
|
|
5586
|
-
fixedInput.repaint(draft,
|
|
5714
|
+
fixedInput.repaint(draft, cursorPos);
|
|
5587
5715
|
};
|
|
5588
5716
|
const onResize = () => {
|
|
5589
5717
|
if (done || copyViewExitResolver) return;
|
|
5590
5718
|
if (fixedInput.isPaused()) {
|
|
5591
5719
|
renderHistory(output, history, fixedInput.getInputLines());
|
|
5592
|
-
fixedInput.repaint(buffer,
|
|
5720
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
5593
5721
|
return;
|
|
5594
5722
|
}
|
|
5595
5723
|
flushPendingRender();
|
|
@@ -5644,7 +5772,7 @@ ${err.message}` : ""}`
|
|
|
5644
5772
|
emitCommandOutput(t("forceStopped"));
|
|
5645
5773
|
flushPendingRender();
|
|
5646
5774
|
renderHistoryToOutput();
|
|
5647
|
-
if (fixedInput.active) fixedInput.repaint(buffer);
|
|
5775
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5648
5776
|
return;
|
|
5649
5777
|
}
|
|
5650
5778
|
const stopBinding = chatQueueBinding;
|
|
@@ -5655,7 +5783,7 @@ ${err.message}` : ""}`
|
|
|
5655
5783
|
activeTurnAbort.abort();
|
|
5656
5784
|
return;
|
|
5657
5785
|
}
|
|
5658
|
-
const result = applyTuiInputKey(buffer, sequence, {},
|
|
5786
|
+
const result = applyTuiInputKey(buffer, sequence, {}, cursorPos, {
|
|
5659
5787
|
pasteStore
|
|
5660
5788
|
});
|
|
5661
5789
|
if (result.copyView) {
|
|
@@ -5707,8 +5835,8 @@ ${hint}` : hint;
|
|
|
5707
5835
|
}
|
|
5708
5836
|
releaseCollapsedPasteReferences(submittedText, pasteStore);
|
|
5709
5837
|
buffer = "";
|
|
5710
|
-
|
|
5711
|
-
if (fixedInput.active) fixedInput.repaint(buffer,
|
|
5838
|
+
cursorPos = 0;
|
|
5839
|
+
if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
|
|
5712
5840
|
return;
|
|
5713
5841
|
}
|
|
5714
5842
|
const binding = ensureChatQueueBinding(
|
|
@@ -5749,8 +5877,8 @@ ${hint}` : hint;
|
|
|
5749
5877
|
if (decision.kind === "queue-text") {
|
|
5750
5878
|
binding.enqueue(decision.text);
|
|
5751
5879
|
buffer = "";
|
|
5752
|
-
|
|
5753
|
-
fixedInput.repaint(buffer,
|
|
5880
|
+
cursorPos = 0;
|
|
5881
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
5754
5882
|
} else if (decision.kind === "queue-blocked") {
|
|
5755
5883
|
} else if (decision.kind === "noop" && !submittedText.trim() && binding.queueLength() > 0) {
|
|
5756
5884
|
if (binding.preemptForDrain()) {
|
|
@@ -5796,7 +5924,7 @@ ${hint}` : hint;
|
|
|
5796
5924
|
if (drainedText !== null) {
|
|
5797
5925
|
busy = true;
|
|
5798
5926
|
buffer = "";
|
|
5799
|
-
|
|
5927
|
+
cursorPos = 0;
|
|
5800
5928
|
fixedInput.enterOutputMode(drainedText);
|
|
5801
5929
|
try {
|
|
5802
5930
|
const outcome = await runOneAgentTurn(
|
|
@@ -5817,13 +5945,13 @@ ${err.message}` : ""}`
|
|
|
5817
5945
|
}
|
|
5818
5946
|
refreshGitStatus();
|
|
5819
5947
|
flushPendingRender();
|
|
5820
|
-
fixedInput.exitOutputMode(buffer,
|
|
5948
|
+
fixedInput.exitOutputMode(buffer, cursorPos);
|
|
5821
5949
|
return;
|
|
5822
5950
|
}
|
|
5823
5951
|
}
|
|
5824
5952
|
busy = startsChatTurn;
|
|
5825
5953
|
buffer = "";
|
|
5826
|
-
|
|
5954
|
+
cursorPos = 0;
|
|
5827
5955
|
fixedInput.enterOutputMode(submittedText);
|
|
5828
5956
|
let shouldExit = false;
|
|
5829
5957
|
try {
|
|
@@ -5869,19 +5997,19 @@ ${err.message}` : ""}`
|
|
|
5869
5997
|
}
|
|
5870
5998
|
refreshGitStatus();
|
|
5871
5999
|
flushPendingRender();
|
|
5872
|
-
fixedInput.exitOutputMode(buffer,
|
|
6000
|
+
fixedInput.exitOutputMode(buffer, cursorPos);
|
|
5873
6001
|
return;
|
|
5874
6002
|
}
|
|
5875
6003
|
buffer = result.buffer;
|
|
5876
|
-
|
|
5877
|
-
fixedInput.repaint(buffer,
|
|
6004
|
+
cursorPos = result.cursorPos ?? buffer.length;
|
|
6005
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
5878
6006
|
};
|
|
5879
6007
|
const onData = createRawInputDecoder((token) => {
|
|
5880
6008
|
void handleInputToken(token);
|
|
5881
6009
|
});
|
|
5882
6010
|
try {
|
|
5883
6011
|
input.on("data", onData);
|
|
5884
|
-
fixedInput.repaint(buffer,
|
|
6012
|
+
fixedInput.repaint(buffer, cursorPos);
|
|
5885
6013
|
refreshGitStatus();
|
|
5886
6014
|
await new Promise((resolve2) => {
|
|
5887
6015
|
resolveDone = resolve2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanupCliSessionForDialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RWO5DGXI.js";
|
|
4
4
|
import {
|
|
5
5
|
getPrimaryDialogAgentId,
|
|
6
6
|
removeDialogAgentId
|
|
@@ -12,13 +12,13 @@ import "./chunk-BYXBJQAS.js";
|
|
|
12
12
|
import {
|
|
13
13
|
getActiveDialogKey
|
|
14
14
|
} from "./chunk-3ASDTTEI.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-JU7J7EAV.js";
|
|
16
16
|
import "./chunk-Y5GCAMGP.js";
|
|
17
17
|
import "./chunk-KX6YBIHG.js";
|
|
18
18
|
import {
|
|
19
19
|
patch,
|
|
20
20
|
selectById
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VKG4HXYV.js";
|
|
22
22
|
import "./chunk-WPHL6ALY.js";
|
|
23
23
|
import "./chunk-O4BU24WZ.js";
|
|
24
24
|
import "./chunk-I42VC5KR.js";
|