mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-09 21:00:56 -07:00
feat(workspaces): customize tmux status bar for better UX and session ID
This commit is contained in:
@@ -98,7 +98,17 @@ export async function runOrchestrator(args: string[], env: NodeJS.ProcessEnv = p
|
||||
const authEnv = `${remoteApiKey ? `-e GEMINI_API_KEY=${remoteApiKey} ` : ''}${remoteGhToken ? `-e GITHUB_TOKEN=${remoteGhToken} -e GH_TOKEN=${remoteGhToken} ` : ''}`;
|
||||
|
||||
// PERSISTENCE: Wrap the entire execution in a tmux session inside the container
|
||||
const tmuxCmd = `tmux new-session -A -s ${sessionName} ${q(`cd ${remoteWorktreeDir} && ${remoteWorker}; exec $SHELL`)}`;
|
||||
// We also style the tmux bar here to be less intrusive and more informative
|
||||
const tmuxStyle = `
|
||||
set -g status-bg colour235;
|
||||
set -g status-fg colour136;
|
||||
set -g status-left-length 50;
|
||||
set -g status-left '#[fg=colour235,bg=colour136,bold] WORKSPACE #[fg=colour136,bg=colour235,nobold] PR #${prNumber} (${action}) ';
|
||||
set -g status-right '#[fg=colour245] %H:%M #[fg=colour235,bg=colour245,bold] #H ';
|
||||
setw -g window-status-current-format '#[fg=colour235,bg=colour136,bold] #I:#W #[fg=colour136,bg=colour235,nobold]';
|
||||
`.replace(/\n/g, '');
|
||||
|
||||
const tmuxCmd = `tmux new-session -A -s ${sessionName} ${q(`tmux ${tmuxStyle} ; cd ${remoteWorktreeDir} && ${remoteWorker}; exec $SHELL`)}`;
|
||||
const containerWrap = `sudo docker exec -it ${authEnv}maintainer-worker sh -c ${q(tmuxCmd)}`;
|
||||
|
||||
const finalSSH = provider.getRunCommand(containerWrap, { interactive: true });
|
||||
|
||||
Reference in New Issue
Block a user