Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* We can resolve the NLS configuration early if it is defined
* in argv.json before `app.ready` event. Otherwise we can only
* resolve NLS after `app.ready` event to resolve the OS locale.
*/
let
:
Promise
<
>
|
undefined
=
undefined
;
// Use the most preferred OS language for language recommendation.
// The API might return an empty array on Linux, such as when
// the 'C' locale is the user's only configured locale.
// No matter the OS, if the array is empty, default back to 'en'.
const
=
processZhLocale
(
(
.
getPreferredSystemLanguages
(
)
?.
[
0
]
??
'en'
)
.
toLowerCase
(
)
)
;
const
=
getUserDefinedLocale
(
)
;
if
(
)
{
=
resolveNLSConfiguration
(
{
,
,
:
.
,
,
:
import
.
.
}
)
;
}
// Pass in the locale to Electron so that the
// Windows Control Overlay is rendered correctly on Windows.
// For now, don't pass in the locale on macOS due to
// `GlobalShortcutsPortal` - Enables Electron's `globalShortcut` (system-wide keybindings) on Linux Wayland via the XDG global shortcuts portal (no-op elsewhere)
// `FontMatchingCTMigration` - Siwtch font matching on macOS to Appkit (Refs https://github.com/microsoft/vscode/issues/224496#issuecomment-2270418470).
// `StandardizedBrowserZoom` - Disable zoom adjustment for bounding box (https://github.com/microsoft/vscode/issues/232750#issuecomment-2459495394)
// Send the id for child node process that are explicitly starting crash reporter.
// For vscode this is ExtensionHost process currently.
const
=
.
;
const
=
.
indexOf
(
'--'
)
;
if
(
===
-
1
)
{
.
push
(
'--crash-reporter-id'
,
)
;
}
else
{
// if the we have an argument "--" (end of argument marker)
// we cannot add arguments at the end. rather, we add
// arguments before the "--" marker.
.
splice
(
,
0
,
'--crash-reporter-id'
,
)
;
}
}
}
}
// Start crash reporter for all processes
const
=
(
.
?
.
.
:
undefined
)
||
.
;
const
=
(
.
?
.
.
:
undefined
)
||
'Microsoft'
;
const
=
Boolean
(
!
.
[
'VSCODE_DEV'
]
&&
&&
!
)
;
.
start
(
{
,
:
.
[
'VSCODE_DEV'
]
?
`${productName} Dev`
:
,
,
,
:
true
,
:
true
}
)
;
}
function
getJSFlags
(
:
,
:
)
:
string
|
null
{
const
:
string
[
]
=
[
]
;
// Add any existing JS flags we already got from the command line
if
(
[
'js-flags'
]
)
{
.
push
(
[
'js-flags'
]
)
;
}
// Add JS flags from runtime arguments (argv.json)
if
(
typeof
[
'js-flags'
]
===
'string'
&&
[
'js-flags'
]
)
{
.
push
(
[
'js-flags'
]
)
;
}
return
.
>
0
?
.
join
(
' '
)
:
null
;
}
function
parseCLIArgs
(
)
:
{
return
minimist
(
.
,
{
string
:
[
'user-data-dir'
,
'locale'
,
'js-flags'
,
'crash-reporter-directory'
]
,
boolean
:
[
'disable-chromium-sandbox'
,
]
,
default
:
{
'sandbox'
:
true
}
,
:
{
'no-sandbox'
:
'sandbox'
}
}
)
;
}
function
registerListeners
(
)
:
void
{
/**
* macOS: when someone drops a file to the not-yet running VSCode, the open-file event fires even before
* the app-ready event. We listen very early for open-file and remember this upon startup as path to open.
*/
const
:
string
[
]
=
[
]
;
(
as
{
?
:
string
[
]
}
)
.
=
;
.
on
(
'open-file'
,
function
(
,
)
{
.
push
(
)
;
}
)
;
/**
* macOS: react to open-url requests.
*/
const
:
string
[
]
=
[
]
;
const
onOpenUrl
=
function
(
:
{
preventDefault
:
(
)
=>
void
}
,
:
string
)
{
.
preventDefault
(
)
;
.
push
(
)
;
}
;
.
on
(
'will-finish-launching'
,
function
(
)
{
.
on
(
'open-url'
,
)
;
}
)
;
(
as
{
?
:
(
)
=>
string
[
]
}
)
.
getOpenUrls
=
function
(
)
{
.
removeListener
(
'open-url'
,
)
;
return
;
}
;
}
function
getCodeCachePath
(
)
:
string
|
undefined
{
// explicitly disabled via CLI args
if
(
.
.
indexOf
(
'--no-cached-data'
)
>
0
)
{
return
undefined
;
}
// running out of sources
if
(
.
[
'VSCODE_DEV'
]
)
{
return
undefined
;
}
// require commit id
const
=
.
;
if
(
!
)
{
return
undefined
;
}
return
.
join
(
,
'CachedData'
,
)
;
}
async
function
mkdirpIgnoreError
(
:
string
|
undefined
)
:
Promise
<
string
|
undefined
>
{
if
(
typeof
===
'string'
)
{
try
{
await
.
.
mkdir
(
,
{
:
true
}
)
;
return
;
}
catch
(
)
{
// ignore
}
}
return
undefined
;
}
//#region NLS Support
function
processZhLocale
(
:
string
)
:
string
{
if
(
.
startsWith
(
'zh'
)
)
{
const
=
.
split
(
'-'
)
[
1
]
;
// On Windows and macOS, Chinese languages returned by
// app.getPreferredSystemLanguages() start with zh-hans
// for Simplified Chinese or zh-hant for Traditional Chinese,
// so we can easily determine whether to use Simplified or Traditional.
// However, on Linux, Chinese languages returned by that same API
// are of the form zh-XY, where XY is a country code.
// For China (CN), Singapore (SG), and Malaysia (MY)
// country codes, assume they use Simplified Chinese.
// For other cases, assume they use Traditional.
if
(
[
'hans'
,
'cn'
,
'sg'
,
'my'
]
.
includes
(
)
)
{
return
'zh-cn'
;
}
return
'zh-tw'
;
}
return
;
}
/**
* Resolve the NLS configuration
*/
async
function
resolveNlsConfiguration
(
)
:
Promise
<
>
{
// First, we need to test a user defined locale.
// If it fails we try the app locale.
// If that fails we fall back to English.
const
=
?
await
:
undefined
;
if
(
)
{
return
;
}
// Try to use the app locale which is only valid
// after the app ready event has been fired.
let
=
.
getLocale
(
)
||
'ru'
;
/* Aura IDE: локаль по умолчанию — русская (argv.json locale всё ещё побеждает, см. getUserDefinedLocale) */
if
(
!
)
{
return
{
:
'en'
,
,
:
'en'
,
:
.
join
(
import
.
.
,
'nls.messages.json'
)
,
// NLS: below 2 are a relic from old times only used by vscode-nls and deprecated
:
'en'
,
:
{
}
}
;
}
// See above the comment about the loader and case sensitiveness
=
processZhLocale
(
.
toLowerCase
(
)
)
;
return
resolveNLSConfiguration
(
{
,
,
:
.
,
,
:
import
.
.
}
)
;
}
/**
* Language tags are case insensitive however an ESM loader is case sensitive
* To make this work on case preserving & insensitive FS we do the following:
* the language bundles have lower case language tags and we always lower case
* the locale we receive from the user or OS.
*/