@funnycode/myclaude 0.1.190 → 0.1.192

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.192",
8
+ BUILD_TIME: "2026-08-10T09:46:14.935Z",
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.192",
117161
117161
  private: false,
117162
117162
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
117163
117163
  license: "MIT",
@@ -407102,8 +407102,18 @@ function getSteps() {
407102
407102
  }
407103
407103
  const cwd2 = getCwd();
407104
407104
  const fs13 = getFsImplementation();
407105
- const hasClaudeMd = fs13.existsSync(join105(cwd2, "CLAUDE.md"));
407106
- const isWorkspaceDirEmpty = isDirEmpty(cwd2);
407105
+ let hasClaudeMd = false;
407106
+ let isWorkspaceDirEmpty = true;
407107
+ try {
407108
+ hasClaudeMd = fs13.existsSync(join105(cwd2, "CLAUDE.md"));
407109
+ } catch {
407110
+ hasClaudeMd = false;
407111
+ }
407112
+ try {
407113
+ isWorkspaceDirEmpty = isDirEmpty(cwd2);
407114
+ } catch {
407115
+ isWorkspaceDirEmpty = true;
407116
+ }
407107
407117
  const claudeMdPath = join105(cwd2, "CLAUDE.md");
407108
407118
  try {
407109
407119
  cachedClaudeMdMtime = hasClaudeMd ? getFileModificationTime(claudeMdPath) : -1;
@@ -418096,15 +418106,10 @@ function useSearchInput({
418096
418106
  setCursorOffset(newCursor.offset);
418097
418107
  }
418098
418108
  };
418099
- use_input_default((_input, _key, event) => {
418100
- handleKeyDown(new KeyboardEvent(event.keypress));
418101
- }, { isActive });
418102
418109
  return { query: query3, setQuery, cursorOffset, handleKeyDown };
418103
418110
  }
418104
418111
  var import_react104, UNHANDLED_SPECIAL_KEYS;
