Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
# ---------------------------------------------------------------------------------------------# Copyright (c) Microsoft Corporation. All rights reserved.# Licensed under the MIT License. See License.txt in the project root for license information.# ---------------------------------------------------------------------------------------------builtin autoload -Uz add-zsh-hook is-at-least
# Prevent the script recursing when setting upif[-n"$VSCODE_SHELL_INTEGRATION"];thenZDOTDIR=$USER_ZDOTDIRbuiltinreturnfi# This variable allows the shell to both detect that VS Code's shell integration is enabled as well# as disable it by unsetting the variable.VSCODE_SHELL_INTEGRATION=1# By default, zsh will set the $HISTFILE to the $ZDOTDIR location automatically. In the case of the# shell integration being injected, this means that the terminal will use a different history file# to other terminals. To fix this issue, set $HISTFILE back to the default location before ~/.zshrc# is called as that may depend upon the value.if[["$VSCODE_INJECTION"=="1"]];then
/.zsh_history
norcs off /.zshrc
/.zshrc
is-at-least
vsc_aa_env
ADDR
VSCODE_ENV_REPLACE
ADDR
VSCODE_ENV_PREPEND
ADDR
VSCODE_ENV_APPEND
setopt HIST_IGNORE_SPACE
VSCODE_PREVENT_SHELL_HISTORY
setopt NO_BANG_HIST
setopt INTERACTIVE_COMMENTS
VSCODE_AGENT_ZSH_FIXUPS
emulate
C i byte token val
print --
VSCODE_NONCE
VSCODE_SHELL_ENV_REPORTING
envVarsToReport
vsc_aa_env
__vsc_env_values
vsc_aa_env
"
__vsc_update_cwd
NOUNSET
__vsc_command_output_start
__vsc_command_complete
__vsc_update_prompt
__vsc_update_env
__vsc_command_output_start
add-zsh-hook precmd __vsc_precmd
add-zsh-hook preexec __vsc_preexec
login off
# Shell integration was disabled by the shell, exit without warning assuming either the shell has
# explicitly disabled shell integration as it's incompatible or it implements the protocol.
if
[
-z
"$VSCODE_SHELL_INTEGRATION"
]
;
then
builtin
return
fi
# Prevent AI-executed commands from polluting shell history
if
[
"${VSCODE_PREVENT_SHELL_HISTORY:-}"
=
"1"
]
;
then
builtin
builtin
unset
fi
# Agent terminal zsh fixups: disable bang history expansion so ! in double
# quotes does not hang on dquote>, and enable inline # comments so the
# agent can annotate commands.
if
[
"${VSCODE_AGENT_ZSH_FIXUPS:-}"
=
"1"
]
;
then
builtin
builtin
builtin
unset
fi
# The property (P) and command (E) codes embed values which require escaping.
# Backslashes are doubled. Non-alphanumeric characters are converted to escaped hex.
__vsc_escape_value
(
)
{
builtin
-L
zsh
# Process text byte by byte, not by codepoint.
builtin
local
LC_ALL
=
str
=
"$1"
out
=
''
for
(( i =0; i < ${#str};++i ))
;
do
# Escape backslashes, semi-colons specially, then special ASCII chars below space (0x20).
byte
=
"${str:$i:1}"
val
=
$(printf"%d""'$byte")
if
(( val <31))
;
then
# For control characters, use hex encoding
token
=
$(printf"\\\\x%02x""'$byte")
elif
[
"$byte"
=
"\\"
]
;
then
token
=
"\\\\"
elif
[
"$byte"
=
";"
]
;
then
token
=
"\\x3b"
else
token
=
"$byte"
fi
out
+=
"$token"
done
builtin
-r
"$out"
}
__vsc_in_command_execution
=
"1"
__vsc_current_command
=
""
# It's fine this is in the global scope as it getting at it requires access to the shell environment
__vsc_nonce
=
"$VSCODE_NONCE"
unset
__vscode_shell_env_reporting
=
"${VSCODE_SHELL_ENV_REPORTING:-}"
unset
envVarsToReport
=
(
)
IFS
=
','
read
-rA
<<<
"$__vscode_shell_env_reporting"
builtin
printf
"\e]633;P;ContinuationPrompt=%s\a"
"$(echo"$PS2"|sed's/\x1b/\\\\x1b/g')"
# Report this shell supports rich command detection
builtin
printf
'\e]633;P;HasRichCommandDetection=True\a'
__vsc_prompt_start
(
)
{
builtin
printf
'\e]633;A\a'
}
__vsc_prompt_end
(
)
{
builtin
printf
'\e]633;B\a'
}
__vsc_update_cwd
(
)
{
builtin
printf
'\e]633;P;Cwd=%s\a'
"$(__vsc_escape_value "${PWD}")"
}
__update_env_cache_aa
(
)
{
local
key
=
"$1"
local
value
=
"$2"
if
[
$__vsc_use_aa
-eq
1
]
;
then
if
[
[
"${vsc_aa_env["
$key
"]}"
!=
"$value"
]
]
;
then
[
"$key"
]
=
"$value"
builtin
printf
'\e]633;EnvSingleEntry;%s;%s;%s\a'
"$key"
"$(__vsc_escape_value "$value")"
"$__vsc_nonce"
fi
fi
}
__update_env_cache
(
)
{
local
key
=
"$1"
local
value
=
"$2"
for
(( i=1; i <= $#__vsc_env_keys; i++))
;
do
if
[
[
"${__vsc_env_keys[$i]}"
==
"$key"
]
]
;
then
if
[
[
"${__vsc_env_values[$i]}"
!=
"$value"
]
]
;
then
[
$i
]
=
"$value"
builtin
printf
'\e]633;EnvSingleEntry;%s;%s;%s\a'
"$key"
"$(__vsc_escape_value "$value")"
"$__vsc_nonce"
fi
return
fi
done
# Key does not exist so add key, value pair
__vsc_env_keys
+=
(
"$key"
)
__vsc_env_values
+=
(
"$value"
)
builtin
printf
'\e]633;EnvSingleEntry;%s;%s;%s\a'
"$key"
"$(__vsc_escape_value "$value")"
"$__vsc_nonce"
}
__vsc_update_env
(
)
{
if
[
[
${#envVarsToReport[@]}
-gt
0
]
]
;
then
builtin
printf
'\e]633;EnvSingleStart;%s;%s;\a'
0
$__vsc_nonce
if
[
$__vsc_use_aa
-eq
1
]
;
then
if
[
[
${#vsc_aa_env[@]}
-eq
0
]
]
;
then
# Associative array is empty, do not diff, just add
for
key
in
"${envVarsToReport[@]}"
;
do
if
[
[
-n
"$key"
&&
-n
"${(P)key+_}"
]
]
;
then
[
"$key"
]
=
"${(P)key}"
builtin
printf
'\e]633;EnvSingleEntry;%s;%s;%s\a'
"$key"
"$(__vsc_escape_value "${(P)key}"
)
" "
$__vsc_nonce
"
fi
done
else
# Diff approach for associative array
for var in "
${envVarsToReport[@]}
"; do
if [[ -n "
$var
" && -n "
${(P)var+_}
" ]]; then
value="
${(P)var}
"
__update_env_cache_aa "
$var
" "
$value
"
fi
done
# Track missing env vars not needed for now, as we are only tracking pre-defined env var from terminalEnvironment.
fi
else
# Two arrays approach
if [[ ${#__vsc_env_keys[@]} -eq 0 ]] && [[ ${#__vsc_env_values[@]} -eq 0 ]]; then
# Non-associative arrays are both empty, do not diff, just add
for key in "
"
fi
done
else
# Diff approach for non-associative arrays
for var in "
${envVarsToReport[@]}
"; do
if [[ -n "
$var
" && -n "
${(P)var+_}
" ]]; then
value="
${(P)var}
"
__update_env_cache "
$var
" "
$value
"
fi
done
# Track missing env vars not needed for now, as we are only tracking pre-defined env var from terminalEnvironment.
fi
fi
builtin printf '\e]633;EnvSingleEnd;%s;\a' $__vsc_nonce
fi
}
__vsc_command_output_start() {
builtin printf '\e]633;E;%s;%s\a' "