gh-manager-cli 1.19.2 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14,21 +14,23 @@ import {
14
14
  logger,
15
15
  makeClient,
16
16
  purgeApolloCacheFiles,
17
+ renameRepositoryById,
17
18
  searchRepositoriesUnified,
18
19
  syncForkWithUpstream,
19
20
  unarchiveRepositoryById,
20
21
  updateCacheAfterArchive,
21
22
  updateCacheAfterDelete,
23
+ updateCacheAfterRename,
22
24
  updateCacheAfterVisibilityChange,
23
25
  updateCacheWithRepository
24
- } from "./chunk-FPJS7YJW.js";
26
+ } from "./chunk-RI2B33OX.js";
25
27
 
26
28
  // package.json
27
29
  var require_package = __commonJS({
28
30
  "package.json"(exports, module) {
29
31
  module.exports = {
30
32
  name: "gh-manager-cli",
31
- version: "1.19.2",
33
+ version: "1.20.0",
32
34
  private: false,
33
35
  description: "Interactive CLI to manage your GitHub repos (personal) with Ink",
34
36
  license: "MIT",
@@ -153,13 +155,13 @@ var require_package = __commonJS({
153
155
 
154
156
  // src/index.tsx
155
157
  var import_package = __toESM(require_package(), 1);
156
- import { render, Box as Box17, Text as Text18 } from "ink";
158
+ import { render, Box as Box18, Text as Text19 } from "ink";
157
159
  import "dotenv/config";
158
160
 
159
161
  // src/ui/App.tsx
160
- import { useEffect as useEffect8, useMemo as useMemo2, useState as useState12 } from "react";
161
- import { Box as Box16, Text as Text17, useApp as useApp2, useStdout as useStdout2, useInput as useInput12 } from "ink";
162
- import TextInput5 from "ink-text-input";
162
+ import { useEffect as useEffect9, useMemo as useMemo2, useState as useState13 } from "react";
163
+ import { Box as Box17, Text as Text18, useApp as useApp2, useStdout as useStdout2, useInput as useInput13 } from "ink";
164
+ import TextInput6 from "ink-text-input";
163
165
 
164
166
  // src/config.ts
165
167
  import fs from "fs";
@@ -404,9 +406,9 @@ async function openGitHubAuthorizationPage() {
404
406
  }
405
407
 
406
408
  // src/ui/RepoList.tsx
407
- import React10, { useEffect as useEffect7, useMemo, useState as useState10, useRef, useCallback } from "react";
408
- import { Box as Box13, Text as Text14, useApp, useInput as useInput10, useStdout } from "ink";
409
- import TextInput4 from "ink-text-input";
409
+ import React11, { useEffect as useEffect8, useMemo, useState as useState11, useRef, useCallback } from "react";
410
+ import { Box as Box14, Text as Text15, useApp, useInput as useInput11, useStdout } from "ink";
411
+ import TextInput5 from "ink-text-input";
410
412
  import chalk11 from "chalk";
411
413
 
412
414
  // src/apolloMeta.ts
@@ -485,7 +487,7 @@ function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
485
487
  try {
486
488
  setLoading(true);
487
489
  setError(null);
488
- const client = await import("./github-7RR5WPCN.js").then((m) => m.makeClient(token));
490
+ const client = await import("./github-ERXQNAVD.js").then((m) => m.makeClient(token));
489
491
  const orgs = await fetchViewerOrganizations(client);
490
492
  setOrganizations(orgs);
491
493
  const entOrgs = /* @__PURE__ */ new Set();
@@ -1099,10 +1101,102 @@ var ChangeVisibilityModal = ({
1099
1101
  );
1100
1102
  };
1101
1103
 
1104
+ // src/ui/components/modals/RenameModal.tsx
1105
+ import { useState as useState10, useEffect as useEffect7 } from "react";
1106
+ import { Box as Box10, Text as Text11, useInput as useInput10 } from "ink";
1107
+ import TextInput3 from "ink-text-input";
1108
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1109
+ function RenameModal({ repo, onRename, onCancel }) {
1110
+ const [newName, setNewName] = useState10("");
1111
+ const [renaming, setRenaming] = useState10(false);
1112
+ const [renameError, setRenameError] = useState10(null);
1113
+ useEffect7(() => {
1114
+ if (repo) {
1115
+ setNewName(repo.name);
1116
+ setRenameError(null);
1117
+ }
1118
+ }, [repo]);
1119
+ useInput10((input, key) => {
1120
+ if (renaming) return;
1121
+ if (key.escape) {
1122
+ onCancel();
1123
+ return;
1124
+ }
1125
+ if (key.return) {
1126
+ if (newName.trim() && newName !== repo?.name) {
1127
+ handleRenameConfirm();
1128
+ }
1129
+ return;
1130
+ }
1131
+ });
1132
+ const handleRenameConfirm = async () => {
1133
+ if (!repo || renaming || !newName.trim() || newName === repo.name) return;
1134
+ try {
1135
+ setRenaming(true);
1136
+ setRenameError(null);
1137
+ await onRename(repo, newName.trim());
1138
+ } catch (e) {
1139
+ setRenameError(e.message || "Failed to rename repository");
1140
+ setRenaming(false);
1141
+ }
1142
+ };
1143
+ const handleNameChange = (value) => {
1144
+ const filtered = value.replace(/[^a-zA-Z0-9\-_.]/g, "");
1145
+ setNewName(filtered);
1146
+ };
1147
+ if (!repo) return null;
1148
+ const owner = repo.nameWithOwner.split("/")[0];
1149
+ const isDisabled = !newName.trim() || newName === repo.name;
1150
+ return /* @__PURE__ */ jsxs10(
1151
+ Box10,
1152
+ {
1153
+ flexDirection: "column",
1154
+ borderStyle: "round",
1155
+ borderColor: "cyan",
1156
+ paddingX: 3,
1157
+ paddingY: 2,
1158
+ width: 80,
1159
+ children: [
1160
+ /* @__PURE__ */ jsx11(Text11, { bold: true, color: "cyan", children: "Rename Repository" }),
1161
+ /* @__PURE__ */ jsx11(Box10, { height: 1, children: /* @__PURE__ */ jsx11(Text11, { children: " " }) }),
1162
+ /* @__PURE__ */ jsxs10(Text11, { color: "gray", children: [
1163
+ "Current: ",
1164
+ repo.nameWithOwner
1165
+ ] }),
1166
+ /* @__PURE__ */ jsx11(Box10, { height: 1, children: /* @__PURE__ */ jsx11(Text11, { children: " " }) }),
1167
+ /* @__PURE__ */ jsx11(Text11, { children: "New name:" }),
1168
+ /* @__PURE__ */ jsxs10(Box10, { flexDirection: "row", alignItems: "center", children: [
1169
+ /* @__PURE__ */ jsxs10(Text11, { children: [
1170
+ owner,
1171
+ "/"
1172
+ ] }),
1173
+ /* @__PURE__ */ jsx11(
1174
+ TextInput3,
1175
+ {
1176
+ value: newName,
1177
+ onChange: handleNameChange,
1178
+ placeholder: repo.name,
1179
+ focus: !renaming
1180
+ }
1181
+ )
1182
+ ] }),
1183
+ renaming ? /* @__PURE__ */ jsx11(Box10, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs10(Box10, { flexDirection: "row", children: [
1184
+ /* @__PURE__ */ jsx11(Box10, { marginRight: 1, children: /* @__PURE__ */ jsx11(SlowSpinner, {}) }),
1185
+ /* @__PURE__ */ jsx11(Text11, { color: "cyan", children: "Renaming repository..." })
1186
+ ] }) }) : /* @__PURE__ */ jsxs10(Fragment5, { children: [
1187
+ /* @__PURE__ */ jsx11(Box10, { marginTop: 2, children: /* @__PURE__ */ jsx11(Text11, { color: "gray", children: isDisabled ? "Enter a different name to rename" : `Press Enter to rename to "${newName}"` }) }),
1188
+ /* @__PURE__ */ jsx11(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text11, { color: "gray", children: "Press Esc to cancel" }) })
1189
+ ] }),
1190
+ renameError && /* @__PURE__ */ jsx11(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx11(Text11, { color: "red", children: renameError }) })
1191
+ ]
1192
+ }
1193
+ );
1194
+ }
1195
+
1102
1196
  // src/ui/components/repo/RepoRow.tsx
1103
- import { Box as Box10, Text as Text11 } from "ink";
1197
+ import { Box as Box11, Text as Text12 } from "ink";
1104
1198
  import chalk10 from "chalk";
1105
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1199
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1106
1200
  function RepoRow({
1107
1201
  repo,
1108
1202
  selected,
@@ -1147,21 +1241,21 @@ function RepoRow({
1147
1241
  if (line3) fullText += "\n" + metaColor(line3);
1148
1242
  const spacingAbove = Math.floor(spacingLines / 2);
1149
1243
  const spacingBelow = spacingLines - spacingAbove;
1150
- return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", backgroundColor: selected ? "gray" : void 0, children: [
1151
- spacingAbove > 0 && /* @__PURE__ */ jsx11(Box10, { height: spacingAbove, children: /* @__PURE__ */ jsx11(Text11, { children: " " }) }),
1152
- /* @__PURE__ */ jsx11(Text11, { children: dim ? chalk10.dim(fullText) : fullText }),
1153
- spacingBelow > 0 && /* @__PURE__ */ jsx11(Box10, { height: spacingBelow, children: /* @__PURE__ */ jsx11(Text11, { children: " " }) })
1244
+ return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", backgroundColor: selected ? "gray" : void 0, children: [
1245
+ spacingAbove > 0 && /* @__PURE__ */ jsx12(Box11, { height: spacingAbove, children: /* @__PURE__ */ jsx12(Text12, { children: " " }) }),
1246
+ /* @__PURE__ */ jsx12(Text12, { children: dim ? chalk10.dim(fullText) : fullText }),
1247
+ spacingBelow > 0 && /* @__PURE__ */ jsx12(Box11, { height: spacingBelow, children: /* @__PURE__ */ jsx12(Text12, { children: " " }) })
1154
1248
  ] });
1155
1249
  }
1156
1250
 
1157
1251
  // src/ui/components/repo/FilterInput.tsx
1158
- import { Box as Box11, Text as Text12 } from "ink";
1159
- import TextInput3 from "ink-text-input";
1160
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1252
+ import { Box as Box12, Text as Text13 } from "ink";
1253
+ import TextInput4 from "ink-text-input";
1254
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1161
1255
 
1162
1256
  // src/ui/components/repo/RepoListHeader.tsx
1163
- import { Box as Box12, Text as Text13 } from "ink";
1164
- import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1257
+ import { Box as Box13, Text as Text14 } from "ink";
1258
+ import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1165
1259
  function RepoListHeader({
1166
1260
  ownerContext,
1167
1261
  sortKey,
@@ -1175,35 +1269,35 @@ function RepoListHeader({
1175
1269
  }) {
1176
1270
  const contextLabel = ownerContext === "personal" ? "Personal Account" : ownerContext?.type === "organization" ? `Organization: ${ownerContext.name ?? ownerContext.login}` : "";
1177
1271
  const visibilityLabel = visibilityFilter === "public" ? "Public" : visibilityFilter === "private" ? isEnterprise ? "Private/Internal" : "Private" : visibilityFilter === "internal" ? "Internal" : "";
1178
- return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
1179
- contextLabel && /* @__PURE__ */ jsx13(Text13, { children: contextLabel }),
1180
- /* @__PURE__ */ jsxs12(Text13, { color: "gray", dimColor: true, children: [
1272
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
1273
+ contextLabel && /* @__PURE__ */ jsx14(Text14, { children: contextLabel }),
1274
+ /* @__PURE__ */ jsxs13(Text14, { color: "gray", dimColor: true, children: [
1181
1275
  "Sort: ",
1182
1276
  sortKey,
1183
1277
  " ",
1184
1278
  sortDir === "asc" ? "\u2191" : "\u2193"
1185
1279
  ] }),
1186
- /* @__PURE__ */ jsxs12(Text13, { color: "gray", dimColor: true, children: [
1280
+ /* @__PURE__ */ jsxs13(Text14, { color: "gray", dimColor: true, children: [
1187
1281
  "Fork Status - Commits Behind: ",
1188
1282
  forkTracking ? "ON" : "OFF"
1189
1283
  ] }),
1190
- !!visibilityLabel && /* @__PURE__ */ jsxs12(Text13, { color: "yellow", children: [
1284
+ !!visibilityLabel && /* @__PURE__ */ jsxs13(Text14, { color: "yellow", children: [
1191
1285
  "Visibility: ",
1192
1286
  visibilityLabel
1193
1287
  ] }),
1194
- filter && !searchActive && /* @__PURE__ */ jsxs12(Text13, { color: "cyan", children: [
1288
+ filter && !searchActive && /* @__PURE__ */ jsxs13(Text14, { color: "cyan", children: [
1195
1289
  'Filter: "',
1196
1290
  filter,
1197
1291
  '"'
1198
1292
  ] }),
1199
- searchActive && /* @__PURE__ */ jsxs12(Fragment5, { children: [
1200
- /* @__PURE__ */ jsxs12(Text13, { color: "cyan", children: [
1293
+ searchActive && /* @__PURE__ */ jsxs13(Fragment6, { children: [
1294
+ /* @__PURE__ */ jsxs13(Text14, { color: "cyan", children: [
1201
1295
  'Search: "',
1202
1296
  filter.trim(),
1203
1297
  '"'
1204
1298
  ] }),
1205
- searchLoading && /* @__PURE__ */ jsx13(Box12, { marginLeft: 1, children: /* @__PURE__ */ jsxs12(Text13, { color: "cyan", children: [
1206
- /* @__PURE__ */ jsx13(SlowSpinner, {}),
1299
+ searchLoading && /* @__PURE__ */ jsx14(Box13, { marginLeft: 1, children: /* @__PURE__ */ jsxs13(Text14, { color: "cyan", children: [
1300
+ /* @__PURE__ */ jsx14(SlowSpinner, {}),
1207
1301
  " Searching\u2026"
1208
1302
  ] }) })
1209
1303
  ] })
@@ -1211,7 +1305,7 @@ function RepoListHeader({
1211
1305
  }
1212
1306
 
1213
1307
  // src/ui/RepoList.tsx
1214
- import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1308
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1215
1309
  var getPageSize = () => {
1216
1310
  const envValue = process.env.REPOS_PER_FETCH;
1217
1311
  if (envValue) {
@@ -1227,17 +1321,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1227
1321
  const { exit } = useApp();
1228
1322
  const { stdout } = useStdout();
1229
1323
  const client = useMemo(() => makeClient(token), [token]);
1230
- const [debugMessages, setDebugMessages] = useState10([]);
1324
+ const [debugMessages, setDebugMessages] = useState11([]);
1231
1325
  const addDebugMessage = useCallback((msg) => {
1232
1326
  if (process.env.GH_MANAGER_DEBUG === "1") {
1233
1327
  setDebugMessages((prev) => [...prev.slice(-9), msg]);
1234
1328
  }
1235
1329
  }, []);
1236
1330
  const handleOrgContextChangeRef = useRef(onOrgContextChange);
1237
- useEffect7(() => {
1331
+ useEffect8(() => {
1238
1332
  handleOrgContextChangeRef.current = onOrgContextChange;
1239
1333
  }, [onOrgContextChange]);
1240
- React10.useEffect(() => {
1334
+ React11.useEffect(() => {
1241
1335
  addDebugMessage(`[RepoList] Component mounted`);
1242
1336
  logger.info("RepoList component mounted", {
1243
1337
  token: token ? "present" : "missing",
@@ -1249,62 +1343,64 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1249
1343
  }, []);
1250
1344
  const terminalWidth = stdout?.columns ?? 80;
1251
1345
  const availableHeight = maxVisibleRows ?? 20;
1252
- const [items, setItems] = useState10([]);
1253
- const [cursor, setCursor] = useState10(0);
1254
- const [endCursor, setEndCursor] = useState10(null);
1255
- const [hasNextPage, setHasNextPage] = useState10(false);
1256
- const [totalCount, setTotalCount] = useState10(0);
1257
- const [loading, setLoading] = useState10(true);
1258
- const [sortingLoading, setSortingLoading] = useState10(false);
1259
- const [refreshing, setRefreshing] = useState10(false);
1260
- const [loadingMore, setLoadingMore] = useState10(false);
1261
- const [error, setError] = useState10(null);
1262
- const [rateLimit, setRateLimit] = useState10(void 0);
1263
- const [prevRateLimit, setPrevRateLimit] = useState10(void 0);
1264
- const [density, setDensity] = useState10(2);
1265
- const [prefsLoaded, setPrefsLoaded] = useState10(false);
1266
- const [ownerContext, setOwnerContext] = useState10("personal");
1267
- const [ownerAffiliations, setOwnerAffiliations] = useState10(["OWNER"]);
1268
- const [orgSwitcherOpen, setOrgSwitcherOpen] = useState10(false);
1269
- const [searchItems, setSearchItems] = useState10([]);
1270
- const [searchEndCursor, setSearchEndCursor] = useState10(null);
1271
- const [searchHasNextPage, setSearchHasNextPage] = useState10(false);
1272
- const [searchTotalCount, setSearchTotalCount] = useState10(0);
1273
- const [searchLoading, setSearchLoading] = useState10(false);
1274
- const [deleteMode, setDeleteMode] = useState10(false);
1275
- const [deleteTarget, setDeleteTarget] = useState10(null);
1276
- const [deleteCode, setDeleteCode] = useState10("");
1277
- const [typedCode, setTypedCode] = useState10("");
1278
- const [deleting, setDeleting] = useState10(false);
1279
- const [deleteError, setDeleteError] = useState10(null);
1280
- const [deleteConfirmStage, setDeleteConfirmStage] = useState10(false);
1281
- const [confirmFocus, setConfirmFocus] = useState10("delete");
1282
- const [archiveMode, setArchiveMode] = useState10(false);
1283
- const [archiveTarget, setArchiveTarget] = useState10(null);
1284
- const [archiving, setArchiving] = useState10(false);
1285
- const [archiveError, setArchiveError] = useState10(null);
1286
- const [archiveFocus, setArchiveFocus] = useState10("confirm");
1287
- const [syncMode, setSyncMode] = useState10(false);
1288
- const [syncTarget, setSyncTarget] = useState10(null);
1289
- const [syncing, setSyncing] = useState10(false);
1290
- const [syncError, setSyncError] = useState10(null);
1291
- const [syncFocus, setSyncFocus] = useState10("confirm");
1292
- const [syncTrigger, setSyncTrigger] = useState10(false);
1293
- const [infoMode, setInfoMode] = useState10(false);
1294
- const [infoRepo, setInfoRepo] = useState10(null);
1295
- const [logoutMode, setLogoutMode] = useState10(false);
1296
- const [logoutFocus, setLogoutFocus] = useState10("confirm");
1297
- const [logoutError, setLogoutError] = useState10(null);
1298
- const [visibilityMode, setVisibilityMode] = useState10(false);
1299
- const [isEnterpriseOrg, setIsEnterpriseOrg] = useState10(false);
1300
- const [hasInternalRepos, setHasInternalRepos] = useState10(false);
1301
- const [changeVisibilityMode, setChangeVisibilityMode] = useState10(false);
1302
- const [changeVisibilityTarget, setChangeVisibilityTarget] = useState10(null);
1303
- const [changingVisibility, setChangingVisibility] = useState10(false);
1304
- const [changeVisibilityError, setChangeVisibilityError] = useState10(null);
1305
- const [sortMode, setSortMode] = useState10(false);
1346
+ const [items, setItems] = useState11([]);
1347
+ const [cursor, setCursor] = useState11(0);
1348
+ const [endCursor, setEndCursor] = useState11(null);
1349
+ const [hasNextPage, setHasNextPage] = useState11(false);
1350
+ const [totalCount, setTotalCount] = useState11(0);
1351
+ const [loading, setLoading] = useState11(true);
1352
+ const [sortingLoading, setSortingLoading] = useState11(false);
1353
+ const [refreshing, setRefreshing] = useState11(false);
1354
+ const [loadingMore, setLoadingMore] = useState11(false);
1355
+ const [error, setError] = useState11(null);
1356
+ const [rateLimit, setRateLimit] = useState11(void 0);
1357
+ const [prevRateLimit, setPrevRateLimit] = useState11(void 0);
1358
+ const [density, setDensity] = useState11(2);
1359
+ const [prefsLoaded, setPrefsLoaded] = useState11(false);
1360
+ const [ownerContext, setOwnerContext] = useState11("personal");
1361
+ const [ownerAffiliations, setOwnerAffiliations] = useState11(["OWNER"]);
1362
+ const [orgSwitcherOpen, setOrgSwitcherOpen] = useState11(false);
1363
+ const [searchItems, setSearchItems] = useState11([]);
1364
+ const [searchEndCursor, setSearchEndCursor] = useState11(null);
1365
+ const [searchHasNextPage, setSearchHasNextPage] = useState11(false);
1366
+ const [searchTotalCount, setSearchTotalCount] = useState11(0);
1367
+ const [searchLoading, setSearchLoading] = useState11(false);
1368
+ const [deleteMode, setDeleteMode] = useState11(false);
1369
+ const [deleteTarget, setDeleteTarget] = useState11(null);
1370
+ const [deleteCode, setDeleteCode] = useState11("");
1371
+ const [typedCode, setTypedCode] = useState11("");
1372
+ const [deleting, setDeleting] = useState11(false);
1373
+ const [deleteError, setDeleteError] = useState11(null);
1374
+ const [deleteConfirmStage, setDeleteConfirmStage] = useState11(false);
1375
+ const [confirmFocus, setConfirmFocus] = useState11("delete");
1376
+ const [archiveMode, setArchiveMode] = useState11(false);
1377
+ const [archiveTarget, setArchiveTarget] = useState11(null);
1378
+ const [archiving, setArchiving] = useState11(false);
1379
+ const [archiveError, setArchiveError] = useState11(null);
1380
+ const [archiveFocus, setArchiveFocus] = useState11("confirm");
1381
+ const [renameMode, setRenameMode] = useState11(false);
1382
+ const [renameTarget, setRenameTarget] = useState11(null);
1383
+ const [syncMode, setSyncMode] = useState11(false);
1384
+ const [syncTarget, setSyncTarget] = useState11(null);
1385
+ const [syncing, setSyncing] = useState11(false);
1386
+ const [syncError, setSyncError] = useState11(null);
1387
+ const [syncFocus, setSyncFocus] = useState11("confirm");
1388
+ const [syncTrigger, setSyncTrigger] = useState11(false);
1389
+ const [infoMode, setInfoMode] = useState11(false);
1390
+ const [infoRepo, setInfoRepo] = useState11(null);
1391
+ const [logoutMode, setLogoutMode] = useState11(false);
1392
+ const [logoutFocus, setLogoutFocus] = useState11("confirm");
1393
+ const [logoutError, setLogoutError] = useState11(null);
1394
+ const [visibilityMode, setVisibilityMode] = useState11(false);
1395
+ const [isEnterpriseOrg, setIsEnterpriseOrg] = useState11(false);
1396
+ const [hasInternalRepos, setHasInternalRepos] = useState11(false);
1397
+ const [changeVisibilityMode, setChangeVisibilityMode] = useState11(false);
1398
+ const [changeVisibilityTarget, setChangeVisibilityTarget] = useState11(null);
1399
+ const [changingVisibility, setChangingVisibility] = useState11(false);
1400
+ const [changeVisibilityError, setChangeVisibilityError] = useState11(null);
1401
+ const [sortMode, setSortMode] = useState11(false);
1306
1402
  const appliedInitialOrg = useRef(false);
1307
- useEffect7(() => {
1403
+ useEffect8(() => {
1308
1404
  (async () => {
1309
1405
  if (appliedInitialOrg.current) return;
1310
1406
  if (!initialOrgSlug2) return;
@@ -1339,6 +1435,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1339
1435
  setArchiveError(null);
1340
1436
  setArchiveFocus("confirm");
1341
1437
  }
1438
+ function closeRenameModal() {
1439
+ setRenameMode(false);
1440
+ setRenameTarget(null);
1441
+ }
1342
1442
  function closeChangeVisibilityModal() {
1343
1443
  setChangeVisibilityMode(false);
1344
1444
  setChangeVisibilityTarget(null);
@@ -1413,6 +1513,22 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1413
1513
  setArchiveError("Failed to update archive state. Check permissions.");
1414
1514
  }
1415
1515
  }
1516
+ async function executeRename(repo, newName) {
1517
+ if (!repo || !newName.trim()) return;
1518
+ try {
1519
+ const id = repo.id;
1520
+ const owner = repo.nameWithOwner.split("/")[0];
1521
+ const newNameWithOwner = `${owner}/${newName}`;
1522
+ await renameRepositoryById(client, id, newName);
1523
+ await updateCacheAfterRename(token, id, newName, newNameWithOwner);
1524
+ const updateRepo = (r) => r.id === id ? { ...r, name: newName, nameWithOwner: newNameWithOwner } : r;
1525
+ setItems((prev) => prev.map(updateRepo));
1526
+ setSearchItems((prev) => prev.map(updateRepo));
1527
+ closeRenameModal();
1528
+ } catch (error2) {
1529
+ throw error2;
1530
+ }
1531
+ }
1416
1532
  async function handleVisibilityChange(newVisibility) {
1417
1533
  if (!changeVisibilityTarget || changingVisibility) return;
1418
1534
  try {
@@ -1506,12 +1622,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1506
1622
  setDeleteError("Failed to delete repository. Ensure delete_repo scope and admin permissions.");
1507
1623
  }
1508
1624
  }
1509
- const [filter, setFilter] = useState10("");
1510
- const [filterMode, setFilterMode] = useState10(false);
1511
- const [sortKey, setSortKey] = useState10("updated");
1512
- const [sortDir, setSortDir] = useState10("desc");
1513
- const [forkTracking, setForkTracking] = useState10(true);
1514
- const [visibilityFilter, setVisibilityFilter] = useState10("all");
1625
+ const [filter, setFilter] = useState11("");
1626
+ const [filterMode, setFilterMode] = useState11(false);
1627
+ const [sortKey, setSortKey] = useState11("updated");
1628
+ const [sortDir, setSortDir] = useState11("desc");
1629
+ const [forkTracking, setForkTracking] = useState11(true);
1630
+ const [visibilityFilter, setVisibilityFilter] = useState11("all");
1515
1631
  const previousVisibilityFilter = useRef("all");
1516
1632
  const sortFieldMap = {
1517
1633
  "updated": "UPDATED_AT",
@@ -1664,7 +1780,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1664
1780
  setSearchLoading(false);
1665
1781
  }
1666
1782
  };
1667
- useEffect7(() => {
1783
+ useEffect8(() => {
1668
1784
  const ui = getUIPrefs();
1669
1785
  if (ui.density !== void 0) setDensity(ui.density);
1670
1786
  if (ui.sortKey && ["updated", "pushed", "name", "stars"].includes(ui.sortKey)) {
@@ -1695,7 +1811,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1695
1811
  }
1696
1812
  setPrefsLoaded(true);
1697
1813
  }, [onOrgContextChange]);
1698
- useEffect7(() => {
1814
+ useEffect8(() => {
1699
1815
  if (!prefsLoaded) return;
1700
1816
  let policy = "cache-first";
1701
1817
  const orgLogin = ownerContext !== "personal" ? ownerContext.login : void 0;
@@ -1715,7 +1831,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1715
1831
  setCursor(0);
1716
1832
  fetchPage(null, true, false, void 0, policy);
1717
1833
  }, [client, prefsLoaded, ownerContext, ownerAffiliations]);
1718
- useEffect7(() => {
1834
+ useEffect8(() => {
1719
1835
  if (!searchActive) {
1720
1836
  if (items.length > 0) {
1721
1837
  let policy = "cache-first";
@@ -1754,7 +1870,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1754
1870
  }
1755
1871
  }
1756
1872
  }, [sortKey, sortDir]);
1757
- useEffect7(() => {
1873
+ useEffect8(() => {
1758
1874
  if (visibilityFilter !== "all" || previousVisibilityFilter.current && previousVisibilityFilter.current !== visibilityFilter) {
1759
1875
  if (!searchActive) {
1760
1876
  if (items.length > 0) {
@@ -1771,7 +1887,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1771
1887
  }
1772
1888
  previousVisibilityFilter.current = visibilityFilter;
1773
1889
  }, [visibilityFilter]);
1774
- useEffect7(() => {
1890
+ useEffect8(() => {
1775
1891
  if (viewerLogin && searchActive && !searchLoading && searchItems.length === 0) {
1776
1892
  let policy = "cache-first";
1777
1893
  try {
@@ -1792,7 +1908,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1792
1908
  fetchSearchPage(null, true, policy);
1793
1909
  }
1794
1910
  }, [viewerLogin]);
1795
- useInput10((input, key) => {
1911
+ useInput11((input, key) => {
1796
1912
  if (error) {
1797
1913
  if (input && input.toUpperCase() === "Q") {
1798
1914
  try {
@@ -1804,7 +1920,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1804
1920
  exit();
1805
1921
  return;
1806
1922
  }
1807
- if (input && input.toUpperCase() === "R") {
1923
+ if (input && input.toUpperCase() === "R" && !key.ctrl) {
1808
1924
  setCursor(0);
1809
1925
  setRefreshing(true);
1810
1926
  setSortingLoading(true);
@@ -1854,6 +1970,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1854
1970
  }
1855
1971
  return;
1856
1972
  }
1973
+ if (renameMode) {
1974
+ return;
1975
+ }
1857
1976
  if (archiveMode) {
1858
1977
  if (key.escape || input && input.toUpperCase() === "C") {
1859
1978
  closeArchiveModal();
@@ -2017,7 +2136,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2017
2136
  setCursor(visibleItems.length - 1);
2018
2137
  return;
2019
2138
  }
2020
- if (input && input.toUpperCase() === "R") {
2139
+ if (input && input.toUpperCase() === "R" && !key.ctrl) {
2021
2140
  setCursor(0);
2022
2141
  setRefreshing(true);
2023
2142
  setSortingLoading(true);
@@ -2045,6 +2164,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2045
2164
  }
2046
2165
  return;
2047
2166
  }
2167
+ if (key.ctrl && (input === "r" || input === "R")) {
2168
+ const repo = visibleItems[cursor];
2169
+ if (repo) {
2170
+ setRenameTarget(repo);
2171
+ setRenameMode(true);
2172
+ }
2173
+ return;
2174
+ }
2048
2175
  if (key.ctrl && (input === "v" || input === "V")) {
2049
2176
  const repo = visibleItems[cursor];
2050
2177
  if (repo) {
@@ -2196,12 +2323,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2196
2323
  return result;
2197
2324
  }, [searchItems, visibilityFilter]);
2198
2325
  const visibleItems = searchActive ? filteredSearchItems : filteredAndSorted;
2199
- useEffect7(() => {
2326
+ useEffect8(() => {
2200
2327
  if (searchActive) {
2201
2328
  addDebugMessage(`[State] searchActive=${searchActive}, searchItems=${searchItems.length}, visibleItems=${visibleItems.length}, filter="${filter}"`);
2202
2329
  }
2203
2330
  }, [searchActive, searchItems.length, visibleItems.length, filter]);
2204
- useEffect7(() => {
2331
+ useEffect8(() => {
2205
2332
  setCursor((c) => Math.min(c, Math.max(0, (searchActive ? searchItems.length : items.length) - 1)));
2206
2333
  }, [searchActive, searchItems.length, items.length]);
2207
2334
  const headerHeight = 2;
@@ -2222,7 +2349,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2222
2349
  const end = Math.min(total, start + visibleRepos + buffer);
2223
2350
  return { start, end };
2224
2351
  }, [visibleItems.length, cursor, listHeight, spacingLines]);
2225
- useEffect7(() => {
2352
+ useEffect8(() => {
2226
2353
  const prefetchThreshold = Math.floor(visibleItems.length * 0.8);
2227
2354
  const nearEnd = visibleItems.length > 0 && cursor >= prefetchThreshold;
2228
2355
  if (searchActive) {
@@ -2243,70 +2370,70 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2243
2370
  exec(cmd);
2244
2371
  }
2245
2372
  const lowRate = rateLimit && rateLimit.remaining <= Math.ceil(rateLimit.limit * 0.1);
2246
- const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode;
2247
- const headerBar = useMemo(() => /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
2248
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 1, children: [
2249
- /* @__PURE__ */ jsxs13(Text14, { color: "cyan", bold: !modalOpen, dimColor: modalOpen, children: [
2373
+ const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || renameMode;
2374
+ const headerBar = useMemo(() => /* @__PURE__ */ jsxs14(Box14, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
2375
+ /* @__PURE__ */ jsxs14(Box14, { flexDirection: "row", gap: 1, children: [
2376
+ /* @__PURE__ */ jsxs14(Text15, { color: "cyan", bold: !modalOpen, dimColor: modalOpen, children: [
2250
2377
  " ",
2251
2378
  ownerContext === "personal" ? "Personal" : ownerContext.name || ownerContext.login,
2252
2379
  ownerContext !== "personal" && isEnterpriseOrg && " (ENT)"
2253
2380
  ] }),
2254
- /* @__PURE__ */ jsx14(Text14, { bold: true, color: modalOpen ? "gray" : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
2255
- /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2381
+ /* @__PURE__ */ jsx15(Text15, { bold: true, color: modalOpen ? "gray" : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
2382
+ /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2256
2383
  "(",
2257
2384
  visibleItems.length,
2258
2385
  "/",
2259
2386
  searchActive ? searchTotalCount : totalCount,
2260
2387
  ")"
2261
2388
  ] }),
2262
- (loading || searchLoading) && /* @__PURE__ */ jsx14(Box13, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "yellow", children: /* @__PURE__ */ jsx14(SlowSpinner, {}) }) })
2389
+ (loading || searchLoading) && /* @__PURE__ */ jsx15(Box14, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "yellow", children: /* @__PURE__ */ jsx15(SlowSpinner, {}) }) })
2263
2390
  ] }),
2264
- rateLimit && /* @__PURE__ */ jsxs13(Text14, { color: lowRate ? "yellow" : "gray", children: [
2391
+ rateLimit && /* @__PURE__ */ jsxs14(Text15, { color: lowRate ? "yellow" : "gray", children: [
2265
2392
  "API: ",
2266
2393
  rateLimit.remaining,
2267
2394
  "/",
2268
2395
  rateLimit.limit,
2269
- prevRateLimit !== void 0 && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx14(Text14, { color: rateLimit.remaining < prevRateLimit ? "red" : "green", children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
2396
+ prevRateLimit !== void 0 && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx15(Text15, { color: rateLimit.remaining < prevRateLimit ? "red" : "green", children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
2270
2397
  " "
2271
2398
  ] })
2272
2399
  ] }), [visibleItems.length, searchActive, searchTotalCount, totalCount, loading, searchLoading, rateLimit, lowRate, modalOpen, prevRateLimit, ownerContext, isEnterpriseOrg]);
2273
2400
  if (error) {
2274
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: availableHeight, children: [
2275
- /* @__PURE__ */ jsx14(Box13, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 1, children: [
2276
- /* @__PURE__ */ jsx14(Text14, { bold: true, children: " Repositories" }),
2277
- /* @__PURE__ */ jsx14(Text14, { color: "red", children: "(Error)" })
2401
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", height: availableHeight, children: [
2402
+ /* @__PURE__ */ jsx15(Box14, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "row", gap: 1, children: [
2403
+ /* @__PURE__ */ jsx15(Text15, { bold: true, children: " Repositories" }),
2404
+ /* @__PURE__ */ jsx15(Text15, { color: "red", children: "(Error)" })
2278
2405
  ] }) }),
2279
- /* @__PURE__ */ jsx14(Box13, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx14(Box13, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", alignItems: "center", children: [
2280
- /* @__PURE__ */ jsx14(Text14, { color: "red", children: error }),
2281
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
2406
+ /* @__PURE__ */ jsx15(Box14, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx15(Box14, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", alignItems: "center", children: [
2407
+ /* @__PURE__ */ jsx15(Text15, { color: "red", children: error }),
2408
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: true, children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
2282
2409
  ] }) }) }),
2283
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
2410
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "gray", children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
2284
2411
  ] });
2285
2412
  }
2286
2413
  if (loading && items.length === 0 || sortingLoading) {
2287
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: availableHeight, children: [
2288
- /* @__PURE__ */ jsx14(Box13, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 1, children: [
2289
- /* @__PURE__ */ jsx14(Text14, { bold: true, children: " Repositories" }),
2290
- /* @__PURE__ */ jsx14(Text14, { color: "gray", children: "(Loading...)" })
2414
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", height: availableHeight, children: [
2415
+ /* @__PURE__ */ jsx15(Box14, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "row", gap: 1, children: [
2416
+ /* @__PURE__ */ jsx15(Text15, { bold: true, children: " Repositories" }),
2417
+ /* @__PURE__ */ jsx15(Text15, { color: "gray", children: "(Loading...)" })
2291
2418
  ] }) }),
2292
- /* @__PURE__ */ jsx14(Box13, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx14(Box13, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx14(Box13, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", alignItems: "center", children: [
2293
- /* @__PURE__ */ jsxs13(Box13, { height: 1, flexDirection: "row", children: [
2294
- /* @__PURE__ */ jsx14(Box13, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: /* @__PURE__ */ jsx14(SlowSpinner, {}) }) }),
2295
- /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
2419
+ /* @__PURE__ */ jsx15(Box14, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx15(Box14, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx15(Box14, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", alignItems: "center", children: [
2420
+ /* @__PURE__ */ jsxs14(Box14, { height: 1, flexDirection: "row", children: [
2421
+ /* @__PURE__ */ jsx15(Box14, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx15(Text15, { color: "cyan", children: /* @__PURE__ */ jsx15(SlowSpinner, {}) }) }),
2422
+ /* @__PURE__ */ jsx15(Text15, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
2296
2423
  ] }),
2297
- /* @__PURE__ */ jsx14(Box13, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
2424
+ /* @__PURE__ */ jsx15(Box14, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
2298
2425
  ] }) }) }) }),
2299
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", children: "Please wait..." }) })
2426
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "gray", children: "Please wait..." }) })
2300
2427
  ] });
2301
2428
  }
2302
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: availableHeight, children: [
2429
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", height: availableHeight, children: [
2303
2430
  headerBar,
2304
- /* @__PURE__ */ jsx14(Box13, { borderStyle: "single", borderColor: modalOpen ? "gray" : "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
2431
+ /* @__PURE__ */ jsx15(Box14, { borderStyle: "single", borderColor: modalOpen ? "gray" : "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
2305
2432
  // Centered modal; hide list content while modal is open
2306
- /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2307
- /* @__PURE__ */ jsx14(Text14, { bold: true, children: "Delete Confirmation" }),
2308
- /* @__PURE__ */ jsx14(Text14, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
2309
- /* @__PURE__ */ jsx14(Box13, { height: 2, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
2433
+ /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2434
+ /* @__PURE__ */ jsx15(Text15, { bold: true, children: "Delete Confirmation" }),
2435
+ /* @__PURE__ */ jsx15(Text15, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
2436
+ /* @__PURE__ */ jsx15(Box14, { height: 2, children: /* @__PURE__ */ jsx15(Text15, { children: " " }) }),
2310
2437
  (() => {
2311
2438
  const langName = deleteTarget.primaryLanguage?.name || "";
2312
2439
  const langColor = deleteTarget.primaryLanguage?.color || "#666666";
@@ -2318,20 +2445,20 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2318
2445
  let line2 = "";
2319
2446
  if (langName) line2 += chalk11.hex(langColor)("\u25CF ") + chalk11.gray(`${langName} `);
2320
2447
  line2 += chalk11.gray(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
2321
- return /* @__PURE__ */ jsxs13(Fragment6, { children: [
2322
- /* @__PURE__ */ jsx14(Text14, { children: line1 }),
2323
- /* @__PURE__ */ jsx14(Text14, { children: line2 })
2448
+ return /* @__PURE__ */ jsxs14(Fragment7, { children: [
2449
+ /* @__PURE__ */ jsx15(Text15, { children: line1 }),
2450
+ /* @__PURE__ */ jsx15(Text15, { children: line2 })
2324
2451
  ] });
2325
2452
  })(),
2326
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsxs13(Text14, { children: [
2453
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsxs14(Text15, { children: [
2327
2454
  "Type ",
2328
- /* @__PURE__ */ jsx14(Text14, { color: "yellow", bold: true, children: deleteCode }),
2455
+ /* @__PURE__ */ jsx15(Text15, { color: "yellow", bold: true, children: deleteCode }),
2329
2456
  " to confirm."
2330
2457
  ] }) }),
2331
- !deleteConfirmStage && /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, children: [
2332
- /* @__PURE__ */ jsx14(Text14, { children: "Confirm code: " }),
2333
- /* @__PURE__ */ jsx14(
2334
- TextInput4,
2458
+ !deleteConfirmStage && /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, children: [
2459
+ /* @__PURE__ */ jsx15(Text15, { children: "Confirm code: " }),
2460
+ /* @__PURE__ */ jsx15(
2461
+ TextInput5,
2335
2462
  {
2336
2463
  value: typedCode,
2337
2464
  onChange: (v) => {
@@ -2357,11 +2484,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2357
2484
  }
2358
2485
  )
2359
2486
  ] }),
2360
- deleteConfirmStage && /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, flexDirection: "column", children: [
2361
- /* @__PURE__ */ jsx14(Text14, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
2362
- /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2363
- /* @__PURE__ */ jsx14(
2364
- Box13,
2487
+ deleteConfirmStage && /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, flexDirection: "column", children: [
2488
+ /* @__PURE__ */ jsx15(Text15, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
2489
+ /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2490
+ /* @__PURE__ */ jsx15(
2491
+ Box14,
2365
2492
  {
2366
2493
  borderStyle: "round",
2367
2494
  borderColor: "red",
@@ -2370,11 +2497,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2370
2497
  alignItems: "center",
2371
2498
  justifyContent: "center",
2372
2499
  flexDirection: "column",
2373
- children: /* @__PURE__ */ jsx14(Text14, { children: confirmFocus === "delete" ? chalk11.bgRed.white.bold(" Delete ") : chalk11.red.bold("Delete") })
2500
+ children: /* @__PURE__ */ jsx15(Text15, { children: confirmFocus === "delete" ? chalk11.bgRed.white.bold(" Delete ") : chalk11.red.bold("Delete") })
2374
2501
  }
2375
2502
  ),
2376
- /* @__PURE__ */ jsx14(
2377
- Box13,
2503
+ /* @__PURE__ */ jsx15(
2504
+ Box14,
2378
2505
  {
2379
2506
  borderStyle: "round",
2380
2507
  borderColor: confirmFocus === "cancel" ? "white" : "gray",
@@ -2383,17 +2510,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2383
2510
  alignItems: "center",
2384
2511
  justifyContent: "center",
2385
2512
  flexDirection: "column",
2386
- children: /* @__PURE__ */ jsx14(Text14, { children: confirmFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2513
+ children: /* @__PURE__ */ jsx15(Text15, { children: confirmFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2387
2514
  }
2388
2515
  )
2389
2516
  ] }),
2390
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2517
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2391
2518
  "Press Enter to ",
2392
2519
  confirmFocus === "delete" ? "Delete" : "Cancel",
2393
2520
  " | Y to Delete | C to Cancel"
2394
2521
  ] }) }),
2395
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(
2396
- TextInput4,
2522
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(
2523
+ TextInput5,
2397
2524
  {
2398
2525
  value: "",
2399
2526
  onChange: () => {
@@ -2406,18 +2533,18 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2406
2533
  }
2407
2534
  ) })
2408
2535
  ] }),
2409
- deleteError && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "magenta", children: deleteError }) }),
2410
- deleting && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "yellow", children: "Deleting..." }) })
2536
+ deleteError && /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "magenta", children: deleteError }) }),
2537
+ deleting && /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "yellow", children: "Deleting..." }) })
2411
2538
  ] }) })
2412
- ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2413
- /* @__PURE__ */ jsx14(Text14, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
2414
- /* @__PURE__ */ jsx14(Text14, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
2415
- /* @__PURE__ */ jsx14(Box13, { height: 1, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
2416
- /* @__PURE__ */ jsx14(Text14, { children: archiveTarget.nameWithOwner }),
2417
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
2418
- /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2419
- /* @__PURE__ */ jsx14(
2420
- Box13,
2539
+ ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2540
+ /* @__PURE__ */ jsx15(Text15, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
2541
+ /* @__PURE__ */ jsx15(Text15, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
2542
+ /* @__PURE__ */ jsx15(Box14, { height: 1, children: /* @__PURE__ */ jsx15(Text15, { children: " " }) }),
2543
+ /* @__PURE__ */ jsx15(Text15, { children: archiveTarget.nameWithOwner }),
2544
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
2545
+ /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2546
+ /* @__PURE__ */ jsx15(
2547
+ Box14,
2421
2548
  {
2422
2549
  borderStyle: "round",
2423
2550
  borderColor: archiveTarget.isArchived ? "green" : "yellow",
@@ -2426,11 +2553,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2426
2553
  alignItems: "center",
2427
2554
  justifyContent: "center",
2428
2555
  flexDirection: "column",
2429
- children: /* @__PURE__ */ jsx14(Text14, { children: archiveFocus === "confirm" ? chalk11.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : chalk11.bold[archiveTarget.isArchived ? "green" : "yellow"](archiveTarget.isArchived ? "Unarchive" : "Archive") })
2556
+ children: /* @__PURE__ */ jsx15(Text15, { children: archiveFocus === "confirm" ? chalk11.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : chalk11.bold[archiveTarget.isArchived ? "green" : "yellow"](archiveTarget.isArchived ? "Unarchive" : "Archive") })
2430
2557
  }
2431
2558
  ),
2432
- /* @__PURE__ */ jsx14(
2433
- Box13,
2559
+ /* @__PURE__ */ jsx15(
2560
+ Box14,
2434
2561
  {
2435
2562
  borderStyle: "round",
2436
2563
  borderColor: archiveFocus === "cancel" ? "white" : "gray",
@@ -2439,19 +2566,19 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2439
2566
  alignItems: "center",
2440
2567
  justifyContent: "center",
2441
2568
  flexDirection: "column",
2442
- children: /* @__PURE__ */ jsx14(Text14, { children: archiveFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2569
+ children: /* @__PURE__ */ jsx15(Text15, { children: archiveFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2443
2570
  }
2444
2571
  )
2445
2572
  ] }),
2446
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2573
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2447
2574
  "Press Enter to ",
2448
2575
  archiveFocus === "confirm" ? archiveTarget.isArchived ? "Unarchive" : "Archive" : "Cancel",
2449
2576
  " | Y to ",
2450
2577
  archiveTarget.isArchived ? "Unarchive" : "Archive",
2451
2578
  " | C to Cancel"
2452
2579
  ] }) }),
2453
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(
2454
- TextInput4,
2580
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(
2581
+ TextInput5,
2455
2582
  {
2456
2583
  value: "",
2457
2584
  onChange: () => {
@@ -2465,21 +2592,28 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2465
2592
  }
2466
2593
  }
2467
2594
  ) }),
2468
- archiveError && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "magenta", children: archiveError }) }),
2469
- archiving && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
2470
- ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2471
- /* @__PURE__ */ jsx14(Text14, { bold: true, children: "Sync Fork Confirmation" }),
2472
- /* @__PURE__ */ jsx14(Text14, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
2473
- /* @__PURE__ */ jsx14(Box13, { height: 1, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
2474
- /* @__PURE__ */ jsx14(Text14, { children: syncTarget.nameWithOwner }),
2475
- syncTarget.parent && /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2595
+ archiveError && /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "magenta", children: archiveError }) }),
2596
+ archiving && /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
2597
+ ] }) }) : renameMode && renameTarget ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx15(
2598
+ RenameModal,
2599
+ {
2600
+ repo: renameTarget,
2601
+ onRename: executeRename,
2602
+ onCancel: closeRenameModal
2603
+ }
2604
+ ) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2605
+ /* @__PURE__ */ jsx15(Text15, { bold: true, children: "Sync Fork Confirmation" }),
2606
+ /* @__PURE__ */ jsx15(Text15, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
2607
+ /* @__PURE__ */ jsx15(Box14, { height: 1, children: /* @__PURE__ */ jsx15(Text15, { children: " " }) }),
2608
+ /* @__PURE__ */ jsx15(Text15, { children: syncTarget.nameWithOwner }),
2609
+ syncTarget.parent && /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2476
2610
  "Upstream: ",
2477
2611
  syncTarget.parent.nameWithOwner
2478
2612
  ] }),
2479
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { children: "This will merge upstream changes into your fork." }) }),
2480
- /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2481
- /* @__PURE__ */ jsx14(
2482
- Box13,
2613
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { children: "This will merge upstream changes into your fork." }) }),
2614
+ /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2615
+ /* @__PURE__ */ jsx15(
2616
+ Box14,
2483
2617
  {
2484
2618
  borderStyle: "round",
2485
2619
  borderColor: "blue",
@@ -2488,11 +2622,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2488
2622
  alignItems: "center",
2489
2623
  justifyContent: "center",
2490
2624
  flexDirection: "column",
2491
- children: /* @__PURE__ */ jsx14(Text14, { children: syncFocus === "confirm" ? chalk11.bgBlue.white.bold(" Sync ") : chalk11.blue.bold("Sync") })
2625
+ children: /* @__PURE__ */ jsx15(Text15, { children: syncFocus === "confirm" ? chalk11.bgBlue.white.bold(" Sync ") : chalk11.blue.bold("Sync") })
2492
2626
  }
2493
2627
  ),
2494
- /* @__PURE__ */ jsx14(
2495
- Box13,
2628
+ /* @__PURE__ */ jsx15(
2629
+ Box14,
2496
2630
  {
2497
2631
  borderStyle: "round",
2498
2632
  borderColor: syncFocus === "cancel" ? "white" : "gray",
@@ -2501,17 +2635,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2501
2635
  alignItems: "center",
2502
2636
  justifyContent: "center",
2503
2637
  flexDirection: "column",
2504
- children: /* @__PURE__ */ jsx14(Text14, { children: syncFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2638
+ children: /* @__PURE__ */ jsx15(Text15, { children: syncFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2505
2639
  }
2506
2640
  )
2507
2641
  ] }),
2508
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2642
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2509
2643
  "Press Enter to ",
2510
2644
  syncFocus === "confirm" ? "Sync" : "Cancel",
2511
2645
  " | Y to Sync | C to Cancel"
2512
2646
  ] }) }),
2513
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(
2514
- TextInput4,
2647
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(
2648
+ TextInput5,
2515
2649
  {
2516
2650
  value: "",
2517
2651
  onChange: () => {
@@ -2525,14 +2659,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2525
2659
  }
2526
2660
  }
2527
2661
  ) }),
2528
- syncError && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "magenta", children: syncError }) }),
2529
- syncing && /* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "yellow", children: "Syncing..." }) })
2530
- ] }) }) : logoutMode ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2531
- /* @__PURE__ */ jsx14(Text14, { bold: true, children: "Logout Confirmation" }),
2532
- /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: "Are you sure you want to log out?" }),
2533
- /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2534
- /* @__PURE__ */ jsx14(
2535
- Box13,
2662
+ syncError && /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "magenta", children: syncError }) }),
2663
+ syncing && /* @__PURE__ */ jsx15(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "yellow", children: "Syncing..." }) })
2664
+ ] }) }) : logoutMode ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
2665
+ /* @__PURE__ */ jsx15(Text15, { bold: true, children: "Logout Confirmation" }),
2666
+ /* @__PURE__ */ jsx15(Text15, { color: "cyan", children: "Are you sure you want to log out?" }),
2667
+ /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2668
+ /* @__PURE__ */ jsx15(
2669
+ Box14,
2536
2670
  {
2537
2671
  borderStyle: "round",
2538
2672
  borderColor: "cyan",
@@ -2541,11 +2675,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2541
2675
  alignItems: "center",
2542
2676
  justifyContent: "center",
2543
2677
  flexDirection: "column",
2544
- children: /* @__PURE__ */ jsx14(Text14, { children: logoutFocus === "confirm" ? chalk11.bgCyan.white.bold(" Logout ") : chalk11.cyan.bold("Logout") })
2678
+ children: /* @__PURE__ */ jsx15(Text15, { children: logoutFocus === "confirm" ? chalk11.bgCyan.white.bold(" Logout ") : chalk11.cyan.bold("Logout") })
2545
2679
  }
2546
2680
  ),
2547
- /* @__PURE__ */ jsx14(
2548
- Box13,
2681
+ /* @__PURE__ */ jsx15(
2682
+ Box14,
2549
2683
  {
2550
2684
  borderStyle: "round",
2551
2685
  borderColor: logoutFocus === "cancel" ? "white" : "gray",
@@ -2554,16 +2688,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2554
2688
  alignItems: "center",
2555
2689
  justifyContent: "center",
2556
2690
  flexDirection: "column",
2557
- children: /* @__PURE__ */ jsx14(Text14, { children: logoutFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2691
+ children: /* @__PURE__ */ jsx15(Text15, { children: logoutFocus === "cancel" ? chalk11.bgGray.white.bold(" Cancel ") : chalk11.gray.bold("Cancel") })
2558
2692
  }
2559
2693
  )
2560
2694
  ] }),
2561
- /* @__PURE__ */ jsx14(Box13, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2695
+ /* @__PURE__ */ jsx15(Box14, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2562
2696
  "Press Enter to ",
2563
2697
  logoutFocus === "confirm" ? "Logout" : "Cancel",
2564
2698
  " | Y to Logout | C to Cancel"
2565
2699
  ] }) })
2566
- ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx14(
2700
+ ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx15(
2567
2701
  OrgSwitcher,
2568
2702
  {
2569
2703
  token,
@@ -2571,45 +2705,45 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2571
2705
  onSelect: handleOrgContextChange,
2572
2706
  onClose: () => setOrgSwitcherOpen(false)
2573
2707
  }
2574
- ) }) : infoMode ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
2708
+ ) }) : infoMode ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
2575
2709
  const repo = infoRepo || visibleItems[cursor];
2576
- if (!repo) return /* @__PURE__ */ jsx14(Text14, { color: "red", children: "No repository selected." });
2710
+ if (!repo) return /* @__PURE__ */ jsx15(Text15, { color: "red", children: "No repository selected." });
2577
2711
  const langName = repo.primaryLanguage?.name || "N/A";
2578
2712
  const langColor = repo.primaryLanguage?.color || "#666666";
2579
- return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
2580
- /* @__PURE__ */ jsxs13(Text14, { bold: true, children: [
2713
+ return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
2714
+ /* @__PURE__ */ jsxs14(Text15, { bold: true, children: [
2581
2715
  "Repository Info ",
2582
2716
  infoRepo ? chalk11.dim("(cached)") : ""
2583
2717
  ] }),
2584
- /* @__PURE__ */ jsx14(Box13, { height: 1, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
2585
- /* @__PURE__ */ jsx14(Text14, { children: chalk11.bold(repo.nameWithOwner) }),
2586
- repo.description && /* @__PURE__ */ jsx14(Text14, { color: "gray", children: repo.description }),
2587
- /* @__PURE__ */ jsx14(Box13, { height: 1, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
2588
- /* @__PURE__ */ jsxs13(Text14, { children: [
2718
+ /* @__PURE__ */ jsx15(Box14, { height: 1, children: /* @__PURE__ */ jsx15(Text15, { children: " " }) }),
2719
+ /* @__PURE__ */ jsx15(Text15, { children: chalk11.bold(repo.nameWithOwner) }),
2720
+ repo.description && /* @__PURE__ */ jsx15(Text15, { color: "gray", children: repo.description }),
2721
+ /* @__PURE__ */ jsx15(Box14, { height: 1, children: /* @__PURE__ */ jsx15(Text15, { children: " " }) }),
2722
+ /* @__PURE__ */ jsxs14(Text15, { children: [
2589
2723
  repo.visibility === "PRIVATE" ? chalk11.yellow("Private") : repo.visibility === "INTERNAL" ? chalk11.magenta("Internal") : chalk11.green("Public"),
2590
2724
  repo.isArchived ? chalk11.gray(" Archived") : "",
2591
2725
  repo.isFork ? chalk11.blue(" Fork") : ""
2592
2726
  ] }),
2593
- /* @__PURE__ */ jsx14(Text14, { children: chalk11.gray(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
2594
- /* @__PURE__ */ jsxs13(Text14, { children: [
2727
+ /* @__PURE__ */ jsx15(Text15, { children: chalk11.gray(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
2728
+ /* @__PURE__ */ jsxs14(Text15, { children: [
2595
2729
  chalk11.hex(langColor)(`\u25CF `),
2596
2730
  chalk11.gray(`${langName}`)
2597
2731
  ] }),
2598
- /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2732
+ /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2599
2733
  "Updated: ",
2600
2734
  formatDate(repo.updatedAt),
2601
2735
  " \u2022 Pushed: ",
2602
2736
  formatDate(repo.pushedAt)
2603
2737
  ] }),
2604
- /* @__PURE__ */ jsxs13(Text14, { color: "gray", children: [
2738
+ /* @__PURE__ */ jsxs14(Text15, { color: "gray", children: [
2605
2739
  "Size: ",
2606
2740
  repo.diskUsage,
2607
2741
  " KB"
2608
2742
  ] }),
2609
- /* @__PURE__ */ jsx14(Box13, { height: 1, children: /* @__PURE__ */ jsx14(Text14, { children: " " }) }),
2610
- /* @__PURE__ */ jsx14(Text14, { color: "gray", children: "Press Esc or I to close" })
2743
+ /* @__PURE__ */ jsx15(Box14, { height: 1, children: /* @__PURE__ */ jsx15(Text15, { children: " " }) }),
2744
+ /* @__PURE__ */ jsx15(Text15, { color: "gray", children: "Press Esc or I to close" })
2611
2745
  ] });
2612
- })() }) : visibilityMode ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx14(
2746
+ })() }) : visibilityMode ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx15(
2613
2747
  VisibilityModal,
2614
2748
  {
2615
2749
  currentFilter: visibilityFilter,
@@ -2622,7 +2756,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2622
2756
  },
2623
2757
  onCancel: () => setVisibilityMode(false)
2624
2758
  }
2625
- ) }) : sortMode ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx14(
2759
+ ) }) : sortMode ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx15(
2626
2760
  SortModal,
2627
2761
  {
2628
2762
  currentSort: sortKey,
@@ -2634,7 +2768,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2634
2768
  },
2635
2769
  onCancel: () => setSortMode(false)
2636
2770
  }
2637
- ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx14(Box13, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx14(
2771
+ ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx15(Box14, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx15(
2638
2772
  ChangeVisibilityModal,
2639
2773
  {
2640
2774
  isOpen: changeVisibilityMode,
@@ -2647,8 +2781,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2647
2781
  changing: changingVisibility,
2648
2782
  error: changeVisibilityError
2649
2783
  }
2650
- ) }) : /* @__PURE__ */ jsxs13(Fragment6, { children: [
2651
- /* @__PURE__ */ jsx14(
2784
+ ) }) : /* @__PURE__ */ jsxs14(Fragment7, { children: [
2785
+ /* @__PURE__ */ jsx15(
2652
2786
  RepoListHeader,
2653
2787
  {
2654
2788
  ownerContext,
@@ -2662,10 +2796,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2662
2796
  isEnterprise: isEnterpriseOrg
2663
2797
  }
2664
2798
  ),
2665
- filterMode && /* @__PURE__ */ jsxs13(Box13, { marginBottom: 1, children: [
2666
- /* @__PURE__ */ jsx14(Text14, { children: "Search: " }),
2667
- /* @__PURE__ */ jsx14(
2668
- TextInput4,
2799
+ filterMode && /* @__PURE__ */ jsxs14(Box14, { marginBottom: 1, children: [
2800
+ /* @__PURE__ */ jsx15(Text15, { children: "Search: " }),
2801
+ /* @__PURE__ */ jsx15(
2802
+ TextInput5,
2669
2803
  {
2670
2804
  value: filter,
2671
2805
  onChange: (val) => {
@@ -2704,10 +2838,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2704
2838
  }
2705
2839
  )
2706
2840
  ] }),
2707
- /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: listHeight, children: [
2708
- filterMode && filter.trim().length > 0 && filter.trim().length < 3 ? /* @__PURE__ */ jsx14(Box13, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, children: "Type at least 3 characters to search" }) }) : visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
2841
+ /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", height: listHeight, children: [
2842
+ filterMode && filter.trim().length > 0 && filter.trim().length < 3 ? /* @__PURE__ */ jsx15(Box14, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: true, children: "Type at least 3 characters to search" }) }) : visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
2709
2843
  const idx = windowed.start + i;
2710
- return /* @__PURE__ */ jsx14(
2844
+ return /* @__PURE__ */ jsx15(
2711
2845
  RepoRow,
2712
2846
  {
2713
2847
  repo,
@@ -2720,32 +2854,32 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2720
2854
  repo.nameWithOwner
2721
2855
  );
2722
2856
  }),
2723
- loadingMore && hasNextPage && /* @__PURE__ */ jsx14(Box13, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", children: [
2724
- /* @__PURE__ */ jsx14(Box13, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: /* @__PURE__ */ jsx14(SlowSpinner, {}) }) }),
2725
- /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: "Loading more repositories..." })
2857
+ loadingMore && hasNextPage && /* @__PURE__ */ jsx15(Box14, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs14(Box14, { flexDirection: "row", children: [
2858
+ /* @__PURE__ */ jsx15(Box14, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "cyan", children: /* @__PURE__ */ jsx15(SlowSpinner, {}) }) }),
2859
+ /* @__PURE__ */ jsx15(Text15, { color: "cyan", children: "Loading more repositories..." })
2726
2860
  ] }) }),
2727
- !loading && !searchLoading && visibleItems.length === 0 && /* @__PURE__ */ jsx14(Box13, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, children: searchActive ? "No repositories match your search" : filter ? "No repositories match your filter" : "No repositories found" }) })
2861
+ !loading && !searchLoading && visibleItems.length === 0 && /* @__PURE__ */ jsx15(Box14, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: true, children: searchActive ? "No repositories match your search" : filter ? "No repositories match your filter" : "No repositories found" }) })
2728
2862
  ] })
2729
2863
  ] }) }),
