mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
6126413d60
Reviewed-by: codex-mini0 Reviewed-by: First-principles-0 No-check override: WAWQAQ 2026-06-01
22 lines
624 B
JavaScript
22 lines
624 B
JavaScript
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
import { evaluateQoder } from './_utils.js';
|
|
|
|
cli({
|
|
site: 'qoder',
|
|
name: 'status',
|
|
access: 'read',
|
|
description: 'Check Qoder CDP connection and report the current renderer URL + title.',
|
|
domain: 'localhost',
|
|
strategy: Strategy.UI,
|
|
browser: true,
|
|
args: [],
|
|
columns: ['Status', 'Url', 'Title'],
|
|
func: async (page) => {
|
|
return [{
|
|
Status: 'Connected',
|
|
Url: await evaluateQoder(page, 'window.location.href'),
|
|
Title: await evaluateQoder(page, 'document.title'),
|
|
}];
|
|
},
|
|
});
|