Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"access": "public"
},
"scripts": {
"postinstall": "npx @electron/rebuild -f -m node_modules/node-pty",
"dev": "make dev",
"prebuild:main": "./scripts/generate-version.sh",
"build": "make build",
Expand Down Expand Up @@ -73,7 +72,7 @@
"minimist": "^1.2.8",
"motion": "^12.23.24",
"ollama-ai-provider-v2": "^1.5.4",
"node-pty": "1.1.0-beta39",
"@homebridge/node-pty-prebuilt-multiarch": "^0.11.14",
"rehype-harden": "^1.1.5",
"shescape": "^2.1.6",
"source-map-support": "^0.5.21",
Expand Down Expand Up @@ -171,6 +170,7 @@
"dist/**/*.json",
"dist/**/*.png",
"dist/assets/**/*",
"scripts/postinstall.sh",
"README.md",
"LICENSE"
],
Expand Down
10 changes: 5 additions & 5 deletions src/services/ptyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { log } from "@/services/log";
import type { Runtime } from "@/runtime/Runtime";
import type { TerminalSession, TerminalCreateParams, TerminalResizeParams } from "@/types/terminal";
import type { IPty } from "node-pty";
import type { IPty } from "@homebridge/node-pty-prebuilt-multiarch";
import { SSHRuntime, type SSHRuntimeConfig } from "@/runtime/SSHRuntime";
import { LocalRuntime } from "@/runtime/LocalRuntime";
import { access } from "fs/promises";
Expand Down Expand Up @@ -98,10 +98,10 @@ export class PTYService {
if (runtime instanceof LocalRuntime) {
// Local: Use node-pty (dynamically import to avoid crash if not available)
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
let pty: typeof import("node-pty");
let pty: typeof import("@homebridge/node-pty-prebuilt-multiarch");
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment
pty = require("node-pty");
pty = require("@homebridge/node-pty-prebuilt-multiarch");
} catch (err) {
log.error("node-pty not available - local terminals will not work:", err);
throw new Error(
Expand Down Expand Up @@ -206,10 +206,10 @@ export class PTYService {

// Load node-pty dynamically
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
let pty: typeof import("node-pty");
let pty: typeof import("@homebridge/node-pty-prebuilt-multiarch");
try {
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment
pty = require("node-pty");
pty = require("@homebridge/node-pty-prebuilt-multiarch");
} catch (err) {
log.error("node-pty not available - SSH terminals will not work:", err);
throw new Error(
Expand Down