@evandu/super-pi 0.1.34 → 0.1.36
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/dist/client/index.html
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<link rel="alternate icon" href="/favicon.ico" />
|
|
9
9
|
<link rel="apple-touch-icon" href="/favicon.svg" />
|
|
10
10
|
<title>Super Pi</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-P4CSBF9h.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CrKsE_6h.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/dist/server/terminal.js
CHANGED
|
@@ -275,6 +275,16 @@ export class TerminalService {
|
|
|
275
275
|
});
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
+
// A RESIZE IS A LAYOUT HINT, NOT A COMMAND, AND IT IS THE ONE THAT ARRIVES TOO EARLY TO REPORT ON.
|
|
279
|
+
// The client measures its own box in a layout effect, which runs before the effects that open the
|
|
280
|
+
// session - so on every mount the panel sends a `terminal.resize` for a session this server has not
|
|
281
|
+
// been told about yet. Answering that with 「会话已结束,请重新打开」 is how a perfectly working
|
|
282
|
+
// terminal ended up wearing a death notice: the shell started normally a moment later and its prompt
|
|
283
|
+
// was on screen, underneath a banner claiming it had exited. Nothing is lost by dropping a resize for
|
|
284
|
+
// a session that does not exist - the open carries the measurement too, and the next resize after it
|
|
285
|
+
// carries anything the panel has learned since.
|
|
286
|
+
if (command.type === "terminal.resize" && !this.sessions.has(command.sessionId))
|
|
287
|
+
return;
|
|
278
288
|
const session = this.sessions.get(command.sessionId);
|
|
279
289
|
if (!session) {
|
|
280
290
|
send({ type: "terminal.error", sessionId: command.sessionId, message: "终端会话已结束,请重新打开。" });
|