bitpull 0.1.23 → 0.1.24

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.
Files changed (135) hide show
  1. package/README.md +2 -1
  2. package/bitpull.cjs +11494 -10648
  3. package/package.json +3 -2
  4. package/ui/ide-terminal.js +57 -0
  5. package/ui/ide.css +97 -0
  6. package/ui/ide.html +134 -0
  7. package/ui/ide.js +910 -0
  8. package/ui/monaco/vs/abap-D-t0cyap.js +1 -0
  9. package/ui/monaco/vs/apex-CcIm7xu6.js +1 -0
  10. package/ui/monaco/vs/assets/css.worker-BpD9FCKP.js +97 -0
  11. package/ui/monaco/vs/assets/editor.worker-_vAIFJDs.js +30 -0
  12. package/ui/monaco/vs/assets/editorWebWorkerMain-DEgFqX2K.js +30 -0
  13. package/ui/monaco/vs/assets/html.worker-CLuInTTy.js +474 -0
  14. package/ui/monaco/vs/assets/json.worker-Csf_TLih.js +62 -0
  15. package/ui/monaco/vs/assets/ts.worker-g3pjEjl4.js +67722 -0
  16. package/ui/monaco/vs/azcli-BA0tQDCg.js +1 -0
  17. package/ui/monaco/vs/basic-languages/monaco.contribution.js +1 -0
  18. package/ui/monaco/vs/bat-C397hTD6.js +1 -0
  19. package/ui/monaco/vs/bicep-DF5aW17k.js +2 -0
  20. package/ui/monaco/vs/cameligo-plsz8qhj.js +1 -0
  21. package/ui/monaco/vs/clojure-Y2auQMzK.js +1 -0
  22. package/ui/monaco/vs/coffee-Bu45yuWE.js +1 -0
  23. package/ui/monaco/vs/cpp-CkKPQIni.js +1 -0
  24. package/ui/monaco/vs/csharp-CX28MZyh.js +1 -0
  25. package/ui/monaco/vs/csp-D8uWnyxW.js +1 -0
  26. package/ui/monaco/vs/css-CaeNmE3S.js +3 -0
  27. package/ui/monaco/vs/css.worker-BInK4lsP.js +1 -0
  28. package/ui/monaco/vs/cssMode-eIUIN_ru.js +1 -0
  29. package/ui/monaco/vs/cypher-DVThT8BS.js +1 -0
  30. package/ui/monaco/vs/dart-CmGfCvrO.js +1 -0
  31. package/ui/monaco/vs/dockerfile-CZqqYdch.js +1 -0
  32. package/ui/monaco/vs/ecl-30fUercY.js +1 -0
  33. package/ui/monaco/vs/editor/editor.main.css +1 -0
  34. package/ui/monaco/vs/editor/editor.main.js +1 -0
  35. package/ui/monaco/vs/editor/editor.worker.js +1 -0
  36. package/ui/monaco/vs/editor-BdtEMBbM.js +892 -0
  37. package/ui/monaco/vs/editor.js +1 -0
  38. package/ui/monaco/vs/editorWorkerHost-B_VpI68A.js +35 -0
  39. package/ui/monaco/vs/elixir-xjPaIfzF.js +1 -0
  40. package/ui/monaco/vs/flow9-DqtmStfK.js +1 -0
  41. package/ui/monaco/vs/freemarker2-B-FhRNBn.js +3 -0
  42. package/ui/monaco/vs/fsharp-BOMdg4U1.js +1 -0
  43. package/ui/monaco/vs/go-D_hbi-Jt.js +1 -0
  44. package/ui/monaco/vs/graphql-CKUU4kLG.js +1 -0
  45. package/ui/monaco/vs/handlebars-BJBfNnbX.js +1 -0
  46. package/ui/monaco/vs/hcl-DTaboeZW.js +1 -0
  47. package/ui/monaco/vs/html-BTio3wpy.js +1 -0
  48. package/ui/monaco/vs/html.worker-C1TNvQ72.js +1 -0
  49. package/ui/monaco/vs/htmlMode-aw5QYZo7.js +1 -0
  50. package/ui/monaco/vs/index-049xrXrp.js +1 -0
  51. package/ui/monaco/vs/index-DZH_zysX.js +5 -0
  52. package/ui/monaco/vs/index.js +1 -0
  53. package/ui/monaco/vs/ini-CsNwO04R.js +1 -0
  54. package/ui/monaco/vs/initialize-CAIC7-3s.js +1 -0
  55. package/ui/monaco/vs/java-CI4ZMsH9.js +1 -0
  56. package/ui/monaco/vs/javascript-B_IYblwB.js +1 -0
  57. package/ui/monaco/vs/json.worker-Bp7U0-9w.js +1 -0
  58. package/ui/monaco/vs/jsonMode-w7Q_ZLTt.js +1 -0
  59. package/ui/monaco/vs/julia-BwzEvaQw.js +1 -0
  60. package/ui/monaco/vs/kotlin-IUYPiTV8.js +1 -0
  61. package/ui/monaco/vs/less-C0eDYdqa.js +2 -0
  62. package/ui/monaco/vs/lexon-iON-Kj97.js +1 -0
  63. package/ui/monaco/vs/liquid-CXh4HpyA.js +1 -0
  64. package/ui/monaco/vs/loader.js +1368 -0
  65. package/ui/monaco/vs/lspLanguageFeatures-Cog3rVVE.js +2 -0
  66. package/ui/monaco/vs/lua-DtygF91M.js +1 -0
  67. package/ui/monaco/vs/m3-CsR4AuFi.js +1 -0
  68. package/ui/monaco/vs/main-BEx-Fmlo.js +15 -0
  69. package/ui/monaco/vs/main-DsK8pnKg.js +3 -0
  70. package/ui/monaco/vs/markdown-C_rD0bIw.js +1 -0
  71. package/ui/monaco/vs/mdx-BcFcCtz9.js +1 -0
  72. package/ui/monaco/vs/mips-CiYP61RB.js +1 -0
  73. package/ui/monaco/vs/monaco.contribution-BuX2NvO2.js +1 -0
  74. package/ui/monaco/vs/monaco.contribution-C7tY_xnl.js +1 -0
  75. package/ui/monaco/vs/monaco.contribution-CY2lwFI8.js +1 -0
  76. package/ui/monaco/vs/monaco.contribution-D1-wBxcq.js +1 -0
  77. package/ui/monaco/vs/msdax-C38-sJlp.js +1 -0
  78. package/ui/monaco/vs/mysql-CdtbpvbG.js +1 -0
  79. package/ui/monaco/vs/nls/lang/de.js +9 -0
  80. package/ui/monaco/vs/nls/lang/es.js +9 -0
  81. package/ui/monaco/vs/nls/lang/fr.js +9 -0
  82. package/ui/monaco/vs/nls/lang/it.js +9 -0
  83. package/ui/monaco/vs/nls/lang/pt-br.js +9 -0
  84. package/ui/monaco/vs/nls/lang/ru.js +9 -0
  85. package/ui/monaco/vs/nls/lang/zh-cn.js +9 -0
  86. package/ui/monaco/vs/nls.messages-loader.js +1 -0
  87. package/ui/monaco/vs/objective-c-CntZFaHX.js +1 -0
  88. package/ui/monaco/vs/pascal-r6kuqfl_.js +1 -0
  89. package/ui/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
  90. package/ui/monaco/vs/perl-DABw_TcH.js +1 -0
  91. package/ui/monaco/vs/pgsql-me_jFXeX.js +1 -0
  92. package/ui/monaco/vs/php-D_kh-9LK.js +1 -0
  93. package/ui/monaco/vs/pla-VfZjczW0.js +1 -0
  94. package/ui/monaco/vs/postiats-BBSzz8Pk.js +1 -0
  95. package/ui/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
  96. package/ui/monaco/vs/powershell-B-7ap1zc.js +1 -0
  97. package/ui/monaco/vs/protobuf-BmtuEB1A.js +2 -0
  98. package/ui/monaco/vs/pug-BRpRNeEb.js +1 -0
  99. package/ui/monaco/vs/python-CasA8BlK.js +1 -0
  100. package/ui/monaco/vs/qsharp-BzsFaUU9.js +1 -0
  101. package/ui/monaco/vs/r-f8dDdrp4.js +1 -0
  102. package/ui/monaco/vs/razor-IGOwKAHu.js +1 -0
  103. package/ui/monaco/vs/redis-fvZQY4PI.js +1 -0
  104. package/ui/monaco/vs/redshift-45Et0LQi.js +1 -0
  105. package/ui/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
  106. package/ui/monaco/vs/ruby-CZO8zYTz.js +1 -0
  107. package/ui/monaco/vs/rust-Bfetafyc.js +1 -0
  108. package/ui/monaco/vs/sb-3GYllVck.js +1 -0
  109. package/ui/monaco/vs/scala-foMgrKo1.js +1 -0
  110. package/ui/monaco/vs/scheme-CHdMtr7p.js +1 -0
  111. package/ui/monaco/vs/scss-C1cmLt9V.js +3 -0
  112. package/ui/monaco/vs/shell-ClXCKCEW.js +1 -0
  113. package/ui/monaco/vs/solidity-MZ6ExpPy.js +1 -0
  114. package/ui/monaco/vs/sophia-DWkuSsPQ.js +1 -0
  115. package/ui/monaco/vs/sparql-AUGFYSyk.js +1 -0
  116. package/ui/monaco/vs/sql-32GpJSV2.js +1 -0
  117. package/ui/monaco/vs/st-CuDFIVZ_.js +1 -0
  118. package/ui/monaco/vs/swift-t-PfMj7W.js +1 -0
  119. package/ui/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
  120. package/ui/monaco/vs/tcl-D74tq1nH.js +1 -0
  121. package/ui/monaco/vs/toggleHighContrast-DuqAmExZ.js +65 -0
  122. package/ui/monaco/vs/ts.worker-BLYAhMkX.js +1 -0
  123. package/ui/monaco/vs/tsMode-DB1GiNun.js +11 -0
  124. package/ui/monaco/vs/twig-C6taOxMV.js +1 -0
  125. package/ui/monaco/vs/typescript-BTLNeq8B.js +1 -0
  126. package/ui/monaco/vs/typespec-8OfoLt6R.js +1 -0
  127. package/ui/monaco/vs/vb-Dyb2648j.js +1 -0
  128. package/ui/monaco/vs/wgsl-BhLXMOR0.js +298 -0
  129. package/ui/monaco/vs/workers-BeMslOxK.js +1 -0
  130. package/ui/monaco/vs/xml-DHCggo_L.js +1 -0
  131. package/ui/monaco/vs/yaml-C-RIivnc.js +1 -0
  132. package/ui/terminal.js +327 -0
  133. package/ui/vendor/addon-fit.mjs +18 -0
  134. package/ui/vendor/xterm.css +285 -0
  135. package/ui/vendor/xterm.mjs +53 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitpull",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
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": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "files": [
10
10
  "bitpull.cjs",
