Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/** The copilot query is equal to title + message. */
:
string
;
/** If true, replace the diagnostic provider's message with this message. */
?
:
string
;
/** If true, display definition */
?
:
;
}
;
export
class
FixCookbookService
implements
IFixCookbookService
{
readonly
:
undefined
;
constructor
(
@ITelemetryService
private
readonly
:
)
{
// Always enable the Ruff cookbook by default
.
=
;
}
getCookbook
(
:
string
,
:
)
:
{
const
=
typeof
.
===
'object'
?
.
.
:
.
;
const
=
this
.
_getManualSuggestedFixes
(
,
.
as
|
undefined
,
)
;
return
{
,
messageReplacement
(
)
{
for
(
const
of
)
{
if
(
.
!==
undefined
)
{
return
.
;
}
}
return
undefined
;
}
,
additionalContext
(
)
{
const
:
[
]
=
[
]
;
for
(
const
of
)
{
if
(
.
!==
undefined
)
{
.
push
(
.
)
;
}
}
return
;
}
}
;
}
private
_getManualSuggestedFixes
(
:
string
,
:
|
undefined
,
:
string
|
number
|
undefined
)
:
[
]
{
if
(
!
||
===
undefined
)
{
return
[
]
;
}
const
=
[
]
;
if
(
!
)
{
return
[
]
;
}
const
=
[
]
;
if
(
!
)
{
return
[
]
;
}
// send telemetry
/* __GDPR__
"cookbook.accessed" : {
"owner": "luabud",
"comment": "Reports when a cookbook entry is accessed for a diagnostic.",
"languageID": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The current file language." },
"diagnosticCode": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The diagnostic code accessed in the cookbook." },
"provider": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The tool which is the diagnostic provider." }
}
*/
this
.
.
sendMSFTTelemetryEvent
(
'cookbook.accessed'
,
{
,
:
.
toString
(
)
,
}
)
;
// Ensure result is always an array of ManualSuggestedFix
const
=
Array
.
isArray
(
)
?
:
[
]
;
return
.
map
(
=>
typeof
===
'string'
?
{
:
,
:
''
}
:
)
;
}
}
export
interface
Cookbook
{
messageReplacement
(
)
:
string
|
undefined
;
additionalContext
(
)
:
[
]
;
readonly
:
readonly
[
]
;
}
/** add diagnostic providers here as needed */
type
Provider
=
'eslint'
|
'ts'
|
'pylint'
|
'Pylint'
|
'Ruff'
;
type
Prompt
=
string
|
|
(
string
|
)
[
]
;
type
CookbookInternal
=
<
,
<
string
,
>>
;
const
:
=
{
'Ruff'
:
{
}
,
// default to empty during experimentation
'pylint'
:
{
'C0301'
:
[
'Split into many short lines to make sure each line is less than 20 tokens; split into many more lines than you normally would. Make sure to do the following: You must split all long strings, comments, and dictionary arguments and lists into shorter lines.'
,
]
}
,
'Pylint'
:
{
'C0301:line-too-long'
:
[
'Split into many short lines to make sure each line is less than 20 tokens; split into many more lines than you normally would. Make sure to do the following: You must split all long strings, comments, and dictionary arguments and lists into shorter lines.'
,
]
}
,
'ts'
:
{
2345
:
{
:
'Use this declaration and other usages as examples.'
,
:
''
,
:
.
}
,
2554
:
{
:
'Use this declaration and other usages as examples.'
,
:
''
,
:
.
}
,
}
,
'eslint'
:
{
'class-methods-use-this'
:
[
'Make the method static.'
,
'Move the method outside of the class.'
,
'Rewrite the method to use properties of the class.'
,
]
,
'consistent-this'
:
[
'Use the alias for this required by eslint consistent-this rule.'
,
'Use this directly instead of an alias.'
,
]
,
'constructor-super'
:
{
:
'Add missing super call and pass through new arguments.'
,
:
'The code is missing a super call in the constructor. Copy base class parameters to this constructor and pass them to super.'
,
:
'Missing super call in constructor'
,
}
,
'func-names'
:
[
'Give the function expression the same name as the variable it is assigned to.'
,
'Convert the function to an arrow function.'
,
]
,
'func-style'
:
[
{
:
'Convert the function declaration to an expression.'
,
:
'The function expression should be assigned to a variable with the name of the original function declaration.'
,
}
,
]
,
'max-lines-per-function'
:
[
'Split into multiple functions.'
,
]
,
'max-nested-callbacks'
:
[
'Rewrite to avoid at least one callback.'
,
]
,
'max-params'
:
[
{
:
'Rewrite the signature to use an object parameter.'
,
:
'Preserve all the parameters of the original signature.'
}
]
,
'max-statements'
:
[
'Split into multiple functions.'
,
]
,
'no-case-declarations'
:
[
'Surround the case block with braces.'
,
'Move the declaration outside the case block.'
,
]
,
'no-dupe-else-if'
:
[
'Fix the duplicate condition to be different from the first.'
,
'Remove the duplicate condition'
,
]
,
'no-duplicate-case'
:
[
{
:
'Change the duplicate condition to be different.'
,
:
'Do not delete the duplicate case, just fix it'
,
:
'Duplicated condition.'
}
,
'Remove the duplicate condition'
,
]
,
'no-duplicate-imports'
:
'Merge the duplicated import lines.'
,
'no-fallthrough'
:
[
{
:
'Rewrite to avoid fallthrough.'
,
:
'Use the return value of the following cases and copy it to the preceding fallthrough case.'
,
:
'Fallthrough case in switch statement.'
}
,
'Add a // fallthrough comment.'
,
'Add a break statement.'
,
]
,
'no-inner-declarations'
:
[
'Move the inner declaration to the top of its containing function.'
,
'Move the inner declaration to the bottom of its containing function.'
,
'Change the inner function declaration to an expression.'
,
]
,
'no-multi-assign'
:
'Assign each variable in separate statements.'
,
'no-negated-condition'
:
'Invert the branches of the conditional.'
,
'no-new'
:
[
'Convert the class to functions.'
,
'Assign the resulting object to a variable.'
,
]
,
'no-sequences'
:
[
{
:
'Wrap the whole comma sequence in parentheses.'
,
:
''
,
:
'Unnecessary comma sequence'
}
,
{
:
'Rewrite, preserving the original behavior.'
,
:
'The last element of the comma sequence is the one returned.'
}
,
{
:
'Delete the non-final elements of the sequence.'
,
:
'They are unused unless it is for side effects.'
}
,
]
,
'no-sparse-arrays'
:
[
'Remove duplicated commas.'
,
'Add default values for the missing elements.'
,
]
,
'require-await'
:
[
'Removed the unused async keyword.'
,
{
:
'Rewrite the function to use await.'
,
:
'The code should change to call asynchronous functions where appropriate.'
}
,
]
,
'sort-keys'
:
{
:
'Sort the properties of the entire object literal.'