ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / platform / agentHost / test / node / codex / codexLaunchConfig.test.ts 90 строк · изменён 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
import * as assert from 'assert' ;
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../base/test/common/utils.js' ;
import { buildCodexLaunchConfig, buildCodexResumeParams } from '../../../node/codex/codexLaunchConfig.js' ;
suite ( 'CodexLaunchConfig' , ( ) => {
ensureNoDisposablesAreLeakedInTestSuite ( ) ;
test ( 'adds the Copilot proxy and enforces telemetry overrides after extra arguments' , ( ) => {
const config = buildCodexLaunchConfig ( { PATH : baseUrl nonce
assert config env
assert config args
assert config args argument argument
assert config args
assert config args
assert config args
assert config args
assert config args config args
assert config args
config baseUrl nonce
traces endpoint protocol
external endpoint protocol headers authorization
captureContent
resourceAttributes region
assert config env
assert config env
assert config args
assert config args
assert config args
assert config args
assert config args
assert config args
config baseUrl nonce
traces endpoint protocol
external endpoint protocol headers authorization
captureContent
resourceAttributes
expected
assert config args
assert config args
assert
threadId
modelProvider
config
assert GitHub url
threadId
modelProvider
config mcp_servers GitHub url
assert
agents Reviewer description config_file
threadId
modelProvider
config agents Reviewer description config_file
developerInstructions
assert
threadId
modelProvider
cwd
runtimeWorkspaceRoots
config
'/bin'
,
OPENAI_API_KEY
:
'personal'
}
,
{
:
'http://127.0.0.1:1234'
,
:
'nonce'
}
,
[
'--log-level=debug'
,
'-c'
,
'analytics.enabled=true'
]
)
;
.
deepStrictEqual
(
.
,
{
PATH
:
'/bin'
,
OPENAI_API_KEY
:
'nonce'
,
AI_AGENT
:
'github_copilot_vscode_agent'
}
)
;
.
ok
(
.
.
includes
(
'model_providers.vscode-proxy.name="VS Code Proxy"'
)
)
;
.
ok
(
!
.
.
some
(
=>
.
startsWith
(
'model_provider='
)
)
)
;
.
ok
(
.
.
includes
(
'model_providers.vscode-proxy.requires_openai_auth=false'
)
)
;
.
ok
(
.
.
includes
(
'features.image_generation=false'
)
)
;
.
ok
(
.
.
includes
(
'shell_environment_policy.set.AI_AGENT="github_copilot_vscode_agent"'
)
)
;
.
ok
(
.
.
includes
(
'--log-level=debug'
)
)
;
.
ok
(
.
.
indexOf
(
'analytics.enabled=true'
)
<
.
.
lastIndexOf
(
'analytics.enabled=false'
)
)
;
.
deepStrictEqual
(
.
.
slice
(
-
12
)
,
[
'-c'
,
'analytics.enabled=false'
,
'-c'
,
'feedback.enabled=false'
,
'-c'
,
'otel.log_user_prompt=false'
,
'-c'
,
'otel.trace_exporter="none"'
,
'-c'
,
'otel.exporter="none"'
,
'-c'
,
'otel.metrics_exporter="none"'
,
]
)
;
}
)
;
test
(
'routes traces to loopback and logs/metrics directly to the external sink'
,
(
)
=>
{
const
=
buildCodexLaunchConfig
(
{
}
,
{
:
'http://127.0.0.1:1234'
,
:
'nonce'
}
,
[
]
,
{
:
{
:
'http://127.0.0.1:4567/v1/traces'
,
:
'http/json'
}
,
:
{
:
'http://collector:4318'
,
:
'http/protobuf'
,
:
{
:
'Bearer test'
}
}
,
:
false
,
:
{
'service.namespace'
:
'vscode.agent-host'
,
:
'west us'
}
,
}
)
;
.
strictEqual
(
.
.
OTEL_SERVICE_NAME
,
undefined
)
;
.
strictEqual
(
.
.
OTEL_RESOURCE_ATTRIBUTES
,
'service.namespace=vscode.agent-host,region=west%20us'
)
;
.
ok
(
.
.
includes
(
'analytics.enabled=false'
)
)
;
.
ok
(
.
.
includes
(
'feedback.enabled=false'
)
)
;
.
ok
(
.
.
includes
(
'otel.log_user_prompt=false'
)
)
;
.
ok
(
.
.
includes
(
'otel.trace_exporter={ otlp-http = { endpoint = "http://127.0.0.1:4567/v1/traces", protocol = "json" } }'
)
)
;
.
ok
(
.
.
includes
(
'otel.exporter={ otlp-http = { endpoint = "http://collector:4318/v1/logs", protocol = "binary", headers = { "authorization" = "Bearer test" } } }'
)
)
;
.
ok
(
.
.
includes
(
'otel.metrics_exporter={ otlp-http = { endpoint = "http://collector:4318/v1/metrics", protocol = "binary", headers = { "authorization" = "Bearer test" } } }'
)
)
;
}
)
;
test
(
'keeps gRPC signal endpoints unchanged and uses decoded headers'
,
(
)
=>
{
const
=
buildCodexLaunchConfig
(
{
}
,
{
:
'http://127.0.0.1:1234'
,
:
'nonce'
}
,
[
]
,
{
:
{
:
'https://collector:4317'
,
:
'grpc'
}
,
:
{
:
'https://collector:4317'
,
:
'grpc'
,
:
{
:
'Bearer test/token'
}
}
,
:
false
,
:
{
}
,
}
)
;
const
=
'{ otlp-grpc = { endpoint = "https://collector:4317", headers = { "authorization" = "Bearer test/token" } } }'
;
.
ok
(
.
.
includes
(
` otel.exporter= ${ expected} `
)
)
;
.
ok
(
.
.
includes
(
` otel.metrics_exporter= ${ expected} `
)
)
;
}
)
;
test
(
'resume explicitly binds each session provider'
,
(
)
=>
{
.
deepStrictEqual
(
buildCodexResumeParams
(
'openai'
,
'thread-a'
,
{
}
,
undefined
,
{
}
,
undefined
,
true
)
,
{
:
'thread-a'
,
:
'openai'
,
:
{
'features.image_generation'
:
true
}
,
}
)
;
.
deepStrictEqual
(
buildCodexResumeParams
(
'vscode-proxy'
,
'thread-b'
,
{
:
{
:
'https://api.githubcopilot.com/mcp/'
}
}
)
,
{
:
'thread-b'
,
:
'vscode-proxy'
,
:
{
'features.image_generation'
:
false
,
:
{
:
{
:
'https://api.githubcopilot.com/mcp/'
}
}
}
,
}
)
;
.
deepStrictEqual
(
buildCodexResumeParams
(
'openai'
,
'thread-c'
,
{
}
,
undefined
,
{
:
{
:
{
:
'Reviews'
,
:
'/tmp/reviewer.toml'
}
}
,
}
,
'Use the selected reviewer instructions.'
)
,
{
:
'thread-c'
,
:
'openai'
,
:
{
:
{
:
{
:
'Reviews'
,
:
'/tmp/reviewer.toml'
}
}
,
'features.image_generation'
:
false
}
,
:
'Use the selected reviewer instructions.'
,
}
)
;
.
deepStrictEqual
(
buildCodexResumeParams
(
'custom-provider'
,
'thread-c'
,
{
}
,
[
'/repo-a'
,
'/repo-b'
]
)
,
{
:
'thread-c'
,
:
'custom-provider'
,
:
'/repo-a'
,
:
[
'/repo-a'
,
'/repo-b'
]
,
:
{
'features.image_generation'
:
false
}
,
}
)
;
}
)
;
}
)
;