@industry-theme/git-panels 0.1.15 → 0.1.17

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.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare const onPackageUnload: () => Promise<void>;
16
16
  * Export tools for server-safe imports.
17
17
  * Use '@principal-ade/git-panels/tools' to import without React dependencies.
18
18
  */
19
- export { commitHistoryTools, commitHistoryToolsMetadata, refreshCommitsTool, setCommitLimitTool, commitDetailTools, commitDetailToolsMetadata, selectCommitTool, deselectCommitTool, pullRequestsTools, pullRequestsToolsMetadata, refreshPullRequestsTool, setPRFilterTool, pullRequestDetailTools, pullRequestDetailToolsMetadata, selectPullRequestTool, deselectPullRequestTool, allGitPanelTools, } from './tools';
19
+ export { commitHistoryTools, commitHistoryToolsMetadata, refreshCommitsTool, setCommitLimitTool, commitDetailTools, commitDetailToolsMetadata, selectCommitTool, deselectCommitTool, pullRequestsTools, pullRequestsToolsMetadata, refreshPullRequestsTool, pullRequestDetailTools, pullRequestDetailToolsMetadata, selectPullRequestTool, deselectPullRequestTool, allGitPanelTools, } from './tools';
20
20
  /**
21
21
  * Export types for consumers
22
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAYlE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EAmEnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,qBAEzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,qBAE3B,CAAC;AAEF;;;GAGG;AACH,OAAO,EAEL,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAElB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAElB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EAEf,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EAEvB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,YAAY,EACV,aAAa,EACb,eAAe,EACf,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAYlE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EAmEnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,qBAEzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,qBAE3B,CAAC;AAEF;;;GAGG;AACH,OAAO,EAEL,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAElB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAElB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EAEvB,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EAEvB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,YAAY,EACV,aAAa,EACb,eAAe,EACf,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GitCommitHistoryPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitCommitHistoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwN/D,CAAC;AA0EF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EA+DhD,CAAC"}
1
+ {"version":3,"file":"GitCommitHistoryPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitCommitHistoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0N/D,CAAC;AA0EF;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EA+DhD,CAAC"}
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { PanelComponentProps } from '../types';
3
3
  /**
4
- * GitPullRequestsPanel - Displays pull requests from the 'pullRequests' slice.
4
+ * GitPullRequestsPanel - Displays open pull requests from the 'pullRequests' slice.
5
5
  *
6
6
  * This panel expects the host to provide PR data through:
7
7
  * - context.getSlice<PullRequestsSliceData>('pullRequests')
8
8
  *
9
9
  * The panel supports:
10
- * - Filtering by state (all, open, closed)
11
10
  * - Refresh via context.refresh()
12
11
  * - Tool events for programmatic interaction
13
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GitPullRequestsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitPullRequestsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAU5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4S9D,CAAC;AAqIF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAkE/C,CAAC"}
1
+ {"version":3,"file":"GitPullRequestsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitPullRequestsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoS9D,CAAC;AA6HF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAkE/C,CAAC"}
@@ -101,19 +101,6 @@ const createLucideIcon = (iconName, iconNode) => {
101
101
  Component.displayName = toPascalCase(iconName);
102
102
  return Component;
103
103
  };
104
- /**
105
- * @license lucide-react v0.552.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */
110
- const __iconNode$j = [
111
- ["path", { d: "M8 2v4", key: "1cmpym" }],
112
- ["path", { d: "M16 2v4", key: "4m81vk" }],
113
- ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
114
- ["path", { d: "M3 10h18", key: "8toen8" }]
115
- ];
116
- const Calendar = createLucideIcon("calendar", __iconNode$j);
117
104
  /**
118
105
  * @license lucide-react v0.552.0 - ISC
119
106
  *
@@ -401,9 +388,12 @@ function formatDate(dateString) {
401
388
  if (diffDays === 0) return "Today";
402
389
  if (diffDays === 1) return "Yesterday";
403
390
  if (diffDays < 7) return `${diffDays} days ago`;
404
- if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;
405
- if (diffDays < 365) return `${Math.floor(diffDays / 30)} months ago`;
406
- return `${Math.floor(diffDays / 365)} years ago`;
391
+ const weeks = Math.floor(diffDays / 7);
392
+ if (diffDays < 30) return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
393
+ const months = Math.floor(diffDays / 30);
394
+ if (diffDays < 365) return `${months} ${months === 1 ? "month" : "months"} ago`;
395
+ const years = Math.floor(diffDays / 365);
396
+ return `${years} ${years === 1 ? "year" : "years"} ago`;
407
397
  }
408
398
  const GitCommitHistoryPanel = ({
409
399
  context,
@@ -481,65 +471,67 @@ const GitCommitHistoryPanel = ({
481
471
  }
482
472
  return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
483
473
  /* @__PURE__ */ jsx("style", { children: `.hide-scrollbar::-webkit-scrollbar { display: none; }` }),
