feat(vscode): clarify sandbox restriction states

This commit is contained in:
marius-kilocode
2026-06-25 12:20:03 +02:00
parent 2808def87a
commit 641c646c90
25 changed files with 385 additions and 40 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
"kilo-code": patch
---
Show when network restrictions are configured on the sandbox toggle.
Show filesystem and network restriction states in the sandbox tooltip.
@@ -70,15 +70,17 @@ describe("PromptInput sandbox toggle", () => {
expect(src).not.toContain("if (state === current) return true")
})
it("adds a neutral network badge whenever network restriction is configured", () => {
it("explains filesystem and network state without changing the lock icon", () => {
expect(src).toContain(
"const sandboxNetworkEnabled = () => config().experimental?.sandbox_restrict_network !== false",
)
expect(src).toContain('<Icon name="lock" size="small" />')
expect(src).toContain("<Show when={sandboxNetworkEnabled()}>")
expect(src).toContain('class="prompt-sandbox-network"')
expect(src).toContain("<SandboxTooltipContent enabled={sandboxEnabled()} network={sandboxNetworkEnabled()} />")
expect(src).toContain('<Icon name="folder" size="small" />')
expect(src).toContain('<Icon name="globe" size="small" />')
expect(src).not.toContain('<path d="M1.3 4h5.4')
expect(src).toContain("props.enabled && props.network")
expect(src).not.toContain('class="prompt-sandbox-network"')
expect(src).not.toContain('class="prompt-sandbox-icon"')
expect(icons).toContain("globe: {")
})
})
@@ -83,6 +83,49 @@ interface PromptInputProps {
pendingSessionID?: string
}
export const SandboxTooltipContent: Component<{ enabled: boolean; network: boolean }> = (props) => {
const language = useLanguage()
return (
<div class="prompt-sandbox-tooltip">
<div class="prompt-sandbox-tooltip-title">
{language.t(props.enabled ? "prompt.action.sandbox.status.enabled" : "prompt.action.sandbox.status.disabled")}
</div>
<div class="prompt-sandbox-tooltip-row">
<Icon name="folder" size="small" />
<span>{language.t("prompt.action.sandbox.filesystem")}</span>
<span class="prompt-sandbox-tooltip-state">
{language.t(
props.enabled ? "prompt.action.sandbox.filesystem.restricted" : "prompt.action.sandbox.unrestricted",
)}
</span>
</div>
<div class="prompt-sandbox-tooltip-row">
<Icon name="globe" size="small" />
<span>{language.t("prompt.action.sandbox.network")}</span>
<span class="prompt-sandbox-tooltip-state">
{language.t(
props.enabled && props.network
? "prompt.action.sandbox.network.blocked"
: props.enabled
? "prompt.action.sandbox.network.allowed"
: "prompt.action.sandbox.unrestricted",
)}
</span>
</div>
<div class="prompt-sandbox-tooltip-description">
{language.t(
props.enabled
? "prompt.action.sandbox.description.enabled"
: props.network
? "prompt.action.sandbox.description.disabled"
: "prompt.action.sandbox.description.disabledNetworkAllowed",
)}
</div>
</div>
)
}
export const PromptInput: Component<PromptInputProps> = (props) => {
const session = useSession()
const server = useServer()
@@ -1218,12 +1261,13 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
<Show when={sandboxVisible()}>
<Tooltip
value={
sandbox()?.available === false
? (sandbox()?.reason ?? language.t("common.requestFailed"))
: sandboxEnabled()
? language.t("prompt.action.sandbox.enabled")
: language.t("prompt.action.sandbox.disabled")
sandbox()?.available === false ? (
(sandbox()?.reason ?? language.t("common.requestFailed"))
) : (
<SandboxTooltipContent enabled={sandboxEnabled()} network={sandboxNetworkEnabled()} />
)
}
contentClass="prompt-sandbox-tooltip-content"
placement="top"
>
<Button
@@ -1244,14 +1288,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
aria-pressed={sandboxEnabled()}
class={`prompt-status-button ${sandboxEnabled() ? "prompt-status-button--active" : ""}`}
>
<span class="prompt-sandbox-icon">
<Icon name="lock" size="small" />
<Show when={sandboxNetworkEnabled()}>
<span class="prompt-sandbox-network" aria-hidden="true">
<Icon name="globe" size="small" />
</span>
</Show>
</span>
<Icon name="lock" size="small" />
</Button>
</Tooltip>
</Show>
+12
View File
@@ -288,6 +288,18 @@ export const dict = {
"prompt.action.sandbox.enabled": "sandbox مُفعّل. أوامر shell الخاصة بالوكيل مقتصرة على مجلدات المشروع و Kilo.",
"prompt.action.sandbox.disabled":
"sandbox مُعطّل. انقر لتقييد كتابة أوامر shell الخاصة بالوكيل على مجلدات المشروع و Kilo.",
"prompt.action.sandbox.status.enabled": "العزل مُفعّل",
"prompt.action.sandbox.status.disabled": "العزل مُعطّل",
"prompt.action.sandbox.filesystem": "نظام الملفات",
"prompt.action.sandbox.network": "الشبكة",
"prompt.action.sandbox.filesystem.restricted": "مقيّد",
"prompt.action.sandbox.network.blocked": "محظورة",
"prompt.action.sandbox.network.allowed": "مسموح بها",
"prompt.action.sandbox.unrestricted": "غير مقيّد",
"prompt.action.sandbox.description.enabled": "تقتصر عمليات الكتابة على مجلدات المشروع و Kilo.",
"prompt.action.sandbox.description.disabled": "انقر لتقييد الكتابة في نظام الملفات والوصول إلى الشبكة.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"انقر لتقييد الكتابة في نظام الملفات. يظل الوصول إلى الشبكة مسموحًا وفق إعدادات sandbox.",
"speechToText.tooltip.start": "بدء الإدخال الصوتي باستخدام Kilo Gateway",
"speechToText.tooltip.stop": "إيقاف التقاط الصوت",
+14
View File
@@ -293,6 +293,20 @@ export const dict = {
"Sandbox ativado. Os comandos shell do agente estão limitados aos diretórios do projeto e do Kilo.",
"prompt.action.sandbox.disabled":
"Sandbox desativado. Clique para limitar as escritas dos comandos shell do agente aos diretórios do projeto e do Kilo.",
"prompt.action.sandbox.status.enabled": "Sandbox ativado",
"prompt.action.sandbox.status.disabled": "Sandbox desativado",
"prompt.action.sandbox.filesystem": "Sistema de arquivos",
"prompt.action.sandbox.network": "Rede",
"prompt.action.sandbox.filesystem.restricted": "Restrito",
"prompt.action.sandbox.network.blocked": "Bloqueada",
"prompt.action.sandbox.network.allowed": "Permitida",
"prompt.action.sandbox.unrestricted": "Sem restrições",
"prompt.action.sandbox.description.enabled":
"As operações de escrita são limitadas aos diretórios do projeto e do Kilo.",
"prompt.action.sandbox.description.disabled":
"Clique para restringir as operações de escrita no sistema de arquivos e o acesso à rede.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Clique para restringir as operações de escrita no sistema de arquivos. O acesso à rede continua permitido pelas configurações do sandbox.",
"speechToText.tooltip.start": "Iniciar entrada de voz com o Kilo Gateway",
"speechToText.tooltip.stop": "Parar captura",
+12
View File
@@ -293,6 +293,18 @@ export const dict = {
"Sandbox je omogućen. Shell komande agenta su ograničene na direktorije projekta i Kilo.",
"prompt.action.sandbox.disabled":
"Sandbox je onemogućen. Kliknite da ograničite pisanje shell komandi agenta na direktorije projekta i Kilo.",
"prompt.action.sandbox.status.enabled": "Sandbox omogućen",
"prompt.action.sandbox.status.disabled": "Sandbox onemogućen",
"prompt.action.sandbox.filesystem": "Datotečni sistem",
"prompt.action.sandbox.network": "Mreža",
"prompt.action.sandbox.filesystem.restricted": "Ograničen",
"prompt.action.sandbox.network.blocked": "Blokirana",
"prompt.action.sandbox.network.allowed": "Dozvoljena",
"prompt.action.sandbox.unrestricted": "Bez ograničenja",
"prompt.action.sandbox.description.enabled": "Pisanje je ograničeno na direktorije projekta i Kilo.",
"prompt.action.sandbox.description.disabled": "Kliknite da ograničite pisanje u datotečni sistem i pristup mreži.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Kliknite da ograničite pisanje u datotečni sistem. Pristup mreži ostaje dozvoljen prema vašim sandbox postavkama.",
"speechToText.tooltip.start": "Započni glasovni unos sa Kilo Gateway",
"speechToText.tooltip.stop": "Zaustavi hvatanje zvuka",
+12
View File
@@ -292,6 +292,18 @@ export const dict = {
"Sandbox er aktiveret. Shell-kommandoer for agenten er begrænset til projekt- og Kilo-mapperne.",
"prompt.action.sandbox.disabled":
"Sandbox er deaktiveret. Klik for at begrænse skrivning af shell-kommandoer for agenten til projekt- og Kilo-mapperne.",
"prompt.action.sandbox.status.enabled": "Sandbox aktiveret",
"prompt.action.sandbox.status.disabled": "Sandbox deaktiveret",
"prompt.action.sandbox.filesystem": "Filsystem",
"prompt.action.sandbox.network": "Netværk",
"prompt.action.sandbox.filesystem.restricted": "Begrænset",
"prompt.action.sandbox.network.blocked": "Blokeret",
"prompt.action.sandbox.network.allowed": "Tilladt",
"prompt.action.sandbox.unrestricted": "Ubegrænset",
"prompt.action.sandbox.description.enabled": "Skrivning er begrænset til projekt- og Kilo-mapperne.",
"prompt.action.sandbox.description.disabled": "Klik for at begrænse skriveadgang til filsystemet og netværksadgang.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Klik for at begrænse skriveadgang til filsystemet. Netværksadgang er fortsat tilladt ifølge dine sandboxindstillinger.",
"speechToText.tooltip.start": "Start stemmeinput med Kilo Gateway",
"speechToText.tooltip.stop": "Stop lydoptagelse",
+14
View File
@@ -296,6 +296,20 @@ export const dict = {
"Sandbox ist aktiviert. Shell-Befehle des Agenten sind auf die Projekt- und Kilo-Verzeichnisse beschränkt.",
"prompt.action.sandbox.disabled":
"Sandbox ist deaktiviert. Klicken, um Schreibvorgänge der Shell-Befehle des Agenten auf die Projekt- und Kilo-Verzeichnisse zu beschränken.",
"prompt.action.sandbox.status.enabled": "Sandbox aktiviert",
"prompt.action.sandbox.status.disabled": "Sandbox deaktiviert",
"prompt.action.sandbox.filesystem": "Dateisystem",
"prompt.action.sandbox.network": "Netzwerk",
"prompt.action.sandbox.filesystem.restricted": "Eingeschränkt",
"prompt.action.sandbox.network.blocked": "Blockiert",
"prompt.action.sandbox.network.allowed": "Erlaubt",
"prompt.action.sandbox.unrestricted": "Uneingeschränkt",
"prompt.action.sandbox.description.enabled":
"Schreibvorgänge sind auf die Projekt- und Kilo-Verzeichnisse beschränkt.",
"prompt.action.sandbox.description.disabled":
"Klicken, um Schreibvorgänge im Dateisystem und den Netzwerkzugriff einzuschränken.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Klicken, um Schreibvorgänge im Dateisystem einzuschränken. Der Netzwerkzugriff bleibt gemäß deinen Sandbox-Einstellungen erlaubt.",
"speechToText.tooltip.start": "Spracheingabe mit Kilo Gateway starten",
"speechToText.tooltip.stop": "Audioerfassung beenden",
@@ -289,6 +289,18 @@ export const dict = {
"Sandbox is enabled. Agent shell commands are confined to the project and Kilo directories.",
"prompt.action.sandbox.disabled":
"Sandbox is disabled. Click to confine agent shell command writes to the project and Kilo directories.",
"prompt.action.sandbox.status.enabled": "Sandbox enabled",
"prompt.action.sandbox.status.disabled": "Sandbox disabled",
"prompt.action.sandbox.filesystem": "Filesystem",
"prompt.action.sandbox.network": "Network",
"prompt.action.sandbox.filesystem.restricted": "Restricted",
"prompt.action.sandbox.network.blocked": "Blocked",
"prompt.action.sandbox.network.allowed": "Allowed",
"prompt.action.sandbox.unrestricted": "Unrestricted",
"prompt.action.sandbox.description.enabled": "Writes are limited to the project and Kilo directories.",
"prompt.action.sandbox.description.disabled": "Click to restrict filesystem writes and network access.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Click to restrict filesystem writes. Network access remains allowed by your sandbox settings.",
"prompt.action.resetModel": "Reset model to default",
"prompt.action.enhanceDescription":
"The 'Enhance Prompt' button helps improve your prompt by providing additional context, clarification, or rephrasing. Try typing a prompt in here and clicking the button again to see how it works.",
+13
View File
@@ -294,6 +294,19 @@ export const dict = {
"Sandbox activado. Los comandos de shell del agente están limitados a los directorios del proyecto y de Kilo.",
"prompt.action.sandbox.disabled":
"Sandbox desactivado. Haz clic para limitar las escrituras de los comandos de shell del agente a los directorios del proyecto y de Kilo.",
"prompt.action.sandbox.status.enabled": "Sandbox activado",
"prompt.action.sandbox.status.disabled": "Sandbox desactivado",
"prompt.action.sandbox.filesystem": "Sistema de archivos",
"prompt.action.sandbox.network": "Red",
"prompt.action.sandbox.filesystem.restricted": "Restringido",
"prompt.action.sandbox.network.blocked": "Bloqueada",
"prompt.action.sandbox.network.allowed": "Permitida",
"prompt.action.sandbox.unrestricted": "Sin restricciones",
"prompt.action.sandbox.description.enabled": "Las escrituras se limitan a los directorios del proyecto y de Kilo.",
"prompt.action.sandbox.description.disabled":
"Haz clic para restringir las escrituras en el sistema de archivos y el acceso a la red.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Haz clic para restringir las escrituras en el sistema de archivos. El acceso a la red seguirá permitido según la configuración de tu sandbox.",
"speechToText.tooltip.start": "Iniciar entrada de voz con Kilo Gateway",
"speechToText.tooltip.stop": "Detener captura",
+13
View File
@@ -295,6 +295,19 @@ export const dict = {
"Le sandbox est activé. Les commandes shell de l'agent sont limitées aux répertoires du projet et de Kilo.",
"prompt.action.sandbox.disabled":
"Le sandbox est désactivé. Cliquez pour limiter les écritures des commandes shell de l'agent aux répertoires du projet et de Kilo.",
"prompt.action.sandbox.status.enabled": "Sandbox activé",
"prompt.action.sandbox.status.disabled": "Sandbox désactivé",
"prompt.action.sandbox.filesystem": "Système de fichiers",
"prompt.action.sandbox.network": "Réseau",
"prompt.action.sandbox.filesystem.restricted": "Restreint",
"prompt.action.sandbox.network.blocked": "Bloqué",
"prompt.action.sandbox.network.allowed": "Autorisé",
"prompt.action.sandbox.unrestricted": "Sans restriction",
"prompt.action.sandbox.description.enabled": "Les écritures sont limitées aux répertoires du projet et de Kilo.",
"prompt.action.sandbox.description.disabled":
"Cliquez pour restreindre les écritures dans le système de fichiers et l'accès au réseau.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Cliquez pour restreindre les écritures dans le système de fichiers. L'accès au réseau reste autorisé par vos paramètres de sandbox.",
"speechToText.tooltip.start": "Démarrer la saisie vocale avec Kilo Gateway",
"speechToText.tooltip.stop": "Arrêter la capture audio",
+13
View File
@@ -1210,6 +1210,19 @@ export const dict = {
"Sandbox abilitata. I comandi shell dell'agente sono limitati alle directory del progetto e di Kilo.",
"prompt.action.sandbox.disabled":
"Sandbox disabilitata. Fai clic per limitare le scritture dei comandi shell dell'agente alle directory del progetto e di Kilo.",
"prompt.action.sandbox.status.enabled": "Sandbox abilitata",
"prompt.action.sandbox.status.disabled": "Sandbox disabilitata",
"prompt.action.sandbox.filesystem": "File system",
"prompt.action.sandbox.network": "Rete",
"prompt.action.sandbox.filesystem.restricted": "Limitato",
"prompt.action.sandbox.network.blocked": "Bloccata",
"prompt.action.sandbox.network.allowed": "Consentita",
"prompt.action.sandbox.unrestricted": "Senza restrizioni",
"prompt.action.sandbox.description.enabled": "Le scritture sono limitate alle directory del progetto e di Kilo.",
"prompt.action.sandbox.description.disabled":
"Fai clic per limitare le scritture nel file system e l'accesso alla rete.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Fai clic per limitare le scritture nel file system. L'accesso alla rete resta consentito dalle impostazioni della sandbox.",
"settings.experimental.sandbox.title": "Sandbox",
"settings.experimental.sandbox.description":
"Esegui i comandi shell dell'agente all'interno di un sandbox a livello di sistema operativo che limita le scritture alle directory di stato del progetto e di Kilo",
+13
View File
@@ -290,6 +290,19 @@ export const dict = {
"サンドボックスが有効です。エージェントのシェルコマンドは、プロジェクトおよびKiloディレクトリに制限されています。",
"prompt.action.sandbox.disabled":
"サンドボックスが無効です。クリックしてエージェントのシェルコマンドの書き込みをプロジェクトおよびKiloディレクトリに制限します。",
"prompt.action.sandbox.status.enabled": "サンドボックス有効",
"prompt.action.sandbox.status.disabled": "サンドボックス無効",
"prompt.action.sandbox.filesystem": "ファイルシステム",
"prompt.action.sandbox.network": "ネットワーク",
"prompt.action.sandbox.filesystem.restricted": "制限あり",
"prompt.action.sandbox.network.blocked": "ブロック",
"prompt.action.sandbox.network.allowed": "許可",
"prompt.action.sandbox.unrestricted": "制限なし",
"prompt.action.sandbox.description.enabled": "書き込みはプロジェクトおよびKiloディレクトリ内に制限されます。",
"prompt.action.sandbox.description.disabled":
"クリックすると、ファイルシステムへの書き込みとネットワークアクセスを制限します。",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"クリックすると、ファイルシステムへの書き込みを制限します。サンドボックス設定により、ネットワークアクセスは引き続き許可されます。",
"speechToText.tooltip.start": "Kilo Gatewayで音声入力を開始",
"speechToText.tooltip.stop": "音声キャプチャを停止",
+12
View File
@@ -292,6 +292,18 @@ export const dict = {
"샌드박스가 활성화되어 있습니다. 에이전트 셸 명령은 프로젝트 및 Kilo 디렉터리로 제한됩니다.",
"prompt.action.sandbox.disabled":
"샌드박스가 비활성화되어 있습니다. 클릭하여 에이전트 셸 명령 쓰기를 프로젝트 및 Kilo 디렉터리로 제한합니다.",
"prompt.action.sandbox.status.enabled": "샌드박스 활성화됨",
"prompt.action.sandbox.status.disabled": "샌드박스 비활성화됨",
"prompt.action.sandbox.filesystem": "파일 시스템",
"prompt.action.sandbox.network": "네트워크",
"prompt.action.sandbox.filesystem.restricted": "제한됨",
"prompt.action.sandbox.network.blocked": "차단됨",
"prompt.action.sandbox.network.allowed": "허용됨",
"prompt.action.sandbox.unrestricted": "제한 없음",
"prompt.action.sandbox.description.enabled": "쓰기는 프로젝트 및 Kilo 디렉터리로 제한됩니다.",
"prompt.action.sandbox.description.disabled": "클릭하면 파일 시스템 쓰기와 네트워크 액세스를 제한합니다.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"클릭하면 파일 시스템 쓰기를 제한합니다. 샌드박스 설정에 따라 네트워크 액세스는 계속 허용됩니다.",
"speechToText.tooltip.start": "Kilo Gateway로 음성 입력 시작",
"speechToText.tooltip.stop": "음성 캡처 중지",
+13
View File
@@ -294,6 +294,19 @@ export const dict = {
"Sandbox is ingeschakeld. Shell-opdrachten van de agent zijn beperkt tot de project- en Kilo-mappen.",
"prompt.action.sandbox.disabled":
"Sandbox is uitgeschakeld. Klik om schrijfbewerkingen van shell-opdrachten van de agent te beperken tot de project- en Kilo-mappen.",
"prompt.action.sandbox.status.enabled": "Sandbox ingeschakeld",
"prompt.action.sandbox.status.disabled": "Sandbox uitgeschakeld",
"prompt.action.sandbox.filesystem": "Bestandssysteem",
"prompt.action.sandbox.network": "Netwerk",
"prompt.action.sandbox.filesystem.restricted": "Beperkt",
"prompt.action.sandbox.network.blocked": "Geblokkeerd",
"prompt.action.sandbox.network.allowed": "Toegestaan",
"prompt.action.sandbox.unrestricted": "Onbeperkt",
"prompt.action.sandbox.description.enabled": "Schrijfbewerkingen zijn beperkt tot de project- en Kilo-mappen.",
"prompt.action.sandbox.description.disabled":
"Klik om schrijfbewerkingen in het bestandssysteem en netwerktoegang te beperken.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Klik om schrijfbewerkingen in het bestandssysteem te beperken. Netwerktoegang blijft toegestaan volgens je sandboxinstellingen.",
"speechToText.tooltip.start": "Spraakinvoer starten met Kilo Gateway",
"speechToText.tooltip.stop": "Audio vastleggen stoppen",
+13
View File
@@ -296,6 +296,19 @@ export const dict = {
"Sandbox er aktivert. Shell-kommandoer for agenten er begrenset til prosjekt- og Kilo-mappene.",
"prompt.action.sandbox.disabled":
"Sandbox er deaktivert. Klikk for å begrense skriving av shell-kommandoer for agenten til prosjekt- og Kilo-mappene.",
"prompt.action.sandbox.status.enabled": "Sandbox aktivert",
"prompt.action.sandbox.status.disabled": "Sandbox deaktivert",
"prompt.action.sandbox.filesystem": "Filsystem",
"prompt.action.sandbox.network": "Nettverk",
"prompt.action.sandbox.filesystem.restricted": "Begrenset",
"prompt.action.sandbox.network.blocked": "Blokkert",
"prompt.action.sandbox.network.allowed": "Tillatt",
"prompt.action.sandbox.unrestricted": "Ubegrenset",
"prompt.action.sandbox.description.enabled": "Skrivetilgang er begrenset til prosjekt- og Kilo-mappene.",
"prompt.action.sandbox.description.disabled":
"Klikk for å begrense skrivetilgang til filsystemet og nettverkstilgang.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Klikk for å begrense skrivetilgang til filsystemet. Nettverkstilgang er fortsatt tillatt av sandbox-innstillingene dine.",
"speechToText.tooltip.start": "Start taleinndata med Kilo Gateway",
"speechToText.tooltip.stop": "Stopp lydfangst",
+12
View File
@@ -293,6 +293,18 @@ export const dict = {
"Sandbox jest włączony. Polecenia shell agenta są ograniczone do katalogów projektu i Kilo.",
"prompt.action.sandbox.disabled":
"Sandbox jest wyłączony. Kliknij, aby ograniczyć zapisy poleceń shell agenta do katalogów projektu i Kilo.",
"prompt.action.sandbox.status.enabled": "Sandbox włączony",
"prompt.action.sandbox.status.disabled": "Sandbox wyłączony",
"prompt.action.sandbox.filesystem": "System plików",
"prompt.action.sandbox.network": "Sieć",
"prompt.action.sandbox.filesystem.restricted": "Ograniczony",
"prompt.action.sandbox.network.blocked": "Zablokowana",
"prompt.action.sandbox.network.allowed": "Dozwolona",
"prompt.action.sandbox.unrestricted": "Nieograniczony",
"prompt.action.sandbox.description.enabled": "Zapisy są ograniczone do katalogów projektu i Kilo.",
"prompt.action.sandbox.description.disabled": "Kliknij, aby ograniczyć zapisy w systemie plików i dostęp do sieci.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Kliknij, aby ograniczyć zapisy w systemie plików. Ustawienia sandboxa nadal zezwalają na dostęp do sieci.",
"speechToText.tooltip.start": "Rozpocznij wprowadzanie głosowe z Kilo Gateway",
"speechToText.tooltip.stop": "Zatrzymaj przechwytywanie dźwięku",
+12
View File
@@ -290,6 +290,18 @@ export const dict = {
"prompt.action.sandbox.enabled": "Песочница включена. Команды оболочки агента ограничены каталогами проекта и Kilo.",
"prompt.action.sandbox.disabled":
"Песочница отключена. Нажмите, чтобы ограничить запись команд оболочки агента каталогами проекта и Kilo.",
"prompt.action.sandbox.status.enabled": "Песочница включена",
"prompt.action.sandbox.status.disabled": "Песочница отключена",
"prompt.action.sandbox.filesystem": "Файловая система",
"prompt.action.sandbox.network": "Сеть",
"prompt.action.sandbox.filesystem.restricted": "Ограничена",
"prompt.action.sandbox.network.blocked": "Заблокирована",
"prompt.action.sandbox.network.allowed": "Разрешена",
"prompt.action.sandbox.unrestricted": "Без ограничений",
"prompt.action.sandbox.description.enabled": "Запись разрешена только в каталогах проекта и Kilo.",
"prompt.action.sandbox.description.disabled": "Нажмите, чтобы ограничить запись в файловую систему и доступ к сети.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Нажмите, чтобы ограничить запись в файловую систему. Доступ к сети останется разрешённым согласно настройкам песочницы.",
"speechToText.tooltip.start": "Начать голосовой ввод с Kilo Gateway",
"speechToText.tooltip.stop": "Остановить захват звука",
+12
View File
@@ -291,6 +291,18 @@ export const dict = {
"เปิดใช้งาน sandbox แล้ว คำสั่ง shell ของ agent ถูกจำกัดไว้ที่โฟลเดอร์โปรเจ็กต์และ Kilo",
"prompt.action.sandbox.disabled":
"ปิดใช้งาน sandbox อยู่ คลิกเพื่อจำกัดการเขียนคำสั่ง shell ของ agent ไว้ที่โฟลเดอร์โปรเจ็กต์และ Kilo",
"prompt.action.sandbox.status.enabled": "เปิด sandbox แล้ว",
"prompt.action.sandbox.status.disabled": "ปิด sandbox แล้ว",
"prompt.action.sandbox.filesystem": "ระบบไฟล์",
"prompt.action.sandbox.network": "เครือข่าย",
"prompt.action.sandbox.filesystem.restricted": "จำกัด",
"prompt.action.sandbox.network.blocked": "บล็อก",
"prompt.action.sandbox.network.allowed": "อนุญาต",
"prompt.action.sandbox.unrestricted": "ไม่จำกัด",
"prompt.action.sandbox.description.enabled": "เขียนได้เฉพาะในโฟลเดอร์โปรเจ็กต์และ Kilo",
"prompt.action.sandbox.description.disabled": "คลิกเพื่อจำกัดการเขียนในระบบไฟล์และการเข้าถึงเครือข่าย",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"คลิกเพื่อจำกัดการเขียนในระบบไฟล์ การตั้งค่า sandbox ของคุณยังคงอนุญาตให้เข้าถึงเครือข่าย",
"speechToText.tooltip.start": "เริ่มการป้อนข้อมูลด้วยเสียงด้วย Kilo Gateway",
"speechToText.tooltip.stop": "หยุดจับเสียง",
+13
View File
@@ -290,6 +290,19 @@ export const dict = {
"prompt.action.sandbox.enabled": "Sandbox etkin. Agent shell komutları proje ve Kilo dizinleriyle sınırlıdır.",
"prompt.action.sandbox.disabled":
"Sandbox devre dışı. Agent shell komut yazma işlemlerini proje ve Kilo dizinleriyle sınırlamak için tıklayın.",
"prompt.action.sandbox.status.enabled": "Sandbox etkin",
"prompt.action.sandbox.status.disabled": "Sandbox devre dışı",
"prompt.action.sandbox.filesystem": "Dosya sistemi",
"prompt.action.sandbox.network": "Ağ",
"prompt.action.sandbox.filesystem.restricted": "Kısıtlı",
"prompt.action.sandbox.network.blocked": "Engellendi",
"prompt.action.sandbox.network.allowed": "İzin verildi",
"prompt.action.sandbox.unrestricted": "Kısıtlanmamış",
"prompt.action.sandbox.description.enabled": "Yazma işlemleri proje ve Kilo dizinleriyle sınırlıdır.",
"prompt.action.sandbox.description.disabled":
"Dosya sistemi yazma işlemlerini ve ağ erişimini kısıtlamak için tıklayın.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Dosya sistemi yazma işlemlerini kısıtlamak için tıklayın. Sandbox ayarlarınız ağ erişimine izin vermeye devam ediyor.",
"speechToText.tooltip.start": "Kilo Gateway ile sesli girişi başlatın",
"speechToText.tooltip.stop": "Ses yakalamayı durdur",
+12
View File
@@ -292,6 +292,18 @@ export const dict = {
"prompt.action.sandbox.enabled": "Пісочницю увімкнено. Команди оболонки агента обмежені каталогами проєкту та Kilo.",
"prompt.action.sandbox.disabled":
"Пісочницю вимкнено. Натисніть, щоб обмежити запис команд оболонки агента каталогами проєкту та Kilo.",
"prompt.action.sandbox.status.enabled": "Пісочницю увімкнено",
"prompt.action.sandbox.status.disabled": "Пісочницю вимкнено",
"prompt.action.sandbox.filesystem": "Файлова система",
"prompt.action.sandbox.network": "Мережа",
"prompt.action.sandbox.filesystem.restricted": "Обмежено",
"prompt.action.sandbox.network.blocked": "Заблоковано",
"prompt.action.sandbox.network.allowed": "Дозволено",
"prompt.action.sandbox.unrestricted": "Без обмежень",
"prompt.action.sandbox.description.enabled": "Запис дозволено лише в каталогах проєкту та Kilo.",
"prompt.action.sandbox.description.disabled": "Натисніть, щоб обмежити запис у файлову систему та доступ до мережі.",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"Натисніть, щоб обмежити запис у файлову систему. Доступ до мережі залишиться дозволеним відповідно до налаштувань пісочниці.",
"speechToText.tooltip.start": "Почати голосове введення з Kilo Gateway",
"speechToText.tooltip.stop": "Зупинити захоплення звуку",
+12
View File
@@ -288,6 +288,18 @@ export const dict = {
"prompt.action.sandbox.disable": "禁用沙盒",
"prompt.action.sandbox.enabled": "沙盒已启用。代理 shell 命令被限制在项目和 Kilo 目录内。",
"prompt.action.sandbox.disabled": "沙盒已禁用。点击以将代理 shell 命令的写入限制在项目和 Kilo 目录内。",
"prompt.action.sandbox.status.enabled": "沙盒已启用",
"prompt.action.sandbox.status.disabled": "沙盒已禁用",
"prompt.action.sandbox.filesystem": "文件系统",
"prompt.action.sandbox.network": "网络",
"prompt.action.sandbox.filesystem.restricted": "受限",
"prompt.action.sandbox.network.blocked": "已阻止",
"prompt.action.sandbox.network.allowed": "允许",
"prompt.action.sandbox.unrestricted": "不受限",
"prompt.action.sandbox.description.enabled": "写入仅限项目和 Kilo 目录。",
"prompt.action.sandbox.description.disabled": "点击以限制文件系统写入和网络访问。",
"prompt.action.sandbox.description.disabledNetworkAllowed":
"点击以限制文件系统写入。根据你的沙盒设置,网络访问仍然允许。",
"speechToText.tooltip.start": "使用 Kilo Gateway 开始语音输入",
"speechToText.tooltip.stop": "停止捕获音频",
+11
View File
@@ -287,6 +287,17 @@ export const dict = {
"prompt.action.sandbox.disable": "停用沙盒",
"prompt.action.sandbox.enabled": "沙盒已啟用。代理 shell 指令被限制在專案和 Kilo 目錄內。",
"prompt.action.sandbox.disabled": "沙盒已停用。點擊以將代理 shell 指令的寫入限制在專案和 Kilo 目錄內。",
"prompt.action.sandbox.status.enabled": "沙盒已啟用",
"prompt.action.sandbox.status.disabled": "沙盒已停用",
"prompt.action.sandbox.filesystem": "檔案系統",
"prompt.action.sandbox.network": "網路",
"prompt.action.sandbox.filesystem.restricted": "受限制",
"prompt.action.sandbox.network.blocked": "已封鎖",
"prompt.action.sandbox.network.allowed": "允許",
"prompt.action.sandbox.unrestricted": "不受限制",
"prompt.action.sandbox.description.enabled": "寫入僅限於專案和 Kilo 目錄。",
"prompt.action.sandbox.description.disabled": "點擊以限制檔案系統寫入和網路存取。",
"prompt.action.sandbox.description.disabledNetworkAllowed": "點擊以限制檔案系統寫入。沙盒設定仍允許網路存取。",
"speechToText.tooltip.start": "使用 Kilo Gateway 開始語音輸入",
"speechToText.tooltip.stop": "停止擷取音訊",
@@ -16,7 +16,10 @@ import { type ParentComponent } from "solid-js"
import { StoryProviders, mockSessionValue } from "./StoryProviders"
import { SessionContext } from "../context/session"
import { ServerContext } from "../context/server"
import { PromptInput } from "../components/chat/PromptInput"
import { PromptInput, SandboxTooltipContent } from "../components/chat/PromptInput"
import { Button } from "@kilocode/kilo-ui/button"
import { Icon } from "@kilocode/kilo-ui/icon"
import { Tooltip } from "@kilocode/kilo-ui/tooltip"
const agents = [
{ name: "code", description: "Write, edit and review code", mode: "primary" as const },
@@ -135,6 +138,46 @@ export const SandboxNetworkDisabled420: Story = {
),
}
export const SandboxTooltipEnabled: Story = {
name: "Sandbox tooltip — enabled",
render: () => (
<StoryProviders>
<div style={{ padding: "120px 0 0 180px" }}>
<Tooltip
forceOpen
value={<SandboxTooltipContent enabled network />}
contentClass="prompt-sandbox-tooltip-content"
placement="top"
>
<Button variant="ghost" size="small" class="prompt-status-button prompt-status-button--active">
<Icon name="lock" size="small" />
</Button>
</Tooltip>
</div>
</StoryProviders>
),
}
export const SandboxTooltipDisabled: Story = {
name: "Sandbox tooltip — disabled",
render: () => (
<StoryProviders>
<div style={{ padding: "120px 0 0 180px" }}>
<Tooltip
forceOpen
value={<SandboxTooltipContent enabled={false} network />}
contentClass="prompt-sandbox-tooltip-content"
placement="top"
>
<Button variant="ghost" size="small" class="prompt-status-button">
<Icon name="lock" size="small" />
</Button>
</Tooltip>
</div>
</StoryProviders>
),
}
// ---------------------------------------------------------------------------
// Stories — model with thinking-effort variants (ThinkingSelector visible)
// ---------------------------------------------------------------------------
@@ -564,33 +564,46 @@
position: relative;
}
.prompt-sandbox-icon {
position: relative;
display: inline-flex;
width: 16px;
height: 16px;
.prompt-sandbox-tooltip-content {
width: 260px;
padding: 10px 12px;
white-space: normal;
}
.prompt-sandbox-network {
position: absolute;
left: -2px;
bottom: -2px;
display: inline-flex;
width: 9px;
height: 9px;
border-radius: 999px;
color: var(--icon-base);
background: var(--surface-base, var(--vscode-editor-background));
pointer-events: none;
.prompt-sandbox-tooltip {
display: flex;
flex-direction: column;
gap: 8px;
}
.prompt-sandbox-tooltip-title {
color: var(--text-invert-strong);
font-weight: var(--font-weight-medium);
}
.prompt-sandbox-tooltip-row {
display: grid;
grid-template-columns: 16px 1fr auto;
align-items: center;
gap: 8px;
color: var(--text-invert-base);
[data-component="icon"] {
width: 100%;
height: 100%;
width: 16px;
height: 16px;
}
}
[data-component="icon"] [data-slot="icon-svg"] {
color: var(--icon-base) !important;
}
.prompt-sandbox-tooltip-state {
color: var(--text-invert-strong);
font-weight: var(--font-weight-medium);
}
.prompt-sandbox-tooltip-description {
padding-top: 8px;
border-top: 1px solid var(--border-weak-base);
color: var(--text-invert-base);
font-weight: var(--font-weight-normal);
}
.prompt-status-button--active {