Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): add copying terminal selection with ctrl+c in the web app #5638

MergedUtkarshUsername(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/5638/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 9 changed files with 9 additions and 15 deletions (loading 6).

x
0 of 9 viewed, 9 left
0 additions and 1 deletionapps/web/src/components/settings/SettingsFontPreviews.tsxModified
View file
@@ -238,7 +238,6 @@
onData: echo,
onResize: noop,
onSelectionChange: noop,
- onCopy: (text) => void navigator.clipboard?.writeText(text).catch(noop),
// Tab keeps walking the settings page instead of feeding the echo loop.
beforeKey: (event) => event.key !== "Tab",
onLinkActivate: noop,
6 additions and 12 deletionsapps/web/src/components/ThreadTerminalDrawer.tsxModified
View file
@@ -440,7 +440,6 @@
onData: (data) => handleData(data),
onResize: (cols, rows) => void resizeTerminal(cols, rows),
onSelectionChange: () => handleSelectionChange(),
- onCopy: (text) => handleCopy(text),
beforeKey: (event) => handleBeforeKey(event),
onLinkActivate: (text, event) => handleLinkActivate(text, event),
@@ -668,17 +667,6 @@
})();
​
- function handleCopy(text: string): void {
- void writeTextToClipboard(text, "terminal selection").catch((error: unknown) => {
- const activeTerminal = terminalRef.current;
- if (!activeTerminal) return;
- writeSystemMessage(