Commit graph

1433 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
21f7e96bef
Address code review: add comment, fallback timer, and warning log for PID monitoring 2026-06-28 03:16:33 +00:00
copilot-swe-agent[bot]
aee532c586
Fix issue 10198: edit-in-kitty exits with editor's exit code
- Python (kitty/launch.py): Track editor PID via monitor_pid to capture
  exit code when editor window closes. Send exit code as data in the DONE
  message instead of sending no data.
- Go (tools/cmd/edit_in_kitty/main.go): Parse exit code from DONE message
  data and use lp.Quit(exit_code) to exit with the editor's exit code.
- Go (tools/cmd/tool/confirm_and_run_shebang.go): Check exit code when
  running edit-in-kitty as a subprocess; abort execution on editor failure.
2026-06-28 03:10:58 +00:00
Kovid Goyal
a2104d3755
Merge branch 'feat/10090-graphics-cache-dir' of https://github.com/Mekann2904/kitty 2026-06-19 10:16:10 +05:30
Matsumoto Kotaro
89946ebc07 graphics: make N a transient usage-hints bitmask
Change the graphics protocol N key from a boolean into a usage-hints
bitmask. Define the first bit as a transient hint, allowing the terminal
to treat the image data as short-lived and apply optimizations such as
skipping disk cache writes.