2730
- /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
2731
- /* @__PURE__ */ jsx14(Box13, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 \u23CE/O Open \u2022 R Refresh \u2022 W Org Switch \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
2732
- /* @__PURE__ */ jsx14(Box13, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: modalOpen ? true : void 0, children: "Ctrl+G Top \u2022 G Bottom \u2022 / Search \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 F Fork Status \u2022 V Visibility" }) }),
2733
- /* @__PURE__ */ jsx14(Box13, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: modalOpen ? true : void 0, children: "I Info \u2022 K Cache Info \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Del/Backspace Delete \u2022 Ctrl+S Sync Fork" }) })
2864
+ /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
2865
+ /* @__PURE__ */ jsx15(Box14, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 \u23CE/O Open \u2022 R Refresh \u2022 W Org Switch \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
2866
+ /* @__PURE__ */ jsx15(Box14, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: modalOpen ? true : void 0, children: "Ctrl+G Top \u2022 G Bottom \u2022 / Search \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 F Fork Status \u2022 V Visibility" }) }),
2867
+ /* @__PURE__ */ jsx15(Box14, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: modalOpen ? true : void 0, children: "I Info \u2022 K Cache Info \u2022 Ctrl+R Rename \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Del/Backspace Delete \u2022 Ctrl+S Sync Fork" }) })
2734
2868
  ] }),