484
- /* @__PURE__ */ jsxs(
474
+ /* @__PURE__ */ jsx(
485
475
  "div",
486
476
  {
487
477
  style: {
478
+ position: "relative",
488
479
  height: "40px",
489
- minHeight: "40px",
490
- padding: "0 12px",
491
- borderBottom: `1px solid ${theme2.colors.border}`,
492
- backgroundColor: theme2.colors.background,
480
+ padding: "0 16px",
493
481
  display: "flex",
494
- alignItems: "center",
495
- justifyContent: "space-between",
482
+ flexDirection: "column",
483
+ justifyContent: "center",
484
+ borderBottom: `1px solid ${theme2.colors.border}`,
485
+ backgroundColor: theme2.colors.backgroundLight,
496
486
  boxSizing: "border-box"
497
487
  },
498
- children: [
499
- /* @__PURE__ */ jsx(
500
- "div",
501
- {
502
- style: {
503
- display: "flex",
504
- alignItems: "center",
505
- gap: "8px",
506
- color: theme2.colors.textSecondary,
507
- fontFamily: theme2.fonts.heading,
508
- fontSize: theme2.fontSizes[0],
509
- fontWeight: 600,
510
- textTransform: "uppercase"
511
- },
512
- children: "Commit History"
513
- }
514
- ),
515
- /* @__PURE__ */ jsxs(
516
- "button",
517
- {
518
- type: "button",
519
- onClick: handleRefresh,
520
- disabled: isLoading,
521
- style: {
522
- display: "inline-flex",
523
- alignItems: "center",
524
- gap: "6px",
525
- padding: "4px 10px",
526
- borderRadius: "4px",
527
- border: `1px solid ${theme2.colors.border}`,
528
- backgroundColor: theme2.colors.background,
529
- color: theme2.colors.text,
530
- cursor: isLoading ? "default" : "pointer",
531
- fontFamily: theme2.fonts.body,
532
- fontSize: theme2.fontSizes[0],
533
- fontWeight: 500,
534
- opacity: isLoading ? 0.7 : 1
535
- },
536
- children: [
537
- /* @__PURE__ */ jsx(RefreshCcw, { size: 12 }),
538
- isLoading ? "Refreshing..." : "Refresh"
539
- ]
540
- }
541
- )
542
- ]
488
+ children: /* @__PURE__ */ jsxs(
489
+ "div",
490
+ {
491
+ style: {
492
+ display: "flex",
493
+ alignItems: "center",
494
+ justifyContent: "space-between"
495
+ },
496
+ children: [
497
+ /* @__PURE__ */ jsx(
498
+ "span",
499
+ {
500
+ style: {
501
+ fontFamily: theme2.fonts.body,
502
+ fontSize: theme2.fontSizes[1],
503
+ color: theme2.colors.textSecondary,
504
+ fontWeight: 500
505
+ },
506
+ children: "Commit History"
507
+ }
508
+ ),
509
+ /* @__PURE__ */ jsx(
510
+ "button",
511
+ {
512
+ type: "button",
513
+ onClick: handleRefresh,
514
+ disabled: isLoading,
515
+ style: {
516
+ background: "none",
517
+ border: "1px solid transparent",
518
+ borderRadius: "4px",
519
+ cursor: isLoading ? "default" : "pointer",
520
+ padding: "4px",
521
+ display: "flex",
522
+ alignItems: "center",
523
+ justifyContent: "center",
524
+ color: theme2.colors.textSecondary,
525
+ opacity: isLoading ? 0.7 : 1,
526
+ transition: "all 0.2s ease"
527
+ },
528
+ title: isLoading ? "Refreshing..." : "Refresh",
529
+ children: /* @__PURE__ */ jsx(RefreshCcw, { size: 16 })
530
+ }
531
+ )
532
+ ]
533
+ }
534
+ )
543
535
  }
544
536
  ),
545
537
  /* @__PURE__ */ jsxs(
@@ -670,7 +662,7 @@ const CommitCard = ({ commit, theme: theme2, isSelected, onClick }) => {
670
662
  /* @__PURE__ */ jsx("span", { title: new Date(commit.date).toLocaleString(), children: relative }),
671
663
  commit.author && /* @__PURE__ */ jsxs("span", { children: [
672
664
  "by ",
673
- commit.author
665
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: commit.author })
674
666
  ] })
675
667
  ]
