Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* @inheritdoc
*
* This logic is as follows:
*
* - If the user has configured specific inclusions or exclusions for
* the command, then use those.
* - If the command being run is a relative path or within the CWD, assume
* it's debuggable. This might be native code compiled to an executable.
* - If one of the debuggable commands we know about matches, then it's
* debuggable.
* - If the user has interacted with languages for which we don't know the
* appropriate debuggable commands, ask the language model and update
* our storage.
*
*/
public
async
isDebuggable
(
:
URI
|
undefined
,
:
string
,
:
)
:
Promise
<
boolean
>
{
if
(
!
this
.
isGloballyEnabled
(
)
)
{
return
false
;
}
const
=
extractCommandNameFromCLI
(
)
.
toLowerCase
(
)
;
return
this
.
getSpecificTreatment
(
)
??
this
.
isWellKnownCommand
(
)
??
await
this
.
isWorkspaceLocal
(
,
)
??
await
this
.
isModelSuggestedCommand
(
,
)
??
false
;
}
private
isGloballyEnabled
(
)
{
return
this
.
.
getConfig
(
.
)
;
}
private
async
isWorkspaceLocal
(
:
URI
|
undefined
,
:
string
)
:
Promise
<
true
|
undefined
>
{
const
=
.
isAbsolute
(
)
?
URI
.
file
(
)
:
&&
URI
.
joinPath
(
,
)
;
if
(
!
)
{
return
undefined
;
}
try
{
await
this
.
.
stat
(
)
;
return
true
;
}
catch
{
// no-op
}
}
private
async
isModelSuggestedCommand
(
:
string
,
:
)
{
const
=
this
.
loadModelKnownCommands
(
)
;
// check ones we queried for previously and don't query for them again.
for
(
const
of
.
)
{
this
.
.
delete
(
)
;
}
if
(
.
.
some
(
=>
this
.
commandIncludes
(
,
)
)
)
{
return
true
;
}
if
(
!
this
.
.
)
{
return
false
;
}
const
=
[
...
this
.
]
;
this
.
.
clear
(
)
;
const
{
,
}
=
await
this
.
.
getToolsForLanguages
(
,
)
;
if
(
)
{
this
.
storeModelKnownCommands
(
{
:
.
.
concat
(
)
,
:
distinct
(
.
.
concat
(
)
)
,
}
)
;
}
return
.
some
(
=>
this
.
commandIncludes
(
,
)
)
;
}
private
isWellKnownCommand
(
:
string
)
:
boolean
|
undefined
{
// an 'include' check to handle things like pip3 vs pip
return
KNOWN_DEBUGGABLE_COMMANDS
.
some
(
=>
this
.
commandIncludes
(
,
)
)
||
undefined
;
}
private
getSpecificTreatment
(
:
string
)
:
boolean
|
undefined
{
const
=
this
.
.
getConfig
(
.
.
)
;
for
(
const
of
)
{
if
(
.
startsWith
(
'!'
)
&&
this
.
commandIncludes
(
,
)
)
{
return
false
;
}
else
if
(
this
.
commandIncludes
(
,
)
)
{
return
true
;
}
}
}
private
commandIncludes
(
:
string
,
:
string
)
{
const
=
.
indexOf
(
)
;
return
>=
0
&&
(
===
0
||
[
-
1
]
===
' '
)
&&
(
+
.
===
.
||
[
+
.
]
===
' '
)
;
}
private
loadModelKnownCommands
(
)
{
return
this
.
.
.
get<IKnownCommandsState>
(
DEBUGGABLE_COMMAND_STORAGE_KEY
,
{
:
[
]
,
:
[
]
,
}
)
;
}
private
storeModelKnownCommands
(
:
)
{
return
this
.
.
.
update
(
DEBUGGABLE_COMMAND_STORAGE_KEY
,
)
;
}
}
interface
IKnownCommandsState
{
:
string
[
]
;
:
string
[
]
;
}
const
DEBUGGABLE_COMMAND_STORAGE_KEY
=
'chat.debuggableCommands'
;
function
extractCommandNameFromCLI
(
:
string
)
{
// todo: support less common cases of quoting and environment variables
const
=
/\s*([^\s]+)/
;
const
=
.
exec
(
)
;
return
?
[
1
]
:
;
}
/**
* Seed some built-in patterns to avoid LM lookups for common cases.
* Generated in test/simulation/debugTools.stest.ts, do not edit directly!
*/
const
KNOWN_DEBUGGABLE_COMMANDS
=
[
'abap'
,
'ant'
,
'automake'
,
'autotools'
,
'ava'
,
'babel'
,
'bcp'
,
'behat'
,
'behave'
,
'biber'
,
'bibtex'
,
'bmake'
,
'boot'
,
'broccoli-sass'
,
'browserify'
,
'build_runner'
,
'bundler'
,
'busted'
,
'cabal'
,
'cargo'
,
'cargo-bench'
,
'cargo-fuzz'
,
'cargo-make'
,
'cargo-run'
,
'cargo-test'
,
'cargo-watch'
,
'carthage'
,
'carton'
,
'clang'
,
'clippy-driver'
,
'clj'
,
'clojure'
,
'cmake'
,
'cocoapods'
,
'codeception'
,
'common_test'
,
'composer'
,
'conan'
,
'coverage'
,
'cpan'
,
'cpanm'
,
'csc'
,
'ct_run'
,
'ctest'
,
'cucumber'
,
'cuda-gdb'
,
'cuda-memcheck'
,
'cypress'
,
'dart'
,
'dart-sass'
,
'dart2js'
,
'dartanalyzer'
,
'dartdevc'
,
'db2cli'
,
'ddemangle'
,
'devenv'
,
'devtools'
,
'dfix'
,
'dialyzer'
,
'dmd'
,
'doctest'
,
'dotnet'
,
'dotnet-script'
,
'dotnet-test-nunit'
,
'dotnet-test-xunit'
,
'dpp'
,
'dscanner'
,
'dsymutil'
,
'dub'
,
'dune'
,
'dustmite'
,
'dvilualatex'
,
'dvipdf'
,
'dvipdfmx'
,
'dvips'
,
'erl'
,
'erlang'
,
'erlc'
,
'esbuild'
,
'escript'
,
'eunit'
,
'eyeglass'
,
'fastlane'
,
'fennel'
,
'flutter'
,
'forever'
,
'fpc'
,
'fsharpc'
,
'fsi'
,
'g'
,
'gaiden'
,
'gcc'
,
'gcov'
,
'gdb'
,
'gdc'
,
'ghc'
,
'ghcid'
,
'gmake'
,
'gmaven'
,
'go'
,
'gpars'
,
'gradle'
,
'grape'
,
'griffon'
,
'grinder'
,
'grip'
,
'groovy'
,
'groovyc'
,
'grunt'
,
'grunt-sass'
,
'gulp'
,
'gulp-sass'
,
'hdevtools'
,
'hlint'
,
'hspec'
,
'irb'
,
'isql'
,
'jasmine'
,
'java'
,
'javac'
,
'jazzy'
,
'jdeps'
,
'jest'
,
'jlink'
,
'julia'
,
'junit'
,
'kaocha'
,
'karma'
,
'kobalt'
,
'kotest'
,
'kotlin-dsl'
,
'kotlinc'
,
'kscript'
,
'latexmk'
,
'lazbuild'
,
'lcov'
,
'ld'
,
'ldc2'
,
'ldoc'
,
'leiningen'
,
'lldb'
,
'lua'
,
'luacheck'
,
'luajit'
,
'lualatex'
,
'luarocks'
,
'luaunit'
,
'make'
,
'markdown'
,
'markdown-it'
,
'markdown-pdf'
,
'marked'
,
'matlab'
,
'maven'
,
'mbuild'
,
'mcc'
,
'md2pdf'
,
'mdbook'
,
'merlin'
,
'mex'
,
'midje'
,
'minitest'
,
'mlint'
,
'mmake'
,
'mocha'
,
'mockk'
,
'mono'
,
'moonscript'
,
'msbuild'
,
'mssql-cli'
,
'mstest'
,
'multimarkdown'
,
'mysql'
,
'ncu'
,
'ninja'
,
'nmake'
,
'node'
,
'node-sass'
,
'nose'
,
'npm'
,
'npx'
,
'nrepl'
,
'nsight'
,
'nsys'
,
'nunit-console'
,
'nvcc'
,
'ocamlbuild'
,
'ocamlc'
,
'ocamldebug'
,
'ocamlfind'
,
'ocamlopt'
,
'ocamlrun'
,
'opam'
,
'otest'
,
'otool'
,
'paket'
,
'panda'
,
'pandoc'
,
'parcel'
,
'pdflatex'
,
'perl'
,
'perl6'
,
'perlbrew'
,
'pgbench'
,
'phing'
,
'php'
,
'php-cs-fixer'
,
'phpcs'
,
'phpdbg'
,
'phpstan'
,
'phpunit'
,
'pip'
,
'pipenv'
,
'plackup'
,
'playwright'
,
'pm2'
,
'pmake'
,
'powershell'
,
'ppc386'
,
'ppcrossarm'
,
'ppcrossavr'
,
'ppcrossmips'
,
'ppcrossppc'
,
'ppcrosssparc'
,
'ppcrosswin32'
,
'ppcrossx64'
,
'protractor'
,
'prove'
,
'pry'
,
'psql'
,
'psysh'
,
'pub'
,
'pwsh'
,
'pytest'
,
'python'
,
'qmake'
,
'quickcheck'
,
'rails'
,
'rake'
,
'rakudo'
,
'rdmd'
,
'react-scripts'
,
'rebar3'
,
'relx'
,
'remake'
,
'rollup'
,
'rspec'
,
'rubocop'
,
'ruby'
,
'runghc'
,
'rustc'
,
'rustup'
,
'sass'
,
'sassc'
,
'scons'
,
'showdown'
,
'sinatra'
,
'speclj'
,
'spek'
,
'spock'
,
'spring-boot'
,
'sqlcmd'
,
'sqlite3'
,
'sqsh'
,
'stack'
,
'svelte-kit'
,
'swift'
,
'swiftc'
,
'test'
,
'test-runner'
,
'testng'
,
'testthat'
,
'tools'
,
'torch'
,
'tox'
,
'ts-node'
,
'tsc'
,
'unittest'
,
'utop'
,
'valgrind'
,
'vbc'
,
'virtualenv'
,
'vite'
,
'vstest'
,
'vue-cli-service'
,
'vue-test-utils'
,
'webdev'
,
'webpack'
,
'x'
,
'xcodebuild'
,
'xctest'
,
'xelatex'
,
'xunit'
,
'yarn'
,
'zef'
,
'zig'
]
;
/**
* Languages the {@link KNOWN_DEBUGGABLE_COMMANDS} covers.
* Generated in test/simulation/debugTools.stest.ts, do not edit directly!
*/