418105
418112
  var init_useSearchInput = __esm(() => {
418106
- init_keyboard_event();
418107
- init_ink2();
418108
418113
  init_Cursor();
418109
418114
  init_useTerminalSize();
418110
418115
  import_react104 = __toESM(require_react(), 1);
@@ -418198,7 +418203,8 @@ function Config({
418198
418203
  const {
418199
418204
  query: searchQuery,
418200
418205
  setQuery: setSearchQuery,
418201
- cursorOffset: searchCursorOffset
418206
+ cursorOffset: searchCursorOffset,
418207
+ handleKeyDown: searchHandleKeyDown
418202
418208
  } = useSearchInput({
418203
418209
  isActive: isSearchMode && showSubmenu === null && !headerFocused,
418204
418210
  onExit: () => setIsSearchMode(false),
@@ -419247,7 +419253,10 @@ function Config({
419247
419253
  width: "100%",
419248
419254
  tabIndex: 0,
419249
419255
  autoFocus: true,
419250
- onKeyDown: handleKeyDown,
419256
+ onKeyDown: (e) => {
419257
+ searchHandleKeyDown(e);
419258
+ handleKeyDown(e);
419259
+ },
419251
419260
  children: showSubmenu === "Theme" ? /* @__PURE__ */ jsx_dev_runtime174.jsxDEV(jsx_dev_runtime174.Fragment, {
419252
419261
  children: [
419253
419262
  /* @__PURE__ */ jsx_dev_runtime174.jsxDEV(ThemePicker, {
@@ -438989,7 +438998,8 @@ function DiscoverPlugins({
438989
438998
  const {
438990
438999
  query: searchQuery,
438991
439000
  setQuery: setSearchQuery,
438992
- cursorOffset: searchCursorOffset
439001
+ cursorOffset: searchCursorOffset,
439002
+ handleKeyDown: searchHandleKeyDown
438993
439003
  } = useSearchInput({
438994
439004
  isActive: viewState === "plugin-list" && isSearchMode && !loading,
438995
439005
  onExit: () => {
@@ -439500,6 +439510,9 @@ function DiscoverPlugins({
439500
439510
  const visiblePlugins = pagination.getVisibleItems(filteredPlugins);
439501
439511
  return /* @__PURE__ */ jsx_dev_runtime234.jsxDEV(ThemedBox_default, {
439502
439512
  flexDirection: "column",
439513
+ tabIndex: 0,
439514
+ autoFocus: true,
439515
+ onKeyDown: searchHandleKeyDown,
439503
439516
  children: [
439504
439517
  /* @__PURE__ */ jsx_dev_runtime234.jsxDEV(ThemedBox_default, {
439505
439518
  children: [
@@ -442889,7 +442902,8 @@ function ManagePlugins({
442889
442902
  const {
442890
442903
  query: searchQuery,
442891
442904
  setQuery: setSearchQuery,
442892
- cursorOffset: searchCursorOffset
442905
+ cursorOffset: searchCursorOffset,
442906
+ handleKeyDown: searchHandleKeyDown
442893
442907
  } = useSearchInput({
442894
442908
  isActive: viewState === "plugin-list" && isSearchMode,
442895
442909
  onExit: () => {
@@ -444671,6 +444685,9 @@ function ManagePlugins({
444671
444685
  const visibleItems = pagination.getVisibleItems(filteredItems);
444672
444686
  return /* @__PURE__ */ jsx_dev_runtime237.jsxDEV(ThemedBox_default, {
444673
444687
  flexDirection: "column",
444688
+ tabIndex: 0,
444689
+ autoFocus: true,
444690
+ onKeyDown: searchHandleKeyDown,
444674
444691
  children: [
444675
444692
  /* @__PURE__ */ jsx_dev_runtime237.jsxDEV(ThemedBox_default, {
444676
444693
  marginBottom: 1,
@@ -459342,7 +459359,8 @@ function LogSelector(t0) {
459342
459359
  const {
459343
459360
  query: searchQuery,
459344
459361
  setQuery: setSearchQuery,
459345
- cursorOffset: searchCursorOffset
459362
+ cursorOffset: searchCursorOffset,
459363
+ handleKeyDown: searchHandleKeyDown
459346
459364
  } = useSearchInput(t14);
459347
459365
  const deferredSearchQuery = import_react159.default.useDeferredValue(searchQuery);
459348
459366
  const [debouncedDeepSearchQuery, setDebouncedDeepSearchQuery] = import_react159.default.useState("");
@@ -460755,6 +460773,9 @@ function LogSelector(t0) {
460755
460773
  t72 = /* @__PURE__ */ jsx_dev_runtime266.jsxDEV(ThemedBox_default, {
460756
460774
  flexDirection: "column",
460757
460775
  height: t57,
460776
+ tabIndex: 0,
460777
+ autoFocus: true,
460778
+ onKeyDown: searchHandleKeyDown,
460758
460779
  children: [
460759
460780
  t58,
460760
460781
  t59,
@@ -470802,7 +470823,8 @@ function PermissionRuleList(t0) {
470802
470823
  const {
470803
470824
  query: searchQuery,
470804
470825
  setQuery: setSearchQuery,
470805
- cursorOffset: searchCursorOffset
470826
+ cursorOffset: searchCursorOffset,
470827
+ handleKeyDown: searchHandleKeyDown
470806
470828
  } = useSearchInput(t9);
470807
470829
  let t10;
470808
470830
  if ($3[18] !== isSearchMode || $3[19] !== isSearchModeActive || $3[20] !== setSearchQuery) {
@@ -471398,7 +471420,12 @@ function PermissionRuleList(t0) {
471398
471420
  if ($3[110] !== handleKeyDown || $3[111] !== t32) {
471399
471421
  t33 = /* @__PURE__ */ jsx_dev_runtime294.jsxDEV(ThemedBox_default, {
471400
471422
  flexDirection: "column",
471401
- onKeyDown: handleKeyDown,
471423
+ tabIndex: 0,
471424
+ autoFocus: true,
471425
+ onKeyDown: (e) => {
471426
+ searchHandleKeyDown(e);
471427
+ handleKeyDown(e);
471428
+ },
471402
471429
  children: t32
471403
471430
  }, undefined, false, undefined, this);
471404
471431
  $3[110] = handleKeyDown;
@@ -527358,9 +527385,6 @@ function useHistorySearch(onAcceptHistory, currentInput, onInputChange, onCursor
527358
527385
  handleCancel();
527359
527386
  }
527360
527387
  };
527361
- use_input_default((_input, _key, event) => {
527362
- handleKeyDown(new KeyboardEvent(event.keypress));
527363
- }, { isActive: isSearching });
527364
527388
  const searchHistoryRef = import_react238.useRef(searchHistory);
527365
527389
  searchHistoryRef.current = searchHistory;
527366
527390
  import_react238.useEffect(() => {
@@ -527383,8 +527407,6 @@ function useHistorySearch(onAcceptHistory, currentInput, onInputChange, onCursor
527383
527407
  var import_react238;
527384
527408
  var init_useHistorySearch = __esm(() => {
527385
527409
  init_history();
527386
- init_keyboard_event();
527387
- init_ink2();
527388
527410
  init_useKeybinding();
527389
527411
  import_react238 = __toESM(require_react(), 1);
527390
527412
  });
@@ -530551,13 +530573,6 @@ function useTypeahead({
530551
530573
  handleEnter();
530552
530574
  }
530553
530575
  };
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
530576
  return {
530562
530577
  suggestions,
530563
530578
  selectedSuggestion,
@@ -530576,8 +530591,6 @@ var init_useTypeahead = __esm(() => {
530576
530591
  init_dist5();
530577
530592
  init_commands2();
530578
530593
  init_overlayContext();
530579
- init_keyboard_event();
530580
- init_ink2();
530581
530594
  init_KeybindingContext();
530582
530595
  init_useKeybinding();
530583
530596
  init_useShortcutDisplay();
@@ -536162,7 +536175,8 @@ function PromptInput({
536162
536175
  historyQuery,
536163
536176
  setHistoryQuery,
536164
536177
  historyMatch,
536165
- historyFailedMatch
536178
+ historyFailedMatch,
536179
+ handleKeyDown: historySearchHandleKeyDown
536166
536180
  } = useHistorySearch((entry) => {
536167
536181
  setPastedContents(entry.pastedContents);
536168
536182
  onSubmit(entry.display);
@@ -536734,7 +536748,8 @@ function PromptInput({
536734
536748
  selectedSuggestion,
536735
536749
  commandArgumentHint,
536736
536750
  inlineGhostText,
536737
- maxColumnWidth
536751
+ maxColumnWidth,
536752
+ handleKeyDown: typeaheadHandleKeyDown
536738
536753
  } = useTypeahead({
536739
536754
  commands,
536740
536755
  onInputChange: trackAndSetInput,
@@ -536750,6 +536765,10 @@ function PromptInput({
536750
536765
  markAccepted,
536751
536766
  onModeChange
536752
536767
  });
536768
+ const promptInputKeyDown = (e) => {
536769
+ historySearchHandleKeyDown(e);
536770
+ typeaheadHandleKeyDown(e);
536771
+ };
536753
536772
  const showPromptSuggestion = mode === "prompt" && suggestions.length === 0 && promptSuggestion && !viewingAgentTaskId;
536754
536773
  if (showPromptSuggestion) {
536755
536774
  markShown();
@@ -537589,6 +537608,7 @@ function PromptInput({
537589
537608
  return /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(ThemedBox_default, {
537590
537609
  flexDirection: "column",
537591
537610
  marginTop: briefOwnsGap ? 0 : 1,
537611
+ onKeyDown: promptInputKeyDown,
537592
537612
  children: [
537593
537613
  !isFullscreenEnvEnabled() && /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(PromptInputQueuedCommands, {}, undefined, false, undefined, this),
537594
537614
  hasSuppressedDialogs && /* @__PURE__ */ jsx_dev_runtime434.jsxDEV(ThemedBox_default, {
@@ -541042,15 +541062,10 @@ function useBackgroundTaskNavigation(options) {
541042
541062
  return;
541043
541063
  }
541044
541064
  };
541045
- use_input_default((_input, _key, event) => {
541046
- handleKeyDown(new KeyboardEvent(event.keypress));
541047
- });
541048
541065
  return { handleKeyDown };
541049
541066
  }
541050
541067
  var import_react275;
541051
541068
  var init_useBackgroundTaskNavigation = __esm(() => {
541052
- init_keyboard_event();
541053
- init_ink2();
541054
541069
  init_AppState();
541055
541070
  init_teammateViewHelpers();
541056
541071
  init_InProcessTeammateTask();
@@ -552537,7 +552552,8 @@ function TranscriptSearchBar({
552537
552552
  }) {
552538
552553
  const {
552539
552554
  query: query3,
552540
- cursorOffset
552555
+ cursorOffset,
552556
+ handleKeyDown: searchHandleKeyDown
552541
552557
  } = useSearchInput({
552542
552558
  isActive: true,
552543
552559
  initialQuery,
@@ -552587,6 +552603,9 @@ function TranscriptSearchBar({
552587
552603
  marginTop: 1,
552588
552604
  paddingLeft: 2,
552589
552605
  width: "100%",
552606
+ tabIndex: 0,
552607
+ autoFocus: true,
552608
+ onKeyDown: searchHandleKeyDown,
552590
552609
  noSelect: true,
552591
552610
  children: [
552592
552611
  /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedText, {
@@ -554874,6 +554893,9 @@ ${fileList}`);
554874
554893
  resetAnchor: () => {},
554875
554894
  interimRange: null
554876
554895
  };
554896
+ const { handleKeyDown: voiceHandleKeyDown } = {
554897
+ handleKeyDown: () => {}
554898
+ };
554877
554899
  useInboxPoller({
554878
554900
  enabled: isAgentSwarmsEnabled(),
554879
554901
  isLoading,
@@ -555088,9 +555110,13 @@ Note: ctrl + z now suspends myclaude, ctrl + _ undoes input.
555088
555110
  };
555089
555111
  const transcriptMessages = frozenTranscriptState ? deferredMessages.slice(0, frozenTranscriptState.messagesLength) : deferredMessages;
555090
555112
  const transcriptStreamingToolUses = frozenTranscriptState ? streamingToolUses.slice(0, frozenTranscriptState.streamingToolUsesLength) : streamingToolUses;
555091
- useBackgroundTaskNavigation({
555113
+ const { handleKeyDown: bgTaskHandleKeyDown } = useBackgroundTaskNavigation({
555092
555114
  onOpenBackgroundTasks: isShowingLocalJSXCommand ? undefined : () => setShowBashesDialog(true)
555093
555115
  });
555116
+ const replKeyDown = (e) => {
555117
+ bgTaskHandleKeyDown(e);
555118
+ voiceHandleKeyDown(e);
555119
+ };
555094
555120
  useTeammateViewAutoExit();
555095
555121
  if (screen === "transcript") {
555096
555122
  const transcriptScrollRef = isFullscreenEnvEnabled() && !disableVirtualScroll && !dumpMode ? scrollRef : undefined;
@@ -555124,85 +555150,89 @@ Note: ctrl + z now suspends myclaude, ctrl + _ undoes input.
555124
555150
  width: "100%",
555125
555151
  children: toolJSX.jsx
555126
555152
  }, 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, {
555153
+ const transcriptReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555154
+ flexGrow: 1,
555155
+ flexDirection: "column",
555156
+ onKeyDown: replKeyDown,
555157
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(KeybindingSetup, {
555158
+ children: [
555159
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AnimatedTerminalTitle, {
555160
+ isAnimating: titleIsAnimating,
555161
+ title: terminalTitle,
555162
+ disabled: titleDisabled,
555163
+ noPrefix: showStatusInTerminalTab
555164
+ }, undefined, false, undefined, this),
555165
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(GlobalKeybindingHandlers, {
555166
+ ...globalKeybindingProps
555167
+ }, undefined, false, undefined, this),
555168
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CommandKeybindingHandlers, {
555169
+ onSubmit,
555170
+ isActive: !toolJSX?.isLocalJSXCommand
555171
+ }, undefined, false, undefined, this),
555172
+ transcriptScrollRef ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ScrollKeybindingHandler, {
555173
+ scrollRef,
555174
+ isActive: focusedInputDialog !== "ultraplan-choice",
555175
+ isModal: !searchOpen,
555176
+ onScroll: () => jumpRef.current?.disarmSearch()
555177
+ }, undefined, false, undefined, this) : null,
555178
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CancelRequestHandler, {
555179
+ ...cancelRequestProps
555180
+ }, undefined, false, undefined, this),
555181
+ transcriptScrollRef ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FullscreenLayout, {
555182
+ scrollRef,
555183
+ scrollable: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555184
+ children: [
555185
+ transcriptMessagesElement,
555186
+ transcriptToolJSX,
555187
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this)
555188
+ ]
555189
+ }, undefined, true, undefined, this),
555190
+ bottom: searchOpen ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptSearchBar, {
555191
+ jumpRef,
555192
+ initialQuery: "",
555193
+ count: searchCount,
555194
+ current: searchCurrent,
555195
+ onClose: (q2) => {
555196
+ setSearchQuery(searchCount > 0 ? q2 : "");
555197
+ setSearchOpen(false);
555198
+ if (!q2) {
555199
+ setSearchCount(0);
555200
+ setSearchCurrent(0);
555201
+ jumpRef.current?.setSearchQuery("");
555202
+ }
555203
+ },
555204
+ onCancel: () => {
555205
+ setSearchOpen(false);
555206
+ jumpRef.current?.setSearchQuery("");
555207
+ jumpRef.current?.setSearchQuery(searchQuery);
555208
+ setHighlight(searchQuery);
555209
+ },
555210
+ setHighlight
555211
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptModeFooter, {
555212
+ showAllInTranscript,
555213
+ virtualScroll: true,
555214
+ status: editorStatus || undefined,
555215
+ searchBadge: searchQuery && searchCount > 0 ? {
555216
+ current: searchCurrent,
555217
+ count: searchCount
555218
+ } : undefined
555219
+ }, undefined, false, undefined, this)
555220
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555155
555221
  children: [
555156
555222
  transcriptMessagesElement,
555157
555223
  transcriptToolJSX,
555158
- /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this)
555224
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxViolationExpandedView, {}, undefined, false, undefined, this),
555225
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TranscriptModeFooter, {
555226
+ showAllInTranscript,
555227
+ virtualScroll: false,
555228
+ suppressShowAll: dumpMode,
555229
+ status: editorStatus || undefined
555230
+ }, undefined, false, undefined, this)
555159
555231
  ]
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);
555232
+ }, undefined, true, undefined, this)
555233
+ ]
555234
+ }, undefined, true, undefined, this)
555235
+ }, undefined, false, undefined, this);
555206
555236
  if (transcriptScrollRef) {
555207
555237
  return /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AlternateScreen, {
555208
555238
  mouseTracking: isMouseTrackingEnabled(),
@@ -555230,576 +555260,580 @@ Note: ctrl + z now suspends myclaude, ctrl + _ undoes input.
555230
555260
  const companionVisible = !toolJSX?.shouldHidePromptInput && !focusedInputDialog && !showBashesDialog;
555231
555261
  const toolJsxCentered = isFullscreenEnvEnabled() && toolJSX?.isLocalJSXCommand === true;
555232
555262
  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, {
555263
+ const mainReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555264
+ flexGrow: 1,
555265
+ flexDirection: "column",
555266
+ onKeyDown: replKeyDown,
555267
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(KeybindingSetup, {
555268
+ children: [
555269
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AnimatedTerminalTitle, {
555270
+ isAnimating: titleIsAnimating,
555271
+ title: terminalTitle,
555272
+ disabled: titleDisabled,
555273
+ noPrefix: showStatusInTerminalTab
555274
+ }, undefined, false, undefined, this),
555275
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(GlobalKeybindingHandlers, {
555276
+ ...globalKeybindingProps
555277
+ }, undefined, false, undefined, this),
555278
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CommandKeybindingHandlers, {
555279
+ onSubmit,
555280
+ isActive: !toolJSX?.isLocalJSXCommand
555281
+ }, undefined, false, undefined, this),
555282
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ScrollKeybindingHandler, {
555262
555283
  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();
555284
+ isActive: isFullscreenEnvEnabled() && (centeredModal != null || !focusedInputDialog || focusedInputDialog === "tool-permission"),
555285
+ onScroll: centeredModal || toolPermissionOverlay || viewedAgentTask ? undefined : composedOnScroll
555286
+ }, undefined, false, undefined, this),
555287
+ null,
555288
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CancelRequestHandler, {
555289
+ ...cancelRequestProps
555290
+ }, undefined, false, undefined, this),
555291
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MCPConnectionManager, {
555292
+ dynamicMcpConfig,
555293
+ isStrictMcpConfig: strictMcpConfig,
555294
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FullscreenLayout, {
555295
+ scrollRef,
555296
+ overlay: toolPermissionOverlay,
555297
+ bottomFloat: companionVisible && !companionNarrow ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionFloatingBubble, {}, undefined, false, undefined, this) : undefined,
555298
+ modal: centeredModal,
555299
+ modalScrollRef,
555300
+ dividerYRef,
555301
+ hidePill: !!viewedAgentTask,
555302
+ hideSticky: !!viewedTeammateTask,
555303
+ newMessageCount: unseenDivider?.count ?? 0,
555304
+ onPillClick: () => {
555305
+ setCursor(null);
555306
+ jumpToNew(scrollRef.current);
555307
+ },
555308
+ scrollable: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555309
+ children: [
555310
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TeammateViewHeader, {}, undefined, false, undefined, this),
555311
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(Messages3, {
555312
+ messages: displayedMessages,
555313
+ tools,
555314
+ commands,
555315
+ verbose,
555316
+ toolJSX,
555317
+ toolUseConfirmQueue,
555318
+ inProgressToolUseIDs: viewedTeammateTask ? viewedTeammateTask.inProgressToolUseIDs ?? new Set : inProgressToolUseIDs,
555319
+ isMessageSelectorVisible,
555320
+ conversationId,
555321
+ screen,
555322
+ streamingToolUses,
555323
+ showAllInTranscript,
555324
+ agentDefinitions,
555325
+ onOpenRateLimitOptions: handleOpenRateLimitOptions,
555326
+ isLoading,
555327
+ streamingText: isLoading && !viewedAgentTask ? visibleStreamingText : null,
555328
+ isBriefOnly: viewedAgentTask ? false : isBriefOnly,
555329
+ unseenDivider: viewedAgentTask ? undefined : unseenDivider,
555330
+ scrollRef: isFullscreenEnvEnabled() ? scrollRef : undefined,
555331
+ trackStickyPrompt: isFullscreenEnvEnabled() ? true : undefined,
555332
+ cursor,
555333
+ setCursor,
555334
+ cursorNavRef
555335
+ }, undefined, false, undefined, this),
555336
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AwsAuthStatusBox, {}, undefined, false, undefined, this),
555337
+ !disabled && placeholderText && !centeredModal && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(UserTextMessage, {
555338
+ param: {
555339
+ text: placeholderText,
555340
+ type: "text"
555341
+ },
555342
+ addMargin: true,
555343
+ verbose
555344
+ }, undefined, false, undefined, this),
555345
+ toolJSX && !(toolJSX.isLocalJSXCommand && toolJSX.isImmediate) && !toolJsxCentered && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555346
+ flexDirection: "column",
555347
+ width: "100%",
555348
+ children: toolJSX.jsx
555349
+ }, undefined, false, undefined, this),
555350
+ false,
555351
+ null,
555352
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555353
+ flexGrow: 1
555354
+ }, undefined, false, undefined, this),
555355
+ showSpinner && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SpinnerWithVerb, {
555356
+ mode: streamMode,
555357
+ spinnerTip,
555358
+ responseLengthRef,
555359
+ apiMetricsRef: apiMetricsRef2,
555360
+ overrideMessage: spinnerMessage,
555361
+ spinnerSuffix: stopHookSpinnerSuffix,
555362
+ verbose,
555363
+ loadingStartTimeRef,
555364
+ totalPausedMsRef,
555365
+ pauseStartTimeRef,
555366
+ overrideColor: spinnerColor,
555367
+ overrideShimmerColor: spinnerShimmerColor,
555368
+ hasActiveTools: inProgressToolUseIDs.size > 0,
555369
+ leaderIsIdle: !isLoading
555370
+ }, undefined, false, undefined, this),
555371
+ !showSpinner && !isLoading && !userInputOnProcessing && !hasRunningTeammates && isBriefOnly && !viewedAgentTask && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(BriefIdleStatus, {}, undefined, false, undefined, this),
555372
+ isFullscreenEnvEnabled() && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptInputQueuedCommands, {}, undefined, false, undefined, this)
555373
+ ]
555374
+ }, undefined, true, undefined, this),
555375
+ bottom: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555376
+ flexDirection: companionNarrow ? "column" : "row",
555377
+ width: "100%",
555378
+ alignItems: companionNarrow ? undefined : "flex-end",
555379
+ children: [
555380
+ companionNarrow && isFullscreenEnvEnabled() && companionVisible ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionSprite, {}, undefined, false, undefined, this) : null,
555381
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555382
+ flexDirection: "column",
555383
+ flexGrow: 1,
555384
+ children: [
555385
+ permissionStickyFooter,
555386
+ toolJSX?.isLocalJSXCommand && toolJSX.isImmediate && !toolJsxCentered && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555387
+ flexDirection: "column",
555388
+ width: "100%",
555389
+ children: toolJSX.jsx
555390
+ }, undefined, false, undefined, this),
555391
+ !showSpinner && !toolJSX?.isLocalJSXCommand && showExpandedTodos && tasksV2 && tasksV2.length > 0 && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ThemedBox_default, {
555392
+ width: "100%",
555393
+ flexDirection: "column",
555394
+ children: /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(TaskListV2, {
555395
+ tasks: tasksV2,
555396
+ isStandalone: true
555397
+ }, undefined, false, undefined, this)
555398
+ }, undefined, false, undefined, this),
555399
+ focusedInputDialog === "sandbox-permission" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxPermissionRequest, {
555400
+ hostPattern: sandboxPermissionRequestQueue[0].hostPattern,
555401
+ onUserResponse: (response) => {
555402
+ const {
555403
+ allow,
555404
+ persistToSettings
555405
+ } = response;
555406
+ const currentRequest = sandboxPermissionRequestQueue[0];
555407
+ if (!currentRequest)
555408
+ return;
555409
+ const approvedHost = currentRequest.hostPattern.host;
555410
+ if (persistToSettings) {
555411
+ const update = {
555412
+ type: "addRules",
555413
+ rules: [{
555414
+ toolName: WEB_FETCH_TOOL_NAME,
555415
+ ruleContent: `domain:${approvedHost}`
555416
+ }],
555417
+ behavior: allow ? "allow" : "deny",
555418
+ destination: "localSettings"
555419
+ };
555420
+ setAppState((prev) => ({
555421
+ ...prev,
555422
+ toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555423
+ }));
555424
+ persistPermissionUpdate(update);
555425
+ SandboxManager2.refreshConfig();
555426
+ }
555427
+ setSandboxPermissionRequestQueue((queue2) => {
555428
+ queue2.filter((item) => item.hostPattern.host === approvedHost).forEach((item) => item.resolvePromise(allow));
555429
+ return queue2.filter((item) => item.hostPattern.host !== approvedHost);
555430
+ });
555431
+ const cleanups = sandboxBridgeCleanupRef.current.get(approvedHost);
555432
+ if (cleanups) {
555433
+ for (const fn of cleanups) {
555434
+ fn();
555435
+ }
555436
+ sandboxBridgeCleanupRef.current.delete(approvedHost);
555402
555437
  }
555403
- sandboxBridgeCleanupRef.current.delete(approvedHost);
555404
555438
  }
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
- };
555439
+ }, sandboxPermissionRequestQueue[0].hostPattern.host, false, undefined, this),
555440
+ focusedInputDialog === "prompt" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptDialog, {
555441
+ title: promptQueue[0].title,
555442
+ toolInputSummary: promptQueue[0].toolInputSummary,
555443
+ request: promptQueue[0].request,
555444
+ onRespond: (selectedKey) => {
555445
+ const item = promptQueue[0];
555446
+ if (!item)
555447
+ return;
555448
+ item.resolve({
555449
+ prompt_response: item.request.prompt,
555450
+ selected: selectedKey
555451
+ });
555452
+ setPromptQueue(([, ...tail]) => tail);
555453
+ },
555454
+ onAbort: () => {
555455
+ const item = promptQueue[0];
555456
+ if (!item)
555457
+ return;
555458
+ item.reject(new Error("Prompt cancelled by user"));
555459
+ setPromptQueue(([, ...tail]) => tail);
555460
+ }
555461
+ }, promptQueue[0].request.prompt, false, undefined, this),
555462
+ pendingWorkerRequest && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(WorkerPendingPermission, {
555463
+ toolName: pendingWorkerRequest.toolName,
555464
+ description: pendingWorkerRequest.description
555465
+ }, undefined, false, undefined, this),
555466
+ pendingSandboxRequest && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(WorkerPendingPermission, {
555467
+ toolName: "Network Access",
555468
+ description: `Waiting for leader to approve network access to ${pendingSandboxRequest.host}`
555469
+ }, undefined, false, undefined, this),
555470
+ focusedInputDialog === "worker-sandbox-permission" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SandboxPermissionRequest, {
555471
+ hostPattern: {
555472
+ host: workerSandboxPermissions.queue[0].host,
555473
+ port: undefined
555474
+ },
555475
+ onUserResponse: (response) => {
555476
+ const {
555477
+ allow,
555478
+ persistToSettings
555479
+ } = response;
555480
+ const currentRequest = workerSandboxPermissions.queue[0];
555481
+ if (!currentRequest)
555482
+ return;
555483
+ const approvedHost = currentRequest.host;
555484
+ sendSandboxPermissionResponseViaMailbox(currentRequest.workerName, currentRequest.requestId, approvedHost, allow, teamContext?.teamName);
555485
+ if (persistToSettings && allow) {
555486
+ const update = {
555487
+ type: "addRules",
555488
+ rules: [{
555489
+ toolName: WEB_FETCH_TOOL_NAME,
555490
+ ruleContent: `domain:${approvedHost}`
555491
+ }],
555492
+ behavior: "allow",
555493
+ destination: "localSettings"
555494
+ };
555495
+ setAppState((prev) => ({
555496
+ ...prev,
555497
+ toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555498
+ }));
555499
+ persistPermissionUpdate(update);
555500
+ SandboxManager2.refreshConfig();
555501
+ }
555462
555502
  setAppState((prev) => ({
555463
555503
  ...prev,
555464
- toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
555504
+ workerSandboxPermissions: {
555505
+ ...prev.workerSandboxPermissions,
555506
+ queue: prev.workerSandboxPermissions.queue.slice(1)
555507
+ }
555465
555508
  }));
555466
- persistPermissionUpdate(update);
555467
- SandboxManager2.refreshConfig();
555468
555509
  }
555469
- setAppState((prev) => ({
555470
- ...prev,
555471
- workerSandboxPermissions: {
555472
- ...prev.workerSandboxPermissions,
555473
- queue: prev.workerSandboxPermissions.queue.slice(1)
555510
+ }, workerSandboxPermissions.queue[0].requestId, false, undefined, this),
555511
+ focusedInputDialog === "elicitation" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ElicitationDialog, {
555512
+ event: elicitation.queue[0],
555513
+ onResponse: (action2, content) => {
555514
+ const currentRequest = elicitation.queue[0];
555515
+ if (!currentRequest)
555516
+ return;
555517
+ currentRequest.respond({
555518
+ action: action2,
555519
+ content
555520
+ });
555521
+ const isUrlAccept = currentRequest.params.mode === "url" && action2 === "accept";
555522
+ if (!isUrlAccept) {
555523
+ setAppState((prev) => ({
555524
+ ...prev,
555525
+ elicitation: {
555526
+ queue: prev.elicitation.queue.slice(1)
555527
+ }
555528
+ }));
555474
555529
  }
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) {
555530
+ },
555531
+ onWaitingDismiss: (action2) => {
555532
+ const currentRequest = elicitation.queue[0];
555490
555533
  setAppState((prev) => ({
555491
555534
  ...prev,
555492
555535
  elicitation: {
555493
555536
  queue: prev.elicitation.queue.slice(1)
555494
555537
  }
555495
555538
  }));
555539
+ currentRequest?.onWaitingDismiss?.(action2);
555496
555540
  }
555497
- },
555498
- onWaitingDismiss: (action2) => {
555499
- const currentRequest = elicitation.queue[0];
555500
- setAppState((prev) => ({
555501
- ...prev,
555502
- elicitation: {
555503
- queue: prev.elicitation.queue.slice(1)
555541
+ }, elicitation.queue[0].serverName + ":" + String(elicitation.queue[0].requestId), false, undefined, this),
555542
+ focusedInputDialog === "cost" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CostThresholdDialog, {
555543
+ onDone: () => {
555544
+ setShowCostDialog(false);
555545
+ setHaveShownCostDialog(true);
555546
+ saveGlobalConfig((current) => ({
555547
+ ...current,
555548
+ hasAcknowledgedCostThreshold: true
555549
+ }));
555550
+ logEvent("tengu_cost_threshold_acknowledged", {});
555551
+ }
555552
+ }, undefined, false, undefined, this),
555553
+ focusedInputDialog === "idle-return" && idleReturnPending && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IdleReturnDialog, {
555554
+ idleMinutes: idleReturnPending.idleMinutes,
555555
+ totalInputTokens: getTotalInputTokens(),
555556
+ onDone: async (action2) => {
555557
+ const pending = idleReturnPending;
555558
+ setIdleReturnPending(null);
555559
+ logEvent("tengu_idle_return_action", {
555560
+ action: action2,
555561
+ idleMinutes: Math.round(pending.idleMinutes),
555562
+ messageCount: messagesRef.current.length,
555563
+ totalInputTokens: getTotalInputTokens()
555564
+ });
555565
+ if (action2 === "dismiss") {
555566
+ setInputValue(pending.input);
555567
+ return;
555568
+ }
555569
+ if (action2 === "never") {
555570
+ saveGlobalConfig((current) => {
555571
+ if (current.idleReturnDismissed)
555572
+ return current;
555573
+ return {
555574
+ ...current,
555575
+ idleReturnDismissed: true
555576
+ };
555577
+ });
555578
+ }
555579
+ if (action2 === "clear") {
555580
+ const {
555581
+ clearConversation: clearConversation2
555582
+ } = await Promise.resolve().then(() => (init_conversation(), exports_conversation));
555583
+ await clearConversation2({
555584
+ setMessages,
555585
+ readFileState: readFileState.current,
555586
+ discoveredSkillNames: discoveredSkillNamesRef.current,
555587
+ loadedNestedMemoryPaths: loadedNestedMemoryPathsRef.current,
555588
+ getAppState: () => store.getState(),
555589
+ setAppState,
555590
+ setConversationId
555591
+ });
555592
+ haikuTitleAttemptedRef.current = false;
555593
+ setHaikuTitle(undefined);
555594
+ bashTools.current.clear();
555595
+ bashToolsProcessedIdx.current = 0;
555596
+ }
555597
+ skipIdleCheckRef.current = true;
555598
+ onSubmitRef.current(pending.input, {
555599
+ setCursorOffset: () => {},
555600
+ clearBuffer: () => {},
555601
+ resetHistory: () => {}
555602
+ });
555603
+ }
555604
+ }, undefined, false, undefined, this),
555605
+ focusedInputDialog === "ide-onboarding" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IdeOnboardingDialog, {
555606
+ onDone: () => setShowIdeOnboarding(false),
555607
+ installationStatus: ideInstallationStatus
555608
+ }, undefined, false, undefined, this),
555609
+ false,
555610
+ false,
555611
+ focusedInputDialog === "effort-callout" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(EffortCallout, {
555612
+ model: mainLoopModel,
555613
+ onDone: (selection) => {
555614
+ setShowEffortCallout(false);
555615
+ if (selection !== "dismiss") {
555616
+ setAppState((prev) => ({
555617
+ ...prev,
555618
+ effortValue: selection
555619
+ }));
555504
555620
  }
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;
555535
555621
  }
555536
- if (action2 === "never") {
555537
- saveGlobalConfig((current) => {
555538
- if (current.idleReturnDismissed)
555539
- return current;
555622
+ }, undefined, false, undefined, this),
555623
+ focusedInputDialog === "remote-callout" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(RemoteCallout, {
555624
+ onDone: (selection) => {
555625
+ setAppState((prev) => {
555626
+ if (!prev.showRemoteCallout)
555627
+ return prev;
555540
555628
  return {
555541
- ...current,
555542
- idleReturnDismissed: true
555629
+ ...prev,
555630
+ showRemoteCallout: false,
555631
+ ...selection === "enable" && {
555632
+ replBridgeEnabled: true,
555633
+ replBridgeExplicit: true,
555634
+ replBridgeOutboundOnly: false
555635
+ }
555543
555636
  };
555544
555637
  });
555545
555638
  }
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
555639
+ }, undefined, false, undefined, this),
555640
+ exitFlow,
555641
+ focusedInputDialog === "plugin-hint" && hintRecommendation && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PluginHintMenu, {
555642
+ pluginName: hintRecommendation.pluginName,
555643
+ pluginDescription: hintRecommendation.pluginDescription,
555644
+ marketplaceName: hintRecommendation.marketplaceName,
555645
+ sourceCommand: hintRecommendation.sourceCommand,
555646
+ onResponse: handleHintResponse
555647
+ }, undefined, false, undefined, this),
555648
+ focusedInputDialog === "lsp-recommendation" && lspRecommendation && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(LspRecommendationMenu, {
555649
+ pluginName: lspRecommendation.pluginName,
555650
+ pluginDescription: lspRecommendation.pluginDescription,
555651
+ fileExtension: lspRecommendation.fileExtension,
555652
+ onResponse: handleLspResponse
555653
+ }, undefined, false, undefined, this),
555654
+ focusedInputDialog === "desktop-upsell" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(DesktopUpsellStartup, {
555655
+ onDone: () => setShowDesktopUpsellStartup(false)
555656
+ }, undefined, false, undefined, this),
555657
+ null,
555658
+ null,
555659
+ mrRender(),
555660
+ !toolJSX?.shouldHidePromptInput && !focusedInputDialog && !isExiting && !disabled && !cursor && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(jsx_dev_runtime465.Fragment, {
555661
+ children: [
555662
+ autoRunIssueReason && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(AutoRunIssueNotification, {
555663
+ onRun: handleAutoRunIssue,
555664
+ onCancel: handleCancelAutoRunIssue,
555665
+ reason: getAutoRunIssueReasonText(autoRunIssueReason)
555666
+ }, undefined, false, undefined, this),
555667
+ postCompactSurvey.state !== "closed" ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555668
+ state: postCompactSurvey.state,
555669
+ lastResponse: postCompactSurvey.lastResponse,
555670
+ handleSelect: postCompactSurvey.handleSelect,
555671
+ inputValue,
555672
+ setInputValue,
555673
+ onRequestFeedback: handleSurveyRequestFeedback
555674
+ }, undefined, false, undefined, this) : memorySurvey.state !== "closed" ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555675
+ state: memorySurvey.state,
555676
+ lastResponse: memorySurvey.lastResponse,
555677
+ handleSelect: memorySurvey.handleSelect,
555678
+ handleTranscriptSelect: memorySurvey.handleTranscriptSelect,
555679
+ inputValue,
555680
+ setInputValue,
555681
+ onRequestFeedback: handleSurveyRequestFeedback,
555682
+ message: "How well did Claude use its memory? (optional)"
555683
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555684
+ state: feedbackSurvey.state,
555685
+ lastResponse: feedbackSurvey.lastResponse,
555686
+ handleSelect: feedbackSurvey.handleSelect,
555687
+ handleTranscriptSelect: feedbackSurvey.handleTranscriptSelect,
555688
+ inputValue,
555689
+ setInputValue,
555690
+ onRequestFeedback: didAutoRunIssueRef.current ? undefined : handleSurveyRequestFeedback
555691
+ }, undefined, false, undefined, this),
555692
+ frustrationDetection.state !== "closed" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(FeedbackSurvey, {
555693
+ state: frustrationDetection.state,
555694
+ lastResponse: null,
555695
+ handleSelect: () => {},
555696
+ handleTranscriptSelect: frustrationDetection.handleTranscriptSelect,
555697
+ inputValue,
555698
+ setInputValue
555699
+ }, undefined, false, undefined, this),
555700
+ false,
555701
+ showIssueFlagBanner && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(IssueFlagBanner, {}, undefined, false, undefined, this),
555702
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(PromptInput_default, {
555703
+ debug: debug3,
555704
+ ideSelection,
555705
+ hasSuppressedDialogs: !!hasSuppressedDialogs,
555706
+ isLocalJSXCommandActive: isShowingLocalJSXCommand,
555707
+ getToolUseContext,
555708
+ toolPermissionContext,
555709
+ setToolPermissionContext,
555710
+ apiKeyStatus,
555711
+ commands,
555712
+ agents: agentDefinitions.activeAgents,
555713
+ isLoading,
555714
+ onExit: handleExit,
555715
+ verbose,
555716
+ messages,
555717
+ onAutoUpdaterResult: setAutoUpdaterResult,
555718
+ autoUpdaterResult,
555719
+ input: inputValue,
555720
+ onInputChange: setInputValue,
555721
+ mode: inputMode,
555722
+ onModeChange: setInputMode,
555723
+ stashedPrompt,
555724
+ setStashedPrompt,
555725
+ submitCount,
555726
+ onShowMessageSelector: handleShowMessageSelector,
555727
+ onMessageActionsEnter: undefined,
555728
+ mcpClients,
555729
+ pastedContents,
555730
+ setPastedContents,
555731
+ vimMode,
555732
+ setVimMode,
555733
+ showBashesDialog,
555734
+ setShowBashesDialog,
555735
+ onSubmit,
555736
+ onAgentSubmit,
555737
+ isSearchingHistory,
555738
+ setIsSearchingHistory,
555739
+ helpOpen: isHelpOpen,
555740
+ setHelpOpen: setIsHelpOpen,
555741
+ insertTextRef: undefined,
555742
+ voiceInterimRange: voice.interimRange
555743
+ }, undefined, false, undefined, this),
555744
+ /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(SessionBackgroundHint, {
555745
+ onBackgroundSession: handleBackgroundSession,
555746
+ isLoading
555747
+ }, undefined, false, undefined, this)
555748
+ ]
555749
+ }, undefined, true, undefined, this),
555750
+ cursor && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MessageActionsBar, {
555751
+ cursor
555752
+ }, undefined, false, undefined, this),
555753
+ focusedInputDialog === "message-selector" && /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(MessageSelector, {
555754
+ messages,
555755
+ preselectedMessage: messageSelectorPreselect,
555756
+ onPreRestore: onCancel,
555757
+ onRestoreCode: async (message) => {
555758
+ await fileHistoryRewind((updater) => {
555759
+ setAppState((prev) => ({
555760
+ ...prev,
555761
+ fileHistory: updater(prev.fileHistory)
555762
+ }));
555763
+ }, message.uuid);
555764
+ },
555765
+ onSummarize: async (message, feedback2, direction = "from") => {
555766
+ const compactMessages = getMessagesAfterCompactBoundary(messages);
555767
+ const messageIndex = compactMessages.indexOf(message);
555768
+ if (messageIndex === -1) {
555769
+ setMessages((prev) => [...prev, createSystemMessage("That message is no longer in the active context (snipped or pre-compact). Choose a more recent message.", "warning")]);
555770
+ return;
555771
+ }
555772
+ const newAbortController = createAbortController();
555773
+ const context2 = getToolUseContext(compactMessages, [], newAbortController, mainLoopModel);
555774
+ const appState = context2.getAppState();
555775
+ const defaultSysPrompt = await getSystemPrompt(context2.options.tools, context2.options.mainLoopModel, Array.from(appState.toolPermissionContext.additionalWorkingDirectories.keys()), context2.options.mcpClients);
555776
+ const systemPrompt = buildEffectiveSystemPrompt({
555777
+ mainThreadAgentDefinition: undefined,
555778
+ toolUseContext: context2,
555779
+ customSystemPrompt: context2.options.customSystemPrompt,
555780
+ defaultSystemPrompt: defaultSysPrompt,
555781
+ appendSystemPrompt: context2.options.appendSystemPrompt
555558
555782
  });
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
555783
+ const [userContext, systemContext] = await Promise.all([getUserContext(), getSystemContext()]);
555784
+ const result = await partialCompactConversation(compactMessages, messageIndex, context2, {
555785
+ systemPrompt,
555786
+ userContext,
555787
+ systemContext,
555788
+ toolUseContext: context2,
555789
+ forkContextMessages: compactMessages
555790
+ }, feedback2, direction);
555791
+ const kept = result.messagesToKeep ?? [];
555792
+ const ordered = direction === "up_to" ? [...result.summaryMessages, ...kept] : [...kept, ...result.summaryMessages];
555793
+ const postCompact = [result.boundaryMarker, ...ordered, ...result.attachments, ...result.hookResults];
555794
+ if (isFullscreenEnvEnabled() && direction === "from") {
555795
+ setMessages((old) => {
555796
+ const rawIdx = old.findIndex((m2) => m2.uuid === message.uuid);
555797
+ return [...old.slice(0, rawIdx === -1 ? 0 : rawIdx), ...postCompact];
555798
+ });
555799
+ } else {
555800
+ setMessages(postCompact);
555801
+ }
555802
+ if (false) {}
555803
+ setConversationId(randomUUID47());
555804
+ runPostCompactCleanup(context2.options.querySource);
555805
+ if (direction === "from") {
555806
+ const r = textForResubmit(message);
555807
+ if (r) {
555808
+ setInputValue(r.text);
555809
+ setInputMode(r.mode);
555602
555810
  }
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
555811
  }
555812
+ const historyShortcut = getShortcutDisplay("app:toggleTranscript", "Global", "ctrl+o");
555813
+ addNotification({
555814
+ key: "summarize-ctrl-o-hint",
555815
+ text: `Conversation summarized (${historyShortcut} for history)`,
555816
+ priority: "medium",
555817
+ timeoutMs: 8000
555818
+ });
555819
+ },
555820
+ onRestoreMessage: handleRestoreMessage,
555821
+ onClose: () => {
555822
+ setIsMessageSelectorVisible(false);
555823
+ setMessageSelectorPreselect(undefined);
555778
555824
  }
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);
555825
+ }, undefined, false, undefined, this),
555826
+ false
555827
+ ]
555828
+ }, undefined, true, undefined, this),
555829
+ !(companionNarrow && isFullscreenEnvEnabled()) && companionVisible ? /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(CompanionSprite, {}, undefined, false, undefined, this) : null
555830
+ ]
555831
+ }, undefined, true, undefined, this)
555832
+ }, undefined, false, undefined, this)
555833
+ }, remountKey, false, undefined, this)
555834
+ ]
555835
+ }, undefined, true, undefined, this)
555836
+ }, undefined, false, undefined, this);
555803
555837
  const stabilizedReturn = /* @__PURE__ */ jsx_dev_runtime465.jsxDEV(ReplRuntimeBoundary, {
555804
555838
  children: mainReturn
555805
555839
  }, undefined, false, undefined, this);
@@ -563637,7 +563671,7 @@ function migrateBypassPermissionsAcceptedToSettings() {
563637
563671
  }
563638
563672
  try {
563639
563673
  if (!hasSkipDangerousModePermissionPrompt()) {
563640
- const effectiveSkip = ["userSettings", "localSettings", "flagSettings", "policySettings"].map((source) => getSettingsForSource(source)?.skipDangerousModePermissionPrompt).find((value) => value !== undefined);
563674
+ const effectiveSkip = ["userSettings", "localSettings"].map((source) => getSettingsForSource(source)?.skipDangerousModePermissionPrompt).find((value) => value !== undefined);
563641
563675
  const userExplicitlyOptedOut = effectiveSkip === false;
563642
563676
  if (!userExplicitlyOptedOut) {
563643
563677
  updateSettingsForSource("userSettings", {
@@ -563730,7 +563764,10 @@ function migrateEnableAllProjectMcpServersToSettings() {
563730
563764
  updates.disabledMcpjsonServers = finalDisabledServers;
563731
563765
  }
563732
563766
  try {
563733
- updateSettingsForSource("localSettings", updates);
563767
+ const updateResult = updateSettingsForSource("localSettings", updates);
563768
+ if (updateResult?.error) {
563769
+ throw updateResult.error;
563770
+ }
563734
563771
  } catch (error49) {
563735
563772
  logError2(new Error(`Failed to migrate MCP server settings to local config: ${error49}`));
563736
563773
  throw error49;