mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
Use auto inferred type on electronAPI.Terminal (#1719)
This commit is contained in:
8
package-lock.json
generated
8
package-lock.json
generated
@@ -9,7 +9,7 @@
|
|||||||
"version": "1.4.13",
|
"version": "1.4.13",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
||||||
"@comfyorg/comfyui-electron-types": "^0.3.6",
|
"@comfyorg/comfyui-electron-types": "^0.3.19",
|
||||||
"@comfyorg/litegraph": "^0.8.37",
|
"@comfyorg/litegraph": "^0.8.37",
|
||||||
"@primevue/themes": "^4.0.5",
|
"@primevue/themes": "^4.0.5",
|
||||||
"@vueuse/core": "^11.0.0",
|
"@vueuse/core": "^11.0.0",
|
||||||
@@ -1917,9 +1917,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@comfyorg/comfyui-electron-types": {
|
"node_modules/@comfyorg/comfyui-electron-types": {
|
||||||
"version": "0.3.6",
|
"version": "0.3.19",
|
||||||
"resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.3.19.tgz",
|
||||||
"integrity": "sha512-wgMgESnCcRzvVkk8CwWiTAUJxC4LBvw5uTENxzaWkEL0qrnmiGrVLore00yX3cYz04hJaTA6PqasLqgVLDOenw==",
|
"integrity": "sha512-VNr542eaLVmaeSJIvGv/Y5OiC2vYiLy+FtjwYtP+J8M5BSy88GCikX2K9NIkLPtcw9DLolVK3XWuIvFpsOK0zg==",
|
||||||
"license": "GPL-3.0-only"
|
"license": "GPL-3.0-only"
|
||||||
},
|
},
|
||||||
"node_modules/@comfyorg/litegraph": {
|
"node_modules/@comfyorg/litegraph": {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
|
||||||
"@comfyorg/comfyui-electron-types": "^0.3.6",
|
"@comfyorg/comfyui-electron-types": "^0.3.19",
|
||||||
"@comfyorg/litegraph": "^0.8.37",
|
"@comfyorg/litegraph": "^0.8.37",
|
||||||
"@primevue/themes": "^4.0.5",
|
"@primevue/themes": "^4.0.5",
|
||||||
"@vueuse/core": "^11.0.0",
|
"@vueuse/core": "^11.0.0",
|
||||||
|
|||||||
@@ -13,18 +13,7 @@ const terminalCreated = (
|
|||||||
{ terminal, useAutoSize }: ReturnType<typeof useTerminal>,
|
{ terminal, useAutoSize }: ReturnType<typeof useTerminal>,
|
||||||
root: Ref<HTMLElement>
|
root: Ref<HTMLElement>
|
||||||
) => {
|
) => {
|
||||||
// TODO: use types from electron package
|
const terminalApi = electronAPI().Terminal
|
||||||
const terminalApi = electronAPI()['Terminal'] as {
|
|
||||||
onOutput(cb: (message: string) => void): () => void
|
|
||||||
resize(cols: number, rows: number): void
|
|
||||||
restore(): Promise<{
|
|
||||||
buffer: string[]
|
|
||||||
pos: { x: number; y: number }
|
|
||||||
size: { cols: number; rows: number }
|
|
||||||
}>
|
|
||||||
storePos(x: number, y: number): void
|
|
||||||
write(data: string): void
|
|
||||||
}
|
|
||||||
|
|
||||||
let offData: IDisposable
|
let offData: IDisposable
|
||||||
let offOutput: () => void
|
let offOutput: () => void
|
||||||
|
|||||||
Reference in New Issue
Block a user