@rajat-rastogi/maestro 0.2.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/out/main/main.js
CHANGED
|
@@ -488,6 +488,9 @@ function registerSessionsIpc(sessionManager2) {
|
|
|
488
488
|
electron.ipcMain.handle("sessions:updateTags", async (_e, id, tags) => {
|
|
489
489
|
sessionManager2.updateTags(id, tags);
|
|
490
490
|
});
|
|
491
|
+
electron.ipcMain.handle("sessions:interrupt", async (_e, id) => {
|
|
492
|
+
sessionManager2.interrupt(id);
|
|
493
|
+
});
|
|
491
494
|
electron.ipcMain.handle("sessions:sendInput", async (_e, id, data) => {
|
|
492
495
|
sessionManager2.sendInput(id, data);
|
|
493
496
|
});
|
|
@@ -1673,7 +1676,7 @@ class SessionManager {
|
|
|
1673
1676
|
stateEnteredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1674
1677
|
tags: {
|
|
1675
1678
|
...opts.tags,
|
|
1676
|
-
"machine": opts.machineId,
|
|
1679
|
+
"machine": machine?.name ?? opts.machineId,
|
|
1677
1680
|
"provider": opts.provider
|
|
1678
1681
|
},
|
|
1679
1682
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1740,6 +1743,13 @@ class SessionManager {
|
|
|
1740
1743
|
const entry = this.entries.get(id);
|
|
1741
1744
|
if (entry) entry.session.tags = tags;
|
|
1742
1745
|
}
|
|
1746
|
+
/** Send Ctrl+C to interrupt the running process, then clear the screen */
|
|
1747
|
+
interrupt(id) {
|
|
1748
|
+
const entry = this.entries.get(id);
|
|
1749
|
+
if (!entry) return;
|
|
1750
|
+
entry.adapter.write("");
|
|
1751
|
+
setTimeout(() => entry.adapter.write("\r"), 200);
|
|
1752
|
+
}
|
|
1743
1753
|
sendInput(id, data) {
|
|
1744
1754
|
this.entries.get(id)?.adapter.write(data);
|
|
1745
1755
|
}
|
|
@@ -79,6 +79,7 @@ electron.contextBridge.exposeInMainWorld("maestro", {
|
|
|
79
79
|
rename: (id, name) => electron.ipcRenderer.invoke("sessions:rename", id, name),
|
|
80
80
|
updateTags: (id, tags) => electron.ipcRenderer.invoke("sessions:updateTags", id, tags),
|
|
81
81
|
getBuffer: (id) => electron.ipcRenderer.invoke("sessions:getBuffer", id),
|
|
82
|
+
interrupt: (id) => electron.ipcRenderer.invoke("sessions:interrupt", id),
|
|
82
83
|
sendInput: (id, data) => electron.ipcRenderer.invoke("sessions:sendInput", id, data),
|
|
83
84
|
resize: (id, cols, rows) => electron.ipcRenderer.invoke("sessions:resize", id, cols, rows),
|
|
84
85
|
onData: (cb) => {
|