676
668
  }
@@ -731,7 +723,7 @@ const GitCommitHistoryPanelPreview = () => {
731
723
  fontFamily: theme2.fonts.body
732
724
  },
733
725
  children: [
734
- /* @__PURE__ */ jsx("span", { children: commit.author }),
726
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: commit.author }),
735
727
  /* @__PURE__ */ jsx("span", { children: "•" }),
736
728
  /* @__PURE__ */ jsx("span", { style: { fontFamily: theme2.fonts.monospace }, children: commit.sha }),
737
729
  /* @__PURE__ */ jsx("span", { children: "•" }),
@@ -45150,8 +45142,8 @@ const GitPullRequestsPanel = ({
45150
45142
  }) => {
45151
45143
  var _a;
45152
45144
  const { theme: theme2 } = useTheme();
45153
- const [filter, setFilter] = useState("open");
45154
45145
  const [selectedPrId, setSelectedPrId] = useState(null);
45146
+ const [showDrafts, setShowDrafts] = useState(false);
45155
45147
  const prSlice = context.getSlice("pullRequests");
45156
45148
  const hasPRs = context.hasSlice("pullRequests");
45157
45149
  const isLoading = context.isSliceLoading("pullRequests");
@@ -45165,25 +45157,19 @@ const GitPullRequestsPanel = ({
45165
45157
  } catch (error) {
45166
45158
  console.error("[GitPullRequestsPanel] Refresh failed:", error);
45167
45159
  }
45168
- }),
45169
- // Tool: set filter
45170
- events.on("git-panels.pull-requests:set-filter", (event) => {
45171
- var _a2;
45172
- const newFilter = (_a2 = event.payload) == null ? void 0 : _a2.filter;
45173
- if (newFilter && ["open", "closed"].includes(newFilter)) {
45174
- setFilter(newFilter);
45175
- }
45176
45160
  })
45177
45161
  ];
45178
45162
  return () => unsubscribers.forEach((unsub) => unsub());
45179
45163
  }, [events, context]);
45180
45164
  const filteredPullRequests = useMemo(() => {
45181
- return pullRequests.filter((pr) => pr.state === filter);
45182
- }, [filter, pullRequests]);
45183
- const counts = useMemo(() => {
45184
- const open = pullRequests.filter((pr) => pr.state === "open").length;
45185
- const closed = pullRequests.filter((pr) => pr.state === "closed").length;
45186
- return { open, closed };
45165
+ return pullRequests.filter((pr) => {
45166
+ if (pr.state !== "open") return false;
45167
+ if (!showDrafts && pr.draft) return false;
45168
+ return true;
45169
+ });
45170
+ }, [pullRequests, showDrafts]);
45171
+ const draftCount = useMemo(() => {
45172
+ return pullRequests.filter((pr) => pr.state === "open" && pr.draft).length;
45187
45173
  }, [pullRequests]);
