MCPcopy Create free account
hub / github.com/charmbracelet/bubbletea / executeQuery

Method executeQuery

tea.go:1367–1373  ·  view source on GitHub ↗

executeQuery writes a terminal query to the program output. Queries expect a reply on p.input, so when input is disabled the query is skipped: the program cannot read the response, and the terminal's reply would leak into the shell once the program exits (#1590). This covers every query that expect

(seq string)

Source from the content-addressed store, hash-verified

1365// position reports, clipboard reads, and terminal version and termcap
1366// queries.
1367func (p *Program) executeQuery(seq string) {
1368 if p.disableInput {
1369 return
1370 }
1371 p.noteQuery()
1372 p.execute(seq)
1373}
1374
1375// noteQuery records that a terminal query is about to be written, so its
1376// reply can be read before the terminal is handed back. See

Callers 5

eventLoopMethod · 0.95
RunMethod · 0.95
TestDrainQueryRepliesFunction · 0.80

Calls 2

noteQueryMethod · 0.95
executeMethod · 0.95