lazyreview 1.0.79 → 1.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +955 -670
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -85180,7 +85180,7 @@ var measureElement = (node) => ({
85180
85180
  var measure_element_default = measureElement;
85181
85181
 
85182
85182
  // src/app.tsx
85183
- var import_react150 = __toESM(require_react(), 1);
85183
+ var import_react152 = __toESM(require_react(), 1);
85184
85184
 
85185
85185
  // node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/subscribable.js
85186
85186
  var Subscribable = class {
@@ -88783,7 +88783,7 @@ function MainPanel({
88783
88783
  }
88784
88784
 
88785
88785
  // src/components/layout/StatusBar.tsx
88786
- var import_react38 = __toESM(require_react(), 1);
88786
+ var import_react39 = __toESM(require_react(), 1);
88787
88787
 
88788
88788
  // src/hooks/useStatusMessage.ts
88789
88789
  var import_react32 = __toESM(require_react(), 1);
@@ -131178,6 +131178,136 @@ function createMacroStore() {
131178
131178
  }
131179
131179
  var macroStore = createMacroStore();
131180
131180
 
131181
+ // src/hooks/useReviewTimer.ts
131182
+ var import_react38 = __toESM(require_react(), 1);
131183
+ var EMPTY_STATE2 = { elapsedSeconds: 0, isActive: false };
131184
+ function createReviewTimerStore() {
131185
+ let state = EMPTY_STATE2;
131186
+ let listeners3 = [];
131187
+ const notify3 = () => {
131188
+ listeners3.forEach((l) => l());
131189
+ };
131190
+ return {
131191
+ subscribe(listener) {
131192
+ listeners3 = [...listeners3, listener];
131193
+ return () => {
131194
+ listeners3 = listeners3.filter((l) => l !== listener);
131195
+ };
131196
+ },
131197
+ getSnapshot() {
131198
+ return state;
131199
+ },
131200
+ setTimer(elapsedSeconds) {
131201
+ state = { elapsedSeconds, isActive: true };
131202
+ notify3();
131203
+ },
131204
+ clearTimer() {
131205
+ if (!state.isActive && state.elapsedSeconds === 0) return;
131206
+ state = EMPTY_STATE2;
131207
+ notify3();
131208
+ }
131209
+ };
131210
+ }
131211
+ var reviewTimerStore = createReviewTimerStore();
131212
+ function useReviewTimer() {
131213
+ return (0, import_react38.useSyncExternalStore)(
131214
+ reviewTimerStore.subscribe,
131215
+ reviewTimerStore.getSnapshot,
131216
+ () => EMPTY_STATE2
131217
+ );
131218
+ }
131219
+
131220
+ // src/utils/review-stats.ts
131221
+ var EMPTY_STATS = {
131222
+ count: 0,
131223
+ totalMs: 0,
131224
+ avgMs: 0,
131225
+ filesReviewed: 0
131226
+ };
131227
+ function aggregateStats(sessions) {
131228
+ if (sessions.length === 0) {
131229
+ return EMPTY_STATS;
131230
+ }
131231
+ const totalMs = sessions.reduce((sum2, s) => sum2 + s.durationMs, 0);
131232
+ const filesReviewed = sessions.reduce((sum2, s) => sum2 + s.filesReviewed, 0);
131233
+ return {
131234
+ count: sessions.length,
131235
+ totalMs,
131236
+ avgMs: Math.round(totalMs / sessions.length),
131237
+ filesReviewed
131238
+ };
131239
+ }
131240
+ function startOfDay(date8) {
131241
+ const d = new Date(date8);
131242
+ d.setHours(0, 0, 0, 0);
131243
+ return d.getTime();
131244
+ }
131245
+ function startOfWeek(date8) {
131246
+ const d = new Date(date8);
131247
+ d.setHours(0, 0, 0, 0);
131248
+ const day = d.getDay();
131249
+ const diff9 = (day + 6) % 7;
131250
+ d.setDate(d.getDate() - diff9);
131251
+ return d.getTime();
131252
+ }
131253
+ function filterByRange(sessions, range, now2 = /* @__PURE__ */ new Date()) {
131254
+ if (range === "all") {
131255
+ return sessions;
131256
+ }
131257
+ const cutoff = range === "today" ? startOfDay(now2) : startOfWeek(now2);
131258
+ return sessions.filter((s) => {
131259
+ const ts = new Date(s.timestamp).getTime();
131260
+ return ts >= cutoff;
131261
+ });
131262
+ }
131263
+ function formatDuration(ms) {
131264
+ const totalSeconds = Math.floor(ms / 1e3);
131265
+ const hours2 = Math.floor(totalSeconds / 3600);
131266
+ const minutes2 = Math.floor(totalSeconds % 3600 / 60);
131267
+ const seconds2 = totalSeconds % 60;
131268
+ if (hours2 > 0) {
131269
+ return `${hours2}h ${minutes2}m`;
131270
+ }
131271
+ if (minutes2 > 0) {
131272
+ return `${minutes2}m ${seconds2}s`;
131273
+ }
131274
+ return `${seconds2}s`;
131275
+ }
131276
+ function formatTimer(elapsedSeconds) {
131277
+ const hours2 = Math.floor(elapsedSeconds / 3600);
131278
+ const minutes2 = Math.floor(elapsedSeconds % 3600 / 60);
131279
+ const seconds2 = elapsedSeconds % 60;
131280
+ const pad2 = (n) => String(n).padStart(2, "0");
131281
+ if (hours2 > 0) {
131282
+ return `${hours2}:${pad2(minutes2)}:${pad2(seconds2)}`;
131283
+ }
131284
+ return `${pad2(minutes2)}:${pad2(seconds2)}`;
131285
+ }
131286
+ function deserializeSessions(json3) {
131287
+ try {
131288
+ const parsed = JSON.parse(json3);
131289
+ if (!Array.isArray(parsed)) return [];
131290
+ return parsed.map((item) => {
131291
+ if (typeof item !== "object" || item === null) return null;
131292
+ const obj = item;
131293
+ if (typeof obj.prKey === "string" && typeof obj.durationMs === "number" && typeof obj.timestamp === "string" && typeof obj.filesReviewed === "number") {
131294
+ return {
131295
+ prKey: obj.prKey,
131296
+ durationMs: obj.durationMs,
131297
+ timestamp: obj.timestamp,
131298
+ filesReviewed: obj.filesReviewed
131299
+ };
131300
+ }
131301
+ return null;
131302
+ }).filter((s) => s !== null);
131303
+ } catch {
131304
+ return [];
131305
+ }
131306
+ }
131307
+ function serializeSessions(sessions) {
131308
+ return JSON.stringify(sessions);
131309
+ }
131310
+
131181
131311
  // src/components/layout/StatusBar.tsx
131182
131312
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
131183
131313
  var PANEL_HINT_ENTRIES = {
@@ -131328,12 +131458,13 @@ function StatusBar({
131328
131458
  const rateLimit = useRateLimit();
131329
131459
  const { overrides } = useKeybindings("global");
131330
131460
  const selectionContext = useSelectionContext();
131331
- const macroState = (0, import_react38.useSyncExternalStore)(
131461
+ const macroState = (0, import_react39.useSyncExternalStore)(
131332
131462
  macroStore.subscribe,
131333
131463
  macroStore.getSnapshot,
131334
131464
  () => macroStore.getSnapshot()
131335
131465
  );
131336
- const hints = (0, import_react38.useMemo)(
131466
+ const reviewTimer = useReviewTimer();
131467
+ const hints = (0, import_react39.useMemo)(
131337
131468
  () => getContextualHints(activePanel, screenContext, selectionContext, overrides),
131338
131469
  [activePanel, screenContext, selectionContext, overrides]
131339
131470
  );
@@ -131371,6 +131502,7 @@ function StatusBar({
131371
131502
  macroState.activeRegister,
131372
131503
  "..."
131373
131504
  ] }),
131505
+ reviewTimer.isActive && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: theme14.colors.muted, children: formatTimer(reviewTimer.elapsedSeconds) }),
131374
131506
  renderStatus(),
131375
131507
  showRateLimitWarning && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: theme14.colors.warning, children: [
131376
131508
  "API: ",
@@ -131386,7 +131518,7 @@ function StatusBar({
131386
131518
  }
131387
131519
 
131388
131520
  // src/hooks/useScreenContext.ts
131389
- var import_react39 = __toESM(require_react(), 1);
131521
+ var import_react40 = __toESM(require_react(), 1);
131390
131522
  var current2 = void 0;
131391
131523
  var listeners2 = [];
131392
131524
  function notify2() {
@@ -131408,11 +131540,11 @@ function setScreenContext(context6) {
131408
131540
  }
131409
131541
  }
131410
131542
  function useScreenContext() {
131411
- return (0, import_react39.useSyncExternalStore)(subscribe2, getSnapshot, () => void 0);
131543
+ return (0, import_react40.useSyncExternalStore)(subscribe2, getSnapshot, () => void 0);
131412
131544
  }
131413
131545
 
131414
131546
  // src/components/layout/HelpModal.tsx
131415
- var import_react40 = __toESM(require_react(), 1);
131547
+ var import_react41 = __toESM(require_react(), 1);
131416
131548
 
131417
131549
  // src/components/common/Divider.tsx
131418
131550
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
@@ -131580,7 +131712,7 @@ function buildShortcutGroups(overrides) {
131580
131712
  function HelpModal({ onClose }) {
131581
131713
  const theme14 = useTheme();
131582
131714
  const { overrides } = useKeybindings("global");
131583
- const shortcutGroups = (0, import_react40.useMemo)(
131715
+ const shortcutGroups = (0, import_react41.useMemo)(
131584
131716
  () => buildShortcutGroups(overrides),
131585
131717
  [overrides]
131586
131718
  );
@@ -131612,13 +131744,13 @@ function HelpModal({ onClose }) {
131612
131744
  }
131613
131745
 
131614
131746
  // src/components/layout/TokenInputModal.tsx
131615
- var import_react73 = __toESM(require_react(), 1);
131747
+ var import_react74 = __toESM(require_react(), 1);
131616
131748
 
131617
131749
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/badge/badge.js
131618
- var import_react42 = __toESM(require_react(), 1);
131750
+ var import_react43 = __toESM(require_react(), 1);
131619
131751
 
131620
131752
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/theme.js
131621
- var import_react41 = __toESM(require_react(), 1);
131753
+ var import_react42 = __toESM(require_react(), 1);
131622
131754
  var import_deepmerge = __toESM(require_cjs(), 1);
131623
131755
 
131624
131756
  // node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
@@ -132202,58 +132334,58 @@ var defaultTheme2 = {
132202
132334
  PasswordInput: theme_default13
132203
132335
  }
132204
132336
  };
132205
- var ThemeContext2 = (0, import_react41.createContext)(defaultTheme2);
132337
+ var ThemeContext2 = (0, import_react42.createContext)(defaultTheme2);
132206
132338
  var useComponentTheme = (component) => {
132207
- const theme14 = (0, import_react41.useContext)(ThemeContext2);
132339
+ const theme14 = (0, import_react42.useContext)(ThemeContext2);
132208
132340
  return theme14.components[component];
132209
132341
  };
132210
132342
 
132211
132343
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/confirm-input/confirm-input.js
132212
- var import_react43 = __toESM(require_react(), 1);
132344
+ var import_react44 = __toESM(require_react(), 1);
132213
132345
 
132214
132346
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list.js
132215
- var import_react47 = __toESM(require_react(), 1);
132347
+ var import_react48 = __toESM(require_react(), 1);
132216
132348
 
132217
132349
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-item.js
132218
- var import_react45 = __toESM(require_react(), 1);
132350
+ var import_react46 = __toESM(require_react(), 1);
132219
132351
 
132220
132352
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-item-context.js
132221
- var import_react44 = __toESM(require_react(), 1);
132353
+ var import_react45 = __toESM(require_react(), 1);
132222
132354
 
132223
132355
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/constants.js
132224
132356
  var defaultMarker = figures_default.line;
132225
132357
 
132226
132358
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-item-context.js
132227
- var UnorderedListItemContext = (0, import_react44.createContext)({
132359
+ var UnorderedListItemContext = (0, import_react45.createContext)({
132228
132360
  marker: defaultMarker
132229
132361
  });
132230
132362
 
132231
132363
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-item.js
132232
132364
  function UnorderedListItem({ children }) {
132233
- const { marker } = (0, import_react45.useContext)(UnorderedListItemContext);
132365
+ const { marker } = (0, import_react46.useContext)(UnorderedListItemContext);
132234
132366
  const { styles: styles5 } = useComponentTheme("UnorderedList");
132235
- return import_react45.default.createElement(
132367
+ return import_react46.default.createElement(
132236
132368
  Box_default,
132237
132369
  { ...styles5.listItem() },
132238
- import_react45.default.createElement(Text, { ...styles5.marker() }, marker),
132239
- import_react45.default.createElement(Box_default, { ...styles5.content() }, children)
132370
+ import_react46.default.createElement(Text, { ...styles5.marker() }, marker),
132371
+ import_react46.default.createElement(Box_default, { ...styles5.content() }, children)
132240
132372
  );
132241
132373
  }
132242
132374
 
132243
132375
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list-context.js
132244
- var import_react46 = __toESM(require_react(), 1);
132245
- var UnorderedListContext = (0, import_react46.createContext)({
132376
+ var import_react47 = __toESM(require_react(), 1);
132377
+ var UnorderedListContext = (0, import_react47.createContext)({
132246
132378
  depth: 0
132247
132379
  });
132248
132380
 
132249
132381
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/unordered-list/unordered-list.js
132250
132382
  function UnorderedList({ children }) {
132251
- const { depth } = (0, import_react47.useContext)(UnorderedListContext);
132383
+ const { depth } = (0, import_react48.useContext)(UnorderedListContext);
132252
132384
  const { styles: styles5, config: config3 } = useComponentTheme("UnorderedList");
132253
- const listContext = (0, import_react47.useMemo)(() => ({
132385
+ const listContext = (0, import_react48.useMemo)(() => ({
132254
132386
  depth: depth + 1
132255
132387
  }), [depth]);
132256
- const listItemContext = (0, import_react47.useMemo)(() => {
132388
+ const listItemContext = (0, import_react48.useMemo)(() => {
132257
132389
  const { marker } = config3();
132258
132390
  if (typeof marker === "string") {
132259
132391
  return { marker };
@@ -132267,46 +132399,46 @@ function UnorderedList({ children }) {
132267
132399
  marker: defaultMarker
132268
132400
  };
132269
132401
  }, [config3, depth]);
132270
- return import_react47.default.createElement(
132402
+ return import_react48.default.createElement(
132271
132403
  UnorderedListContext.Provider,
132272
132404
  { value: listContext },
132273
- import_react47.default.createElement(
132405
+ import_react48.default.createElement(
132274
132406
  UnorderedListItemContext.Provider,
132275
132407
  { value: listItemContext },
132276
- import_react47.default.createElement(Box_default, { ...styles5.list() }, children)
132408
+ import_react48.default.createElement(Box_default, { ...styles5.list() }, children)
132277
132409
  )
132278
132410
  );
132279
132411
  }
132280
132412
  UnorderedList.Item = UnorderedListItem;
132281
132413
 
132282
132414
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/multi-select/multi-select.js
132283
- var import_react50 = __toESM(require_react(), 1);
132415
+ var import_react51 = __toESM(require_react(), 1);
132284
132416
 
132285
132417
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/multi-select/multi-select-option.js
132286
- var import_react48 = __toESM(require_react(), 1);
132418
+ var import_react49 = __toESM(require_react(), 1);
132287
132419
 
132288
132420
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/multi-select/use-multi-select-state.js
132289
- var import_react49 = __toESM(require_react(), 1);
132421
+ var import_react50 = __toESM(require_react(), 1);
132290
132422
  import { isDeepStrictEqual } from "util";
132291
132423
 
132292
132424
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/progress-bar/progress-bar.js
132293
- var import_react51 = __toESM(require_react(), 1);
132425
+ var import_react52 = __toESM(require_react(), 1);
132294
132426
 
132295
132427
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/select/select.js
132296
- var import_react54 = __toESM(require_react(), 1);
132428
+ var import_react55 = __toESM(require_react(), 1);
132297
132429
 
132298
132430
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/select/select-option.js
132299
- var import_react52 = __toESM(require_react(), 1);
132431
+ var import_react53 = __toESM(require_react(), 1);
132300
132432
 
132301
132433
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/select/use-select-state.js
132302
- var import_react53 = __toESM(require_react(), 1);
132434
+ var import_react54 = __toESM(require_react(), 1);
132303
132435
  import { isDeepStrictEqual as isDeepStrictEqual2 } from "util";
132304
132436
 
132305
132437
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/spinner/spinner.js
132306
- var import_react56 = __toESM(require_react(), 1);
132438
+ var import_react57 = __toESM(require_react(), 1);
132307
132439
 
132308
132440
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/spinner/use-spinner.js
132309
- var import_react55 = __toESM(require_react(), 1);
132441
+ var import_react56 = __toESM(require_react(), 1);
132310
132442
 
132311
132443
  // node_modules/.pnpm/cli-spinners@3.4.0/node_modules/cli-spinners/spinners.json
132312
132444
  var spinners_default = {
@@ -134013,9 +134145,9 @@ var spinnersList = Object.keys(spinners_default);
134013
134145
 
134014
134146
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/spinner/use-spinner.js
134015
134147
  function useSpinner({ type: type3 = "dots" }) {
134016
- const [frame, setFrame] = (0, import_react55.useState)(0);
134148
+ const [frame, setFrame] = (0, import_react56.useState)(0);
134017
134149
  const spinner = cli_spinners_default[type3];
134018
- (0, import_react55.useEffect)(() => {
134150
+ (0, import_react56.useEffect)(() => {
134019
134151
  const timer = setInterval(() => {
134020
134152
  setFrame((previousFrame) => {
134021
134153
  const isLastFrame = previousFrame === spinner.frames.length - 1;
@@ -134035,19 +134167,19 @@ function useSpinner({ type: type3 = "dots" }) {
134035
134167
  function Spinner({ label, type: type3 }) {
134036
134168
  const { frame } = useSpinner({ type: type3 });
134037
134169
  const { styles: styles5 } = useComponentTheme("Spinner");
134038
- return import_react56.default.createElement(
134170
+ return import_react57.default.createElement(
134039
134171
  Box_default,
134040
134172
  { ...styles5.container() },
134041
- import_react56.default.createElement(Text, { ...styles5.frame() }, frame),
134042
- label && import_react56.default.createElement(Text, { ...styles5.label() }, label)
134173
+ import_react57.default.createElement(Text, { ...styles5.frame() }, frame),
134174
+ label && import_react57.default.createElement(Text, { ...styles5.label() }, label)
134043
134175
  );
134044
134176
  }
134045
134177
 
134046
134178
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/text-input/text-input.js
134047
- var import_react59 = __toESM(require_react(), 1);
134179
+ var import_react60 = __toESM(require_react(), 1);
134048
134180
 
134049
134181
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/text-input/use-text-input-state.js
134050
- var import_react57 = __toESM(require_react(), 1);
134182
+ var import_react58 = __toESM(require_react(), 1);
134051
134183
  var reducer = (state, action) => {
134052
134184
  switch (action.type) {
134053
134185
  case "move-cursor-left": {
@@ -134082,39 +134214,39 @@ var reducer = (state, action) => {
134082
134214
  }
134083
134215
  };
134084
134216
  var useTextInputState = ({ defaultValue = "", suggestions, onChange, onSubmit }) => {
134085
- const [state, dispatch] = (0, import_react57.useReducer)(reducer, {
134217
+ const [state, dispatch] = (0, import_react58.useReducer)(reducer, {
134086
134218
  previousValue: defaultValue,
134087
134219
  value: defaultValue,
134088
134220
  cursorOffset: defaultValue.length
134089
134221
  });
134090
- const suggestion = (0, import_react57.useMemo)(() => {
134222
+ const suggestion = (0, import_react58.useMemo)(() => {
134091
134223
  if (state.value.length === 0) {
134092
134224
  return;
134093
134225
  }
134094
134226
  return suggestions?.find((suggestion2) => suggestion2.startsWith(state.value))?.replace(state.value, "");
134095
134227
  }, [state.value, suggestions]);
134096
- const moveCursorLeft = (0, import_react57.useCallback)(() => {
134228
+ const moveCursorLeft = (0, import_react58.useCallback)(() => {
134097
134229
  dispatch({
134098
134230
  type: "move-cursor-left"
134099
134231
  });
134100
134232
  }, []);
134101
- const moveCursorRight = (0, import_react57.useCallback)(() => {
134233
+ const moveCursorRight = (0, import_react58.useCallback)(() => {
134102
134234
  dispatch({
134103
134235
  type: "move-cursor-right"
134104
134236
  });
134105
134237
  }, []);
134106
- const insert3 = (0, import_react57.useCallback)((text) => {
134238
+ const insert3 = (0, import_react58.useCallback)((text) => {
134107
134239
  dispatch({
134108
134240
  type: "insert",
134109
134241
  text
134110
134242
  });
134111
134243
  }, []);
134112
- const deleteCharacter = (0, import_react57.useCallback)(() => {
134244
+ const deleteCharacter = (0, import_react58.useCallback)(() => {
134113
134245
  dispatch({
134114
134246
  type: "delete"
134115
134247
  });
134116
134248
  }, []);
134117
- const submit = (0, import_react57.useCallback)(() => {
134249
+ const submit = (0, import_react58.useCallback)(() => {
134118
134250
  if (suggestion) {
134119
134251
  insert3(suggestion);
134120
134252
  onSubmit?.(state.value + suggestion);
@@ -134122,7 +134254,7 @@ var useTextInputState = ({ defaultValue = "", suggestions, onChange, onSubmit })
134122
134254
  }
134123
134255
  onSubmit?.(state.value);
134124
134256
  }, [state.value, suggestion, insert3, onSubmit]);
134125
- (0, import_react57.useEffect)(() => {
134257
+ (0, import_react58.useEffect)(() => {
134126
134258
  if (state.value !== state.previousValue) {
134127
134259
  onChange?.(state.value);
134128
134260
  }
@@ -134139,16 +134271,16 @@ var useTextInputState = ({ defaultValue = "", suggestions, onChange, onSubmit })
134139
134271
  };
134140
134272
 
134141
134273
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/text-input/use-text-input.js
134142
- var import_react58 = __toESM(require_react(), 1);
134274
+ var import_react59 = __toESM(require_react(), 1);
134143
134275
  var cursor = source_default.inverse(" ");
134144
134276
  var useTextInput = ({ isDisabled: isDisabled2 = false, state, placeholder = "" }) => {
134145
- const renderedPlaceholder = (0, import_react58.useMemo)(() => {
134277
+ const renderedPlaceholder = (0, import_react59.useMemo)(() => {
134146
134278
  if (isDisabled2) {
134147
134279
  return placeholder ? source_default.dim(placeholder) : "";
134148
134280
  }
134149
134281
  return placeholder && placeholder.length > 0 ? source_default.inverse(placeholder[0]) + source_default.dim(placeholder.slice(1)) : cursor;
134150
134282
  }, [isDisabled2, placeholder]);
134151
- const renderedValue = (0, import_react58.useMemo)(() => {
134283
+ const renderedValue = (0, import_react59.useMemo)(() => {
134152
134284
  if (isDisabled2) {
134153
134285
  return state.value;
134154
134286
  }
@@ -134208,63 +134340,63 @@ function TextInput({ isDisabled: isDisabled2 = false, defaultValue, placeholder
134208
134340
  state
134209
134341
  });
134210
134342
  const { styles: styles5 } = useComponentTheme("TextInput");
134211
- return import_react59.default.createElement(Text, { ...styles5.value() }, inputValue);
134343
+ return import_react60.default.createElement(Text, { ...styles5.value() }, inputValue);
134212
134344
  }
134213
134345
 
134214
134346
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/ordered-list/ordered-list.js
134215
- var import_react63 = __toESM(require_react(), 1);
134347
+ var import_react64 = __toESM(require_react(), 1);
134216
134348
 
134217
134349
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/ordered-list/ordered-list-item.js
134218
- var import_react61 = __toESM(require_react(), 1);
134350
+ var import_react62 = __toESM(require_react(), 1);
134219
134351
 
134220
134352
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/ordered-list/ordered-list-item-context.js
134221
- var import_react60 = __toESM(require_react(), 1);
134222
- var OrderedListItemContext = (0, import_react60.createContext)({
134353
+ var import_react61 = __toESM(require_react(), 1);
134354
+ var OrderedListItemContext = (0, import_react61.createContext)({
134223
134355
  marker: figures_default.line
134224
134356
  });
134225
134357
 
134226
134358
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/ordered-list/ordered-list-item.js
134227
134359
  function OrderedListItem({ children }) {
134228
- const { marker } = (0, import_react61.useContext)(OrderedListItemContext);
134360
+ const { marker } = (0, import_react62.useContext)(OrderedListItemContext);
134229
134361
  const { styles: styles5 } = useComponentTheme("OrderedList");
134230
- return import_react61.default.createElement(
134362
+ return import_react62.default.createElement(
134231
134363
  Box_default,
134232
134364
  { ...styles5.listItem() },
134233
- import_react61.default.createElement(Text, { ...styles5.marker() }, marker),
134234
- import_react61.default.createElement(Box_default, { ...styles5.content() }, children)
134365
+ import_react62.default.createElement(Text, { ...styles5.marker() }, marker),
134366
+ import_react62.default.createElement(Box_default, { ...styles5.content() }, children)
134235
134367
  );
134236
134368
  }
134237
134369
 
134238
134370
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/ordered-list/ordered-list-context.js
134239
- var import_react62 = __toESM(require_react(), 1);
134240
- var OrderedListContext = (0, import_react62.createContext)({
134371
+ var import_react63 = __toESM(require_react(), 1);
134372
+ var OrderedListContext = (0, import_react63.createContext)({
134241
134373
  marker: ""
134242
134374
  });
134243
134375
 
134244
134376
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/ordered-list/ordered-list.js
134245
134377
  function OrderedList({ children }) {
134246
- const { marker: parentMarker } = (0, import_react63.useContext)(OrderedListContext);
134378
+ const { marker: parentMarker } = (0, import_react64.useContext)(OrderedListContext);
134247
134379
  const { styles: styles5 } = useComponentTheme("OrderedList");
134248
134380
  let numberOfItems = 0;
134249
- for (const child of import_react63.default.Children.toArray(children)) {
134250
- if (!(0, import_react63.isValidElement)(child) || child.type !== OrderedListItem) {
134381
+ for (const child of import_react64.default.Children.toArray(children)) {
134382
+ if (!(0, import_react64.isValidElement)(child) || child.type !== OrderedListItem) {
134251
134383
  continue;
134252
134384
  }
134253
134385
  numberOfItems++;
134254
134386
  }
134255
134387
  const maxMarkerWidth = String(numberOfItems).length;
134256
- return import_react63.default.createElement(Box_default, { ...styles5.list() }, import_react63.default.Children.map(children, (child, index) => {
134257
- if (!(0, import_react63.isValidElement)(child) || child.type !== OrderedListItem) {
134388
+ return import_react64.default.createElement(Box_default, { ...styles5.list() }, import_react64.default.Children.map(children, (child, index) => {
134389
+ if (!(0, import_react64.isValidElement)(child) || child.type !== OrderedListItem) {
134258
134390
  return child;
134259
134391
  }
134260
134392
  const paddedMarker = `${String(index + 1).padStart(maxMarkerWidth)}.`;
134261
134393
  const marker = `${parentMarker}${paddedMarker}`;
134262
134394
  return (
134263
134395
  // eslint-disable-next-line react/jsx-no-constructed-context-values
134264
- import_react63.default.createElement(
134396
+ import_react64.default.createElement(
134265
134397
  OrderedListContext.Provider,
134266
134398
  { value: { marker } },
134267
- import_react63.default.createElement(OrderedListItemContext.Provider, { value: { marker } }, child)
134399
+ import_react64.default.createElement(OrderedListItemContext.Provider, { value: { marker } }, child)
134268
134400
  )
134269
134401
  );
134270
134402
  }));
@@ -134272,10 +134404,10 @@ function OrderedList({ children }) {
134272
134404
  OrderedList.Item = OrderedListItem;
134273
134405
 
134274
134406
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/password-input/password-input.js
134275
- var import_react66 = __toESM(require_react(), 1);
134407
+ var import_react67 = __toESM(require_react(), 1);
134276
134408
 
134277
134409
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/password-input/use-password-input-state.js
134278
- var import_react64 = __toESM(require_react(), 1);
134410
+ var import_react65 = __toESM(require_react(), 1);
134279
134411
  var reducer2 = (state, action) => {
134280
134412
  switch (action.type) {
134281
134413
  case "move-cursor-left": {
@@ -134310,36 +134442,36 @@ var reducer2 = (state, action) => {
134310
134442
  }
134311
134443
  };
134312
134444
  var usePasswordInputState = ({ onChange, onSubmit }) => {
134313
- const [state, dispatch] = (0, import_react64.useReducer)(reducer2, {
134445
+ const [state, dispatch] = (0, import_react65.useReducer)(reducer2, {
134314
134446
  previousValue: "",
134315
134447
  value: "",
134316
134448
  cursorOffset: 0
134317
134449
  });
134318
- const moveCursorLeft = (0, import_react64.useCallback)(() => {
134450
+ const moveCursorLeft = (0, import_react65.useCallback)(() => {
134319
134451
  dispatch({
134320
134452
  type: "move-cursor-left"
134321
134453
  });
134322
134454
  }, []);
134323
- const moveCursorRight = (0, import_react64.useCallback)(() => {
134455
+ const moveCursorRight = (0, import_react65.useCallback)(() => {
134324
134456
  dispatch({
134325
134457
  type: "move-cursor-right"
134326
134458
  });
134327
134459
  }, []);
134328
- const insert3 = (0, import_react64.useCallback)((text) => {
134460
+ const insert3 = (0, import_react65.useCallback)((text) => {
134329
134461
  dispatch({
134330
134462
  type: "insert",
134331
134463
  text
134332
134464
  });
134333
134465
  }, []);
134334
- const deleteCharacter = (0, import_react64.useCallback)(() => {
134466
+ const deleteCharacter = (0, import_react65.useCallback)(() => {
134335
134467
  dispatch({
134336
134468
  type: "delete"
134337
134469
  });
134338
134470
  }, []);
134339
- const submit = (0, import_react64.useCallback)(() => {
134471
+ const submit = (0, import_react65.useCallback)(() => {
134340
134472
  onSubmit?.(state.value);
134341
134473
  }, [state.value, onSubmit]);
134342
- (0, import_react64.useEffect)(() => {
134474
+ (0, import_react65.useEffect)(() => {
134343
134475
  if (state.value !== state.previousValue) {
134344
134476
  onChange?.(state.value);
134345
134477
  }
@@ -134355,16 +134487,16 @@ var usePasswordInputState = ({ onChange, onSubmit }) => {
134355
134487
  };
134356
134488
 
134357
134489
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/password-input/use-password-input.js
134358
- var import_react65 = __toESM(require_react(), 1);
134490
+ var import_react66 = __toESM(require_react(), 1);
134359
134491
  var cursor2 = source_default.inverse(" ");
134360
134492
  var usePasswordInput = ({ isDisabled: isDisabled2 = false, state, placeholder = "" }) => {
134361
- const renderedPlaceholder = (0, import_react65.useMemo)(() => {
134493
+ const renderedPlaceholder = (0, import_react66.useMemo)(() => {
134362
134494
  if (isDisabled2) {
134363
134495
  return placeholder ? source_default.dim(placeholder) : "";
134364
134496
  }
134365
134497
  return placeholder && placeholder.length > 0 ? source_default.inverse(placeholder[0]) + source_default.dim(placeholder.slice(1)) : cursor2;
134366
134498
  }, [isDisabled2, placeholder]);
134367
- const renderedValue = (0, import_react65.useMemo)(() => {
134499
+ const renderedValue = (0, import_react66.useMemo)(() => {
134368
134500
  const value5 = "*".repeat(state.value.length);
134369
134501
  if (isDisabled2) {
134370
134502
  return value5;
@@ -134415,28 +134547,28 @@ function PasswordInput({ isDisabled: isDisabled2 = false, placeholder = "", onCh
134415
134547
  state
134416
134548
  });
134417
134549
  const { styles: styles5 } = useComponentTheme("PasswordInput");
134418
- return import_react66.default.createElement(Text, { ...styles5.value() }, inputValue);
134550
+ return import_react67.default.createElement(Text, { ...styles5.value() }, inputValue);
134419
134551
  }
134420
134552
 
134421
134553
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/status-message/status-message.js
134422
- var import_react67 = __toESM(require_react(), 1);
134554
+ var import_react68 = __toESM(require_react(), 1);
134423
134555
 
134424
134556
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/alert/alert.js
134425
- var import_react68 = __toESM(require_react(), 1);
134557
+ var import_react69 = __toESM(require_react(), 1);
134426
134558
 
134427
134559
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/email-input/email-input.js
134428
- var import_react71 = __toESM(require_react(), 1);
134560
+ var import_react72 = __toESM(require_react(), 1);
134429
134561
 
134430
134562
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/email-input/use-email-input-state.js
134431
- var import_react69 = __toESM(require_react(), 1);
134563
+ var import_react70 = __toESM(require_react(), 1);
134432
134564
 
134433
134565
  // node_modules/.pnpm/@inkjs+ui@2.0.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4_/node_modules/@inkjs/ui/build/components/email-input/use-email-input.js
134434
- var import_react70 = __toESM(require_react(), 1);
134566
+ var import_react71 = __toESM(require_react(), 1);
134435
134567
  var cursor3 = source_default.inverse(" ");
134436
134568
 
134437
134569
  // src/hooks/useInputFocus.tsx
134438
- var import_react72 = __toESM(require_react(), 1);
134439
- var InputFocusContext = (0, import_react72.createContext)({
134570
+ var import_react73 = __toESM(require_react(), 1);
134571
+ var InputFocusContext = (0, import_react73.createContext)({
134440
134572
  isInputActive: false,
134441
134573
  setInputActive: () => {
134442
134574
  }
@@ -134444,18 +134576,18 @@ var InputFocusContext = (0, import_react72.createContext)({
134444
134576
  function InputFocusProvider({
134445
134577
  children
134446
134578
  }) {
134447
- const [isInputActive, setIsInputActive] = (0, import_react72.useState)(false);
134448
- const setInputActive = (0, import_react72.useCallback)((active2) => {
134579
+ const [isInputActive, setIsInputActive] = (0, import_react73.useState)(false);
134580
+ const setInputActive = (0, import_react73.useCallback)((active2) => {
134449
134581
  setIsInputActive(active2);
134450
134582
  }, []);
134451
- return import_react72.default.createElement(
134583
+ return import_react73.default.createElement(
134452
134584
  InputFocusContext.Provider,
134453
134585
  { value: { isInputActive, setInputActive } },
134454
134586
  children
134455
134587
  );
134456
134588
  }
134457
134589
  function useInputFocus() {
134458
- return (0, import_react72.useContext)(InputFocusContext);
134590
+ return (0, import_react73.useContext)(InputFocusContext);
134459
134591
  }
134460
134592
 
134461
134593
  // src/services/Auth.ts
@@ -135079,12 +135211,12 @@ function TokenInputModal({
135079
135211
  }) {
135080
135212
  const theme14 = useTheme();
135081
135213
  const { setInputActive } = useInputFocus();
135082
- const [value5, setValue] = (0, import_react73.useState)("");
135214
+ const [value5, setValue] = (0, import_react74.useState)("");
135083
135215
  const provider = getAuthProvider();
135084
135216
  const meta3 = getProviderMeta(provider);
135085
135217
  const envVarName = getEnvVarName(provider);
135086
135218
  const tokenFilePath = getProviderTokenFilePath(provider);
135087
- (0, import_react73.useEffect)(() => {
135219
+ (0, import_react74.useEffect)(() => {
135088
135220
  setInputActive(true);
135089
135221
  return () => setInputActive(false);
135090
135222
  }, [setInputActive]);
@@ -135168,7 +135300,7 @@ function TokenInputModal({
135168
135300
  }
135169
135301
 
135170
135302
  // src/components/layout/OnboardingScreen.tsx
135171
- var import_react74 = __toESM(require_react(), 1);
135303
+ var import_react75 = __toESM(require_react(), 1);
135172
135304
  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
135173
135305
  var ONBOARDING_STEPS = [
135174
135306
  {
@@ -135247,7 +135379,7 @@ function OnboardingScreen({
135247
135379
  onComplete
135248
135380
  }) {
135249
135381
  const theme14 = useTheme();
135250
- const [stepIndex, setStepIndex] = (0, import_react74.useState)(0);
135382
+ const [stepIndex, setStepIndex] = (0, import_react75.useState)(0);
135251
135383
  const totalSteps = ONBOARDING_STEPS.length;
135252
135384
  const currentStep = ONBOARDING_STEPS[stepIndex];
135253
135385
  const isLastStep = stepIndex === totalSteps - 1;
@@ -135313,7 +135445,7 @@ function OnboardingScreen({
135313
135445
  }
135314
135446
 
135315
135447
  // src/components/common/ErrorBoundary.tsx
135316
- var import_react75 = __toESM(require_react(), 1);
135448
+ var import_react76 = __toESM(require_react(), 1);
135317
135449
  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
135318
135450
  function ErrorFallback({ error: error48, onRetry }) {
135319
135451
  const { exit: exit4 } = use_app_default();
@@ -135340,7 +135472,7 @@ function ErrorFallback({ error: error48, onRetry }) {
135340
135472
  }
135341
135473
  );
135342
135474
  }
135343
- var ErrorBoundary2 = class extends import_react75.default.Component {
135475
+ var ErrorBoundary2 = class extends import_react76.default.Component {
135344
135476
  constructor(props) {
135345
135477
  super(props);
135346
135478
  this.state = { error: null };
@@ -135360,7 +135492,7 @@ var ErrorBoundary2 = class extends import_react75.default.Component {
135360
135492
  };
135361
135493
 
135362
135494
  // src/components/common/CommandPalette.tsx
135363
- var import_react76 = __toESM(require_react(), 1);
135495
+ var import_react77 = __toESM(require_react(), 1);
135364
135496
 
135365
135497
  // src/utils/fuzzy-search.ts
135366
135498
  var CONSECUTIVE_BONUS = 5;
@@ -135467,7 +135599,7 @@ function ActionRow({
135467
135599
  }
135468
135600
  function renderHighlightedText(text, indices, normalColor, highlightColor) {
135469
135601
  if (indices.length === 0) {
135470
- return import_react76.default.createElement(Text, { color: normalColor }, text);
135602
+ return import_react77.default.createElement(Text, { color: normalColor }, text);
135471
135603
  }
135472
135604
  const indexSet = new Set(indices);
135473
135605
  const parts2 = [];
@@ -135477,7 +135609,7 @@ function renderHighlightedText(text, indices, normalColor, highlightColor) {
135477
135609
  const isHighlighted = indexSet.has(i);
135478
135610
  if (isHighlighted !== currentIsHighlighted && currentRun.length > 0) {
135479
135611
  parts2.push(
135480
- import_react76.default.createElement(
135612
+ import_react77.default.createElement(
135481
135613
  Text,
135482
135614
  {
135483
135615
  key: `${i}-${currentRun}`,
@@ -135494,7 +135626,7 @@ function renderHighlightedText(text, indices, normalColor, highlightColor) {
135494
135626
  }
135495
135627
  if (currentRun.length > 0) {
135496
135628
  parts2.push(
135497
- import_react76.default.createElement(
135629
+ import_react77.default.createElement(
135498
135630
  Text,
135499
135631
  {
135500
135632
  key: `end-${currentRun}`,
@@ -135505,7 +135637,7 @@ function renderHighlightedText(text, indices, normalColor, highlightColor) {
135505
135637
  )
135506
135638
  );
135507
135639
  }
135508
- return import_react76.default.createElement(import_react76.default.Fragment, null, ...parts2);
135640
+ return import_react77.default.createElement(import_react77.default.Fragment, null, ...parts2);
135509
135641
  }
135510
135642
  function CommandPalette({
135511
135643
  actions,
@@ -135514,13 +135646,13 @@ function CommandPalette({
135514
135646
  }) {
135515
135647
  const theme14 = useTheme();
135516
135648
  const { setInputActive } = useInputFocus();
135517
- const [query, setQuery] = (0, import_react76.useState)("");
135518
- const [selectedIndex, setSelectedIndex] = (0, import_react76.useState)(0);
135519
- (0, import_react76.useEffect)(() => {
135649
+ const [query, setQuery] = (0, import_react77.useState)("");
135650
+ const [selectedIndex, setSelectedIndex] = (0, import_react77.useState)(0);
135651
+ (0, import_react77.useEffect)(() => {
135520
135652
  setInputActive(true);
135521
135653
  return () => setInputActive(false);
135522
135654
  }, [setInputActive]);
135523
- const filteredActions = (0, import_react76.useMemo)(() => {
135655
+ const filteredActions = (0, import_react77.useMemo)(() => {
135524
135656
  const results = fuzzyFilter(
135525
135657
  actions,
135526
135658
  query,
@@ -135528,7 +135660,7 @@ function CommandPalette({
135528
135660
  );
135529
135661
  return results;
135530
135662
  }, [actions, query]);
135531
- (0, import_react76.useEffect)(() => {
135663
+ (0, import_react77.useEffect)(() => {
135532
135664
  setSelectedIndex(0);
135533
135665
  }, [query]);
135534
135666
  const visibleCount = Math.min(MAX_VISIBLE_ITEMS, filteredActions.length);
@@ -135771,10 +135903,10 @@ function buildCommandPaletteActions(screenContext, overrides) {
135771
135903
  }
135772
135904
 
135773
135905
  // src/screens/PRDetailScreen.tsx
135774
- var import_react126 = __toESM(require_react(), 1);
135906
+ var import_react128 = __toESM(require_react(), 1);
135775
135907
 
135776
135908
  // src/hooks/useGitHub.ts
135777
- var import_react79 = __toESM(require_react(), 1);
135909
+ var import_react80 = __toESM(require_react(), 1);
135778
135910
 
135779
135911
  // src/services/GitHubApiTypes.ts
135780
135912
  var GitHubApi = class extends Context_exports.Tag("GitHubApi")() {
@@ -135830,7 +135962,7 @@ var PullRequest = class extends Schema_exports.Class("PullRequest")({
135830
135962
  };
135831
135963
 
135832
135964
  // src/hooks/useTokenExpired.ts
135833
- var import_react77 = __toESM(require_react(), 1);
135965
+ var import_react78 = __toESM(require_react(), 1);
135834
135966
  function createTokenExpiredStore() {
135835
135967
  let expired = false;
135836
135968
  let listeners3 = [];
@@ -135866,7 +135998,7 @@ function clearTokenExpired() {
135866
135998
  store4.reset();
135867
135999
  }
135868
136000
  function useTokenExpired() {
135869
- const isTokenExpired = (0, import_react77.useSyncExternalStore)(
136001
+ const isTokenExpired = (0, import_react78.useSyncExternalStore)(
135870
136002
  store4.subscribe,
135871
136003
  store4.getSnapshot,
135872
136004
  () => false
@@ -137220,7 +137352,7 @@ function useRefreshInterval(overrideSeconds) {
137220
137352
  }
137221
137353
 
137222
137354
  // src/hooks/useSharedPRCache.ts
137223
- var import_react78 = __toESM(require_react(), 1);
137355
+ var import_react79 = __toESM(require_react(), 1);
137224
137356
  var CACHE_STALENESS_MS = 2 * 60 * 1e3;
137225
137357
  var involvedKey = (stateFilter) => [
137226
137358
  "involved-prs",
@@ -137312,7 +137444,7 @@ function useSharedPRCache(stateFilter) {
137312
137444
  const queryClient2 = useQueryClient();
137313
137445
  const { data: currentUser } = useCurrentUser();
137314
137446
  const currentUserLogin = currentUser?.login;
137315
- const derived = (0, import_react78.useMemo)(
137447
+ const derived = (0, import_react79.useMemo)(
137316
137448
  () => deriveCacheData(queryClient2, stateFilter, currentUserLogin),
137317
137449
  // We intentionally depend on the queryClient object identity rather than
137318
137450
  // its internal cache state. The placeholder data is used as *initial*
@@ -137776,7 +137908,7 @@ function useMyPRs(stateFilter = "open") {
137776
137908
  placeholderData: myPRsPlaceholder,
137777
137909
  refetchInterval
137778
137910
  });
137779
- (0, import_react79.useEffect)(() => {
137911
+ (0, import_react80.useEffect)(() => {
137780
137912
  if (query.data && query.isFetched) {
137781
137913
  crossPopulateToInvolved(queryClient2, stateFilter);
137782
137914
  }
@@ -137798,7 +137930,7 @@ function useReviewRequests(stateFilter = "open") {
137798
137930
  placeholderData: reviewRequestsPlaceholder,
137799
137931
  refetchInterval
137800
137932
  });
137801
- (0, import_react79.useEffect)(() => {
137933
+ (0, import_react80.useEffect)(() => {
137802
137934
  if (query.data && query.isFetched) {
137803
137935
  crossPopulateToInvolved(queryClient2, stateFilter);
137804
137936
  }
@@ -137820,7 +137952,7 @@ function useInvolvedPRs(stateFilter = "open") {
137820
137952
  placeholderData: involvedPlaceholder,
137821
137953
  refetchInterval
137822
137954
  });
137823
- (0, import_react79.useEffect)(() => {
137955
+ (0, import_react80.useEffect)(() => {
137824
137956
  if (query.data && query.isFetched && currentUserLogin) {
137825
137957
  crossPopulateFromInvolved(queryClient2, stateFilter, query.data, currentUserLogin);
137826
137958
  }
@@ -137946,11 +138078,11 @@ function useCompareFiles(owner, repo, base, head6, options) {
137946
138078
  }
137947
138079
 
137948
138080
  // src/hooks/usePaginatedFiles.ts
137949
- var import_react80 = __toESM(require_react(), 1);
138081
+ var import_react81 = __toESM(require_react(), 1);
137950
138082
  var PAGINATION_THRESHOLD = 300;
137951
138083
  function usePaginatedFiles(owner, repo, prNumber, changedFileCount, options) {
137952
138084
  const enabledFlag = options?.enabled ?? true;
137953
- const [maxPage, setMaxPage] = (0, import_react80.useState)(1);
138085
+ const [maxPage, setMaxPage] = (0, import_react81.useState)(1);
137954
138086
  const needsPagination = changedFileCount >= PAGINATION_THRESHOLD;
137955
138087
  const standardQuery = useQuery({
137956
138088
  queryKey: ["pr-files", owner, repo, prNumber],
@@ -137970,7 +138102,7 @@ function usePaginatedFiles(owner, repo, prNumber, changedFileCount, options) {
137970
138102
  maxPage,
137971
138103
  enabledFlag && needsPagination
137972
138104
  );
137973
- const loadNextPage = (0, import_react80.useCallback)(() => {
138105
+ const loadNextPage = (0, import_react81.useCallback)(() => {
137974
138106
  if (needsPagination) {
137975
138107
  setMaxPage((prev) => prev + 1);
137976
138108
  }
@@ -138040,7 +138172,7 @@ function usePaginatedPageQueries(owner, repo, prNumber, maxPage, enabled2) {
138040
138172
  staleTime: 30 * 1e3
138041
138173
  });
138042
138174
  const pages = [page1, page2, page3, page4];
138043
- const allFiles = (0, import_react80.useMemo)(() => {
138175
+ const allFiles = (0, import_react81.useMemo)(() => {
138044
138176
  const files = [];
138045
138177
  for (const page of pages) {
138046
138178
  if (page.data) {
@@ -138056,23 +138188,23 @@ function usePaginatedPageQueries(owner, repo, prNumber, maxPage, enabled2) {
138056
138188
  }
138057
138189
 
138058
138190
  // src/hooks/useReviewActions.ts
138059
- var import_react81 = __toESM(require_react(), 1);
138191
+ var import_react82 = __toESM(require_react(), 1);
138060
138192
  function useReviewActions({
138061
138193
  owner,
138062
138194
  repo,
138063
138195
  prNumber,
138064
138196
  setStatusMessage
138065
138197
  }) {
138066
- const [showReviewModal, setShowReviewModal] = (0, import_react81.useState)(false);
138067
- const [reviewError, setReviewError] = (0, import_react81.useState)(null);
138068
- const [showReReviewModal, setShowReReviewModal] = (0, import_react81.useState)(false);
138069
- const [reReviewError, setReReviewError] = (0, import_react81.useState)(null);
138070
- const [showResolved, setShowResolved] = (0, import_react81.useState)(true);
138198
+ const [showReviewModal, setShowReviewModal] = (0, import_react82.useState)(false);
138199
+ const [reviewError, setReviewError] = (0, import_react82.useState)(null);
138200
+ const [showReReviewModal, setShowReReviewModal] = (0, import_react82.useState)(false);
138201
+ const [reReviewError, setReReviewError] = (0, import_react82.useState)(null);
138202
+ const [showResolved, setShowResolved] = (0, import_react82.useState)(true);
138071
138203
  const submitReview = useSubmitReview();
138072
138204
  const resolveThread = useResolveReviewThread();
138073
138205
  const unresolveThread = useUnresolveReviewThread();
138074
138206
  const requestReReview = useRequestReReview();
138075
- const handleReviewSubmit = (0, import_react81.useCallback)(
138207
+ const handleReviewSubmit = (0, import_react82.useCallback)(
138076
138208
  (body, event) => {
138077
138209
  setReviewError(null);
138078
138210
  submitReview.mutate(
@@ -138088,7 +138220,7 @@ function useReviewActions({
138088
138220
  },
138089
138221
  [owner, repo, prNumber, submitReview, setStatusMessage]
138090
138222
  );
138091
- const handleToggleResolve2 = (0, import_react81.useCallback)(
138223
+ const handleToggleResolve2 = (0, import_react82.useCallback)(
138092
138224
  (context6) => {
138093
138225
  if (context6.isResolved) {
138094
138226
  unresolveThread.mutate(
@@ -138110,10 +138242,10 @@ function useReviewActions({
138110
138242
  },
138111
138243
  [owner, repo, prNumber, resolveThread, unresolveThread, setStatusMessage]
138112
138244
  );
138113
- const handleToggleShowResolved = (0, import_react81.useCallback)(() => {
138245
+ const handleToggleShowResolved = (0, import_react82.useCallback)(() => {
138114
138246
  setShowResolved((prev) => !prev);
138115
138247
  }, []);
138116
- const handleReReviewSubmit = (0, import_react81.useCallback)(
138248
+ const handleReReviewSubmit = (0, import_react82.useCallback)(
138117
138249
  (reviewers) => {
138118
138250
  setReReviewError(null);
138119
138251
  requestReReview.mutate(
@@ -138129,11 +138261,11 @@ function useReviewActions({
138129
138261
  },
138130
138262
  [owner, repo, prNumber, requestReReview, setStatusMessage]
138131
138263
  );
138132
- const openReviewModal = (0, import_react81.useCallback)(() => {
138264
+ const openReviewModal = (0, import_react82.useCallback)(() => {
138133
138265
  setReviewError(null);
138134
138266
  setShowReviewModal(true);
138135
138267
  }, []);
138136
- const openReReviewModal = (0, import_react81.useCallback)(() => {
138268
+ const openReReviewModal = (0, import_react82.useCallback)(() => {
138137
138269
  setReReviewError(null);
138138
138270
  setShowReReviewModal(true);
138139
138271
  }, []);
@@ -138143,13 +138275,13 @@ function useReviewActions({
138143
138275
  submitReviewPending: submitReview.isPending,
138144
138276
  handleReviewSubmit,
138145
138277
  openReviewModal,
138146
- closeReviewModal: (0, import_react81.useCallback)(() => setShowReviewModal(false), []),
138278
+ closeReviewModal: (0, import_react82.useCallback)(() => setShowReviewModal(false), []),
138147
138279
  showReReviewModal,
138148
138280
  reReviewError,
138149
138281
  requestReReviewPending: requestReReview.isPending,
138150
138282
  handleReReviewSubmit,
138151
138283
  openReReviewModal,
138152
- closeReReviewModal: (0, import_react81.useCallback)(() => setShowReReviewModal(false), []),
138284
+ closeReReviewModal: (0, import_react82.useCallback)(() => setShowReReviewModal(false), []),
138153
138285
  handleToggleResolve: handleToggleResolve2,
138154
138286
  showResolved,
138155
138287
  handleToggleShowResolved
@@ -138157,7 +138289,7 @@ function useReviewActions({
138157
138289
  }
138158
138290
 
138159
138291
  // src/hooks/useCommentActions.ts
138160
- var import_react82 = __toESM(require_react(), 1);
138292
+ var import_react83 = __toESM(require_react(), 1);
138161
138293
  function useCommentActions({
138162
138294
  owner,
138163
138295
  repo,
@@ -138165,13 +138297,13 @@ function useCommentActions({
138165
138297
  headSha,
138166
138298
  setStatusMessage
138167
138299
  }) {
138168
- const [showCommentModal, setShowCommentModal] = (0, import_react82.useState)(false);
138169
- const [commentError, setCommentError] = (0, import_react82.useState)(null);
138170
- const [inlineContext, setInlineContext] = (0, import_react82.useState)(null);
138171
- const [replyContext, setReplyContext] = (0, import_react82.useState)(null);
138172
- const [editContext, setEditContext] = (0, import_react82.useState)(null);
138173
- const [descriptionEditContext, setDescriptionEditContext] = (0, import_react82.useState)(null);
138174
- const [titleEditContext, setTitleEditContext] = (0, import_react82.useState)(null);
138300
+ const [showCommentModal, setShowCommentModal] = (0, import_react83.useState)(false);
138301
+ const [commentError, setCommentError] = (0, import_react83.useState)(null);
138302
+ const [inlineContext, setInlineContext] = (0, import_react83.useState)(null);
138303
+ const [replyContext, setReplyContext] = (0, import_react83.useState)(null);
138304
+ const [editContext, setEditContext] = (0, import_react83.useState)(null);
138305
+ const [descriptionEditContext, setDescriptionEditContext] = (0, import_react83.useState)(null);
138306
+ const [titleEditContext, setTitleEditContext] = (0, import_react83.useState)(null);
138175
138307
  const createComment = useCreateComment();
138176
138308
  const createReviewComment = useCreateReviewComment();
138177
138309
  const replyToReviewComment = useReplyToReviewComment();
@@ -138179,7 +138311,7 @@ function useCommentActions({
138179
138311
  const editReviewCommentMutation = useEditReviewComment();
138180
138312
  const updatePRDescription = useUpdatePRDescription();
138181
138313
  const updatePRTitle = useUpdatePRTitle();
138182
- const handleOpenGeneralComment = (0, import_react82.useCallback)(() => {
138314
+ const handleOpenGeneralComment = (0, import_react83.useCallback)(() => {
138183
138315
  setCommentError(null);
138184
138316
  setInlineContext(null);
138185
138317
  setReplyContext(null);
@@ -138188,7 +138320,7 @@ function useCommentActions({
138188
138320
  setTitleEditContext(null);
138189
138321
  setShowCommentModal(true);
138190
138322
  }, []);
138191
- const handleOpenInlineComment = (0, import_react82.useCallback)((context6) => {
138323
+ const handleOpenInlineComment = (0, import_react83.useCallback)((context6) => {
138192
138324
  setCommentError(null);
138193
138325
  setInlineContext(context6);
138194
138326
  setReplyContext(null);
@@ -138197,7 +138329,7 @@ function useCommentActions({
138197
138329
  setTitleEditContext(null);
138198
138330
  setShowCommentModal(true);
138199
138331
  }, []);
138200
- const handleOpenReply = (0, import_react82.useCallback)((context6) => {
138332
+ const handleOpenReply = (0, import_react83.useCallback)((context6) => {
138201
138333
  setCommentError(null);
138202
138334
  setInlineContext(null);
138203
138335
  setReplyContext(context6);
@@ -138206,7 +138338,7 @@ function useCommentActions({
138206
138338
  setTitleEditContext(null);
138207
138339
  setShowCommentModal(true);
138208
138340
  }, []);
138209
- const handleOpenEditComment = (0, import_react82.useCallback)((context6) => {
138341
+ const handleOpenEditComment = (0, import_react83.useCallback)((context6) => {
138210
138342
  setCommentError(null);
138211
138343
  setInlineContext(null);
138212
138344
  setReplyContext(null);
@@ -138215,7 +138347,7 @@ function useCommentActions({
138215
138347
  setTitleEditContext(null);
138216
138348
  setShowCommentModal(true);
138217
138349
  }, []);
138218
- const handleOpenEditDescription = (0, import_react82.useCallback)((context6) => {
138350
+ const handleOpenEditDescription = (0, import_react83.useCallback)((context6) => {
138219
138351
  setCommentError(null);
138220
138352
  setInlineContext(null);
138221
138353
  setReplyContext(null);
@@ -138224,7 +138356,7 @@ function useCommentActions({
138224
138356
  setTitleEditContext(null);
138225
138357
  setShowCommentModal(true);
138226
138358
  }, []);
138227
- const handleOpenEditTitle = (0, import_react82.useCallback)((context6) => {
138359
+ const handleOpenEditTitle = (0, import_react83.useCallback)((context6) => {
138228
138360
  setCommentError(null);
138229
138361
  setInlineContext(null);
138230
138362
  setReplyContext(null);
@@ -138233,7 +138365,7 @@ function useCommentActions({
138233
138365
  setTitleEditContext(context6);
138234
138366
  setShowCommentModal(true);
138235
138367
  }, []);
138236
- const handleEditCommentSubmit = (0, import_react82.useCallback)(
138368
+ const handleEditCommentSubmit = (0, import_react83.useCallback)(
138237
138369
  (body) => {
138238
138370
  if (!editContext) return;
138239
138371
  setCommentError(null);
@@ -138252,7 +138384,7 @@ function useCommentActions({
138252
138384
  },
138253
138385
  [owner, repo, prNumber, editContext, editIssueComment, editReviewCommentMutation, setStatusMessage]
138254
138386
  );
138255
- const handleEditDescriptionSubmit = (0, import_react82.useCallback)(
138387
+ const handleEditDescriptionSubmit = (0, import_react83.useCallback)(
138256
138388
  (body) => {
138257
138389
  if (!descriptionEditContext) return;
138258
138390
  setCommentError(null);
@@ -138270,7 +138402,7 @@ function useCommentActions({
138270
138402
  },
138271
138403
  [owner, repo, prNumber, descriptionEditContext, updatePRDescription, setStatusMessage]
138272
138404
  );
138273
- const handleEditTitleSubmit = (0, import_react82.useCallback)(
138405
+ const handleEditTitleSubmit = (0, import_react83.useCallback)(
138274
138406
  (title) => {
138275
138407
  if (!titleEditContext) return;
138276
138408
  setCommentError(null);
@@ -138288,7 +138420,7 @@ function useCommentActions({
138288
138420
  },
138289
138421
  [owner, repo, prNumber, titleEditContext, updatePRTitle, setStatusMessage]
138290
138422
  );
138291
- const handleCommentSubmit = (0, import_react82.useCallback)(
138423
+ const handleCommentSubmit = (0, import_react83.useCallback)(
138292
138424
  (body) => {
138293
138425
  setCommentError(null);
138294
138426
  if (titleEditContext) {
@@ -138389,7 +138521,7 @@ ${body}`;
138389
138521
  setStatusMessage
138390
138522
  ]
138391
138523
  );
138392
- const closeCommentModal = (0, import_react82.useCallback)(() => {
138524
+ const closeCommentModal = (0, import_react83.useCallback)(() => {
138393
138525
  setShowCommentModal(false);
138394
138526
  setInlineContext(null);
138395
138527
  setReplyContext(null);
@@ -138424,7 +138556,7 @@ ${body}`;
138424
138556
  }
138425
138557
 
138426
138558
  // src/hooks/usePRStateActions.ts
138427
- var import_react83 = __toESM(require_react(), 1);
138559
+ var import_react84 = __toESM(require_react(), 1);
138428
138560
  function usePRStateActions({
138429
138561
  owner,
138430
138562
  repo,
@@ -138433,13 +138565,13 @@ function usePRStateActions({
138433
138565
  onMergeSuccess,
138434
138566
  onCloseSuccess
138435
138567
  }) {
138436
- const [showMergeModal, setShowMergeModal] = (0, import_react83.useState)(false);
138437
- const [mergeError, setMergeError] = (0, import_react83.useState)(null);
138438
- const [showCloseConfirm, setShowCloseConfirm] = (0, import_react83.useState)(false);
138568
+ const [showMergeModal, setShowMergeModal] = (0, import_react84.useState)(false);
138569
+ const [mergeError, setMergeError] = (0, import_react84.useState)(null);
138570
+ const [showCloseConfirm, setShowCloseConfirm] = (0, import_react84.useState)(false);
138439
138571
  const mergePR = useMergePR();
138440
138572
  const closePR = useClosePullRequest();
138441
138573
  const reopenPR = useReopenPullRequest();
138442
- const handleMergeSubmit = (0, import_react83.useCallback)(
138574
+ const handleMergeSubmit = (0, import_react84.useCallback)(
138443
138575
  (mergeMethod, commitTitle) => {
138444
138576
  setMergeError(null);
138445
138577
  mergePR.mutate(
@@ -138456,11 +138588,11 @@ function usePRStateActions({
138456
138588
  },
138457
138589
  [owner, repo, prNumber, mergePR, setStatusMessage, onMergeSuccess]
138458
138590
  );
138459
- const openMergeModal = (0, import_react83.useCallback)(() => {
138591
+ const openMergeModal = (0, import_react84.useCallback)(() => {
138460
138592
  setMergeError(null);
138461
138593
  setShowMergeModal(true);
138462
138594
  }, []);
138463
- const handleClosePR = (0, import_react83.useCallback)(() => {
138595
+ const handleClosePR = (0, import_react84.useCallback)(() => {
138464
138596
  closePR.mutate(
138465
138597
  { owner, repo, prNumber },
138466
138598
  {
@@ -138476,7 +138608,7 @@ function usePRStateActions({
138476
138608
  }
138477
138609
  );
138478
138610
  }, [owner, repo, prNumber, closePR, setStatusMessage, onCloseSuccess]);
138479
- const handleReopenPR = (0, import_react83.useCallback)(() => {
138611
+ const handleReopenPR = (0, import_react84.useCallback)(() => {
138480
138612
  reopenPR.mutate(
138481
138613
  { owner, repo, prNumber },
138482
138614
  {
@@ -138491,10 +138623,10 @@ function usePRStateActions({
138491
138623
  mergePRPending: mergePR.isPending,
138492
138624
  handleMergeSubmit,
138493
138625
  openMergeModal,
138494
- closeMergeModal: (0, import_react83.useCallback)(() => setShowMergeModal(false), []),
138626
+ closeMergeModal: (0, import_react84.useCallback)(() => setShowMergeModal(false), []),
138495
138627
  showCloseConfirm,
138496
- openCloseConfirm: (0, import_react83.useCallback)(() => setShowCloseConfirm(true), []),
138497
- closeCloseConfirm: (0, import_react83.useCallback)(() => setShowCloseConfirm(false), []),
138628
+ openCloseConfirm: (0, import_react84.useCallback)(() => setShowCloseConfirm(true), []),
138629
+ closeCloseConfirm: (0, import_react84.useCallback)(() => setShowCloseConfirm(false), []),
138498
138630
  handleClosePR,
138499
138631
  handleReopenPR,
138500
138632
  closePRPending: closePR.isPending,
@@ -138569,22 +138701,22 @@ function usePRDetailModals({
138569
138701
  }
138570
138702
 
138571
138703
  // src/hooks/usePendingReview.ts
138572
- var import_react84 = __toESM(require_react(), 1);
138704
+ var import_react85 = __toESM(require_react(), 1);
138573
138705
  function usePendingReview({
138574
138706
  owner,
138575
138707
  repo,
138576
138708
  prNumber,
138577
138709
  setStatusMessage
138578
138710
  }) {
138579
- const [reviewId, setReviewId] = (0, import_react84.useState)(null);
138580
- const [pendingComments, setPendingComments] = (0, import_react84.useState)([]);
138581
- const [error48, setError] = (0, import_react84.useState)(null);
138711
+ const [reviewId, setReviewId] = (0, import_react85.useState)(null);
138712
+ const [pendingComments, setPendingComments] = (0, import_react85.useState)([]);
138713
+ const [error48, setError] = (0, import_react85.useState)(null);
138582
138714
  const createPending = useCreatePendingReview();
138583
138715
  const addComment = useAddPendingReviewComment();
138584
138716
  const submitPending = useSubmitPendingReview();
138585
138717
  const discardPending = useDiscardPendingReview();
138586
138718
  const isActive2 = reviewId != null;
138587
- const startReview = (0, import_react84.useCallback)(() => {
138719
+ const startReview = (0, import_react85.useCallback)(() => {
138588
138720
  setError(null);
138589
138721
  createPending.mutate(
138590
138722
  { owner, repo, prNumber },
@@ -138601,7 +138733,7 @@ function usePendingReview({
138601
138733
  }
138602
138734
  );
138603
138735
  }, [owner, repo, prNumber, createPending, setStatusMessage]);
138604
- const addPendingComment = (0, import_react84.useCallback)(
138736
+ const addPendingComment = (0, import_react85.useCallback)(
138605
138737
  (comment, body) => {
138606
138738
  if (reviewId == null) return;
138607
138739
  setError(null);
@@ -138632,7 +138764,7 @@ function usePendingReview({
138632
138764
  },
138633
138765
  [owner, repo, prNumber, reviewId, addComment, pendingComments.length, setStatusMessage]
138634
138766
  );
138635
- const submitReview = (0, import_react84.useCallback)(
138767
+ const submitReview = (0, import_react85.useCallback)(
138636
138768
  (body, event) => {
138637
138769
  if (reviewId == null) return;
138638
138770
  setError(null);
@@ -138653,7 +138785,7 @@ function usePendingReview({
138653
138785
  },
138654
138786
  [owner, repo, prNumber, reviewId, submitPending, setStatusMessage]
138655
138787
  );
138656
- const discardReview = (0, import_react84.useCallback)(() => {
138788
+ const discardReview = (0, import_react85.useCallback)(() => {
138657
138789
  if (reviewId == null) return;
138658
138790
  setError(null);
138659
138791
  discardPending.mutate(
@@ -139765,7 +139897,7 @@ function PRHeader({ pr, prIndex, prTotal, hasNotes }) {
139765
139897
  }
139766
139898
 
139767
139899
  // node_modules/.pnpm/ink-tab@5.2.0_@types+react@19.2.13_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-tab/lib/index.js
139768
- var import_react85 = __toESM(require_react(), 1);
139900
+ var import_react86 = __toESM(require_react(), 1);
139769
139901
  import readline from "readline";
139770
139902
  var _excluded = ["children", "flexDirection", "width", "isFocused", "showIndex", "colors"];
139771
139903
  function _typeof(obj) {
@@ -139943,7 +140075,7 @@ function _toPrimitive(input, hint) {
139943
140075
  }
139944
140076
  var Tab = function Tab2(_ref) {
139945
140077
  var children = _ref.children;
139946
- return /* @__PURE__ */ import_react85.default.createElement(import_react85.default.Fragment, null, children);
140078
+ return /* @__PURE__ */ import_react86.default.createElement(import_react86.default.Fragment, null, children);
139947
140079
  };
139948
140080
  var TabsWithStdin = /* @__PURE__ */ (function(_React$Component) {
139949
140081
  _inherits(TabsWithStdin2, _React$Component);
@@ -140099,7 +140231,7 @@ var TabsWithStdin = /* @__PURE__ */ (function(_React$Component) {
140099
140231
  var activeTab = this.state.activeTab;
140100
140232
  var separatorWidth = width !== null && width !== void 0 ? width : 6;
140101
140233
  var separator = this.isColumn() ? new Array(separatorWidth).fill("\u2500").join("") : " | ";
140102
- return /* @__PURE__ */ import_react85.default.createElement(Box_default, _extends({
140234
+ return /* @__PURE__ */ import_react86.default.createElement(Box_default, _extends({
140103
140235
  flexDirection,
140104
140236
  width
140105
140237
  }, rest), children.map(function(child, key) {
@@ -140117,19 +140249,19 @@ var TabsWithStdin = /* @__PURE__ */ (function(_React$Component) {
140117
140249
  color: activeTab === key ? "black" : void 0
140118
140250
  };
140119
140251
  }
140120
- return /* @__PURE__ */ import_react85.default.createElement(Box_default, {
140252
+ return /* @__PURE__ */ import_react86.default.createElement(Box_default, {
140121
140253
  key: name,
140122
140254
  flexDirection
140123
- }, key !== 0 && /* @__PURE__ */ import_react85.default.createElement(Text, {
140255
+ }, key !== 0 && /* @__PURE__ */ import_react86.default.createElement(Text, {
140124
140256
  color: "dim"
140125
- }, separator), /* @__PURE__ */ import_react85.default.createElement(Box_default, null, showIndex === true && /* @__PURE__ */ import_react85.default.createElement(Text, {
140257
+ }, separator), /* @__PURE__ */ import_react86.default.createElement(Box_default, null, showIndex === true && /* @__PURE__ */ import_react86.default.createElement(Text, {
140126
140258
  color: "grey"
140127
- }, key + 1, ". "), /* @__PURE__ */ import_react85.default.createElement(Text, colors2, child)));
140259
+ }, key + 1, ". "), /* @__PURE__ */ import_react86.default.createElement(Text, colors2, child)));
140128
140260
  }));
140129
140261
  }
140130
140262
  }]);
140131
140263
  return TabsWithStdin2;
140132
- })(import_react85.default.Component);
140264
+ })(import_react86.default.Component);
140133
140265
  _defineProperty(TabsWithStdin, "defaultProps", {
140134
140266
  flexDirection: "row",
140135
140267
  keyMap: null,
@@ -140140,7 +140272,7 @@ _defineProperty(TabsWithStdin, "defaultProps", {
140140
140272
  });
140141
140273
  var Tabs = function Tabs2(props) {
140142
140274
  var _useStdin = use_stdin_default(), isRawModeSupported = _useStdin.isRawModeSupported, stdin = _useStdin.stdin, setRawMode = _useStdin.setRawMode;
140143
- return /* @__PURE__ */ import_react85.default.createElement(TabsWithStdin, _extends({
140275
+ return /* @__PURE__ */ import_react86.default.createElement(TabsWithStdin, _extends({
140144
140276
  isRawModeSupported,
140145
140277
  stdin,
140146
140278
  setRawMode
@@ -140176,33 +140308,33 @@ function PRTabs({ activeIndex, onChange }) {
140176
140308
  }
140177
140309
 
140178
140310
  // src/components/pr/DescriptionTab.tsx
140179
- var import_react91 = __toESM(require_react(), 1);
140311
+ var import_react92 = __toESM(require_react(), 1);
140180
140312
 
140181
140313
  // src/hooks/useListNavigation.ts
140182
- var import_react86 = __toESM(require_react(), 1);
140314
+ var import_react87 = __toESM(require_react(), 1);
140183
140315
  function useListNavigation({
140184
140316
  itemCount,
140185
140317
  viewportHeight,
140186
140318
  isActive: isActive2 = true
140187
140319
  }) {
140188
- const [selectedIndex, setSelectedIndex] = (0, import_react86.useState)(0);
140189
- const gPressedAt = (0, import_react86.useRef)(null);
140190
- const prevItemCount = (0, import_react86.useRef)(itemCount);
140191
- (0, import_react86.useEffect)(() => {
140320
+ const [selectedIndex, setSelectedIndex] = (0, import_react87.useState)(0);
140321
+ const gPressedAt = (0, import_react87.useRef)(null);
140322
+ const prevItemCount = (0, import_react87.useRef)(itemCount);
140323
+ (0, import_react87.useEffect)(() => {
140192
140324
  const wasAtEnd = selectedIndex === prevItemCount.current - 1;
140193
140325
  prevItemCount.current = itemCount;
140194
140326
  if (wasAtEnd && itemCount > 0) {
140195
140327
  setSelectedIndex(itemCount - 1);
140196
140328
  }
140197
140329
  }, [itemCount, selectedIndex]);
140198
- (0, import_react86.useEffect)(() => {
140330
+ (0, import_react87.useEffect)(() => {
140199
140331
  if (itemCount === 0) {
140200
140332
  setSelectedIndex(0);
140201
140333
  } else if (selectedIndex >= itemCount) {
140202
140334
  setSelectedIndex(itemCount - 1);
140203
140335
  }
140204
140336
  }, [itemCount, selectedIndex]);
140205
- const clamp9 = (0, import_react86.useCallback)(
140337
+ const clamp9 = (0, import_react87.useCallback)(
140206
140338
  (index) => Math.max(0, Math.min(index, itemCount - 1)),
140207
140339
  [itemCount]
140208
140340
  );
@@ -140676,13 +140808,13 @@ function BotSummarySection({
140676
140808
  }
140677
140809
 
140678
140810
  // src/components/common/Spinner.tsx
140679
- var import_react87 = __toESM(require_react(), 1);
140811
+ var import_react88 = __toESM(require_react(), 1);
140680
140812
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
140681
140813
  var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
140682
140814
  function Spinner2({ label }) {
140683
140815
  const theme14 = useTheme();
140684
- const [frame, setFrame] = (0, import_react87.useState)(0);
140685
- (0, import_react87.useEffect)(() => {
140816
+ const [frame, setFrame] = (0, import_react88.useState)(0);
140817
+ (0, import_react88.useEffect)(() => {
140686
140818
  const timer = setInterval(() => {
140687
140819
  setFrame((prev) => (prev + 1) % SPINNER_FRAMES.length);
140688
140820
  }, 80);
@@ -140775,7 +140907,7 @@ function AiSummarySection({
140775
140907
  }
140776
140908
 
140777
140909
  // src/components/pr/DependencySection.tsx
140778
- var import_react88 = __toESM(require_react(), 1);
140910
+ var import_react89 = __toESM(require_react(), 1);
140779
140911
  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
140780
140912
  function formatRelationshipLabel(relationship) {
140781
140913
  const labels = {
@@ -140807,8 +140939,8 @@ function DependencySection({
140807
140939
  onNavigate
140808
140940
  }) {
140809
140941
  const theme14 = useTheme();
140810
- const [isExpanded, setIsExpanded] = (0, import_react88.useState)(false);
140811
- const [selectedIndex, setSelectedIndex] = (0, import_react88.useState)(0);
140942
+ const [isExpanded, setIsExpanded] = (0, import_react89.useState)(false);
140943
+ const [selectedIndex, setSelectedIndex] = (0, import_react89.useState)(0);
140812
140944
  use_input_default(
140813
140945
  (input, key) => {
140814
140946
  if (input === "d" && !key.ctrl && !key.meta) {
@@ -140886,7 +141018,7 @@ function DependencySection({
140886
141018
  }
140887
141019
 
140888
141020
  // src/components/pr/ReviewChecklist.tsx
140889
- var import_react89 = __toESM(require_react(), 1);
141021
+ var import_react90 = __toESM(require_react(), 1);
140890
141022
 
140891
141023
  // src/models/review-checklist.ts
140892
141024
  var ChecklistItemSchema = external_exports.object({
@@ -140912,8 +141044,8 @@ function ReviewChecklist({
140912
141044
  isActive: isActive2
140913
141045
  }) {
140914
141046
  const theme14 = useTheme();
140915
- const [isExpanded, setIsExpanded] = (0, import_react89.useState)(false);
140916
- const [selectedIndex, setSelectedIndex] = (0, import_react89.useState)(0);
141047
+ const [isExpanded, setIsExpanded] = (0, import_react90.useState)(false);
141048
+ const [selectedIndex, setSelectedIndex] = (0, import_react90.useState)(0);
140917
141049
  const summary5 = completionSummary(state);
140918
141050
  use_input_default(
140919
141051
  (input, key) => {
@@ -141221,7 +141353,7 @@ function computeChainStatus(chain) {
141221
141353
  }
141222
141354
 
141223
141355
  // src/components/pr/PRChainView.tsx
141224
- var import_react90 = __toESM(require_react(), 1);
141356
+ var import_react91 = __toESM(require_react(), 1);
141225
141357
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
141226
141358
  function getStatusColor(status, colors2) {
141227
141359
  const colorMap = {
@@ -141259,8 +141391,8 @@ function PRChainView({
141259
141391
  defaultExpanded = false
141260
141392
  }) {
141261
141393
  const theme14 = useTheme();
141262
- const [isExpanded, setIsExpanded] = (0, import_react90.useState)(defaultExpanded);
141263
- const [selectedIndex, setSelectedIndex] = (0, import_react90.useState)(() => {
141394
+ const [isExpanded, setIsExpanded] = (0, import_react91.useState)(defaultExpanded);
141395
+ const [selectedIndex, setSelectedIndex] = (0, import_react91.useState)(() => {
141264
141396
  const currentIdx = chain.findIndex((n) => n.isCurrentlyViewing);
141265
141397
  return currentIdx >= 0 ? currentIdx : 0;
141266
141398
  });
@@ -141453,7 +141585,7 @@ function DescriptionTab({
141453
141585
  }) {
141454
141586
  const theme14 = useTheme();
141455
141587
  const { stdout } = use_stdout_default();
141456
- const [botSummaryExpanded, setBotSummaryExpanded] = (0, import_react91.useState)(false);
141588
+ const [botSummaryExpanded, setBotSummaryExpanded] = (0, import_react92.useState)(false);
141457
141589
  const contentHeight = Math.max(
141458
141590
  1,
141459
141591
  (stdout?.rows ?? 24) - PR_DETAIL_CONTENT_HEIGHT_RESERVED
@@ -141462,19 +141594,19 @@ function DescriptionTab({
141462
141594
  1,
141463
141595
  contentHeight - DESCRIPTION_HEADER_LINES
141464
141596
  );
141465
- const botComment = (0, import_react91.useMemo)(
141597
+ const botComment = (0, import_react92.useMemo)(
141466
141598
  () => findMostRecentBotComment(issueComments ?? [], botUsernames),
141467
141599
  [issueComments, botUsernames]
141468
141600
  );
141469
- const dependencies = (0, import_react91.useMemo)(
141601
+ const dependencies = (0, import_react92.useMemo)(
141470
141602
  () => buildDependencyChain(pr, allPRs ?? []),
141471
141603
  [pr, allPRs]
141472
141604
  );
141473
- const prChain = (0, import_react91.useMemo)(
141605
+ const prChain = (0, import_react92.useMemo)(
141474
141606
  () => detectPRChain(pr, allPRs ?? []),
141475
141607
  [pr, allPRs]
141476
141608
  );
141477
- const chainStatus = (0, import_react91.useMemo)(
141609
+ const chainStatus = (0, import_react92.useMemo)(
141478
141610
  () => computeChainStatus(prChain),
141479
141611
  [prChain]
141480
141612
  );
@@ -141577,13 +141709,13 @@ function DescriptionTab({
141577
141709
  }
141578
141710
 
141579
141711
  // src/components/pr/FilesTab.tsx
141580
- var import_react106 = __toESM(require_react(), 1);
141712
+ var import_react107 = __toESM(require_react(), 1);
141581
141713
 
141582
141714
  // src/hooks/useViewedFiles.ts
141583
- var import_react93 = __toESM(require_react(), 1);
141715
+ var import_react94 = __toESM(require_react(), 1);
141584
141716
 
141585
141717
  // src/services/state/StateProvider.tsx
141586
- var import_react92 = __toESM(require_react(), 1);
141718
+ var import_react93 = __toESM(require_react(), 1);
141587
141719
 
141588
141720
  // src/services/state/StateStore.ts
141589
141721
  var import_sql = __toESM(require_sql_wasm(), 1);
@@ -141986,13 +142118,13 @@ function buildStoreFromInit(init) {
141986
142118
  }
141987
142119
 
141988
142120
  // src/services/state/StateProvider.tsx
141989
- var StateStoreContext = (0, import_react92.createContext)(null);
142121
+ var StateStoreContext = (0, import_react93.createContext)(null);
141990
142122
  function StateProvider({
141991
142123
  store: externalStore,
141992
142124
  children
141993
142125
  }) {
141994
- const [store8, setStore] = (0, import_react92.useState)(externalStore ?? null);
141995
- (0, import_react92.useEffect)(() => {
142126
+ const [store8, setStore] = (0, import_react93.useState)(externalStore ?? null);
142127
+ (0, import_react93.useEffect)(() => {
141996
142128
  if (externalStore) {
141997
142129
  setStore(externalStore);
141998
142130
  return;
@@ -142010,14 +142142,14 @@ function StateProvider({
142010
142142
  fallback.close();
142011
142143
  };
142012
142144
  }, [externalStore]);
142013
- return import_react92.default.createElement(
142145
+ return import_react93.default.createElement(
142014
142146
  StateStoreContext.Provider,
142015
142147
  { value: store8 },
142016
142148
  children
142017
142149
  );
142018
142150
  }
142019
142151
  function useStateStore() {
142020
- return (0, import_react92.useContext)(StateStoreContext);
142152
+ return (0, import_react93.useContext)(StateStoreContext);
142021
142153
  }
142022
142154
 
142023
142155
  // src/hooks/useViewedFiles.ts
@@ -142168,37 +142300,37 @@ function getOrCreateStore(stateStore) {
142168
142300
  function useViewedFiles() {
142169
142301
  const stateStore = useStateStore();
142170
142302
  const store8 = getOrCreateStore(stateStore);
142171
- const viewedFilesData = (0, import_react93.useSyncExternalStore)(
142303
+ const viewedFilesData = (0, import_react94.useSyncExternalStore)(
142172
142304
  store8.subscribe,
142173
142305
  store8.getSnapshot,
142174
142306
  () => ({})
142175
142307
  );
142176
- const markViewed = (0, import_react93.useCallback)(
142308
+ const markViewed = (0, import_react94.useCallback)(
142177
142309
  (prUrl, filePath) => {
142178
142310
  store8.markViewed(prUrl, filePath);
142179
142311
  },
142180
142312
  [store8]
142181
142313
  );
142182
- const markUnviewed = (0, import_react93.useCallback)(
142314
+ const markUnviewed = (0, import_react94.useCallback)(
142183
142315
  (prUrl, filePath) => {
142184
142316
  store8.markUnviewed(prUrl, filePath);
142185
142317
  },
142186
142318
  [store8]
142187
142319
  );
142188
- const toggleViewed = (0, import_react93.useCallback)(
142320
+ const toggleViewed = (0, import_react94.useCallback)(
142189
142321
  (prUrl, filePath) => {
142190
142322
  store8.toggleViewed(prUrl, filePath);
142191
142323
  },
142192
142324
  [store8]
142193
142325
  );
142194
- const isViewed = (0, import_react93.useCallback)(
142326
+ const isViewed = (0, import_react94.useCallback)(
142195
142327
  (prUrl, filePath) => {
142196
142328
  return store8.isViewed(prUrl, filePath);
142197
142329
  },
142198
142330
  // eslint-disable-next-line react-hooks/exhaustive-deps
142199
142331
  [viewedFilesData, store8]
142200
142332
  );
142201
- const getViewedCount = (0, import_react93.useCallback)(
142333
+ const getViewedCount = (0, import_react94.useCallback)(
142202
142334
  (prUrl) => {
142203
142335
  return store8.getViewedCount(prUrl);
142204
142336
  },
@@ -142216,7 +142348,7 @@ function useViewedFiles() {
142216
142348
  }
142217
142349
 
142218
142350
  // src/hooks/useFileReviewStatus.ts
142219
- var import_react94 = __toESM(require_react(), 1);
142351
+ var import_react95 = __toESM(require_react(), 1);
142220
142352
  function createFileReviewStatusStore() {
142221
142353
  let data = /* @__PURE__ */ new Map();
142222
142354
  let listeners3 = [];
@@ -142306,38 +142438,38 @@ function findPrevUnreviewed(currentFile, files, statuses) {
142306
142438
  }
142307
142439
  var store5 = createFileReviewStatusStore();
142308
142440
  function useFileReviewStatus(prKey) {
142309
- const snapshot = (0, import_react94.useSyncExternalStore)(
142441
+ const snapshot = (0, import_react95.useSyncExternalStore)(
142310
142442
  store5.subscribe,
142311
142443
  store5.getSnapshot,
142312
142444
  () => /* @__PURE__ */ new Map()
142313
142445
  );
142314
142446
  const statuses = snapshot.get(prKey) ?? /* @__PURE__ */ new Map();
142315
- const setStatus = (0, import_react94.useCallback)(
142447
+ const setStatus = (0, import_react95.useCallback)(
142316
142448
  (filePath, status) => {
142317
142449
  store5.setStatus(prKey, filePath, status);
142318
142450
  },
142319
142451
  [prKey]
142320
142452
  );
142321
- const clearStatus = (0, import_react94.useCallback)(
142453
+ const clearStatus = (0, import_react95.useCallback)(
142322
142454
  (filePath) => {
142323
142455
  store5.clearStatus(prKey, filePath);
142324
142456
  },
142325
142457
  [prKey]
142326
142458
  );
142327
- const clearAll = (0, import_react94.useCallback)(() => {
142459
+ const clearAll = (0, import_react95.useCallback)(() => {
142328
142460
  store5.clearAll(prKey);
142329
142461
  }, [prKey]);
142330
- const getSummary = (0, import_react94.useCallback)(
142462
+ const getSummary = (0, import_react95.useCallback)(
142331
142463
  (totalFiles) => computeSummary(statuses, totalFiles),
142332
142464
  // eslint-disable-next-line react-hooks/exhaustive-deps
142333
142465
  [statuses]
142334
142466
  );
142335
- const nextUnreviewed = (0, import_react94.useCallback)(
142467
+ const nextUnreviewed = (0, import_react95.useCallback)(
142336
142468
  (currentFile, files) => findNextUnreviewed(currentFile, files, statuses),
142337
142469
  // eslint-disable-next-line react-hooks/exhaustive-deps
142338
142470
  [statuses]
142339
142471
  );
142340
- const prevUnreviewed = (0, import_react94.useCallback)(
142472
+ const prevUnreviewed = (0, import_react95.useCallback)(
142341
142473
  (currentFile, files) => findPrevUnreviewed(currentFile, files, statuses),
142342
142474
  // eslint-disable-next-line react-hooks/exhaustive-deps
142343
142475
  [statuses]
@@ -142354,10 +142486,10 @@ function useFileReviewStatus(prKey) {
142354
142486
  }
142355
142487
 
142356
142488
  // src/hooks/useDiffSearch.ts
142357
- var import_react97 = __toESM(require_react(), 1);
142489
+ var import_react98 = __toESM(require_react(), 1);
142358
142490
 
142359
142491
  // src/components/pr/DiffView.tsx
142360
- var import_react95 = __toESM(require_react(), 1);
142492
+ var import_react96 = __toESM(require_react(), 1);
142361
142493
 
142362
142494
  // node_modules/.pnpm/ink-syntax-highlight@2.0.2_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-syntax-highlight/build/index.js
142363
142495
  var React51 = __toESM(require_react(), 1);
@@ -143041,7 +143173,7 @@ function DiffView({
143041
143173
  }) {
143042
143174
  const language = filename ? getLanguageFromFilename(filename) : void 0;
143043
143175
  const theme14 = useTheme();
143044
- const virtualWindow = (0, import_react95.useMemo)(
143176
+ const virtualWindow = (0, import_react96.useMemo)(
143045
143177
  () => computeVirtualWindow({
143046
143178
  totalItems: allRows.length,
143047
143179
  viewportSize: viewportHeight,
@@ -143103,7 +143235,7 @@ function DiffView({
143103
143235
  }
143104
143236
 
143105
143237
  // src/components/pr/SideBySideDiffView.tsx
143106
- var import_react96 = __toESM(require_react(), 1);
143238
+ var import_react97 = __toESM(require_react(), 1);
143107
143239
  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
143108
143240
  function getSbsCommentKey(line) {
143109
143241
  switch (line.type) {
@@ -143295,7 +143427,7 @@ function SideBySideDiffView({
143295
143427
  }) {
143296
143428
  const theme14 = useTheme();
143297
143429
  const language = filename ? getLanguageFromFilename(filename) : void 0;
143298
- const virtualWindow = (0, import_react96.useMemo)(
143430
+ const virtualWindow = (0, import_react97.useMemo)(
143299
143431
  () => computeVirtualWindow({
143300
143432
  totalItems: rows.length,
143301
143433
  viewportSize: viewportHeight,
@@ -143376,32 +143508,32 @@ var SIDE_BY_SIDE_MIN_WIDTH = 100;
143376
143508
 
143377
143509
  // src/hooks/useDiffSearch.ts
143378
143510
  function useDiffSearch(effectiveDiffMode, allRows, sideBySideRows) {
143379
- const [isDiffSearching, setIsDiffSearching] = (0, import_react97.useState)(false);
143380
- const [diffSearchQuery, setDiffSearchQuery] = (0, import_react97.useState)("");
143381
- const [activeDiffSearch, setActiveDiffSearch] = (0, import_react97.useState)("");
143382
- const [currentSearchMatchIndex, setCurrentSearchMatchIndex] = (0, import_react97.useState)(0);
143383
- const diffSearchMatches = (0, import_react97.useMemo)(() => {
143511
+ const [isDiffSearching, setIsDiffSearching] = (0, import_react98.useState)(false);
143512
+ const [diffSearchQuery, setDiffSearchQuery] = (0, import_react98.useState)("");
143513
+ const [activeDiffSearch, setActiveDiffSearch] = (0, import_react98.useState)("");
143514
+ const [currentSearchMatchIndex, setCurrentSearchMatchIndex] = (0, import_react98.useState)(0);
143515
+ const diffSearchMatches = (0, import_react98.useMemo)(() => {
143384
143516
  if (!activeDiffSearch) return [];
143385
143517
  if (effectiveDiffMode === "side-by-side") {
143386
143518
  return computeSbsSearchMatches(sideBySideRows, activeDiffSearch);
143387
143519
  }
143388
143520
  return computeDiffSearchMatches(allRows, activeDiffSearch);
143389
143521
  }, [activeDiffSearch, effectiveDiffMode, allRows, sideBySideRows]);
143390
- const diffSearchMatchSet = (0, import_react97.useMemo)(
143522
+ const diffSearchMatchSet = (0, import_react98.useMemo)(
143391
143523
  () => new Set(diffSearchMatches),
143392
143524
  [diffSearchMatches]
143393
143525
  );
143394
- const startSearch = (0, import_react97.useCallback)((currentSearch) => {
143526
+ const startSearch = (0, import_react98.useCallback)((currentSearch) => {
143395
143527
  setIsDiffSearching(true);
143396
143528
  setDiffSearchQuery(currentSearch);
143397
143529
  }, []);
143398
- const cancelSearch = (0, import_react97.useCallback)(() => {
143530
+ const cancelSearch = (0, import_react98.useCallback)(() => {
143399
143531
  setIsDiffSearching(false);
143400
143532
  setDiffSearchQuery("");
143401
143533
  setActiveDiffSearch("");
143402
143534
  setCurrentSearchMatchIndex(0);
143403
143535
  }, []);
143404
- const confirmSearch = (0, import_react97.useCallback)(
143536
+ const confirmSearch = (0, import_react98.useCallback)(
143405
143537
  (query, mode, sbsRows, uniRows, jumpToLine) => {
143406
143538
  setIsDiffSearching(false);
143407
143539
  setActiveDiffSearch(query);
@@ -143415,18 +143547,18 @@ function useDiffSearch(effectiveDiffMode, allRows, sideBySideRows) {
143415
143547
  },
143416
143548
  []
143417
143549
  );
143418
- const clearSearch = (0, import_react97.useCallback)(() => {
143550
+ const clearSearch = (0, import_react98.useCallback)(() => {
143419
143551
  setActiveDiffSearch("");
143420
143552
  setDiffSearchQuery("");
143421
143553
  setCurrentSearchMatchIndex(0);
143422
143554
  }, []);
143423
- const resetOnFileChange = (0, import_react97.useCallback)(() => {
143555
+ const resetOnFileChange = (0, import_react98.useCallback)(() => {
143424
143556
  setIsDiffSearching(false);
143425
143557
  setDiffSearchQuery("");
143426
143558
  setActiveDiffSearch("");
143427
143559
  setCurrentSearchMatchIndex(0);
143428
143560
  }, []);
143429
- const navigateNext = (0, import_react97.useCallback)(
143561
+ const navigateNext = (0, import_react98.useCallback)(
143430
143562
  (jumpToLine) => {
143431
143563
  if (diffSearchMatches.length === 0) return;
143432
143564
  const nextIndex = (currentSearchMatchIndex + 1) % diffSearchMatches.length;
@@ -143435,7 +143567,7 @@ function useDiffSearch(effectiveDiffMode, allRows, sideBySideRows) {
143435
143567
  },
143436
143568
  [currentSearchMatchIndex, diffSearchMatches]
143437
143569
  );
143438
- const navigatePrev = (0, import_react97.useCallback)(
143570
+ const navigatePrev = (0, import_react98.useCallback)(
143439
143571
  (jumpToLine) => {
143440
143572
  if (diffSearchMatches.length === 0) return;
143441
143573
  const prevIndex = (currentSearchMatchIndex - 1 + diffSearchMatches.length) % diffSearchMatches.length;
@@ -143463,7 +143595,7 @@ function useDiffSearch(effectiveDiffMode, allRows, sideBySideRows) {
143463
143595
  }
143464
143596
 
143465
143597
  // src/hooks/useCrossFileSearch.ts
143466
- var import_react98 = __toESM(require_react(), 1);
143598
+ var import_react99 = __toESM(require_react(), 1);
143467
143599
  function buildCrossFileMatches(files, query) {
143468
143600
  if (!query) return [];
143469
143601
  const lowerQuery = query.toLowerCase();
@@ -143497,20 +143629,20 @@ function countMatchedFiles(matches) {
143497
143629
  return seen.size;
143498
143630
  }
143499
143631
  function useCrossFileSearch(files) {
143500
- const [isSearching, setIsSearching] = (0, import_react98.useState)(false);
143501
- const [query, setQuery] = (0, import_react98.useState)("");
143502
- const [activeQuery, setActiveQuery] = (0, import_react98.useState)("");
143503
- const [currentIndex, setCurrentIndex] = (0, import_react98.useState)(0);
143504
- const debounceRef = (0, import_react98.useRef)(null);
143505
- const matches = (0, import_react98.useMemo)(
143632
+ const [isSearching, setIsSearching] = (0, import_react99.useState)(false);
143633
+ const [query, setQuery] = (0, import_react99.useState)("");
143634
+ const [activeQuery, setActiveQuery] = (0, import_react99.useState)("");
143635
+ const [currentIndex, setCurrentIndex] = (0, import_react99.useState)(0);
143636
+ const debounceRef = (0, import_react99.useRef)(null);
143637
+ const matches = (0, import_react99.useMemo)(
143506
143638
  () => buildCrossFileMatches(files, activeQuery),
143507
143639
  [files, activeQuery]
143508
143640
  );
143509
- const startSearch = (0, import_react98.useCallback)(() => {
143641
+ const startSearch = (0, import_react99.useCallback)(() => {
143510
143642
  setIsSearching(true);
143511
143643
  setQuery(activeQuery);
143512
143644
  }, [activeQuery]);
143513
- const cancelSearch = (0, import_react98.useCallback)(() => {
143645
+ const cancelSearch = (0, import_react99.useCallback)(() => {
143514
143646
  setIsSearching(false);
143515
143647
  setQuery("");
143516
143648
  if (debounceRef.current) {
@@ -143518,7 +143650,7 @@ function useCrossFileSearch(files) {
143518
143650
  debounceRef.current = null;
143519
143651
  }
143520
143652
  }, []);
143521
- const confirmSearch = (0, import_react98.useCallback)(() => {
143653
+ const confirmSearch = (0, import_react99.useCallback)(() => {
143522
143654
  setIsSearching(false);
143523
143655
  setActiveQuery(query);
143524
143656
  setCurrentIndex(0);
@@ -143529,7 +143661,7 @@ function useCrossFileSearch(files) {
143529
143661
  const eagerMatches = buildCrossFileMatches(files, query);
143530
143662
  return eagerMatches.length > 0 ? eagerMatches[0] ?? null : null;
143531
143663
  }, [query, files]);
143532
- const clearSearch = (0, import_react98.useCallback)(() => {
143664
+ const clearSearch = (0, import_react99.useCallback)(() => {
143533
143665
  setIsSearching(false);
143534
143666
  setQuery("");
143535
143667
  setActiveQuery("");
@@ -143539,26 +143671,26 @@ function useCrossFileSearch(files) {
143539
143671
  debounceRef.current = null;
143540
143672
  }
143541
143673
  }, []);
143542
- const setQueryWithDebounce = (0, import_react98.useCallback)((newQuery) => {
143674
+ const setQueryWithDebounce = (0, import_react99.useCallback)((newQuery) => {
143543
143675
  setQuery(newQuery);
143544
143676
  }, []);
143545
- const navigateNext = (0, import_react98.useCallback)(() => {
143677
+ const navigateNext = (0, import_react99.useCallback)(() => {
143546
143678
  if (matches.length === 0) return null;
143547
143679
  const nextIndex = (currentIndex + 1) % matches.length;
143548
143680
  setCurrentIndex(nextIndex);
143549
143681
  return matches[nextIndex] ?? null;
143550
143682
  }, [currentIndex, matches]);
143551
- const navigatePrev = (0, import_react98.useCallback)(() => {
143683
+ const navigatePrev = (0, import_react99.useCallback)(() => {
143552
143684
  if (matches.length === 0) return null;
143553
143685
  const prevIndex = (currentIndex - 1 + matches.length) % matches.length;
143554
143686
  setCurrentIndex(prevIndex);
143555
143687
  return matches[prevIndex] ?? null;
143556
143688
  }, [currentIndex, matches]);
143557
- const currentMatch = (0, import_react98.useCallback)(() => {
143689
+ const currentMatch = (0, import_react99.useCallback)(() => {
143558
143690
  if (matches.length === 0) return null;
143559
143691
  return matches[currentIndex] ?? null;
143560
143692
  }, [currentIndex, matches]);
143561
- const matchedFileCount = (0, import_react98.useCallback)(() => {
143693
+ const matchedFileCount = (0, import_react99.useCallback)(() => {
143562
143694
  return countMatchedFiles(matches);
143563
143695
  }, [matches]);
143564
143696
  return {
@@ -143580,16 +143712,16 @@ function useCrossFileSearch(files) {
143580
143712
  }
143581
143713
 
143582
143714
  // src/hooks/useVisualSelect.ts
143583
- var import_react99 = __toESM(require_react(), 1);
143715
+ var import_react100 = __toESM(require_react(), 1);
143584
143716
  function useVisualSelect() {
143585
- const [visualStart, setVisualStart] = (0, import_react99.useState)(null);
143586
- const toggleVisual = (0, import_react99.useCallback)(
143717
+ const [visualStart, setVisualStart] = (0, import_react100.useState)(null);
143718
+ const toggleVisual = (0, import_react100.useCallback)(
143587
143719
  (currentLine) => {
143588
143720
  setVisualStart((prev) => prev != null ? null : currentLine);
143589
143721
  },
143590
143722
  []
143591
143723
  );
143592
- const clearVisual = (0, import_react99.useCallback)(() => {
143724
+ const clearVisual = (0, import_react100.useCallback)(() => {
143593
143725
  setVisualStart(null);
143594
143726
  }, []);
143595
143727
  return {
@@ -143601,7 +143733,7 @@ function useVisualSelect() {
143601
143733
  }
143602
143734
 
143603
143735
  // src/hooks/useFilesTabKeyboard.ts
143604
- var import_react100 = __toESM(require_react(), 1);
143736
+ var import_react101 = __toESM(require_react(), 1);
143605
143737
 
143606
143738
  // src/components/pr/diffNavigationHelpers.ts
143607
143739
  function isChangedRow(row) {
@@ -144020,7 +144152,7 @@ function extractSingleLineSuggestion(effectiveDiffMode, diffSelectedLine, allRow
144020
144152
  };
144021
144153
  }
144022
144154
  function useFilesTabKeyboard(opts) {
144023
- const pendingBracketRef = (0, import_react100.useRef)(null);
144155
+ const pendingBracketRef = (0, import_react101.useRef)(null);
144024
144156
  use_input_default(
144025
144157
  (input, key) => {
144026
144158
  if (pendingBracketRef.current !== null) {
@@ -144496,7 +144628,7 @@ function useAiConfig() {
144496
144628
  }
144497
144629
 
144498
144630
  // src/hooks/useAiReview.ts
144499
- var import_react101 = __toESM(require_react(), 1);
144631
+ var import_react102 = __toESM(require_react(), 1);
144500
144632
  function hashCode(code) {
144501
144633
  let hash4 = 2166136261;
144502
144634
  for (let i = 0; i < code.length; i++) {
@@ -144552,14 +144684,14 @@ async function* mockStream(_messages) {
144552
144684
  yield { text: "", done: true };
144553
144685
  }
144554
144686
  function useAiReview(aiConfig) {
144555
- const [response, setResponse] = (0, import_react101.useState)("");
144556
- const [isLoading, setIsLoading] = (0, import_react101.useState)(false);
144557
- const [error48, setError] = (0, import_react101.useState)(null);
144558
- const abortRef = (0, import_react101.useRef)(null);
144687
+ const [response, setResponse] = (0, import_react102.useState)("");
144688
+ const [isLoading, setIsLoading] = (0, import_react102.useState)(false);
144689
+ const [error48, setError] = (0, import_react102.useState)(null);
144690
+ const abortRef = (0, import_react102.useRef)(null);
144559
144691
  const configured = isAiConfigured(aiConfig);
144560
144692
  const providerName = configured ? getProviderDisplayName(aiConfig?.provider ?? "") : "";
144561
144693
  const modelName = aiConfig?.model ?? "";
144562
- const reset = (0, import_react101.useCallback)(() => {
144694
+ const reset = (0, import_react102.useCallback)(() => {
144563
144695
  if (abortRef.current) {
144564
144696
  abortRef.current.abort();
144565
144697
  abortRef.current = null;
@@ -144568,7 +144700,7 @@ function useAiReview(aiConfig) {
144568
144700
  setIsLoading(false);
144569
144701
  setError(null);
144570
144702
  }, []);
144571
- const reviewCode = (0, import_react101.useCallback)(
144703
+ const reviewCode = (0, import_react102.useCallback)(
144572
144704
  (params) => {
144573
144705
  if (!configured) {
144574
144706
  setError("AI is not configured. Add AI settings to your config.");
@@ -144628,7 +144760,7 @@ function useAiReview(aiConfig) {
144628
144760
  }
144629
144761
 
144630
144762
  // src/hooks/useStreamingDiff.ts
144631
- var import_react102 = __toESM(require_react(), 1);
144763
+ var import_react103 = __toESM(require_react(), 1);
144632
144764
 
144633
144765
  // src/utils/streaming-diff.ts
144634
144766
  var DEFAULT_CHUNK_SIZE = 10;
@@ -144649,12 +144781,12 @@ function useStreamingDiff(files, options = {}) {
144649
144781
  enabled: enabled2 = true
144650
144782
  } = options;
144651
144783
  const effectiveSize = Math.max(1, chunkSize);
144652
- const [loadedCount, setLoadedCount] = (0, import_react102.useState)(() => {
144784
+ const [loadedCount, setLoadedCount] = (0, import_react103.useState)(() => {
144653
144785
  if (!enabled2 || files.length === 0) return files.length;
144654
144786
  return Math.min(effectiveSize, files.length);
144655
144787
  });
144656
- const filesRef = (0, import_react102.useRef)(files);
144657
- (0, import_react102.useEffect)(() => {
144788
+ const filesRef = (0, import_react103.useRef)(files);
144789
+ (0, import_react103.useEffect)(() => {
144658
144790
  if (filesRef.current !== files) {
144659
144791
  filesRef.current = files;
144660
144792
  }
@@ -145016,7 +145148,7 @@ function ConflictBanner({ state }) {
145016
145148
  }
145017
145149
 
145018
145150
  // src/components/pr/DiffStatsSummary.tsx
145019
- var import_react103 = __toESM(require_react(), 1);
145151
+ var import_react104 = __toESM(require_react(), 1);
145020
145152
  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
145021
145153
  function computeDiffStats(files) {
145022
145154
  let totalAdditions = 0;
@@ -145065,12 +145197,12 @@ function DiffStatsSummary({
145065
145197
  files
145066
145198
  }) {
145067
145199
  const theme14 = useTheme();
145068
- const stats = (0, import_react103.useMemo)(() => computeDiffStats(files), [files]);
145069
- const extensionBreakdown = (0, import_react103.useMemo)(
145200
+ const stats = (0, import_react104.useMemo)(() => computeDiffStats(files), [files]);
145201
+ const extensionBreakdown = (0, import_react104.useMemo)(
145070
145202
  () => getExtensionBreakdown(files),
145071
145203
  [files]
145072
145204
  );
145073
- const topFiles = (0, import_react103.useMemo)(() => getTopFilesByChanges(files, 3), [files]);
145205
+ const topFiles = (0, import_react104.useMemo)(() => getTopFilesByChanges(files, 3), [files]);
145074
145206
  if (files.length === 0) return null;
145075
145207
  const extText = formatExtensionBreakdown(extensionBreakdown);
145076
145208
  const topText = formatTopFiles(topFiles);
@@ -145100,7 +145232,7 @@ function DiffStatsSummary({
145100
145232
  }
145101
145233
 
145102
145234
  // src/components/pr/FilePickerModal.tsx
145103
- var import_react104 = __toESM(require_react(), 1);
145235
+ var import_react105 = __toESM(require_react(), 1);
145104
145236
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
145105
145237
  var MAX_VISIBLE_ITEMS2 = 15;
145106
145238
  function getStatusIcon2(status) {
@@ -145243,20 +145375,20 @@ function FilePickerModal({
145243
145375
  }) {
145244
145376
  const theme14 = useTheme();
145245
145377
  const { setInputActive } = useInputFocus();
145246
- const [query, setQuery] = (0, import_react104.useState)("");
145247
- const [selectedIndex, setSelectedIndex] = (0, import_react104.useState)(0);
145248
- (0, import_react104.useEffect)(() => {
145378
+ const [query, setQuery] = (0, import_react105.useState)("");
145379
+ const [selectedIndex, setSelectedIndex] = (0, import_react105.useState)(0);
145380
+ (0, import_react105.useEffect)(() => {
145249
145381
  setInputActive(true);
145250
145382
  return () => setInputActive(false);
145251
145383
  }, [setInputActive]);
145252
- const filteredFiles = (0, import_react104.useMemo)(() => {
145384
+ const filteredFiles = (0, import_react105.useMemo)(() => {
145253
145385
  if (query.length === 0) {
145254
145386
  const sorted = sortWithRecentFirst(files, recentlyViewed);
145255
145387
  return sorted.map((item) => ({ item, score: 0, indices: [] }));
145256
145388
  }
145257
145389
  return fuzzyFilter(files, query, (f) => f.filename);
145258
145390
  }, [files, query, recentlyViewed]);
145259
- (0, import_react104.useEffect)(() => {
145391
+ (0, import_react105.useEffect)(() => {
145260
145392
  setSelectedIndex(0);
145261
145393
  }, [query]);
145262
145394
  const visibleCount = Math.min(MAX_VISIBLE_ITEMS2, filteredFiles.length);
@@ -145360,7 +145492,7 @@ function FilePickerModal({
145360
145492
  }
145361
145493
 
145362
145494
  // src/components/pr/AiReviewModal.tsx
145363
- var import_react105 = __toESM(require_react(), 1);
145495
+ var import_react106 = __toESM(require_react(), 1);
145364
145496
  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
145365
145497
  function formatLineRange(ctx) {
145366
145498
  if (ctx.startLine != null && ctx.endLine != null && ctx.startLine !== ctx.endLine) {
@@ -145391,21 +145523,21 @@ function AiReviewModal({
145391
145523
  }) {
145392
145524
  const theme14 = useTheme();
145393
145525
  const { setInputActive } = useInputFocus();
145394
- (0, import_react105.useEffect)(() => {
145526
+ (0, import_react106.useEffect)(() => {
145395
145527
  setInputActive(true);
145396
145528
  return () => setInputActive(false);
145397
145529
  }, [setInputActive]);
145398
- const handleConvertToComment = (0, import_react105.useCallback)(() => {
145530
+ const handleConvertToComment = (0, import_react106.useCallback)(() => {
145399
145531
  if (response && onConvertToComment) {
145400
145532
  onConvertToComment(response);
145401
145533
  }
145402
145534
  }, [response, onConvertToComment]);
145403
- const handleCopy = (0, import_react105.useCallback)(() => {
145535
+ const handleCopy = (0, import_react106.useCallback)(() => {
145404
145536
  if (response && onCopy) {
145405
145537
  onCopy(response);
145406
145538
  }
145407
145539
  }, [response, onCopy]);
145408
- const handleRegenerate = (0, import_react105.useCallback)(() => {
145540
+ const handleRegenerate = (0, import_react106.useCallback)(() => {
145409
145541
  if (onRegenerate) {
145410
145542
  onRegenerate();
145411
145543
  }
@@ -145604,7 +145736,7 @@ function FilesTab({
145604
145736
  const { stdout } = use_stdout_default();
145605
145737
  const theme14 = useTheme();
145606
145738
  const streaming = useStreamingDiff(files, { enabled: files.length > 10 });
145607
- const conflictState = (0, import_react106.useMemo)(
145739
+ const conflictState = (0, import_react107.useMemo)(
145608
145740
  () => mergeable !== void 0 ? detectConflictState({
145609
145741
  mergeable: mergeable ?? null,
145610
145742
  mergeable_state: mergeableState ?? null
@@ -145621,19 +145753,19 @@ function FilesTab({
145621
145753
  1,
145622
145754
  (stdout?.rows ?? 24) - 18 - FILES_TREE_HEADER_LINES
145623
145755
  );
145624
- const [focusPanel, setFocusPanel] = (0, import_react106.useState)("tree");
145625
- const [selectedFileIndex, setSelectedFileIndex] = (0, import_react106.useState)(0);
145626
- const [diffMode, setDiffMode] = (0, import_react106.useState)("unified");
145627
- const [treePanelPct, setTreePanelPct] = (0, import_react106.useState)(30);
145628
- const [collapsedDirs, setCollapsedDirs] = (0, import_react106.useState)(/* @__PURE__ */ new Set());
145756
+ const [focusPanel, setFocusPanel] = (0, import_react107.useState)("tree");
145757
+ const [selectedFileIndex, setSelectedFileIndex] = (0, import_react107.useState)(0);
145758
+ const [diffMode, setDiffMode] = (0, import_react107.useState)("unified");
145759
+ const [treePanelPct, setTreePanelPct] = (0, import_react107.useState)(30);
145760
+ const [collapsedDirs, setCollapsedDirs] = (0, import_react107.useState)(/* @__PURE__ */ new Set());
145629
145761
  const visual = useVisualSelect();
145630
145762
  const { aiConfig } = useAiConfig();
145631
145763
  const aiReview = useAiReview(aiConfig);
145632
- const [showAiReview, setShowAiReview] = (0, import_react106.useState)(false);
145633
- const [aiReviewContext, setAiReviewContext] = (0, import_react106.useState)(null);
145634
- const containerRef = (0, import_react106.useRef)(null);
145635
- const [measuredWidth, setMeasuredWidth] = (0, import_react106.useState)(0);
145636
- import_react106.default.useEffect(() => {
145764
+ const [showAiReview, setShowAiReview] = (0, import_react107.useState)(false);
145765
+ const [aiReviewContext, setAiReviewContext] = (0, import_react107.useState)(null);
145766
+ const containerRef = (0, import_react107.useRef)(null);
145767
+ const [measuredWidth, setMeasuredWidth] = (0, import_react107.useState)(0);
145768
+ import_react107.default.useEffect(() => {
145637
145769
  if (containerRef.current) {
145638
145770
  const { width } = measure_element_default(containerRef.current);
145639
145771
  setMeasuredWidth((prev) => prev === width ? prev : width);
@@ -145643,32 +145775,32 @@ function FilesTab({
145643
145775
  const containerWidth = measuredWidth > 0 ? measuredWidth : terminalWidth;
145644
145776
  const effectiveDiffMode = diffMode === "side-by-side" && containerWidth < SIDE_BY_SIDE_MIN_WIDTH ? "unified" : diffMode;
145645
145777
  const crossFileSearch = useCrossFileSearch(files);
145646
- const [isFiltering, setIsFiltering] = (0, import_react106.useState)(false);
145647
- const [filterQuery, setFilterQuery] = (0, import_react106.useState)("");
145648
- const [activeFilter, setActiveFilter] = (0, import_react106.useState)("");
145649
- const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react106.useState)(0);
145650
- const [isGoToLine, setIsGoToLine] = (0, import_react106.useState)(false);
145651
- const [goToLineQuery, setGoToLineQuery] = (0, import_react106.useState)("");
145652
- const [foldedHunks, setFoldedHunks] = (0, import_react106.useState)(/* @__PURE__ */ new Set());
145653
- const [isFilePickerOpen, setIsFilePickerOpen] = (0, import_react106.useState)(false);
145778
+ const [isFiltering, setIsFiltering] = (0, import_react107.useState)(false);
145779
+ const [filterQuery, setFilterQuery] = (0, import_react107.useState)("");
145780
+ const [activeFilter, setActiveFilter] = (0, import_react107.useState)("");
145781
+ const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react107.useState)(0);
145782
+ const [isGoToLine, setIsGoToLine] = (0, import_react107.useState)(false);
145783
+ const [goToLineQuery, setGoToLineQuery] = (0, import_react107.useState)("");
145784
+ const [foldedHunks, setFoldedHunks] = (0, import_react107.useState)(/* @__PURE__ */ new Set());
145785
+ const [isFilePickerOpen, setIsFilePickerOpen] = (0, import_react107.useState)(false);
145654
145786
  const treePanelWidth = Math.max(32, Math.floor(containerWidth * (treePanelPct / 100)));
145655
145787
  const diffContentWidth = Math.max(10, containerWidth - treePanelWidth - 8);
145656
145788
  const streamedFiles = streaming.visibleFiles;
145657
- const filteredFiles = (0, import_react106.useMemo)(() => {
145789
+ const filteredFiles = (0, import_react107.useMemo)(() => {
145658
145790
  if (!activeFilter && !isFiltering) return streamedFiles;
145659
145791
  const query = isFiltering ? filterQuery : activeFilter;
145660
145792
  if (!query) return streamedFiles;
145661
145793
  return streamedFiles.filter((f) => fuzzyMatch2(f.filename, query));
145662
145794
  }, [streamedFiles, activeFilter, filterQuery, isFiltering]);
145663
- const filteredTree = (0, import_react106.useMemo)(
145795
+ const filteredTree = (0, import_react107.useMemo)(
145664
145796
  () => buildFileTree(filteredFiles),
145665
145797
  [filteredFiles]
145666
145798
  );
145667
- const fileOrder = (0, import_react106.useMemo)(
145799
+ const fileOrder = (0, import_react107.useMemo)(
145668
145800
  () => flattenTreeToFiles(filteredTree),
145669
145801
  [filteredTree]
145670
145802
  );
145671
- const displayRows = (0, import_react106.useMemo)(
145803
+ const displayRows = (0, import_react107.useMemo)(
145672
145804
  () => buildDisplayRows(filteredTree, 0, { current: 0 }, collapsedDirs),
145673
145805
  [filteredTree, collapsedDirs]
145674
145806
  );
@@ -145694,12 +145826,12 @@ function FilesTab({
145694
145826
  treeScrollOffset,
145695
145827
  treeScrollOffset + treeViewportHeight
145696
145828
  );
145697
- import_react106.default.useEffect(() => {
145829
+ import_react107.default.useEffect(() => {
145698
145830
  if (isActive2) {
145699
145831
  setScreenContext(focusPanel === "tree" ? "pr-detail-files-tree" : "pr-detail-files-diff");
145700
145832
  }
145701
145833
  }, [focusPanel, isActive2]);
145702
- import_react106.default.useEffect(() => {
145834
+ import_react107.default.useEffect(() => {
145703
145835
  if (focusPanel === "tree") {
145704
145836
  setSelectedFileIndex(treeSelectedIndex);
145705
145837
  }
@@ -145716,48 +145848,48 @@ function FilesTab({
145716
145848
  { enabled: needsLazyDiff }
145717
145849
  );
145718
145850
  const selectedPatch = inlinePatch ?? lazyDiffFile?.patch ?? null;
145719
- const hunks = (0, import_react106.useMemo)(
145851
+ const hunks = (0, import_react107.useMemo)(
145720
145852
  () => selectedPatch ? parseDiffPatch(selectedPatch) : [],
145721
145853
  [selectedPatch]
145722
145854
  );
145723
- const commentIdKey = (0, import_react106.useMemo)(() => {
145855
+ const commentIdKey = (0, import_react107.useMemo)(() => {
145724
145856
  if (!comments || comments.length === 0 || !selectedFilename) return "";
145725
145857
  const fileComments = comments.filter((c) => c.path === selectedFilename);
145726
145858
  const ids3 = fileComments.map((c) => `${c.id}:${c.body.length}`).join(",");
145727
145859
  const threadIds = reviewThreads ? reviewThreads.map((t) => `${t.id}:${t.isResolved ? 1 : 0}`).join(",") : "";
145728
145860
  return `${ids3}|${threadIds}`;
145729
145861
  }, [comments, reviewThreads, selectedFilename]);
145730
- const commentsByLine = (0, import_react106.useMemo)(
145862
+ const commentsByLine = (0, import_react107.useMemo)(
145731
145863
  () => buildCommentsByLine(comments, reviewThreads, selectedFilename ?? void 0),
145732
145864
  // eslint-disable-next-line react-hooks/exhaustive-deps
145733
145865
  [commentIdKey, selectedFilename]
145734
145866
  );
145735
- const allRows = (0, import_react106.useMemo)(
145867
+ const allRows = (0, import_react107.useMemo)(
145736
145868
  () => buildDiffRows(hunks, commentsByLine),
145737
145869
  [hunks, commentsByLine]
145738
145870
  );
145739
- const foldedRows = (0, import_react106.useMemo)(
145871
+ const foldedRows = (0, import_react107.useMemo)(
145740
145872
  () => applyHunkFolding(allRows, foldedHunks),
145741
145873
  [allRows, foldedHunks]
145742
145874
  );
145743
- const sideBySideRows = (0, import_react106.useMemo)(
145875
+ const sideBySideRows = (0, import_react107.useMemo)(
145744
145876
  () => effectiveDiffMode === "side-by-side" ? buildSideBySideRows(hunks, commentsByLine) : [],
145745
145877
  [hunks, effectiveDiffMode, commentsByLine]
145746
145878
  );
145747
145879
  const totalDiffLines = effectiveDiffMode === "side-by-side" ? sideBySideRows.length : foldedRows.length;
145748
145880
  const search = useDiffSearch(effectiveDiffMode, allRows, sideBySideRows);
145749
- import_react106.default.useEffect(() => {
145881
+ import_react107.default.useEffect(() => {
145750
145882
  setDiffScrollOffsetX(0);
145751
145883
  setFoldedHunks(/* @__PURE__ */ new Set());
145752
145884
  search.resetOnFileChange();
145753
145885
  }, [selectedFileIndex]);
145754
- import_react106.default.useEffect(() => {
145886
+ import_react107.default.useEffect(() => {
145755
145887
  const file2 = fileOrder[selectedFileIndex];
145756
145888
  if (file2 && prUrl) {
145757
145889
  markViewed(prUrl, file2.filename);
145758
145890
  }
145759
145891
  }, [selectedFileIndex, fileOrder, prUrl, markViewed]);
145760
- import_react106.default.useEffect(() => {
145892
+ import_react107.default.useEffect(() => {
145761
145893
  if (!initialFile) return;
145762
145894
  const targetIndex = fileOrder.findIndex((f) => f.filename === initialFile);
145763
145895
  if (targetIndex >= 0) {
@@ -145766,7 +145898,7 @@ function FilesTab({
145766
145898
  }
145767
145899
  onInitialFileConsumed?.();
145768
145900
  }, [initialFile, fileOrder, onInitialFileConsumed]);
145769
- const maxDiffLineLength = (0, import_react106.useMemo)(
145901
+ const maxDiffLineLength = (0, import_react107.useMemo)(
145770
145902
  () => computeMaxDiffLineLength(allRows),
145771
145903
  [allRows]
145772
145904
  );
@@ -145774,7 +145906,7 @@ function FilesTab({
145774
145906
  10,
145775
145907
  Math.floor((diffContentWidth - 1) / 2)
145776
145908
  );
145777
- const maxDiffLineLengthSbs = (0, import_react106.useMemo)(
145909
+ const maxDiffLineLengthSbs = (0, import_react107.useMemo)(
145778
145910
  () => computeMaxSbsLineLength(sideBySideRows),
145779
145911
  [sideBySideRows]
145780
145912
  );
@@ -145789,7 +145921,7 @@ function FilesTab({
145789
145921
  viewportHeight,
145790
145922
  isActive: isActive2 && focusPanel === "diff" && !search.isDiffSearching && !crossFileSearch.isSearching && !isGoToLine
145791
145923
  });
145792
- const handleAiReviewRequest = (0, import_react106.useCallback)(
145924
+ const handleAiReviewRequest = (0, import_react107.useCallback)(
145793
145925
  (lineContext) => {
145794
145926
  const language = getLanguageFromFilename(lineContext.filename) ?? "text";
145795
145927
  const context6 = {
@@ -145817,12 +145949,12 @@ function FilesTab({
145817
145949
  },
145818
145950
  [aiReview]
145819
145951
  );
145820
- const handleAiReviewClose = (0, import_react106.useCallback)(() => {
145952
+ const handleAiReviewClose = (0, import_react107.useCallback)(() => {
145821
145953
  setShowAiReview(false);
145822
145954
  setAiReviewContext(null);
145823
145955
  aiReview.reset();
145824
145956
  }, [aiReview]);
145825
- const handleAiReviewRegenerate = (0, import_react106.useCallback)(() => {
145957
+ const handleAiReviewRegenerate = (0, import_react107.useCallback)(() => {
145826
145958
  if (!aiReviewContext) return;
145827
145959
  const language = aiReviewContext.language;
145828
145960
  const lineCtx = "mixed";
@@ -145840,25 +145972,25 @@ function FilesTab({
145840
145972
  messages
145841
145973
  });
145842
145974
  }, [aiReviewContext, aiReview]);
145843
- const handleApproveFile = (0, import_react106.useCallback)(() => {
145975
+ const handleApproveFile = (0, import_react107.useCallback)(() => {
145844
145976
  const file2 = fileOrder[treeSelectedIndex];
145845
145977
  if (file2 && prKey) {
145846
145978
  fileReview.setStatus(file2.filename, "approved");
145847
145979
  }
145848
145980
  }, [fileOrder, treeSelectedIndex, prKey, fileReview]);
145849
- const handleRejectFile = (0, import_react106.useCallback)(() => {
145981
+ const handleRejectFile = (0, import_react107.useCallback)(() => {
145850
145982
  const file2 = fileOrder[treeSelectedIndex];
145851
145983
  if (file2 && prKey) {
145852
145984
  fileReview.setStatus(file2.filename, "needs-changes");
145853
145985
  }
145854
145986
  }, [fileOrder, treeSelectedIndex, prKey, fileReview]);
145855
- const handleSkipFile = (0, import_react106.useCallback)(() => {
145987
+ const handleSkipFile = (0, import_react107.useCallback)(() => {
145856
145988
  const file2 = fileOrder[treeSelectedIndex];
145857
145989
  if (file2 && prKey) {
145858
145990
  fileReview.setStatus(file2.filename, "skipped");
145859
145991
  }
145860
145992
  }, [fileOrder, treeSelectedIndex, prKey, fileReview]);
145861
- const handleNextUnreviewed = (0, import_react106.useCallback)(() => {
145993
+ const handleNextUnreviewed = (0, import_react107.useCallback)(() => {
145862
145994
  const currentFile = fileOrder[treeSelectedIndex];
145863
145995
  if (!currentFile) return;
145864
145996
  const filenames = fileOrder.map((f) => f.filename);
@@ -145870,7 +146002,7 @@ function FilesTab({
145870
146002
  }
145871
146003
  }
145872
146004
  }, [fileOrder, treeSelectedIndex, fileReview.statuses, setSelectedFileIndex]);
145873
- const handlePrevUnreviewed = (0, import_react106.useCallback)(() => {
146005
+ const handlePrevUnreviewed = (0, import_react107.useCallback)(() => {
145874
146006
  const currentFile = fileOrder[treeSelectedIndex];
145875
146007
  if (!currentFile) return;
145876
146008
  const filenames = fileOrder.map((f) => f.filename);
@@ -145882,7 +146014,7 @@ function FilesTab({
145882
146014
  }
145883
146015
  }
145884
146016
  }, [fileOrder, treeSelectedIndex, fileReview.statuses, setSelectedFileIndex]);
145885
- const reviewSummary = (0, import_react106.useMemo)(
146017
+ const reviewSummary = (0, import_react107.useMemo)(
145886
146018
  () => computeSummary(fileReview.statuses, files.length),
145887
146019
  [fileReview.statuses, files.length]
145888
146020
  );
@@ -145940,7 +146072,7 @@ function FilesTab({
145940
146072
  onNextUnreviewed: prKey ? handleNextUnreviewed : void 0,
145941
146073
  onPrevUnreviewed: prKey ? handlePrevUnreviewed : void 0
145942
146074
  });
145943
- import_react106.default.useEffect(() => {
146075
+ import_react107.default.useEffect(() => {
145944
146076
  if (!isActive2 || focusPanel !== "diff") return;
145945
146077
  const thread = getFocusedCommentThread(
145946
146078
  effectiveDiffMode,
@@ -145966,11 +146098,11 @@ function FilesTab({
145966
146098
  });
145967
146099
  }
145968
146100
  }, [isActive2, focusPanel, diffSelectedLine, effectiveDiffMode, allRows, sideBySideRows, currentUser]);
145969
- const recentlyViewedFilenames = (0, import_react106.useMemo)(() => {
146101
+ const recentlyViewedFilenames = (0, import_react107.useMemo)(() => {
145970
146102
  if (!prUrl) return [];
145971
146103
  return files.filter((f) => isViewed(prUrl, f.filename)).map((f) => f.filename);
145972
146104
  }, [files, prUrl, isViewed]);
145973
- const handleFilePickerSelect = import_react106.default.useCallback(
146105
+ const handleFilePickerSelect = import_react107.default.useCallback(
145974
146106
  (fileIndex) => {
145975
146107
  setSelectedFileIndex(fileIndex);
145976
146108
  setFocusPanel("diff");
@@ -146243,7 +146375,7 @@ function FilesTab({
146243
146375
  }
146244
146376
 
146245
146377
  // src/components/pr/ConversationsTab.tsx
146246
- var import_react107 = __toESM(require_react(), 1);
146378
+ var import_react108 = __toESM(require_react(), 1);
146247
146379
 
146248
146380
  // src/components/pr/TimelineItemView.tsx
146249
146381
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
@@ -146392,7 +146524,7 @@ function ConversationsTab({
146392
146524
  viewportHeight,
146393
146525
  isActive: isActive2
146394
146526
  });
146395
- (0, import_react107.useEffect)(() => {
146527
+ (0, import_react108.useEffect)(() => {
146396
146528
  const selected = timeline[selectedIndex];
146397
146529
  if (selected && isActive2) {
146398
146530
  setSelectionContext({
@@ -146515,10 +146647,10 @@ function ConversationsTab({
146515
146647
  }
146516
146648
 
146517
146649
  // src/components/pr/CommitsTab.tsx
146518
- var import_react110 = __toESM(require_react(), 1);
146650
+ var import_react111 = __toESM(require_react(), 1);
146519
146651
 
146520
146652
  // src/hooks/useCommitRange.ts
146521
- var import_react108 = __toESM(require_react(), 1);
146653
+ var import_react109 = __toESM(require_react(), 1);
146522
146654
  function formatRangeLabel(startSha, endSha) {
146523
146655
  return `${startSha.slice(0, 7)}..${endSha.slice(0, 7)}`;
146524
146656
  }
@@ -146605,21 +146737,21 @@ function getGlobalStore() {
146605
146737
  }
146606
146738
  function useCommitRange() {
146607
146739
  const store8 = getGlobalStore();
146608
- const state = (0, import_react108.useSyncExternalStore)(
146740
+ const state = (0, import_react109.useSyncExternalStore)(
146609
146741
  store8.subscribe,
146610
146742
  store8.getSnapshot,
146611
146743
  store8.getSnapshot
146612
146744
  );
146613
- const startSelection = (0, import_react108.useCallback)(
146745
+ const startSelection = (0, import_react109.useCallback)(
146614
146746
  (index, sha) => store8.startSelection(index, sha),
146615
146747
  [store8]
146616
146748
  );
146617
- const endSelection = (0, import_react108.useCallback)(
146749
+ const endSelection = (0, import_react109.useCallback)(
146618
146750
  (index, sha) => store8.endSelection(index, sha),
146619
146751
  [store8]
146620
146752
  );
146621
- const clearRange = (0, import_react108.useCallback)(() => store8.clearRange(), [store8]);
146622
- const isInRange = (0, import_react108.useCallback)(
146753
+ const clearRange = (0, import_react109.useCallback)(() => store8.clearRange(), [store8]);
146754
+ const isInRange = (0, import_react109.useCallback)(
146623
146755
  (index) => store8.isInRange(index),
146624
146756
  [store8]
146625
146757
  );
@@ -146635,7 +146767,7 @@ function useCommitRange() {
146635
146767
  }
146636
146768
 
146637
146769
  // src/components/pr/CommitDiffView.tsx
146638
- var import_react109 = __toESM(require_react(), 1);
146770
+ var import_react110 = __toESM(require_react(), 1);
146639
146771
 
146640
146772
  // src/components/common/LoadingIndicator.tsx
146641
146773
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
@@ -146676,16 +146808,16 @@ function CommitDiffView({
146676
146808
  const terminalWidth = stdout?.columns ?? 120;
146677
146809
  const viewportHeight = Math.max(1, (stdout?.rows ?? 24) - 13);
146678
146810
  const treeViewportMaxHeight = Math.max(1, (stdout?.rows ?? 24) - 18);
146679
- const [focusPanel, setFocusPanel] = (0, import_react109.useState)("tree");
146680
- const [selectedFileIndex, setSelectedFileIndex] = (0, import_react109.useState)(0);
146681
- const [diffMode, setDiffMode] = (0, import_react109.useState)("unified");
146682
- const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react109.useState)(0);
146811
+ const [focusPanel, setFocusPanel] = (0, import_react110.useState)("tree");
146812
+ const [selectedFileIndex, setSelectedFileIndex] = (0, import_react110.useState)(0);
146813
+ const [diffMode, setDiffMode] = (0, import_react110.useState)("unified");
146814
+ const [diffScrollOffsetX, setDiffScrollOffsetX] = (0, import_react110.useState)(0);
146683
146815
  const effectiveDiffMode = diffMode === "side-by-side" && terminalWidth < SIDE_BY_SIDE_MIN_WIDTH ? "unified" : diffMode;
146684
146816
  const treePanelWidth = Math.max(32, Math.floor(terminalWidth * 0.3));
146685
146817
  const diffContentWidth = Math.max(10, terminalWidth - treePanelWidth - 8);
146686
- const fileTree = (0, import_react109.useMemo)(() => buildFileTree(files), [files]);
146687
- const fileOrder = (0, import_react109.useMemo)(() => flattenTreeToFiles(fileTree), [fileTree]);
146688
- const displayRows = (0, import_react109.useMemo)(
146818
+ const fileTree = (0, import_react110.useMemo)(() => buildFileTree(files), [files]);
146819
+ const fileOrder = (0, import_react110.useMemo)(() => flattenTreeToFiles(fileTree), [fileTree]);
146820
+ const displayRows = (0, import_react110.useMemo)(
146689
146821
  () => buildDisplayRows(fileTree, 0, { current: 0 }),
146690
146822
  [fileTree]
146691
146823
  );
@@ -146708,30 +146840,30 @@ function CommitDiffView({
146708
146840
  treeScrollOffset,
146709
146841
  treeScrollOffset + treeViewportHeight
146710
146842
  );
146711
- import_react109.default.useEffect(() => {
146843
+ import_react110.default.useEffect(() => {
146712
146844
  if (focusPanel === "tree") {
146713
146845
  setSelectedFileIndex(treeSelectedIndex);
146714
146846
  }
146715
146847
  }, [treeSelectedIndex, focusPanel]);
146716
- import_react109.default.useEffect(() => {
146848
+ import_react110.default.useEffect(() => {
146717
146849
  setDiffScrollOffsetX(0);
146718
146850
  }, [selectedFileIndex]);
146719
146851
  const selectedFile = fileOrder[selectedFileIndex] ?? fileOrder[0] ?? null;
146720
146852
  const selectedPatch = selectedFile?.patch ?? null;
146721
- const hunks = (0, import_react109.useMemo)(
146853
+ const hunks = (0, import_react110.useMemo)(
146722
146854
  () => selectedPatch ? parseDiffPatch(selectedPatch) : [],
146723
146855
  [selectedPatch]
146724
146856
  );
146725
- const allRows = (0, import_react109.useMemo)(
146857
+ const allRows = (0, import_react110.useMemo)(
146726
146858
  () => buildDiffRows(hunks, void 0),
146727
146859
  [hunks]
146728
146860
  );
146729
- const sideBySideRows = (0, import_react109.useMemo)(
146861
+ const sideBySideRows = (0, import_react110.useMemo)(
146730
146862
  () => effectiveDiffMode === "side-by-side" ? buildSideBySideRows(hunks, void 0) : [],
146731
146863
  [hunks, effectiveDiffMode]
146732
146864
  );
146733
146865
  const totalDiffLines = effectiveDiffMode === "side-by-side" ? sideBySideRows.length : allRows.length;
146734
- const maxDiffLineLength = (0, import_react109.useMemo)(
146866
+ const maxDiffLineLength = (0, import_react110.useMemo)(
146735
146867
  () => computeMaxDiffLineLength(allRows),
146736
146868
  [allRows]
146737
146869
  );
@@ -146739,7 +146871,7 @@ function CommitDiffView({
146739
146871
  10,
146740
146872
  Math.floor((diffContentWidth - 1) / 2)
146741
146873
  );
146742
- const maxDiffLineLengthSbs = (0, import_react109.useMemo)(
146874
+ const maxDiffLineLengthSbs = (0, import_react110.useMemo)(
146743
146875
  () => computeMaxSbsLineLength(sideBySideRows),
146744
146876
  [sideBySideRows]
146745
146877
  );
@@ -146990,7 +147122,7 @@ function CommitsTab({
146990
147122
  const theme14 = useTheme();
146991
147123
  const { setStatusMessage } = useStatusMessage();
146992
147124
  const viewportHeight = Math.max(1, (stdout?.rows ?? 24) - 10);
146993
- const [selectedCommitSha, setSelectedCommitSha] = (0, import_react110.useState)(null);
147125
+ const [selectedCommitSha, setSelectedCommitSha] = (0, import_react111.useState)(null);
146994
147126
  const commitRange = useCommitRange();
146995
147127
  const { selectedIndex } = useListNavigation({
146996
147128
  itemCount: commits.length,
@@ -147003,7 +147135,7 @@ function CommitsTab({
147003
147135
  selectedCommitSha ?? "",
147004
147136
  { enabled: selectedCommitSha !== null }
147005
147137
  );
147006
- const completeRangeSelection = (0, import_react110.useCallback)(
147138
+ const completeRangeSelection = (0, import_react111.useCallback)(
147007
147139
  (endIdx) => {
147008
147140
  const commit = commits[endIdx];
147009
147141
  if (!commit) return;
@@ -147478,10 +147610,10 @@ function TimelineTab({
147478
147610
  }
147479
147611
 
147480
147612
  // src/components/pr/ReviewModal.tsx
147481
- var import_react113 = __toESM(require_react(), 1);
147613
+ var import_react114 = __toESM(require_react(), 1);
147482
147614
 
147483
147615
  // src/components/common/MultiLineInput.tsx
147484
- var import_react111 = __toESM(require_react(), 1);
147616
+ var import_react112 = __toESM(require_react(), 1);
147485
147617
 
147486
147618
  // src/utils/undo-stack.ts
147487
147619
  var MAX_UNDO_STATES = 50;
@@ -147548,14 +147680,14 @@ function MultiLineInput({
147548
147680
  }) {
147549
147681
  const theme14 = useTheme();
147550
147682
  const initialLines = defaultValue ? defaultValue.split("\n") : [""];
147551
- const [lines, setLines] = (0, import_react111.useState)(initialLines);
147552
- const [cursorRow, setCursorRow] = (0, import_react111.useState)(0);
147553
- const [cursorCol, setCursorCol] = (0, import_react111.useState)(0);
147554
- const [undoState, setUndoState] = (0, import_react111.useState)(
147683
+ const [lines, setLines] = (0, import_react112.useState)(initialLines);
147684
+ const [cursorRow, setCursorRow] = (0, import_react112.useState)(0);
147685
+ const [cursorCol, setCursorCol] = (0, import_react112.useState)(0);
147686
+ const [undoState, setUndoState] = (0, import_react112.useState)(
147555
147687
  () => createUndoStack({ lines: initialLines, cursorRow: 0, cursorCol: 0 })
147556
147688
  );
147557
- const lastPushTimeRef = (0, import_react111.useRef)(0);
147558
- const pushUndoSnapshot = (0, import_react111.useCallback)(
147689
+ const lastPushTimeRef = (0, import_react112.useRef)(0);
147690
+ const pushUndoSnapshot = (0, import_react112.useCallback)(
147559
147691
  (newLines, newRow, newCol) => {
147560
147692
  if (shouldPushState(lastPushTimeRef.current)) {
147561
147693
  setUndoState(
@@ -147571,7 +147703,7 @@ function MultiLineInput({
147571
147703
  },
147572
147704
  []
147573
147705
  );
147574
- const updateLines = (0, import_react111.useCallback)(
147706
+ const updateLines = (0, import_react112.useCallback)(
147575
147707
  (newLines, newRow, newCol) => {
147576
147708
  setLines(newLines);
147577
147709
  setCursorRow(newRow);
@@ -147581,7 +147713,7 @@ function MultiLineInput({
147581
147713
  },
147582
147714
  [onChange, pushUndoSnapshot]
147583
147715
  );
147584
- const handleUndo = (0, import_react111.useCallback)(() => {
147716
+ const handleUndo = (0, import_react112.useCallback)(() => {
147585
147717
  setUndoState((prev) => {
147586
147718
  if (!canUndo(prev)) return prev;
147587
147719
  const next = undo(prev);
@@ -147593,7 +147725,7 @@ function MultiLineInput({
147593
147725
  return next;
147594
147726
  });
147595
147727
  }, [onChange]);
147596
- const handleRedo = (0, import_react111.useCallback)(() => {
147728
+ const handleRedo = (0, import_react112.useCallback)(() => {
147597
147729
  setUndoState((prev) => {
147598
147730
  if (!canRedo(prev)) return prev;
147599
147731
  const next = redo(prev);
@@ -147605,7 +147737,7 @@ function MultiLineInput({
147605
147737
  return next;
147606
147738
  });
147607
147739
  }, [onChange]);
147608
- (0, import_react111.useEffect)(() => {
147740
+ (0, import_react112.useEffect)(() => {
147609
147741
  if (!insertText) return;
147610
147742
  const currentLine = lines[cursorRow] ?? "";
147611
147743
  const before2 = currentLine.slice(0, cursorCol);
@@ -147739,7 +147871,7 @@ function MultiLineInput({
147739
147871
  }
147740
147872
 
147741
147873
  // src/components/pr/TemplatePickerModal.tsx
147742
- var import_react112 = __toESM(require_react(), 1);
147874
+ var import_react113 = __toESM(require_react(), 1);
147743
147875
  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
147744
147876
  var MAX_VISIBLE_ITEMS3 = 10;
147745
147877
  function TemplateRow({
@@ -147772,7 +147904,7 @@ function TemplateRow({
147772
147904
  }
147773
147905
  function renderHighlightedText2(text, indices, normalColor, highlightColor) {
147774
147906
  if (indices.length === 0) {
147775
- return import_react112.default.createElement(Text, { color: normalColor }, text);
147907
+ return import_react113.default.createElement(Text, { color: normalColor }, text);
147776
147908
  }
147777
147909
  const indexSet = new Set(indices);
147778
147910
  const parts2 = [];
@@ -147782,7 +147914,7 @@ function renderHighlightedText2(text, indices, normalColor, highlightColor) {
147782
147914
  const isHighlighted = indexSet.has(i);
147783
147915
  if (isHighlighted !== currentIsHighlighted && currentRun.length > 0) {
147784
147916
  parts2.push(
147785
- import_react112.default.createElement(
147917
+ import_react113.default.createElement(
147786
147918
  Text,
147787
147919
  {
147788
147920
  key: `${i}-${currentRun}`,
@@ -147799,7 +147931,7 @@ function renderHighlightedText2(text, indices, normalColor, highlightColor) {
147799
147931
  }
147800
147932
  if (currentRun.length > 0) {
147801
147933
  parts2.push(
147802
- import_react112.default.createElement(
147934
+ import_react113.default.createElement(
147803
147935
  Text,
147804
147936
  {
147805
147937
  key: `end-${currentRun}`,
@@ -147810,7 +147942,7 @@ function renderHighlightedText2(text, indices, normalColor, highlightColor) {
147810
147942
  )
147811
147943
  );
147812
147944
  }
147813
- return import_react112.default.createElement(import_react112.default.Fragment, null, ...parts2);
147945
+ return import_react113.default.createElement(import_react113.default.Fragment, null, ...parts2);
147814
147946
  }
147815
147947
  function getSearchText(template) {
147816
147948
  return `${template.name} ${template.prefix ?? ""} ${template.description ?? ""}`;
@@ -147822,16 +147954,16 @@ function TemplatePickerModal({
147822
147954
  }) {
147823
147955
  const theme14 = useTheme();
147824
147956
  const { setInputActive } = useInputFocus();
147825
- const [query, setQuery] = (0, import_react112.useState)("");
147826
- const [selectedIndex, setSelectedIndex] = (0, import_react112.useState)(0);
147827
- (0, import_react112.useEffect)(() => {
147957
+ const [query, setQuery] = (0, import_react113.useState)("");
147958
+ const [selectedIndex, setSelectedIndex] = (0, import_react113.useState)(0);
147959
+ (0, import_react113.useEffect)(() => {
147828
147960
  setInputActive(true);
147829
147961
  return () => setInputActive(false);
147830
147962
  }, [setInputActive]);
147831
- const filteredTemplates = (0, import_react112.useMemo)(() => {
147963
+ const filteredTemplates = (0, import_react113.useMemo)(() => {
147832
147964
  return fuzzyFilter(templates, query, getSearchText);
147833
147965
  }, [templates, query]);
147834
- (0, import_react112.useEffect)(() => {
147966
+ (0, import_react113.useEffect)(() => {
147835
147967
  setSelectedIndex(0);
147836
147968
  }, [query]);
147837
147969
  const visibleCount = Math.min(MAX_VISIBLE_ITEMS3, filteredTemplates.length);
@@ -147998,19 +148130,19 @@ function ReviewModal({
147998
148130
  const theme14 = useTheme();
147999
148131
  const { setInputActive } = useInputFocus();
148000
148132
  const { config: config3 } = useConfig();
148001
- const [step4, setStep] = (0, import_react113.useState)("select_type");
148002
- const [selectedType, setSelectedType] = (0, import_react113.useState)(0);
148003
- const [reviewEvent, setReviewEvent] = (0, import_react113.useState)("APPROVE");
148004
- const [body, setBody] = (0, import_react113.useState)("");
148005
- const [showTemplatePicker, setShowTemplatePicker] = (0, import_react113.useState)(false);
148006
- const [pendingInsert, setPendingInsert] = (0, import_react113.useState)(null);
148007
- (0, import_react113.useEffect)(() => {
148133
+ const [step4, setStep] = (0, import_react114.useState)("select_type");
148134
+ const [selectedType, setSelectedType] = (0, import_react114.useState)(0);
148135
+ const [reviewEvent, setReviewEvent] = (0, import_react114.useState)("APPROVE");
148136
+ const [body, setBody] = (0, import_react114.useState)("");
148137
+ const [showTemplatePicker, setShowTemplatePicker] = (0, import_react114.useState)(false);
148138
+ const [pendingInsert, setPendingInsert] = (0, import_react114.useState)(null);
148139
+ (0, import_react114.useEffect)(() => {
148008
148140
  if (step4 === "enter_body" && !showTemplatePicker) {
148009
148141
  setInputActive(true);
148010
148142
  }
148011
148143
  return () => setInputActive(false);
148012
148144
  }, [step4, setInputActive, showTemplatePicker]);
148013
- const handleSubmit = (0, import_react113.useCallback)(() => {
148145
+ const handleSubmit = (0, import_react114.useCallback)(() => {
148014
148146
  if (reviewEvent === "REQUEST_CHANGES" && !body.trim()) {
148015
148147
  return;
148016
148148
  }
@@ -148018,7 +148150,7 @@ function ReviewModal({
148018
148150
  onSubmit(body, reviewEvent);
148019
148151
  }
148020
148152
  }, [body, reviewEvent, isSubmitting, onSubmit]);
148021
- const handleTemplateSelect = (0, import_react113.useCallback)(
148153
+ const handleTemplateSelect = (0, import_react114.useCallback)(
148022
148154
  (template) => {
148023
148155
  const resolved = resolveTemplate(template, templateVariables ?? {});
148024
148156
  setPendingInsert({ text: resolved.text, cursorOffset: resolved.cursorOffset });
@@ -148150,7 +148282,7 @@ function ReviewModal({
148150
148282
  }
148151
148283
 
148152
148284
  // src/components/pr/CommentModal.tsx
148153
- var import_react114 = __toESM(require_react(), 1);
148285
+ var import_react115 = __toESM(require_react(), 1);
148154
148286
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
148155
148287
  function CommentModal({
148156
148288
  title,
@@ -148165,20 +148297,20 @@ function CommentModal({
148165
148297
  const theme14 = useTheme();
148166
148298
  const { setInputActive } = useInputFocus();
148167
148299
  const { config: config3 } = useConfig();
148168
- const [body, setBody] = (0, import_react114.useState)(defaultValue ?? "");
148169
- const [showTemplatePicker, setShowTemplatePicker] = (0, import_react114.useState)(false);
148170
- const [pendingInsert, setPendingInsert] = (0, import_react114.useState)(null);
148171
- (0, import_react114.useEffect)(() => {
148300
+ const [body, setBody] = (0, import_react115.useState)(defaultValue ?? "");
148301
+ const [showTemplatePicker, setShowTemplatePicker] = (0, import_react115.useState)(false);
148302
+ const [pendingInsert, setPendingInsert] = (0, import_react115.useState)(null);
148303
+ (0, import_react115.useEffect)(() => {
148172
148304
  setInputActive(!showTemplatePicker);
148173
148305
  return () => setInputActive(false);
148174
148306
  }, [setInputActive, showTemplatePicker]);
148175
- const handleSubmit = (0, import_react114.useCallback)(() => {
148307
+ const handleSubmit = (0, import_react115.useCallback)(() => {
148176
148308
  const trimmed2 = body.trim();
148177
148309
  if (trimmed2 && !isSubmitting) {
148178
148310
  onSubmit(trimmed2);
148179
148311
  }
148180
148312
  }, [body, isSubmitting, onSubmit]);
148181
- const handleTemplateSelect = (0, import_react114.useCallback)(
148313
+ const handleTemplateSelect = (0, import_react115.useCallback)(
148182
148314
  (template) => {
148183
148315
  const resolved = resolveTemplate(template, templateVariables ?? {});
148184
148316
  setPendingInsert({ text: resolved.text, cursorOffset: resolved.cursorOffset });
@@ -148270,7 +148402,7 @@ function CommentModal({
148270
148402
  }
148271
148403
 
148272
148404
  // src/components/pr/MergeModal.tsx
148273
- var import_react115 = __toESM(require_react(), 1);
148405
+ var import_react116 = __toESM(require_react(), 1);
148274
148406
  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
148275
148407
  var MERGE_METHODS = [
148276
148408
  { method: "merge", label: "Merge Commit", description: "All commits preserved" },
@@ -148305,13 +148437,13 @@ function MergeModal({
148305
148437
  }) {
148306
148438
  const theme14 = useTheme();
148307
148439
  const { setInputActive } = useInputFocus();
148308
- const [step4, setStep] = (0, import_react115.useState)("select_method");
148309
- const [selectedMethod, setSelectedMethod] = (0, import_react115.useState)(0);
148310
- const [commitTitle, setCommitTitle] = (0, import_react115.useState)(`${pr.title} (#${pr.number})`);
148440
+ const [step4, setStep] = (0, import_react116.useState)("select_method");
148441
+ const [selectedMethod, setSelectedMethod] = (0, import_react116.useState)(0);
148442
+ const [commitTitle, setCommitTitle] = (0, import_react116.useState)(`${pr.title} (#${pr.number})`);
148311
148443
  const mergeBlockReason = getMergeabilityMessage(pr);
148312
148444
  const canMerge = mergeBlockReason === null;
148313
- const conflictState = (0, import_react115.useMemo)(() => detectConflictState(pr), [pr]);
148314
- (0, import_react115.useEffect)(() => {
148445
+ const conflictState = (0, import_react116.useMemo)(() => detectConflictState(pr), [pr]);
148446
+ (0, import_react116.useEffect)(() => {
148315
148447
  if (step4 === "edit_title") {
148316
148448
  setInputActive(true);
148317
148449
  }
@@ -148473,7 +148605,7 @@ function MergeModal({
148473
148605
  }
148474
148606
 
148475
148607
  // src/components/pr/ReReviewModal.tsx
148476
- var import_react116 = __toESM(require_react(), 1);
148608
+ var import_react117 = __toESM(require_react(), 1);
148477
148609
  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
148478
148610
  function getStatusColor3(status, theme14) {
148479
148611
  switch (status) {
@@ -148531,8 +148663,8 @@ function ReReviewModal({
148531
148663
  error: error48
148532
148664
  }) {
148533
148665
  const theme14 = useTheme();
148534
- const [selectedIndex, setSelectedIndex] = (0, import_react116.useState)(0);
148535
- const [selected, setSelected] = (0, import_react116.useState)(/* @__PURE__ */ new Set());
148666
+ const [selectedIndex, setSelectedIndex] = (0, import_react117.useState)(0);
148667
+ const [selected, setSelected] = (0, import_react117.useState)(/* @__PURE__ */ new Set());
148536
148668
  use_input_default(
148537
148669
  (_input, key) => {
148538
148670
  if (isSubmitting) return;
@@ -148620,7 +148752,7 @@ function ReReviewModal({
148620
148752
  }
148621
148753
 
148622
148754
  // src/components/pr/LabelPickerModal.tsx
148623
- var import_react117 = __toESM(require_react(), 1);
148755
+ var import_react118 = __toESM(require_react(), 1);
148624
148756
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
148625
148757
  function hexToInkColor(hex3) {
148626
148758
  return `#${hex3}`;
@@ -148645,11 +148777,11 @@ function LabelPickerModal({
148645
148777
  error: error48
148646
148778
  }) {
148647
148779
  const theme14 = useTheme();
148648
- const [selectedIndex, setSelectedIndex] = (0, import_react117.useState)(0);
148649
- const [selectedLabels, setSelectedLabels] = (0, import_react117.useState)(
148780
+ const [selectedIndex, setSelectedIndex] = (0, import_react118.useState)(0);
148781
+ const [selectedLabels, setSelectedLabels] = (0, import_react118.useState)(
148650
148782
  () => new Set(currentLabels)
148651
148783
  );
148652
- const hasChanges2 = (0, import_react117.useMemo)(() => {
148784
+ const hasChanges2 = (0, import_react118.useMemo)(() => {
148653
148785
  const currentSet = new Set(currentLabels);
148654
148786
  if (currentSet.size !== selectedLabels.size) return true;
148655
148787
  for (const label of selectedLabels) {
@@ -148787,7 +148919,7 @@ function LabelPickerModal({
148787
148919
  }
148788
148920
 
148789
148921
  // src/components/pr/AssigneePickerModal.tsx
148790
- var import_react118 = __toESM(require_react(), 1);
148922
+ var import_react119 = __toESM(require_react(), 1);
148791
148923
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
148792
148924
  function filterCollaborators(collaborators, query) {
148793
148925
  if (!query.trim()) return collaborators;
@@ -148812,21 +148944,21 @@ function AssigneePickerModal({
148812
148944
  error: error48
148813
148945
  }) {
148814
148946
  const theme14 = useTheme();
148815
- const [selectedIndex, setSelectedIndex] = (0, import_react118.useState)(0);
148816
- const [searchQuery, setSearchQuery] = (0, import_react118.useState)("");
148817
- const [isSearching, setIsSearching] = (0, import_react118.useState)(false);
148818
- const [selectedAssignees, setSelectedAssignees] = (0, import_react118.useState)(
148947
+ const [selectedIndex, setSelectedIndex] = (0, import_react119.useState)(0);
148948
+ const [searchQuery, setSearchQuery] = (0, import_react119.useState)("");
148949
+ const [isSearching, setIsSearching] = (0, import_react119.useState)(false);
148950
+ const [selectedAssignees, setSelectedAssignees] = (0, import_react119.useState)(
148819
148951
  () => new Set(currentAssignees)
148820
148952
  );
148821
- const filteredCollaborators = (0, import_react118.useMemo)(
148953
+ const filteredCollaborators = (0, import_react119.useMemo)(
148822
148954
  () => filterCollaborators(collaborators, searchQuery),
148823
148955
  [collaborators, searchQuery]
148824
148956
  );
148825
- const changed = (0, import_react118.useMemo)(
148957
+ const changed = (0, import_react119.useMemo)(
148826
148958
  () => hasChanges(currentAssignees, selectedAssignees),
148827
148959
  [currentAssignees, selectedAssignees]
148828
148960
  );
148829
- import_react118.default.useEffect(() => {
148961
+ import_react119.default.useEffect(() => {
148830
148962
  setSelectedIndex(0);
148831
148963
  }, [searchQuery]);
148832
148964
  use_input_default(
@@ -148989,7 +149121,7 @@ function AssigneePickerModal({
148989
149121
  }
148990
149122
 
148991
149123
  // src/components/pr/ReactionPicker.tsx
148992
- var import_react119 = __toESM(require_react(), 1);
149124
+ var import_react120 = __toESM(require_react(), 1);
148993
149125
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
148994
149126
  function ReactionPicker({
148995
149127
  onSelect,
@@ -148998,7 +149130,7 @@ function ReactionPicker({
148998
149130
  error: error48
148999
149131
  }) {
149000
149132
  const theme14 = useTheme();
149001
- const [selectedIndex, setSelectedIndex] = (0, import_react119.useState)(0);
149133
+ const [selectedIndex, setSelectedIndex] = (0, import_react120.useState)(0);
149002
149134
  use_input_default(
149003
149135
  (input, key) => {
149004
149136
  if (isSubmitting) return;
@@ -149459,7 +149591,7 @@ async function checkoutPR(prNumber) {
149459
149591
  }
149460
149592
 
149461
149593
  // src/hooks/useReadState.ts
149462
- var import_react120 = __toESM(require_react(), 1);
149594
+ var import_react121 = __toESM(require_react(), 1);
149463
149595
  var PRUNE_AGE_MS2 = 30 * 24 * 60 * 60 * 1e3;
149464
149596
  function createSqliteReadStateStore(stateStore) {
149465
149597
  let listeners3 = [];
@@ -149547,18 +149679,18 @@ function getOrCreateStore2(stateStore) {
149547
149679
  function useReadState() {
149548
149680
  const stateStore = useStateStore();
149549
149681
  const store8 = getOrCreateStore2(stateStore);
149550
- const readState = (0, import_react120.useSyncExternalStore)(
149682
+ const readState = (0, import_react121.useSyncExternalStore)(
149551
149683
  store8.subscribe,
149552
149684
  store8.getSnapshot,
149553
149685
  () => ({})
149554
149686
  );
149555
- const markAsRead = (0, import_react120.useCallback)(
149687
+ const markAsRead = (0, import_react121.useCallback)(
149556
149688
  (htmlUrl, prUpdatedAt) => {
149557
149689
  store8.markAsRead(htmlUrl, prUpdatedAt);
149558
149690
  },
149559
149691
  [store8]
149560
149692
  );
149561
- const isUnread = (0, import_react120.useCallback)(
149693
+ const isUnread = (0, import_react121.useCallback)(
149562
149694
  (htmlUrl, prUpdatedAt) => {
149563
149695
  return store8.isUnread(htmlUrl, prUpdatedAt);
149564
149696
  },
@@ -149569,14 +149701,14 @@ function useReadState() {
149569
149701
  }
149570
149702
 
149571
149703
  // src/hooks/useManualRefresh.ts
149572
- var import_react121 = __toESM(require_react(), 1);
149704
+ var import_react122 = __toESM(require_react(), 1);
149573
149705
  function useManualRefresh({
149574
149706
  isActive: isActive2 = true,
149575
149707
  queryKeys
149576
149708
  } = {}) {
149577
149709
  const queryClient2 = useQueryClient();
149578
149710
  const { setStatusMessage } = useStatusMessage();
149579
- const refresh = (0, import_react121.useCallback)(() => {
149711
+ const refresh = (0, import_react122.useCallback)(() => {
149580
149712
  if (queryKeys && queryKeys.length > 0) {
149581
149713
  queryKeys.forEach((key) => {
149582
149714
  queryClient2.invalidateQueries({ queryKey: key });
@@ -149598,23 +149730,23 @@ function useManualRefresh({
149598
149730
  }
149599
149731
 
149600
149732
  // src/hooks/useReactionActions.ts
149601
- var import_react122 = __toESM(require_react(), 1);
149733
+ var import_react123 = __toESM(require_react(), 1);
149602
149734
  function useReactionActions({
149603
149735
  owner,
149604
149736
  repo,
149605
149737
  prNumber,
149606
149738
  setStatusMessage
149607
149739
  }) {
149608
- const [showReactionPicker, setShowReactionPicker] = (0, import_react122.useState)(false);
149609
- const [reactionError, setReactionError] = (0, import_react122.useState)(null);
149610
- const [reactionContext, setReactionContext] = (0, import_react122.useState)(null);
149740
+ const [showReactionPicker, setShowReactionPicker] = (0, import_react123.useState)(false);
149741
+ const [reactionError, setReactionError] = (0, import_react123.useState)(null);
149742
+ const [reactionContext, setReactionContext] = (0, import_react123.useState)(null);
149611
149743
  const addReaction = useAddReaction();
149612
- const handleOpenReactionPicker = (0, import_react122.useCallback)((context6) => {
149744
+ const handleOpenReactionPicker = (0, import_react123.useCallback)((context6) => {
149613
149745
  setReactionError(null);
149614
149746
  setReactionContext(context6);
149615
149747
  setShowReactionPicker(true);
149616
149748
  }, []);
149617
- const handleReactionSelect = (0, import_react122.useCallback)(
149749
+ const handleReactionSelect = (0, import_react123.useCallback)(
149618
149750
  (reaction) => {
149619
149751
  if (!reactionContext) return;
149620
149752
  setReactionError(null);
@@ -149639,7 +149771,7 @@ function useReactionActions({
149639
149771
  },
149640
149772
  [owner, repo, prNumber, reactionContext, addReaction, setStatusMessage]
149641
149773
  );
149642
- const closeReactionPicker = (0, import_react122.useCallback)(() => {
149774
+ const closeReactionPicker = (0, import_react123.useCallback)(() => {
149643
149775
  setShowReactionPicker(false);
149644
149776
  setReactionContext(null);
149645
149777
  setReactionError(null);
@@ -149655,7 +149787,7 @@ function useReactionActions({
149655
149787
  }
149656
149788
 
149657
149789
  // src/hooks/useAiSummary.ts
149658
- var import_react123 = __toESM(require_react(), 1);
149790
+ var import_react124 = __toESM(require_react(), 1);
149659
149791
 
149660
149792
  // src/services/ai/pr-summary-prompts.ts
149661
149793
  var MAX_DESCRIPTION_LENGTH = 1e3;
@@ -149814,15 +149946,15 @@ async function* mockSummaryStream() {
149814
149946
  yield { text: "", done: true };
149815
149947
  }
149816
149948
  function useAiSummary(aiConfig) {
149817
- const [summary5, setSummary] = (0, import_react123.useState)("");
149818
- const [isGenerating, setIsGenerating] = (0, import_react123.useState)(false);
149819
- const [error48, setError] = (0, import_react123.useState)(null);
149820
- const [cachedSummary, setCachedSummaryState] = (0, import_react123.useState)(null);
149821
- const abortRef = (0, import_react123.useRef)(null);
149822
- const lastInputRef = (0, import_react123.useRef)(null);
149949
+ const [summary5, setSummary] = (0, import_react124.useState)("");
149950
+ const [isGenerating, setIsGenerating] = (0, import_react124.useState)(false);
149951
+ const [error48, setError] = (0, import_react124.useState)(null);
149952
+ const [cachedSummary, setCachedSummaryState] = (0, import_react124.useState)(null);
149953
+ const abortRef = (0, import_react124.useRef)(null);
149954
+ const lastInputRef = (0, import_react124.useRef)(null);
149823
149955
  const configured = isSummaryConfigured(aiConfig);
149824
149956
  const providerName = configured ? getProviderDisplayName2(aiConfig?.provider ?? "") : "";
149825
- const generateSummary = (0, import_react123.useCallback)(
149957
+ const generateSummary = (0, import_react124.useCallback)(
149826
149958
  (prData) => {
149827
149959
  if (!configured) {
149828
149960
  setError("AI is not configured. Add AI settings to your config.");
@@ -149889,7 +150021,7 @@ function useAiSummary(aiConfig) {
149889
150021
  },
149890
150022
  [configured]
149891
150023
  );
149892
- const regenerateSummary = (0, import_react123.useCallback)(() => {
150024
+ const regenerateSummary = (0, import_react124.useCallback)(() => {
149893
150025
  if (!lastInputRef.current) return;
149894
150026
  const prData = lastInputRef.current;
149895
150027
  const cacheKey = buildSummaryCacheKey(
@@ -149914,7 +150046,7 @@ function useAiSummary(aiConfig) {
149914
150046
  }
149915
150047
 
149916
150048
  // src/hooks/usePRNotes.ts
149917
- var import_react124 = __toESM(require_react(), 1);
150049
+ var import_react125 = __toESM(require_react(), 1);
149918
150050
  function createPRNotesStore() {
149919
150051
  let data = {};
149920
150052
  let listeners3 = [];
@@ -149952,27 +150084,147 @@ function createPRNotesStore() {
149952
150084
  }
149953
150085
  var store6 = createPRNotesStore();
149954
150086
  function usePRNotes(key) {
149955
- const snapshot = (0, import_react124.useSyncExternalStore)(
150087
+ const snapshot = (0, import_react125.useSyncExternalStore)(
149956
150088
  store6.subscribe,
149957
150089
  store6.getSnapshot,
149958
150090
  () => ({})
149959
150091
  );
149960
150092
  const note = snapshot[key] !== void 0 ? snapshot[key] : null;
149961
- const saveNote = (0, import_react124.useCallback)(
150093
+ const saveNote = (0, import_react125.useCallback)(
149962
150094
  (content) => {
149963
150095
  store6.saveNote(key, content);
149964
150096
  },
149965
150097
  [key]
149966
150098
  );
149967
- const deleteNote = (0, import_react124.useCallback)(() => {
150099
+ const deleteNote = (0, import_react125.useCallback)(() => {
149968
150100
  store6.deleteNote(key);
149969
150101
  }, [key]);
149970
150102
  const hasNote = snapshot[key] !== void 0;
149971
150103
  return { note, saveNote, deleteNote, hasNote };
149972
150104
  }
149973
150105
 
150106
+ // src/hooks/useReviewSession.ts
150107
+ var import_react126 = __toESM(require_react(), 1);
150108
+ var SESSIONS_KV_KEY = "review_sessions";
150109
+ var TIMER_INTERVAL_MS = 1e3;
150110
+ function createReviewSessionStore() {
150111
+ let listeners3 = [];
150112
+ let state = { elapsedSeconds: 0, isPaused: false };
150113
+ let intervalId = null;
150114
+ let running3 = false;
150115
+ const notify3 = () => {
150116
+ listeners3.forEach((l) => l());
150117
+ };
150118
+ const tick = () => {
150119
+ if (!state.isPaused) {
150120
+ state = { ...state, elapsedSeconds: state.elapsedSeconds + 1 };
150121
+ notify3();
150122
+ }
150123
+ };
150124
+ return {
150125
+ subscribe(listener) {
150126
+ listeners3 = [...listeners3, listener];
150127
+ return () => {
150128
+ listeners3 = listeners3.filter((l) => l !== listener);
150129
+ };
150130
+ },
150131
+ getSnapshot() {
150132
+ return state;
150133
+ },
150134
+ start() {
150135
+ if (running3) return;
150136
+ running3 = true;
150137
+ state = { elapsedSeconds: 0, isPaused: false };
150138
+ intervalId = setInterval(tick, TIMER_INTERVAL_MS);
150139
+ notify3();
150140
+ },
150141
+ stop() {
150142
+ if (!running3) return;
150143
+ running3 = false;
150144
+ if (intervalId !== null) {
150145
+ clearInterval(intervalId);
150146
+ intervalId = null;
150147
+ }
150148
+ },
150149
+ togglePause() {
150150
+ state = { ...state, isPaused: !state.isPaused };
150151
+ notify3();
150152
+ },
150153
+ getElapsedSeconds() {
150154
+ return state.elapsedSeconds;
150155
+ },
150156
+ isPaused() {
150157
+ return state.isPaused;
150158
+ },
150159
+ destroy() {
150160
+ running3 = false;
150161
+ if (intervalId !== null) {
150162
+ clearInterval(intervalId);
150163
+ intervalId = null;
150164
+ }
150165
+ state = { elapsedSeconds: 0, isPaused: false };
150166
+ listeners3 = [];
150167
+ }
150168
+ };
150169
+ }
150170
+ function loadSessions(stateStore) {
150171
+ const raw = stateStore.getKV(SESSIONS_KV_KEY);
150172
+ if (!raw) return [];
150173
+ return deserializeSessions(raw);
150174
+ }
150175
+ function persistSession(stateStore, session) {
150176
+ const existing = loadSessions(stateStore);
150177
+ const updated = [...existing, session];
150178
+ stateStore.setKV(SESSIONS_KV_KEY, serializeSessions(updated));
150179
+ }
150180
+ function useReviewSession(prKey, filesReviewedRef) {
150181
+ const stateStore = useStateStore();
150182
+ const storeRef = (0, import_react126.useRef)(null);
150183
+ const prKeyRef = (0, import_react126.useRef)(prKey);
150184
+ prKeyRef.current = prKey;
150185
+ if (storeRef.current === null) {
150186
+ storeRef.current = createReviewSessionStore();
150187
+ }
150188
+ const store8 = storeRef.current;
150189
+ (0, import_react126.useEffect)(() => {
150190
+ store8.start();
150191
+ return () => {
150192
+ const elapsed = store8.getElapsedSeconds();
150193
+ store8.stop();
150194
+ if (elapsed > 5 && stateStore) {
150195
+ const session = {
150196
+ prKey: prKeyRef.current,
150197
+ durationMs: elapsed * 1e3,
150198
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
150199
+ filesReviewed: filesReviewedRef?.current ?? 0
150200
+ };
150201
+ persistSession(stateStore, session);
150202
+ }
150203
+ store8.destroy();
150204
+ };
150205
+ }, []);
150206
+ const state = (0, import_react126.useSyncExternalStore)(
150207
+ store8.subscribe,
150208
+ store8.getSnapshot,
150209
+ () => ({ elapsedSeconds: 0, isPaused: false })
150210
+ );
150211
+ const togglePause = (0, import_react126.useCallback)(() => {
150212
+ store8.togglePause();
150213
+ }, [store8]);
150214
+ return {
150215
+ elapsedSeconds: state.elapsedSeconds,
150216
+ isPaused: state.isPaused,
150217
+ togglePause
150218
+ };
150219
+ }
150220
+ function useReviewSessions() {
150221
+ const stateStore = useStateStore();
150222
+ if (!stateStore) return [];
150223
+ return loadSessions(stateStore);
150224
+ }
150225
+
149974
150226
  // src/components/pr/NotesModal.tsx
149975
- var import_react125 = __toESM(require_react(), 1);
150227
+ var import_react127 = __toESM(require_react(), 1);
149976
150228
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
149977
150229
  function getNotesModalTitle(isEditing) {
149978
150230
  return isEditing ? "Edit Note" : "Add Note";
@@ -150000,16 +150252,16 @@ function NotesModal({
150000
150252
  }) {
150001
150253
  const theme14 = useTheme();
150002
150254
  const { setInputActive } = useInputFocus();
150003
- const [content, setContent] = (0, import_react125.useState)(initialContent ?? "");
150255
+ const [content, setContent] = (0, import_react127.useState)(initialContent ?? "");
150004
150256
  const isEditing = initialContent !== null;
150005
- (0, import_react125.useEffect)(() => {
150257
+ (0, import_react127.useEffect)(() => {
150006
150258
  if (isOpen) {
150007
150259
  setContent(initialContent ?? "");
150008
150260
  setInputActive(true);
150009
150261
  }
150010
150262
  return () => setInputActive(false);
150011
150263
  }, [isOpen, initialContent, setInputActive]);
150012
- const handleSave = (0, import_react125.useCallback)(() => {
150264
+ const handleSave = (0, import_react127.useCallback)(() => {
150013
150265
  const trimmed2 = content.trim();
150014
150266
  if (trimmed2.length > 0) {
150015
150267
  onSave(trimmed2);
@@ -150097,24 +150349,32 @@ function PRDetailScreen({
150097
150349
  const { setStatusMessage } = useStatusMessage();
150098
150350
  const { markAsRead } = useReadState();
150099
150351
  const theme14 = useTheme();
150100
- const [currentTab, setCurrentTab] = (0, import_react126.useState)(0);
150101
- const [showDiscardConfirm, setShowDiscardConfirm] = (0, import_react126.useState)(false);
150102
- const [showDraftConfirm, setShowDraftConfirm] = (0, import_react126.useState)(false);
150103
- const [showLabelPicker, setShowLabelPicker] = (0, import_react126.useState)(false);
150104
- const [labelError, setLabelError] = (0, import_react126.useState)(null);
150105
- const [showAssigneePicker, setShowAssigneePicker] = (0, import_react126.useState)(false);
150106
- const [assigneeError, setAssigneeError] = (0, import_react126.useState)(null);
150107
- const [initialFile, setInitialFile] = (0, import_react126.useState)(void 0);
150108
- const [commitRange, setCommitRange] = (0, import_react126.useState)(null);
150109
- const [aiSummaryExpanded, setAiSummaryExpanded] = (0, import_react126.useState)(false);
150110
- const [showNotesModal, setShowNotesModal] = (0, import_react126.useState)(false);
150352
+ const [currentTab, setCurrentTab] = (0, import_react128.useState)(0);
150353
+ const [showDiscardConfirm, setShowDiscardConfirm] = (0, import_react128.useState)(false);
150354
+ const [showDraftConfirm, setShowDraftConfirm] = (0, import_react128.useState)(false);
150355
+ const [showLabelPicker, setShowLabelPicker] = (0, import_react128.useState)(false);
150356
+ const [labelError, setLabelError] = (0, import_react128.useState)(null);
150357
+ const [showAssigneePicker, setShowAssigneePicker] = (0, import_react128.useState)(false);
150358
+ const [assigneeError, setAssigneeError] = (0, import_react128.useState)(null);
150359
+ const [initialFile, setInitialFile] = (0, import_react128.useState)(void 0);
150360
+ const [commitRange, setCommitRange] = (0, import_react128.useState)(null);
150361
+ const [aiSummaryExpanded, setAiSummaryExpanded] = (0, import_react128.useState)(false);
150362
+ const [showNotesModal, setShowNotesModal] = (0, import_react128.useState)(false);
150111
150363
  const contentHeight = Math.max(1, (stdout?.rows ?? 24) - PR_DETAIL_RESERVED_LINES);
150112
150364
  const prNotesKey = `${owner}/${repo}#${pr.number}`;
150113
150365
  const { note: prNote, saveNote: savePRNote, deleteNote: deletePRNote, hasNote: hasPRNote } = usePRNotes(prNotesKey);
150114
- import_react126.default.useEffect(() => {
150366
+ const reviewSessionKey = `${owner}/${repo}#${pr.number}`;
150367
+ const { elapsedSeconds } = useReviewSession(reviewSessionKey);
150368
+ import_react128.default.useEffect(() => {
150369
+ reviewTimerStore.setTimer(elapsedSeconds);
150370
+ return () => {
150371
+ reviewTimerStore.clearTimer();
150372
+ };
150373
+ }, [elapsedSeconds]);
150374
+ import_react128.default.useEffect(() => {
150115
150375
  markAsRead(pr.html_url, pr.updated_at);
150116
150376
  }, [pr.html_url, pr.updated_at, markAsRead]);
150117
- import_react126.default.useEffect(() => {
150377
+ import_react128.default.useEffect(() => {
150118
150378
  const tabContexts = [
150119
150379
  "pr-detail-description",
150120
150380
  "pr-detail-conversations",
@@ -150125,7 +150385,7 @@ function PRDetailScreen({
150125
150385
  ];
150126
150386
  setScreenContext(tabContexts[currentTab] ?? "pr-detail-description");
150127
150387
  }, [currentTab]);
150128
- import_react126.default.useEffect(() => {
150388
+ import_react128.default.useEffect(() => {
150129
150389
  if (currentTab === 0 || currentTab === 2 || currentTab === 4 || currentTab === 5) {
150130
150390
  setSelectionContext({
150131
150391
  type: "pr-detail",
@@ -150135,8 +150395,8 @@ function PRDetailScreen({
150135
150395
  });
150136
150396
  }
150137
150397
  }, [currentTab, pr.state, pr.merged, pr.draft]);
150138
- const visitedTabsRef = (0, import_react126.useRef)(/* @__PURE__ */ new Set([0]));
150139
- import_react126.default.useEffect(() => {
150398
+ const visitedTabsRef = (0, import_react128.useRef)(/* @__PURE__ */ new Set([0]));
150399
+ import_react128.default.useEffect(() => {
150140
150400
  if (!visitedTabsRef.current.has(currentTab)) {
150141
150401
  visitedTabsRef.current = /* @__PURE__ */ new Set([...visitedTabsRef.current, currentTab]);
150142
150402
  }
@@ -150197,7 +150457,7 @@ function PRDetailScreen({
150197
150457
  });
150198
150458
  const { aiConfig } = useAiConfig();
150199
150459
  const aiSummaryHook = useAiSummary(aiConfig);
150200
- const handleToggleAiSummary = (0, import_react126.useCallback)(() => {
150460
+ const handleToggleAiSummary = (0, import_react128.useCallback)(() => {
150201
150461
  setAiSummaryExpanded((prev) => {
150202
150462
  const next = !prev;
150203
150463
  if (next && !aiSummaryHook.summary && !aiSummaryHook.isGenerating) {
@@ -150242,7 +150502,7 @@ function PRDetailScreen({
150242
150502
  repo,
150243
150503
  { enabled: showAssigneePicker }
150244
150504
  );
150245
- const handleReviewSubmit = (0, import_react126.useCallback)(
150505
+ const handleReviewSubmit = (0, import_react128.useCallback)(
150246
150506
  (body, event) => {
150247
150507
  if (pendingReview.isActive) {
150248
150508
  pendingReview.submitReview(body, event);
@@ -150253,7 +150513,7 @@ function PRDetailScreen({
150253
150513
  },
150254
150514
  [pendingReview, modals]
150255
150515
  );
150256
- const handleCommentSubmit = (0, import_react126.useCallback)(
150516
+ const handleCommentSubmit = (0, import_react128.useCallback)(
150257
150517
  (body) => {
150258
150518
  if (pendingReview.isActive && modals.inlineContext) {
150259
150519
  pendingReview.addPendingComment(
@@ -150274,7 +150534,7 @@ function PRDetailScreen({
150274
150534
  },
150275
150535
  [pendingReview, modals]
150276
150536
  );
150277
- const handleGoToFile = (0, import_react126.useCallback)((path) => {
150537
+ const handleGoToFile = (0, import_react128.useCallback)((path) => {
150278
150538
  setInitialFile(path);
150279
150539
  setCurrentTab(3);
150280
150540
  setStatusMessage(`Jumped to ${path}`);
@@ -150724,22 +150984,22 @@ function PRDetailScreen({
150724
150984
  }
150725
150985
 
150726
150986
  // src/screens/MyPRsScreen.tsx
150727
- var import_react137 = __toESM(require_react(), 1);
150987
+ var import_react139 = __toESM(require_react(), 1);
150728
150988
 
150729
150989
  // src/screens/PRListScreen.tsx
150730
- var import_react136 = __toESM(require_react(), 1);
150990
+ var import_react138 = __toESM(require_react(), 1);
150731
150991
 
150732
150992
  // src/hooks/usePagination.ts
150733
- var import_react127 = __toESM(require_react(), 1);
150993
+ var import_react129 = __toESM(require_react(), 1);
150734
150994
  function usePagination(items, options = {}) {
150735
150995
  const pageSize = options.pageSize ?? 18;
150736
- const [currentPage, setCurrentPage] = (0, import_react127.useState)(1);
150737
- const prevItemsLengthRef = (0, import_react127.useRef)(items.length);
150738
- const totalPages = (0, import_react127.useMemo)(
150996
+ const [currentPage, setCurrentPage] = (0, import_react129.useState)(1);
150997
+ const prevItemsLengthRef = (0, import_react129.useRef)(items.length);
150998
+ const totalPages = (0, import_react129.useMemo)(
150739
150999
  () => Math.max(1, Math.ceil(items.length / pageSize)),
150740
151000
  [items.length, pageSize]
150741
151001
  );
150742
- (0, import_react127.useEffect)(() => {
151002
+ (0, import_react129.useEffect)(() => {
150743
151003
  if (items.length !== prevItemsLengthRef.current) {
150744
151004
  setCurrentPage(1);
150745
151005
  prevItemsLengthRef.current = items.length;
@@ -150748,23 +151008,23 @@ function usePagination(items, options = {}) {
150748
151008
  const safePage = Math.min(currentPage, totalPages);
150749
151009
  const startIndex = (safePage - 1) * pageSize;
150750
151010
  const endIndex = Math.min(startIndex + pageSize, items.length);
150751
- const pageItems = (0, import_react127.useMemo)(
151011
+ const pageItems = (0, import_react129.useMemo)(
150752
151012
  () => items.slice(startIndex, endIndex),
150753
151013
  [items, startIndex, endIndex]
150754
151014
  );
150755
151015
  const hasNextPage = safePage < totalPages;
150756
151016
  const hasPrevPage = safePage > 1;
150757
- const nextPage = (0, import_react127.useCallback)(() => {
151017
+ const nextPage = (0, import_react129.useCallback)(() => {
150758
151018
  if (hasNextPage) {
150759
151019
  setCurrentPage((p) => p + 1);
150760
151020
  }
150761
151021
  }, [hasNextPage]);
150762
- const prevPage = (0, import_react127.useCallback)(() => {
151022
+ const prevPage = (0, import_react129.useCallback)(() => {
150763
151023
  if (hasPrevPage) {
150764
151024
  setCurrentPage((p) => p - 1);
150765
151025
  }
150766
151026
  }, [hasPrevPage]);
150767
- const goToPage = (0, import_react127.useCallback)(
151027
+ const goToPage = (0, import_react129.useCallback)(
150768
151028
  (page) => {
150769
151029
  const clampedPage = Math.max(1, Math.min(page, totalPages));
150770
151030
  setCurrentPage(clampedPage);
@@ -150786,7 +151046,7 @@ function usePagination(items, options = {}) {
150786
151046
  }
150787
151047
 
150788
151048
  // src/hooks/useFilter.ts
150789
- var import_react128 = __toESM(require_react(), 1);
151049
+ var import_react130 = __toESM(require_react(), 1);
150790
151050
  var defaultFilter = {
150791
151051
  search: "",
150792
151052
  repo: null,
@@ -150839,8 +151099,8 @@ function comparePRs(a, b, sortBy, sortDirection) {
150839
151099
  return sortDirection === "asc" ? -comparison : comparison;
150840
151100
  }
150841
151101
  function useFilter(items) {
150842
- const [filter9, setFilter] = (0, import_react128.useState)(defaultFilter);
150843
- const availableRepos = (0, import_react128.useMemo)(() => {
151102
+ const [filter9, setFilter] = (0, import_react130.useState)(defaultFilter);
151103
+ const availableRepos = (0, import_react130.useMemo)(() => {
150844
151104
  const repos = /* @__PURE__ */ new Set();
150845
151105
  items.forEach((pr) => {
150846
151106
  const repo = extractRepoFromPRUrl(pr.html_url);
@@ -150848,17 +151108,17 @@ function useFilter(items) {
150848
151108
  });
150849
151109
  return Array.from(repos).sort();
150850
151110
  }, [items]);
150851
- const availableAuthors = (0, import_react128.useMemo)(() => {
151111
+ const availableAuthors = (0, import_react130.useMemo)(() => {
150852
151112
  const authors = /* @__PURE__ */ new Set();
150853
151113
  items.forEach((pr) => authors.add(pr.user.login));
150854
151114
  return Array.from(authors).sort();
150855
151115
  }, [items]);
150856
- const availableLabels = (0, import_react128.useMemo)(() => {
151116
+ const availableLabels = (0, import_react130.useMemo)(() => {
150857
151117
  const labels = /* @__PURE__ */ new Set();
150858
151118
  items.forEach((pr) => pr.labels.forEach((l) => labels.add(l.name)));
150859
151119
  return Array.from(labels).sort();
150860
151120
  }, [items]);
150861
- const repoFacets = (0, import_react128.useMemo)(() => {
151121
+ const repoFacets = (0, import_react130.useMemo)(() => {
150862
151122
  const counts = /* @__PURE__ */ new Map();
150863
151123
  items.forEach((pr) => {
150864
151124
  const repo = extractRepoFromPRUrl(pr.html_url);
@@ -150866,14 +151126,14 @@ function useFilter(items) {
150866
151126
  });
150867
151127
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
150868
151128
  }, [items]);
150869
- const authorFacets = (0, import_react128.useMemo)(() => {
151129
+ const authorFacets = (0, import_react130.useMemo)(() => {
150870
151130
  const counts = /* @__PURE__ */ new Map();
150871
151131
  items.forEach((pr) => {
150872
151132
  counts.set(pr.user.login, (counts.get(pr.user.login) ?? 0) + 1);
150873
151133
  });
150874
151134
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
150875
151135
  }, [items]);
150876
- const labelFacets = (0, import_react128.useMemo)(() => {
151136
+ const labelFacets = (0, import_react130.useMemo)(() => {
150877
151137
  const counts = /* @__PURE__ */ new Map();
150878
151138
  items.forEach(
150879
151139
  (pr) => pr.labels.forEach((l) => {
@@ -150882,31 +151142,31 @@ function useFilter(items) {
150882
151142
  );
150883
151143
  return Array.from(counts.entries()).map(([value5, count]) => ({ value: value5, count })).sort((a, b) => b.count - a.count);
150884
151144
  }, [items]);
150885
- const filteredItems = (0, import_react128.useMemo)(() => {
151145
+ const filteredItems = (0, import_react130.useMemo)(() => {
150886
151146
  return items.filter((pr) => matchesSearch(pr, filter9.search)).filter((pr) => matchesRepo(pr, filter9.repo)).filter((pr) => matchesAuthor(pr, filter9.author)).filter((pr) => matchesLabel(pr, filter9.label)).sort((a, b) => comparePRs(a, b, filter9.sortBy, filter9.sortDirection));
150887
151147
  }, [items, filter9]);
150888
- const setSearch = (0, import_react128.useCallback)((search) => {
151148
+ const setSearch = (0, import_react130.useCallback)((search) => {
150889
151149
  setFilter((prev) => ({ ...prev, search }));
150890
151150
  }, []);
150891
- const setRepo = (0, import_react128.useCallback)((repo) => {
151151
+ const setRepo = (0, import_react130.useCallback)((repo) => {
150892
151152
  setFilter((prev) => ({ ...prev, repo }));
150893
151153
  }, []);
150894
- const setAuthor = (0, import_react128.useCallback)((author) => {
151154
+ const setAuthor = (0, import_react130.useCallback)((author) => {
150895
151155
  setFilter((prev) => ({ ...prev, author }));
150896
151156
  }, []);
150897
- const setLabel = (0, import_react128.useCallback)((label) => {
151157
+ const setLabel = (0, import_react130.useCallback)((label) => {
150898
151158
  setFilter((prev) => ({ ...prev, label }));
150899
151159
  }, []);
150900
- const setSortBy = (0, import_react128.useCallback)((sortBy) => {
151160
+ const setSortBy = (0, import_react130.useCallback)((sortBy) => {
150901
151161
  setFilter((prev) => ({ ...prev, sortBy }));
150902
151162
  }, []);
150903
- const toggleSortDirection = (0, import_react128.useCallback)(() => {
151163
+ const toggleSortDirection = (0, import_react130.useCallback)(() => {
150904
151164
  setFilter((prev) => ({
150905
151165
  ...prev,
150906
151166
  sortDirection: prev.sortDirection === "asc" ? "desc" : "asc"
150907
151167
  }));
150908
151168
  }, []);
150909
- const clearFilters = (0, import_react128.useCallback)(() => {
151169
+ const clearFilters = (0, import_react130.useCallback)(() => {
150910
151170
  setFilter(defaultFilter);
150911
151171
  }, []);
150912
151172
  const hasActiveFilters = filter9.search !== "" || filter9.repo !== null || filter9.author !== null || filter9.label !== null;
@@ -150931,7 +151191,7 @@ function useFilter(items) {
150931
151191
  }
150932
151192
 
150933
151193
  // src/hooks/usePrefetch.ts
150934
- var import_react129 = __toESM(require_react(), 1);
151194
+ var import_react131 = __toESM(require_react(), 1);
150935
151195
  var DEFAULT_DELAY_MS = 500;
150936
151196
  var DEFAULT_MIN_RATE_LIMIT = 200;
150937
151197
  function shouldPrefetch(options) {
@@ -151010,10 +151270,10 @@ function usePrefetch({
151010
151270
  minRateLimit = DEFAULT_MIN_RATE_LIMIT
151011
151271
  }) {
151012
151272
  const queryClient2 = useQueryClient();
151013
- const [prefetchedPR, setPrefetchedPR] = (0, import_react129.useState)(null);
151014
- const [isPrefetching, setIsPrefetching] = (0, import_react129.useState)(false);
151015
- const prefetchedSetRef = (0, import_react129.useRef)(/* @__PURE__ */ new Set());
151016
- const doPrefetch = (0, import_react129.useCallback)(
151273
+ const [prefetchedPR, setPrefetchedPR] = (0, import_react131.useState)(null);
151274
+ const [isPrefetching, setIsPrefetching] = (0, import_react131.useState)(false);
151275
+ const prefetchedSetRef = (0, import_react131.useRef)(/* @__PURE__ */ new Set());
151276
+ const doPrefetch = (0, import_react131.useCallback)(
151017
151277
  async (prNumber) => {
151018
151278
  if (!owner || !repo) return;
151019
151279
  setIsPrefetching(true);
@@ -151032,7 +151292,7 @@ function usePrefetch({
151032
151292
  },
151033
151293
  [queryClient2, owner, repo]
151034
151294
  );
151035
- (0, import_react129.useEffect)(() => {
151295
+ (0, import_react131.useEffect)(() => {
151036
151296
  const rateLimitRemaining = getRateLimitRemaining();
151037
151297
  const prNumber = shouldPrefetch({
151038
151298
  items,
@@ -151450,7 +151710,7 @@ function PaginationBar({
151450
151710
  }
151451
151711
 
151452
151712
  // src/components/common/FilterModal.tsx
151453
- var import_react130 = __toESM(require_react(), 1);
151713
+ var import_react132 = __toESM(require_react(), 1);
151454
151714
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
151455
151715
  var FILTER_FIELDS = ["search", "repo", "author", "label"];
151456
151716
  function FacetSection({
@@ -151526,17 +151786,17 @@ function FilterModal({
151526
151786
  }) {
151527
151787
  const theme14 = useTheme();
151528
151788
  const { setInputActive } = useInputFocus();
151529
- const [activeField, setActiveField] = (0, import_react130.useState)("search");
151530
- const [searchValue, setSearchValue] = (0, import_react130.useState)(filter9.search);
151531
- const [repoIndex, setRepoIndex] = (0, import_react130.useState)(0);
151532
- const [authorIndex, setAuthorIndex] = (0, import_react130.useState)(0);
151533
- const [labelIndex, setLabelIndex] = (0, import_react130.useState)(0);
151789
+ const [activeField, setActiveField] = (0, import_react132.useState)("search");
151790
+ const [searchValue, setSearchValue] = (0, import_react132.useState)(filter9.search);
151791
+ const [repoIndex, setRepoIndex] = (0, import_react132.useState)(0);
151792
+ const [authorIndex, setAuthorIndex] = (0, import_react132.useState)(0);
151793
+ const [labelIndex, setLabelIndex] = (0, import_react132.useState)(0);
151534
151794
  const isSearchField = activeField === "search";
151535
- (0, import_react130.useEffect)(() => {
151795
+ (0, import_react132.useEffect)(() => {
151536
151796
  setInputActive(isSearchField);
151537
151797
  return () => setInputActive(false);
151538
151798
  }, [setInputActive, isSearchField]);
151539
- (0, import_react130.useEffect)(() => {
151799
+ (0, import_react132.useEffect)(() => {
151540
151800
  onSearchChange(searchValue);
151541
151801
  }, [searchValue, onSearchChange]);
151542
151802
  const getMaxIndex = (field) => {
@@ -151702,12 +151962,12 @@ function FilterModal({
151702
151962
  }
151703
151963
 
151704
151964
  // src/components/common/SortModal.tsx
151705
- var import_react133 = __toESM(require_react(), 1);
151965
+ var import_react135 = __toESM(require_react(), 1);
151706
151966
 
151707
151967
  // node_modules/.pnpm/ink-select-input@6.2.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-select-input/build/Indicator.js
151708
- var import_react131 = __toESM(require_react(), 1);
151968
+ var import_react133 = __toESM(require_react(), 1);
151709
151969
  function Indicator({ isSelected = false }) {
151710
- return import_react131.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react131.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react131.default.createElement(Text, null, " "));
151970
+ return import_react133.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react133.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react133.default.createElement(Text, null, " "));
151711
151971
  }
151712
151972
  var Indicator_default = Indicator;
151713
151973
 
@@ -151719,7 +151979,7 @@ function Item({ isSelected = false, label }) {
151719
151979
  var Item_default = Item;
151720
151980
 
151721
151981
  // node_modules/.pnpm/ink-select-input@6.2.0_ink@6.7.0_@types+react@19.2.13_react@19.2.4__react@19.2.4/node_modules/ink-select-input/build/SelectInput.js
151722
- var import_react132 = __toESM(require_react(), 1);
151982
+ var import_react134 = __toESM(require_react(), 1);
151723
151983
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
151724
151984
 
151725
151985
  // node_modules/.pnpm/to-rotated@1.0.0/node_modules/to-rotated/index.js
@@ -151749,17 +152009,17 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
151749
152009
  const hasLimit = typeof customLimit === "number" && items.length > customLimit;
151750
152010
  const limit = hasLimit ? Math.min(customLimit, items.length) : items.length;
151751
152011
  const lastIndex = limit - 1;
151752
- const [rotateIndex, setRotateIndex] = (0, import_react132.useState)(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
151753
- const [selectedIndex, setSelectedIndex] = (0, import_react132.useState)(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
151754
- const previousItems = (0, import_react132.useRef)(items);
151755
- (0, import_react132.useEffect)(() => {
152012
+ const [rotateIndex, setRotateIndex] = (0, import_react134.useState)(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
152013
+ const [selectedIndex, setSelectedIndex] = (0, import_react134.useState)(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
152014
+ const previousItems = (0, import_react134.useRef)(items);
152015
+ (0, import_react134.useEffect)(() => {
151756
152016
  if (!isDeepStrictEqual3(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
151757
152017
  setRotateIndex(0);
151758
152018
  setSelectedIndex(0);
151759
152019
  }
151760
152020
  previousItems.current = items;
151761
152021
  }, [items]);
151762
- use_input_default((0, import_react132.useCallback)((input, key) => {
152022
+ use_input_default((0, import_react134.useCallback)((input, key) => {
151763
152023
  if (input === "k" || key.upArrow) {
151764
152024
  const lastIndex2 = (hasLimit ? limit : items.length) - 1;
151765
152025
  const atFirstIndex = selectedIndex === 0;
@@ -151811,15 +152071,15 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
151811
152071
  onHighlight
151812
152072
  ]), { isActive: isFocused });
151813
152073
  const slicedItems = hasLimit ? toRotated(items, rotateIndex).slice(0, limit) : items;
151814
- return import_react132.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
152074
+ return import_react134.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
151815
152075
  const isSelected = index === selectedIndex;
151816
152076
  return (
151817
152077
  // @ts-expect-error - `key` can't be optional but `item.value` is generic T
151818
- import_react132.default.createElement(
152078
+ import_react134.default.createElement(
151819
152079
  Box_default,
151820
152080
  { key: item.key ?? item.value },
151821
- import_react132.default.createElement(indicatorComponent, { isSelected }),
151822
- import_react132.default.createElement(itemComponent, { ...item, isSelected })
152081
+ import_react134.default.createElement(indicatorComponent, { isSelected }),
152082
+ import_react134.default.createElement(itemComponent, { ...item, isSelected })
151823
152083
  )
151824
152084
  );
151825
152085
  }));
@@ -151848,7 +152108,7 @@ function SortModal({
151848
152108
  onClose();
151849
152109
  }
151850
152110
  });
151851
- const items = (0, import_react133.useMemo)(
152111
+ const items = (0, import_react135.useMemo)(
151852
152112
  () => SORT_OPTIONS.map((option7) => ({
151853
152113
  label: `${option7.label}${option7.key === currentSort ? sortDirection === "desc" ? " \u2193" : " \u2191" : ""}`,
151854
152114
  value: option7.key
@@ -151895,7 +152155,7 @@ function SortModal({
151895
152155
  }
151896
152156
 
151897
152157
  // src/hooks/useBatchSelect.ts
151898
- var import_react134 = __toESM(require_react(), 1);
152158
+ var import_react136 = __toESM(require_react(), 1);
151899
152159
  var INITIAL_STATE2 = {
151900
152160
  isMultiSelect: false,
151901
152161
  selectedIndices: []
@@ -151947,24 +152207,24 @@ function createBatchSelectStore() {
151947
152207
  }
151948
152208
  var store7 = createBatchSelectStore();
151949
152209
  function useBatchSelect() {
151950
- const state = (0, import_react134.useSyncExternalStore)(
152210
+ const state = (0, import_react136.useSyncExternalStore)(
151951
152211
  store7.subscribe,
151952
152212
  store7.getSnapshot,
151953
152213
  () => INITIAL_STATE2
151954
152214
  );
151955
- const enterMultiSelect = (0, import_react134.useCallback)(() => {
152215
+ const enterMultiSelect = (0, import_react136.useCallback)(() => {
151956
152216
  store7.enterMultiSelect();
151957
152217
  }, []);
151958
- const exitMultiSelect = (0, import_react134.useCallback)(() => {
152218
+ const exitMultiSelect = (0, import_react136.useCallback)(() => {
151959
152219
  store7.exitMultiSelect();
151960
152220
  }, []);
151961
- const toggle2 = (0, import_react134.useCallback)((index) => {
152221
+ const toggle2 = (0, import_react136.useCallback)((index) => {
151962
152222
  store7.toggle(index);
151963
152223
  }, []);
151964
- const selectAll = (0, import_react134.useCallback)((itemCount) => {
152224
+ const selectAll = (0, import_react136.useCallback)((itemCount) => {
151965
152225
  store7.selectAll(itemCount);
151966
152226
  }, []);
151967
- const clearAll = (0, import_react134.useCallback)(() => {
152227
+ const clearAll = (0, import_react136.useCallback)(() => {
151968
152228
  store7.clearAll();
151969
152229
  }, []);
151970
152230
  return {
@@ -151979,7 +152239,7 @@ function useBatchSelect() {
151979
152239
  }
151980
152240
 
151981
152241
  // src/hooks/useNotifications.ts
151982
- var import_react135 = __toESM(require_react(), 1);
152242
+ var import_react137 = __toESM(require_react(), 1);
151983
152243
 
151984
152244
  // src/utils/notifications.ts
151985
152245
  import { execFile as execFile4 } from "child_process";
@@ -152045,8 +152305,8 @@ function buildSnapshotMap(prs) {
152045
152305
  );
152046
152306
  }
152047
152307
  function useNotifications(prs, config3, currentUserLogin) {
152048
- const previousPRsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Map());
152049
- (0, import_react135.useEffect)(() => {
152308
+ const previousPRsRef = (0, import_react137.useRef)(/* @__PURE__ */ new Map());
152309
+ (0, import_react137.useEffect)(() => {
152050
152310
  if (!config3.enabled || !prs) return;
152051
152311
  const prevMap = previousPRsRef.current;
152052
152312
  if (config3.notifyOnNewPR) {
@@ -152211,11 +152471,11 @@ function PRListScreen({
152211
152471
  },
152212
152472
  currentUser?.login
152213
152473
  );
152214
- const [showFilter, setShowFilter] = (0, import_react136.useState)(false);
152215
- const [showSort, setShowSort] = (0, import_react136.useState)(false);
152216
- const [showUnreadOnly, setShowUnreadOnly] = (0, import_react136.useState)(false);
152217
- const [compactMode, setCompactMode] = (0, import_react136.useState)(config3?.compactList ?? false);
152218
- const [showPreview, setShowPreview] = (0, import_react136.useState)(false);
152474
+ const [showFilter, setShowFilter] = (0, import_react138.useState)(false);
152475
+ const [showSort, setShowSort] = (0, import_react138.useState)(false);
152476
+ const [showUnreadOnly, setShowUnreadOnly] = (0, import_react138.useState)(false);
152477
+ const [compactMode, setCompactMode] = (0, import_react138.useState)(config3?.compactList ?? false);
152478
+ const [showPreview, setShowPreview] = (0, import_react138.useState)(false);
152219
152479
  const { stdout } = use_stdout_default();
152220
152480
  const terminalWidth = stdout?.columns ?? 80;
152221
152481
  const isWideTerminal = terminalWidth >= PREVIEW_PANEL_MIN_TERMINAL_WIDTH;
@@ -152243,7 +152503,7 @@ function PRListScreen({
152243
152503
  authorFacets,
152244
152504
  labelFacets
152245
152505
  } = useFilter(prs);
152246
- const displayItems = (0, import_react136.useMemo)(
152506
+ const displayItems = (0, import_react138.useMemo)(
152247
152507
  () => showUnreadOnly ? filteredItems.filter((pr) => isUnread(pr.html_url, pr.updated_at)) : filteredItems,
152248
152508
  [filteredItems, showUnreadOnly, isUnread]
152249
152509
  );
@@ -152264,7 +152524,7 @@ function PRListScreen({
152264
152524
  isActive: !showFilter && !showSort
152265
152525
  });
152266
152526
  const selectedPRForPrefetch = pageItems[selectedIndex];
152267
- const parsedUrl = (0, import_react136.useMemo)(
152527
+ const parsedUrl = (0, import_react138.useMemo)(
152268
152528
  () => !ownerProp && selectedPRForPrefetch ? parseGitHubPRUrl(selectedPRForPrefetch.html_url) : null,
152269
152529
  [ownerProp, selectedPRForPrefetch?.html_url]
152270
152530
  );
@@ -152409,7 +152669,7 @@ function PRListScreen({
152409
152669
  return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(EmptyState, { message: emptyMessage });
152410
152670
  }
152411
152671
  const selectedPR = pageItems[selectedIndex];
152412
- (0, import_react136.useEffect)(() => {
152672
+ (0, import_react138.useEffect)(() => {
152413
152673
  if (selectedPR) {
152414
152674
  setSelectionContext({
152415
152675
  type: "pr-list-item",
@@ -152507,7 +152767,7 @@ function PRListScreen({
152507
152767
  // src/screens/MyPRsScreen.tsx
152508
152768
  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
152509
152769
  function MyPRsScreen({ onSelect }) {
152510
- const [stateFilter, setStateFilter] = (0, import_react137.useState)("open");
152770
+ const [stateFilter, setStateFilter] = (0, import_react139.useState)("open");
152511
152771
  const { data: prs = [], isLoading, error: error48 } = useMyPRs(stateFilter);
152512
152772
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
152513
152773
  PRListScreen,
@@ -152527,10 +152787,10 @@ function MyPRsScreen({ onSelect }) {
152527
152787
  }
152528
152788
 
152529
152789
  // src/screens/ReviewRequestsScreen.tsx
152530
- var import_react138 = __toESM(require_react(), 1);
152790
+ var import_react140 = __toESM(require_react(), 1);
152531
152791
  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
152532
152792
  function ReviewRequestsScreen({ onSelect }) {
152533
- const [stateFilter, setStateFilter] = (0, import_react138.useState)("open");
152793
+ const [stateFilter, setStateFilter] = (0, import_react140.useState)("open");
152534
152794
  const { data: prs = [], isLoading, error: error48 } = useReviewRequests(stateFilter);
152535
152795
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
152536
152796
  PRListScreen,
@@ -152550,7 +152810,7 @@ function ReviewRequestsScreen({ onSelect }) {
152550
152810
  }
152551
152811
 
152552
152812
  // src/screens/SettingsScreen.tsx
152553
- var import_react140 = __toESM(require_react(), 1);
152813
+ var import_react142 = __toESM(require_react(), 1);
152554
152814
 
152555
152815
  // src/hooks/useAuth.ts
152556
152816
  function useAuth() {
@@ -152655,7 +152915,7 @@ function useAuth() {
152655
152915
  }
152656
152916
 
152657
152917
  // src/hooks/useBookmarkedRepos.ts
152658
- var import_react139 = __toESM(require_react(), 1);
152918
+ var import_react141 = __toESM(require_react(), 1);
152659
152919
  function validateBookmarkInput(input) {
152660
152920
  const trimmed2 = input.trim();
152661
152921
  if (!trimmed2.includes("/")) {
@@ -152680,8 +152940,8 @@ function removeBookmarkFromList(repos, owner, repo) {
152680
152940
  function useBookmarkedRepos() {
152681
152941
  const { config: config3, updateConfig } = useConfig();
152682
152942
  const stateStore = useStateStore();
152683
- const [revision, setRevision] = (0, import_react139.useState)(0);
152684
- (0, import_react139.useEffect)(() => {
152943
+ const [revision, setRevision] = (0, import_react141.useState)(0);
152944
+ (0, import_react141.useEffect)(() => {
152685
152945
  if (!stateStore) return;
152686
152946
  const configBookmarks = config3?.bookmarkedRepos ?? [];
152687
152947
  if (configBookmarks.length > 0) {
@@ -152698,7 +152958,7 @@ function useBookmarkedRepos() {
152698
152958
  setRevision((r) => r + 1);
152699
152959
  }
152700
152960
  }, [stateStore]);
152701
- const bookmarkedRepos = (0, import_react139.useMemo)(() => {
152961
+ const bookmarkedRepos = (0, import_react141.useMemo)(() => {
152702
152962
  if (stateStore) {
152703
152963
  return stateStore.getBookmarkedRepos().map((r) => ({
152704
152964
  owner: r.owner,
@@ -152707,7 +152967,7 @@ function useBookmarkedRepos() {
152707
152967
  }
152708
152968
  return config3?.bookmarkedRepos ?? [];
152709
152969
  }, [stateStore, config3?.bookmarkedRepos, revision]);
152710
- const addBookmark = (0, import_react139.useCallback)(
152970
+ const addBookmark = (0, import_react141.useCallback)(
152711
152971
  (owner, repo) => {
152712
152972
  if (stateStore) {
152713
152973
  stateStore.addBookmarkedRepo(owner, repo);
@@ -152722,7 +152982,7 @@ function useBookmarkedRepos() {
152722
152982
  },
152723
152983
  [stateStore, config3?.bookmarkedRepos, updateConfig]
152724
152984
  );
152725
- const removeBookmark = (0, import_react139.useCallback)(
152985
+ const removeBookmark = (0, import_react141.useCallback)(
152726
152986
  (owner, repo) => {
152727
152987
  if (stateStore) {
152728
152988
  stateStore.removeBookmarkedRepo(owner, repo);
@@ -152843,6 +153103,30 @@ function maskApiKey(key) {
152843
153103
  if (!key || key.length < 8) return key ? "****" : "(not set)";
152844
153104
  return `${key.slice(0, 4)}...${key.slice(-4)}`;
152845
153105
  }
153106
+ var STATS_RANGES = [
153107
+ { label: "Today", range: "today" },
153108
+ { label: "This Week", range: "week" },
153109
+ { label: "All Time", range: "all" }
153110
+ ];
153111
+ function ReviewStatsSection() {
153112
+ const theme14 = useTheme();
153113
+ const sessions = useReviewSessions();
153114
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
153115
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Box_default, { paddingX: 1, marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Divider, { title: "Review Stats" }) }),
153116
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 0, marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { color: theme14.colors.secondary, bold: true, children: "Review Stats" }) }),
153117
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Box_default, { flexDirection: "column", gap: 0, children: STATS_RANGES.map(({ label, range }) => {
153118
+ const filtered = filterByRange(sessions, range);
153119
+ const stats = aggregateStats(filtered);
153120
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Box_default, { gap: 2, paddingX: 2, children: [
153121
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Box_default, { width: 20, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Text, { color: theme14.colors.muted, children: [
153122
+ " ",
153123
+ label
153124
+ ] }) }),
153125
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { color: theme14.colors.text, children: stats.count === 0 ? "No sessions" : `${stats.count} review${stats.count !== 1 ? "s" : ""} | ${formatDuration(stats.totalMs)} total | ${formatDuration(stats.avgMs)} avg | ${stats.filesReviewed} file${stats.filesReviewed !== 1 ? "s" : ""}` })
153126
+ ] }, range);
153127
+ }) })
153128
+ ] });
153129
+ }
152846
153130
  function SettingsScreen() {
152847
153131
  const theme14 = useTheme();
152848
153132
  const { config: config3, loading: configLoading, error: configError, updateConfig } = useConfig();
@@ -152858,15 +153142,15 @@ function SettingsScreen() {
152858
153142
  const { setStatusMessage } = useStatusMessage();
152859
153143
  const { setInputActive } = useInputFocus();
152860
153144
  const { bookmarkedRepos, addBookmark, removeBookmark } = useBookmarkedRepos();
152861
- const [selectedItem, setSelectedItem] = (0, import_react140.useState)("token_source");
152862
- const [editingField, setEditingField] = (0, import_react140.useState)(null);
152863
- const [editValue, setEditValue] = (0, import_react140.useState)("");
152864
- const [tokenMessage, setTokenMessage] = (0, import_react140.useState)(null);
152865
- const [bookmarkSelectedIndex, setBookmarkSelectedIndex] = (0, import_react140.useState)(0);
152866
- const [bookmarkError, setBookmarkError] = (0, import_react140.useState)(null);
152867
- const [instanceStatuses, setInstanceStatuses] = (0, import_react140.useState)(/* @__PURE__ */ new Map());
153145
+ const [selectedItem, setSelectedItem] = (0, import_react142.useState)("token_source");
153146
+ const [editingField, setEditingField] = (0, import_react142.useState)(null);
153147
+ const [editValue, setEditValue] = (0, import_react142.useState)("");
153148
+ const [tokenMessage, setTokenMessage] = (0, import_react142.useState)(null);
153149
+ const [bookmarkSelectedIndex, setBookmarkSelectedIndex] = (0, import_react142.useState)(0);
153150
+ const [bookmarkError, setBookmarkError] = (0, import_react142.useState)(null);
153151
+ const [instanceStatuses, setInstanceStatuses] = (0, import_react142.useState)(/* @__PURE__ */ new Map());
152868
153152
  const configuredInstances = config3 ? getConfiguredInstances(config3) : [];
152869
- (0, import_react140.useEffect)(() => {
153153
+ (0, import_react142.useEffect)(() => {
152870
153154
  if (!config3) return;
152871
153155
  const instances2 = getConfiguredInstances(config3);
152872
153156
  const nonDefaultInstances = instances2.filter((i) => !i.isDefault);
@@ -153396,6 +153680,7 @@ function SettingsScreen() {
153396
153680
  }
153397
153681
  ) }, `${bookmark.owner}/${bookmark.repo}`);
153398
153682
  }) }),
153683
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ReviewStatsSection, {}),
153399
153684
  /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Box_default, { paddingX: 1, paddingTop: 2, flexDirection: "column", children: [
153400
153685
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Text, { color: theme14.colors.muted, dimColor: true, children: "Config: ~/.config/lazyreview/config.yaml" }),
153401
153686
  /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Text, { color: theme14.colors.muted, dimColor: true, children: [
@@ -153410,10 +153695,10 @@ function SettingsScreen() {
153410
153695
  }
153411
153696
 
153412
153697
  // src/screens/InvolvedScreen.tsx
153413
- var import_react141 = __toESM(require_react(), 1);
153698
+ var import_react143 = __toESM(require_react(), 1);
153414
153699
  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
153415
153700
  function InvolvedScreen({ onSelect }) {
153416
- const [stateFilter, setStateFilter] = (0, import_react141.useState)("open");
153701
+ const [stateFilter, setStateFilter] = (0, import_react143.useState)("open");
153417
153702
  const { data: prs = [], isLoading, error: error48 } = useInvolvedPRs(stateFilter);
153418
153703
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
153419
153704
  PRListScreen,
@@ -153433,10 +153718,10 @@ function InvolvedScreen({ onSelect }) {
153433
153718
  }
153434
153719
 
153435
153720
  // src/screens/ThisRepoScreen.tsx
153436
- var import_react143 = __toESM(require_react(), 1);
153721
+ var import_react145 = __toESM(require_react(), 1);
153437
153722
 
153438
153723
  // src/components/pr/CreatePRModal.tsx
153439
- var import_react142 = __toESM(require_react(), 1);
153724
+ var import_react144 = __toESM(require_react(), 1);
153440
153725
  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
153441
153726
  function CreatePRModal({
153442
153727
  headBranch,
@@ -153449,14 +153734,14 @@ function CreatePRModal({
153449
153734
  }) {
153450
153735
  const theme14 = useTheme();
153451
153736
  const { setInputActive } = useInputFocus();
153452
- const [step4, setStep] = (0, import_react142.useState)("title");
153453
- const [title, setTitle] = (0, import_react142.useState)("");
153454
- const [body, setBody] = (0, import_react142.useState)("");
153455
- const [baseBranch, setBaseBranch] = (0, import_react142.useState)(defaultBaseBranch);
153456
- const [draft, setDraft] = (0, import_react142.useState)(false);
153457
- const [editingBase, setEditingBase] = (0, import_react142.useState)(false);
153458
- const [optionIndex, setOptionIndex] = (0, import_react142.useState)(0);
153459
- (0, import_react142.useEffect)(() => {
153737
+ const [step4, setStep] = (0, import_react144.useState)("title");
153738
+ const [title, setTitle] = (0, import_react144.useState)("");
153739
+ const [body, setBody] = (0, import_react144.useState)("");
153740
+ const [baseBranch, setBaseBranch] = (0, import_react144.useState)(defaultBaseBranch);
153741
+ const [draft, setDraft] = (0, import_react144.useState)(false);
153742
+ const [editingBase, setEditingBase] = (0, import_react144.useState)(false);
153743
+ const [optionIndex, setOptionIndex] = (0, import_react144.useState)(0);
153744
+ (0, import_react144.useEffect)(() => {
153460
153745
  if (step4 === "title" || step4 === "body" || editingBase) {
153461
153746
  setInputActive(true);
153462
153747
  } else {
@@ -153464,7 +153749,7 @@ function CreatePRModal({
153464
153749
  }
153465
153750
  return () => setInputActive(false);
153466
153751
  }, [step4, editingBase, setInputActive]);
153467
- const handleSubmit = (0, import_react142.useCallback)(() => {
153752
+ const handleSubmit = (0, import_react144.useCallback)(() => {
153468
153753
  if (isSubmitting) return;
153469
153754
  if (!title.trim()) return;
153470
153755
  onSubmit({
@@ -153704,11 +153989,11 @@ function CreatePRModal({
153704
153989
  // src/screens/ThisRepoScreen.tsx
153705
153990
  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
153706
153991
  function ThisRepoScreen({ owner, repo, onSelect }) {
153707
- const [stateFilter, setStateFilter] = (0, import_react143.useState)("open");
153708
- const [showCreatePR, setShowCreatePR] = (0, import_react143.useState)(false);
153709
- const [createError, setCreateError] = (0, import_react143.useState)(null);
153710
- const [branchInfo, setBranchInfo] = (0, import_react143.useState)(null);
153711
- const [navigateToPR, setNavigateToPR] = (0, import_react143.useState)(null);
153992
+ const [stateFilter, setStateFilter] = (0, import_react145.useState)("open");
153993
+ const [showCreatePR, setShowCreatePR] = (0, import_react145.useState)(false);
153994
+ const [createError, setCreateError] = (0, import_react145.useState)(null);
153995
+ const [branchInfo, setBranchInfo] = (0, import_react145.useState)(null);
153996
+ const [navigateToPR, setNavigateToPR] = (0, import_react145.useState)(null);
153712
153997
  const { setStatusMessage } = useStatusMessage();
153713
153998
  const { matchesAction: matchesAction2 } = useKeybindings("prList");
153714
153999
  const { data: prs = [], isLoading, error: error48 } = usePullRequests(
@@ -153722,14 +154007,14 @@ function ThisRepoScreen({ owner, repo, onSelect }) {
153722
154007
  repo ?? "",
153723
154008
  navigateToPR ?? 0
153724
154009
  );
153725
- (0, import_react143.useEffect)(() => {
154010
+ (0, import_react145.useEffect)(() => {
153726
154011
  if (navigateToPR && newPRData) {
153727
154012
  onSelect(newPRData);
153728
154013
  setNavigateToPR(null);
153729
154014
  setShowCreatePR(false);
153730
154015
  }
153731
154016
  }, [navigateToPR, newPRData, onSelect]);
153732
- (0, import_react143.useEffect)(() => {
154017
+ (0, import_react145.useEffect)(() => {
153733
154018
  if (showCreatePR && !branchInfo) {
153734
154019
  Promise.all([
153735
154020
  getCurrentBranch(),
@@ -153740,17 +154025,17 @@ function ThisRepoScreen({ owner, repo, onSelect }) {
153740
154025
  });
153741
154026
  }
153742
154027
  }, [showCreatePR, branchInfo]);
153743
- const handleOpenCreatePR = (0, import_react143.useCallback)(() => {
154028
+ const handleOpenCreatePR = (0, import_react145.useCallback)(() => {
153744
154029
  setCreateError(null);
153745
154030
  setBranchInfo(null);
153746
154031
  setShowCreatePR(true);
153747
154032
  }, []);
153748
- const handleCloseCreatePR = (0, import_react143.useCallback)(() => {
154033
+ const handleCloseCreatePR = (0, import_react145.useCallback)(() => {
153749
154034
  setShowCreatePR(false);
153750
154035
  setCreateError(null);
153751
154036
  setBranchInfo(null);
153752
154037
  }, []);
153753
- const handleSubmitCreatePR = (0, import_react143.useCallback)(
154038
+ const handleSubmitCreatePR = (0, import_react145.useCallback)(
153754
154039
  (params) => {
153755
154040
  if (!owner || !repo) return;
153756
154041
  createPR.mutate(
@@ -153845,11 +154130,11 @@ function ThisRepoScreen({ owner, repo, onSelect }) {
153845
154130
  }
153846
154131
 
153847
154132
  // src/screens/BrowseRepoScreen.tsx
153848
- var import_react146 = __toESM(require_react(), 1);
154133
+ var import_react148 = __toESM(require_react(), 1);
153849
154134
 
153850
154135
  // src/hooks/useRepoContext.tsx
153851
- var import_react144 = __toESM(require_react(), 1);
153852
- var RepoContext = (0, import_react144.createContext)({
154136
+ var import_react146 = __toESM(require_react(), 1);
154137
+ var RepoContext = (0, import_react146.createContext)({
153853
154138
  localRepo: null,
153854
154139
  browseRepo: null,
153855
154140
  setBrowseRepo: () => {
@@ -153861,14 +154146,14 @@ function RepoContextProvider({
153861
154146
  localRepo,
153862
154147
  children
153863
154148
  }) {
153864
- const [browseRepo, setBrowseRepoState] = (0, import_react144.useState)(null);
153865
- const setBrowseRepo = (0, import_react144.useCallback)((owner, repo) => {
154149
+ const [browseRepo, setBrowseRepoState] = (0, import_react146.useState)(null);
154150
+ const setBrowseRepo = (0, import_react146.useCallback)((owner, repo) => {
153866
154151
  setBrowseRepoState({ owner, repo });
153867
154152
  }, []);
153868
- const clearBrowseRepo = (0, import_react144.useCallback)(() => {
154153
+ const clearBrowseRepo = (0, import_react146.useCallback)(() => {
153869
154154
  setBrowseRepoState(null);
153870
154155
  }, []);
153871
- return import_react144.default.createElement(
154156
+ return import_react146.default.createElement(
153872
154157
  RepoContext.Provider,
153873
154158
  {
153874
154159
  value: {
@@ -153882,11 +154167,11 @@ function RepoContextProvider({
153882
154167
  );
153883
154168
  }
153884
154169
  function useRepoContext() {
153885
- return (0, import_react144.useContext)(RepoContext);
154170
+ return (0, import_react146.useContext)(RepoContext);
153886
154171
  }
153887
154172
 
153888
154173
  // src/hooks/useRecentRepos.ts
153889
- var import_react145 = __toESM(require_react(), 1);
154174
+ var import_react147 = __toESM(require_react(), 1);
153890
154175
  var MAX_RECENT_REPOS2 = 10;
153891
154176
  function addRecentRepoToList(repos, owner, repo, now2) {
153892
154177
  const filtered = repos.filter(
@@ -153909,8 +154194,8 @@ function sortByMostRecent(repos) {
153909
154194
  function useRecentRepos() {
153910
154195
  const { config: config3, updateConfig } = useConfig();
153911
154196
  const stateStore = useStateStore();
153912
- const [revision, setRevision] = (0, import_react145.useState)(0);
153913
- (0, import_react145.useEffect)(() => {
154197
+ const [revision, setRevision] = (0, import_react147.useState)(0);
154198
+ (0, import_react147.useEffect)(() => {
153914
154199
  if (!stateStore) return;
153915
154200
  const configRepos = config3?.recentRepos ?? [];
153916
154201
  if (configRepos.length > 0) {
@@ -153921,7 +154206,7 @@ function useRecentRepos() {
153921
154206
  setRevision((r) => r + 1);
153922
154207
  }
153923
154208
  }, [stateStore]);
153924
- const rawRepos = (0, import_react145.useMemo)(() => {
154209
+ const rawRepos = (0, import_react147.useMemo)(() => {
153925
154210
  if (stateStore) {
153926
154211
  return stateStore.getRecentRepos().map((r) => ({
153927
154212
  owner: r.owner,
@@ -153931,8 +154216,8 @@ function useRecentRepos() {
153931
154216
  }
153932
154217
  return config3?.recentRepos ?? [];
153933
154218
  }, [stateStore, config3?.recentRepos, revision]);
153934
- const recentRepos = (0, import_react145.useMemo)(() => sortByMostRecent(rawRepos), [rawRepos]);
153935
- const addRecentRepo = (0, import_react145.useCallback)(
154219
+ const recentRepos = (0, import_react147.useMemo)(() => sortByMostRecent(rawRepos), [rawRepos]);
154220
+ const addRecentRepo = (0, import_react147.useCallback)(
153936
154221
  (owner, repo) => {
153937
154222
  if (stateStore) {
153938
154223
  stateStore.addRecentRepo(owner, repo);
@@ -153946,7 +154231,7 @@ function useRecentRepos() {
153946
154231
  },
153947
154232
  [stateStore, config3?.recentRepos, updateConfig]
153948
154233
  );
153949
- const removeRecentRepo = (0, import_react145.useCallback)(
154234
+ const removeRecentRepo = (0, import_react147.useCallback)(
153950
154235
  (owner, repo) => {
153951
154236
  const current3 = config3?.recentRepos ?? [];
153952
154237
  const updated = removeRecentRepoFromList(current3, owner, repo);
@@ -154050,28 +154335,28 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2, configuredHosts }) {
154050
154335
  const { setInputActive } = useInputFocus();
154051
154336
  const { recentRepos, removeRecentRepo } = useRecentRepos();
154052
154337
  const { bookmarkedRepos } = useBookmarkedRepos();
154053
- const [inputValue, setInputValue] = (0, import_react146.useState)("");
154054
- const [inputError, setInputError] = (0, import_react146.useState)(null);
154055
- const [isInputFocused, setIsInputFocused] = (0, import_react146.useState)(false);
154056
- const [selectedIndex, setSelectedIndex] = (0, import_react146.useState)(0);
154338
+ const [inputValue, setInputValue] = (0, import_react148.useState)("");
154339
+ const [inputError, setInputError] = (0, import_react148.useState)(null);
154340
+ const [isInputFocused, setIsInputFocused] = (0, import_react148.useState)(false);
154341
+ const [selectedIndex, setSelectedIndex] = (0, import_react148.useState)(0);
154057
154342
  const bookmarkSet = new Set(bookmarkedRepos.map((b) => `${b.owner}/${b.repo}`));
154058
154343
  const filteredRecent = recentRepos.filter((r) => !bookmarkSet.has(`${r.owner}/${r.repo}`));
154059
154344
  const totalListItems = bookmarkedRepos.length + filteredRecent.length;
154060
- (0, import_react146.useEffect)(() => {
154345
+ (0, import_react148.useEffect)(() => {
154061
154346
  if (isActive2) {
154062
154347
  setIsInputFocused(true);
154063
154348
  } else {
154064
154349
  setIsInputFocused(false);
154065
154350
  }
154066
154351
  }, [isActive2]);
154067
- (0, import_react146.useEffect)(() => {
154352
+ (0, import_react148.useEffect)(() => {
154068
154353
  setInputActive(isInputFocused);
154069
154354
  return () => setInputActive(false);
154070
154355
  }, [isInputFocused, setInputActive]);
154071
- (0, import_react146.useEffect)(() => {
154356
+ (0, import_react148.useEffect)(() => {
154072
154357
  setScreenContext("browse-picker");
154073
154358
  }, []);
154074
- const handleSubmitInput = (0, import_react146.useCallback)(() => {
154359
+ const handleSubmitInput = (0, import_react148.useCallback)(() => {
154075
154360
  const result = validateRepoInput(inputValue, configuredHosts);
154076
154361
  if (!result.valid) {
154077
154362
  setInputError(result.error);
@@ -154086,7 +154371,7 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2, configuredHosts }) {
154086
154371
  baseUrl: result.baseUrl
154087
154372
  });
154088
154373
  }, [inputValue, onSelectRepo, configuredHosts]);
154089
- const handleSelectFromList = (0, import_react146.useCallback)(() => {
154374
+ const handleSelectFromList = (0, import_react148.useCallback)(() => {
154090
154375
  if (totalListItems === 0) return;
154091
154376
  if (selectedIndex < bookmarkedRepos.length) {
154092
154377
  const bookmark = bookmarkedRepos[selectedIndex];
@@ -154101,7 +154386,7 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2, configuredHosts }) {
154101
154386
  }
154102
154387
  }
154103
154388
  }, [selectedIndex, bookmarkedRepos, filteredRecent, totalListItems, onSelectRepo]);
154104
- const handleRemoveFromList = (0, import_react146.useCallback)(() => {
154389
+ const handleRemoveFromList = (0, import_react148.useCallback)(() => {
154105
154390
  if (selectedIndex >= bookmarkedRepos.length) {
154106
154391
  const recentIdx = selectedIndex - bookmarkedRepos.length;
154107
154392
  const recent = filteredRecent[recentIdx];
@@ -154218,11 +154503,11 @@ function BrowsePicker({ onSelectRepo, isActive: isActive2, configuredHosts }) {
154218
154503
  ] });
154219
154504
  }
154220
154505
  function BrowseList({ owner, repo, onBack, onSelect }) {
154221
- const [stateFilter, setStateFilter] = (0, import_react146.useState)("open");
154506
+ const [stateFilter, setStateFilter] = (0, import_react148.useState)("open");
154222
154507
  const { data: prs = [], isLoading, error: error48 } = usePullRequests(owner, repo, {
154223
154508
  state: stateFilter === "all" ? "all" : stateFilter === "closed" ? "closed" : "open"
154224
154509
  });
154225
- (0, import_react146.useEffect)(() => {
154510
+ (0, import_react148.useEffect)(() => {
154226
154511
  setScreenContext("browse-list");
154227
154512
  }, []);
154228
154513
  use_input_default(
@@ -154259,13 +154544,13 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
154259
154544
  const { setBrowseRepo, clearBrowseRepo } = useRepoContext();
154260
154545
  const { addRecentRepo } = useRecentRepos();
154261
154546
  const { config: config3 } = useConfig();
154262
- const [selectedRepo, setSelectedRepo] = (0, import_react146.useState)(null);
154263
- const [previousAuth, setPreviousAuth] = (0, import_react146.useState)(null);
154264
- const configuredHosts = import_react146.default.useMemo(
154547
+ const [selectedRepo, setSelectedRepo] = (0, import_react148.useState)(null);
154548
+ const [previousAuth, setPreviousAuth] = (0, import_react148.useState)(null);
154549
+ const configuredHosts = import_react148.default.useMemo(
154265
154550
  () => config3 ? toConfiguredHosts(config3) : void 0,
154266
154551
  [config3]
154267
154552
  );
154268
- const handleSelectRepo = (0, import_react146.useCallback)(
154553
+ const handleSelectRepo = (0, import_react148.useCallback)(
154269
154554
  (info) => {
154270
154555
  setSelectedRepo(info);
154271
154556
  setBrowseRepo(info.owner, info.repo);
@@ -154286,7 +154571,7 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
154286
154571
  },
154287
154572
  [setBrowseRepo, addRecentRepo]
154288
154573
  );
154289
- const handleBack = (0, import_react146.useCallback)(() => {
154574
+ const handleBack = (0, import_react148.useCallback)(() => {
154290
154575
  if (previousAuth) {
154291
154576
  setAuthProvider(previousAuth.provider);
154292
154577
  setAuthHost(previousAuth.host);
@@ -154318,7 +154603,7 @@ function BrowseRepoScreen({ onSelect, isActive: isActive2 = true }) {
154318
154603
  }
154319
154604
 
154320
154605
  // src/hooks/useTeamDashboard.ts
154321
- var import_react147 = __toESM(require_react(), 1);
154606
+ var import_react149 = __toESM(require_react(), 1);
154322
154607
 
154323
154608
  // src/models/team.ts
154324
154609
  var TeamMemberSchema = external_exports.object({
@@ -154358,7 +154643,7 @@ function computeTeamDashboard(members, prs) {
154358
154643
  return { memberStats, totalOpen, totalPending };
154359
154644
  }
154360
154645
  function useTeamDashboard(members, prs) {
154361
- return (0, import_react147.useMemo)(() => computeTeamDashboard(members, prs), [members, prs]);
154646
+ return (0, import_react149.useMemo)(() => computeTeamDashboard(members, prs), [members, prs]);
154362
154647
  }
154363
154648
 
154364
154649
  // src/screens/TeamDashboardScreen.tsx
@@ -154459,25 +154744,25 @@ function TeamDashboardScreen({
154459
154744
  }
154460
154745
 
154461
154746
  // src/hooks/useActivePanel.ts
154462
- var import_react148 = __toESM(require_react(), 1);
154747
+ var import_react150 = __toESM(require_react(), 1);
154463
154748
  function useActivePanel({
154464
154749
  hasSelection,
154465
154750
  isInputActive = false
154466
154751
  }) {
154467
- const [activePanel, setActivePanel] = (0, import_react148.useState)("sidebar");
154468
- (0, import_react148.useEffect)(() => {
154752
+ const [activePanel, setActivePanel] = (0, import_react150.useState)("sidebar");
154753
+ (0, import_react150.useEffect)(() => {
154469
154754
  if (!hasSelection && activePanel === "detail") {
154470
154755
  setActivePanel("list");
154471
154756
  }
154472
154757
  }, [hasSelection, activePanel]);
154473
- const handleEscape = (0, import_react148.useCallback)(() => {
154758
+ const handleEscape = (0, import_react150.useCallback)(() => {
154474
154759
  if (activePanel === "detail") {
154475
154760
  setActivePanel("list");
154476
154761
  } else if (activePanel === "list") {
154477
154762
  setActivePanel("sidebar");
154478
154763
  }
154479
154764
  }, [activePanel]);
154480
- const handleTab = (0, import_react148.useCallback)(() => {
154765
+ const handleTab = (0, import_react150.useCallback)(() => {
154481
154766
  if (activePanel === "sidebar") {
154482
154767
  setActivePanel("list");
154483
154768
  } else if (activePanel === "list" && hasSelection) {
@@ -154500,7 +154785,7 @@ function useActivePanel({
154500
154785
  }
154501
154786
 
154502
154787
  // src/hooks/useSidebarCounts.ts
154503
- var import_react149 = __toESM(require_react(), 1);
154788
+ var import_react151 = __toESM(require_react(), 1);
154504
154789
  var EMPTY_COUNTS = {
154505
154790
  involved: null,
154506
154791
  myPrs: null,
@@ -154536,8 +154821,8 @@ function extractThisRepoCount(queryClient2) {
154536
154821
  }
154537
154822
  function useSidebarCounts(isUnread) {
154538
154823
  const queryClient2 = useQueryClient();
154539
- const countsRef = (0, import_react149.useRef)(EMPTY_COUNTS);
154540
- const computeCounts = (0, import_react149.useCallback)(() => {
154824
+ const countsRef = (0, import_react151.useRef)(EMPTY_COUNTS);
154825
+ const computeCounts = (0, import_react151.useCallback)(() => {
154541
154826
  const involved = extractCount(queryClient2, "involved-prs");
154542
154827
  const myPrs = extractCount(queryClient2, "my-prs");
154543
154828
  const forReview = extractCount(queryClient2, "review-requests");
@@ -154565,7 +154850,7 @@ function useSidebarCounts(isUnread) {
154565
154850
  const team = extractCount(queryClient2, "team-prs");
154566
154851
  return { involved, myPrs, forReview, forReviewUnread, thisRepo, browse, team };
154567
154852
  }, [queryClient2, isUnread]);
154568
- const subscribe3 = (0, import_react149.useCallback)(
154853
+ const subscribe3 = (0, import_react151.useCallback)(
154569
154854
  (onStoreChange) => {
154570
154855
  const unsubscribe = queryClient2.getQueryCache().subscribe(() => {
154571
154856
  const next = computeCounts();
@@ -154579,13 +154864,13 @@ function useSidebarCounts(isUnread) {
154579
154864
  },
154580
154865
  [queryClient2, computeCounts]
154581
154866
  );
154582
- const getSnapshot2 = (0, import_react149.useCallback)(() => {
154867
+ const getSnapshot2 = (0, import_react151.useCallback)(() => {
154583
154868
  return countsRef.current;
154584
154869
  }, []);
154585
- (0, import_react149.useEffect)(() => {
154870
+ (0, import_react151.useEffect)(() => {
154586
154871
  countsRef.current = computeCounts();
154587
154872
  }, [computeCounts]);
154588
- return (0, import_react149.useSyncExternalStore)(subscribe3, getSnapshot2, () => EMPTY_COUNTS);
154873
+ return (0, import_react151.useSyncExternalStore)(subscribe3, getSnapshot2, () => EMPTY_COUNTS);
154589
154874
  }
154590
154875
 
154591
154876
  // src/utils/retryConfig.ts
@@ -154621,7 +154906,7 @@ function AppContent({
154621
154906
  const { stdout } = use_stdout_default();
154622
154907
  const { user, isAuthenticated, loading, saveToken, error: error48 } = useAuth();
154623
154908
  const { config: config3, updateConfig } = useConfig();
154624
- const teamMembers = (0, import_react150.useMemo)(
154909
+ const teamMembers = (0, import_react152.useMemo)(
154625
154910
  () => (config3?.team?.members ?? []).map((m) => ({
154626
154911
  username: m.username,
154627
154912
  ...m.provider ? { provider: m.provider } : {}
@@ -154629,8 +154914,8 @@ function AppContent({
154629
154914
  [config3?.team?.members]
154630
154915
  );
154631
154916
  const queryClient2 = useQueryClient();
154632
- const [sidebarMode, setSidebarMode] = (0, import_react150.useState)("full");
154633
- const [currentScreen, setCurrentScreen] = (0, import_react150.useState)({
154917
+ const [sidebarMode, setSidebarMode] = (0, import_react152.useState)("full");
154918
+ const [currentScreen, setCurrentScreen] = (0, import_react152.useState)({
154634
154919
  type: "list"
154635
154920
  });
154636
154921
  const directPROwner = directPR?.owner ?? repoOwner ?? "";
@@ -154642,8 +154927,8 @@ function AppContent({
154642
154927
  error: directPRError,
154643
154928
  refetch: directPRRefetch
154644
154929
  } = usePullRequest(directPROwner, directPRRepo, directPRNumber);
154645
- const [directPRNavigated, setDirectPRNavigated] = (0, import_react150.useState)(false);
154646
- import_react150.default.useEffect(() => {
154930
+ const [directPRNavigated, setDirectPRNavigated] = (0, import_react152.useState)(false);
154931
+ import_react152.default.useEffect(() => {
154647
154932
  if (directPR && directPRData && !directPRNavigated) {
154648
154933
  setDirectPRNavigated(true);
154649
154934
  setCurrentScreen({
@@ -154654,11 +154939,11 @@ function AppContent({
154654
154939
  });
154655
154940
  }
154656
154941
  }, [directPR, directPRData, directPRNavigated]);
154657
- const [tokenError, setTokenError] = (0, import_react150.useState)(null);
154658
- const [showHelp2, setShowHelp] = (0, import_react150.useState)(false);
154659
- const [showCommandPalette, setShowCommandPalette] = (0, import_react150.useState)(false);
154660
- const [showTokenInput, setShowTokenInput] = (0, import_react150.useState)(false);
154661
- const [showOnboarding, setShowOnboarding] = (0, import_react150.useState)(false);
154942
+ const [tokenError, setTokenError] = (0, import_react152.useState)(null);
154943
+ const [showHelp2, setShowHelp] = (0, import_react152.useState)(false);
154944
+ const [showCommandPalette, setShowCommandPalette] = (0, import_react152.useState)(false);
154945
+ const [showTokenInput, setShowTokenInput] = (0, import_react152.useState)(false);
154946
+ const [showOnboarding, setShowOnboarding] = (0, import_react152.useState)(false);
154662
154947
  const { isTokenExpired } = useTokenExpired();
154663
154948
  const { isInputActive } = useInputFocus();
154664
154949
  const { activePanel, setActivePanel } = useActivePanel({
@@ -154675,28 +154960,28 @@ function AppContent({
154675
154960
  const sidebarIndex = currentEntry ? getItemIndex(currentEntry) ?? 0 : 0;
154676
154961
  const { isUnread } = useReadState();
154677
154962
  const sidebarCounts = useSidebarCounts(isUnread);
154678
- import_react150.default.useEffect(() => {
154963
+ import_react152.default.useEffect(() => {
154679
154964
  if (!loading && !isAuthenticated && !showTokenInput) {
154680
154965
  setShowTokenInput(true);
154681
154966
  } else if (isAuthenticated && showTokenInput && !isTokenExpired) {
154682
154967
  setShowTokenInput(false);
154683
154968
  }
154684
154969
  }, [loading, isAuthenticated, showTokenInput, isTokenExpired]);
154685
- import_react150.default.useEffect(() => {
154970
+ import_react152.default.useEffect(() => {
154686
154971
  if (isTokenExpired && !showTokenInput) {
154687
154972
  setShowTokenInput(true);
154688
154973
  }
154689
154974
  }, [isTokenExpired, showTokenInput]);
154690
- import_react150.default.useEffect(() => {
154975
+ import_react152.default.useEffect(() => {
154691
154976
  if (config3 && !config3.hasOnboarded && !showOnboarding) {
154692
154977
  setShowOnboarding(true);
154693
154978
  }
154694
154979
  }, [config3, showOnboarding]);
154695
- const handleOnboardingComplete = (0, import_react150.useCallback)(() => {
154980
+ const handleOnboardingComplete = (0, import_react152.useCallback)(() => {
154696
154981
  setShowOnboarding(false);
154697
154982
  updateConfig({ hasOnboarded: true });
154698
154983
  }, [updateConfig]);
154699
- const handleTokenSubmit = (0, import_react150.useCallback)(
154984
+ const handleTokenSubmit = (0, import_react152.useCallback)(
154700
154985
  async (token) => {
154701
154986
  try {
154702
154987
  setTokenError(null);
@@ -154744,7 +155029,7 @@ function AppContent({
154744
155029
  },
154745
155030
  { isActive: !showTokenInput && !showOnboarding && !isInputActive }
154746
155031
  );
154747
- const handleSelectPR = (0, import_react150.useCallback)(
155032
+ const handleSelectPR = (0, import_react152.useCallback)(
154748
155033
  (pr, list, index) => {
154749
155034
  setCurrentScreen({
154750
155035
  type: "detail",
@@ -154755,14 +155040,14 @@ function AppContent({
154755
155040
  },
154756
155041
  []
154757
155042
  );
154758
- const handleBackToList = (0, import_react150.useCallback)(() => {
155043
+ const handleBackToList = (0, import_react152.useCallback)(() => {
154759
155044
  if (directPR) {
154760
155045
  exit4();
154761
155046
  } else {
154762
155047
  setCurrentScreen({ type: "list" });
154763
155048
  }
154764
155049
  }, [directPR, exit4]);
154765
- const handleNavigatePR = (0, import_react150.useCallback)(
155050
+ const handleNavigatePR = (0, import_react152.useCallback)(
154766
155051
  (direction) => {
154767
155052
  if (currentScreen.type !== "detail") return;
154768
155053
  const { prList, prIndex } = currentScreen;
@@ -154780,7 +155065,7 @@ function AppContent({
154780
155065
  },
154781
155066
  [currentScreen]
154782
155067
  );
154783
- const handleNavigateToPR = (0, import_react150.useCallback)(
155068
+ const handleNavigateToPR = (0, import_react152.useCallback)(
154784
155069
  (prNumber2) => {
154785
155070
  if (currentScreen.type !== "detail") return;
154786
155071
  const { prList } = currentScreen;
@@ -154869,7 +155154,7 @@ function AppContent({
154869
155154
  const { browseRepo } = useRepoContext();
154870
155155
  const repoPath = repoOwner && repoName ? `${repoOwner}/${repoName}` : void 0;
154871
155156
  const browseRepoPath = browseRepo ? `${browseRepo.owner}/${browseRepo.repo}` : void 0;
154872
- import_react150.default.useEffect(() => {
155157
+ import_react152.default.useEffect(() => {
154873
155158
  if (currentScreen.type !== "detail") {
154874
155159
  if (sidebarIndex === 6) {
154875
155160
  setScreenContext("settings");
@@ -154883,11 +155168,11 @@ function AppContent({
154883
155168
  }
154884
155169
  }, [currentScreen.type, sidebarIndex]);
154885
155170
  const screenContext = useScreenContext();
154886
- const commandPaletteActions = (0, import_react150.useMemo)(
155171
+ const commandPaletteActions = (0, import_react152.useMemo)(
154887
155172
  () => buildCommandPaletteActions(screenContext ?? "pr-list", keybindingOverrides),
154888
155173
  [screenContext, keybindingOverrides]
154889
155174
  );
154890
- const handleCommandPaletteSelect = (0, import_react150.useCallback)(
155175
+ const handleCommandPaletteSelect = (0, import_react152.useCallback)(
154891
155176
  (action) => {
154892
155177
  setShowCommandPalette(false);
154893
155178
  switch (action) {
@@ -155008,7 +155293,7 @@ function AppWithTheme({
155008
155293
  const configProvider = config3?.provider ?? null;
155009
155294
  const gitDetectedProvider = toConfigProvider(detectedProvider);
155010
155295
  const activeProvider = configProvider ?? gitDetectedProvider ?? "github";
155011
- import_react150.default.useEffect(() => {
155296
+ import_react152.default.useEffect(() => {
155012
155297
  setAuthProvider(activeProvider);
155013
155298
  if (detectedBaseUrl && activeProvider === gitDetectedProvider) {
155014
155299
  setAuthBaseUrl(detectedBaseUrl);