Repository navigation
Conversation
a1906ff to
0f19398
Compare
A selector miss surfaces as `bsk session start failed: requested browser is not connected (hint: run bsk browsers)`. The CLI prints the connected browsers, but a DSH tool result keeps only the message, so the model names a browser that is not connected and misses again. Append the `data.browsers` list the error already carries to the message the model sees. Rebuilt on current main: the `withHint` assembly keeps the newer `dialog_pending` branch that landed after this branch was written.
0f19398 to
5078078
Compare
|
Rebuilt on current
Local runs on the rebuilt tree: The new case fails on clean Unchanged on |
#313 taught the CLI to list the connected browsers when a selector matches nothing, so a caller can pick a real instance or label instead of probing every browser in turn. The list reaches the JSON envelope; it does not reach a DSH user.
bsk --jsonreports the miss asNotFoundwith the candidates indata.browsers:{ "code": "not_found", "message": "requested browser is not connected", "data": { "browsers": [ … ] } }parseBskJsonreadscode,messageandhintand dropsdata, andBskErrorhas no field to carry it, so the candidates stop there. Putting them on the error object would not be enough either: the tool layer re-throws and the host showserror.message, so the list has to travel in the message.Change
One helper, used in the place the CLI's own renderer puts the table — between the summary and the hint:
It is deliberately one line.
tools.tskeepserror.message.split("\n")[0]for the action card, so a multi-line list would be truncated in the UI while looking complete in the transcript.Only
data.browsersrenders. Every other envelope is untouched, including the two that also usedata—session_busy'sreason, which drives the one-shot retry, and the ambiguous-label ids. An empty list renders nothing, matching the CLI, which leaves a miss against an empty registry unrendered too; an entry with noinstance_idis skipped rather than printed as a blank row.Verification
The two revisions were executed side by side over twelve envelopes. Two messages changed — the selector miss, and one case with a malformed candidate — and the other ten are byte-identical, covering
session_busy, thefill_value_mismatchenvelope, timeouts, killed-by-interrupt children, non-JSON stderr, and both success paths.Three cases were added to
tests/runner.test.ts: the candidate list (asserting the wording, the summary → candidates → hint order, and that the result is a single line), an empty list, and adatapayload that is not a candidate list.I have not run the package's own
vitesthere — the plugin's build step is what I could not reproduce locally — so the added cases are written to the file's existing conventions rather than reported green. The envelope comparison above runs the realrunner.tsfor both revisions.Thanks again for #313; this is the follow-up you flagged in review.