Skip to content

Commit bdb65c1

Browse files
committed
Merge remote-tracking branch 'upstream/main'
# Conflicts: # apps/web/src/components/CommandPalette.tsx
2 parents dbb4587 + c0dded8 commit bdb65c1

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

apps/web/src/components/CommandPalette.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import {
4545
CrosshairIcon,
4646
ArrowLeftIcon,
4747
BlocksIcon,
48+
ChartNoAxesColumnIcon,
4849
CloudUploadIcon,
4950
CornerLeftUpIcon,
5051
FileSearchIcon,
@@ -248,6 +249,7 @@ import {
248249
} from "../sidebarProjectGrouping";
249250
import type { Project } from "../types";
250251
import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons";
252+
import { readPullRequestListPreferences } from "~/components/pullRequest/pullRequestListPreferences";
251253

252254
const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = [];
253255

@@ -2266,6 +2268,34 @@ function OpenCommandPaletteDialog(props: {
22662268
},
22672269
});
22682270

2271+
if (
2272+
environments.some(
2273+
(environment) => environment.serverConfig?.environment.capabilities.pullRequests === true,
2274+
)
2275+
) {
2276+
actionItems.push({
2277+
kind: "action",
2278+
value: "action:pull-requests",
2279+
searchTerms: ["pull requests", "prs", "pr", "github", "review", "merge", "branch"],
2280+
title: "Open pull requests",
2281+
icon: <PullRequestGlyph.pullRequest className={ITEM_ICON_CLASS} />,
2282+
run: async () => {
2283+
await navigate({ to: "/pull-requests", search: readPullRequestListPreferences() });
2284+
},
2285+
});
2286+
}
2287+
2288+
actionItems.push({
2289+
kind: "action",
2290+
value: "action:usage",
2291+
searchTerms: ["usage", "use", "tokens", "cost", "spend", "limits", "stats", "analytics"],
2292+
title: "Open usage",
2293+
icon: <ChartNoAxesColumnIcon className={ITEM_ICON_CLASS} />,
2294+
run: async () => {
2295+
await navigate({ to: "/usage" });
2296+
},
2297+
});
2298+
22692299
actionItems.push({
22702300
kind: "action",
22712301
value: "action:plugins",

0 commit comments

Comments
 (0)