fix: fix translate mismatching text

This commit is contained in:
LukeGus
2025-12-30 23:40:51 -06:00
parent a28cd897ba
commit f9f81e9e91
3 changed files with 10 additions and 2400 deletions

View File

@@ -359,6 +359,7 @@ class SSHConnectionPool {
host: SSHHostWithCredentials,
): Promise<Client> {
return new Promise(async (resolve, reject) => {
const config = buildSshConfig(host);
const client = new Client();
const timeout = setTimeout(() => {
client.end();
@@ -401,7 +402,10 @@ class SSHConnectionPool {
sessionId,
hostId: host.id,
userId: host.userId!,
prompts,
prompts: prompts.map((p) => ({
prompt: p.prompt,
echo: p.echo ?? false,
})),
totpPromptIndex,
resolvedPassword: host.password,
totpAttempts: 0,
@@ -430,8 +434,6 @@ class SSHConnectionPool {
);
try {
const config = buildSshConfig(host);
if (
host.useSocks5 &&
(host.socks5Host ||
@@ -1948,7 +1950,10 @@ app.post("/metrics/start/:id", validateHostId, async (req, res) => {
sessionId,
hostId: host.id,
userId: host.userId!,
prompts,
prompts: prompts.map((p) => ({
prompt: p.prompt,
echo: p.echo ?? false,
})),
totpPromptIndex,
resolvedPassword: host.password,
totpAttempts: 0,