Skip to content

Commit 67047fa

Browse files
chore: generate
1 parent a366128 commit 67047fa

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

packages/app/src/context/terminal.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ describe("getTerminalServerScope", () => {
6262
),
6363
).toBe("wsl:Debian" as ServerKey)
6464
expect(
65-
getTerminalServerScope({ type: "http", http: { url: "https://example.com" } }, "https://example.com" as ServerKey),
65+
getTerminalServerScope(
66+
{ type: "http", http: { url: "https://example.com" } },
67+
"https://example.com" as ServerKey,
68+
),
6669
).toBe("https://example.com" as ServerKey)
6770
})
6871
})

packages/app/src/context/terminal.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ export function getTerminalServerScope(conn: ServerConnection.Any | undefined, k
9494
if (conn.type === "http") {
9595
try {
9696
const url = new URL(conn.http.url)
97-
if (url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "::1" || url.hostname === "[::1]")
97+
if (
98+
url.hostname === "localhost" ||
99+
url.hostname === "127.0.0.1" ||
100+
url.hostname === "::1" ||
101+
url.hostname === "[::1]"
102+
)
98103
return
99104
} catch {
100105
return key
@@ -127,12 +132,7 @@ const trimTerminal = (pty: LocalPTY) => {
127132
}
128133
}
129134

130-
export function clearWorkspaceTerminals(
131-
dir: string,
132-
sessionIDs?: string[],
133-
platform?: Platform,
134-
scope?: string,
135-
) {
135+
export function clearWorkspaceTerminals(dir: string, sessionIDs?: string[], platform?: Platform, scope?: string) {
136136
const key = getWorkspaceTerminalCacheKey(dir, scope)
137137
for (const cache of caches) {
138138
const entry = cache.get(key)

0 commit comments

Comments
 (0)