45188
45174
  const handleRefresh = async () => {
45189
45175
  try {
@@ -45288,111 +45274,100 @@ const GitPullRequestsPanel = ({
45288
45274
  }
45289
45275
  return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
45290
45276
  /* @__PURE__ */ jsx("style", { children: `.hide-scrollbar::-webkit-scrollbar { display: none; }` }),
45291
- /* @__PURE__ */ jsxs(
45277
+ /* @__PURE__ */ jsx(
45292
45278
  "div",
45293
45279
  {
45294
45280
  style: {
45281
+ position: "relative",
45295
45282
  height: "40px",
45296
- minHeight: "40px",
45297
- padding: "0 12px",
45298
- borderBottom: `1px solid ${theme2.colors.border}`,
45299
- backgroundColor: theme2.colors.background,
45283
+ padding: "0 16px",
45300
45284
  display: "flex",
45301
- alignItems: "center",
45302
- justifyContent: "space-between",
45285
+ flexDirection: "column",
45286
+ justifyContent: "center",
45287
+ borderBottom: `1px solid ${theme2.colors.border}`,
45288
+ backgroundColor: theme2.colors.backgroundLight,
45303
45289
  boxSizing: "border-box"
45304
45290
  },
45305
- children: [
45306
- /* @__PURE__ */ jsx(
45307
- "div",
45308
- {
45309
- style: {
45310
- display: "flex",
45311
- alignItems: "center",
45312
- gap: "8px",
45313
- color: theme2.colors.textSecondary,
45314
- fontFamily: theme2.fonts.heading,
45315
- fontSize: theme2.fontSizes[0],
45316
- fontWeight: 600,
45317
- textTransform: "uppercase"
45318
- },
45319
- children: "Pull Requests"
45320
- }
45321
- ),
45322
- /* @__PURE__ */ jsxs(
45323
- "button",
45324
- {
45325
- type: "button",
45326
- onClick: handleRefresh,
45327
- disabled: isLoading,
45328
- style: {
45329
- display: "inline-flex",
45330
- alignItems: "center",
45331
- gap: "6px",
45332
- padding: "4px 10px",
45333
- borderRadius: "4px",
45334
- border: `1px solid ${theme2.colors.border}`,
45335
- backgroundColor: theme2.colors.background,
45336
- color: theme2.colors.text,
45337
- cursor: isLoading ? "default" : "pointer",
45338
- fontFamily: theme2.fonts.body,
45339
- fontSize: theme2.fontSizes[0],
45340
- fontWeight: 500,
45341
- opacity: isLoading ? 0.7 : 1
45342
- },
45343
- children: [
45344
- isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 12, className: "spin" }) : /* @__PURE__ */ jsx(RefreshCcw, { size: 12 }),
45345
- isLoading ? "Refreshing..." : "Refresh"
45346
- ]
45347
- }
45348
- )
45349
- ]
45350
- }
45351
- ),
45352
- /* @__PURE__ */ jsx(
45353
- "div",
45354
- {
45355
- style: {
45356
- display: "flex",
45357
- borderBottom: `1px solid ${theme2.colors.border}`
45358
- },
45359
- children: ["open", "closed"].map((value) => {
45360
- const isActive = filter === value;
45361
- const label = value === "open" ? "Open" : "Closed";
45362
- return /* @__PURE__ */ jsxs(
45363
- "button",
45364
- {
45365
- type: "button",
45366
- onClick: () => setFilter(value),
45367
- style: {
45368
- flex: 1,
45369
- display: "flex",
45370
- alignItems: "center",
45371
- justifyContent: "center",
45372
- gap: "6px",
45373
- padding: "8px 12px",
45374
- border: "none",
45375
- borderBottom: isActive ? `2px solid ${theme2.colors.primary}` : "2px solid transparent",
45376
- backgroundColor: "transparent",
45377
- color: isActive ? theme2.colors.text : theme2.colors.textSecondary,
45378
- fontFamily: theme2.fonts.body,
45379
- fontSize: theme2.fontSizes[1],
45380
- fontWeight: isActive ? 600 : 500,
45381
- cursor: "pointer",
45382
- marginBottom: "-1px"
45383
- },
45384
- children: [
45385
- label,
45386
- /* @__PURE__ */ jsxs("span", { style: { opacity: 0.7 }, children: [
45387
- "(",
45388
- counts[value],
45389
- ")"
45390
- ] })
45391
- ]
45291
+ children: /* @__PURE__ */ jsxs(
45292
+ "div",
45293
+ {
45294
+ style: {
45295
+ display: "flex",
45296
+ alignItems: "center",
45297
+ justifyContent: "space-between"
45392
45298
  },
45393
- value
45394
- );
45395
- })
45299
+ children: [
45300
+ /* @__PURE__ */ jsx(
45301
+ "div",
45302
+ {
45303
+ style: {
45304
+ display: "flex",
45305
+ alignItems: "center",
45306
+ gap: "8px"
45307
+ },
45308
+ children: /* @__PURE__ */ jsx(
45309
+ "span",
45310
+ {
45311
+ style: {
45312
+ fontFamily: theme2.fonts.body,
45313
+ fontSize: theme2.fontSizes[1],
45314
+ color: theme2.colors.textSecondary,
45315
+ fontWeight: 500
45316
+ },
45317
+ children: "Open Pull Requests"
45318
+ }
45319
+ )
45320
+ }
45321
+ ),
45322
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
45323
+ draftCount > 0 && /* @__PURE__ */ jsx(
45324
+ "button",
45325
+ {
45326
+ type: "button",
45327
+ onClick: () => setShowDrafts(!showDrafts),
45328
+ style: {
45329
+ background: showDrafts ? theme2.colors.backgroundSecondary : "none",
45330
+ border: `1px solid ${showDrafts ? theme2.colors.border : "transparent"}`,
45331
+ borderRadius: "4px",
45332
+ cursor: "pointer",
45333
+ padding: "4px 8px",
45334
+ color: showDrafts ? theme2.colors.primary : theme2.colors.textSecondary,
45335
+ fontSize: theme2.fontSizes[0],
45336
+ fontFamily: theme2.fonts.body,
45337
+ fontWeight: 500,
45338
+ transition: "all 0.2s ease"
45339
+ },
45340
+ title: showDrafts ? "Hide draft PRs" : "Show draft PRs",
45341
+ children: "Drafts"
45342
+ }
45343
+ ),
45344
+ /* @__PURE__ */ jsx(
45345
+ "button",
45346
+ {
45347
+ type: "button",
45348
+ onClick: handleRefresh,
45349
+ disabled: isLoading,
45350
+ style: {
45351
+ background: "none",
45352
+ border: "1px solid transparent",
45353
+ borderRadius: "4px",
45354
+ cursor: isLoading ? "default" : "pointer",
45355
+ padding: "4px",
45356
+ display: "flex",
45357
+ alignItems: "center",
45358
+ justifyContent: "center",
45359
+ color: theme2.colors.textSecondary,
45360
+ opacity: isLoading ? 0.7 : 1,
45361
+ transition: "all 0.2s ease"
45362
+ },
45363
+ title: isLoading ? "Refreshing..." : "Refresh",
45364
+ children: isLoading ? /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "spin" }) : /* @__PURE__ */ jsx(RefreshCcw, { size: 16 })
45365
+ }
45366
+ )
45367
+ ] })
45368
+ ]
45369
+ }
45370
+ )
45396
45371
  }