Propagate the transient hint through frame coalescing and composition, so
a composed frame is transient if any contributing frame is transient.
2026-06-19 13:22:01 +09:00
Kovid Goyal
8996aa798c
dnd kitten: Create regular files with O_EXCL to avoid symlink attacks
Some checks failed
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Has been cancelled
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Has been cancelled
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Has been cancelled
CI / Linux package (push) Has been cancelled
CI / Bundle test (macos-latest) (push) Has been cancelled
CI / Bundle test (ubuntu-latest) (push) Has been cancelled
CI / macOS Brew (push) Has been cancelled
CI / Test ./dev.sh and benchmark (push) Has been cancelled
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (c, macos-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Has been cancelled
Depscan / Scan dependencies for vulnerabilities (push) Has been cancelled
This is not really needed as the terminal emulator should be de
duplicating directory entries anyway but no harm in defense in depth.
2026-06-03 12:17:38 +05:30
Kovid Goyal
e6e5524f67
diff kitten: Strip suid/sgid bits from extracted files 2026-06-03 05:45:04 +05:30
Kovid Goyal
cb0f05c4e4
Fix parsing of config set aborting on non-existent files
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-06-02 21:19:04 +05:30
copilot-swe-agent[bot]
bff5af7052
address review: fix comment wording and rename burst_actions variable 2026-06-02 12:46:10 +00:00
copilot-swe-agent[bot]
d80fd1c23d
consolidate watch tests and add include-in-included-file test
- Merge TestWatchForConfigChangesIncludeAdded and
  TestWatchForConfigChangesIncludeRemoved into the main
  TestWatchForConfigChanges function, which now starts the watcher
  once and shares it across all integration subtests.
- Add prime_watcher helper that retries writes until an action fires,
  replacing the blind time.Sleep(200ms) watcher-startup wait.
- Add new subtest "include added to already-included file adds its
  parent dir": writes an include directive into sub/included.conf
  (itself included from kitty.conf), then verifies that changes to
  the newly referenced file trigger the action, confirming its parent
  directory was added to the watch set.
- Fix TestWatchForConfigChangesDebounce to use prime_watcher instead
  of time.Sleep for startup; capture before_burst baseline before the
  burst loop so the burst-action count is computed correctly.
2026-06-02 12:45:00 +00:00
copilot-swe-agent[bot]
7e96373515
watch: non-recursive config file watching with dynamic include tracking 2026-06-02 08:23:05 +00:00
Matsumoto Kotaro
cc2d7a1789 graphics: add memory-only storage for graphics data
Add a new graphics protocol key, N=1, to request that transmitted
image/frame data is kept only in memory and not written to the graphics
disk cache file.

This is useful for transient high-frequency updates such as video-like
streams, where the latest frame is the only useful data and persisting
each frame to the disk cache causes unnecessary write traffic.

The implementation keeps the existing graphics cache abstraction intact:
memory-only entries can still be read back by animation, composition, and
frame coalescing paths. Only persistence to the disk cache file is skipped.

The default behavior is unchanged when N is omitted or set to zero.
2026-05-30 18:46:24 +09:00
Kovid Goyal
f2df2394ce
Fix conf watcher kitten not tracking changes to symlink targets
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-05-24 09:54:01 +05:30
Kovid Goyal
dd136ba806
... 2026-05-24 09:12:43 +05:30
Kovid Goyal
6da5bae945
Cleanup previous PR 2026-05-18 13:55:48 +05:30
Kovid Goyal
c5b9b7d81d
... 2026-05-17 13:45:53 +05:30
Xuyiyang23333
c0661024d8 Fix silent failure when pager (less) is not installed
When kitten --help is run in a terminal and less is not available,
ShowHelpInPager silently discards the error from pager.Run(), resulting
in no output and a zero exit code. Fall back to writing help text
directly to stdout when the pager fails, matching the behavior of the
Python equivalent in kitty/cli.py which catches FileNotFoundError and
prints the text as a fallback.

Signed-off-by: Xuyiyang23333 <xuyiyang23333@gmail.com>
2026-05-13 00:37:55 +08:00
Kovid Goyal
3165a47579
More work on the DnD kitten 2026-05-05 10:49:56 +05:30
Kovid Goyal
da590ed5ec
Remove unused code 2026-05-03 11:57:33 +05:30
Kovid Goyal
cd7d3026f6
Handle dnd chunking internally in the loop 2026-05-02 17:28:01 +05:30
Kovid Goyal
ff7c6425e6
More work on dnd kitten 2026-05-02 12:16:42 +05:30
copilot-swe-agent[bot]
3f04b4dd40
Remove spurious blank line in Decoder Finish method
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/cb72bac9-aa33-480e-83e9-2f59508694a7

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-02 03:23:18 +00:00
copilot-swe-agent[bot]
ef8189016f
Add streaming base64 encoder with comprehensive tests
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/cb72bac9-aa33-480e-83e9-2f59508694a7

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-05-02 03:21:25 +00:00
Kovid Goyal
197115cb95
More work on the dnd kitten 2026-05-01 12:37:35 +05:30
copilot-swe-agent[bot]
7757d160bc
RemoveChildren: use RefCountedFile instead of DupFile, skip seek for child dirs
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/e648c02e-d4cc-4f6c-8188-17941e8a1dd8

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-27 04:01:02 +00:00
copilot-swe-agent[bot]
708cff7f4b
Convert RemoveChildren from recursive to iterative stack-based
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/bd5ca209-e811-4c49-bec7-5dd3a40d8c57

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-27 03:50:32 +00:00
Kovid Goyal
c655df1c2d
... 2026-04-27 09:12:43 +05:30
Kovid Goyal
9e59bf2f6a
Avoid extra lstat() per entry when removing directory tree 2026-04-27 09:09:07 +05:30
copilot-swe-agent[bot]
cca16aabd3
Add tests for RenameAt, find_overwrites, and rename_contents
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/2fffdd1f-2d67-4a28-b124-437c26794e25

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-27 03:02:32 +00:00
Kovid Goyal
8c2c32a5a5
More work on the dnd kitten 2026-04-27 08:22:17 +05:30
Kovid Goyal
151fb9220f
More work on dnd kitten 2026-04-26 20:45:41 +05:30
Kovid Goyal
ff560f615e
... 2026-04-26 13:15:08 +05:30
copilot-swe-agent[bot]
6000226cdf
Add tests for file_at_fd.go and fix FD lifetime bug in CopyFolderContents
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/389bb81e-e9f9-4428-a79a-d8d461cfe943

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-25 11:30:59 +00:00
Kovid Goyal
a5940b4eb1
... 2026-04-25 13:59:37 +05:30
Kovid Goyal
ecc241d891
For for background copy go routine to exit 2026-04-25 13:40:58 +05:30
Kovid Goyal
f6c0955e84
Read large directories in chunks for faster cancel 2026-04-25 13:34:21 +05:30
Kovid Goyal
a6e58e2ca9
Cleanup symlink seen handling 2026-04-25 13:25:33 +05:30
Kovid Goyal
5146cb388b
Fix various minor bugs in copy folders 2026-04-25 13:02:27 +05:30
Kovid Goyal
8737da510f
Add optional symlink following to copyfolder function 2026-04-25 12:08:56 +05:30
Kovid Goyal
4a5ab0a05e
Fix various minor bugs in the copy folders function 2026-04-24 15:35:44 +05:30
Kovid Goyal
68a4623f37
DRYer 2026-04-24 15:12:24 +05:30
Kovid Goyal
55c4519707
More pointless UNIX variability 2026-04-24 14:56:29 +05:30
Kovid Goyal
0f81bca430
DRYer 2026-04-24 14:37:34 +05:30
Kovid Goyal
ca7388c145
Bloody lazy Crapple
No mknodat. Sigh.
2026-04-24 14:22:41 +05:30
Kovid Goyal
2c37fb4845
API to copy folder contents using dir fds
Also make the various fd based wrappers handle EINTR automatically.
2026-04-24 14:12:04 +05:30
Kovid Goyal
ddcf471d90
rename file 2026-04-24 14:11:32 +05:30
Kovid Goyal
64342abda0
More work on the dnd kitten 2026-04-23 08:15:34 +05:30
Kovid Goyal
b4f7162a73
Use CLOEXEC with openat 2026-04-21 22:01:39 +05:30
Kovid Goyal
43035b7224
Rename at fd module 2026-04-21 21:59:05 +05:30
Kovid Goyal
828384a324
More fd based API 2026-04-21 21:58:33 +05:30
Kovid Goyal
b8de27655f
Utility function to delete content of dir pointed to by open file 2026-04-21 21:41:17 +05:30