feat: release v0.88.0 with automation and browser runtime upgrades

This commit is contained in:
coso
2026-03-16 15:28:21 +08:00
parent 88c3bf93e7
commit 723fafe621
271 changed files with 47044 additions and 19216 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
- Observer 通道自动连接:`/proxycast-chrome-observer/Proxycast_Key=...`
- 页面信息上报:标题、URL、Markdown
- 远程指令执行:`open_url` / `click` / `type` / `scroll` / `switch_tab` / `go_back` 等
- 远程指令执行:`open_url` / `click` / `type` / `scroll` / `switch_tab` / `list_tabs` / `go_back` 等
- 弹窗配置:`serverUrl`、`bridgeKey`、`profileKey`、监控开关、手动抓取
## 安装
+40
View File
@@ -235,6 +235,11 @@ async function executeRemoteCommand(commandData) {
return;
}
if (command === "list_tabs") {
await handleListTabs(commandData);
return;
}
const tabId = await resolveTargetTabId();
if (!tabId) {
sendCommandResult({
@@ -389,6 +394,41 @@ async function handleSwitchTab(commandData, waitForPageInfo) {
}
}
async function handleListTabs(commandData) {
const requestId = commandData.requestId;
const sourceClientId = commandData.sourceClientId;
try {
const tabs = await chrome.tabs.query({ currentWindow: true });
const normalizedTabs = tabs
.filter((tab) => Number.isInteger(tab.id) && Number.isInteger(tab.index))
.map((tab) => ({
id: tab.id,
index: tab.index,
active: tab.active === true,
title: tab.title || "",
url: tab.url || "",
}));
sendCommandResult({
requestId,
sourceClientId,
status: "success",
message: `已读取 ${normalizedTabs.length} 个标签页`,
data: {
tabs: normalizedTabs,
},
});
} catch (error) {
sendCommandResult({
requestId,
sourceClientId,
status: "error",
error: error?.message || String(error),
});
}
}
function sendCommandResult(data) {
sendObserverMessage({
type: "command_result",