11
- "README.md"
11
+ "README.md",
12
+ "ui"
12
13
  ],
13
14
  "engines": {
14
15
  "node": ">=20"
@@ -0,0 +1,57 @@
1
+ // Plugs the terminal into the Projects editor: the bottom panel's "Terminal" tab, ⌘J/Ctrl+J, a shell in
2
+ // the project's folder, and the agent's commands shown read-only in an "Agent" tab. The agent never types
3
+ // into a shell: its commands run through the Projects path, with its approvals, and only appear here.
4
+ import { mountTerminal } from "./terminal.js";
5
+
6
+ function register() {
7
+ const ide = window.BitPullIDE;
8
+ if (!ide || !ide.terminal) return setTimeout(register, 50);
9
+ let host = null;
10
+ let opts = null;
11
+ let term = null;
12
+ let current = null;
13
+ const start = () => {
14
+ if (term || !host || !opts || !opts.folder) return;
15
+ term = mountTerminal(host, { cwd: opts.folder, token: opts.token, t: opts.t });
16
+ };
17
+ ide.terminal.register({
18
+ mount(container, o) {
19
+ host = container;
20
+ opts = { ...o };
21
+ },
22
+ open() {
23
+ start();
24
+ if (term) term.fit();
25
+ },
26
+ close() {
27
+ /* the panel hides it; shells keep running until the page closes */
28
+ },
29
+ newTab() {
30
+ start();
31
+ if (term) term.newTab();
32
+ },
33
+ runVisible(command) {
34
+ start();
35
+ current = term ? term.runVisible(command) : null;
36
+ return current;
37
+ },
38
+ agentOutput(text) {
39
+ if (current) current.write(String(text).replace(/\r?\n/g, "\r\n"));
40
+ },
41
+ agentDone(code) {
42
+ if (current) current.done(code);
43
+ current = null;
44
+ },
45
+ folderChanged(folder) {
46
+ if (!opts) return;
47
+ opts.folder = folder;
48
+ // A new folder is a new place to work: the old shells close, new ones open there.
49
+ if (term) {
50
+ term.dispose();
51
+ term = null;
52
+ start();
53
+ }
54
+ },
55
+ });
56
+ }
57
+ register();
package/ui/ide.css ADDED
@@ -0,0 +1,97 @@
1
+ /* BitPull's own look for the projects page: the dashboard's colours, nothing borrowed from other editors. */
2
+ :root { --bg:#fafaf7; --surface:#fff; --raised:#f2f1ec; --text:#1d1d1b; --muted:#6b6b66; --line:#e4e2dc; --accent:#2f5bd3; --accent-ink:#fff; --good:#1f7a4d; --warn:#9a6700; --bad:#b3261e;
3
+ --side:260px; --agent:360px; --bottom:200px; }
4
+ @media (prefers-color-scheme: dark) { :root { --bg:#151514; --surface:#1e1e1c; --raised:#262624; --text:#ecebe6; --muted:#a2a19b; --line:#33322f; --accent:#7c9cf2; --accent-ink:#10131c; --good:#5cc28f; --warn:#e3b341; --bad:#f2847b; } }
5
+ * { box-sizing: border-box; }
6
+ html, body { height: 100%; margin: 0; }
7
+ body { background: var(--bg); color: var(--text); font: 13.5px/1.45 system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif; overflow: hidden; }
8
+ [hidden] { display: none !important; }
9
+ :where(#top, #side, #agent, #modal, #bottom, #review, #tabs, #activity) button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 5px 10px; font: inherit; font-weight: 600; cursor: pointer; }
10
+ :where(#ide, #modal) button:disabled { opacity: .55; cursor: default; }
11
+ :where(#ide, #modal) button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
12
+ :where(#ide, #modal) button.danger { background: var(--bad); color: #fff; }
13
+ :where(#ide, #modal) button.icon { background: transparent; color: var(--muted); padding: 2px 6px; font-weight: 500; }
14
+ :where(#ide, #modal) button.icon:hover, :where(#ide, #modal) button.ghost:hover { background: var(--raised); }
15
+ :where(#ide, #modal) button.small { padding: 2px 8px; font-size: 12px; }
16
+ /* Form fields of our own panels only: Monaco has hidden inputs of its own that must keep their style. */
17
+ :where(#top, #side, #agent, #modal, #bottom) :is(input[type=text], input[type=number], select, textarea) { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }
18
+ :where(#side, #agent, #modal) textarea { width: 100%; resize: vertical; }
19
+ #top select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }
20
+ a { color: var(--accent); }
21
+ .grow { flex: 1; }
22
+ .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
23
+ .row.end { justify-content: flex-end; }
24
+ .muted { color: var(--muted); }
25
+ .small { font-size: 12px; }
26
+ #ide { display: flex; flex-direction: column; height: 100%; }
27
+ #top { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
28
+ #top select { max-width: 220px; }
29
+ #back { font-weight: 600; text-decoration: none; margin-inline-end: 6px; }
30
+ #body { flex: 1; display: grid; grid-template-columns: 44px var(--side) 4px minmax(200px, 1fr) 4px var(--agent); min-height: 0; }
31
+ #activity { display: flex; flex-direction: column; gap: 2px; padding: 6px 4px; border-inline-end: 1px solid var(--line); background: var(--surface); }
32
+ #activity button { background: transparent; color: var(--muted); padding: 7px; border-radius: 8px; }
33
+ #activity button.on { color: var(--text); background: var(--raised); }
34
+ #activity svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
35
+ #side { overflow: auto; background: var(--surface); padding: 6px; min-width: 0; }
36
+ #side section { display: flex; flex-direction: column; gap: 6px; }
37
+ .panel-head { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 2px 2px 4px; }
38
+ .panel-sub { font-size: 12px; color: var(--muted); margin-top: 8px; }
39
+ .split { background: transparent; }
40
+ .split.v { cursor: col-resize; }
41
+ .split.h { cursor: row-resize; height: 4px; }
42
+ .split:hover { background: var(--accent); opacity: .5; }
43
+ #ide ul.list, #ide ul.tree, #modal ul.list { list-style: none; margin: 0; padding: 0; }
44
+ ul.list li, ul.tree li > .item { padding: 3px 6px; border-radius: 5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
45
+ ul.list li:hover, ul.tree li > .item:hover, ul.list li.on, ul.tree li > .item.on { background: var(--raised); }
46
+ ul.tree ul { list-style: none; margin: 0; padding-inline-start: 12px; }
47
+ .item .name { overflow: hidden; text-overflow: ellipsis; }
48
+ .item .acts { margin-inline-start: auto; display: none; }
49
+ .item:hover .acts { display: inline-flex; }
50
+ .badge { font-size: 11px; padding: 0 6px; border-radius: 99px; background: var(--raised); color: var(--muted); }
51
+ .badge.bad { color: var(--bad); } .badge.warn { color: var(--warn); } .badge.good { color: var(--good); }
52
+ #center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
53
+ #tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 32px; }
54
+ #tabs .tab { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-inline-end: 1px solid var(--line); cursor: pointer; white-space: nowrap; color: var(--muted); }
55
+ #tabs .tab.on { color: var(--text); background: var(--bg); }
56
+ #tabs .tab .dirty { color: var(--warn); }
57
+ #tabs .tab button { padding: 0 4px; background: transparent; color: var(--muted); }
58
+ #review { display: flex; gap: 6px; align-items: center; padding: 5px 10px; border-bottom: 1px solid var(--line); background: var(--raised); flex-wrap: wrap; }
59
+ #editor-wrap { position: relative; flex: 1; min-height: 80px; }
60
+ #editor, #diff { position: absolute; inset: 0; }
61
+ #welcome { position: absolute; inset: 0; padding: 40px; overflow: auto; }
62
+ #bottom { height: var(--bottom); display: flex; flex-direction: column; border-top: 1px solid var(--line); background: var(--surface); min-height: 0; }
63
+ .bottom-tabs { display: flex; gap: 2px; align-items: center; padding: 2px 6px; border-bottom: 1px solid var(--line); }
64
+ .bottom-tabs button[data-bottom] { background: transparent; color: var(--muted); font-weight: 500; }
65
+ .bottom-tabs button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
66
+ #bottom > div[data-bpanel] { flex: 1; overflow: auto; min-height: 0; }
67
+ #output { margin: 0; padding: 6px 10px; white-space: pre-wrap; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; direction: ltr; text-align: left; }
68
+ #terminal-host { height: 100%; padding: 6px 10px; }
69
+ #agent { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); padding: 6px; gap: 6px; }
70
+ #agents { display: flex; flex-direction: column; gap: 6px; max-height: 40%; overflow: auto; }
71
+ #agent-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
72
+ .ev { white-space: pre-wrap; overflow-wrap: anywhere; }
73
+ .ev.user { align-self: flex-end; background: var(--raised); padding: 6px 10px; border-radius: 10px; max-width: 90%; }
74
+ .ev.action, .ev.notice { color: var(--muted); font-size: 12px; }
75
+ .ev.error { color: var(--bad); }
76
+ .ev.output { font: 11.5px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; max-height: 160px; overflow: auto; direction: ltr; text-align: left; }
77
+ #agent-pending, #agent-limit { border: 1px solid var(--accent); border-radius: 8px; padding: 8px; background: var(--bg); }
78
+ #agent-limit { border-color: var(--warn); }
79
+ #agent-pending code, .code { font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--raised); padding: 4px 6px; border-radius: 5px; display: block; white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
80
+ #composer { position: relative; }
81
+ .popup { position: absolute; bottom: 100%; inset-inline-start: 0; inset-inline-end: 0; max-height: 220px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 5; }
82
+ #modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; z-index: 20; }
83
+ #modal .box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; width: min(620px, calc(100% - 32px)); max-height: 80vh; overflow: auto; }
84
+ #modal h3 { margin: 0 0 8px; font-size: 15px; }
85
+ #modal input[type=text], #modal textarea { width: 100%; }
86
+ #modal dl { margin: 0; } #modal dt { font-weight: 600; margin-top: 8px; } #modal dd { margin: 2px 0 0; color: var(--muted); }
87
+ #tip { position: fixed; z-index: 30; max-width: 320px; background: var(--text); color: var(--bg); padding: 6px 9px; border-radius: 7px; font-size: 12px; pointer-events: none; }
88
+ @media (max-width: 900px) {
89
+ /* A narrow window scrolls: files, then the editor at a usable height, then the agent. */
90
+ #body { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto auto; overflow-y: auto; }
91
+ #side { grid-column: 2; max-height: 30vh; }
92
+ .split { display: none; }
93
+ #center { grid-column: 1 / -1; height: 75vh; }
94
+ #bottom { height: 25vh; }
95
+ #agent { grid-column: 1 / -1; height: 80vh; }
96
+ #activity { grid-row: 1; }
97
+ }
package/ui/ide.html ADDED
@@ -0,0 +1,134 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>BitPull · Projects</title>
7
+ <link rel="icon" href="data:,">
8
+ <script>
9
+ // The token stays in the address's fragment, which never reaches a server. With it the page asks the app
10
+ // for a cookie that opens its own files (the editor), then loads them.
11
+ (function () {
12
+ var p = new URLSearchParams(location.hash.slice(1));
13
+ window.__BITPULL__ = { token: p.get("token") || "", lang: p.get("lang") || "", folder: p.get("folder") || "" };
14
+ fetch("/api/ui/session", { method: "POST", headers: { "x-bitpull-token": window.__BITPULL__.token } }).then(function (r) {
15
+ if (!r.ok) { document.body.textContent = "BitPull: open this page from the app."; return; }
16
+ var css = document.createElement("link");
17
+ css.rel = "stylesheet";
18
+ css.href = "/ui/ide.css";
19
+ document.head.appendChild(css);
20
+ var s = document.createElement("script");
21
+ s.src = "/ui/ide.js";
22
+ document.body.appendChild(s);
23
+ var term = document.createElement("script");
24
+ term.type = "module";
25
+ term.src = "/ui/ide-terminal.js";
26
+ document.body.appendChild(term);
27
+ });
28
+ })();
29
+ </script>
30
+ </head>
31
+ <body>
32
+ <div id="ide" hidden>
33
+ <header id="top">
34
+ <a id="back" href="#" data-i18n="ide.back" data-tip="tip.ide.back"></a>
35
+ <select id="folder" data-tip="tip.pj.folder"></select>
36
+ <button class="ghost" id="folder-add" data-i18n="pj.folder.add" data-tip="tip.pj.folder.add"></button>
37
+ <span class="grow"></span>
38
+ <button class="ghost" id="quick-open" data-i18n="ide.quick" data-tip="tip.ide.quick"></button>
39
+ <button class="ghost" id="preview" data-i18n="ide.preview" data-tip="tip.ide.preview"></button>
40
+ <select id="model" data-tip="tip.pj.model"></select>
41
+ <select id="mode" data-tip="tip.ide.mode"><option value="ask" data-i18n="pj.mode.ask"></option><option value="edits" data-i18n="pj.mode.edits"></option><option value="auto" data-i18n="pj.mode.auto"></option></select>
42
+ <button class="ghost" id="limits-open" data-i18n="pj.limits" data-tip="tip.pj.limits"></button>
43
+ </header>
44
+ <div id="body">
45
+ <nav id="activity">
46
+ <button data-side="files" class="on" data-tip="tip.ide.files"><svg viewBox="0 0 24 24"><path d="M4 4h6l2 2h8v13H4z"/></svg></button>
47
+ <button data-side="search" data-tip="tip.ide.search"><svg viewBox="0 0 24 24"><circle cx="10" cy="10" r="6"/><path d="M15 15l5 5"/></svg></button>
48
+ <button data-side="git" data-tip="tip.ide.git"><svg viewBox="0 0 24 24"><circle cx="6" cy="6" r="2.5"/><circle cx="6" cy="18" r="2.5"/><circle cx="18" cy="9" r="2.5"/><path d="M6 8.5v7M18 11.5c0 4-12 2-12 4"/></svg></button>
49
+ <button data-side="outline" data-tip="tip.ide.outline"><svg viewBox="0 0 24 24"><path d="M5 6h14M8 11h11M8 16h11M5 11h0M5 16h0"/></svg></button>
50
+ <button data-side="history" data-tip="tip.ide.history"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="8"/><path d="M12 7v5l3 2"/></svg></button>
51
+ </nav>
52
+ <aside id="side">
53
+ <section data-panel="files">
54
+ <div class="panel-head"><span data-i18n="ide.files"></span><span class="grow"></span>
55
+ <button class="icon" id="new-file" data-tip="tip.ide.new_file">+</button>
56
+ <button class="icon" id="new-dir" data-tip="tip.ide.new_dir">+▢</button>
57
+ <button class="icon" id="refresh" data-tip="tip.ide.refresh">⟳</button></div>
58
+ <ul id="tree" class="tree" role="tree"></ul>
59
+ </section>
60
+ <section data-panel="search" hidden>
61
+ <div class="panel-head" data-i18n="ide.search"></div>
62
+ <input type="text" id="search-q" data-i18n-placeholder="ide.search.placeholder">
63
+ <div class="row small"><label data-tip="tip.ide.search.case"><input type="checkbox" id="search-case"> Aa</label><label data-tip="tip.ide.search.regex"><input type="checkbox" id="search-regex"> .*</label></div>
64
+ <div id="search-info" class="muted small"></div>
65
+ <ul id="search-results" class="list"></ul>
66
+ </section>
67
+ <section data-panel="git" hidden>
68
+ <div class="panel-head"><span data-i18n="ide.git"></span><span class="grow"></span><button class="icon" id="git-refresh" data-tip="tip.ide.refresh">⟳</button></div>
69
+ <div id="git-branch" class="muted small"></div>
70
+ <textarea id="git-message" rows="2" data-i18n-placeholder="ide.git.message"></textarea>
71
+ <div class="row"><button id="git-commit" data-i18n="ide.git.commit" data-tip="tip.ide.git.commit"></button><button class="ghost" id="git-push" data-i18n="ide.git.push" data-tip="tip.ide.git.push"></button></div>
72
+ <div class="panel-sub" data-i18n="ide.git.staged"></div>
73
+ <ul id="git-staged" class="list"></ul>
74
+ <div class="panel-sub" data-i18n="ide.git.changes"></div>
75
+ <ul id="git-changes" class="list"></ul>
76
+ <div id="git-msg" class="muted small"></div>
77
+ </section>
78
+ <section data-panel="outline" hidden>
79
+ <div class="panel-head" data-i18n="ide.outline"></div>
80
+ <ul id="outline" class="list"></ul>
81
+ </section>
82
+ <section data-panel="history" hidden>
83
+ <div class="panel-head" data-i18n="ide.history"></div>
84
+ <p class="muted small" data-i18n="ide.history.hint"></p>
85
+ <ul id="history" class="list"></ul>
86
+ </section>
87
+ </aside>
88
+ <div class="split v" data-split="side" data-tip="tip.ide.resize"></div>
89
+ <main id="center">
90
+ <div id="tabs" role="tablist"></div>
91
+ <div id="review" hidden>
92
+ <span id="review-title"></span><span class="grow"></span>
93
+ <span id="review-hunks"></span>
94
+ <button id="review-accept" data-tip="tip.ide.review.accept"></button>
95
+ <button class="ghost" id="review-reject" data-tip="tip.ide.review.reject"></button>
96
+ <button class="ghost" id="review-close" data-i18n="ide.close" data-tip="tip.ide.close"></button>
97
+ </div>
98
+ <div id="editor-wrap"><div id="editor" dir="ltr"></div><div id="diff" dir="ltr" hidden></div>
99
+ <div id="welcome"><h2 data-i18n="ide.welcome"></h2><p class="muted" data-i18n="ide.welcome.text"></p><ul id="keys" class="muted small"></ul></div>
100
+ </div>
101
+ <div class="split h" data-split="bottom" data-tip="tip.ide.resize"></div>
102
+ <section id="bottom">
103
+ <div class="bottom-tabs"><button data-bottom="problems" class="on" data-i18n="ide.problems" data-tip="tip.ide.problems"></button><button data-bottom="output" data-i18n="ide.output" data-tip="tip.ide.output"></button><button data-bottom="terminal" data-i18n="pj.tab.terminal" data-tip="tip.ide.terminal"></button>
104
+ <span class="grow"></span><button class="ghost small" id="problems-run" data-i18n="ide.problems.run" data-tip="tip.ide.problems.run"></button><button class="icon" id="bottom-close" data-tip="tip.ide.close">×</button></div>
105
+ <div data-bpanel="problems"><ul id="problems" class="list"></ul></div>
106
+ <div data-bpanel="output" hidden><pre id="output"></pre></div>
107
+ <div data-bpanel="terminal" hidden><div id="terminal-host"></div></div>
108
+ </section>
109
+ </main>
110
+ <div class="split v" data-split="agent" data-tip="tip.ide.resize"></div>
111
+ <aside id="agent">
112
+ <div class="panel-head"><button class="ghost" id="agents-toggle" data-tip="tip.ide.agents"></button><span class="grow"></span><button id="agent-new" data-i18n="ide.agent.new" data-tip="tip.ide.agent.new"></button></div>
113
+ <div id="agents" hidden><input type="text" id="agents-q" data-i18n-placeholder="ide.agents.search"><ul id="agents-list" class="list"></ul></div>
114
+ <div id="agent-log"></div>
115
+ <div id="agent-pending" hidden></div>
116
+ <div id="agent-limit" hidden><strong data-i18n="ide.limit.title"></strong><p id="agent-limit-text" class="small"></p>
117
+ <div class="row"><button id="limit-go" data-i18n="ide.limit.go" data-tip="tip.pj.continue"></button><button class="ghost" id="limit-stop" data-i18n="ide.limit.stop" data-tip="tip.pj.stop"></button><button class="ghost" id="limit-edit" data-i18n="ide.limit.edit" data-tip="tip.pj.limits"></button></div></div>
118
+ <div id="agent-changes" class="small"></div>
119
+ <div id="agent-status" class="muted small"></div>
120
+ <div id="composer">
121
+ <textarea id="prompt" rows="3" data-i18n-placeholder="ide.prompt.placeholder"></textarea>
122
+ <ul id="mention" class="list popup" hidden></ul>
123
+ <div class="row"><span id="mode-hint" class="muted small grow"></span>
124
+ <button class="ghost" id="agent-undo" data-i18n="pj.undo" data-tip="tip.pj.undo" hidden></button>
125
+ <button class="danger" id="agent-stop" data-i18n="pj.stop" data-tip="tip.pj.stop" hidden></button>
126
+ <button id="agent-send" data-i18n="pj.send" data-tip="tip.pj.send"></button></div>
127
+ </div>
128
+ </aside>
129
+ </div>
130
+ </div>
131
+ <div id="modal" hidden><div class="box"><h3 id="modal-title"></h3><div id="modal-body"></div><div class="row end" id="modal-buttons"></div></div></div>
132
+ <div id="tip" role="tooltip" hidden></div>
133
+ </body>
134
+ </html>