Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/renderer/components/chat/AgentTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,15 @@ export function AgentTerminal({
{ id: 'copy', label: t('Copy'), disabled: !terminal?.hasSelection() },
{ id: 'paste', label: t('Paste') },
{ id: 'selectAll', label: t('Select all') },
...(tmuxSessionNameRef.current
? [
{ id: 'separator-2', label: '', type: 'separator' as const },
{
id: 'copyTmuxRestore',
label: t('Copy tmux restore command'),
},
]
: []),
];

const selectedId = await window.electronAPI.contextMenu.show(menuItems);
Expand Down Expand Up @@ -910,6 +919,12 @@ export function AgentTerminal({
case 'selectAll':
terminal?.selectAll();
break;
case 'copyTmuxRestore':
if (tmuxSessionNameRef.current) {
const restoreCmd = `tmux -L enso attach-session -t ${tmuxSessionNameRef.current}`;
navigator.clipboard.writeText(restoreCmd);
}
break;
}
},
[terminal, clear, refreshRenderer, t, onSplit, canMerge, onMerge, onFocus]
Expand Down
1 change: 1 addition & 0 deletions src/shared/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const zhTranslations: Record<string, string> = {
'Copy Commit ID': '复制 Commit ID',
'Copy Path': '复制路径',
'Copy Relative Path': '复制相对路径',
'Copy tmux restore command': '复制 tmux 恢复命令',
'Revert commit': 'Revert 提交',
'Reset to commit': 'Reset 到此提交',
'Select reset mode for commit': '选择 Reset 模式',
Expand Down
Loading