@celljs/ta-computer-use 4.14.0 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension/index.mjs +11 -1
- package/package.json +7 -3
package/extension/index.mjs
CHANGED
|
@@ -89,6 +89,15 @@ var CuaDriver;
|
|
|
89
89
|
|
|
90
90
|
// src/cua-driver-access.ts
|
|
91
91
|
import { execFile } from "node:child_process";
|
|
92
|
+
function ofLanguage(tag) {
|
|
93
|
+
if (/^zh/i.test(tag)) {
|
|
94
|
+
return /(?:tw|hk|mo|hant)/i.test(tag) ? "zh-TW" : "zh-CN";
|
|
95
|
+
}
|
|
96
|
+
if (/^ja/i.test(tag)) {
|
|
97
|
+
return "ja-JP";
|
|
98
|
+
}
|
|
99
|
+
return "en-US";
|
|
100
|
+
}
|
|
92
101
|
var CHECK_TIMEOUT_MS = 5000;
|
|
93
102
|
var DOCTOR_TIMEOUT_MS = 15000;
|
|
94
103
|
var POLL_MS = 1000;
|
|
@@ -98,7 +107,8 @@ var WAIT_MS = 3 * 60 * 1000;
|
|
|
98
107
|
var DESKTOP_PROBES = /display|x11|wayland|at-spi|accessib|session|desktop|automation|uia/i;
|
|
99
108
|
var MISSING_LIBRARY = /error while loading shared libraries: (\S+?):/;
|
|
100
109
|
function askMac(env = process.env) {
|
|
101
|
-
|
|
110
|
+
const language = ofLanguage(env.TA_LANGUAGE || env.LC_ALL || env.LANG || "");
|
|
111
|
+
return language === "zh-CN" ? "Ta 正在请 macOS 允许 Cua Driver 使用这台 Mac:请在 Cua Driver 打开的窗口或“系统设置”里,打开“辅助功能”(用于点击和输入)和“屏幕录制”(用于查看窗口)中的 Cua Driver。开好后 Ta 会自动继续;点“停止”可放弃。" : language === "zh-TW" ? "Ta 正在請 macOS 允許 Cua Driver 使用這台 Mac:請在 Cua Driver 開啟的視窗或「系統設定」裡,開啟「輔助功能」(用於點選和輸入)和「螢幕錄製」(用於檢視視窗)中的 Cua Driver。開好後 Ta 會自動繼續;點「停止」可放棄。" : language === "ja-JP" ? "Ta は macOS に Cua Driver がこの Mac を使用することを許可するよう要求しています。Cua Driver が開いたウィンドウまたは「システム設定」で、「アクセシビリティ」(クリックと入力用)と「画面録画」(ウィンドウ表示用)の Cua Driver をオンにしてください。有効にした後、Ta は自動的に続行します。「停止」をクリックすると中止できます。" : "Ta is asking macOS to let Cua Driver use this Mac: turn Cua Driver on under Accessibility (to click and type) and Screen Recording (to see windows), in the window Cua Driver opened or in System Settings. Ta goes on by itself once you have; Stop gives up.";
|
|
102
112
|
}
|
|
103
113
|
var NO_ACCESSIBILITY = "Cua Driver has no Accessibility permission of macOS, which it needs to read and use apps: ask the user to turn Cua Driver on in System Settings → Privacy & Security → Accessibility (`/computer-use` in Ta opens it), then try again.";
|
|
104
114
|
var NO_SCREEN_RECORDING = "Cua Driver has no Screen Recording permission of macOS: it reads and uses apps, but takes no screenshots. Turn it on in System Settings → Privacy & Security → Screen & System Audio Recording.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-computer-use",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"description": "A pi package for Ta: the desktop apps of this computer, used in the background through Cua Driver, which starts only when the agent first needs it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -34,11 +34,15 @@
|
|
|
34
34
|
"pi": {
|
|
35
35
|
"title": {
|
|
36
36
|
"en": "Computer use",
|
|
37
|
-
"zh-CN": "使用电脑"
|
|
37
|
+
"zh-CN": "使用电脑",
|
|
38
|
+
"zh-TW": "使用電腦",
|
|
39
|
+
"ja-JP": "パソコン操作"
|
|
38
40
|
},
|
|
39
41
|
"summary": {
|
|
40
42
|
"en": "Lets Ta use the apps of this computer in the background, without taking your mouse and keyboard.",
|
|
41
|
-
"zh-CN": "让 Ta 在后台操作这台电脑上的应用,不占用你的鼠标和键盘。"
|
|
43
|
+
"zh-CN": "让 Ta 在后台操作这台电脑上的应用,不占用你的鼠标和键盘。",
|
|
44
|
+
"zh-TW": "讓 Ta 在後台操作這台電腦上的應用,不佔用你的滑鼠和鍵盤。",
|
|
45
|
+
"ja-JP": "Ta がこのパソコンのアプリをバックグラウンドで操作します。マウスとキーボードは占有しません。"
|
|
42
46
|
},
|
|
43
47
|
"descriptions": {
|
|
44
48
|
"computer-use": {
|