ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / test / browser / componentFixtures / chat / chatTerminalCollapsible.fixture.ts 123 строк · изменён 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
import * as dom from '../../../../../base/browser/dom.js' ;
import { Event } from '../../../../../base/common/event.js' ;
import { observableValue } from '../../../../../base/common/observable.js' ;
import { mock, upcastPartial } from '../../../../../base/test/common/mock.js' ;
import type { IChatContentPartRenderContext, InlineTextModelCollection } from '../../../../contrib/chat/browser/widget/chatContentParts/chatContentParts.js' ;
import type { IChatResponseViewModel } from '../../../../contrib/chat/common/model/chatViewModel.js' ;
import { ChatTerminalThinkingCollapsibleWrapper }
ComponentFixtureContext createEditorServices defineComponentFixture defineThemedFixtureGroup
IChatContentPartRenderContext
element
elementIndex
container document
content
contentIndex
editorPool
codeBlockStartIndex
treeStartIndex
diffEditorPool
currentWidth
onDidChangeVisibility Event None
inlineTextModels
context ComponentFixtureContext commandText isSandboxWrapped isComplete isSkipped isRunningInBackground intention
container disposableStore context
instantiationService disposableStore
colorTheme context theme
container style width
container style padding
container classList
itemContainer dom
container itemContainer
contentElement dom
contentElement textContent
contentElement style padding
contentElement style color
wrapper disposableStore instantiationService
ChatTerminalThinkingCollapsibleWrapper
commandText
intention
isSandboxWrapped
contentElement
isComplete
isSkipped
isRunningInBackground
itemContainer wrapper domNode
path
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx
ctx
ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
ctx ctx
from
'../../../../contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js'
;
import
{
,
,
,
}
from
'../fixtureUtils.js'
;
import
'../../../../contrib/chat/browser/widget/media/chat.css'
;
function
createMockContext
(
)
:
{
return
{
:
new
class
extends
mock< IChatResponseViewModel>
(
)
{
}
(
)
,
:
0
,
:
.
createElement
(
'div'
)
,
:
[
]
,
:
0
,
:
undefined
!
,
:
0
,
:
0
,
:
undefined
!
,
:
observableValue
(
'currentWidth'
,
400
)
,
:
.
,
:
upcastPartial < InlineTextModelCollection>
(
{
}
)
,
}
;
}
function
renderCollapsible
(
:
,
:
string
,
:
boolean
,
:
boolean
,
:
boolean
=
false
,
:
boolean
=
false
,
:
string
|
undefined
=
undefined
)
:
void
{
const
{
,
}
=
;
const
=
createEditorServices
(
,
{
:
.
,
}
)
;
.
.
=
'500px'
;
.
.
=
'8px'
;
.
.
add
(
'monaco-workbench'
,
'interactive-session'
)
;
const
=
.
$
(
'.interactive-item-container'
)
;
.
appendChild
(
)
;
const
=
.
$
(
'.chat-terminal-output-placeholder'
)
;
.
=
'(terminal output would appear here)'
;
.
.
=
'8px'
;
.
.
=
'var(--vscode-descriptionForeground)'
;
const
=
.
add
(
.
createInstance
(
,
,
,
,
,
createMockContext
(
)
,
false
,
,
,
,
undefined
,
)
)
;
.
appendChild
(
.
)
;
}
export
default
defineThemedFixtureGroup
(
{
:
'chat/terminalCollapsible/'
}
,
{
'Ran - simple command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'ls -lh'
,
false
,
true
)
,
}
)
,
'Running - simple command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'ls -lh'
,
false
,
false
)
,
}
)
,
'Ran sandbox - simple command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'ls -lh'
,
true
,
true
)
,
}
)
,
'Running sandbox - simple command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'ls -lh'
,
true
,
false
)
,
}
)
,
'Ran - special chars'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'grep -rn "hello" ./src --include="*.ts"'
,
false
,
true
)
,
}
)
,
'Ran sandbox - special chars'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'grep -rn "hello" ./src --include="*.ts"'
,
true
,
true
)
,
}
)
,
'Ran - backticks'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'echo `date` && echo `hostname`'
,
false
,
true
)
,
}
)
,
'Ran sandbox - backticks'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'echo `date` && echo `hostname`'
,
true
,
true
)
,
}
)
,
'Ran sandbox - powershell backticks'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'Get-Process | Where-Object {$_.Name -eq `"notepad`"}'
,
true
,
true
)
,
}
)
,
'Ran - with intention'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'ls -lh'
,
false
,
true
,
false
,
false
,
'List files in the repo root'
)
,
}
)
,
'Height parity - with and without intention'
:
defineComponentFixture
(
{
render
:
=>
{
renderCollapsible
(
,
'ls -lh'
,
false
,
true
)
;
renderCollapsible
(
,
'ls -lh'
,
false
,
true
,
false
,
false
,
'List files in the repo root'
)
;
}
,
}
)
,
'Running - with intention'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'npm test'
,
false
,
false
,
false
,
false
,
'Run the test suite'
)
,
}
)
,
'Ran sandbox - with intention'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'ls -lh'
,
true
,
true
,
false
,
false
,
'List files in the repo root'
)
,
}
)
,
'Ran - long intention and command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'grep -rn deprecatedHelper ./src --include=*.ts --color=never | head -50'
,
false
,
true
,
false
,
false
,
'Search the entire repository for references to the deprecated helper function'
)
,
}
)
,
'Ran - long intention short command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'pwd'
,
false
,
true
,
false
,
false
,
'Print the absolute path of the current working directory so I know where I am'
)
,
}
)
,
'Ran - short intention long command'
:
defineComponentFixture
(
{
render
:
=>
renderCollapsible
(
,
'find . -type f -name "*.ts" -not -path "*/node_modules/*" -newer package.json'
,
false
,
true
,
false
,
false
,
'Find changed files'
)
,
}
)
,
}
)
;