perf(startup): load canvas, node-pty, ssh2, html-to-text and the OpenCode SDK on first use
Main module evaluation drops from ~420 ms to ~330 ms. Types stay as import type; the DeepSeek Harness chunks stay static because the protocol chunk shares code with Main startup paths.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { createHash, getCiphers } from 'node:crypto'
|
||||
import {
|
||||
import type {
|
||||
Client,
|
||||
type Algorithms,
|
||||
type CipherAlgorithm,
|
||||
type ConnectConfig,
|
||||
type ServerHostKeyAlgorithm
|
||||
Algorithms,
|
||||
CipherAlgorithm,
|
||||
ConnectConfig,
|
||||
ServerHostKeyAlgorithm
|
||||
} from 'ssh2'
|
||||
import { loadSsh2 } from './ssh2-module'
|
||||
import type {
|
||||
SshHostConnectionTestResult
|
||||
} from '../../shared/ssh-host-contracts'
|
||||
@@ -336,7 +337,7 @@ export class Ssh2Transport implements SshTransport {
|
||||
dependencies: Partial<SshTransportDependencies> = {}
|
||||
) {
|
||||
this.dependencies = {
|
||||
createClient: () => new Client(),
|
||||
createClient: () => new (loadSsh2().Client)(),
|
||||
now: Date.now,
|
||||
supportedOpenSslCiphers: getCiphers,
|
||||
systemAgent: defaultSystemAgent,
|
||||
|
||||
Reference in New Issue
Block a user