nolo-cli 0.12.0-alpha.4 → 0.12.0-alpha.6

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.
Files changed (64) hide show
  1. package/{_executeModel-L4JM5R23.js → _executeModel-3B6MKHQV.js} +16 -16
  2. package/{agentDeleteCommand-MWB2LXG6.js → agentDeleteCommand-3R7OCLBN.js} +11 -11
  3. package/{agentEmailCommands-32ZZ4VSU.js → agentEmailCommands-OENXTOPM.js} +19 -19
  4. package/{agentListCommands-SKUYB2RQ.js → agentListCommands-GX5YRFFK.js} +12 -12
  5. package/{agentMachineCommands-EHFBWQ2U.js → agentMachineCommands-5ZEL4NOJ.js} +11 -11
  6. package/{agentRecordCommands-DSMDSFMJ.js → agentRecordCommands-EKGPNDCG.js} +19 -19
  7. package/{agentRunCommand-MEVHCOMH.js → agentRunCommand-KQYY46WS.js} +20 -20
  8. package/{agentRuntimeLocal-PR67XWQK.js → agentRuntimeLocal-C2KYWS6H.js} +8 -8
  9. package/{agentSlice-Y3NABOKT.js → agentSlice-N5RKI23B.js} +1 -1
  10. package/{chunk-TVQEB7RV.js → chunk-2VILMENT.js} +1 -1
  11. package/{chunk-B54KNGXI.js → chunk-5HANPK6S.js} +3 -3
  12. package/{chunk-JCU2JDCV.js → chunk-6ADBTFFE.js} +15 -6
  13. package/{chunk-ZR4VHQ5D.js → chunk-6TISG7CK.js} +1 -1
  14. package/{chunk-CJIOTRWY.js → chunk-6VDWNLHX.js} +2 -2
  15. package/{chunk-FHTPQXHP.js → chunk-7HV5OHEM.js} +1 -1
  16. package/{chunk-OILEWBXT.js → chunk-7TNQ4ZZL.js} +1 -1
  17. package/{chunk-45JUQTYY.js → chunk-AS3ZQ3O2.js} +0 -17
  18. package/{chunk-G5S6HMHH.js → chunk-B2Z7OJBT.js} +8 -8
  19. package/{chunk-5DVIMRVT.js → chunk-B4KT7RN2.js} +4 -4
  20. package/{chunk-UJ5L6X7H.js → chunk-ELYHT6P6.js} +1 -1
  21. package/{chunk-MCXQFHBX.js → chunk-FF7Y6DC4.js} +13 -13
  22. package/{chunk-DFGCBRIA.js → chunk-I6IVZIIO.js} +9 -9
  23. package/{chunk-XRFEX5ZP.js → chunk-ISZEBXEV.js} +1 -1
  24. package/{chunk-YC2MRILU.js → chunk-J6PV7OYE.js} +2 -2
  25. package/{chunk-OCDEWRE2.js → chunk-JKWWVF2I.js} +1 -1
  26. package/{chunk-Z6ZZXQOZ.js → chunk-KJTP7JTN.js} +1 -1
  27. package/{chunk-TZS6YZTS.js → chunk-MRX4BSKQ.js} +15 -12
  28. package/{chunk-TNQJQ6HM.js → chunk-NIU4ERVM.js} +18 -24
  29. package/{chunk-S73OEOHH.js → chunk-NKD3Q4RN.js} +1 -1
  30. package/{chunk-A4QALINN.js → chunk-NRJFU6WZ.js} +2 -2
  31. package/{chunk-S3UTETIC.js → chunk-OGGHETUE.js} +19 -4
  32. package/{chunk-QY4QCWDL.js → chunk-OLKX3NZI.js} +2 -2
  33. package/{chunk-FMT767NK.js → chunk-OSGJQTG6.js} +15 -10
  34. package/{chunk-FW4SQ6II.js → chunk-RFRU3HAL.js} +1 -1
  35. package/{chunk-74D2NYOA.js → chunk-RGJFQERV.js} +3 -3
  36. package/{chunk-RNYKVIND.js → chunk-WMU5EZLC.js} +4 -4
  37. package/{chunk-TSKWE74T.js → chunk-WO24IT3V.js} +1 -1
  38. package/{chunk-4GBNEA5B.js → chunk-Y3BLUPNS.js} +1 -1
  39. package/{chunk-324SDMXK.js → chunk-Y3COB2JR.js} +1 -1
  40. package/{createAgentAutomationAction-YWC4P6JX.js → createAgentAutomationAction-NNXHZFSA.js} +4 -4
  41. package/{createDialogAction-IQP745JA.js → createDialogAction-TQCW67HG.js} +5 -5
  42. package/{createPageAction-T4RZCJKF.js → createPageAction-QUFKG6A2.js} +4 -4
  43. package/{dialogCommands-BTHTTSE2.js → dialogCommands-C6ERN2I7.js} +12 -12
  44. package/{dialogSlice-QR7SDOEV.js → dialogSlice-DAA3CWOV.js} +4 -4
  45. package/{docCreateCommands-PQEX44Q7.js → docCreateCommands-KMYVYGZM.js} +11 -11
  46. package/{docDeleteCommands-B3Q2M42N.js → docDeleteCommands-DZHIJA5D.js} +12 -12
  47. package/{docReadCommands-RCUVTX3Q.js → docReadCommands-VLJFYLR2.js} +11 -11
  48. package/{docStore-Y43RC35L.js → docStore-67RBJMFZ.js} +5 -5
  49. package/{docUpdateCommands-NS5QAUAJ.js → docUpdateCommands-GOHV5JC5.js} +11 -11
  50. package/{getPricing-6TOZXPAU.js → getPricing-UGDJHI7M.js} +2 -2
  51. package/{handleSendMessageAction-L7L463O4.js → handleSendMessageAction-7PNLNSPL.js} +4 -4
  52. package/index.js +36 -36
  53. package/{machineCommands-KJZXH2FO.js → machineCommands-J7FIVAZV.js} +18 -18
  54. package/{machineWsRunDispatch-V4HBAZY6.js → machineWsRunDispatch-RWXFY6YG.js} +18 -18
  55. package/package.json +1 -1
  56. package/{readlineWorkspace-LRPVHBM3.js → readlineWorkspace-EMKKVMNH.js} +69 -49
  57. package/{runAgentClientLoop-DXNOTYXP.js → runAgentClientLoop-VTA6RAHT.js} +13 -13
  58. package/{skillDiscovery-SZEA7TH6.js → skillDiscovery-6M2BZUFN.js} +1 -1
  59. package/{spaceCommands-VTJYPRFQ.js → spaceCommands-HLOEZVOV.js} +11 -11
  60. package/{spaceSlice-PSAREO5S.js → spaceSlice-2X2TVI2V.js} +6 -4
  61. package/{streamAgentChatTurn-54CNCH2V.js → streamAgentChatTurn-GFQ4YRJF.js} +39 -16
  62. package/{tools-SIU3JFHL.js → tools-PR47LTGM.js} +8 -8
  63. package/{tuiSummaryLlmCaller-TXLF4MEI.js → tuiSummaryLlmCaller-YEHSPGXZ.js} +3 -3
  64. package/{updateDialogTitleAction-3VT7R3GN.js → updateDialogTitleAction-4GI3W4LJ.js} +4 -4
