readingroom 0.6.4 → 0.8.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/README.md +8 -1
- package/bin/fix-pty-perms.js +27 -0
- package/bin/readingroom.js +2 -2
- package/dist/assets/AiTerminal-BrP-ENHg.css +1 -0
- package/dist/assets/AiTerminal-_aTsAC4u.js +18 -0
- package/dist/assets/antigravity-CPCbfhr-.png +0 -0
- package/dist/assets/claude-CmuHrQop.png +0 -0
- package/dist/assets/codex-_YhNmLRD.png +0 -0
- package/dist/assets/copilot-BNUvv6rY.png +0 -0
- package/dist/assets/hermes-D6M2_eQw.png +0 -0
- package/dist/assets/index-2B1xz31b.js +190 -0
- package/dist/assets/index-CFQ1tKLG.css +2 -0
- package/dist/assets/pi-B65b64VE.png +0 -0
- package/dist/index.html +2 -2
- package/package.json +8 -1
- package/src/aiTools.js +113 -0
- package/src/server.js +78 -0
- package/dist/assets/index-B2lXFI4b.js +0 -190
- package/dist/assets/index-DygG3H2H.css +0 -2
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ Codebases are drowning in documentation: READMEs, design docs, agent instruction
|
|
|
20
20
|
- **Images** - `png`, `jpg`, `jpeg`, `webp`, `gif`, `avif`, and `svg` render right in the viewer
|
|
21
21
|
- **PDFs** - rendered by your browser's built-in viewer, with an "Open in system viewer" fallback for browsers that can't display PDFs inline
|
|
22
22
|
- **Download** - a download button next to every open file saves it to your computer; if you're viewing an older version from the History panel, you get that exact version
|
|
23
|
+
- **Print** - a print button next to Copy and Download opens your browser's print dialog with just the document: navigation, toolbars, and dark-mode colors are left out, and long code lines wrap on paper
|
|
23
24
|
- **File details & history** - a side panel shows the essentials at a glance (size, word count, reading time, who last edited the file), plus a History tab listing every saved change - click one to view the file as it was back then
|
|
24
25
|
- **Filter by name** - press `/` and start typing
|
|
25
26
|
- **Live reload** - files created, edited, or deleted by you (or your AI agents) appear instantly
|
|
@@ -37,7 +38,7 @@ It stays out of your way:
|
|
|
37
38
|
- Your `.gitignore` is respected (including nested `.gitignore` files)
|
|
38
39
|
- `node_modules`, `.git`, `dist`, `build`, `out`, `.next`, `target`, `coverage`, and friends are always skipped
|
|
39
40
|
- Symlinks are not followed; there is no file size limit - if your browser can handle it, it gets listed
|
|
40
|
-
-
|
|
41
|
+
- Readingroom's file browser is **read-only**; tools you run in the terminal can edit your project
|
|
41
42
|
|
|
42
43
|
## Demo
|
|
43
44
|
|
|
@@ -51,6 +52,12 @@ Open a file and the panel on the right tells you about it: how big it is, how lo
|
|
|
51
52
|
|
|
52
53
|
The download button next to the file name at the top always saves what you're looking at - open the current file and you get the current version, open a version from History and you get that one.
|
|
53
54
|
|
|
55
|
+
## Tools
|
|
56
|
+
|
|
57
|
+
Click the tools icon in the sidebar, then choose **Terminal** to open your default shell in the project directory. Run Vim, Nano, Git, tests, or any other tools available in your CLI. Closing the session stops the shell.
|
|
58
|
+
|
|
59
|
+
The panel also shows supported AI CLI tools installed on your computer. Choose one to open its interactive terminal inside Readingroom. Closing the session stops the CLI. Readingroom does not provide an AI model, account, or chat service; each CLI uses its own setup and credentials. If none are installed, the panel links to tools you can install. Use **Check again** after installing one.
|
|
60
|
+
|
|
54
61
|
## CLI
|
|
55
62
|
|
|
56
63
|
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// node-pty@1.1.0 ships its macOS prebuilt `spawn-helper` without the
|
|
2
|
+
// executable bit, and its own install script only repairs `build/Release`.
|
|
3
|
+
// Without this, the terminal fails to start with "posix_spawnp failed".
|
|
4
|
+
// Best effort: only touch a file that exists, and never fail the install.
|
|
5
|
+
import { chmodSync, existsSync } from "node:fs";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { dirname, join } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
if (process.platform === "darwin") {
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
let nodePtyDir = null;
|
|
13
|
+
try {
|
|
14
|
+
nodePtyDir = dirname(require.resolve("node-pty/package.json"));
|
|
15
|
+
} catch {
|
|
16
|
+
// node-pty may not be installed (e.g. installs with --omit=optional).
|
|
17
|
+
}
|
|
18
|
+
const dir =
|
|
19
|
+
nodePtyDir ||
|
|
20
|
+
fileURLToPath(new URL("../node_modules/node-pty", import.meta.url));
|
|
21
|
+
const helper = join(dir, "prebuilds", `darwin-${process.arch}`, "spawn-helper");
|
|
22
|
+
try {
|
|
23
|
+
if (existsSync(helper)) chmodSync(helper, 0o755);
|
|
24
|
+
} catch {
|
|
25
|
+
// Read-only or unconventional install — leave it alone.
|
|
26
|
+
}
|
|
27
|
+
}
|
package/bin/readingroom.js
CHANGED
|
@@ -21,8 +21,8 @@ Options:
|
|
|
21
21
|
-v, --version Show version
|
|
22
22
|
|
|
23
23
|
It scans the directory for .md, .txt, image, and PDF files (respecting
|
|
24
|
-
.gitignore and skipping node_modules and friends) and serves a
|
|
25
|
-
browser UI.
|
|
24
|
+
.gitignore and skipping node_modules and friends) and serves a project
|
|
25
|
+
browser UI. Optional AI tools run in its sidebar terminal.
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
28
|
function parseArgs(argv) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}
|