45397
45372
  ),
45398
45373
  /* @__PURE__ */ jsx(
@@ -45418,12 +45393,8 @@ const GitPullRequestsPanel = ({
45418
45393
  },
45419
45394
  children: [
45420
45395
  /* @__PURE__ */ jsx(GitPullRequest, { size: 32, style: { marginBottom: "12px" } }),
45421
- /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.heading, fontSize: theme2.fontSizes[1], fontWeight: 600 }, children: "No pull requests found" }),
45422
- /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px", fontSize: theme2.fontSizes[0] }, children: [
45423
- "There are no ",
45424
- filter,
45425
- " pull requests to display."
45426
- ] })
45396
+ /* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.heading, fontSize: theme2.fontSizes[1], fontWeight: 600 }, children: "No open pull requests" }),
45397
+ /* @__PURE__ */ jsx("div", { style: { marginTop: "4px", fontSize: theme2.fontSizes[0] }, children: draftCount > 0 && !showDrafts ? `There are ${draftCount} draft PR${draftCount === 1 ? "" : "s"} hidden.` : "There are no open pull requests to display." })
45427
45398
  ]
45428
45399
  }
45429
45400
  ) : filteredPullRequests.map((pr) => /* @__PURE__ */ jsx(PullRequestCard, { pr, theme: theme2, isSelected: selectedPrId === pr.id, onClick: () => handlePRClick(pr) }, pr.id))
