Repository navigation
feat: cmd+click file paths to markdown panel with tmux CC native pane support #1517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Tim-Feng
wants to merge
22
commits into
manaflow-ai:main
Choose a base branch
from
Tim-Feng:pr/route-file-links-to-markdown-panel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
933eee1
feat: route local file path clicks to markdown panel
Tim-Feng b45ca48
fix: validate file exists and is not a directory before opening markd…
Tim-Feng aa52010
fix: fall back to system handler when markdown split creation fails
Tim-Feng efbbd16
refactor: address CodeRabbit review feedback
Tim-Feng d84fdbf
docs: tmux control mode integration plan
Tim-Feng 58ecc93
[BEHAVIORAL] Phase 1 tmux control mode bridge
Tim-Feng 6ab1ec2
[BEHAVIORAL] cmd+click path detection in tmux control mode
Tim-Feng af76ebe
[BEHAVIORAL] Phase 2 tmux pane rendering — native surface per pane
Tim-Feng 251dc33
[BEHAVIORAL] tmux pane IME improvements
Tim-Feng 45fe7d6
[BEHAVIORAL] Terminal.clone initial sync + IME preedit cursor bar
Tim-Feng 507fe43
[BEHAVIORAL] Auto-add -CC for tmux attach/new in shell integration
Tim-Feng 71944b6
[BEHAVIORAL] tmux CC: cmd+click file open, paste, arrow keys, $TMUX fix
Tim-Feng d70f132
[BEHAVIORAL] tmux CC: route mouseDragged to pane surface for text sel…
Tim-Feng c7f8704
[BEHAVIORAL] VT parser: absorb ESC k (tmux set-title) to fix pane ren…
Tim-Feng a31b8a3
[STRUCTURAL] Add parser test for ESC k tmux set-title absorption
Tim-Feng 0220de2
[STRUCTURAL] Revert status bar gap — container covers full area
Tim-Feng c4237f1
[BEHAVIORAL] tmux CC: native status bar with session/window info
Tim-Feng 9b1e923
[BEHAVIORAL] tmux CC: prefix key layer + detach support
Tim-Feng 384b818
[BEHAVIORAL] tmux CC: initial sync via capture-pane
Tim-Feng 26b7823
[BEHAVIORAL] tmux CC: initial sync with geometry-aware capture-pane
Tim-Feng 3964ae8
[BEHAVIORAL] tmux CC: fix host terminal bleed-through + simplify init…
Tim-Feng 379c59c
[BEHAVIORAL] tmux CC: hide host terminal with alphaValue + cursor-bas…
Tim-Feng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -567,8 +567,46 @@ _cmux_zshexit() { | |||||
| _cmux_stop_pr_poll_loop | ||||||
| } | ||||||
|
|
||||||
| # tmux auto-CC: installed on first prompt (after .zshrc) so user plugins | ||||||
| # cannot shadow it. Use `command tmux ...` to bypass, or set | ||||||
| # CMUX_TMUX_AUTO_CC=0 to disable globally. | ||||||
| _cmux_install_tmux_wrapper() { | ||||||
| # Define/redefine the tmux function, overriding any plugin definition | ||||||
| tmux() { | ||||||
| [[ "${CMUX_TMUX_AUTO_CC:-1}" == "0" ]] && { command tmux "$@"; return $?; } | ||||||
| # Inside cmux, $TMUX may be inherited from the launcher env but | ||||||
| # this terminal is NOT really inside tmux — ignore it. | ||||||
| # Outside cmux (no CMUX_SOCKET_PATH), respect $TMUX as usual. | ||||||
| [[ -z "$CMUX_SOCKET_PATH" && -n "$TMUX" ]] && { command tmux "$@"; return $?; } | ||||||
| [[ -o interactive ]] || { command tmux "$@"; return $?; } | ||||||
| [[ -t 1 ]] || { command tmux "$@"; return $?; } | ||||||
| local arg; for arg in "$@"; do | ||||||
| [[ "$arg" == "-CC" || "$arg" == "-C" ]] && { command tmux "$@"; return $?; } | ||||||
| [[ "$arg" == "--" ]] && break | ||||||
| done | ||||||
| local subcmd="" skip_next=0 | ||||||
| for arg in "$@"; do | ||||||
| if (( skip_next )); then skip_next=0; continue; fi | ||||||
| case "$arg" in | ||||||
| -L|-S|-f|-c) skip_next=1; continue ;; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: tmux subcommand detection misses valid global options with arguments (e.g. Prompt for AI agents
Suggested change
|
||||||
| -*) continue ;; | ||||||
| *) subcmd="$arg"; break ;; | ||||||
| esac | ||||||
| done | ||||||
| case "$subcmd" in | ||||||
| attach|attach-session|a|new|new-session|"") | ||||||
| command tmux -CC "$@" ;; | ||||||
| *) | ||||||
| command tmux "$@" ;; | ||||||
| esac | ||||||
| } | ||||||
| # Only need to install once | ||||||
| add-zsh-hook -d precmd _cmux_install_tmux_wrapper | ||||||
| } | ||||||
|
|
||||||
| autoload -Uz add-zsh-hook | ||||||
| add-zsh-hook preexec _cmux_preexec | ||||||
| add-zsh-hook precmd _cmux_precmd | ||||||
| add-zsh-hook precmd _cmux_fix_path | ||||||
| add-zsh-hook precmd _cmux_install_tmux_wrapper | ||||||
| add-zsh-hook zshexit _cmux_zshexit | ||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: tmux subcommand detection misses
-T(a value-taking global flag), which can misparse arguments and break-CCauto-injection.Prompt for AI agents