@funnycode/myclaude 0.1.190 → 0.1.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.190",
8
- BUILD_TIME: "2026-08-10T06:06:14.681Z",
7
+ VERSION: "0.1.191",
8
+ BUILD_TIME: "2026-08-10T09:03:17.944Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -117157,7 +117157,7 @@ var package_default;
117157
117157
  var init_package = __esm(() => {
117158
117158
  package_default = {
117159
117159
  name: "@funnycode/myclaude",
117160
- version: "0.1.190",
117160
+ version: "0.1.191",
117161
117161
  private: false,
117162
117162
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117163
117163
  license: "MIT",
@@ -418096,15 +418096,10 @@ function useSearchInput({
418096
418096
  setCursorOffset(newCursor.offset);
418097
418097
  }
418098
418098
  };
418099
- use_input_default((_input, _key, event) => {
418100
- handleKeyDown(new KeyboardEvent(event.keypress));
418101
- }, { isActive });
418102
418099
  return { query: query3, setQuery, cursorOffset, handleKeyDown };
418103
418100
  }
418104
418101
  var import_react104, UNHANDLED_SPECIAL_KEYS;
418105
418102
  var init_useSearchInput = __esm(() => {
418106
- init_keyboard_event();
418107
- init_ink2();
418108
418103
  init_Cursor();
418109
418104
  init_useTerminalSize();
418110
418105
  import_react104 = __toESM(require_react(), 1);
@@ -418198,7 +418193,8 @@ function Config({
418198
418193
  const {
418199
418194
  query: searchQuery,
418200
418195
  setQuery: setSearchQuery,
418201
- cursorOffset: searchCursorOffset
418196
+ cursorOffset: searchCursorOffset,
418197
+ handleKeyDown: searchHandleKeyDown
418202
418198
  } = useSearchInput({
418203
418199
  isActive: isSearchMode && showSubmenu === null && !headerFocused,
418204
418200
  onExit: () => setIsSearchMode(false),
@@ -419247,7 +419243,10 @@ function Config({
419247
419243
  width: "100%",
419248
419244
  tabIndex: 0,
419249
419245
  autoFocus: true,
419250
- onKeyDown: handleKeyDown,
419246
+ onKeyDown: (e) => {
419247
+ searchHandleKeyDown(e);
419248
+ handleKeyDown(e);
419249
+ },
419251
419250
  children: showSubmenu === "Theme" ? /* @__PURE__ */ jsx_dev_runtime174.jsxDEV(jsx_dev_runtime174.Fragment, {
419252
419251
  children: [
419253
419252
  /* @__PURE__ */ jsx_dev_runtime174.jsxDEV(ThemePicker, {
@@ -438989,7 +438988,8 @@ function DiscoverPlugins({
438989
438988
  const {
438990
438989
  query: searchQuery,
438991
438990
  setQuery: setSearchQuery,
438992
- cursorOffset: searchCursorOffset
438991
+ cursorOffset: searchCursorOffset,
438992
+ handleKeyDown: searchHandleKeyDown
438993
438993
  } = useSearchInput({
438994
438994
  isActive: viewState === "plugin-list" && isSearchMode && !loading,
438995
438995
  onExit: () => {
@@ -439500,6 +439500,9 @@ function DiscoverPlugins({
439500
439500
  const visiblePlugins = pagination.getVisibleItems(filteredPlugins);
439501
439501
  return /* @__PURE__ */ jsx_dev_runtime234.jsxDEV(ThemedBox_default, {
439502
439502
  flexDirection: "column",
439503
+ tabIndex: 0,
439504
+ autoFocus: true,
439505
+ onKeyDown: searchHandleKeyDown,
439503
439506
  children: [
439504
439507
  /* @__PURE__ */ jsx_dev_runtime234.jsxDEV(ThemedBox_default, {
439505
439508
  children: [
@@ -442889,7 +442892,8 @@ function ManagePlugins({
442889
442892
  const {
442890
442893
  query: searchQuery,
442891
442894
  setQuery: setSearchQuery,
442892
- cursorOffset: searchCursorOffset
442895
+ cursorOffset: searchCursorOffset,
442896
+ handleKeyDown: searchHandleKeyDown
442893
442897
  } = useSearchInput({
442894
442898
  isActive: viewState === "plugin-list" && isSearchMode,
442895
442899
  onExit: () => {
@@ -444671,6 +444675,9 @@ function ManagePlugins({
444671
444675
  const visibleItems = pagination.getVisibleItems(filteredItems);
444672
444676
  return /* @__PURE__ */ jsx_dev_runtime237.jsxDEV(ThemedBox_default, {
444673
444677
  flexDirection: "column",
444678
+ tabIndex: 0,
444679
+ autoFocus: true,
444680
+ onKeyDown: searchHandleKeyDown,
444674
444681
  children: [
444675
444682
  /* @__PURE__ */ jsx_dev_runtime237.jsxDEV(ThemedBox_default, {
444676
444683
  marginBottom: 1,
@@ -459342,7 +459349,8 @@ function LogSelector(t0) {
459342
459349
  const {
459343
459350
  query: searchQuery,
459344
459351
  setQuery: setSearchQuery,
459345
- cursorOffset: searchCursorOffset
459352
+ cursorOffset: searchCursorOffset,
459353
+ handleKeyDown: searchHandleKeyDown
459346
459354
  } = useSearchInput(t14);
459347
459355
  const deferredSearchQuery = import_react159.default.useDeferredValue(searchQuery);
459348
459356
  const [debouncedDeepSearchQuery, setDebouncedDeepSearchQuery] = import_react159.default.useState("");
@@ -460755,6 +460763,9 @@ function LogSelector(t0) {
460755
460763
  t72 = /* @__PURE__ */ jsx_dev_runtime266.jsxDEV(ThemedBox_default, {
460756
460764
  flexDirection: "column",
460757
460765
  height: t57,
460766
+ tabIndex: 0,
460767
+ autoFocus: true,
460768
+ onKeyDown: searchHandleKeyDown,
460758
460769
  children: [
460759
460770
  t58,
460760
460771
  t59,
@@ -470802,7 +470813,8 @@ function PermissionRuleList(t0) {
470802
470813
  const {
470803
470814
  query: searchQuery,
470804
470815
  setQuery: setSearchQuery,
470805
- cursorOffset: searchCursorOffset
470816
+ cursorOffset: searchCursorOffset,
470817
+ handleKeyDown: searchHandleKeyDown
470806
470818
  } = useSearchInput(t9);
470807
470819
  let t10;
470808
470820
  if ($3[18] !== isSearchMode || $3[19] !== isSearchModeActive || $3[20] !== setSearchQuery) {
@@ -471398,7 +471410,12 @@ function PermissionRuleList(t0) {
471398
471410
  if ($3[110] !== handleKeyDown || $3[111] !== t32) {
471399
471411
  t33 = /* @__PURE__ */ jsx_dev_runtime294.jsxDEV(ThemedBox_default, {
471400
471412
  flexDirection: "column",
471401
- onKeyDown: handleKeyDown,
471413
+ tabIndex: 0,
471414
+ autoFocus: true,
471415
+ onKeyDown: (e) => {
471416
+ searchHandleKeyDown(e);
471417
+ handleKeyDown(e);
471418
+ },
471402
471419
  children: t32
471403
471420
  }, undefined, false, undefined, this);
471404
471421
  $3[110] = handleKeyDown;
@@ -527358,9 +527375,6 @@ function useHistorySearch(onAcceptHistory, currentInput, onInputChange, onCursor
527358
527375
  handleCancel();
527359
527376
  }
527360
527377
  };
527361
- use_input_default((_input, _key, event) => {
527362
- handleKeyDown(new KeyboardEvent(event.keypress));
527363
- }, { isActive: isSearching });
527364
527378
  const searchHistoryRef = import_react238.useRef(searchHistory);
527365
527379
  searchHistoryRef.current = searchHistory;
527366
527380
  import_react238.useEffect(() => {
@@ -527383,8 +527397,6 @@ function useHistorySearch(onAcceptHistory, currentInput, onInputChange, onCursor
527383
527397
  var import_react238;
527384
527398
  var init_useHistorySearch = __esm(() => {
527385
527399
  init_history();
527386
- init_keyboard_event();
527387
- init_ink2();
527388
527400
  init_useKeybinding();
527389
527401
  import_react238 = __toESM(require_react(), 1);
527390
527402
  });
@@ -530551,13 +530563,6 @@ function useTypeahead({
530551
530563
  handleEnter();
530552
530564
  }
530553
530565
  };
530554
- use_input_default((_input, _key, event) => {
530555
- const kbEvent = new KeyboardEvent(event.keypress);
530556
- handleKeyDown(kbEvent);
530557
- if (kbEvent.didStopImmediatePropagation()) {
530558
- event.stopImmediatePropagation();
530559
- }
530560
- });
530561
530566
  return {
530562
530567
  suggestions,
530563
530568
  selectedSuggestion,
@@ -530576,8 +530581,6 @@ var init_useTypeahead = __esm(() => {
530576
530581
  init_dist5();
530577
530582
  init_commands2();
530578
530583
  init_overlayContext();
530579
- init_keyboard_event();
530580
- init_ink2();
530581
530584
  init_KeybindingContext();
530582
530585
  init_useKeybinding();
530583
530586
  init_useShortcutDisplay();
@@ -536162,7 +536165,8 @@ function PromptInput({
536162
536165
  historyQuery,
536163
536166
  setHistoryQuery,
536164
536167
  historyMatch,
536165
- historyFailedMatch
536168
+ historyFailedMatch,
536169
+ handleKeyDown: historySearchHandleKeyDown
536166
536170
  } = useHistorySearch((entry) => {
536167
536171
  setPastedContents(entry.pastedContents);
536168
536172
  onSubmit(entry.display);
@@ -536734,7 +536738,8 @@ function PromptInput({
536734
536738
  selectedSuggestion,
536735
536739
  commandArgumentHint,
536736
536740
  inlineGhostText,
536737
- maxColumnWidth
536741
+ maxColumnWidth,
536742
+ handleKeyDown: typeaheadHandleKeyDown
536738
536743
  } = useTypeahead({
536739
536744
  commands,
536740
536745
  onInputChange: trackAndSetInput,
@@ -536750,6 +536755,10 @@ function PromptInput({
536750
536755
  markAccepted,
536751
536756
  onModeChange
536752
536757
  });
536758
+ const promptInputKeyDown = (e) => {
536759
+ historySearchHandleKeyDown(e);
536760
+ typeaheadHandleKeyDown(e);
536761
+ };
536753
536762
  const showPromptSuggestion = mode === "prompt" && suggestions.length === 0 && promptSuggestion && !viewingAgentTaskId;
536754
536763
  if (showPromptSuggestion) {
536755
536764
  markShown();
@@ -537589,6 +537598,7 @@ function PromptInput({
537589
537598
  return /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(ThemedBox_default, {
537590
537599
  flexDirection: "column",
537591
537600
  marginTop: briefOwnsGap ? 0 : 1,
537601
+ onKeyDown: promptInputKeyDown,
537592
537602
  children: [
537593
537603
  !isFullscreenEnvEnabled() && /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(PromptInputQueuedCommands, {}, undefined, false, undefined, this),
537594
537604
  hasSuppressedDialogs && /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(ThemedBox_default, {
@@ -541042,15 +541052,10 @@ function useBackgroundTaskNavigation(options) {
541042
541052
  return;
541043
541053
  }
541044
541054
  };
541045
- use_input_default((_input, _key, event) => {
541046
- handleKeyDown(new KeyboardEvent(event.keypress));
541047
- });
541048
541055
  return { handleKeyDown };
541049
541056
  }
541050
541057
  var import_react275;
541051
541058
  var init_useBackgroundTaskNavigation = __esm(() => {
541052
- init_keyboard_event();
541053
- init_ink2();
541054
541059
  init_AppState();
541055
541060
  init_teammateViewHelpers();
541056
541061
  init_InProcessTeammateTask();
@@ -552537,7 +552542,8 @@ function TranscriptSearchBar({
552537
552542
  }) {
552538
552543
  const {
552539
552544
  query: query3,
552540
- cursorOffset
552545
+ cursorOffset,
552546
+ handleKeyDown: searchHandleKeyDown
552541
552547
  } = useSearchInput({
552542
552548
  isActive: true,
552543
552549
  initialQuery,
@@ -552587,6 +552593,9 @@ function TranscriptSearchBar({
552587
552593
  marginTop: 1,
552588
552594
  paddingLeft: 2,
552589
552595
  width: "100%",
552596
+ tabIndex: 0,
552597
+ autoFocus: true,
552598
+ onKeyDown: searchHandleKeyDown,
552590
552599
  noSelect: true,
552591
552600
  children: [
552592
552601
  /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedText, {
@@ -554874,6 +554883,9 @@ ${fileList}`);
554874
554883
  resetAnchor: () => {},
554875
554884
  interimRange: null
554876
554885
  };
554886
+ const { handleKeyDown: voiceHandleKeyDown } = {
554887
+ handleKeyDown: () => {}
554888
+ };
554877
554889
  useInboxPoller({
554878
554890
  enabled: isAgentSwarmsEnabled(),
554879
554891
  isLoading,
@@ -555088,9 +555100,13 @@ Note: ctrl + z now suspends myclaude, ctrl + _ undoes input.
555088
555100
  };
555089
555101
  const transcriptMessages = frozenTranscriptState ? deferredMessages.slice(0, frozenTranscriptState.messagesLength) : deferredMessages;
555090
555102
  const transcriptStreamingToolUses = frozenTranscriptState ? streamingToolUses.slice(0, frozenTranscriptState.streamingToolUsesLength) : streamingToolUses;
555091
- useBackgroundTaskNavigation({
555103
+ const { handleKeyDown: bgTaskHandleKeyDown } = useBackgroundTaskNavigation({
555092
555104
  onOpenBackgroundTasks: isShowingLocalJSXCommand ? undefined : () => setShowBashesDialog(true)
555093
555105
  });
555106
+ const replKeyDown = (e) => {
555107
+ bgTaskHandleKeyDown(e);
555108
+ voiceHandleKeyDown(e);
555109
+ };
555094
555110
  useTeammateViewAutoExit();
555095
555111
  if (screen === "transcript") {
555096
555112
  const transcriptScrollRef = isFullscreenEnvEnabled() && !disableVirtualScroll && !dumpMode ? scrollRef : undefined;
@@ -555124,85 +555140,89 @@ Note: ctrl + z now suspends myclaude, ctrl + _ undoes input.
555124
555140
  width: "100%",
555125
555141
  children: toolJSX.jsx
555126
555142
  }, undefined, false, undefined, this);
555127
- const transcriptReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(KeybindingSetup, {
555128
- children: [
555129
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AnimatedTerminalTitle, {
555130
- isAnimating: titleIsAnimating,
555131
- title: terminalTitle,
555132
- disabled: titleDisabled,
555133
- noPrefix: showStatusInTerminalTab
555134
- }, undefined, false, undefined, this),
555135
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(GlobalKeybindingHandlers, {
555136
- ...globalKeybindingProps
555137
- }, undefined, false, undefined, this),
555138
- null,
555139
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CommandKeybindingHandlers, {
555140
- onSubmit,
555141
- isActive: !toolJSX?.isLocalJSXCommand
555142
- }, undefined, false, undefined, this),
555143
- transcriptScrollRef ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ScrollKeybindingHandler, {
555144
- scrollRef,
555145
- isActive: focusedInputDialog !== "ultraplan-choice",
555146
- isModal: !searchOpen,
555147
- onScroll: () => jumpRef.current?.disarmSearch()
555148
- }, undefined, false, undefined, this) : null,
555149
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CancelRequestHandler, {
555150
- ...cancelRequestProps
555151
- }, undefined, false, undefined, this),
555152
- transcriptScrollRef ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FullscreenLayout, {
555153
- scrollRef,
555154
- scrollable: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555143
+ const transcriptReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555144
+ flexGrow: 1,
555145
+ flexDirection: "column",
555146
+ onKeyDown: replKeyDown,
555147
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(KeybindingSetup, {
555148
+ children: [
555149
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AnimatedTerminalTitle, {
555150
+ isAnimating: titleIsAnimating,
555151
+ title: terminalTitle,
555152
+ disabled: titleDisabled,
555153
+ noPrefix: showStatusInTerminalTab
555154
+ }, undefined, false, undefined, this),
555155
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(GlobalKeybindingHandlers, {
555156
+ ...globalKeybindingProps
555157
+ }, undefined, false, undefined, this),
555158
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CommandKeybindingHandlers, {
555159
+ onSubmit,
555160
+ isActive: !toolJSX?.isLocalJSXCommand
555161
+ }, undefined, false, undefined, this),
555162
+ transcriptScrollRef ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ScrollKeybindingHandler, {
555163
+ scrollRef,
555164
+ isActive: focusedInputDialog !== "ultraplan-choice",
555165
+ isModal: !searchOpen,
555166
+ onScroll: () => jumpRef.current?.disarmSearch()
555167
+ }, undefined, false, undefined, this) : null,
555168
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CancelRequestHandler, {
555169
+ ...cancelRequestProps
555170
+ }, undefined, false, undefined, this),
555171
+ transcriptScrollRef ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FullscreenLayout, {
555172
+ scrollRef,
555173
+ scrollable: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555174
+ children: [
555175
+ transcriptMessagesElement,
555176
+ transcriptToolJSX,
555177
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this)
555178
+ ]
555179
+ }, undefined, true, undefined, this),
555180
+ bottom: searchOpen ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptSearchBar, {
555181
+ jumpRef,
555182
+ initialQuery: "",
555183
+ count: searchCount,
555184
+ current: searchCurrent,
555185
+ onClose: (q2) => {
555186
+ setSearchQuery(searchCount > 0 ? q2 : "");
555187
+ setSearchOpen(false);
555188
+ if (!q2) {
555189
+ setSearchCount(0);
555190
+ setSearchCurrent(0);
555191
+ jumpRef.current?.setSearchQuery("");
555192
+ }
555193
+ },
555194
+ onCancel: () => {
555195
+ setSearchOpen(false);
555196
+ jumpRef.current?.setSearchQuery("");
555197
+ jumpRef.current?.setSearchQuery(searchQuery);
555198
+ setHighlight(searchQuery);
555199
+ },
555200
+ setHighlight
555201
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptModeFooter, {
555202
+ showAllInTranscript,
555203
+ virtualScroll: true,
555204
+ status: editorStatus || undefined,
555205
+ searchBadge: searchQuery && searchCount > 0 ? {
555206
+ current: searchCurrent,
555207
+ count: searchCount
555208
+ } : undefined
555209
+ }, undefined, false, undefined, this)
555210
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555155
555211
  children: [
555156
555212
  transcriptMessagesElement,
555157
555213
  transcriptToolJSX,
555158
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this)
555214
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this),
555215
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptModeFooter, {
555216
+ showAllInTranscript,
555217
+ virtualScroll: false,
555218
+ suppressShowAll: dumpMode,
555219
+ status: editorStatus || undefined
555220
+ }, undefined, false, undefined, this)
555159
555221
  ]
555160
- }, undefined, true, undefined, this),
555161
- bottom: searchOpen ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptSearchBar, {
555162
- jumpRef,
555163
- initialQuery: "",
555164
- count: searchCount,
555165
- current: searchCurrent,
555166
- onClose: (q2) => {
555167
- setSearchQuery(searchCount > 0 ? q2 : "");
555168
- setSearchOpen(false);
555169
- if (!q2) {
555170
- setSearchCount(0);
555171
- setSearchCurrent(0);
555172
- jumpRef.current?.setSearchQuery("");
555173
- }
555174
- },
555175
- onCancel: () => {
555176
- setSearchOpen(false);
555177
- jumpRef.current?.setSearchQuery("");
555178
- jumpRef.current?.setSearchQuery(searchQuery);
555179
- setHighlight(searchQuery);
555180
- },
555181
- setHighlight
555182
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptModeFooter, {
555183
- showAllInTranscript,
555184
- virtualScroll: true,
555185
- status: editorStatus || undefined,
555186
- searchBadge: searchQuery && searchCount > 0 ? {
555187
- current: searchCurrent,
555188
- count: searchCount
555189
- } : undefined
555190
- }, undefined, false, undefined, this)
555191
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555192
- children: [
555193
- transcriptMessagesElement,
555194
- transcriptToolJSX,
555195
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this),
555196
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptModeFooter, {
555197
- showAllInTranscript,
555198
- virtualScroll: false,
555199
- suppressShowAll: dumpMode,
555200
- status: editorStatus || undefined
555201
- }, undefined, false, undefined, this)
555202
- ]
555203
- }, undefined, true, undefined, this)
555204
- ]
555205
- }, undefined, true, undefined, this);
555222
+ }, undefined, true, undefined, this)
555223
+ ]
555224
+ }, undefined, true, undefined, this)
555225
+ }, undefined, false, undefined, this);
555206
555226
  if (transcriptScrollRef) {
555207
555227
  return /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AlternateScreen, {
555208
555228
  mouseTracking: isMouseTrackingEnabled(),
@@ -555230,576 +555250,580 @@ Note: ctrl + z now suspends myclaude, ctrl + _ undoes input.
555230
555250
  const companionVisible = !toolJSX?.shouldHidePromptInput && !focusedInputDialog && !showBashesDialog;
555231
555251
  const toolJsxCentered = isFullscreenEnvEnabled() && toolJSX?.isLocalJSXCommand === true;
555232
555252
  const centeredModal = toolJsxCentered ? toolJSX.jsx : null;
555233
- const mainReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(KeybindingSetup, {
555234
- children: [
555235
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AnimatedTerminalTitle, {
555236
- isAnimating: titleIsAnimating,
555237
- title: terminalTitle,
555238
- disabled: titleDisabled,
555239
- noPrefix: showStatusInTerminalTab
555240
- }, undefined, false, undefined, this),
555241
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(GlobalKeybindingHandlers, {
555242
- ...globalKeybindingProps
555243
- }, undefined, false, undefined, this),
555244
- null,
555245
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CommandKeybindingHandlers, {
555246
- onSubmit,
555247
- isActive: !toolJSX?.isLocalJSXCommand
555248
- }, undefined, false, undefined, this),
555249
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ScrollKeybindingHandler, {
555250
- scrollRef,
555251
- isActive: isFullscreenEnvEnabled() && (centeredModal != null || !focusedInputDialog || focusedInputDialog === "tool-permission"),
555252
- onScroll: centeredModal || toolPermissionOverlay || viewedAgentTask ? undefined : composedOnScroll
555253
- }, undefined, false, undefined, this),
555254
- null,
555255
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CancelRequestHandler, {
555256
- ...cancelRequestProps
555257
- }, undefined, false, undefined, this),
555258
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MCPConnectionManager, {
555259
- dynamicMcpConfig,
555260
- isStrictMcpConfig: strictMcpConfig,
555261
- children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FullscreenLayout, {
555253
+ const mainReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555254
+ flexGrow: 1,
555255
+ flexDirection: "column",
555256
+ onKeyDown: replKeyDown,
555257
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(KeybindingSetup, {
555258
+ children: [
555259
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AnimatedTerminalTitle, {
555260
+ isAnimating: titleIsAnimating,
555261
+ title: terminalTitle,
555262
+ disabled: titleDisabled,
555263
+ noPrefix: showStatusInTerminalTab
555264
+ }, undefined, false, undefined, this),
555265
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(GlobalKeybindingHandlers, {
555266
+ ...globalKeybindingProps
555267
+ }, undefined, false, undefined, this),
555268
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CommandKeybindingHandlers, {
555269
+ onSubmit,
555270
+ isActive: !toolJSX?.isLocalJSXCommand
555271
+ }, undefined, false, undefined, this),
555272
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ScrollKeybindingHandler, {
555262
555273
  scrollRef,
555263
- overlay: toolPermissionOverlay,
555264
- bottomFloat: companionVisible && !companionNarrow ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionFloatingBubble, {}, undefined, false, undefined, this) : undefined,
555265
- modal: centeredModal,
555266
- modalScrollRef,
555267
- dividerYRef,
555268
- hidePill: !!viewedAgentTask,
555269
- hideSticky: !!viewedTeammateTask,
555270
- newMessageCount: unseenDivider?.count ?? 0,
555271
- onPillClick: () => {
555272
- setCursor(null);
555273
- jumpToNew(scrollRef.current);
555274
- },
555275
- scrollable: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555276
- children: [
555277
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TeammateViewHeader, {}, undefined, false, undefined, this),
555278
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(Messages3, {
555279
- messages: displayedMessages,
555280
- tools,
555281
- commands,
555282
- verbose,
555283
- toolJSX,
555284
- toolUseConfirmQueue,
555285
- inProgressToolUseIDs: viewedTeammateTask ? viewedTeammateTask.inProgressToolUseIDs ?? new Set : inProgressToolUseIDs,
555286
- isMessageSelectorVisible,
555287
- conversationId,
555288
- screen,
555289
- streamingToolUses,
555290
- showAllInTranscript,
555291
- agentDefinitions,
555292
- onOpenRateLimitOptions: handleOpenRateLimitOptions,
555293
- isLoading,
555294
- streamingText: isLoading && !viewedAgentTask ? visibleStreamingText : null,
555295
- isBriefOnly: viewedAgentTask ? false : isBriefOnly,
555296
- unseenDivider: viewedAgentTask ? undefined : unseenDivider,
555297
- scrollRef: isFullscreenEnvEnabled() ? scrollRef : undefined,
555298
- trackStickyPrompt: isFullscreenEnvEnabled() ? true : undefined,
555299
- cursor,
555300
- setCursor,
555301
- cursorNavRef
555302
- }, undefined, false, undefined, this),
555303
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AwsAuthStatusBox, {}, undefined, false, undefined, this),
555304
- !disabled && placeholderText && !centeredModal && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(UserTextMessage, {
555305
- param: {
555306
- text: placeholderText,
555307
- type: "text"
555308
- },
555309
- addMargin: true,
555310
- verbose
555311
- }, undefined, false, undefined, this),
555312
- toolJSX && !(toolJSX.isLocalJSXCommand && toolJSX.isImmediate) && !toolJsxCentered && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555313
- flexDirection: "column",
555314
- width: "100%",
555315
- children: toolJSX.jsx
555316
- }, undefined, false, undefined, this),
555317
- false,
555318
- null,
555319
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555320
- flexGrow: 1
555321
- }, undefined, false, undefined, this),
555322
- showSpinner && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SpinnerWithVerb, {
555323
- mode: streamMode,
555324
- spinnerTip,
555325
- responseLengthRef,
555326
- apiMetricsRef: apiMetricsRef2,
555327
- overrideMessage: spinnerMessage,
555328
- spinnerSuffix: stopHookSpinnerSuffix,
555329
- verbose,
555330
- loadingStartTimeRef,
555331
- totalPausedMsRef,
555332
- pauseStartTimeRef,
555333
- overrideColor: spinnerColor,
555334
- overrideShimmerColor: spinnerShimmerColor,
555335
- hasActiveTools: inProgressToolUseIDs.size > 0,
555336
- leaderIsIdle: !isLoading
555337
- }, undefined, false, undefined, this),
555338
- !showSpinner && !isLoading && !userInputOnProcessing && !hasRunningTeammates && isBriefOnly && !viewedAgentTask && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(BriefIdleStatus, {}, undefined, false, undefined, this),
555339
- isFullscreenEnvEnabled() && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptInputQueuedCommands, {}, undefined, false, undefined, this)
555340
- ]
555341
- }, undefined, true, undefined, this),
555342
- bottom: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555343
- flexDirection: companionNarrow ? "column" : "row",
555344
- width: "100%",
555345
- alignItems: companionNarrow ? undefined : "flex-end",
555346
- children: [
555347
- companionNarrow && isFullscreenEnvEnabled() && companionVisible ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionSprite, {}, undefined, false, undefined, this) : null,
555348
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555349
- flexDirection: "column",
555350
- flexGrow: 1,
555351
- children: [
555352
- permissionStickyFooter,
555353
- toolJSX?.isLocalJSXCommand && toolJSX.isImmediate && !toolJsxCentered && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555354
- flexDirection: "column",
555355
- width: "100%",
555356
- children: toolJSX.jsx
555357
- }, undefined, false, undefined, this),
555358
- !showSpinner && !toolJSX?.isLocalJSXCommand && showExpandedTodos && tasksV2 && tasksV2.length > 0 && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555359
- width: "100%",
555360
- flexDirection: "column",
555361
- children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TaskListV2, {
555362
- tasks: tasksV2,
555363
- isStandalone: true
555364
- }, undefined, false, undefined, this)
555365
- }, undefined, false, undefined, this),
555366
- focusedInputDialog === "sandbox-permission" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxPermissionRequest, {
555367
- hostPattern: sandboxPermissionRequestQueue[0].hostPattern,
555368
- onUserResponse: (response) => {
555369
- const {
555370
- allow,
555371
- persistToSettings
555372
- } = response;
555373
- const currentRequest = sandboxPermissionRequestQueue[0];
555374
- if (!currentRequest)
555375
- return;
555376
- const approvedHost = currentRequest.hostPattern.host;
555377
- if (persistToSettings) {
555378
- const update = {
555379
- type: "addRules",
555380
- rules: [{
555381
- toolName: WEB_FETCH_TOOL_NAME,
555382
- ruleContent: `domain:${approvedHost}`
555383
- }],
555384
- behavior: allow ? "allow" : "deny",
555385
- destination: "localSettings"
555386
- };
555387
- setAppState((prev) => ({
555388
- ...prev,
555389
- toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555390
- }));
555391
- persistPermissionUpdate(update);
555392
- SandboxManager2.refreshConfig();
555393
- }
555394
- setSandboxPermissionRequestQueue((queue2) => {
555395
- queue2.filter((item) => item.hostPattern.host === approvedHost).forEach((item) => item.resolvePromise(allow));
555396
- return queue2.filter((item) => item.hostPattern.host !== approvedHost);
555397
- });
555398
- const cleanups = sandboxBridgeCleanupRef.current.get(approvedHost);
555399
- if (cleanups) {
555400
- for (const fn of cleanups) {
555401
- fn();
555274
+ isActive: isFullscreenEnvEnabled() && (centeredModal != null || !focusedInputDialog || focusedInputDialog === "tool-permission"),
555275
+ onScroll: centeredModal || toolPermissionOverlay || viewedAgentTask ? undefined : composedOnScroll
555276
+ }, undefined, false, undefined, this),
555277
+ null,
555278
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CancelRequestHandler, {
555279
+ ...cancelRequestProps
555280
+ }, undefined, false, undefined, this),
555281
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MCPConnectionManager, {
555282
+ dynamicMcpConfig,
555283
+ isStrictMcpConfig: strictMcpConfig,
555284
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FullscreenLayout, {
555285
+ scrollRef,
555286
+ overlay: toolPermissionOverlay,
555287
+ bottomFloat: companionVisible && !companionNarrow ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionFloatingBubble, {}, undefined, false, undefined, this) : undefined,
555288
+ modal: centeredModal,
555289
+ modalScrollRef,
555290
+ dividerYRef,
555291
+ hidePill: !!viewedAgentTask,
555292
+ hideSticky: !!viewedTeammateTask,
555293
+ newMessageCount: unseenDivider?.count ?? 0,
555294
+ onPillClick: () => {
555295
+ setCursor(null);
555296
+ jumpToNew(scrollRef.current);
555297
+ },
555298
+ scrollable: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555299
+ children: [
555300
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TeammateViewHeader, {}, undefined, false, undefined, this),
555301
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(Messages3, {
555302
+ messages: displayedMessages,
555303
+ tools,
555304
+ commands,
555305
+ verbose,
555306
+ toolJSX,
555307
+ toolUseConfirmQueue,
555308
+ inProgressToolUseIDs: viewedTeammateTask ? viewedTeammateTask.inProgressToolUseIDs ?? new Set : inProgressToolUseIDs,
555309
+ isMessageSelectorVisible,
555310
+ conversationId,
555311
+ screen,
555312
+ streamingToolUses,
555313
+ showAllInTranscript,
555314
+ agentDefinitions,
555315
+ onOpenRateLimitOptions: handleOpenRateLimitOptions,
555316
+ isLoading,
555317
+ streamingText: isLoading && !viewedAgentTask ? visibleStreamingText : null,
555318
+ isBriefOnly: viewedAgentTask ? false : isBriefOnly,
555319
+ unseenDivider: viewedAgentTask ? undefined : unseenDivider,
555320
+ scrollRef: isFullscreenEnvEnabled() ? scrollRef : undefined,
555321
+ trackStickyPrompt: isFullscreenEnvEnabled() ? true : undefined,
555322
+ cursor,
555323
+ setCursor,
555324
+ cursorNavRef
555325
+ }, undefined, false, undefined, this),
555326
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AwsAuthStatusBox, {}, undefined, false, undefined, this),
555327
+ !disabled && placeholderText && !centeredModal && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(UserTextMessage, {
555328
+ param: {
555329
+ text: placeholderText,
555330
+ type: "text"
555331
+ },
555332
+ addMargin: true,
555333
+ verbose
555334
+ }, undefined, false, undefined, this),
555335
+ toolJSX && !(toolJSX.isLocalJSXCommand && toolJSX.isImmediate) && !toolJsxCentered && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555336
+ flexDirection: "column",
555337
+ width: "100%",
555338
+ children: toolJSX.jsx
555339
+ }, undefined, false, undefined, this),
555340
+ false,
555341
+ null,
555342
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555343
+ flexGrow: 1
555344
+ }, undefined, false, undefined, this),
555345
+ showSpinner && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SpinnerWithVerb, {
555346
+ mode: streamMode,
555347
+ spinnerTip,
555348
+ responseLengthRef,
555349
+ apiMetricsRef: apiMetricsRef2,
555350
+ overrideMessage: spinnerMessage,
555351
+ spinnerSuffix: stopHookSpinnerSuffix,
555352
+ verbose,
555353
+ loadingStartTimeRef,
555354
+ totalPausedMsRef,
555355
+ pauseStartTimeRef,
555356
+ overrideColor: spinnerColor,
555357
+ overrideShimmerColor: spinnerShimmerColor,
555358
+ hasActiveTools: inProgressToolUseIDs.size > 0,
555359
+ leaderIsIdle: !isLoading
555360
+ }, undefined, false, undefined, this),
555361
+ !showSpinner && !isLoading && !userInputOnProcessing && !hasRunningTeammates && isBriefOnly && !viewedAgentTask && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(BriefIdleStatus, {}, undefined, false, undefined, this),
555362
+ isFullscreenEnvEnabled() && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptInputQueuedCommands, {}, undefined, false, undefined, this)
555363
+ ]
555364
+ }, undefined, true, undefined, this),
555365
+ bottom: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555366
+ flexDirection: companionNarrow ? "column" : "row",
555367
+ width: "100%",
555368
+ alignItems: companionNarrow ? undefined : "flex-end",
555369
+ children: [
555370
+ companionNarrow && isFullscreenEnvEnabled() && companionVisible ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionSprite, {}, undefined, false, undefined, this) : null,
555371
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555372
+ flexDirection: "column",
555373
+ flexGrow: 1,
555374
+ children: [
555375
+ permissionStickyFooter,
555376
+ toolJSX?.isLocalJSXCommand && toolJSX.isImmediate && !toolJsxCentered && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555377
+ flexDirection: "column",
555378
+ width: "100%",
555379
+ children: toolJSX.jsx
555380
+ }, undefined, false, undefined, this),
555381
+ !showSpinner && !toolJSX?.isLocalJSXCommand && showExpandedTodos && tasksV2 && tasksV2.length > 0 && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555382
+ width: "100%",
555383
+ flexDirection: "column",
555384
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TaskListV2, {
555385
+ tasks: tasksV2,
555386
+ isStandalone: true
555387
+ }, undefined, false, undefined, this)
555388
+ }, undefined, false, undefined, this),
555389
+ focusedInputDialog === "sandbox-permission" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxPermissionRequest, {
555390
+ hostPattern: sandboxPermissionRequestQueue[0].hostPattern,
555391
+ onUserResponse: (response) => {
555392
+ const {
555393
+ allow,
555394
+ persistToSettings
555395
+ } = response;
555396
+ const currentRequest = sandboxPermissionRequestQueue[0];
555397
+ if (!currentRequest)
555398
+ return;
555399
+ const approvedHost = currentRequest.hostPattern.host;
555400
+ if (persistToSettings) {
555401
+ const update = {
555402
+ type: "addRules",
555403
+ rules: [{
555404
+ toolName: WEB_FETCH_TOOL_NAME,
555405
+ ruleContent: `domain:${approvedHost}`
555406
+ }],
555407
+ behavior: allow ? "allow" : "deny",
555408
+ destination: "localSettings"
555409
+ };
555410
+ setAppState((prev) => ({
555411
+ ...prev,
555412
+ toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555413
+ }));
555414
+ persistPermissionUpdate(update);
555415
+ SandboxManager2.refreshConfig();
555416
+ }
555417
+ setSandboxPermissionRequestQueue((queue2) => {
555418
+ queue2.filter((item) => item.hostPattern.host === approvedHost).forEach((item) => item.resolvePromise(allow));
555419
+ return queue2.filter((item) => item.hostPattern.host !== approvedHost);
555420
+ });
555421
+ const cleanups = sandboxBridgeCleanupRef.current.get(approvedHost);
555422
+ if (cleanups) {
555423
+ for (const fn of cleanups) {
555424
+ fn();
555425
+ }
555426
+ sandboxBridgeCleanupRef.current.delete(approvedHost);
555402
555427
  }
555403
- sandboxBridgeCleanupRef.current.delete(approvedHost);
555404
555428
  }
555405
- }
555406
- }, sandboxPermissionRequestQueue[0].hostPattern.host, false, undefined, this),
555407
- focusedInputDialog === "prompt" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptDialog, {
555408
- title: promptQueue[0].title,
555409
- toolInputSummary: promptQueue[0].toolInputSummary,
555410
- request: promptQueue[0].request,
555411
- onRespond: (selectedKey) => {
555412
- const item = promptQueue[0];
555413
- if (!item)
555414
- return;
555415
- item.resolve({
555416
- prompt_response: item.request.prompt,
555417
- selected: selectedKey
555418
- });
555419
- setPromptQueue(([, ...tail]) => tail);
555420
- },
555421
- onAbort: () => {
555422
- const item = promptQueue[0];
555423
- if (!item)
555424
- return;
555425
- item.reject(new Error("Prompt cancelled by user"));
555426
- setPromptQueue(([, ...tail]) => tail);
555427
- }
555428
- }, promptQueue[0].request.prompt, false, undefined, this),
555429
- pendingWorkerRequest && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(WorkerPendingPermission, {
555430
- toolName: pendingWorkerRequest.toolName,
555431
- description: pendingWorkerRequest.description
555432
- }, undefined, false, undefined, this),
555433
- pendingSandboxRequest && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(WorkerPendingPermission, {
555434
- toolName: "Network Access",
555435
- description: `Waiting for leader to approve network access to ${pendingSandboxRequest.host}`
555436
- }, undefined, false, undefined, this),
555437
- focusedInputDialog === "worker-sandbox-permission" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxPermissionRequest, {
555438
- hostPattern: {
555439
- host: workerSandboxPermissions.queue[0].host,
555440
- port: undefined
555441
- },
555442
- onUserResponse: (response) => {
555443
- const {
555444
- allow,
555445
- persistToSettings
555446
- } = response;
555447
- const currentRequest = workerSandboxPermissions.queue[0];
555448
- if (!currentRequest)
555449
- return;
555450
- const approvedHost = currentRequest.host;
555451
- sendSandboxPermissionResponseViaMailbox(currentRequest.workerName, currentRequest.requestId, approvedHost, allow, teamContext?.teamName);
555452
- if (persistToSettings && allow) {
555453
- const update = {
555454
- type: "addRules",
555455
- rules: [{
555456
- toolName: WEB_FETCH_TOOL_NAME,
555457
- ruleContent: `domain:${approvedHost}`
555458
- }],
555459
- behavior: "allow",
555460
- destination: "localSettings"
555461
- };
555429
+ }, sandboxPermissionRequestQueue[0].hostPattern.host, false, undefined, this),
555430
+ focusedInputDialog === "prompt" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptDialog, {
555431
+ title: promptQueue[0].title,
555432
+ toolInputSummary: promptQueue[0].toolInputSummary,
555433
+ request: promptQueue[0].request,
555434
+ onRespond: (selectedKey) => {
555435
+ const item = promptQueue[0];
555436
+ if (!item)
555437
+ return;
555438
+ item.resolve({
555439
+ prompt_response: item.request.prompt,
555440
+ selected: selectedKey
555441
+ });
555442
+ setPromptQueue(([, ...tail]) => tail);
555443
+ },
555444
+ onAbort: () => {
555445
+ const item = promptQueue[0];
555446
+ if (!item)
555447
+ return;
555448
+ item.reject(new Error("Prompt cancelled by user"));
555449
+ setPromptQueue(([, ...tail]) => tail);
555450
+ }
555451
+ }, promptQueue[0].request.prompt, false, undefined, this),
555452
+ pendingWorkerRequest && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(WorkerPendingPermission, {
555453
+ toolName: pendingWorkerRequest.toolName,
555454
+ description: pendingWorkerRequest.description
555455
+ }, undefined, false, undefined, this),
555456
+ pendingSandboxRequest && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(WorkerPendingPermission, {
555457
+ toolName: "Network Access",
555458
+ description: `Waiting for leader to approve network access to ${pendingSandboxRequest.host}`
555459
+ }, undefined, false, undefined, this),
555460
+ focusedInputDialog === "worker-sandbox-permission" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxPermissionRequest, {
555461
+ hostPattern: {
555462
+ host: workerSandboxPermissions.queue[0].host,
555463
+ port: undefined
555464
+ },
555465
+ onUserResponse: (response) => {
555466
+ const {
555467
+ allow,
555468
+ persistToSettings
555469
+ } = response;
555470
+ const currentRequest = workerSandboxPermissions.queue[0];
555471
+ if (!currentRequest)
555472
+ return;
555473
+ const approvedHost = currentRequest.host;
555474
+ sendSandboxPermissionResponseViaMailbox(currentRequest.workerName, currentRequest.requestId, approvedHost, allow, teamContext?.teamName);
555475
+ if (persistToSettings && allow) {
555476
+ const update = {
555477
+ type: "addRules",
555478
+ rules: [{
555479
+ toolName: WEB_FETCH_TOOL_NAME,
555480
+ ruleContent: `domain:${approvedHost}`
555481
+ }],
555482
+ behavior: "allow",
555483
+ destination: "localSettings"
555484
+ };
555485
+ setAppState((prev) => ({
555486
+ ...prev,
555487
+ toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555488
+ }));
555489
+ persistPermissionUpdate(update);
555490
+ SandboxManager2.refreshConfig();
555491
+ }
555462
555492
  setAppState((prev) => ({
555463
555493
  ...prev,
555464
- toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555494
+ workerSandboxPermissions: {
555495
+ ...prev.workerSandboxPermissions,
555496
+ queue: prev.workerSandboxPermissions.queue.slice(1)
555497
+ }
555465
555498
  }));
555466
- persistPermissionUpdate(update);
555467
- SandboxManager2.refreshConfig();
555468
555499
  }
555469
- setAppState((prev) => ({
555470
- ...prev,
555471
- workerSandboxPermissions: {
555472
- ...prev.workerSandboxPermissions,
555473
- queue: prev.workerSandboxPermissions.queue.slice(1)
555500
+ }, workerSandboxPermissions.queue[0].requestId, false, undefined, this),
555501
+ focusedInputDialog === "elicitation" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ElicitationDialog, {
555502
+ event: elicitation.queue[0],
555503
+ onResponse: (action2, content) => {
555504
+ const currentRequest = elicitation.queue[0];
555505
+ if (!currentRequest)
555506
+ return;
555507
+ currentRequest.respond({
555508
+ action: action2,
555509
+ content
555510
+ });
555511
+ const isUrlAccept = currentRequest.params.mode === "url" && action2 === "accept";
555512
+ if (!isUrlAccept) {
555513
+ setAppState((prev) => ({
555514
+ ...prev,
555515
+ elicitation: {
555516
+ queue: prev.elicitation.queue.slice(1)
555517
+ }
555518
+ }));
555474
555519
  }
555475
- }));
555476
- }
555477
- }, workerSandboxPermissions.queue[0].requestId, false, undefined, this),
555478
- focusedInputDialog === "elicitation" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ElicitationDialog, {
555479
- event: elicitation.queue[0],
555480
- onResponse: (action2, content) => {
555481
- const currentRequest = elicitation.queue[0];
555482
- if (!currentRequest)
555483
- return;
555484
- currentRequest.respond({
555485
- action: action2,
555486
- content
555487
- });
555488
- const isUrlAccept = currentRequest.params.mode === "url" && action2 === "accept";
555489
- if (!isUrlAccept) {
555520
+ },
555521
+ onWaitingDismiss: (action2) => {
555522
+ const currentRequest = elicitation.queue[0];
555490
555523
  setAppState((prev) => ({
555491
555524
  ...prev,
555492
555525
  elicitation: {
555493
555526
  queue: prev.elicitation.queue.slice(1)
555494
555527
  }
555495
555528
  }));
555529
+ currentRequest?.onWaitingDismiss?.(action2);
555496
555530
  }
555497
- },
555498
- onWaitingDismiss: (action2) => {
555499
- const currentRequest = elicitation.queue[0];
555500
- setAppState((prev) => ({
555501
- ...prev,
555502
- elicitation: {
555503
- queue: prev.elicitation.queue.slice(1)
555531
+ }, elicitation.queue[0].serverName + ":" + String(elicitation.queue[0].requestId), false, undefined, this),
555532
+ focusedInputDialog === "cost" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CostThresholdDialog, {
555533
+ onDone: () => {
555534
+ setShowCostDialog(false);
555535
+ setHaveShownCostDialog(true);
555536
+ saveGlobalConfig((current) => ({
555537
+ ...current,
555538
+ hasAcknowledgedCostThreshold: true
555539
+ }));
555540
+ logEvent("tengu_cost_threshold_acknowledged", {});
555541
+ }
555542
+ }, undefined, false, undefined, this),
555543
+ focusedInputDialog === "idle-return" && idleReturnPending && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IdleReturnDialog, {
555544
+ idleMinutes: idleReturnPending.idleMinutes,
555545
+ totalInputTokens: getTotalInputTokens(),
555546
+ onDone: async (action2) => {
555547
+ const pending = idleReturnPending;
555548
+ setIdleReturnPending(null);
555549
+ logEvent("tengu_idle_return_action", {
555550
+ action: action2,
555551
+ idleMinutes: Math.round(pending.idleMinutes),
555552
+ messageCount: messagesRef.current.length,
555553
+ totalInputTokens: getTotalInputTokens()
555554
+ });
555555
+ if (action2 === "dismiss") {
555556
+ setInputValue(pending.input);
555557
+ return;
555504
555558
  }
555505
- }));
555506
- currentRequest?.onWaitingDismiss?.(action2);
555507
- }
555508
- }, elicitation.queue[0].serverName + ":" + String(elicitation.queue[0].requestId), false, undefined, this),
555509
- focusedInputDialog === "cost" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CostThresholdDialog, {
555510
- onDone: () => {
555511
- setShowCostDialog(false);
555512
- setHaveShownCostDialog(true);
555513
- saveGlobalConfig((current) => ({
555514
- ...current,
555515
- hasAcknowledgedCostThreshold: true
555516
- }));
555517
- logEvent("tengu_cost_threshold_acknowledged", {});
555518
- }
555519
- }, undefined, false, undefined, this),
555520
- focusedInputDialog === "idle-return" && idleReturnPending && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IdleReturnDialog, {
555521
- idleMinutes: idleReturnPending.idleMinutes,
555522
- totalInputTokens: getTotalInputTokens(),
555523
- onDone: async (action2) => {
555524
- const pending = idleReturnPending;
555525
- setIdleReturnPending(null);
555526
- logEvent("tengu_idle_return_action", {
555527
- action: action2,
555528
- idleMinutes: Math.round(pending.idleMinutes),
555529
- messageCount: messagesRef.current.length,
555530
- totalInputTokens: getTotalInputTokens()
555531
- });
555532
- if (action2 === "dismiss") {
555533
- setInputValue(pending.input);
555534
- return;
555559
+ if (action2 === "never") {
555560
+ saveGlobalConfig((current) => {
555561
+ if (current.idleReturnDismissed)
555562
+ return current;
555563
+ return {
555564
+ ...current,
555565
+ idleReturnDismissed: true
555566
+ };
555567
+ });
555568
+ }
555569
+ if (action2 === "clear") {
555570
+ const {
555571
+ clearConversation: clearConversation2
555572
+ } = await Promise.resolve().then(() => (init_conversation(), exports_conversation));
555573
+ await clearConversation2({
555574
+ setMessages,
555575
+ readFileState: readFileState.current,
555576
+ discoveredSkillNames: discoveredSkillNamesRef.current,
555577
+ loadedNestedMemoryPaths: loadedNestedMemoryPathsRef.current,
555578
+ getAppState: () => store.getState(),
555579
+ setAppState,
555580
+ setConversationId
555581
+ });
555582
+ haikuTitleAttemptedRef.current = false;
555583
+ setHaikuTitle(undefined);
555584
+ bashTools.current.clear();
555585
+ bashToolsProcessedIdx.current = 0;
555586
+ }
555587
+ skipIdleCheckRef.current = true;
555588
+ onSubmitRef.current(pending.input, {
555589
+ setCursorOffset: () => {},
555590
+ clearBuffer: () => {},
555591
+ resetHistory: () => {}
555592
+ });
555535
555593
  }
555536
- if (action2 === "never") {
555537
- saveGlobalConfig((current) => {
555538
- if (current.idleReturnDismissed)
555539
- return current;
555594
+ }, undefined, false, undefined, this),
555595
+ focusedInputDialog === "ide-onboarding" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IdeOnboardingDialog, {
555596
+ onDone: () => setShowIdeOnboarding(false),
555597
+ installationStatus: ideInstallationStatus
555598
+ }, undefined, false, undefined, this),
555599
+ false,
555600
+ false,
555601
+ focusedInputDialog === "effort-callout" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(EffortCallout, {
555602
+ model: mainLoopModel,
555603
+ onDone: (selection) => {
555604
+ setShowEffortCallout(false);
555605
+ if (selection !== "dismiss") {
555606
+ setAppState((prev) => ({
555607
+ ...prev,
555608
+ effortValue: selection
555609
+ }));
555610
+ }
555611
+ }
555612
+ }, undefined, false, undefined, this),
555613
+ focusedInputDialog === "remote-callout" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(RemoteCallout, {
555614
+ onDone: (selection) => {
555615
+ setAppState((prev) => {
555616
+ if (!prev.showRemoteCallout)
555617
+ return prev;
555540
555618
  return {
555541
- ...current,
555542
- idleReturnDismissed: true
555619
+ ...prev,
555620
+ showRemoteCallout: false,
555621
+ ...selection === "enable" && {
555622
+ replBridgeEnabled: true,
555623
+ replBridgeExplicit: true,
555624
+ replBridgeOutboundOnly: false
555625
+ }
555543
555626
  };
555544
555627
  });
555545
555628
  }
555546
- if (action2 === "clear") {
555547
- const {
555548
- clearConversation: clearConversation2
555549
- } = await Promise.resolve().then(() => (init_conversation(), exports_conversation));
555550
- await clearConversation2({
555551
- setMessages,
555552
- readFileState: readFileState.current,
555553
- discoveredSkillNames: discoveredSkillNamesRef.current,
555554
- loadedNestedMemoryPaths: loadedNestedMemoryPathsRef.current,
555555
- getAppState: () => store.getState(),
555556
- setAppState,
555557
- setConversationId
555629
+ }, undefined, false, undefined, this),
555630
+ exitFlow,
555631
+ focusedInputDialog === "plugin-hint" && hintRecommendation && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PluginHintMenu, {
555632
+ pluginName: hintRecommendation.pluginName,
555633
+ pluginDescription: hintRecommendation.pluginDescription,
555634
+ marketplaceName: hintRecommendation.marketplaceName,
555635
+ sourceCommand: hintRecommendation.sourceCommand,
555636
+ onResponse: handleHintResponse
555637
+ }, undefined, false, undefined, this),
555638
+ focusedInputDialog === "lsp-recommendation" && lspRecommendation && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(LspRecommendationMenu, {
555639
+ pluginName: lspRecommendation.pluginName,
555640
+ pluginDescription: lspRecommendation.pluginDescription,
555641
+ fileExtension: lspRecommendation.fileExtension,
555642
+ onResponse: handleLspResponse
555643
+ }, undefined, false, undefined, this),
555644
+ focusedInputDialog === "desktop-upsell" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(DesktopUpsellStartup, {
555645
+ onDone: () => setShowDesktopUpsellStartup(false)
555646
+ }, undefined, false, undefined, this),
555647
+ null,
555648
+ null,
555649
+ mrRender(),
555650
+ !toolJSX?.shouldHidePromptInput && !focusedInputDialog && !isExiting && !disabled && !cursor && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555651
+ children: [
555652
+ autoRunIssueReason && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AutoRunIssueNotification, {
555653
+ onRun: handleAutoRunIssue,
555654
+ onCancel: handleCancelAutoRunIssue,
555655
+ reason: getAutoRunIssueReasonText(autoRunIssueReason)
555656
+ }, undefined, false, undefined, this),
555657
+ postCompactSurvey.state !== "closed" ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555658
+ state: postCompactSurvey.state,
555659
+ lastResponse: postCompactSurvey.lastResponse,
555660
+ handleSelect: postCompactSurvey.handleSelect,
555661
+ inputValue,
555662
+ setInputValue,
555663
+ onRequestFeedback: handleSurveyRequestFeedback
555664
+ }, undefined, false, undefined, this) : memorySurvey.state !== "closed" ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555665
+ state: memorySurvey.state,
555666
+ lastResponse: memorySurvey.lastResponse,
555667
+ handleSelect: memorySurvey.handleSelect,
555668
+ handleTranscriptSelect: memorySurvey.handleTranscriptSelect,
555669
+ inputValue,
555670
+ setInputValue,
555671
+ onRequestFeedback: handleSurveyRequestFeedback,
555672
+ message: "How well did Claude use its memory? (optional)"
555673
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555674
+ state: feedbackSurvey.state,
555675
+ lastResponse: feedbackSurvey.lastResponse,
555676
+ handleSelect: feedbackSurvey.handleSelect,
555677
+ handleTranscriptSelect: feedbackSurvey.handleTranscriptSelect,
555678
+ inputValue,
555679
+ setInputValue,
555680
+ onRequestFeedback: didAutoRunIssueRef.current ? undefined : handleSurveyRequestFeedback
555681
+ }, undefined, false, undefined, this),
555682
+ frustrationDetection.state !== "closed" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555683
+ state: frustrationDetection.state,
555684
+ lastResponse: null,
555685
+ handleSelect: () => {},
555686
+ handleTranscriptSelect: frustrationDetection.handleTranscriptSelect,
555687
+ inputValue,
555688
+ setInputValue
555689
+ }, undefined, false, undefined, this),
555690
+ false,
555691
+ showIssueFlagBanner && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IssueFlagBanner, {}, undefined, false, undefined, this),
555692
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptInput_default, {
555693
+ debug: debug3,
555694
+ ideSelection,
555695
+ hasSuppressedDialogs: !!hasSuppressedDialogs,
555696
+ isLocalJSXCommandActive: isShowingLocalJSXCommand,
555697
+ getToolUseContext,
555698
+ toolPermissionContext,
555699
+ setToolPermissionContext,
555700
+ apiKeyStatus,
555701
+ commands,
555702
+ agents: agentDefinitions.activeAgents,
555703
+ isLoading,
555704
+ onExit: handleExit,
555705
+ verbose,
555706
+ messages,
555707
+ onAutoUpdaterResult: setAutoUpdaterResult,
555708
+ autoUpdaterResult,
555709
+ input: inputValue,
555710
+ onInputChange: setInputValue,
555711
+ mode: inputMode,
555712
+ onModeChange: setInputMode,
555713
+ stashedPrompt,
555714
+ setStashedPrompt,
555715
+ submitCount,
555716
+ onShowMessageSelector: handleShowMessageSelector,
555717
+ onMessageActionsEnter: undefined,
555718
+ mcpClients,
555719
+ pastedContents,
555720
+ setPastedContents,
555721
+ vimMode,
555722
+ setVimMode,
555723
+ showBashesDialog,
555724
+ setShowBashesDialog,
555725
+ onSubmit,
555726
+ onAgentSubmit,
555727
+ isSearchingHistory,
555728
+ setIsSearchingHistory,
555729
+ helpOpen: isHelpOpen,
555730
+ setHelpOpen: setIsHelpOpen,
555731
+ insertTextRef: undefined,
555732
+ voiceInterimRange: voice.interimRange
555733
+ }, undefined, false, undefined, this),
555734
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SessionBackgroundHint, {
555735
+ onBackgroundSession: handleBackgroundSession,
555736
+ isLoading
555737
+ }, undefined, false, undefined, this)
555738
+ ]
555739
+ }, undefined, true, undefined, this),
555740
+ cursor && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MessageActionsBar, {
555741
+ cursor
555742
+ }, undefined, false, undefined, this),
555743
+ focusedInputDialog === "message-selector" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MessageSelector, {
555744
+ messages,
555745
+ preselectedMessage: messageSelectorPreselect,
555746
+ onPreRestore: onCancel,
555747
+ onRestoreCode: async (message) => {
555748
+ await fileHistoryRewind((updater) => {
555749
+ setAppState((prev) => ({
555750
+ ...prev,
555751
+ fileHistory: updater(prev.fileHistory)
555752
+ }));
555753
+ }, message.uuid);
555754
+ },
555755
+ onSummarize: async (message, feedback2, direction = "from") => {
555756
+ const compactMessages = getMessagesAfterCompactBoundary(messages);
555757
+ const messageIndex = compactMessages.indexOf(message);
555758
+ if (messageIndex === -1) {
555759
+ setMessages((prev) => [...prev, createSystemMessage("That message is no longer in the active context (snipped or pre-compact). Choose a more recent message.", "warning")]);
555760
+ return;
555761
+ }
555762
+ const newAbortController = createAbortController();
555763
+ const context2 = getToolUseContext(compactMessages, [], newAbortController, mainLoopModel);
555764
+ const appState = context2.getAppState();
555765
+ const defaultSysPrompt = await getSystemPrompt(context2.options.tools, context2.options.mainLoopModel, Array.from(appState.toolPermissionContext.additionalWorkingDirectories.keys()), context2.options.mcpClients);
555766
+ const systemPrompt = buildEffectiveSystemPrompt({
555767
+ mainThreadAgentDefinition: undefined,
555768
+ toolUseContext: context2,
555769
+ customSystemPrompt: context2.options.customSystemPrompt,
555770
+ defaultSystemPrompt: defaultSysPrompt,
555771
+ appendSystemPrompt: context2.options.appendSystemPrompt
555558
555772
  });
555559
- haikuTitleAttemptedRef.current = false;
555560
- setHaikuTitle(undefined);
555561
- bashTools.current.clear();
555562
- bashToolsProcessedIdx.current = 0;
555563
- }
555564
- skipIdleCheckRef.current = true;
555565
- onSubmitRef.current(pending.input, {
555566
- setCursorOffset: () => {},
555567
- clearBuffer: () => {},
555568
- resetHistory: () => {}
555569
- });
555570
- }
555571
- }, undefined, false, undefined, this),
555572
- focusedInputDialog === "ide-onboarding" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IdeOnboardingDialog, {
555573
- onDone: () => setShowIdeOnboarding(false),
555574
- installationStatus: ideInstallationStatus
555575
- }, undefined, false, undefined, this),
555576
- false,
555577
- false,
555578
- focusedInputDialog === "effort-callout" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(EffortCallout, {
555579
- model: mainLoopModel,
555580
- onDone: (selection) => {
555581
- setShowEffortCallout(false);
555582
- if (selection !== "dismiss") {
555583
- setAppState((prev) => ({
555584
- ...prev,
555585
- effortValue: selection
555586
- }));
555587
- }
555588
- }
555589
- }, undefined, false, undefined, this),
555590
- focusedInputDialog === "remote-callout" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(RemoteCallout, {
555591
- onDone: (selection) => {
555592
- setAppState((prev) => {
555593
- if (!prev.showRemoteCallout)
555594
- return prev;
555595
- return {
555596
- ...prev,
555597
- showRemoteCallout: false,
555598
- ...selection === "enable" && {
555599
- replBridgeEnabled: true,
555600
- replBridgeExplicit: true,
555601
- replBridgeOutboundOnly: false
555773
+ const [userContext, systemContext] = await Promise.all([getUserContext(), getSystemContext()]);
555774
+ const result = await partialCompactConversation(compactMessages, messageIndex, context2, {
555775
+ systemPrompt,
555776
+ userContext,
555777
+ systemContext,
555778
+ toolUseContext: context2,
555779
+ forkContextMessages: compactMessages
555780
+ }, feedback2, direction);
555781
+ const kept = result.messagesToKeep ?? [];
555782
+ const ordered = direction === "up_to" ? [...result.summaryMessages, ...kept] : [...kept, ...result.summaryMessages];
555783
+ const postCompact = [result.boundaryMarker, ...ordered, ...result.attachments, ...result.hookResults];
555784
+ if (isFullscreenEnvEnabled() && direction === "from") {
555785
+ setMessages((old) => {
555786
+ const rawIdx = old.findIndex((m2) => m2.uuid === message.uuid);
555787
+ return [...old.slice(0, rawIdx === -1 ? 0 : rawIdx), ...postCompact];
555788
+ });
555789
+ } else {
555790
+ setMessages(postCompact);
555791
+ }
555792
+ if (false) {}
555793
+ setConversationId(randomUUID47());
555794
+ runPostCompactCleanup(context2.options.querySource);
555795
+ if (direction === "from") {
555796
+ const r = textForResubmit(message);
555797
+ if (r) {
555798
+ setInputValue(r.text);
555799
+ setInputMode(r.mode);
555602
555800
  }
555603
- };
555604
- });
555605
- }
555606
- }, undefined, false, undefined, this),
555607
- exitFlow,
555608
- focusedInputDialog === "plugin-hint" && hintRecommendation && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PluginHintMenu, {
555609
- pluginName: hintRecommendation.pluginName,
555610
- pluginDescription: hintRecommendation.pluginDescription,
555611
- marketplaceName: hintRecommendation.marketplaceName,
555612
- sourceCommand: hintRecommendation.sourceCommand,
555613
- onResponse: handleHintResponse
555614
- }, undefined, false, undefined, this),
555615
- focusedInputDialog === "lsp-recommendation" && lspRecommendation && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(LspRecommendationMenu, {
555616
- pluginName: lspRecommendation.pluginName,
555617
- pluginDescription: lspRecommendation.pluginDescription,
555618
- fileExtension: lspRecommendation.fileExtension,
555619
- onResponse: handleLspResponse
555620
- }, undefined, false, undefined, this),
555621
- focusedInputDialog === "desktop-upsell" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(DesktopUpsellStartup, {
555622
- onDone: () => setShowDesktopUpsellStartup(false)
555623
- }, undefined, false, undefined, this),
555624
- null,
555625
- null,
555626
- mrRender(),
555627
- !toolJSX?.shouldHidePromptInput && !focusedInputDialog && !isExiting && !disabled && !cursor && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555628
- children: [
555629
- autoRunIssueReason && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AutoRunIssueNotification, {
555630
- onRun: handleAutoRunIssue,
555631
- onCancel: handleCancelAutoRunIssue,
555632
- reason: getAutoRunIssueReasonText(autoRunIssueReason)
555633
- }, undefined, false, undefined, this),
555634
- postCompactSurvey.state !== "closed" ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555635
- state: postCompactSurvey.state,
555636
- lastResponse: postCompactSurvey.lastResponse,
555637
- handleSelect: postCompactSurvey.handleSelect,
555638
- inputValue,
555639
- setInputValue,
555640
- onRequestFeedback: handleSurveyRequestFeedback
555641
- }, undefined, false, undefined, this) : memorySurvey.state !== "closed" ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555642
- state: memorySurvey.state,
555643
- lastResponse: memorySurvey.lastResponse,
555644
- handleSelect: memorySurvey.handleSelect,
555645
- handleTranscriptSelect: memorySurvey.handleTranscriptSelect,
555646
- inputValue,
555647
- setInputValue,
555648
- onRequestFeedback: handleSurveyRequestFeedback,
555649
- message: "How well did Claude use its memory? (optional)"
555650
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555651
- state: feedbackSurvey.state,
555652
- lastResponse: feedbackSurvey.lastResponse,
555653
- handleSelect: feedbackSurvey.handleSelect,
555654
- handleTranscriptSelect: feedbackSurvey.handleTranscriptSelect,
555655
- inputValue,
555656
- setInputValue,
555657
- onRequestFeedback: didAutoRunIssueRef.current ? undefined : handleSurveyRequestFeedback
555658
- }, undefined, false, undefined, this),
555659
- frustrationDetection.state !== "closed" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555660
- state: frustrationDetection.state,
555661
- lastResponse: null,
555662
- handleSelect: () => {},
555663
- handleTranscriptSelect: frustrationDetection.handleTranscriptSelect,
555664
- inputValue,
555665
- setInputValue
555666
- }, undefined, false, undefined, this),
555667
- false,
555668
- showIssueFlagBanner && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IssueFlagBanner, {}, undefined, false, undefined, this),
555669
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptInput_default, {
555670
- debug: debug3,
555671
- ideSelection,
555672
- hasSuppressedDialogs: !!hasSuppressedDialogs,
555673
- isLocalJSXCommandActive: isShowingLocalJSXCommand,
555674
- getToolUseContext,
555675
- toolPermissionContext,
555676
- setToolPermissionContext,
555677
- apiKeyStatus,
555678
- commands,
555679
- agents: agentDefinitions.activeAgents,
555680
- isLoading,
555681
- onExit: handleExit,
555682
- verbose,
555683
- messages,
555684
- onAutoUpdaterResult: setAutoUpdaterResult,
555685
- autoUpdaterResult,
555686
- input: inputValue,
555687
- onInputChange: setInputValue,
555688
- mode: inputMode,
555689
- onModeChange: setInputMode,
555690
- stashedPrompt,
555691
- setStashedPrompt,
555692
- submitCount,
555693
- onShowMessageSelector: handleShowMessageSelector,
555694
- onMessageActionsEnter: undefined,
555695
- mcpClients,
555696
- pastedContents,
555697
- setPastedContents,
555698
- vimMode,
555699
- setVimMode,
555700
- showBashesDialog,
555701
- setShowBashesDialog,
555702
- onSubmit,
555703
- onAgentSubmit,
555704
- isSearchingHistory,
555705
- setIsSearchingHistory,
555706
- helpOpen: isHelpOpen,
555707
- setHelpOpen: setIsHelpOpen,
555708
- insertTextRef: undefined,
555709
- voiceInterimRange: voice.interimRange
555710
- }, undefined, false, undefined, this),
555711
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SessionBackgroundHint, {
555712
- onBackgroundSession: handleBackgroundSession,
555713
- isLoading
555714
- }, undefined, false, undefined, this)
555715
- ]
555716
- }, undefined, true, undefined, this),
555717
- cursor && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MessageActionsBar, {
555718
- cursor
555719
- }, undefined, false, undefined, this),
555720
- focusedInputDialog === "message-selector" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MessageSelector, {
555721
- messages,
555722
- preselectedMessage: messageSelectorPreselect,
555723
- onPreRestore: onCancel,
555724
- onRestoreCode: async (message) => {
555725
- await fileHistoryRewind((updater) => {
555726
- setAppState((prev) => ({
555727
- ...prev,
555728
- fileHistory: updater(prev.fileHistory)
555729
- }));
555730
- }, message.uuid);
555731
- },
555732
- onSummarize: async (message, feedback2, direction = "from") => {
555733
- const compactMessages = getMessagesAfterCompactBoundary(messages);
555734
- const messageIndex = compactMessages.indexOf(message);
555735
- if (messageIndex === -1) {
555736
- setMessages((prev) => [...prev, createSystemMessage("That message is no longer in the active context (snipped or pre-compact). Choose a more recent message.", "warning")]);
555737
- return;
555738
- }
555739
- const newAbortController = createAbortController();
555740
- const context2 = getToolUseContext(compactMessages, [], newAbortController, mainLoopModel);
555741
- const appState = context2.getAppState();
555742
- const defaultSysPrompt = await getSystemPrompt(context2.options.tools, context2.options.mainLoopModel, Array.from(appState.toolPermissionContext.additionalWorkingDirectories.keys()), context2.options.mcpClients);
555743
- const systemPrompt = buildEffectiveSystemPrompt({
555744
- mainThreadAgentDefinition: undefined,
555745
- toolUseContext: context2,
555746
- customSystemPrompt: context2.options.customSystemPrompt,
555747
- defaultSystemPrompt: defaultSysPrompt,
555748
- appendSystemPrompt: context2.options.appendSystemPrompt
555749
- });
555750
- const [userContext, systemContext] = await Promise.all([getUserContext(), getSystemContext()]);
555751
- const result = await partialCompactConversation(compactMessages, messageIndex, context2, {
555752
- systemPrompt,
555753
- userContext,
555754
- systemContext,
555755
- toolUseContext: context2,
555756
- forkContextMessages: compactMessages
555757
- }, feedback2, direction);
555758
- const kept = result.messagesToKeep ?? [];
555759
- const ordered = direction === "up_to" ? [...result.summaryMessages, ...kept] : [...kept, ...result.summaryMessages];
555760
- const postCompact = [result.boundaryMarker, ...ordered, ...result.attachments, ...result.hookResults];
555761
- if (isFullscreenEnvEnabled() && direction === "from") {
555762
- setMessages((old) => {
555763
- const rawIdx = old.findIndex((m2) => m2.uuid === message.uuid);
555764
- return [...old.slice(0, rawIdx === -1 ? 0 : rawIdx), ...postCompact];
555765
- });
555766
- } else {
555767
- setMessages(postCompact);
555768
- }
555769
- if (false) {}
555770
- setConversationId(randomUUID47());
555771
- runPostCompactCleanup(context2.options.querySource);
555772
- if (direction === "from") {
555773
- const r = textForResubmit(message);
555774
- if (r) {
555775
- setInputValue(r.text);
555776
- setInputMode(r.mode);
555777
555801
  }
555802
+ const historyShortcut = getShortcutDisplay("app:toggleTranscript", "Global", "ctrl+o");
555803
+ addNotification({
555804
+ key: "summarize-ctrl-o-hint",
555805
+ text: `Conversation summarized (${historyShortcut} for history)`,
555806
+ priority: "medium",
555807
+ timeoutMs: 8000
555808
+ });
555809
+ },
555810
+ onRestoreMessage: handleRestoreMessage,
555811
+ onClose: () => {
555812
+ setIsMessageSelectorVisible(false);
555813
+ setMessageSelectorPreselect(undefined);
555778
555814
  }
555779
- const historyShortcut = getShortcutDisplay("app:toggleTranscript", "Global", "ctrl+o");
555780
- addNotification({
555781
- key: "summarize-ctrl-o-hint",
555782
- text: `Conversation summarized (${historyShortcut} for history)`,
555783
- priority: "medium",
555784
- timeoutMs: 8000
555785
- });
555786
- },
555787
- onRestoreMessage: handleRestoreMessage,
555788
- onClose: () => {
555789
- setIsMessageSelectorVisible(false);
555790
- setMessageSelectorPreselect(undefined);
555791
- }
555792
- }, undefined, false, undefined, this),
555793
- false
555794
- ]
555795
- }, undefined, true, undefined, this),
555796
- !(companionNarrow && isFullscreenEnvEnabled()) && companionVisible ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionSprite, {}, undefined, false, undefined, this) : null
555797
- ]
555798
- }, undefined, true, undefined, this)
555799
- }, undefined, false, undefined, this)
555800
- }, remountKey, false, undefined, this)
555801
- ]
555802
- }, undefined, true, undefined, this);
555815
+ }, undefined, false, undefined, this),
555816
+ false
555817
+ ]
555818
+ }, undefined, true, undefined, this),
555819
+ !(companionNarrow && isFullscreenEnvEnabled()) && companionVisible ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionSprite, {}, undefined, false, undefined, this) : null
555820
+ ]
555821
+ }, undefined, true, undefined, this)
555822
+ }, undefined, false, undefined, this)
555823
+ }, remountKey, false, undefined, this)
555824
+ ]
555825
+ }, undefined, true, undefined, this)
555826
+ }, undefined, false, undefined, this);
555803
555827
  const stabilizedReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ReplRuntimeBoundary, {
555804
555828
  children: mainReturn
555805
555829
  }, undefined, false, undefined, this);