bitpull 0.1.29 → 0.1.31
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/bitpull.cjs +18999 -18724
- package/package.json +1 -1
- package/ui/ide-terminal.js +20 -2
- package/ui/terminal.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitpull",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "BitPull (bitpull.cloud): share signed, AI-readable code, computing power and open AI models with AI tools through MCP. CLI and MCP server.",
|
|
5
5
|
"mcpName": "io.github.SamuealPK/bitpull",
|
|
6
6
|
"bin": {
|
package/ui/ide-terminal.js
CHANGED
|
@@ -10,8 +10,24 @@ function register() {
|
|
|
10
10
|
let opts = null;
|
|
11
11
|
let term = null;
|
|
12
12
|
let current = null;
|
|
13
|
+
let note = null;
|
|
13
14
|
const start = () => {
|
|
14
|
-
if (term || !host || !opts
|
|
15
|
+
if (term || !host || !opts) return;
|
|
16
|
+
// No folder: say what is missing instead of an empty box.
|
|
17
|
+
if (!opts.folder) {
|
|
18
|
+
if (!note) {
|
|
19
|
+
note = document.createElement("div");
|
|
20
|
+
note.className = "bp-term-msg";
|
|
21
|
+
note.style.padding = "14px";
|
|
22
|
+
note.textContent = opts.t ? opts.t("term.nofolder") : "term.nofolder";
|
|
23
|
+
host.appendChild(note);
|
|
24
|
+
}
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (note) {
|
|
28
|
+
note.remove();
|
|
29
|
+
note = null;
|
|
30
|
+
}
|
|
15
31
|
term = mountTerminal(host, { cwd: opts.folder, token: opts.token, t: opts.t, fontSize: opts.phone ? 12 : 13, keep: !!opts.phone });
|
|
16
32
|
};
|
|
17
33
|
ide.terminal.register({
|
|
@@ -54,11 +70,13 @@ function register() {
|
|
|
54
70
|
if (!opts) return;
|
|
55
71
|
opts.folder = folder;
|
|
56
72
|
// A new folder is a new place to work: the old shells close, new ones open there.
|
|
73
|
+
// Only where the terminal was already shown (open, or saying a folder was missing).
|
|
74
|
+
const shown = !!term || !!note;
|
|
57
75
|
if (term) {
|
|
58
76
|
term.dispose();
|
|
59
77
|
term = null;
|
|
60
|
-
start();
|
|
61
78
|
}
|
|
79
|
+
if (shown) start();
|
|
62
80
|
},
|
|
63
81
|
});
|
|
64
82
|
}
|
package/ui/terminal.js
CHANGED
|
@@ -203,7 +203,9 @@ export function mountTerminal(el, { cwd, token, t = (k) => k, fontSize = 13, kee
|
|
|
203
203
|
term.loadAddon(fit);
|
|
204
204
|
term.open(box);
|
|
205
205
|
const fast = () => {
|
|
206
|
-
|
|
206
|
+
// On Windows the app's window (WebView2) can draw nothing at all with WebGL on some graphics cards,
|
|
207
|
+
// without saying so: the ordinary drawing always shows the text.
|
|
208
|
+
if (!webgl || /Windows/i.test(navigator.userAgent)) return;
|
|
207
209
|
try {
|
|
208
210
|
const gl = new webgl();
|
|
209
211
|
// The graphics card can take the context back (sleep, driver update): then the ordinary drawing resumes.
|