ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / extensions / copilot / test / simulation / workbench / simulationWorkbench.tsx 124 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import { ipcRenderer } from 'electron' ;
import * as path from 'path' ;
import * as React from 'react' ;
import { render } from 'react-dom' ;
import { Disposable } from '../../../src/util/vs/base/common/lifecycle' ;
import { App , DisplayOptions } from './components/app' ;
import { parseInitEventArgs parseProcessArgv
monacoModule
storage
workbenchMode
testSource
simulationRunsProvider
amlProvider
runner
runnerOptions
nesExternalOptions
adhocRequestOptions
adhocRequestSender
tests
displayOptions
initArgs
elt
elt
elt
elt
monacoPromise
monacoPromise
monacoPromise
monacoPromise
resolve reject
amdLoader
amdRequire amdLoader
_path
pathName path _path
pathName pathName
pathName pathName
pathName
baseUrl path
amdRequire baseUrl
monaco
monaco
reject
monacoModule
processArgv ipcRenderer
parsedArgs processArgv
parsedArgs
InitArgs
,
as
}
from
'./initArgs'
;
import
{ AdhocRequestOptions }
from
'./stores/adhocRequestOptions'
;
import
{ AdhocRequestSender }
from
'./stores/adhocRequestSender'
;
import
{ AMLProvider }
from
'./stores/amlSimulations'
;
import
{ NesExternalOptions }
from
'./stores/nesExternalOptions'
;
import
{ RunnerOptions }
from
'./stores/runnerOptions'
;
import
{ SimulationRunsProvider }
from
'./stores/simulationBaseline'
;
import
{ SimulationRunner }
from
'./stores/simulationRunner'
;
import
{ SimulationStorage }
from
'./stores/simulationStorage'
;
import
{ SimulationTestsProvider }
from
'./stores/simulationTestsProvider'
;
import
{ TestSource , TestSourceValue }
from
'./stores/testSource'
;
import
{ WorkbenchMode , WorkbenchModeValue }
from
'./stores/workbenchMode'
;
import
{
REPO_ROOT
,
}
from
'./utils/utils'
;
class
SimulationWorkbench
extends
Disposable
{
private
readonly
:
SimulationStorage
;
private
readonly
:
WorkbenchModeValue
;
private
readonly
:
TestSourceValue
;
private
readonly
:
SimulationRunsProvider
;
private
readonly
:
AMLProvider
;
private
readonly
:
SimulationRunner
;
private
readonly
:
RunnerOptions
;
private
readonly
:
NesExternalOptions
;
private
readonly
:
AdhocRequestOptions
;
private
readonly
:
AdhocRequestSender
;
private
readonly
:
SimulationTestsProvider
;
private
readonly
:
DisplayOptions
;
constructor
(
)
{
super
(
)
;
this
.
storage
=
new
SimulationStorage
(
)
;
this
.
workbenchMode
=
this
.
storage
.
bind
<
WorkbenchMode
>
(
'workbenchMode'
,
'tests'
)
;
this
.
testSource
=
this
.
storage
.
bind
(
'testSource'
,
TestSource
.
Local
)
;
if
(
this
.
testSource
.
value
!==
TestSource
.
Local
&&
this
.
testSource
.
value
!==
TestSource
.
External
&&
this
.
testSource
.
value
!==
TestSource
.
NesExternal
)
{
this
.
testSource
.
value
=
TestSource
.
Local
;
}
this
.
amlProvider
=
this
.
_register
(
new
AMLProvider
(
this
.
storage
)
)
;
this
.
runnerOptions
=
new
RunnerOptions
(
this
.
storage
)
;
this
.
nesExternalOptions
=
new
NesExternalOptions
(
this
.
storage
)
;
this
.
adhocRequestOptions
=
new
AdhocRequestOptions
(
this
.
storage
)
;
this
.
adhocRequestSender
=
new
AdhocRequestSender
(
)
;
this
.
runner
=
this
.
_register
(
new
SimulationRunner
(
this
.
storage
,
this
.
runnerOptions
)
)
;
this
.
simulationRunsProvider
=
this
.
_register
(
new
SimulationRunsProvider
(
this
.
storage
,
this
.
runner
)
)
;
this
.
tests
=
this
.
_register
(
new
SimulationTestsProvider
(
this
.
testSource
,
this
.
runner
,
this
.
simulationRunsProvider
,
this
.
amlProvider
,
this
.
nesExternalOptions
)
)
;
this
.
displayOptions
=
new
DisplayOptions
(
this
.
storage
)
;
}
public
run
(
:
InitArgs
|
undefined
)
{
const
=
document
.
createElement
(
'div'
)
;
.
style
.
minHeight
=
'inherit'
;
document
.
body
.
appendChild
(
)
;
render
(
< App
initArgs = { initArgs}
testsProvider = { this . tests }
workbenchMode = { this . workbenchMode }
runner = { this . runner }
runnerOptions = { this . runnerOptions }
nesExternalOptions = { this . nesExternalOptions }
adhocRequestOptions = { this . adhocRequestOptions }
adhocRequestSender = { this . adhocRequestSender }
simulationRunsProvider = { this . simulationRunsProvider }
amlProvider = { this . amlProvider }
displayOptions = { this . displayOptions }
/>
,
)
;
}
}
let
:
Promise
<
typeof
import
(
'monaco-editor'
)
>
|
undefined
=
undefined
;
function
loadMonaco
(
)
:
Promise
<
typeof
import
(
'monaco-editor'
)
>
{
if
(
!
)
{
=
doLoadMonaco
(
)
;
}
return
;
}
function
doLoadMonaco
(
)
:
Promise
<
typeof
import
(
'monaco-editor'
)
>
{
return
new
Promise < typeof import ( 'monaco-editor' ) >
(
(
,
)
=>
{
const
=
require
(
'../../node_modules/monaco-editor/min/vs/loader.js'
)
;
const
=
.
require
;
function
uriFromPath
(
:
string
)
{
let
=
.
resolve
(
)
.
replace
(
/ \\ / g
,
'/'
)
;
if
(
.
length
>
0
&&
.
charAt
(
0
)
!==
'/'
)
{
=
'/'
+
;
}
return
encodeURI
(
'file://'
+
)
;
}
const
=
uriFromPath
(
.
join
(
REPO_ROOT
,
'node_modules/monaco-editor/min'
)
)
;
.
config
(
{
}
)
;
amdRequire
(
[
'vs/editor/editor.main'
]
,
function
(
:
typeof
import
(
'monaco-editor'
)
)
{
resolve
(
)
;
}
,
)
;
}
)
;
}
async
function
startup
(
)
{
.
value
=
await
loadMonaco
(
)
;
const
:
string
[
]
=
await
.
invoke
(
'processArgv'
)
;
const
=
parseProcessArgv
(
)
;
new
SimulationWorkbench
(
)
.
run
(
)
;
}
startup
(
)
;