fix: v2.7.4 — Changes matches JetBrains (#72), the chat says when Claude waits on a trust prompt (#73), Vietnamese Telex in Safari

- Changes (#72): a file git reports `MM` whose working copy equals HEAD again
  (a staged change since undone on disk) is no longer listed — JetBrains'
  GitChangesCollector drops it the same way. Mode-only changes stay listed.
  statusCounts (the dirty-tree safety checks) is unchanged.
- Chat (#73): Claude Code runs no hook before a folder is trusted, so a new
  pane's session has no row; the chat now says the session has not started,
  offers Open terminal, and asks before typing a message or /model //effort
  into the pane (an Enter would pick the trust prompt's "No, exit").
- Terminal: Safari + macOS's own Vietnamese Telex replaces the whole word on
  each key (insertReplacementText), which xterm.js ignores — only each word's
  first letter reached the pane. The edit is now sent as DELs + the new tail.
- Also: Ctrl+V pastes a screenshot into the terminal as a file path; the
  folder browser fallback lists files for a file field (`files=1`); the macOS
  native picker opens in front of the browser; a hidden tab is marked while a
  chat waits or once a turn ended; chat live line shows running calls, turn
  time and tokens, and "Done in …".
This commit is contained in:
2026-10-12 15:40:47 +07:00
parent 5d8fc9bb98
commit 46e3899945
44 changed files with 1329 additions and 297 deletions
+17 -10
View File
@@ -531,11 +531,19 @@ router.get("/drop/:name", (req, res) => {
// for a link after the check): a regular file this account wrote. NOFOLLOW
// refuses a link outright; NONBLOCK keeps a FIFO from hanging the loop.
// S3: the requester's own drop dir, owned by their member account — so an
// admin viewing a member's session gets the name chip, not the image.
// admin viewing a member's session gets the name chip, not the image. An
// admin's host-folder workspace drops into the HOST's dir (only an admin
// may own one), and the chat's GET names no workspace: that dir too.
const dirs = type ? [dropDir(req)] : [];
if (dirs[0]?.member && req.user?.role === "admin" && !req.query?.laneId) {
dirs.push({
dir: path.join(require("../lib/claude-home").getDataDir(), "drops"),
member: null,
});
}
let fd = null;
try {
if (type) {
const { dir, member } = dropDir(req);
for (const { dir, member } of dirs) {
try {
fd = fs.openSync(
path.join(dir, name),
fs.constants.O_RDONLY | (fs.constants.O_NOFOLLOW || 0) | (fs.constants.O_NONBLOCK || 0)
@@ -546,13 +554,12 @@ router.get("/drop/:name", (req, res) => {
: typeof process.getuid === "function"
? process.getuid()
: st.uid;
if (!st.isFile() || st.uid !== uid) {
fs.closeSync(fd);
fd = null;
}
if (st.isFile() && st.uid === uid) break;
fs.closeSync(fd);
fd = null;
} catch {
/* pruned, never dropped, or a link */
}
} catch {
/* pruned, never dropped, or a link */
}
if (fd === null) {
return res.status(404).json({ error: { code: "ENOTFOUND", message: "no such image" } });