@@ -3,7 +3,7 @@ import {
3
3
  normalizeDialogRecord,
4
4
  readDialogSnapshot,
5
5
  sortDialogs
6
- } from "./chunk-Z6ZZXQOZ.js";
6
+ } from "./chunk-KJTP7JTN.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-TNQJQ6HM.js";
60
+ } from "./chunk-NIU4ERVM.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-CJIOTRWY.js";
68
+ } from "./chunk-6VDWNLHX.js";
69
69
  import "./chunk-ID4G2MAR.js";
70
70
  import {
71
71
  listUserRecordsFromServers
72
- } from "./chunk-OILEWBXT.js";
72
+ } from "./chunk-7TNQ4ZZL.js";
73
73
  import {
74
74
  createCliLocalRuntimeAdapter,
75
75
  initCliLocale,
76
76
  parseCliLocale,
77
77
  setCliLocale,
78
78
  t
79
- } from "./chunk-MCXQFHBX.js";
79
+ } from "./chunk-FF7Y6DC4.js";
80
80
  import "./chunk-TOILAPLH.js";
81
81
  import "./chunk-CMKUBIGW.js";
82
82
  import "./chunk-JBTJAPUF.js";
@@ -86,8 +86,8 @@ import {
86
86
  import {
87
87
  queryUserRecords,
88
88
  readDbRecord
89
- } from "./chunk-FW4SQ6II.js";
90
- import "./chunk-XRFEX5ZP.js";
89
+ } from "./chunk-RFRU3HAL.js";
90
+ import "./chunk-ISZEBXEV.js";
91
91
  import {
92
92
  resolveCliAgentKeyInput
93
93
  } from "./chunk-VHBWHNVT.js";
@@ -97,11 +97,11 @@ import "./chunk-ATNTHIZI.js";
97
97
  import "./chunk-JEXVIMYZ.js";
98
98
  import {
99
99
  prepareTools
100
- } from "./chunk-YC2MRILU.js";
101
- import "./chunk-4GBNEA5B.js";
100
+ } from "./chunk-J6PV7OYE.js";
101
+ import "./chunk-Y3BLUPNS.js";
102
102
  import {
103
103
  expandEnabledPacks
104
- } from "./chunk-TZS6YZTS.js";
104
+ } from "./chunk-MRX4BSKQ.js";
105
105
  import "./chunk-RQSOAMPJ.js";
106
106
  import "./chunk-OOIN7HSO.js";
107
107
  import "./chunk-KQHGZWSV.js";
@@ -110,49 +110,49 @@ 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-QY4QCWDL.js";
114
- import "./chunk-324SDMXK.js";
113
+ import "./chunk-OLKX3NZI.js";
114
+ import "./chunk-Y3COB2JR.js";
115
115
  import "./chunk-VC6OZXO5.js";
116
116
  import "./chunk-OWOHNGCN.js";
117
117
  import {
118
118
  extractReferenceKeysFromMessage
119
- } from "./chunk-FMT767NK.js";
119
+ } from "./chunk-OSGJQTG6.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-74D2NYOA.js";
126
+ import "./chunk-RGJFQERV.js";
127
127
  import "./chunk-6LMFFG3K.js";
