nolo-cli 0.71.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-GOV2OHC7.js → _executeModel-T3FPYFVF.js} +11 -11
- package/{agentDeleteCommand-FSIMTL4K.js → agentDeleteCommand-UAMLWTPS.js} +6 -6
- package/{agentEmailCommands-YZQ2VVHY.js → agentEmailCommands-65FRADWQ.js} +15 -14
- package/{agentListCommands-2YWZYH52.js → agentListCommands-63DOSBY7.js} +7 -7
- package/{agentMachineCommands-UCYM5RRQ.js → agentMachineCommands-HMMAULDF.js} +6 -6
- package/{agentRecordCommands-TPBYOPMA.js → agentRecordCommands-HX5AEFP7.js} +15 -14
- package/{agentRunCommand-HBC2EQVU.js → agentRunCommand-KXPU5X7D.js} +15 -14
- package/{agentRuntimeLocal-O6DZDTK4.js → agentRuntimeLocal-XG3IDNOC.js} +4 -4
- package/{agentSlice-ZPODGT3P.js → agentSlice-EACXUOWW.js} +1 -1
- package/{appDeleteCommands-HIJNWSK7.js → appDeleteCommands-TJXDMOYT.js} +7 -7
- package/{appDeployCommands-XULV2ZN6.js → appDeployCommands-ECZJQAAL.js} +7 -7
- package/{appDeployStatusCommands-ETY4Z7K6.js → appDeployStatusCommands-DZKVFG3Y.js} +7 -7
- package/{appGetCommands-M253LKDA.js → appGetCommands-JIT4OPUD.js} +7 -7
- package/{appListCommands-XYFXJMNP.js → appListCommands-NR2HRMDY.js} +7 -7
- package/{chatQueueReduxAdapter-Z67OC4WO.js → chatQueueReduxAdapter-XEIJO5WR.js} +2 -2
- package/chromeCommands-VOIRNJBL.js +499 -0
- package/chromeOpsCommands-M7DPCX2T.js +258 -0
- package/{chunk-PWGW5JTK.js → chunk-226XC5JW.js} +2 -2
- package/{chunk-SPQ7GSUX.js → chunk-4SUTS5DI.js} +113 -16
- package/{chunk-B62OSA77.js → chunk-AFIKMMGC.js} +1 -1
- package/{chunk-Q4OT2DC7.js → chunk-AFIWC5NH.js} +1 -1
- package/{chunk-RFMPSCHX.js → chunk-AI5QKFXK.js} +5568 -337
- package/{chunk-NUTDASGX.js → chunk-ALGK6TIE.js} +2 -2
- package/{chunk-VLX45P4L.js → chunk-CDVGNZDA.js} +2 -2
- package/{chunk-2QDDKFG5.js → chunk-CQ3WA2NE.js} +77 -0
- package/{chunk-CJ23A7U4.js → chunk-CUQ6PG2C.js} +14 -5
- package/{chunk-ZIUMSKK4.js → chunk-D74EWXL4.js} +87 -47
- package/{chunk-JWO3RQSH.js → chunk-DWPNOYMB.js} +1 -1
- package/{chunk-EDKF7RX4.js → chunk-EOARMOVD.js} +2 -0
- package/{chunk-T7PQFKJU.js → chunk-FSFQ3A7S.js} +1 -1
- package/{chunk-YYLLD6H6.js → chunk-H5I6AJX4.js} +22 -6
- package/{chunk-3NVAU4WZ.js → chunk-H7UKKEIS.js} +1 -1
- package/{chunk-YCDWJX45.js → chunk-KC5FAHVS.js} +1 -1
- package/{chunk-3U3EA3BO.js → chunk-L2Y24GRM.js} +2 -2
- package/{chunk-FCCT2LU2.js → chunk-MEVSATIF.js} +61 -19
- package/{chunk-BLCUMZNV.js → chunk-P7FA2HMM.js} +66 -120
- package/{chunk-AUKZOZFG.js → chunk-QA6YKM3H.js} +1 -1
- package/{chunk-HXAINXPQ.js → chunk-QC5LGHYP.js} +1 -1
- package/chunk-QCZX4FTW.js +242 -0
- package/{chunk-DQAEUZSQ.js → chunk-QRBAZ5PW.js} +2 -2
- package/{chunk-F657NADX.js → chunk-QUH3XHL5.js} +3 -3
- package/{chunk-TVDZABBT.js → chunk-U6LKJRJB.js} +4 -4
- package/{chunk-IDZTNRP2.js → chunk-X7HHHIOZ.js} +10 -2
- package/{chunk-AAWBX67U.js → chunk-X7Z7U4Z6.js} +5 -5
- package/{contentThunks-VGXYTSKU.js → contentThunks-3SPROFG5.js} +3 -3
- package/{createAgentAutomationAction-6YBZFLET.js → createAgentAutomationAction-EIP2EG3O.js} +3 -3
- package/{createDialogAction-N7CTNKB5.js → createDialogAction-RLUSTN4D.js} +4 -4
- package/{createPageAction-RXOOVKVO.js → createPageAction-4Y52G7WG.js} +3 -3
- package/{dialogCommands-PE5FEFJ5.js → dialogCommands-CJCAMML3.js} +7 -7
- package/{dialogSlice-NLSKRXBN.js → dialogSlice-THY45JWM.js} +2 -2
- package/{docCreateCommands-IPDFZVPG.js → docCreateCommands-H65RSKT4.js} +6 -6
- package/{docDeleteCommands-VQ4Y66CM.js → docDeleteCommands-PBYGJ6CZ.js} +7 -7
- package/{docReadCommands-PD33VV27.js → docReadCommands-4VRYN5R5.js} +6 -6
- package/{docStore-CIAYE5WP.js → docStore-ZQ3ECOPY.js} +1 -1
- package/{docUpdateCommands-CGUQ2JY3.js → docUpdateCommands-COZG3ZDB.js} +6 -6
- package/{handleSendMessageAction-ENUNMW3Z.js → handleSendMessageAction-CE4M5XIE.js} +2 -2
- package/index.js +108 -48
- package/{machineCommands-APIJY7UA.js → machineCommands-JE4G4JYB.js} +14 -13
- package/{machineWsRunDispatch-42WKRDE7.js → machineWsRunDispatch-FUQOSWD4.js} +14 -13
- package/package.json +1 -1
- package/{readlineWorkspace-MUV7VRD4.js → readlineWorkspace-Z4V3EB52.js} +191 -57
- package/{runAgentClientLoop-A4OXYOCL.js → runAgentClientLoop-NE5EHXSS.js} +9 -9
- package/{spaceCommands-Y47DDAQD.js → spaceCommands-WGXHETMT.js} +6 -6
- package/{streamAgentChatTurn-YHKNJEFR.js → streamAgentChatTurn-A6L6O22P.js} +11 -11
- package/{tools-S5RSWF3R.js → tools-JS475NYO.js} +6 -6
- package/{tuiSummaryLlmCaller-J5BEPLW5.js → tuiSummaryLlmCaller-3Z24VUWM.js} +2 -2
- package/{updateCommands-AJYSD73Y.js → updateCommands-Y363MC3L.js} +2 -2
- package/{updateDialogTitleAction-BU2VPE5B.js → updateDialogTitleAction-GMZUT6RP.js} +3 -3
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
normalizeDialogRecord,
|
|
9
9
|
readDialogSnapshot,
|
|
10
10
|
sortDialogs
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FSFQ3A7S.js";
|
|
12
12
|
import {
|
|
13
13
|
ANSI_ESCAPE_REGEX,
|
|
14
14
|
COLLAPSED_PASTE_PLACEHOLDER_RE,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
wrapTextToLines,
|
|
73
73
|
wrapTranscriptLine,
|
|
74
74
|
wrapTranscriptLineWithLayout
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-AI5QKFXK.js";
|
|
76
76
|
import "./chunk-S7Z2HMCN.js";
|
|
77
77
|
import {
|
|
78
78
|
listFavoriteAgentIdsAcrossServers,
|
|
@@ -80,12 +80,12 @@ import {
|
|
|
80
80
|
listRemoteAgents,
|
|
81
81
|
listRemoteAgentsAcrossServers,
|
|
82
82
|
normalizeListedAgent
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-L2Y24GRM.js";
|
|
84
84
|
import "./chunk-ID4G2MAR.js";
|
|
85
85
|
import {
|
|
86
86
|
listUserRecordsFromServers,
|
|
87
87
|
readLiveDbRecordAfterTombstoneMerge
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-AFIWC5NH.js";
|
|
89
89
|
import "./chunk-JYYZCK2Z.js";
|
|
90
90
|
import {
|
|
91
91
|
RUN_WAKE_CHANNEL_ENV,
|
|
@@ -96,8 +96,9 @@ import {
|
|
|
96
96
|
readTimestamp,
|
|
97
97
|
setCliLocale,
|
|
98
98
|
t
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-4SUTS5DI.js";
|
|
100
100
|
import "./chunk-GBPZKFYK.js";
|
|
101
|
+
import "./chunk-QCZX4FTW.js";
|
|
101
102
|
import "./chunk-EADNWBAZ.js";
|
|
102
103
|
import {
|
|
103
104
|
backfillRunRecordParentDialog,
|
|
@@ -114,7 +115,7 @@ import {
|
|
|
114
115
|
deleteDbRecord,
|
|
115
116
|
queryUserRecords,
|
|
116
117
|
readDbRecord
|
|
117
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-QA6YKM3H.js";
|
|
118
119
|
import "./chunk-Q6FF2MCK.js";
|
|
119
120
|
import {
|
|
120
121
|
NOLO_DEFAULT_AGENT_KEY,
|
|
@@ -134,12 +135,12 @@ import "./chunk-ATNTHIZI.js";
|
|
|
134
135
|
import "./chunk-JEXVIMYZ.js";
|
|
135
136
|
import {
|
|
136
137
|
prepareTools
|
|
137
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-ALGK6TIE.js";
|
|
138
139
|
import {
|
|
139
140
|
buildResponseGuidelines
|
|
140
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-EOARMOVD.js";
|
|
141
142
|
import "./chunk-HS7MLR74.js";
|
|
142
|
-
import "./chunk-
|
|
143
|
+
import "./chunk-MEVSATIF.js";
|
|
143
144
|
import "./chunk-5XTOKQLW.js";
|
|
144
145
|
import "./chunk-NF64D32W.js";
|
|
145
146
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -165,18 +166,18 @@ import "./chunk-FZGV4FGK.js";
|
|
|
165
166
|
import "./chunk-MEYIRKDN.js";
|
|
166
167
|
import "./chunk-63W5N6P3.js";
|
|
167
168
|
import "./chunk-VF4K2QE6.js";
|
|
168
|
-
import "./chunk-
|
|
169
|
-
import "./chunk-
|
|
170
|
-
import "./chunk-
|
|
169
|
+
import "./chunk-QRBAZ5PW.js";
|
|
170
|
+
import "./chunk-CDVGNZDA.js";
|
|
171
|
+
import "./chunk-P7FA2HMM.js";
|
|
171
172
|
import "./chunk-ZJ7UHBJS.js";
|
|
172
173
|
import {
|
|
173
174
|
extractReferenceKeysFromMessage
|
|
174
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-D74EWXL4.js";
|
|
175
176
|
import "./chunk-EVBFYPDC.js";
|
|
176
177
|
import "./chunk-HQUORJTM.js";
|
|
177
178
|
import "./chunk-YYLHWIW6.js";
|
|
178
179
|
import "./chunk-AGGIDPCZ.js";
|
|
179
|
-
import "./chunk-
|
|
180
|
+
import "./chunk-QUH3XHL5.js";
|
|
180
181
|
import "./chunk-BJCWNHVU.js";
|
|
181
182
|
import "./chunk-5RGU3J7P.js";
|
|
182
183
|
import "./chunk-6YTOJY35.js";
|
|
@@ -201,11 +202,11 @@ import {
|
|
|
201
202
|
buildLocalWorkspaceToolset,
|
|
202
203
|
getProcessRegistry,
|
|
203
204
|
readCommandActionGatePayload
|
|
204
|
-
} from "./chunk-
|
|
205
|
-
import "./chunk-HXAINXPQ.js";
|
|
205
|
+
} from "./chunk-CUQ6PG2C.js";
|
|
206
206
|
import "./chunk-ZNFJWEN4.js";
|
|
207
|
+
import "./chunk-QC5LGHYP.js";
|
|
207
208
|
import "./chunk-KIS76A2P.js";
|
|
208
|
-
import "./chunk-
|
|
209
|
+
import "./chunk-CQ3WA2NE.js";
|
|
209
210
|
import "./chunk-N7J63Q6C.js";
|
|
210
211
|
import {
|
|
211
212
|
buildIdentityBlock,
|
|
@@ -268,7 +269,7 @@ import "./chunk-BYEJ7K2Z.js";
|
|
|
268
269
|
import {
|
|
269
270
|
checkForCliUpdate,
|
|
270
271
|
runSelfUpdateDetailed
|
|
271
|
-
} from "./chunk-
|
|
272
|
+
} from "./chunk-KC5FAHVS.js";
|
|
272
273
|
import {
|
|
273
274
|
getAgentSelectionAuditPath,
|
|
274
275
|
getDefaultProfileConfigPath,
|
|
@@ -282,7 +283,7 @@ import {
|
|
|
282
283
|
import {
|
|
283
284
|
readPipeText,
|
|
284
285
|
spawnProcess
|
|
285
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-X7HHHIOZ.js";
|
|
286
287
|
import {
|
|
287
288
|
parseUserIdFromAuthToken,
|
|
288
289
|
resolveAuthToken,
|
|
@@ -6763,6 +6764,7 @@ function appendTurnBillingAudit(input) {
|
|
|
6763
6764
|
}
|
|
6764
6765
|
|
|
6765
6766
|
// packages/ai/tools/askChoiceState.ts
|
|
6767
|
+
var SKIPPED_ANSWER_MESSAGE = "\uFF08\u8DF3\u8FC7\uFF09";
|
|
6766
6768
|
function normalizeAskChoiceArgs(args) {
|
|
6767
6769
|
const blocking = args.blocking !== false;
|
|
6768
6770
|
if (Array.isArray(args.questions) && args.questions.length > 0) {
|
|
@@ -6849,7 +6851,8 @@ function createInitialAskChoiceState(questions, savedAnswers) {
|
|
|
6849
6851
|
};
|
|
6850
6852
|
}),
|
|
6851
6853
|
phase: savedAnswers?.phase ?? (hasSaved ? "submitted" : "active"),
|
|
6852
|
-
validationAttempted: false
|
|
6854
|
+
validationAttempted: false,
|
|
6855
|
+
answerSignal: null
|
|
6853
6856
|
};
|
|
6854
6857
|
}
|
|
6855
6858
|
function askChoiceReducer(state, action) {
|
|
@@ -6877,7 +6880,7 @@ function askChoiceReducer(state, action) {
|
|
|
6877
6880
|
if (state.phase !== "active") return state;
|
|
6878
6881
|
switch (action.type) {
|
|
6879
6882
|
case "CANCEL":
|
|
6880
|
-
return { ...state, phase: "cancelled" };
|
|
6883
|
+
return { ...state, phase: "cancelled", answerSignal: null };
|
|
6881
6884
|
case "SUBMIT": {
|
|
6882
6885
|
const firstUnanswered = findFirstUnansweredIndex(state);
|
|
6883
6886
|
if (firstUnanswered !== -1) {
|
|
@@ -6887,7 +6890,12 @@ function askChoiceReducer(state, action) {
|
|
|
6887
6890
|
validationAttempted: true
|
|
6888
6891
|
};
|
|
6889
6892
|
}
|
|
6890
|
-
return {
|
|
6893
|
+
return {
|
|
6894
|
+
...state,
|
|
6895
|
+
phase: "submitted",
|
|
6896
|
+
validationAttempted: false,
|
|
6897
|
+
answerSignal: null
|
|
6898
|
+
};
|
|
6891
6899
|
}
|
|
6892
6900
|
case "SWITCH_TAB": {
|
|
6893
6901
|
const idx = clamp(action.index, 0, state.questions.length - 1);
|
|
@@ -6932,8 +6940,9 @@ function askChoiceReducer(state, action) {
|
|
|
6932
6940
|
}
|
|
6933
6941
|
// The one explicit "choose this option" action, addressed by choice id so
|
|
6934
6942
|
// that click / tap handlers on every platform share the same behaviour as
|
|
6935
|
-
// cursor-driven keys. Multi-select toggles
|
|
6936
|
-
//
|
|
6943
|
+
// cursor-driven keys. Multi-select toggles; a single-select pick lands
|
|
6944
|
+
// immediately (advance to the next unanswered question, or emit the
|
|
6945
|
+
// `complete` signal so the renderer persists and sends).
|
|
6937
6946
|
case "SELECT_CHOICE": {
|
|
6938
6947
|
const qs = state.questionStates[state.activeIndex];
|
|
6939
6948
|
const q = state.questions[state.activeIndex];
|
|
@@ -6950,16 +6959,19 @@ function askChoiceReducer(state, action) {
|
|
|
6950
6959
|
otherText: "",
|
|
6951
6960
|
otherFocused: false
|
|
6952
6961
|
};
|
|
6953
|
-
|
|
6954
|
-
newQs[state.activeIndex] = {
|
|
6955
|
-
...qs,
|
|
6956
|
-
cursorIndex: choiceIndex,
|
|
6957
|
-
pickedId: action.choiceId,
|
|
6958
|
-
otherText: "",
|
|
6959
|
-
otherFocused: false
|
|
6960
|
-
};
|
|
6962
|
+
return { ...state, questionStates: newQs, validationAttempted: false };
|
|
6961
6963
|
}
|
|
6962
|
-
|
|
6964
|
+
newQs[state.activeIndex] = {
|
|
6965
|
+
...qs,
|
|
6966
|
+
cursorIndex: choiceIndex,
|
|
6967
|
+
pickedId: action.choiceId,
|
|
6968
|
+
otherText: "",
|
|
6969
|
+
otherFocused: false
|
|
6970
|
+
};
|
|
6971
|
+
return landSingleSelectAnswer(
|
|
6972
|
+
{ ...state, questionStates: newQs, validationAttempted: false },
|
|
6973
|
+
state.activeIndex
|
|
6974
|
+
);
|
|
6963
6975
|
}
|
|
6964
6976
|
case "SELECT_AT_CURSOR": {
|
|
6965
6977
|
const qs = state.questionStates[state.activeIndex];
|
|
@@ -6974,6 +6986,47 @@ function askChoiceReducer(state, action) {
|
|
|
6974
6986
|
if (!choiceId) return state;
|
|
6975
6987
|
return askChoiceReducer(state, { type: "SELECT_CHOICE", choiceId });
|
|
6976
6988
|
}
|
|
6989
|
+
// Enter in the Other input: identical landing semantics to a single-select
|
|
6990
|
+
// pick, but only when the row carries an actual answer. Multi-select
|
|
6991
|
+
// questions keep the explicit submit — Enter there is a no-op (renderers
|
|
6992
|
+
// blur the input themselves) so toggling stays a purely local edit.
|
|
6993
|
+
case "COMMIT_OTHER": {
|
|
6994
|
+
const qs = state.questionStates[state.activeIndex];
|
|
6995
|
+
const q = state.questions[state.activeIndex];
|
|
6996
|
+
if (q.multiSelect || qs.otherText.trim().length === 0) return state;
|
|
6997
|
+
const newQs = [...state.questionStates];
|
|
6998
|
+
newQs[state.activeIndex] = { ...qs, otherFocused: false };
|
|
6999
|
+
return landSingleSelectAnswer(
|
|
7000
|
+
{ ...state, questionStates: newQs, validationAttempted: false },
|
|
7001
|
+
state.activeIndex
|
|
7002
|
+
);
|
|
7003
|
+
}
|
|
7004
|
+
// Explicit skip of the current optional, still-unanswered question.
|
|
7005
|
+
// Renderers only expose it there; the reducer also refuses required or
|
|
7006
|
+
// already-answered questions so a skip can never bypass a required answer.
|
|
7007
|
+
case "SKIP_CURRENT": {
|
|
7008
|
+
const q = state.questions[state.activeIndex];
|
|
7009
|
+
const qs = state.questionStates[state.activeIndex];
|
|
7010
|
+
if (!q || !qs || q.required || questionHasAnswer(q, qs)) return state;
|
|
7011
|
+
const nextIndex = findNextUnansweredIndex(state, state.activeIndex);
|
|
7012
|
+
if (nextIndex !== -1) {
|
|
7013
|
+
return {
|
|
7014
|
+
...state,
|
|
7015
|
+
activeIndex: nextIndex,
|
|
7016
|
+
validationAttempted: false,
|
|
7017
|
+
answerSignal: {
|
|
7018
|
+
kind: "advance",
|
|
7019
|
+
fromIndex: state.activeIndex,
|
|
7020
|
+
toIndex: nextIndex
|
|
7021
|
+
}
|
|
7022
|
+
};
|
|
7023
|
+
}
|
|
7024
|
+
return {
|
|
7025
|
+
...state,
|
|
7026
|
+
validationAttempted: false,
|
|
7027
|
+
answerSignal: { kind: "complete", fromIndex: state.activeIndex }
|
|
7028
|
+
};
|
|
7029
|
+
}
|
|
6977
7030
|
case "FOCUS_OTHER": {
|
|
6978
7031
|
const qs = state.questionStates[state.activeIndex];
|
|
6979
7032
|
const newQs = [...state.questionStates];
|
|
@@ -7002,17 +7055,48 @@ function askChoiceReducer(state, action) {
|
|
|
7002
7055
|
return state;
|
|
7003
7056
|
}
|
|
7004
7057
|
}
|
|
7058
|
+
function landSingleSelectAnswer(state, fromIndex) {
|
|
7059
|
+
const nextIndex = findNextUnansweredIndex(state, fromIndex);
|
|
7060
|
+
if (nextIndex !== -1) {
|
|
7061
|
+
return {
|
|
7062
|
+
...state,
|
|
7063
|
+
activeIndex: nextIndex,
|
|
7064
|
+
answerSignal: { kind: "advance", fromIndex, toIndex: nextIndex }
|
|
7065
|
+
};
|
|
7066
|
+
}
|
|
7067
|
+
if (formRequiresExplicitSubmit(state.questions)) {
|
|
7068
|
+
return { ...state, answerSignal: null };
|
|
7069
|
+
}
|
|
7070
|
+
return { ...state, answerSignal: { kind: "complete", fromIndex } };
|
|
7071
|
+
}
|
|
7072
|
+
function findNextUnansweredIndex(state, fromIndex) {
|
|
7073
|
+
const total = state.questions.length;
|
|
7074
|
+
for (let step = 1; step < total; step += 1) {
|
|
7075
|
+
const index = (fromIndex + step) % total;
|
|
7076
|
+
const questionState = state.questionStates[index];
|
|
7077
|
+
if (!questionState || !isQuestionAnswered(state.questions[index], questionState)) {
|
|
7078
|
+
return index;
|
|
7079
|
+
}
|
|
7080
|
+
}
|
|
7081
|
+
return -1;
|
|
7082
|
+
}
|
|
7083
|
+
function formRequiresExplicitSubmit(questions) {
|
|
7084
|
+
return questions.some((q) => q.multiSelect);
|
|
7085
|
+
}
|
|
7005
7086
|
function findFirstUnansweredIndex(state) {
|
|
7006
7087
|
return state.questions.findIndex(
|
|
7007
7088
|
(q, i) => !isQuestionAnswered(q, state.questionStates[i])
|
|
7008
7089
|
);
|
|
7009
7090
|
}
|
|
7010
|
-
function
|
|
7011
|
-
if (!q.required) return true;
|
|
7091
|
+
function questionHasAnswer(q, qs) {
|
|
7012
7092
|
const hasOther = q.allowOther && qs.otherText.trim().length > 0;
|
|
7013
7093
|
const hasSelection = q.multiSelect ? qs.selectedIds.length > 0 : qs.pickedId !== null;
|
|
7014
7094
|
return hasOther || hasSelection;
|
|
7015
7095
|
}
|
|
7096
|
+
function isQuestionAnswered(q, qs) {
|
|
7097
|
+
if (!q.required) return true;
|
|
7098
|
+
return questionHasAnswer(q, qs);
|
|
7099
|
+
}
|
|
7016
7100
|
function buildAskChoiceResult(state) {
|
|
7017
7101
|
if (state.phase === "cancelled") return { kind: "cancelled" };
|
|
7018
7102
|
if (state.phase !== "submitted") return { kind: "cancelled" };
|
|
@@ -7031,11 +7115,13 @@ function buildAskChoiceResult(state) {
|
|
|
7031
7115
|
}
|
|
7032
7116
|
}
|
|
7033
7117
|
}
|
|
7118
|
+
const userMessage = parts.join("\n");
|
|
7119
|
+
const skipped = userMessage.length === 0 && !q.required;
|
|
7034
7120
|
return {
|
|
7035
7121
|
questionId: q.id,
|
|
7036
7122
|
selectedIds,
|
|
7037
7123
|
otherText,
|
|
7038
|
-
userMessage:
|
|
7124
|
+
userMessage: skipped ? SKIPPED_ANSWER_MESSAGE : userMessage
|
|
7039
7125
|
};
|
|
7040
7126
|
});
|
|
7041
7127
|
return { kind: "submitted", answers };
|
|
@@ -7078,11 +7164,25 @@ function renderTabBar(state, colorEnabled) {
|
|
|
7078
7164
|
}
|
|
7079
7165
|
return colorEnabled ? themeText(` ${label} `, "muted", colorEnabled) : ` ${label} `;
|
|
7080
7166
|
});
|
|
7081
|
-
const
|
|
7167
|
+
const actionRow = resolveAskChoiceActionRow(state);
|
|
7168
|
+
const submitLabel = actionRow ? `${actionRow.label} \u2193` : null;
|
|
7169
|
+
if (!submitLabel) return tabs.join(" ");
|
|
7082
7170
|
return tabs.join(" ") + " " + (colorEnabled ? themeText(submitLabel, "chrome", colorEnabled) : submitLabel);
|
|
7083
7171
|
}
|
|
7084
|
-
function
|
|
7085
|
-
const
|
|
7172
|
+
function resolveAskChoiceActionRow(state) {
|
|
7173
|
+
const q = state.questions[state.activeIndex];
|
|
7174
|
+
const qs = state.questionStates[state.activeIndex];
|
|
7175
|
+
if (!q || !qs) return null;
|
|
7176
|
+
if (!q.required && !questionHasAnswer(q, qs)) {
|
|
7177
|
+
return { kind: "skip", label: t("askChoiceSkipRow") };
|
|
7178
|
+
}
|
|
7179
|
+
if (formRequiresExplicitSubmit(state.questions)) {
|
|
7180
|
+
return { kind: "submit", label: t("askChoiceSubmitRow") };
|
|
7181
|
+
}
|
|
7182
|
+
return null;
|
|
7183
|
+
}
|
|
7184
|
+
function renderFooter(actionRow, colorEnabled) {
|
|
7185
|
+
const hints = actionRow?.kind === "skip" ? t("askChoiceFooterSkip") : actionRow?.kind === "submit" ? t("askChoiceFooterMulti") : t("askChoiceFooterSingle");
|
|
7086
7186
|
return colorEnabled ? themeText(` ${hints}`, "chrome", colorEnabled) : ` ${hints}`;
|
|
7087
7187
|
}
|
|
7088
7188
|
function otherRowPrefix(index) {
|
|
@@ -7093,6 +7193,7 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7093
7193
|
const submitFocused = options?.submitFocused === true;
|
|
7094
7194
|
const q = state.questions[state.activeIndex];
|
|
7095
7195
|
const qs = state.questionStates[state.activeIndex];
|
|
7196
|
+
const actionRow = resolveAskChoiceActionRow(state);
|
|
7096
7197
|
const lines = [];
|
|
7097
7198
|
let otherCursor = null;
|
|
7098
7199
|
lines.push(renderDialogTitle(t("askChoiceTitle")));
|
|
@@ -7119,6 +7220,10 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7119
7220
|
lines.push(
|
|
7120
7221
|
colorEnabled ? themeText(` ${t("askChoiceHintMulti")}`, "muted", colorEnabled) : ` ${t("askChoiceHintMulti")}`
|
|
7121
7222
|
);
|
|
7223
|
+
} else if (actionRow?.kind === "skip") {
|
|
7224
|
+
lines.push(
|
|
7225
|
+
colorEnabled ? themeText(` ${t("askChoiceHintOptional")}`, "muted", colorEnabled) : ` ${t("askChoiceHintOptional")}`
|
|
7226
|
+
);
|
|
7122
7227
|
} else {
|
|
7123
7228
|
lines.push(
|
|
7124
7229
|
colorEnabled ? themeText(` ${t("askChoiceHintSingle")}`, "muted", colorEnabled) : ` ${t("askChoiceHintSingle")}`
|
|
@@ -7169,14 +7274,16 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7169
7274
|
if (window.end < totalRows) {
|
|
7170
7275
|
lines.push(renderOverflowBelow(totalRows - window.end));
|
|
7171
7276
|
}
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7277
|
+
if (actionRow) {
|
|
7278
|
+
lines.push(
|
|
7279
|
+
renderDialogRow({
|
|
7280
|
+
label: actionRow.label,
|
|
7281
|
+
focused: submitFocused
|
|
7282
|
+
})
|
|
7283
|
+
);
|
|
7284
|
+
}
|
|
7178
7285
|
lines.push("");
|
|
7179
|
-
lines.push(renderFooter(
|
|
7286
|
+
lines.push(renderFooter(actionRow, colorEnabled));
|
|
7180
7287
|
return { text: lines.join("\n"), otherCursor };
|
|
7181
7288
|
}
|
|
7182
7289
|
async function runAskChoiceDialog(args) {
|
|
@@ -7263,6 +7370,8 @@ async function runAskChoiceDialog(args) {
|
|
|
7263
7370
|
const qs = state.questionStates[state.activeIndex];
|
|
7264
7371
|
const q = state.questions[state.activeIndex];
|
|
7265
7372
|
const isOtherRow = qs.cursorIndex >= q.choices.length;
|
|
7373
|
+
const actionRow = resolveAskChoiceActionRow(state);
|
|
7374
|
+
if (!actionRow) submitFocused = false;
|
|
7266
7375
|
if (sequence === KEY_SHIFT_TAB) {
|
|
7267
7376
|
action = { type: "PREV_TAB" };
|
|
7268
7377
|
} else if (sequence === KEY_TAB) {
|
|
@@ -7282,6 +7391,7 @@ async function runAskChoiceDialog(args) {
|
|
|
7282
7391
|
continue;
|
|
7283
7392
|
}
|
|
7284
7393
|
if (qs.cursorIndex >= maxRowIndex) {
|
|
7394
|
+
if (!actionRow) continue;
|
|
7285
7395
|
submitFocused = true;
|
|
7286
7396
|
state = askChoiceReducer(state, { type: "MOVE_CURSOR", delta: 1 });
|
|
7287
7397
|
paint();
|
|
@@ -7289,7 +7399,8 @@ async function runAskChoiceDialog(args) {
|
|
|
7289
7399
|
}
|
|
7290
7400
|
action = { type: "MOVE_CURSOR", delta: 1 };
|
|
7291
7401
|
} else if (sequence === KEY_CTRL_S) {
|
|
7292
|
-
|
|
7402
|
+
if (!actionRow) continue;
|
|
7403
|
+
action = actionRow.kind === "skip" ? { type: "SKIP_CURRENT" } : { type: "SUBMIT" };
|
|
7293
7404
|
} else if (sequence === KEY_SPACE) {
|
|
7294
7405
|
if (submitFocused) {
|
|
7295
7406
|
continue;
|
|
@@ -7306,9 +7417,9 @@ async function runAskChoiceDialog(args) {
|
|
|
7306
7417
|
}
|
|
7307
7418
|
} else if (isSubmit(sequence)) {
|
|
7308
7419
|
if (submitFocused) {
|
|
7309
|
-
action = { type: "SUBMIT" };
|
|
7420
|
+
action = actionRow?.kind === "skip" ? { type: "SKIP_CURRENT" } : { type: "SUBMIT" };
|
|
7310
7421
|
} else if (qs.otherFocused) {
|
|
7311
|
-
action = { type: "BLUR_OTHER" };
|
|
7422
|
+
action = !q.multiSelect && qs.otherText.trim() ? { type: "COMMIT_OTHER" } : { type: "BLUR_OTHER" };
|
|
7312
7423
|
} else if (isOtherRow) {
|
|
7313
7424
|
action = { type: "FOCUS_OTHER" };
|
|
7314
7425
|
} else {
|
|
@@ -7349,6 +7460,9 @@ async function runAskChoiceDialog(args) {
|
|
|
7349
7460
|
}
|
|
7350
7461
|
if (action) {
|
|
7351
7462
|
state = askChoiceReducer(state, action);
|
|
7463
|
+
if (state.phase === "active" && state.answerSignal?.kind === "complete") {
|
|
7464
|
+
state = askChoiceReducer(state, { type: "SUBMIT" });
|
|
7465
|
+
}
|
|
7352
7466
|
if (state.phase !== "active") break;
|
|
7353
7467
|
submitFocused = false;
|
|
7354
7468
|
paint();
|
|
@@ -7376,7 +7490,9 @@ async function runAskChoiceDialog(args) {
|
|
|
7376
7490
|
return {
|
|
7377
7491
|
kind: "selected",
|
|
7378
7492
|
userMessage: a.userMessage,
|
|
7379
|
-
|
|
7493
|
+
// Fallback covers the skip-only shape: no label/other text, but the
|
|
7494
|
+
// outbound message carries the SKIPPED marker.
|
|
7495
|
+
label: labels.join(", ") || a.otherText || a.userMessage || ""
|
|
7380
7496
|
};
|
|
7381
7497
|
}
|
|
7382
7498
|
return {
|
|
@@ -8410,6 +8526,8 @@ function createTuiRender(host) {
|
|
|
8410
8526
|
// packages/cli/tui/tuiScrollAnimation.ts
|
|
8411
8527
|
var SCROLL_ANIMATION_TICK_MS = 16;
|
|
8412
8528
|
var DEFAULT_SCROLL_MAX_LINES_PER_TICK = 6;
|
|
8529
|
+
var ADAPTIVE_STEP_CAP = 20;
|
|
8530
|
+
var EXPLICIT_STEP_CAP = 100;
|
|
8413
8531
|
function readPositiveInt(raw, fallback, max) {
|
|
8414
8532
|
if (raw === void 0 || raw.trim() === "") return fallback;
|
|
8415
8533
|
const parsed = Number.parseInt(raw, 10);
|
|
@@ -8417,15 +8535,20 @@ function readPositiveInt(raw, fallback, max) {
|
|
|
8417
8535
|
return Math.min(parsed, max);
|
|
8418
8536
|
}
|
|
8419
8537
|
function resolveScrollTuning(env = process.env) {
|
|
8538
|
+
const rawStep = env.NOLO_TUI_SCROLL_MAX_STEP;
|
|
8539
|
+
const explicit = parseExplicitStep(rawStep);
|
|
8420
8540
|
return {
|
|
8421
8541
|
wheelLines: readPositiveInt(env.NOLO_TUI_WHEEL_LINES, WHEEL_SCROLL_LINES, 50),
|
|
8422
|
-
maxLinesPerTick:
|
|
8423
|
-
|
|
8424
|
-
DEFAULT_SCROLL_MAX_LINES_PER_TICK,
|
|
8425
|
-
100
|
|
8426
|
-
)
|
|
8542
|
+
maxLinesPerTick: explicit ?? DEFAULT_SCROLL_MAX_LINES_PER_TICK,
|
|
8543
|
+
adaptiveStep: explicit === null
|
|
8427
8544
|
};
|
|
8428
8545
|
}
|
|
8546
|
+
function parseExplicitStep(raw) {
|
|
8547
|
+
if (raw === void 0 || raw.trim() === "") return null;
|
|
8548
|
+
const parsed = Number.parseInt(raw, 10);
|
|
8549
|
+
if (!Number.isFinite(parsed) || parsed < 1) return null;
|
|
8550
|
+
return Math.min(parsed, EXPLICIT_STEP_CAP);
|
|
8551
|
+
}
|
|
8429
8552
|
var defaultTickTimer = {
|
|
8430
8553
|
every(ms, fn) {
|
|
8431
8554
|
const handle = setInterval(fn, ms);
|
|
@@ -8434,9 +8557,10 @@ var defaultTickTimer = {
|
|
|
8434
8557
|
}
|
|
8435
8558
|
};
|
|
8436
8559
|
function createScrollAnimator(deps) {
|
|
8437
|
-
const { wheelLines, maxLinesPerTick } = resolveScrollTuning(
|
|
8560
|
+
const { wheelLines, maxLinesPerTick, adaptiveStep } = resolveScrollTuning(
|
|
8438
8561
|
deps.env ?? process.env
|
|
8439
8562
|
);
|
|
8563
|
+
const stepCap = adaptiveStep ? Math.max(ADAPTIVE_STEP_CAP, wheelLines) : maxLinesPerTick;
|
|
8440
8564
|
const timer = deps.tickTimer ?? defaultTickTimer;
|
|
8441
8565
|
const history = deps.history;
|
|
8442
8566
|
let goal = null;
|
|
@@ -8474,7 +8598,17 @@ function createScrollAnimator(deps) {
|
|
|
8474
8598
|
settle(maxScrollTop);
|
|
8475
8599
|
return;
|
|
8476
8600
|
}
|
|
8477
|
-
const
|
|
8601
|
+
const backlog = Math.abs(delta);
|
|
8602
|
+
const limit = adaptiveStep ? Math.min(
|
|
8603
|
+
backlog,
|
|
8604
|
+
Math.max(
|
|
8605
|
+
DEFAULT_SCROLL_MAX_LINES_PER_TICK,
|
|
8606
|
+
wheelLines,
|
|
8607
|
+
Math.ceil(backlog / 4)
|
|
8608
|
+
),
|
|
8609
|
+
stepCap
|
|
8610
|
+
) : Math.min(backlog, maxLinesPerTick);
|
|
8611
|
+
const step = Math.sign(delta) * limit;
|
|
8478
8612
|
history.scrollTop += step;
|
|
8479
8613
|
deps.onPaint();
|
|
8480
8614
|
if (history.scrollTop === goal) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAgentContexts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H7UKKEIS.js";
|
|
4
4
|
import {
|
|
5
5
|
generateRequestBody,
|
|
6
6
|
mergeReferences,
|
|
7
7
|
performFetchRequest,
|
|
8
8
|
sanitizeOutboundBody
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-U6LKJRJB.js";
|
|
10
|
+
import "./chunk-EOARMOVD.js";
|
|
11
11
|
import "./chunk-HS7MLR74.js";
|
|
12
12
|
import {
|
|
13
13
|
findToolExecutor,
|
|
14
14
|
getToolResultErrorData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MEVSATIF.js";
|
|
16
16
|
import "./chunk-5XTOKQLW.js";
|
|
17
17
|
import "./chunk-NF64D32W.js";
|
|
18
18
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -28,18 +28,18 @@ import "./chunk-FZGV4FGK.js";
|
|
|
28
28
|
import "./chunk-MEYIRKDN.js";
|
|
29
29
|
import "./chunk-63W5N6P3.js";
|
|
30
30
|
import "./chunk-VF4K2QE6.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-QRBAZ5PW.js";
|
|
32
|
+
import "./chunk-CDVGNZDA.js";
|
|
33
|
+
import "./chunk-P7FA2HMM.js";
|
|
34
34
|
import "./chunk-ZJ7UHBJS.js";
|
|
35
35
|
import {
|
|
36
36
|
updateTokensAction
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-D74EWXL4.js";
|
|
38
38
|
import "./chunk-EVBFYPDC.js";
|
|
39
39
|
import "./chunk-HQUORJTM.js";
|
|
40
40
|
import "./chunk-YYLHWIW6.js";
|
|
41
41
|
import "./chunk-AGGIDPCZ.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-QUH3XHL5.js";
|
|
43
43
|
import "./chunk-BJCWNHVU.js";
|
|
44
44
|
import "./chunk-5RGU3J7P.js";
|
|
45
45
|
import "./chunk-6YTOJY35.js";
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-M3JEW6N6.js";
|
|
4
4
|
import {
|
|
5
5
|
readLiveDbRecordAfterTombstoneMerge
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AFIWC5NH.js";
|
|
7
7
|
import {
|
|
8
8
|
readDbRecord,
|
|
9
9
|
writeAgentRecord
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QA6YKM3H.js";
|
|
11
11
|
import "./chunk-Q6FF2MCK.js";
|
|
12
12
|
import "./chunk-SPAQ4PVV.js";
|
|
13
13
|
import "./chunk-KQHGZWSV.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-HXAINXPQ.js";
|
|
14
|
+
import "./chunk-CUQ6PG2C.js";
|
|
16
15
|
import "./chunk-ZNFJWEN4.js";
|
|
16
|
+
import "./chunk-QC5LGHYP.js";
|
|
17
17
|
import "./chunk-KIS76A2P.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-CQ3WA2NE.js";
|
|
19
19
|
import "./chunk-N7J63Q6C.js";
|
|
20
20
|
import "./chunk-ZLPA7K55.js";
|
|
21
21
|
import "./chunk-PUOC4YRO.js";
|
|
@@ -38,7 +38,7 @@ import "./chunk-HNMXYYJR.js";
|
|
|
38
38
|
import "./chunk-DVINR3PL.js";
|
|
39
39
|
import "./chunk-2GRGFCF6.js";
|
|
40
40
|
import "./chunk-O6OSWFZQ.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-X7HHHIOZ.js";
|
|
42
42
|
import {
|
|
43
43
|
parseUserIdFromAuthToken,
|
|
44
44
|
readOption,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
readStreamChunk,
|
|
17
17
|
sendOpenAICompletionsRequest,
|
|
18
18
|
updateTotalUsage
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-X7Z7U4Z6.js";
|
|
20
20
|
import "./chunk-JEXVIMYZ.js";
|
|
21
21
|
import {
|
|
22
22
|
prepareTools
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ALGK6TIE.js";
|
|
24
24
|
import {
|
|
25
25
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
26
26
|
buildInvalidToolCallSelfHealResult,
|
|
@@ -38,15 +38,15 @@ import {
|
|
|
38
38
|
sanitizeOutboundResponsesInput,
|
|
39
39
|
selectResponsesConversationState,
|
|
40
40
|
updateResponsesConversationState
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-U6LKJRJB.js";
|
|
42
|
+
import "./chunk-EOARMOVD.js";
|
|
43
43
|
import "./chunk-HS7MLR74.js";
|
|
44
44
|
import {
|
|
45
45
|
createSSEParser,
|
|
46
46
|
getAllToolRuns,
|
|
47
47
|
resolveAgentRecommendedSkillNames,
|
|
48
48
|
resolveAgentRequiredPackIds
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-MEVSATIF.js";
|
|
50
50
|
import "./chunk-5XTOKQLW.js";
|
|
51
51
|
import "./chunk-NF64D32W.js";
|
|
52
52
|
import "./chunk-3L2WKC3W.js";
|
|
@@ -80,11 +80,11 @@ import "./chunk-63W5N6P3.js";
|
|
|
80
80
|
import "./chunk-VF4K2QE6.js";
|
|
81
81
|
import {
|
|
82
82
|
getDocState
|
|
83
|
-
} from "./chunk-
|
|
84
|
-
import "./chunk-
|
|
83
|
+
} from "./chunk-QRBAZ5PW.js";
|
|
84
|
+
import "./chunk-CDVGNZDA.js";
|
|
85
85
|
import {
|
|
86
86
|
getTableState
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-P7FA2HMM.js";
|
|
88
88
|
import {
|
|
89
89
|
getCurrentSpaceId,
|
|
90
90
|
getCurrentSpaceIdRaw,
|
|
@@ -109,12 +109,12 @@ import {
|
|
|
109
109
|
shouldBlockForGptPro,
|
|
110
110
|
updateTokens,
|
|
111
111
|
updateToolMessage
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-D74EWXL4.js";
|
|
113
113
|
import "./chunk-EVBFYPDC.js";
|
|
114
114
|
import "./chunk-HQUORJTM.js";
|
|
115
115
|
import "./chunk-YYLHWIW6.js";
|
|
116
116
|
import "./chunk-AGGIDPCZ.js";
|
|
117
|
-
import "./chunk-
|
|
117
|
+
import "./chunk-QUH3XHL5.js";
|
|
118
118
|
import {
|
|
119
119
|
createCliChatTurnStream,
|
|
120
120
|
getCliChatSession,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
projectToolMessageContent,
|
|
154
154
|
stripImagePartsForTextOnlyAgent
|
|
155
155
|
} from "./chunk-KIS76A2P.js";
|
|
156
|
-
import "./chunk-
|
|
156
|
+
import "./chunk-CQ3WA2NE.js";
|
|
157
157
|
import "./chunk-N7J63Q6C.js";
|
|
158
158
|
import "./chunk-ZLPA7K55.js";
|
|
159
159
|
import {
|