refactor(tui): tighten /browser connect plumbing
Split browser.manage into a small dispatcher with named connect/disconnect helpers, fold _http_ok / _probe_urls / _normalize_cdp_url out of the nested probe loop, collapse the failure-message scaffolding, and DRY the chrome candidate path tables. Behaviour and event shape unchanged.
This commit is contained in:
committed by
Teknium
parent
e750829015
commit
26816d1f77
@@ -192,11 +192,7 @@ describe('createSlashHandler', () => {
|
||||
|
||||
it.each([
|
||||
['/browser status', 'browser.manage', { action: 'status', session_id: null }],
|
||||
[
|
||||
'/browser connect',
|
||||
'browser.manage',
|
||||
{ action: 'connect', session_id: null, url: 'http://127.0.0.1:9222' }
|
||||
],
|
||||
['/browser connect', 'browser.manage', { action: 'connect', session_id: null, url: 'http://127.0.0.1:9222' }],
|
||||
['/reload-mcp', 'reload.mcp', { session_id: null }],
|
||||
['/stop', 'process.stop', {}],
|
||||
['/fast status', 'config.get', { key: 'fast', session_id: null }],
|
||||
|
||||
Reference in New Issue
Block a user