128
128
  import "./chunk-Z4NR32XR.js";
129
129
  import "./chunk-M76ECQRD.js";
130
130
  import {
131
131
  buildSkillDiscoveryContextBlock
132
- } from "./chunk-45JUQTYY.js";
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-RNYKVIND.js";
138
+ } from "./chunk-WMU5EZLC.js";
139
139
  import "./chunk-ZNFJWEN4.js";
140
- import "./chunk-ZR4VHQ5D.js";
140
+ import "./chunk-6TISG7CK.js";
141
141
  import "./chunk-NCGFB7NN.js";
142
142
  import {
143
143
  readCommandActionGatePayload,
144
144
  resolveAgentImageInputSupport
145
- } from "./chunk-JCU2JDCV.js";
145
+ } from "./chunk-6ADBTFFE.js";
146
146
  import "./chunk-OPZYGHUC.js";
147
147
  import {
148
148
  buildCurrentTimeBlock,
149
149
  buildIdentityBlock,
150
150
  buildRuntimeGuidanceBlocks
151
- } from "./chunk-FHTPQXHP.js";
152
- import "./chunk-TSKWE74T.js";
151
+ } from "./chunk-7HV5OHEM.js";
152
+ import "./chunk-WO24IT3V.js";
153
153
  import {
154
154
  canonicalizeToolNames
155
- } from "./chunk-5DVIMRVT.js";
155
+ } from "./chunk-B4KT7RN2.js";
156
156
  import {
157
157
  DEFAULT_CONTEXT_WINDOW,
158
158
  clipCompactText,
@@ -160,8 +160,8 @@ import {
160
160
  getModelContextWindow,
161
161
  planCompression,
162
162
  serializeMessageContent
163
- } from "./chunk-S73OEOHH.js";
164
- import "./chunk-S3UTETIC.js";
163
+ } from "./chunk-NKD3Q4RN.js";
164
+ import "./chunk-OGGHETUE.js";
165
165
  import "./chunk-PDL2AV3E.js";
166
166
  import "./chunk-JZPBVBIY.js";
167
167
  import "./chunk-BYXBJQAS.js";
@@ -1070,6 +1070,27 @@ function createInitialAskChoiceState(questions) {
1070
1070
  };
1071
1071
  }
