Provide the platform input/signal stubs on wasip1/wasip2 (#1767)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Drew Smirnoff <drew@charm.land>
This commit is contained in:
Calvin Prewitt 2026-11-12 07:24:26 -06:00 committed by GitHub
parent 9806b0c763
commit 73b79b3737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

6
signals_other.go Normal file
View file

@ -0,0 +1,6 @@
//go:build wasip1 || wasip2
package tea
// listenForResize on WASI: no SIGWINCH; report immediately done.
func (p *Program) listenForResize(done chan struct{}) { close(done) }

12
tty_other.go Normal file
View file

@ -0,0 +1,12 @@
//go:build wasip1 || wasip2
package tea
// initInput on WASI: there is no raw mode and no /dev/tty; the program
// runs with non-TTY (pipe) input, which Bubble Tea supports natively.
func (p *Program) initInput() (err error) { return nil }
// suspendSupported: no SIGTSTP or process groups on WASI.
const suspendSupported = false
func suspendProcess() {}