| ... | @@ -42,6 +42,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router"; | ... | @@ -42,6 +42,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router"; |
| 42 | import * as Option from "effect/Option"; | 42 | import * as Option from "effect/Option"; |
| 43 | import { | 43 | import { |
| 44 | ArrowLeftIcon, | 44 | ArrowLeftIcon, |
| | 45 | ChartNoAxesColumnIcon, |
| 45 | CornerLeftUpIcon, | 46 | CornerLeftUpIcon, |
| 46 | FileSearchIcon, | 47 | FileSearchIcon, |
| 47 | FolderIcon, | 48 | FolderIcon, |
| ... | @@ -193,6 +194,7 @@ import { | ... | @@ -193,6 +194,7 @@ import { |
| 193 | } from "../sidebarProjectGrouping"; | 194 | } from "../sidebarProjectGrouping"; |
| 194 | import type { Project } from "../types"; | 195 | import type { Project } from "../types"; |
| 195 | import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons"; | 196 | import { PullRequestGlyph } from "~/components/pullRequest/pullRequestIcons"; |
| | 197 | import { readPullRequestListPreferences } from "~/components/pullRequest/pullRequestListPreferences"; |
| 196 | | 198 | |
| 197 | const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = []; | 199 | const EMPTY_BROWSE_ENTRIES: FilesystemBrowseResult["entries"] = []; |
| 198 | | 200 | |
| ... | @@ -1999,6 +2001,34 @@ function OpenCommandPaletteDialog(props: { | ... | @@ -1999,6 +2001,34 @@ function OpenCommandPaletteDialog(props: { |
| 1999 | }, | 2001 | }, |
| 2000 | }); | 2002 | }); |
| 2001 | | 2003 | |
| | 2004 | if ( |
| | 2005 | environments.some( |
| | 2006 | (environment) => environment.serverConfig?.environment.capabilities.pullRequests === true, |
| | 2007 | ) |
| | 2008 | ) { |
| | 2009 | actionItems.push({ |
| | 2010 | kind: "action", |
| | 2011 | value: "action:pull-requests", |
| | 2012 | searchTerms: ["pull requests", "prs", "pr", "github", "review", "merge", "branch"], |
| | 2013 | title: "Open pull requests", |
| | 2014 | icon: <PullRequestGlyph.pullRequest className={ITEM_ICON_CLASS} />, |
| | 2015 | run: async () => { |
| | 2016 | await navigate({ to: "/pull-requests", search: readPullRequestListPreferences() }); |
| | 2017 | }, |
| | 2018 | }); |
| | 2019 | } |
| | 2020 | |
| | 2021 | actionItems.push({ |
| | 2022 | kind: "action", |
| | 2023 | value: "action:usage", |
| | 2024 | searchTerms: ["usage", "use", "tokens", "cost", "spend", "limits", "stats", "analytics"], |
| | 2025 | title: "Open usage", |
| | 2026 | icon: <ChartNoAxesColumnIcon className={ITEM_ICON_CLASS} />, |
| | 2027 | run: async () => { |
| | 2028 | await navigate({ to: "/usage" }); |
| | 2029 | }, |
| | 2030 | }); |
| | 2031 | |
| 2002 | actionItems.push({ | 2032 | actionItems.push({ |
| 2003 | kind: "action", | 2033 | kind: "action", |
| 2004 | value: "action:settings", | 2034 | value: "action:settings", |