2735
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
2736
- /* @__PURE__ */ jsx14(Text14, { bold: true, color: "yellow", children: "Debug Messages:" }),
2737
- debugMessages.length === 0 ? /* @__PURE__ */ jsx14(Text14, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx14(Text14, { color: "gray", children: msg }, i))
2869
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs14(Box14, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
2870
+ /* @__PURE__ */ jsx15(Text15, { bold: true, color: "yellow", children: "Debug Messages:" }),
2871
+ debugMessages.length === 0 ? /* @__PURE__ */ jsx15(Text15, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx15(Text15, { color: "gray", children: msg }, i))
2738
2872
  ] })
2739
2873
  ] });
2740
2874
  }
2741
2875
 
2742
2876
  // src/ui/components/auth/AuthMethodSelector.tsx
2743
- import { useState as useState11 } from "react";
2744
- import { Box as Box14, Text as Text15, useInput as useInput11 } from "ink";
2877
+ import { useState as useState12 } from "react";
2878
+ import { Box as Box15, Text as Text16, useInput as useInput12 } from "ink";
2745
2879
  import chalk12 from "chalk";
2746
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2880
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2747
2881
  function AuthMethodSelector({ onSelect, onQuit }) {
2748
- const [selectedIndex, setSelectedIndex] = useState11(0);
2882
+ const [selectedIndex, setSelectedIndex] = useState12(0);
2749
2883
  const methods = [
2750
2884
  {
2751
2885
  key: "oauth",
@@ -2758,7 +2892,7 @@ function AuthMethodSelector({ onSelect, onQuit }) {
2758
2892
  description: "Manually enter a GitHub Personal Access Token"
2759
2893
  }
2760
2894
  ];
2761
- useInput11((input, key) => {
2895
+ useInput12((input, key) => {
2762
2896
  if (key.escape || input?.toLowerCase() === "q") {
2763
2897
  if (onQuit) {
2764
2898
  onQuit();
@@ -2777,34 +2911,34 @@ function AuthMethodSelector({ onSelect, onQuit }) {
2777
2911
  onSelect("pat");
2778
2912
  }
2779
2913
  });
2780
- return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
2781
- /* @__PURE__ */ jsx15(Text15, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
2782
- /* @__PURE__ */ jsx15(Box14, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
2914
+ return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
2915
+ /* @__PURE__ */ jsx16(Text16, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
2916
+ /* @__PURE__ */ jsx16(Box15, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
2783
2917
  const isSelected = index === selectedIndex;
2784
2918
  const prefix = isSelected ? chalk12.cyan("\u203A") : " ";
2785
2919
  const numberPrefix = `${index + 1}.`;
2786
- return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", marginBottom: 1, children: [
2787
- /* @__PURE__ */ jsx15(Text15, { children: /* @__PURE__ */ jsxs14(Text15, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
2920
+ return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", marginBottom: 1, children: [
2921
+ /* @__PURE__ */ jsx16(Text16, { children: /* @__PURE__ */ jsxs15(Text16, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
2788
2922
  prefix,
2789
2923
  " ",
2790
2924
  numberPrefix,
2791
2925
  " ",
2792
2926
  method.label
2793
2927
  ] }) }),
2794
- /* @__PURE__ */ jsxs14(Text15, { color: "gray", dimColor: true, children: [
2928
+ /* @__PURE__ */ jsxs15(Text16, { color: "gray", dimColor: true, children: [
2795
2929
  " ",
2796
2930
  method.description
2797
2931
  ] })
2798
2932
  ] }, method.key);
2799
2933
  }) }),
2800
- /* @__PURE__ */ jsx15(Text15, { color: "gray", dimColor: true, marginTop: 1, children: "Use arrow keys to navigate, Enter to select, or press 1/2 \u2022 Q/Esc to quit" })
2934
+ /* @__PURE__ */ jsx16(Text16, { color: "gray", dimColor: true, marginTop: 1, children: "Use arrow keys to navigate, Enter to select, or press 1/2 \u2022 Q/Esc to quit" })
2801
2935
  ] });
2802
2936
  }
2803
2937
 
2804
2938
  // src/ui/components/auth/OAuthProgress.tsx
2805
- import { Box as Box15, Text as Text16 } from "ink";
2939
+ import { Box as Box16, Text as Text17 } from "ink";
2806
2940
  import Spinner from "ink-spinner";
2807
- import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2941
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
2808
2942
  function OAuthProgress({ status, error, deviceCode }) {
2809
2943
  const statusMessages = {
2810
2944
  initializing: {
@@ -2841,69 +2975,69 @@ function OAuthProgress({ status, error, deviceCode }) {
2841
2975
  }
2842
2976
  };
2843
2977
  const { message, showSpinner } = statusMessages[status];
2844
- return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", borderStyle: "single", borderColor: status === "error" ? "red" : "cyan", paddingX: 2, paddingY: 1, children: [
2845
- /* @__PURE__ */ jsx16(Text16, { bold: true, marginBottom: 1, children: "GitHub OAuth Authentication" }),
2846
- /* @__PURE__ */ jsx16(Box15, { marginY: 1, children: showSpinner ? /* @__PURE__ */ jsxs15(Box15, { children: [
2847
- /* @__PURE__ */ jsx16(Text16, { color: "green", children: /* @__PURE__ */ jsx16(Spinner, { type: "dots" }) }),
2848
- /* @__PURE__ */ jsxs15(Text16, { children: [
2978
+ return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", borderStyle: "single", borderColor: status === "error" ? "red" : "cyan", paddingX: 2, paddingY: 1, children: [
2979
+ /* @__PURE__ */ jsx17(Text17, { bold: true, marginBottom: 1, children: "GitHub OAuth Authentication" }),
2980
+ /* @__PURE__ */ jsx17(Box16, { marginY: 1, children: showSpinner ? /* @__PURE__ */ jsxs16(Box16, { children: [
2981
+ /* @__PURE__ */ jsx17(Text17, { color: "green", children: /* @__PURE__ */ jsx17(Spinner, { type: "dots" }) }),
2982
+ /* @__PURE__ */ jsxs16(Text17, { children: [
2849
2983
  " ",
2850
2984
  message
2851
2985
  ] })
2852
- ] }) : /* @__PURE__ */ jsxs15(Text16, { color: status === "error" ? "red" : "green", children: [
2986
+ ] }) : /* @__PURE__ */ jsxs16(Text17, { color: status === "error" ? "red" : "green", children: [
2853
2987
  status === "error" ? "\u2717" : "\u2713",
2854
2988
  " ",
2855
2989
  message
2856
2990
  ] }) }),
2857
- (status === "waiting_for_authorization" || status === "polling_for_token") && deviceCode && /* @__PURE__ */ jsxs15(Box15, { marginY: 1, flexDirection: "column", children: [
2858
- /* @__PURE__ */ jsx16(Text16, { bold: true, color: "cyan", marginBottom: 1, children: "\u{1F4CB} Please complete these steps:" }),
2859
- /* @__PURE__ */ jsxs15(Box15, { marginBottom: 1, children: [
2860
- /* @__PURE__ */ jsx16(Text16, { children: "1. Visit: " }),
2861
- /* @__PURE__ */ jsx16(Text16, { bold: true, color: "blue", children: deviceCode.verification_uri })
2991
+ (status === "waiting_for_authorization" || status === "polling_for_token") && deviceCode && /* @__PURE__ */ jsxs16(Box16, { marginY: 1, flexDirection: "column", children: [
2992
+ /* @__PURE__ */ jsx17(Text17, { bold: true, color: "cyan", marginBottom: 1, children: "\u{1F4CB} Please complete these steps:" }),
2993
+ /* @__PURE__ */ jsxs16(Box16, { marginBottom: 1, children: [
2994
+ /* @__PURE__ */ jsx17(Text17, { children: "1. Visit: " }),
2995
+ /* @__PURE__ */ jsx17(Text17, { bold: true, color: "blue", children: deviceCode.verification_uri })
2862
2996
  ] }),
2863
- /* @__PURE__ */ jsxs15(Box15, { marginBottom: 1, flexDirection: "column", children: [
2864
- /* @__PURE__ */ jsx16(Text16, { children: "2. Enter this code:" }),
2865
- /* @__PURE__ */ jsx16(Box15, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, marginTop: 1, children: /* @__PURE__ */ jsx16(Text16, { bold: true, color: "yellow", children: deviceCode.user_code }) })
2997
+ /* @__PURE__ */ jsxs16(Box16, { marginBottom: 1, flexDirection: "column", children: [
2998
+ /* @__PURE__ */ jsx17(Text17, { children: "2. Enter this code:" }),
2999
+ /* @__PURE__ */ jsx17(Box16, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { bold: true, color: "yellow", children: deviceCode.user_code }) })
2866
3000
  ] }),
2867
- status === "waiting_for_authorization" && /* @__PURE__ */ jsx16(Text16, { color: "gray", marginTop: 1, children: "Your browser should open automatically." }),
2868
- status === "polling_for_token" && /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", marginTop: 1, children: [
2869
- /* @__PURE__ */ jsx16(Text16, { color: "gray", children: "Waiting for you to complete authorization in your browser..." }),
2870
- /* @__PURE__ */ jsx16(Text16, { color: "gray", dimColor: true, marginTop: 1, children: "This will timeout in 15 minutes. Press Esc to cancel." })
3001
+ status === "waiting_for_authorization" && /* @__PURE__ */ jsx17(Text17, { color: "gray", marginTop: 1, children: "Your browser should open automatically." }),
3002
+ status === "polling_for_token" && /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", marginTop: 1, children: [
3003
+ /* @__PURE__ */ jsx17(Text17, { color: "gray", children: "Waiting for you to complete authorization in your browser..." }),
3004
+ /* @__PURE__ */ jsx17(Text17, { color: "gray", dimColor: true, marginTop: 1, children: "This will timeout in 15 minutes. Press Esc to cancel." })
2871
3005
  ] })
2872
3006
  ] }),
2873
- status === "error" && error && /* @__PURE__ */ jsxs15(Box15, { marginY: 1, flexDirection: "column", children: [
2874
- /* @__PURE__ */ jsx16(Text16, { color: "red", children: error }),
2875
- /* @__PURE__ */ jsx16(Text16, { color: "gray", marginTop: 1, children: "Press Esc to go back and try again." })
3007
+ status === "error" && error && /* @__PURE__ */ jsxs16(Box16, { marginY: 1, flexDirection: "column", children: [
3008
+ /* @__PURE__ */ jsx17(Text17, { color: "red", children: error }),
3009
+ /* @__PURE__ */ jsx17(Text17, { color: "gray", marginTop: 1, children: "Press Esc to go back and try again." })
2876
3010
  ] }),
2877
- status === "success" && /* @__PURE__ */ jsx16(Text16, { color: "gray", marginTop: 1, children: "Returning to application..." })
3011
+ status === "success" && /* @__PURE__ */ jsx17(Text17, { color: "gray", marginTop: 1, children: "Returning to application..." })
2878
3012
  ] });
2879
3013
  }
2880
3014
 
2881
3015
  // src/ui/App.tsx
2882
- import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
3016
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2883
3017
  var packageJson = require_package();
2884
3018
  function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlineTokenEphemeral }) {
2885
3019
  const { exit } = useApp2();
2886
3020
  const { stdout } = useStdout2();
2887
- const [mode, setMode] = useState12("checking");
2888
- const [token, setToken] = useState12(null);
2889
- const [input, setInput] = useState12("");
2890
- const [error, setError] = useState12(null);
2891
- const [viewer, setViewer] = useState12(null);
2892
- const [rateLimitReset, setRateLimitReset] = useState12(null);
2893
- const [wasRateLimited, setWasRateLimited] = useState12(false);
2894
- const [orgContext, setOrgContext] = useState12("personal");
2895
- const [authMethod, setAuthMethod] = useState12("pat");
2896
- const [oauthStatus, setOAuthStatus] = useState12("initializing");
2897
- const [tokenSource, setTokenSource] = useState12("pat");
2898
- const [sessionTokenOrigin, setSessionTokenOrigin] = useState12("stored");
2899
- const [deviceCodeResponse, setDeviceCodeResponse] = useState12(null);
2900
- const [oauthDeviceCode, setOauthDeviceCode] = useState12(null);
2901
- const [dims, setDims] = useState12(() => {
3021
+ const [mode, setMode] = useState13("checking");
3022
+ const [token, setToken] = useState13(null);
3023
+ const [input, setInput] = useState13("");
3024
+ const [error, setError] = useState13(null);
3025
+ const [viewer, setViewer] = useState13(null);
3026
+ const [rateLimitReset, setRateLimitReset] = useState13(null);
3027
+ const [wasRateLimited, setWasRateLimited] = useState13(false);
3028
+ const [orgContext, setOrgContext] = useState13("personal");
3029
+ const [authMethod, setAuthMethod] = useState13("pat");
3030
+ const [oauthStatus, setOAuthStatus] = useState13("initializing");
3031
+ const [tokenSource, setTokenSource] = useState13("pat");
3032
+ const [sessionTokenOrigin, setSessionTokenOrigin] = useState13("stored");
3033
+ const [deviceCodeResponse, setDeviceCodeResponse] = useState13(null);
3034
+ const [oauthDeviceCode, setOauthDeviceCode] = useState13(null);
3035
+ const [dims, setDims] = useState13(() => {
2902
3036
  const cols = stdout?.columns ?? 100;
2903
3037
  const rows = stdout?.rows ?? 30;
2904
3038
  return { cols, rows };
2905
3039
  });
2906
- useEffect8(() => {
3040
+ useEffect9(() => {
2907
3041
  if (!stdout) return;
2908
3042
  const onResize = () => {
2909
3043
  const cols = stdout.columns ?? 100;
@@ -2915,7 +3049,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
2915
3049
  stdout.off?.("resize", onResize);
2916
3050
  };
2917
3051
  }, [stdout]);
2918
- useEffect8(() => {
3052
+ useEffect9(() => {
2919
3053
  const env = getTokenFromEnv();
2920
3054
  const stored = getStoredToken();
2921
3055
  const source = getTokenSource();
@@ -2939,7 +3073,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
2939
3073
  setMode("auth_method_selection");
2940
3074
  }
2941
3075
  }, [inlineToken2]);
2942
- useEffect8(() => {
3076
+ useEffect9(() => {
2943
3077
  if (mode !== "oauth_flow") return;
2944
3078
  (async () => {
2945
3079
  try {
@@ -2991,7 +3125,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
2991
3125
  setMode("oauth_flow");
2992
3126
  }
2993
3127
  };
2994
- useEffect8(() => {
3128
+ useEffect9(() => {
2995
3129
  (async () => {
2996
3130
  if (mode !== "validating" || !token) return;
2997
3131
  const timeoutId = setTimeout(() => {
@@ -3103,7 +3237,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
3103
3237
  setTokenSource("pat");
3104
3238
  setMode("auth_method_selection");
3105
3239
  };
3106
- useInput12((input2, key) => {
3240
+ useInput13((input2, key) => {
3107
3241
  if ((mode === "prompt" || mode === "auth_method_selection") && key.escape) {
3108
3242
  exit();
3109
3243
  }
@@ -3135,19 +3269,19 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
3135
3269
  }
3136
3270
  });
3137
3271
  const verticalPadding = Math.floor(dims.rows * 0.15);
3138
- const header = useMemo2(() => /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
3139
- /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", gap: 1, children: [
3140
- /* @__PURE__ */ jsxs16(Text17, { bold: true, color: "cyan", children: [
3272
+ const header = useMemo2(() => /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
3273
+ /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", gap: 1, children: [
3274
+ /* @__PURE__ */ jsxs17(Text18, { bold: true, color: "cyan", children: [
3141
3275
  " ",
3142
3276
  "GitHub Repository Manager"
3143
3277
  ] }),
3144
- /* @__PURE__ */ jsxs16(Text17, { color: "gray", dimColor: true, children: [
3278
+ /* @__PURE__ */ jsxs17(Text18, { color: "gray", dimColor: true, children: [
3145
3279
  "v",
3146
3280
  packageJson.version
3147
3281
  ] }),
3148
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx17(Text17, { backgroundColor: "blue", color: "white", children: " debug mode " })
3282
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx18(Text18, { backgroundColor: "blue", color: "white", children: " debug mode " })
3149
3283
  ] }),
3150
- viewer && /* @__PURE__ */ jsx17(Text17, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
3284
+ viewer && /* @__PURE__ */ jsx18(Text18, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
3151
3285
  ] }), [viewer, orgContext]);
3152
3286
  if (mode === "rate_limited") {
3153
3287
  const formatResetTime = (resetTime) => {
@@ -3170,71 +3304,71 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
3170
3304
  return "Unknown";
3171
3305
  }
3172
3306
  };
3173
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3307
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3174
3308
  header,
3175
- /* @__PURE__ */ jsx17(Box16, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs16(Box16, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
3176
- /* @__PURE__ */ jsx17(Text17, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
3177
- /* @__PURE__ */ jsx17(Text17, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
3178
- /* @__PURE__ */ jsx17(Text17, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
3179
- rateLimitReset && /* @__PURE__ */ jsxs16(Box16, { marginTop: 1, marginBottom: 1, children: [
3180
- /* @__PURE__ */ jsxs16(Text17, { children: [
3181
- /* @__PURE__ */ jsx17(Text17, { color: "cyan", children: "Reset in:" }),
3309
+ /* @__PURE__ */ jsx18(Box17, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs17(Box17, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
3310
+ /* @__PURE__ */ jsx18(Text18, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
3311
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
3312
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
3313
+ rateLimitReset && /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, marginBottom: 1, children: [
3314
+ /* @__PURE__ */ jsxs17(Text18, { children: [
3315
+ /* @__PURE__ */ jsx18(Text18, { color: "cyan", children: "Reset in:" }),
3182
3316
  " ",
3183
- /* @__PURE__ */ jsx17(Text17, { bold: true, children: formatResetTime(rateLimitReset) })
3317
+ /* @__PURE__ */ jsx18(Text18, { bold: true, children: formatResetTime(rateLimitReset) })
3184
3318
  ] }),
3185
- /* @__PURE__ */ jsxs16(Text17, { color: "gray", dimColor: true, children: [
3319
+ /* @__PURE__ */ jsxs17(Text18, { color: "gray", dimColor: true, children: [
3186
3320
  "(",
3187
3321
  new Date(rateLimitReset).toLocaleTimeString(),
3188
3322
  ")"
3189
3323
  ] })
3190
3324
  ] }),
3191
- /* @__PURE__ */ jsxs16(Box16, { marginTop: 2, flexDirection: "column", gap: 1, children: [
3192
- /* @__PURE__ */ jsx17(Text17, { bold: true, children: "What would you like to do?" }),
3193
- /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", paddingLeft: 2, children: [
3194
- /* @__PURE__ */ jsxs16(Text17, { children: [
3195
- /* @__PURE__ */ jsx17(Text17, { color: "cyan", bold: true, children: "R" }),
3325
+ /* @__PURE__ */ jsxs17(Box17, { marginTop: 2, flexDirection: "column", gap: 1, children: [
3326
+ /* @__PURE__ */ jsx18(Text18, { bold: true, children: "What would you like to do?" }),
3327
+ /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", paddingLeft: 2, children: [
3328
+ /* @__PURE__ */ jsxs17(Text18, { children: [
3329
+ /* @__PURE__ */ jsx18(Text18, { color: "cyan", bold: true, children: "R" }),
3196
3330
  " - Retry now ",
3197
3331
  rateLimitReset && formatResetTime(rateLimitReset) !== "Now (should be reset)" ? "(likely to fail until reset)" : "(should work now)"
3198
3332
  ] }),
3199
- /* @__PURE__ */ jsxs16(Text17, { children: [
3200
- /* @__PURE__ */ jsx17(Text17, { color: "cyan", bold: true, children: "L" }),
3333
+ /* @__PURE__ */ jsxs17(Text18, { children: [
3334
+ /* @__PURE__ */ jsx18(Text18, { color: "cyan", bold: true, children: "L" }),
3201
3335
  " - Logout and choose authentication method"
3202
3336
  ] }),
3203
- /* @__PURE__ */ jsxs16(Text17, { children: [
3204
- /* @__PURE__ */ jsx17(Text17, { color: "gray", bold: true, children: "Q/Esc" }),
3337
+ /* @__PURE__ */ jsxs17(Text18, { children: [
3338
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", bold: true, children: "Q/Esc" }),
3205
3339
  " - Quit application"
3206
3340
  ] })
3207
3341
  ] })
3208
3342
  ] }),
3209
- /* @__PURE__ */ jsx17(Text17, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
3343
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
3210
3344
  ] }) })
3211
3345
  ] });
3212
3346
  }
3213
3347
  if (mode === "auth_method_selection") {
3214
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3348
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3215
3349
  header,
3216
- /* @__PURE__ */ jsx17(Box16, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", alignItems: "center", children: [
3217
- /* @__PURE__ */ jsx17(AuthMethodSelector, { onSelect: handleAuthMethodSelect }),
3218
- error && /* @__PURE__ */ jsx17(Text17, { color: "red", marginTop: 1, children: error })
3350
+ /* @__PURE__ */ jsx18(Box17, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", alignItems: "center", children: [
3351
+ /* @__PURE__ */ jsx18(AuthMethodSelector, { onSelect: handleAuthMethodSelect }),
3352
+ error && /* @__PURE__ */ jsx18(Text18, { color: "red", marginTop: 1, children: error })
3219
3353
  ] }) })
3220
3354
  ] });
3221
3355
  }
3222
3356
  if (mode === "oauth_flow") {
3223
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3357
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3224
3358
  header,
3225
- /* @__PURE__ */ jsx17(Box16, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx17(OAuthProgress, { status: oauthStatus, error: error || void 0, deviceCode: oauthDeviceCode || void 0 }) })
3359
+ /* @__PURE__ */ jsx18(Box17, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx18(OAuthProgress, { status: oauthStatus, error: error || void 0, deviceCode: oauthDeviceCode || void 0 }) })
3226
3360
  ] });
3227
3361
  }
3228
3362
  if (mode === "prompt") {
3229
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3363
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3230
3364
  header,
3231
- /* @__PURE__ */ jsx17(Box16, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs16(Box16, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
3232
- /* @__PURE__ */ jsx17(Text17, { bold: true, marginBottom: 1, children: "Authentication Required" }),
3233
- /* @__PURE__ */ jsx17(Text17, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
3234
- /* @__PURE__ */ jsxs16(Box16, { children: [
3235
- /* @__PURE__ */ jsx17(Text17, { children: "Token: " }),
3236
- /* @__PURE__ */ jsx17(
3237
- TextInput5,
3365
+ /* @__PURE__ */ jsx18(Box17, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs17(Box17, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
3366
+ /* @__PURE__ */ jsx18(Text18, { bold: true, marginBottom: 1, children: "Authentication Required" }),
3367
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
3368
+ /* @__PURE__ */ jsxs17(Box17, { children: [
3369
+ /* @__PURE__ */ jsx18(Text18, { children: "Token: " }),
3370
+ /* @__PURE__ */ jsx18(
3371
+ TextInput6,
3238
3372
  {
3239
3373
  value: input,
3240
3374
  onChange: setInput,
@@ -3243,30 +3377,30 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
3243
3377
  }
3244
3378
  )
3245
3379
  ] }),
3246
- error && /* @__PURE__ */ jsx17(Text17, { color: "red", marginTop: 1, children: error }),
3247
- /* @__PURE__ */ jsx17(Text17, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
3248
- /* @__PURE__ */ jsx17(Text17, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to go back" })
3380
+ error && /* @__PURE__ */ jsx18(Text18, { color: "red", marginTop: 1, children: error }),
3381
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
3382
+ /* @__PURE__ */ jsx18(Text18, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to go back" })
3249
3383
  ] }) })
3250
3384
  ] });
3251
3385
  }
3252
3386
  if (mode === "validating" || mode === "checking") {
3253
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3387
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3254
3388
  header,
3255
- /* @__PURE__ */ jsx17(Box16, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", alignItems: "center", children: [
3256
- /* @__PURE__ */ jsx17(Text17, { color: "yellow", children: "Validating token..." }),
3257
- mode === "validating" && /* @__PURE__ */ jsx17(Text17, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
3389
+ /* @__PURE__ */ jsx18(Box17, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", alignItems: "center", children: [
3390
+ /* @__PURE__ */ jsx18(Text18, { color: "yellow", children: "Validating token..." }),
3391
+ mode === "validating" && /* @__PURE__ */ jsx18(Text18, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
3258
3392
  ] }) })
3259
3393
  ] });
3260
3394
  }
3261
3395
  if (mode === "error") {
3262
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3396
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3263
3397
  header,
3264
- /* @__PURE__ */ jsx17(Box16, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx17(Text17, { color: "red", children: error ?? "Unexpected error" }) })
3398
+ /* @__PURE__ */ jsx18(Box17, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx18(Text18, { color: "red", children: error ?? "Unexpected error" }) })
3265
3399
  ] });
3266
3400
  }
3267
- return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3401
+ return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
3268
3402
  header,
3269
- /* @__PURE__ */ jsx17(
3403
+ /* @__PURE__ */ jsx18(
3270
3404
  RepoList,
3271
3405
  {
3272
3406
  token,
@@ -3281,7 +3415,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
3281
3415
  }
3282
3416
 
3283
3417
  // src/index.tsx
3284
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
3418
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
3285
3419
  var argv = process.argv.slice(2);
3286
3420
  var getFlagValue = (name) => {
3287
3421
  const idx = argv.findIndex((a) => a === `--${name}` || a.startsWith(`--${name}=`));
@@ -3376,8 +3510,8 @@ var inlineToken = (() => {
3376
3510
  })();
3377
3511
  logger.debug("Rendering UI");
3378
3512
  var { unmount } = render(
3379
- /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", children: [
3380
- /* @__PURE__ */ jsx18(App, { initialOrgSlug, inlineToken, inlineTokenEphemeral: Boolean(inlineToken) }),
3381
- /* @__PURE__ */ jsx18(Text18, { color: "gray" })
3513
+ /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", children: [
3514
+ /* @__PURE__ */ jsx19(App, { initialOrgSlug, inlineToken, inlineTokenEphemeral: Boolean(inlineToken) }),
3515
+ /* @__PURE__ */ jsx19(Text19, { color: "gray" })
3382
3516
  ] })
3383
3517
  );