1072
1072
  function askChoiceReducer(state, action) {
1073
+ if (action.type === "HYDRATE_QUESTIONS") {
1074
+ if (state.phase !== "active") return state;
1075
+ const newQuestions = action.questions;
1076
+ if (newQuestions.length <= state.questionStates.length) {
1077
+ if (newQuestions.length === state.questions.length) return state;
1078
+ return { ...state, questions: newQuestions };
1079
+ }
1080
+ const appended = newQuestions.slice(state.questionStates.length).map(() => ({
1081
+ cursorIndex: 0,
1082
+ selectedIds: [],
1083
+ pickedId: null,
1084
+ otherText: "",
1085
+ otherFocused: false
1086
+ }));
1087
+ return {
1088
+ ...state,
1089
+ questions: newQuestions,
1090
+ questionStates: [...state.questionStates, ...appended],
1091
+ activeIndex: Math.min(state.activeIndex, newQuestions.length - 1)
1092
+ };
1093
+ }
1073
1094
  if (state.phase !== "active") return state;
1074
1095
  switch (action.type) {
1075
1096
  case "CANCEL":
@@ -4967,7 +4988,7 @@ async function startTuiWorkspace(options) {
4967
4988
  if (fixedInput.active && !fixedInput.isPaused()) {
4968
4989
  output.write("\x1B[?2026h\x1B[?25l");
4969
4990
  try {
4970
- fixedInput.repaint(buffer);
4991
+ fixedInput.repaint(buffer, cursorPos);
4971
4992
  } finally {
4972
4993
  output.write("\x1B[?25h\x1B[?2026l");
4973
4994
  }
@@ -4985,7 +5006,7 @@ async function startTuiWorkspace(options) {
4985
5006
  fixedInput.resumeFromDialog();
4986
5007
  flushPendingRender();
4987
5008
  renderHistoryToOutput();
4988
- fixedInput.repaint(buffer);
5009
+ fixedInput.repaint(buffer, cursorPos);
4989
5010
  },
4990
5011
  getInputLines: () => fixedInput.getInputLines(),
4991
5012
  isPaused: () => fixedInput.isPaused()
@@ -5010,7 +5031,7 @@ async function startTuiWorkspace(options) {
5010
5031
  output.write("\x1B[?2026h\x1B[?25l");
5011
5032
  try {
5012
5033
  renderHistory(output, history, fixedInput.getInputLines());
5013
- if (fixedInput.active) fixedInput.repaint(buffer);
5034
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5014
5035
  } finally {
5015
5036
  output.write("\x1B[?25h\x1B[?2026l");
5016
5037
  }
@@ -5074,7 +5095,7 @@ ${t("copyViewHint")}
5074
5095
  fixedInput.resumeFromDialog();
5075
5096
  flushPendingRender();
5076
5097
  renderHistoryToOutput();
5077
- fixedInput.repaint(buffer);
5098
+ fixedInput.repaint(buffer, cursorPos);
5078
5099
  }
5079
5100
  return true;
5080
5101
  };
@@ -5089,7 +5110,7 @@ ${t("copyViewHint")}
5089
5110
  appendToCurrentTurn(history, message);
5090
5111
  finalizeCurrentTurn(history);
5091
5112
  renderHistoryToOutput();
5092
- if (fixedInput.active) fixedInput.repaint(buffer);
5113
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5093
5114
  startTurn(history, "assistant");
5094
5115
  const agentOutput = isInteractiveInput(input) ? createHistoryOutputStream(history, () => {
5095
5116
  scheduleRender();
@@ -5155,7 +5176,7 @@ ${t("copyViewHint")}
5155
5176
  finalizeCurrentTurn(history);
5156
5177
  flushPendingRender();
5157
5178
  renderHistoryToOutput();
5158
- if (fixedInput.active) fixedInput.repaint(buffer);
5179
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5159
5180
  }
5160
5181
  if (wasAborted) {
5161
5182
  if (runResult.pendingToolName) {
@@ -5215,7 +5236,7 @@ ${t("copyViewHint")}
5215
5236
  appendToCurrentTurn(history, text);
5216
5237
  finalizeCurrentTurn(history);
5217
5238
  renderHistoryToOutput();
5218
- if (fixedInput.active) fixedInput.repaint(buffer);
5239
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5219
5240
  };
5220
5241
  const runSubmittedLine = async (line, actionGateHandler, confirmDestructiveAction) => {
5221
5242
  if (!line.trim()) return false;
@@ -5229,7 +5250,7 @@ ${t("copyViewHint")}
5229
5250
  appendToCurrentTurn(history, line.trim());
5230
5251
  finalizeCurrentTurn(history);
5231
5252
  renderHistoryToOutput();
5232
- if (fixedInput.active) fixedInput.repaint(buffer);
5253
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5233
5254
  }
5234
5255
  if (result.output) {
5235
5256
  emitCommandOutput(result.output);
@@ -5372,7 +5393,7 @@ ${t("copyViewHint")}
5372
5393
  leaveAltScreen(output);
5373
5394
  }
5374
5395
  renderHistoryToOutput();
5375
- fixedInput.repaint(buffer);
5396
+ fixedInput.repaint(buffer, cursorPos);
5376
5397
  }
5377
5398
  if (result.action?.type === "copy-view") {
5378
5399
  const opened = await openCopyView();
@@ -5546,7 +5567,7 @@ ${stderrText.trim()}
5546
5567
  ${err.message}` : ""}`
5547
5568
  );
5548
5569
  }
5549
- if (fixedInput.active) fixedInput.repaint(buffer);
5570
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5550
5571
  }
5551
5572
  return false;
5552
5573
  };
@@ -5556,7 +5577,6 @@ ${err.message}` : ""}`
5556
5577
  let busy = false;
5557
5578
  let done = false;
5558
5579
  let resolveDone = null;
5559
- let cursorPos2 = 0;
5560
5580
  fixedInput = createFixedInput(output, {
5561
5581
  getStatusLine: () => {
5562
5582
  let base = renderStatusLine(state);
@@ -5600,13 +5620,13 @@ ${err.message}` : ""}`
5600
5620
  fixedInput.init();
5601
5621
  const paintFrame = (draft) => {
5602
5622
  renderHistoryToOutput();
5603
- fixedInput.repaint(draft, cursorPos2);
5623
+ fixedInput.repaint(draft, cursorPos);
5604
5624
  };
5605
5625
  const onResize = () => {
5606
5626
  if (done || copyViewExitResolver) return;
5607
5627
  if (fixedInput.isPaused()) {
5608
5628
  renderHistory(output, history, fixedInput.getInputLines());
5609
- fixedInput.repaint(buffer, cursorPos2);
5629
+ fixedInput.repaint(buffer, cursorPos);
5610
5630
  return;
5611
5631
  }
5612
5632
  flushPendingRender();
@@ -5661,7 +5681,7 @@ ${err.message}` : ""}`
5661
5681
  emitCommandOutput(t("forceStopped"));
5662
5682
  flushPendingRender();
5663
5683
  renderHistoryToOutput();
5664
- if (fixedInput.active) fixedInput.repaint(buffer);
5684
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5665
5685
  return;
5666
5686
  }
5667
5687
  const stopBinding = chatQueueBinding;
@@ -5672,7 +5692,7 @@ ${err.message}` : ""}`
5672
5692
  activeTurnAbort.abort();
5673
5693
  return;
5674
5694
  }
5675
- const result = applyTuiInputKey(buffer, sequence, {}, cursorPos2, {
5695
+ const result = applyTuiInputKey(buffer, sequence, {}, cursorPos, {
5676
5696
  pasteStore
5677
5697
  });
5678
5698
  if (result.copyView) {
@@ -5724,8 +5744,8 @@ ${hint}` : hint;
5724
5744
  }
5725
5745
  releaseCollapsedPasteReferences(submittedText, pasteStore);
5726
5746
  buffer = "";
5727
- cursorPos2 = 0;
5728
- if (fixedInput.active) fixedInput.repaint(buffer, cursorPos2);
5747
+ cursorPos = 0;
5748
+ if (fixedInput.active) fixedInput.repaint(buffer, cursorPos);
5729
5749
  return;
5730
5750
  }
5731
5751
  const binding = ensureChatQueueBinding(
@@ -5766,8 +5786,8 @@ ${hint}` : hint;
5766
5786
  if (decision.kind === "queue-text") {
5767
5787
  binding.enqueue(decision.text);
5768
5788
  buffer = "";
5769
- cursorPos2 = 0;
5770
- fixedInput.repaint(buffer, cursorPos2);
5789
+ cursorPos = 0;
5790
+ fixedInput.repaint(buffer, cursorPos);
5771
5791
  } else if (decision.kind === "queue-blocked") {
5772
5792
  } else if (decision.kind === "noop" && !submittedText.trim() && binding.queueLength() > 0) {
5773
5793
  if (binding.preemptForDrain()) {
@@ -5813,7 +5833,7 @@ ${hint}` : hint;
5813
5833
  if (drainedText !== null) {
5814
5834
  busy = true;
5815
5835
  buffer = "";
5816
- cursorPos2 = 0;
5836
+ cursorPos = 0;
5817
5837
  fixedInput.enterOutputMode(drainedText);
5818
5838
  try {
5819
5839
  const outcome = await runOneAgentTurn(
@@ -5834,13 +5854,13 @@ ${err.message}` : ""}`
5834
5854
  }
5835
5855
  refreshGitStatus();
5836
5856
  flushPendingRender();
5837
- fixedInput.exitOutputMode(buffer, cursorPos2);
5857
+ fixedInput.exitOutputMode(buffer, cursorPos);
5838
5858
  return;
5839
5859
  }
5840
5860
  }
5841
5861
  busy = startsChatTurn;
5842
5862
  buffer = "";
5843
- cursorPos2 = 0;
5863
+ cursorPos = 0;
5844
5864
  fixedInput.enterOutputMode(submittedText);
5845
5865
  let shouldExit = false;
5846
5866
  try {
@@ -5886,19 +5906,19 @@ ${err.message}` : ""}`
5886
5906
  }
5887
5907
  refreshGitStatus();
5888
5908
  flushPendingRender();
5889
- fixedInput.exitOutputMode(buffer, cursorPos2);
5909
+ fixedInput.exitOutputMode(buffer, cursorPos);
5890
5910
  return;
5891
5911
  }
5892
5912
  buffer = result.buffer;
5893
- cursorPos2 = result.cursorPos ?? buffer.length;
5894
- fixedInput.repaint(buffer, cursorPos2);
5913
+ cursorPos = result.cursorPos ?? buffer.length;
5914
+ fixedInput.repaint(buffer, cursorPos);
5895
5915
  };
5896
5916
  const onData = createRawInputDecoder((token) => {
5897
5917
  void handleInputToken(token);
5898
5918
  });
5899
5919
  try {
5900
5920
  input.on("data", onData);
5901
- fixedInput.repaint(buffer, cursorPos2);
5921
+ fixedInput.repaint(buffer, cursorPos);
5902
5922
  refreshGitStatus();
5903
5923
  await new Promise((resolve2) => {
5904
5924
  resolveDone = resolve2;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  fetchAgentContexts
3
- } from "./chunk-TVQEB7RV.js";
3
+ } from "./chunk-2VILMENT.js";
4
4
  import {
5
5
  generateRequestBody,
6
6
  mergeReferences,
7
7
  performFetchRequest
8
- } from "./chunk-DFGCBRIA.js";
9
- import "./chunk-4GBNEA5B.js";
8
+ } from "./chunk-I6IVZIIO.js";
9
+ import "./chunk-Y3BLUPNS.js";
10
10
  import {
11
11
  findToolExecutor,
12
12
  getToolResultErrorData
13
- } from "./chunk-TZS6YZTS.js";
13
+ } from "./chunk-MRX4BSKQ.js";
14
14
  import "./chunk-RQSOAMPJ.js";
15
15
  import "./chunk-OOIN7HSO.js";
16
16
  import "./chunk-KQHGZWSV.js";
@@ -19,30 +19,30 @@ import "./chunk-3LY4F7SV.js";
19
19
  import "./chunk-VP4WJWKW.js";
20
20
  import "./chunk-63W5N6P3.js";
21
21
  import "./chunk-VF4K2QE6.js";
22
- import "./chunk-QY4QCWDL.js";
23
- import "./chunk-324SDMXK.js";
22
+ import "./chunk-OLKX3NZI.js";
23
+ import "./chunk-Y3COB2JR.js";
24
24
  import "./chunk-VC6OZXO5.js";
25
25
  import {
26
26
  updateTokensAction
27
- } from "./chunk-FMT767NK.js";
27
+ } from "./chunk-OSGJQTG6.js";
28
28
  import "./chunk-V2J635L5.js";
29
29
  import "./chunk-MRC4Q34M.js";
30
30
  import "./chunk-MTU75CZ2.js";
31
31
  import "./chunk-CWMSB67P.js";
32
- import "./chunk-74D2NYOA.js";
32
+ import "./chunk-RGJFQERV.js";
33
33
  import "./chunk-6LMFFG3K.js";
34
34
  import "./chunk-Z4NR32XR.js";
35
35
  import "./chunk-M76ECQRD.js";
36
36
  import "./chunk-WZSRQNQG.js";
37
- import "./chunk-FHTPQXHP.js";
38
- import "./chunk-TSKWE74T.js";
37
+ import "./chunk-7HV5OHEM.js";
38
+ import "./chunk-WO24IT3V.js";
39
39
  import {
40
40
  canonicalizeToolName
41
- } from "./chunk-5DVIMRVT.js";
42
- import "./chunk-S73OEOHH.js";
41
+ } from "./chunk-B4KT7RN2.js";
42
+ import "./chunk-NKD3Q4RN.js";
43
43
  import {
44
44
  getApiEndpoint
45
- } from "./chunk-S3UTETIC.js";
45
+ } from "./chunk-OGGHETUE.js";
46
46
  import "./chunk-PDL2AV3E.js";
47
47
  import "./chunk-JZPBVBIY.js";
48
48
  import "./chunk-BYXBJQAS.js";
@@ -3,7 +3,7 @@ import {
3
3
  discoverSkills,
4
4
  parseSkillFrontmatter,
5
5
  resolveSkillByName
6
- } from "./chunk-45JUQTYY.js";
6
+ } from "./chunk-AS3ZQ3O2.js";
7
7
  import "./chunk-WZSRQNQG.js";
8
8
  import "./chunk-QLUFR47U.js";
9
9
  import "./chunk-KKY4B2Q2.js";
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  readLiveDbRecordAfterTombstoneMerge
3
- } from "./chunk-OILEWBXT.js";
3
+ } from "./chunk-7TNQ4ZZL.js";
4
4
  import {
5
5
  readDbRecord,
6
6
  writeAgentRecord
7
- } from "./chunk-FW4SQ6II.js";
8
- import "./chunk-XRFEX5ZP.js";
7
+ } from "./chunk-RFRU3HAL.js";
8
+ import "./chunk-ISZEBXEV.js";
9
9
  import "./chunk-VHBWHNVT.js";
10
10
  import "./chunk-KQHGZWSV.js";
11
11
  import {
12
12
  authRoutes
13
13
  } from "./chunk-MRC4Q34M.js";
14
- import "./chunk-RNYKVIND.js";
14
+ import "./chunk-WMU5EZLC.js";
15
15
  import "./chunk-ZNFJWEN4.js";
16
- import "./chunk-ZR4VHQ5D.js";
16
+ import "./chunk-6TISG7CK.js";
17
17
  import "./chunk-NCGFB7NN.js";
18
- import "./chunk-JCU2JDCV.js";
18
+ import "./chunk-6ADBTFFE.js";
19
19
  import "./chunk-OPZYGHUC.js";
20
- import "./chunk-FHTPQXHP.js";
21
- import "./chunk-TSKWE74T.js";
22
- import "./chunk-5DVIMRVT.js";
23
- import "./chunk-S73OEOHH.js";
24
- import "./chunk-S3UTETIC.js";
20
+ import "./chunk-7HV5OHEM.js";
21
+ import "./chunk-WO24IT3V.js";
22
+ import "./chunk-B4KT7RN2.js";
23
+ import "./chunk-NKD3Q4RN.js";
24
+ import "./chunk-OGGHETUE.js";
25
25
  import "./chunk-PDL2AV3E.js";
26
26
  import "./chunk-JZPBVBIY.js";
27
27
  import "./chunk-BYXBJQAS.js";
@@ -33,6 +33,7 @@ import {
33
33
  selectIsCategoryCollapsed,
34
34
  selectIsDialogUnread,
35
35
  selectIsDialogUnreadFromEntity,
36
+ selectMemberSpacesLoaded,
36
37
  selectMembershipStatus,
37
38
  selectOwnedMemberSpaces,
38
39
  selectSpaceInitialized,
@@ -50,17 +51,17 @@ import {
50
51
  updateContentTitle,
51
52
  updateSpace,
52
53
  uploadAndAddFileToSpace
53
- } from "./chunk-FMT767NK.js";
54
+ } from "./chunk-OSGJQTG6.js";
54
55
  import "./chunk-V2J635L5.js";
55
56
  import "./chunk-MRC4Q34M.js";
56
57
  import "./chunk-MTU75CZ2.js";
57
58
  import "./chunk-CWMSB67P.js";
58
- import "./chunk-74D2NYOA.js";
59
+ import "./chunk-RGJFQERV.js";
59
60
  import "./chunk-6LMFFG3K.js";
60
61
  import "./chunk-Z4NR32XR.js";
61
62
  import "./chunk-M76ECQRD.js";
62
- import "./chunk-S73OEOHH.js";
63
- import "./chunk-S3UTETIC.js";
63
+ import "./chunk-NKD3Q4RN.js";
64
+ import "./chunk-OGGHETUE.js";
64
65
  import "./chunk-PDL2AV3E.js";
65
66
  import "./chunk-JZPBVBIY.js";
66
67
  import "./chunk-BYXBJQAS.js";
@@ -129,6 +130,7 @@ export {
129
130
  selectIsCategoryCollapsed,
130
131
  selectIsDialogUnread,
131
132
  selectIsDialogUnreadFromEntity,
133
+ selectMemberSpacesLoaded,
132
134
  selectMembershipStatus,
133
135
  selectOwnedMemberSpaces,
134
136
  selectSpaceInitialized,
@@ -20,11 +20,11 @@ import {
20
20
  sanitizeOutboundResponsesInput,
21
21
  sendOpenAICompletionsRequest,
22
22
  updateTotalUsage
23
- } from "./chunk-G5S6HMHH.js";
23
+ } from "./chunk-B2Z7OJBT.js";
24
24
  import "./chunk-JEXVIMYZ.js";
25
25
  import {
26
26
  prepareTools
27
- } from "./chunk-YC2MRILU.js";
27
+ } from "./chunk-J6PV7OYE.js";
28
28
  import {
29
29
  fetchReferenceContents,
30
30
  generateRequestBody,
@@ -38,8 +38,8 @@ import {
38
38
  resolveToolsFromKeys,
39
39
  selectResponsesConversationState,
40
40
  updateResponsesConversationState
41
- } from "./chunk-DFGCBRIA.js";
42
- import "./chunk-4GBNEA5B.js";
41
+ } from "./chunk-I6IVZIIO.js";
42
+ import "./chunk-Y3BLUPNS.js";
43
43
  import {
44
44
  TOOL_PACKS,
45
45
  applyDefaultWebToolPacks,
@@ -50,7 +50,7 @@ import {
50
50
  getAllToolRuns,
51
51
  shouldBlockForGptPro,
52
52
  waitForAbortableDelay
53
- } from "./chunk-TZS6YZTS.js";
53
+ } from "./chunk-MRX4BSKQ.js";
54
54
  import "./chunk-RQSOAMPJ.js";
55
55
  import "./chunk-OOIN7HSO.js";
56
56
  import "./chunk-KQHGZWSV.js";
@@ -59,7 +59,7 @@ import {
59
59
  getModelPricing,
60
60
  getPrices,
61
61
  hasExplicitAgentPricing
62
- } from "./chunk-OCDEWRE2.js";
62
+ } from "./chunk-JKWWVF2I.js";
63
63
  import {
64
64
  getPublicImageAgentDefaultProfile,
65
65
  getPublicImageAgentMode
@@ -73,8 +73,8 @@ import "./chunk-63W5N6P3.js";
73
73
  import "./chunk-VF4K2QE6.js";
74
74
  import {
75
75
  getDocState
76
- } from "./chunk-QY4QCWDL.js";
77
- import "./chunk-324SDMXK.js";
76
+ } from "./chunk-OLKX3NZI.js";
77
+ import "./chunk-Y3COB2JR.js";
78
78
  import "./chunk-VC6OZXO5.js";
79
79
  import {
80
80
  PERSONALIZATION_DIALOG_CATEGORY,
@@ -97,12 +97,12 @@ import {
97
97
  selectTableRows,
98
98
  selectViewMode,
99
99
  updateTokens
100
- } from "./chunk-FMT767NK.js";
100
+ } from "./chunk-OSGJQTG6.js";
101
101
  import "./chunk-V2J635L5.js";
102
102
  import "./chunk-MRC4Q34M.js";
103
103
  import "./chunk-MTU75CZ2.js";
104
104
  import "./chunk-CWMSB67P.js";
105
- import "./chunk-74D2NYOA.js";
105
+ import "./chunk-RGJFQERV.js";
106
106
  import {
107
107
  createCliChatTurnStream,
108
108
  getCliChatSession,
@@ -119,30 +119,30 @@ import {
119
119
  import {
120
120
  projectToolMessageContent,
121
121
  resolveAgentImageInputSupport
122
- } from "./chunk-JCU2JDCV.js";
122
+ } from "./chunk-6ADBTFFE.js";
123
123
  import "./chunk-OPZYGHUC.js";
124
- import "./chunk-FHTPQXHP.js";
124
+ import "./chunk-7HV5OHEM.js";
125
125
  import {
126
126
  extractImagePartsFromResponseOutput,
127
127
  extractTextFromResponseOutput,
128
128
  toResponsesTools
129
- } from "./chunk-TSKWE74T.js";
129
+ } from "./chunk-WO24IT3V.js";
130
130
  import {
131
131
  canonicalizeToolNames,
132
132
  prioritizeToolNames,
133
133
  resolveRuntimeToolSurfaceForAgent
134
- } from "./chunk-5DVIMRVT.js";
134
+ } from "./chunk-B4KT7RN2.js";
135
135
  import {
136
136
  estimateTokenCount,
137
137
  getModelContextWindow,
138
138
  getModelInfo,
139
139
  planContextUsage
140
- } from "./chunk-S73OEOHH.js";
140
+ } from "./chunk-NKD3Q4RN.js";
141
141
  import {
142
142
  getApiEndpoint,
143
143
  getModelConfig,
144
144
  getProviderByModelName
145
- } from "./chunk-S3UTETIC.js";
145
+ } from "./chunk-OGGHETUE.js";
146
146
  import "./chunk-PDL2AV3E.js";
147
147
  import "./chunk-JZPBVBIY.js";
148
148
  import "./chunk-BYXBJQAS.js";
@@ -1500,6 +1500,29 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
1500
1500
  ...formatAppConstraintPacks(constraintPacks)
1501
1501
  ].join("\n");
1502
1502
  }
1503
+ if (targetKind === "local_preview") {
1504
+ const metadata = runtimeOptions?.editingTarget?.metadata;
1505
+ const selectedNode = metadata && typeof metadata === "object" && metadata.selectedNode && typeof metadata.selectedNode === "object" ? metadata.selectedNode : null;
1506
+ if (!selectedNode) return null;
1507
+ const readString = (key) => typeof selectedNode[key] === "string" ? selectedNode[key] : "";
1508
+ const tagName = readString("tagName") || "\u5143\u7D20";
1509
+ const cssPath = readString("cssPath");
1510
+ const noloLoc = readString("noloLoc");
1511
+ const textSnippet = readString("textSnippet");
1512
+ const outerHTMLSnippet = readString("outerHTMLSnippet");
1513
+ return [
1514
+ "\u5F53\u524D\u7F16\u8F91\u76EE\u6807\uFF1A\u672C\u5730\u5DE5\u4F5C\u533A\u91CC\u6B63\u5728\u9884\u89C8\u7684\u7F51\u9875\uFF08Local Preview\uFF09\u3002",
1515
+ `\u7528\u6237\u5728\u9884\u89C8\u4E2D\u9009\u4E2D\u4E86\u4E00\u4E2A\u5143\u7D20\uFF1A<${tagName}>\uFF0CCSS \u8DEF\u5F84\uFF1A${cssPath}${noloLoc ? `\uFF0C\u6E90\u7801\u4F4D\u7F6E\uFF1A${noloLoc}` : ""}\u3002`,
1516
+ `\u9009\u4E2D\u5143\u7D20\u7684 HTML \u7247\u6BB5\uFF08\u53EF\u80FD\u622A\u65AD\uFF09\uFF1A${outerHTMLSnippet}${textSnippet ? `\uFF1B\u53EF\u89C1\u6587\u672C\uFF1A${textSnippet}` : ""}\u3002`,
1517
+ "",
1518
+ "\u3010\u7ED9 AI \u7684\u64CD\u4F5C\u6307\u5357 / \u975E\u7528\u6237\u539F\u8BDD\u3011",
1519
+ "1. \u672C\u8F6E\u4FEE\u6539\u5FC5\u987B\u4EE5\u8FD9\u4E2A\u5143\u7D20\u4E3A\u4E2D\u5FC3\uFF1B\u5148\u5728\u672C\u5730\u5DE5\u4F5C\u533A\u6E90\u7801\u4E2D\u5B9A\u4F4D\u5230\u751F\u6210\u8FD9\u6BB5 HTML \u7684\u4EE3\u7801\uFF0C\u518D\u52A8\u624B\u3002",
1520
+ noloLoc ? "2. \u5DF2\u7ED9\u51FA\u6E90\u7801\u4F4D\u7F6E\uFF0C\u76F4\u63A5\u8BFB\u8BE5\u6587\u4EF6\u7684\u5BF9\u5E94\u884C\u8303\u56F4\u786E\u8BA4\uFF0C\u4E0D\u8981\u5168\u5C40\u641C\u7D22\u3002" : "2. \u6CA1\u6709\u6E90\u7801\u4F4D\u7F6E\u65F6\uFF0C\u7528 CSS \u8DEF\u5F84\u91CC\u7684\u7C7B\u540D\u3001\u53EF\u89C1\u6587\u672C\u6216 HTML \u7247\u6BB5\u641C\u7D22\u5DE5\u4F5C\u533A\u5B9A\u4F4D\uFF0C\u4E0D\u8981\u51ED\u731C\u6D4B\u6539\u52A8\u3002",
1521
+ "3. \u4FEE\u6539\u6536\u655B\u5728\u8BE5\u5143\u7D20\u53CA\u5176\u76F4\u63A5\u6837\u5F0F\u6765\u6E90\uFF08\u547D\u4E2D\u7684\u7EC4\u4EF6/\u7C7B/design token\uFF09\uFF1B\u4FDD\u6301\u672A\u547D\u4E2D\u7684\u6587\u4EF6\u4E0D\u53D8\u3002",
1522
+ "4. \u5982\u679C\u5B9A\u4F4D\u7ED3\u679C\u843D\u5728 node_modules \u6216\u6765\u81EA\u63A5\u53E3\u6570\u636E\uFF0C\u5148\u544A\u8BC9\u7528\u6237\u5B9E\u9645\u60C5\u51B5\uFF0C\u518D\u63D0\u51FA\u53EF\u884C\u7684\u6539\u6CD5\uFF0C\u4E0D\u8981\u786C\u6539\u3002",
1523
+ "5. \u5982\u679C\u6309 CSS \u8DEF\u5F84\u548C HTML \u7247\u6BB5\u627E\u4E0D\u5230\u5BF9\u5E94\u4F4D\u7F6E\uFF0C\u5148\u5411\u7528\u6237\u8BF4\u660E\u5E76\u8BF7\u5176\u91CD\u65B0\u9009\u62E9\u3002"
1524
+ ].join("\n");
1525
+ }
1503
1526
  if (targetKind === "image" || targetKind === "file") {
1504
1527
  const editingTarget = runtimeOptions?.editingTarget;
1505
1528
  const metadata = editingTarget?.metadata;