@@ -45525,23 +45496,9 @@ const PullRequestCard = ({ pr, theme: theme2, isSelected, onClick }) => {
45525
45496
  ),
45526
45497
  /* @__PURE__ */ jsxs("span", { children: [
45527
45498
  "by ",
45528
- ((_a = pr.user) == null ? void 0 : _a.login) ?? "unknown"
45499
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.primary }, children: ((_a = pr.user) == null ? void 0 : _a.login) ?? "unknown" })
45529
45500
  ] }),
45530
- /* @__PURE__ */ jsxs(
45531
- "span",
45532
- {
45533
- style: {
45534
- display: "inline-flex",
45535
- alignItems: "center",
45536
- gap: "4px"
45537
- },
45538
- children: [
45539
- /* @__PURE__ */ jsx(Calendar, { size: 12 }),
45540
- " ",
45541
- formatDate(pr.created_at)
45542
- ]
45543
- }
45544
- ),
45501
+ /* @__PURE__ */ jsx("span", { children: formatDate(pr.created_at) }),
45545
45502
  !isOpen && /* @__PURE__ */ jsxs(
45546
45503
  "span",
45547
45504
  {
@@ -46127,36 +46084,8 @@ const refreshPullRequestsTool = {
46127
46084
  event_type: "git-panels.pull-requests:refresh"
46128
46085
  }
46129
46086
  };
46130
- const setPRFilterTool = {
46131
- name: "set_pr_filter",
46132
- description: "Sets the pull request filter (all, open, or closed)",
46133
- inputs: {
46134
- type: "object",
46135
- properties: {
46136
- filter: {
46137
- type: "string",
46138
- enum: ["all", "open", "closed"],
46139
- description: "Filter to apply to pull requests"
46140
- }
46141
- },
46142
- required: ["filter"]
46143
- },
46144
- outputs: {
46145
- type: "object",
46146
- properties: {
46147
- success: { type: "boolean" },
46148
- filter: { type: "string" }
46149
- }
46150
- },
46151
- tags: ["git", "pull-requests", "filter"],
46152
- tool_call_template: {
46153
- call_template_type: "panel_event",
46154
- event_type: "git-panels.pull-requests:set-filter"
46155
- }
46156
- };
46157
46087
  const pullRequestsTools = [
46158
- refreshPullRequestsTool,
46159
- setPRFilterTool
46088
+ refreshPullRequestsTool
46160
46089
  ];
46161
46090
  const pullRequestsToolsMetadata = {
46162
46091
  id: "git-panels.pull-requests",
@@ -46379,7 +46308,6 @@ export {
46379
46308
  refreshPullRequestsTool,
46380
46309
  selectCommitTool,
46381
46310
  selectPullRequestTool,
46382
- setCommitLimitTool,
46383
- setPRFilterTool
46311
+ setCommitLimitTool
46384
46312
  };
46385
46313
  //# sourceMappingURL=panels.bundle.js.map