chore: gofmt spontaneous panel files
Co-authored-by: Raymond Gasper <raymondgasper@fastmail.com>
- commit
- f7bf4a9d41566ee1332b6ee7dec1b78718cf1905
- author
- patriceckhart · · 2026-06-08 17:41 UTC
- parent
- af6c526
- signature
- unsigned
- refs
- tag: v0.2.21
2 files · +7 -5
M packages/agent/ext/ext_test.go +6 -4
| @@ -20,8 +20,8 @@ import ( | |||
| 20 | 20 | // occur if the test goroutine alternated between writing and reading | |
| 21 | 21 | // a synchronous pipe. | |
| 22 | 22 | type extHarness struct { | |
| 23 | - | ext *Extension | |
| 24 | - | hostW *io.PipeWriter // test writes here → ext reads as stdin | |
| 23 | + | ext *Extension | |
| 24 | + | hostW *io.PipeWriter // test writes here → ext reads as stdin | |
| 25 | 25 | frames chan rawFrame // ext→host frames delivered here | |
| 26 | 26 | } | |
| 27 | 27 | ||
| @@ -249,9 +249,11 @@ func TestBlockingToolDenied(t *testing.T) { | |||
| 249 | 249 | h.ext.OnPanelKey(pid, func(key, text string) { | |
| 250 | 250 | switch { | |
| 251 | 251 | case key == "rune" && text == "y": | |
| 252 | - | h.ext.ClosePanel(pid); approved <- true | |
| 252 | + | h.ext.ClosePanel(pid) | |
| 253 | + | approved <- true | |
| 253 | 254 | case key == "rune" && text == "n", key == "esc": | |
| 254 | - | h.ext.ClosePanel(pid); approved <- false | |
| 255 | + | h.ext.ClosePanel(pid) | |
| 256 | + | approved <- false | |
| 255 | 257 | } | |
| 256 | 258 | }, func() { approved <- false }) | |
| 257 | 259 | ||
| @@ -20,8 +20,8 @@ import ( | |||||
| 20 | // occur if the test goroutine alternated between writing and reading | 20 | // occur if the test goroutine alternated between writing and reading | ||
| 21 | // a synchronous pipe. | 21 | // a synchronous pipe. | ||
| 22 | type extHarness struct { | 22 | type extHarness struct { | ||
| 23 | - | ext *Extension | 23 | + | ext *Extension |
| 24 | - | hostW *io.PipeWriter // test writes here → ext reads as stdin | 24 | + | hostW *io.PipeWriter // test writes here → ext reads as stdin |
| 25 | frames chan rawFrame // ext→host frames delivered here | 25 | frames chan rawFrame // ext→host frames delivered here | ||
| 26 | } | 26 | } | ||
| 27 | 27 | ||||
| @@ -249,9 +249,11 @@ func TestBlockingToolDenied(t *testing.T) { | |||||
| 249 | h.ext.OnPanelKey(pid, func(key, text string) { | 249 | h.ext.OnPanelKey(pid, func(key, text string) { | ||
| 250 | switch { | 250 | switch { | ||
| 251 | case key == "rune" && text == "y": | 251 | case key == "rune" && text == "y": | ||
| 252 | - | h.ext.ClosePanel(pid); approved <- true | 252 | + | h.ext.ClosePanel(pid) |
| 253 | + | approved <- true | |||
| 253 | case key == "rune" && text == "n", key == "esc": | 254 | case key == "rune" && text == "n", key == "esc": | ||
| 254 | - | h.ext.ClosePanel(pid); approved <- false | 255 | + | h.ext.ClosePanel(pid) |
| 256 | + | approved <- false | |||
| 255 | } | 257 | } | ||
| 256 | }, func() { approved <- false }) | 258 | }, func() { approved <- false }) | ||
| 257 | 259 | ||||
M packages/agent/extproto/extproto.go +1 -1
| @@ -102,7 +102,7 @@ type PanelSpec struct { | |||
| 102 | 102 | // CommandResponseFromExt, this form is uncoupled from any command invocation | |
| 103 | 103 | // and may be sent from a tool handler goroutine or any background context. | |
| 104 | 104 | type OpenPanelFromExt struct { | |
| 105 | - | Type string `json:"type"` // "open_panel" | |
| 105 | + | Type string `json:"type"` // "open_panel" | |
| 106 | 106 | Panel PanelSpec `json:"panel"` | |
| 107 | 107 | } | |
| 108 | 108 | ||
| @@ -102,7 +102,7 @@ type PanelSpec struct { | |||||
| 102 | // CommandResponseFromExt, this form is uncoupled from any command invocation | 102 | // CommandResponseFromExt, this form is uncoupled from any command invocation | ||
| 103 | // and may be sent from a tool handler goroutine or any background context. | 103 | // and may be sent from a tool handler goroutine or any background context. | ||
| 104 | type OpenPanelFromExt struct { | 104 | type OpenPanelFromExt struct { | ||
| 105 | - | Type string `json:"type"` // "open_panel" | 105 | + | Type string `json:"type"` // "open_panel" |
| 106 | Panel PanelSpec `json:"panel"` | 106 | Panel PanelSpec `json:"panel"` | ||
| 107 | } | 107 | } | ||
| 108 | 108 | ||||