Skip to content
Open
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
1 change: 0 additions & 1 deletion src/web/client/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export function App() {
key={activeSession?.id}
rawOutput={rawOutput}
onSendInput={handleSendInput}
onInterrupt={handleKillSession}
disabled={!activeSession || activeSession.status !== 'running'}
/>
</div>
Expand Down
15 changes: 2 additions & 13 deletions src/web/client/components/terminal-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ declare global {
interface RawTerminalProps {
rawOutput: string
onSendInput?: (data: string) => void
onInterrupt?: () => void
disabled?: boolean
}

Expand Down Expand Up @@ -89,21 +88,11 @@ export class RawTerminal extends React.Component<RawTerminalProps> {
}

private setupInputHandling(term: Terminal) {
const { onSendInput, onInterrupt, disabled } = this.props
const { onSendInput, disabled } = this.props

if (disabled) return

const handleData = (data: string) => {
if (data === '\u0003') {
// Ctrl+C
onInterrupt?.()
} else {
// Send input to PTY server (PTY will echo back for interactive sessions)
onSendInput?.(data)
}
}

term.onData(handleData)
term.onData((data) => onSendInput?.(data))
}

override render() {
Expand Down