difftab 0.5.0 → 0.5.2
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 +11 -11
- package/README.zh-CN.md +4 -4
- package/dist/server/main.js +5 -2
- package/dist/web/app.js +30 -30
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -34,8 +34,8 @@ at the tree, check the branch, and close it again.
|
|
|
34
34
|
|
|
35
35
|
difftab is that half of the editor without the editor. One command, one tab, and only the
|
|
36
36
|
three things you actually looked at. It only reads git, so it works with any agent, any
|
|
37
|
-
language and any repository
|
|
38
|
-
|
|
37
|
+
language and any repository. And if an agent now writes all your code, you can uninstall
|
|
38
|
+
the IDE.
|
|
39
39
|
|
|
40
40
|
## Features
|
|
41
41
|
|
|
@@ -116,17 +116,17 @@ of those checks.
|
|
|
116
116
|
|
|
117
117
|
## FAQ
|
|
118
118
|
|
|
119
|
-
**Does it work with my agent?** — Yes
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
**Does it work with my agent?** — Yes. difftab never talks to the agent — it only reads
|
|
120
|
+
git — so anything that writes files into a git working tree looks the same to it: Claude
|
|
121
|
+
Code, Codex, OpenCode, Aider, a human with vim.
|
|
122
122
|
|
|
123
|
-
**Can I stage, commit or discard from it?** — No, and it will
|
|
124
|
-
product's core promise; see [Non-goals](#non-goals).
|
|
123
|
+
**Can I stage, commit or discard from it?** — No, and it never will be. Read-only is the
|
|
124
|
+
product's core promise, not a missing feature; see [Non-goals](#non-goals).
|
|
125
125
|
|
|
126
|
-
**The UI says "Polling" — is something wrong?** — No.
|
|
127
|
-
|
|
128
|
-
inotify quota
|
|
129
|
-
refreshes; it may
|
|
126
|
+
**The UI says "Polling" — is something wrong?** — No. It means difftab could not use native
|
|
127
|
+
file watching here: Node older than 24.14 on Linux, a repository on a network drive or a
|
|
128
|
+
Docker volume, or an exhausted inotify quota. It runs `git status` every 1.5 seconds
|
|
129
|
+
instead, so everything still refreshes; it may just land a second or two later.
|
|
130
130
|
|
|
131
131
|
## Non-goals
|
|
132
132
|
|
package/README.zh-CN.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
你在终端里跑 Claude Code、Codex、OpenCode 之类的 agent。它做完一件事,你想看看它到底改了什么。agent 自带的 diff 在终端里刷过去,那不是读一份三百行补丁的地方——于是你打开 VS Code,或者手边为此留着的随便哪个 IDE,什么都不编辑,只是看看 diff、瞄一眼目录树、确认下分支,然后关掉。
|
|
28
28
|
|
|
29
|
-
difftab 就是编辑器里的这一半,去掉编辑器。一条命令、一个标签页,只装你真正会看的那三样。它只读 git,所以配哪个 agent
|
|
29
|
+
difftab 就是编辑器里的这一半,去掉编辑器。一条命令、一个标签页,只装你真正会看的那三样。它只读 git,所以配哪个 agent、哪种语言、哪个仓库都一样。如果现在代码全由 agent 来写,IDE 就可以卸了。
|
|
30
30
|
|
|
31
31
|
## 特性
|
|
32
32
|
|
|
@@ -86,11 +86,11 @@ difftab
|
|
|
86
86
|
|
|
87
87
|
## 常见问题
|
|
88
88
|
|
|
89
|
-
**能配我用的 agent
|
|
89
|
+
**能配我用的 agent 吗?**——能。difftab 从不与 agent 打交道,它只读 git,所以凡是往 git 工作区里写文件的东西在它眼里都一样:Claude Code、Codex、OpenCode、Aider、拿着 vim 的人。
|
|
90
90
|
|
|
91
|
-
**能在里面 stage、commit 或 discard
|
|
91
|
+
**能在里面 stage、commit 或 discard 吗?**——不能,将来也不会。只读是产品的核心承诺,不是还没做的功能;见[明确不做](#明确不做)。
|
|
92
92
|
|
|
93
|
-
**界面上写着「Polling
|
|
93
|
+
**界面上写着「Polling」,是出问题了吗?**——没有。它表示 difftab 在这里用不了原生文件监听:Linux 上低于 24.14 的 Node、放在网络盘或 Docker 卷上的仓库、或 inotify 配额耗尽。于是改成每 1.5 秒跑一次 `git status`,一切照常刷新,只是可能晚一两秒。
|
|
94
94
|
|
|
95
95
|
## 明确不做
|
|
96
96
|
|
package/dist/server/main.js
CHANGED
|
@@ -2559,12 +2559,15 @@ function fail(message) {
|
|
|
2559
2559
|
* EPIPE 失败,而**在 Windows 上管道写是异步的**(POSIX 上同步),失败因此以一个 `'error'`
|
|
2560
2560
|
* 事件到达——零监听器的流收到 `'error'` 就是整个进程带着裸栈以 1 退出。
|
|
2561
2561
|
*
|
|
2562
|
-
*
|
|
2562
|
+
* **macOS 上同一件事还有第二个码**:stdio 管道在那里是 unix socket,对端刚关闭时内核偶尔回
|
|
2563
|
+
* EPROTOTYPE,libuv 把它翻译成 ECONNRESET——与 EPIPE 是同一个事实的两种拼法。
|
|
2564
|
+
*
|
|
2565
|
+
* 服务本身没坏(浏览器照常用得上),所以这里只是把这两个码咽掉。**别的错误照旧抛**:
|
|
2563
2566
|
* 那是真出事了,不该借这条路一起被吞掉。
|
|
2564
2567
|
*/
|
|
2565
2568
|
function ignoreBrokenPipe(stream) {
|
|
2566
2569
|
stream.on("error", (cause) => {
|
|
2567
|
-
if (cause.code !== "EPIPE") throw cause;
|
|
2570
|
+
if (cause.code !== "EPIPE" && cause.code !== "ECONNRESET") throw cause;
|
|
2568
2571
|
});
|
|
2569
2572
|
}
|
|
2570
2573
|
async function main(argv) {
|