Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
`[${languageId}]: language configuration: expected \`comments\` to be an object.`
)
;
return
undefined
;
}
let
:
|
undefined
=
undefined
;
if
(
typeof
.
!==
'undefined'
)
{
if
(
typeof
.
===
'string'
)
{
=
||
{
}
;
.
=
.
;
}
else
if
(
.
isObject
(
.
)
)
{
const
=
.
;
if
(
typeof
.
===
'string'
)
{
=
||
{
}
;
.
=
{
:
.
,
:
.
}
;
}
else
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`comments.lineComment.comment\` to be a string.`
)
;
}
}
else
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`comments.lineComment\` to be a string or an object with comment property.`
)
;
}
}
if
(
typeof
.
!==
'undefined'
)
{
if
(
!
isCharacterPair
(
.
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`
)
;
}
else
{
=
||
{
}
;
.
=
.
;
}
}
return
;
}
private
static
_extractValidBrackets
(
:
string
,
:
)
:
[
]
|
undefined
{
const
=
.
;
if
(
typeof
===
'undefined'
)
{
return
undefined
;
}
if
(
!
Array
.
isArray
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`brackets\` to be an array.`
)
;
return
undefined
;
}
let
:
[
]
|
undefined
=
undefined
;
for
(
let
=
0
,
=
.
;
<
;
++
)
{
const
=
[
]
;
if
(
!
isCharacterPair
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`brackets[${i}]\` to be an array of two strings.`
)
;
continue
;
}
=
||
[
]
;
.
push
(
)
;
}
return
;
}
private
static
_extractValidAutoClosingPairs
(
:
string
,
:
)
:
[
]
|
undefined
{
const
=
.
;
if
(
typeof
===
'undefined'
)
{
return
undefined
;
}
if
(
!
Array
.
isArray
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`autoClosingPairs\` to be an array.`
)
;
return
undefined
;
}
let
:
[
]
|
undefined
=
undefined
;
for
(
let
=
0
,
=
.
;
<
;
++
)
{
const
=
[
]
;
if
(
Array
.
isArray
(
)
)
{
if
(
!
isCharacterPair
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}]\` to be an array of two strings or an object.`
)
;
continue
;
}
=
||
[
]
;
.
push
(
{
:
[
0
]
,
:
[
1
]
}
)
;
}
else
{
if
(
!
.
isObject
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}]\` to be an array of two strings or an object.`
)
;
continue
;
}
if
(
typeof
.
!==
'string'
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}].open\` to be a string.`
)
;
continue
;
}
if
(
typeof
.
!==
'string'
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}].close\` to be a string.`
)
;
continue
;
}
if
(
typeof
.
!==
'undefined'
)
{
if
(
!
isStringArr
(
.
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}].notIn\` to be a string array.`
)
;
continue
;
}
}
=
||
[
]
;
.
push
(
{
:
.
,
:
.
,
:
.
}
)
;
}
}
return
;
}
private
static
_extractValidSurroundingPairs
(
:
string
,
:
)
:
[
]
|
undefined
{
const
=
.
;
if
(
typeof
===
'undefined'
)
{
return
undefined
;
}
if
(
!
Array
.
isArray
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`surroundingPairs\` to be an array.`
)
;
return
undefined
;
}
let
:
[
]
|
undefined
=
undefined
;
for
(
let
=
0
,
=
.
;
<
;
++
)
{
const
=
[
]
;
if
(
Array
.
isArray
(
)
)
{
if
(
!
isCharacterPair
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`surroundingPairs[${i}]\` to be an array of two strings or an object.`
)
;
continue
;
}
=
||
[
]
;
.
push
(
{
:
[
0
]
,
:
[
1
]
}
)
;
}
else
{
if
(
!
.
isObject
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`surroundingPairs[${i}]\` to be an array of two strings or an object.`
)
;
continue
;
}
if
(
typeof
.
!==
'string'
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`surroundingPairs[${i}].open\` to be a string.`
)
;
continue
;
}
if
(
typeof
.
!==
'string'
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`surroundingPairs[${i}].close\` to be a string.`
)
;
continue
;
}
=
||
[
]
;
.
push
(
{
:
.
,
:
.
}
)
;
}
}
return
;
}
private
static
_extractValidColorizedBracketPairs
(
:
string
,
:
)
:
[
]
|
undefined
{
const
=
.
;
if
(
typeof
===
'undefined'
)
{
return
undefined
;
}
if
(
!
Array
.
isArray
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`
)
;
return
undefined
;
}
const
:
[
]
=
[
]
;
for
(
let
=
0
,
=
.
;
<
;
++
)
{
const
=
[
]
;
if
(
!
isCharacterPair
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`colorizedBracketPairs[${i}]\` to be an array of two strings.`
)
;
continue
;
}
.
push
(
[
[
0
]
,
[
1
]
]
)
;
}
return
;
}
private
static
_extractValidOnEnterRules
(
:
string
,
:
)
:
[
]
|
undefined
{
const
=
.
;
if
(
typeof
===
'undefined'
)
{
return
undefined
;
}
if
(
!
Array
.
isArray
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`onEnterRules\` to be an array.`
)
;
return
undefined
;
}
let
:
[
]
|
undefined
=
undefined
;
for
(
let
=
0
,
=
.
;
<
;
++
)
{
const
=
[
]
;
if
(
!
.
isObject
(
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`onEnterRules[${i}]\` to be an object.`
)
;
continue
;
}
if
(
!
.
isObject
(
.
)
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action\` to be an object.`
)
;
continue
;
}
let
:
;
if
(
.
.
===
'none'
)
{
=
.
;
}
else
if
(
.
.
===
'indent'
)
{
=
.
;
}
else
if
(
.
.
===
'indentOutdent'
)
{
=
.
;
}
else
if
(
.
.
===
'outdent'
)
{
=
.
;
}
else
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`
)
;
continue
;
}
const
:
=
{
}
;
if
(
.
.
)
{
if
(
typeof
.
.
===
'string'
)
{
.
=
.
.
;
}
else
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action.appendText\` to be undefined or a string.`
)
;
}
}
if
(
.
.
)
{
if
(
typeof
.
.
===
'number'
)
{
.
=
.
.
;
}
else
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action.removeText\` to be undefined or a number.`
)
;
}
}
const
=
this
.
_parseRegex
(
,
`onEnterRules[${i}].beforeText`
,
.
)
;
if
(
!
)
{
continue
;
}
const
:
=
{
,
}
;
if
(
.
)
{
const
=
this
.
_parseRegex
(
,
`onEnterRules[${i}].afterText`
,
.
)
;
if
(
)
{
.
=
;
}
}
if
(
.
)
{
const
=
this
.
_parseRegex
(
,
`onEnterRules[${i}].previousLineText`
,
.
)
;
if
(
)
{
.
=
;
}
}
=
||
[
]
;
.
push
(
)
;
}
return
;
}
public
static
extractValidConfig
(
:
string
,
:
)
:
{
const
=
this
.
_extractValidCommentRule
(
,
)
;
const
=
this
.
_extractValidBrackets
(
,
)
;
const
=
this
.
_extractValidAutoClosingPairs
(
,
)
;
const
=
this
.
_extractValidSurroundingPairs
(
,
)
;
const
=
this
.
_extractValidColorizedBracketPairs
(
,
)
;
const
=
(
typeof
.
===
'string'
?
.
:
undefined
)
;
const
=
(
.
?
this
.
_parseRegex
(
,
`wordPattern`
,
.
)
:
undefined
)
;
const
=
(
.
?
this
.
_mapIndentationRules
(
,
.
)
:
undefined
)
;
let
:
|
undefined
=
undefined
;
if
(
.
)
{
const
=
.
.
;
const
=
(
&&
.
?
this
.
_parseRegex
(
,
`folding.markers.start`
,
.
)
:
undefined
)
;
const
=
(
&&
.
?
this
.
_parseRegex
(
,
`folding.markers.end`
,
.
)
:
undefined
)
;
const
:
|
undefined
=
(
&&
?
{
:
,
:
}
:
undefined
)
;
=
{
:
.
.
,
}
;
}
const
=
this
.
_extractValidOnEnterRules
(
,
)
;
const
:
=
{
,
,
,
,
,
,
,
,
,
,
:
undefined
,
}
;
return
;
}
private
_handleConfig
(
:
string
,
:
)
:
void
{
const
=
.
extractValidConfig
(
,
)
;
this
.
.
register
(
,
,
50
)
;
}
private
static
_parseRegex
(
:
string
,
:
string
,
:
string
|
)
:
|
undefined
{
if
(
typeof
===
'string'
)
{
try
{
return
new
RegExp
(
,
''
)
;
}
catch
(
)
{
console
.
warn
(
`[${languageId}]: Invalid regular expression in \`${confPath}\`: `
,
)
;
return
undefined
;
}
}
if
(
.
isObject
(
)
)
{
if
(
typeof
.
!==
'string'
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`${confPath}.pattern\` to be a string.`
)
;
return
undefined
;
}
if
(
typeof
.
!==
'undefined'
&&
typeof
.
!==
'string'
)
{
console
.
warn
(
`[${languageId}]: language configuration: expected \`${confPath}.flags\` to be a string.`
)
;
return
undefined
;
}
try
{
return
new
RegExp
(
.
,
.
)
;
}
catch
(
)
{
console
.
warn
(
`[${languageId}]: Invalid regular expression in \`${confPath}\`: `
,
)
;
return
undefined
;
}
}
console
.
warn
(
`[${languageId}]: language configuration: expected \`${confPath}\` to be a string or an object.`
)
;
return
undefined
;
}
private
static
_mapIndentationRules
(
:
string
,
:
)
:
|
undefined
{
const
=
this
.
_parseRegex
(
,
`indentationRules.increaseIndentPattern`
,
.
)
;
if
(
!
)
{
return
undefined
;
}
const
=
this
.
_parseRegex
(
,
`indentationRules.decreaseIndentPattern`
,
.
)
;
if
(
!
)
{
return
undefined
;
}
const
:
=
{
:
,
:
}
;
if
(
.
)
{
.
=
this
.
_parseRegex
(
,
`indentationRules.indentNextLinePattern`
,
.
)
;
}
if
(
.
)
{
.
=
this
.
_parseRegex
(
,
`indentationRules.unIndentedLinePattern`
,
.
)
;
}
return
;
}
}
const
=
'vscode://schemas/language-configuration'
;
const
:
=
{
:
true
,
:
true
,
default
:
{
:
{
:
[
'/*'
,
'*/'
]
,
:
'//'
}
,
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
,
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
,
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
}
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.openBracket'
,
'The opening bracket character or string sequence.'
)
}
,
:
{
:
'string'
,
:
.
localize
(
'schema.closeBracket'
,
'The closing bracket character or string sequence.'
)
}
,
:
{
:
'array'
,
:
[
{
:
'#/definitions/openBracket'
}
,
{
:
'#/definitions/closeBracket'
}
]
}
}
,
:
{
:
{
default
:
{
:
[
'/*'
,
'*/'
]
,
:
{
:
'//'
,
:
false
}
}
,
:
.
localize
(
'schema.comments'
,
'Defines the comment symbols'
)
,
:
'object'
,
:
{
:
{
:
'array'
,
:
.
localize
(
'schema.blockComments'
,
'Defines how block comments are marked.'
)
,
:
[
{
:
'string'
,
:
.
localize
(
'schema.blockComment.begin'
,
'The character sequence that starts a block comment.'
)
}
,
{
:
'string'
,
:
.
localize
(
'schema.blockComment.end'
,
'The character sequence that ends a block comment.'
)
}
]
}
,
:
{
:
'object'
,
:
.
localize
(
'schema.lineComment.object'
,
'Configuration for line comments.'
)
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.lineComment.comment'
,
'The character sequence that starts a line comment.'
)
}
,
:
{
:
'boolean'
,
:
.
localize
(
'schema.lineComment.noIndent'
,
'Whether the comment token should not be indented and placed at the first column. Defaults to false.'
)
,
default
:
false
}
}
,
:
[
'comment'
]
,
:
false
}
}
}
,
:
{
default
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
,
:
.
localize
(
'schema.brackets'
,
'Defines the bracket symbols that increase or decrease the indentation. When bracket pair colorization is enabled and {0} is not defined, this also defines the bracket pairs that are colorized by their nesting level.'
,
'\`colorizedBracketPairs\`'
)
,
:
'array'
,
:
{
:
'#/definitions/bracketPair'
}
}
,
:
{
default
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
,
:
.
localize
(
'schema.colorizedBracketPairs'
,
'Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled. Any brackets included here that are not included in {0} will be automatically included in {0}.'
,
'\`brackets\`'
)
,
:
'array'
,
:
{
:
'#/definitions/bracketPair'
}
}
,
:
{
default
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
,
:
.
localize
(
'schema.autoClosingPairs'
,
'Defines the bracket pairs. When a opening bracket is entered, the closing bracket is inserted automatically.'
)
,
:
'array'
,
:
{
:
[
{
:
'#/definitions/bracketPair'
}
,
{
:
'object'
,
:
{
:
{
:
'#/definitions/openBracket'
}
,
:
{
:
'#/definitions/closeBracket'
}
,
:
{
:
'array'
,
:
.
localize
(
'schema.autoClosingPairs.notIn'
,
'Defines a list of scopes where the auto pairs are disabled.'
)
,
:
{
enum
:
[
'string'
,
'comment'
]
}
}
}
}
]
}
}
,
:
{
default
:
';:.,=}])> \n\t'
,
:
.
localize
(
'schema.autoCloseBefore'
,
'Defines what characters must be after the cursor in order for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting. This is typically the set of characters which can not start an expression.'
)
,
:
'string'
,
}
,
:
{
default
:
[
[
'('
,
')'
]
,
[
'['
,
']'
]
,
[
'{'
,
'}'
]
]
,
:
.
localize
(
'schema.surroundingPairs'
,
'Defines the bracket pairs that can be used to surround a selected string.'
)
,
:
'array'
,
:
{
:
[
{
:
'#/definitions/bracketPair'
}
,
{
:
'object'
,
:
{
:
{
:
'#/definitions/openBracket'
}
,
:
{
:
'#/definitions/closeBracket'
}
}
}
]
}
}
,
:
{
default
:
''
,
:
.
localize
(
'schema.wordPattern'
,
'Defines what is considered to be a word in the programming language.'
)
,
:
[
'string'
,
'object'
]
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.wordPattern.pattern'
,
'The RegExp pattern used to match words.'
)
,
default
:
''
,
}
,
:
{
:
'string'
,
:
.
localize
(
'schema.wordPattern.flags'
,
'The RegExp flags used to match words.'
)
,
default
:
'g'
,
:
'^([gimuy]+)$'
,
:
.
localize
(
'schema.wordPattern.flags.errorMessage'
,
'Must match the pattern `/^([gimuy]+)$/`.'
)
}
}
}
,
:
{
default
:
{
:
''
,
:
''
}
,
:
.
localize
(
'schema.indentationRules'
,
'The language\'s indentation settings.'
)
,
:
'object'
,
:
{
:
{
:
[
'string'
,
'object'
]
,
:
.
localize
(
'schema.indentationRules.increaseIndentPattern'
,
'If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).'
'A language adheres to the off-side rule if blocks in that language are expressed by their indentation. If set, empty lines belong to the subsequent block.'
)
,
}
,
:
{
:
'object'
,
:
.
localize
(
'schema.folding.markers'
,
'Language specific folding markers such as \'#region\' and \'#endregion\'. The start and end regexes will be tested against the contents of all lines and must be designed efficiently'
)
,
:
{
:
{
:
[
'string'
,
'object'
]
,
:
.
localize
(
'schema.folding.markers.start'
,
'The RegExp pattern for the start marker. The regexp must start with \'^\'.'
)
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.folding.markers.start.pattern'
,
'The RegExp pattern for the start marker.'
)
,
default
:
''
,
}
,
:
{
:
'string'
,
:
.
localize
(
'schema.folding.markers.start.flags'
,
'The RegExp flags for the start marker.'
)
,
default
:
''
,
:
'^([gimuy]+)$'
,
:
.
localize
(
'schema.folding.markers.start.errorMessage'
,
'Must match the pattern `/^([gimuy]+)$/`.'
)
}
}
}
,
:
{
:
[
'string'
,
'object'
]
,
:
.
localize
(
'schema.folding.markers.end'
,
'The RegExp pattern for the end marker. The regexp must start with \'^\'.'
)
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.folding.markers.end.pattern'
,
'The RegExp pattern for the end marker.'
)
,
default
:
''
,
}
,
:
{
:
'string'
,
:
.
localize
(
'schema.folding.markers.end.flags'
,
'The RegExp flags for the end marker.'
)
,
default
:
''
,
:
'^([gimuy]+)$'
,
:
.
localize
(
'schema.folding.markers.end.errorMessage'
,
'Must match the pattern `/^([gimuy]+)$/`.'
)
}
}
}
,
}
}
}
}
,
:
{
:
'array'
,
:
.
localize
(
'schema.onEnterRules'
,
'The language\'s rules to be evaluated when pressing Enter.'
)
,
:
{
:
'object'
,
:
.
localize
(
'schema.onEnterRules'
,
'The language\'s rules to be evaluated when pressing Enter.'
)
,
:
[
'beforeText'
,
'action'
]
,
:
{
:
{
:
[
'string'
,
'object'
]
,
:
.
localize
(
'schema.onEnterRules.beforeText'
,
'This rule will only execute if the text before the cursor matches this regular expression.'
)
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.onEnterRules.beforeText.pattern'
,
'The RegExp pattern for beforeText.'
)
,
default
:
''
,
}
,
:
{
:
'string'
,
:
.
localize
(
'schema.onEnterRules.beforeText.flags'
,
'The RegExp flags for beforeText.'
)
,
default
:
''
,
:
'^([gimuy]+)$'
,
:
.
localize
(
'schema.onEnterRules.beforeText.errorMessage'
,
'Must match the pattern `/^([gimuy]+)$/`.'
)
}
}
}
,
:
{
:
[
'string'
,
'object'
]
,
:
.
localize
(
'schema.onEnterRules.afterText'
,
'This rule will only execute if the text after the cursor matches this regular expression.'
)
,
:
{
:
{
:
'string'
,
:
.
localize
(
'schema.onEnterRules.afterText.pattern'
,
'The RegExp pattern for afterText.'
)
,
default
:
''
,
}
,
:
{
:
'string'
,
:
.
localize
(
'schema.onEnterRules.afterText.flags'
,
'The RegExp flags for afterText.'
)
,
default
:
''
,
:
'^([gimuy]+)$'
,
:
.
localize
(
'schema.onEnterRules.afterText.errorMessage'
,
'Must match the pattern `/^([gimuy]+)$/`.'
)
}
}
}
,
:
{
:
[
'string'
,
'object'
]
,
:
.
localize
(
'schema.onEnterRules.previousLineText'
,
'This rule will only execute if the text above the line matches this regular expression.'