Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* The model-configuration button label the mock server's `mock-config-model`
* must show before any option is picked, i.e. the labels of its two schema
* defaults: reasoning effort `medium` (the `mock-config` family default) and the
* `default` billing tier's 272000-token context window.
*/
export
const
MOCK_CONFIG_MODEL_DEFAULT_LABEL
=
'Medium 272K'
;
/**
* Every option `mock-config-model` declares in its configuration schema, in the
* order the model-configuration dropdown renders them. The `Thinking Effort`
* options come from `capabilities.supports.reasoning_effort`, the `Context Size`
* options from the `default` / `long_context` billing tiers (272000 and
* `max_context_window_tokens - max_output_tokens` = 922000, which
* `formatTokenCount` renders as "1M" via its `>900K → 1M` branch).
*
* `checked` reflects the pristine state — the schema default of each group — so
* this snapshot is only valid before any option has been selected.
*/
export
const
MOCK_CONFIG_MODEL_DEFAULT_SECTIONS
:
readonly
[
]
=
[
{
:
'Thinking Effort'
,
:
[
{
:
'Low'
,
:
''
,
:
false
}
,
{
:
'Medium'
,
:
'Default'
,
:
true
}
,
{
:
'High'
,
:
''
,
:
false
}
,
]
,
}
,
{
:
'Context Size'
,
:
[
{
:
'272K'
,
:
'Default'
,
:
true
}
,
{
:
'1M'
,
:
''
,
:
false
}
,
]
,
}
,
]
;
export
function
describeRepeat
(
:
number
,
:
string
,
callback
:
(
this
:
)
=>
void
)
:
void
{
for
(
let
=
0
;
<
;
++
)
{
describe
(
`${description} (iteration ${i})`
,
)
;
}
}
export
function
itRepeat
(
:
number
,
:
string
,
callback
:
(
this
:
)
=>
any
)
:
void
{
for
(
let
=
0
;
<
;
++
)
{
it
(
`${description} (iteration ${i})`
,
)
;
}
}
export
function
installAllHandlers
(
:
,
?
:
(
:
)
=>
,
?
:
(
:
)
=>
Promise
<
void
>
|
void
)
{
installDiagnosticsHandler
(
)
;
installAppBeforeHandler
(
,
)
;
installAppAfterHandler
(
)
;
}
export
function
installDiagnosticsHandler
(
:
,
?
:
(
)
=>
|
undefined
)
{
// Before each suite
before
(
async
function
(
)
{
const
=
this
.
?.
?.
;
.
log
(
''
)
;
.
log
(
`>>> Suite start: '${suiteTitle ??'unknown'}' <<<`
/**
* Pre-seed the default profile's storage DB so the
* `BuiltinChatExtensionEnablementMigration` does not disable the built-in
* copilot-chat extension on a fresh per-run profile. Without this, the first
* chat send routes through chat-setup's install path, which fails for a merely
* disabled built-in ("...is a built-in extension and not allowed to be
* installed") and surfaces a "try again" dialog before the retry recovers.
*
* Mirrors the perf:chat harness (`scripts/chat-simulation/common/utils.js`).
*/
export
async
function
preseedChatExtensionEnablement
(
:
string
|
undefined
)
:
Promise
<
void
>
{
if
(
!
)
{
return
;
}
const
=
join
(
,
'User'
,
'globalStorage'
)
;
.
mkdirSync
(
,
{
:
true
}
)
;
const
=
join
(
,
'state.vscdb'
)
;
const
=
await
new
Promise<sqlite3.Database>
(
(
,
)
=>
{
const
=
new
sqlite3
.
Database
(
,
=>
?
reject
(
)
:
resolve
(
)
)
;
}
)
;
try
{
await
new
Promise<void>
(
(
,
)
=>
.
exec
(
[
'CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB);'
,
'INSERT INTO ItemTable (key, value) VALUES (\'builtinChatExtensionEnablementMigration\', \'true\');'
,
]
.
join
(
' '
)
,
=>
?
reject
(
)
:
resolve
(
)
)
)
;
}
finally
{
await
new
Promise<void>
(
(
,
)
=>
.
close
(
=>
?
reject
(
)
:
resolve
(
)
)
)
;
}
}
export
function
getMockLlmServerPath
(
)
:
string
{
return
join
(
,
'..'
,
'..'
,
'..'
,
'scripts'
,
'chat-simulation'
,
'common'
,
'mock-llm-server.ts'
)
;
}
export
function
getMockLlmServerUrl
(
:
)
:
string
{
const
=
.
.
VSCODE_SMOKE_TEST_MOCK_HOST
;
if
(
!
)
{
return
.
;
}
const
=
new
URL
(
.
)
;
.
=
;
return
.
toString
(
)
.
replace
(
/\/$/
,
''
)
;
}
export
function
buildCopilotChatToken
(
:
string
)
:
string
{
return
.
from
(
JSON
.
stringify
(
{
:
'smoketest-fake-token'
,
:
.
floor
(
.
now
(
)
/
1000
)
+
3600
,
:
1800
,
:
'free_limited_copilot'
,
:
true
,
:
true
,
:
'free'
,
:
[
]
,
:
{
:
,
:
}
,
}
)
)
.
toString
(
'base64'
)
;
}
export
function
getCopilotSmokeTestEnv
(
?
:
,
?
:
{
?
:
string
}
)
:
<
<
string
,
string
|
undefined
>>
{
// When `userDataDir` is provided, isolate the Copilot CLI session store
// from the user's real `~/.copilot/` by pointing `XDG_STATE_HOME` at a
// sibling of the per-run `userDataDir`. The extension's `getCopilotHome()`
// and the underlying CLI SDK both anchor to `XDG_STATE_HOME/.copilot/`
// when that env var is set, otherwise to `~/.copilot/`. Pinning it under
// the per-run `userDataDir` means the smoke-test cleanup (which removes
// the whole `testDataPath`) also wipes the Copilot state, so repeated
// local runs don't accumulate sessions that slow down `listSessions`
// and other startup paths. Codex uses its own `CODEX_HOME`, so isolate it
// under the same per-run state root.
let
:
string
|
undefined
;
let
:
string
|
undefined
;
let
:
string
|
undefined
;
if
(
?.
)
{
=
`${opts.userDataDir}-copilot-state`
;
=
join
(
.
,
'codex-home'
)
;
.
mkdirSync
(
,
{
:
true
}
)
;
// Anchor the Copilot runtime's home (`COPILOT_HOME`) at the same
// `.copilot` directory the extension resolves from `XDG_STATE_HOME`,
// so the runtime's process logs land in a known, per-run location we
// can attach on failure (see `getCopilotRuntimeLogDir` /
// `dumpFailureDiagnostics`). The runtime resolves its process-log dir
// as `${COPILOT_HOME}/logs` and is NOT influenced by `XDG_STATE_HOME`,
// so without this the logs would go to the agent's real `~/.copilot`.
=
join
(
,
'.copilot'
)
;
=
join
(
,
'.codex'
)
;
try
{
.
mkdirSync
(
,
{
:
true
}
)
;
.
mkdirSync
(
,
{
:
true
}
)
;
}
catch
{
// Best effort: the runtimes create their home directories on first write.
}
}
return
{
// Mirror the env-var bypass used by `scripts/chat-simulation/common/utils.js#buildEnv`
// for perf-regression / memory-leak runs:
// - GITHUB_PAT switches copilotTokenManager into FixedCopilotTokenManager,
// skipping the real GitHub OAuth flow.
// - IS_SCENARIO_AUTOMATION tells the Copilot extension this is an automation run
// so it suppresses sign-in prompts and uses NoAuth paths.
// - VSCODE_COPILOT_CHAT_TOKEN is a fake token whose endpoints.api/proxy
// point at the mock LLM server.
GITHUB_PAT
:
'smoketest-fake-pat'
,
IS_SCENARIO_AUTOMATION
:
'1'
,
VSCODE_COPILOT_CHAT_TOKEN
:
?
buildCopilotChatToken
(
getMockLlmServerUrl
(
)
)
:
undefined
,
XDG_STATE_HOME
:
,
COPILOT_HOME
:
,
CODEX_HOME
:
,
}
;
}
/**
* The directory that holds the Copilot runtime's `process-*.log` files for a
* smoke run, or `undefined` when this run did not pin a per-run `COPILOT_HOME`.
*
* The runtime writes its process logs to `${COPILOT_HOME}/logs`, and
* `getCopilotSmokeTestEnv` pins `COPILOT_HOME` for the run. Diagnostics resolve
* the directory from the *exact* `COPILOT_HOME` the app launched with (read back
* via `app.extraEnv`) rather than reconstructing it from `app.userDataPath`.
* There is deliberately no fall back to the
* ambient `~/.copilot/logs` — on a reused CI agent that could surface an
* unrelated session's trace log (session/model/auth diagnostics), which we must
* never copy into an uploaded artifact.
*/
export
function
getCopilotRuntimeLogDir
(
:
string
|
undefined
)
:
string
|
undefined
{
return
?
join
(
,
'logs'
)
:
undefined
;
}
export
function
getRandomUserDataDir
(
:
string
)
:
string
{
// Pick a random user data dir suffix that is not
// too long to not run into max path length issues
/**
* Best-effort failure diagnostics for the Copilot smoke tests.
*
* Writes (via `logger`) into `smoke-test-runner.log`:
* - Paths of every `playwright-trace-*.zip` / `playwright-screenshot-*.png`
* that has been persisted to the suite's logs directory so the artifact
* can be located in a CI logs bundle without searching.
* - The class list / attributes of the element matched by
* `sendButtonSelector` (if provided) so we can tell whether the button
* was `.disabled`, missing, or covered by an overlay when the test gave up.
* - The tail (last 80 lines) of the `GitHub Copilot Chat.log` extension
* host log for every `window*` directory under the suite logs that has
* an `exthost/GitHub.copilot-chat/` subfolder. This surfaces extension-side
* errors directly in the runner log so a CI failure does not require
* downloading the per-platform `logs-*-*-1` artifact.
* - The Copilot runtime (`@github/copilot` CLI) `process-*.log` files: the
* most recent are copied into `<logsPath>/copilot-runtime-logs/` (so they
* ship in the published `logs-*` artifact that the SDK-integration canary
* and bump workflows consume) and their tail is written into the runner
* log. These are the SDK/CLI's own diagnostics — the key signal when an
* SDK-backed session hangs and the test only reports a timeout.
*
* All steps are wrapped in try/catch — this helper must never throw, since
* it runs inside a test's `catch` block right before re-throwing the
* original error.
*/