MCPcopy Create free account
hub / github.com/continuedev/continue / getPlatform

Function getPlatform

gui/src/util/index.ts:7–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5export type Platform = "mac" | "linux" | "windows" | "unknown";
6
7export function getPlatform(): Platform {
8 const platform = window.navigator.platform.toUpperCase();
9 if (platform.indexOf("MAC") >= 0) {
10 return "mac";
11 } else if (platform.indexOf("LINUX") >= 0) {
12 return "linux";
13 } else if (platform.indexOf("WIN") >= 0) {
14 return "windows";
15 } else {
16 return "unknown";
17 }
18}
19
20export function isMetaEquivalentKeyPressed({
21 metaKey,

Callers 8

OSRContextMenuFunction · 0.90
ShortcutFunction · 0.90
HistoryFunction · 0.90
getMetaKeyLabelFunction · 0.70
getAltKeyLabelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected