mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-21 14:07:20 +08:00
fix(vscode): preserve logo override on terminal restart
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
|
||||
import type { KiloClient } from "@kilocode/sdk/v2/client"
|
||||
|
||||
const env = { KILO_UNICODE_LOGO: "0" }
|
||||
|
||||
/**
|
||||
* Everything the manager needs from the surrounding AgentManagerProvider.
|
||||
*
|
||||
@@ -73,7 +75,7 @@ export class TerminalManager {
|
||||
title: params.title,
|
||||
// xterm's DOM renderer cannot draw the Unicode sextant glyphs used by
|
||||
// Kilo's modern wordmark, so use the compatible logo in embedded tabs.
|
||||
env: { KILO_UNICODE_LOGO: "0" },
|
||||
env,
|
||||
})
|
||||
if (error || !data) {
|
||||
const err = error instanceof Error ? error.message : String(error ?? "unknown error")
|
||||
@@ -240,6 +242,7 @@ export class TerminalManager {
|
||||
directory: entry.cwd,
|
||||
cwd: entry.cwd,
|
||||
title: entry.title,
|
||||
env,
|
||||
})
|
||||
const info = created.data
|
||||
if (created.error || !info)
|
||||
|
||||
@@ -51,6 +51,9 @@ describe("Agent Manager terminal routing", () => {
|
||||
projectId: "prj-1",
|
||||
})
|
||||
expect(envs[0]).toEqual({ KILO_UNICODE_LOGO: "0" })
|
||||
router.handle({ type: "agentManager.terminal.restart", terminalId: "side-1" })
|
||||
await wait()
|
||||
expect(envs[1]).toEqual({ KILO_UNICODE_LOGO: "0" })
|
||||
|
||||
router.handle({
|
||||
type: "agentManager.terminal.create",
|
||||
@@ -58,7 +61,9 @@ describe("Agent Manager terminal routing", () => {
|
||||
placement: "side",
|
||||
worktreeId: "missing",
|
||||
})
|
||||
expect(messages[1]).toMatchObject({
|
||||
expect(
|
||||
messages.find((message) => message.type === "agentManager.terminal.error" && message.createId === "side-missing"),
|
||||
).toMatchObject({
|
||||
type: "agentManager.terminal.error",
|
||||
createId: "side-missing",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user