uwonbot 1.2.8 → 1.2.9
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/package.json +1 -1
- package/src/agent.js +9 -2
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -591,13 +591,20 @@ async function handleCommand(msg) {
|
|
|
591
591
|
|
|
592
592
|
async function openWebAssistant(assistantId) {
|
|
593
593
|
const chatUrl = `${WEB_APP_URL}/assistant/live?id=${assistantId}`;
|
|
594
|
+
const camUrl = `${WEB_APP_URL}/camera-control`;
|
|
594
595
|
try {
|
|
595
596
|
if (platform === 'darwin') {
|
|
596
|
-
await execAsync(`open -na "Google Chrome" --args --new-window --window-size=320,
|
|
597
|
+
await execAsync(`open -na "Google Chrome" --args --new-window --window-size=320,520 --window-position=1000,100 "${chatUrl}" 2>/dev/null || open "${chatUrl}"`);
|
|
598
|
+
await new Promise(r => setTimeout(r, 800));
|
|
599
|
+
await execAsync(`open -na "Google Chrome" --args --new-window --window-size=480,400 --window-position=480,150 "${camUrl}" 2>/dev/null || open "${camUrl}"`);
|
|
597
600
|
} else if (platform === 'win32') {
|
|
598
|
-
await execAsync(`start chrome --new-window --window-size=320,
|
|
601
|
+
await execAsync(`start chrome --new-window --window-size=320,520 --window-position=1000,100 "${chatUrl}" 2>nul || start "" "${chatUrl}"`);
|
|
602
|
+
await new Promise(r => setTimeout(r, 800));
|
|
603
|
+
await execAsync(`start chrome --new-window --window-size=480,400 --window-position=480,150 "${camUrl}" 2>nul || start "" "${camUrl}"`);
|
|
599
604
|
} else {
|
|
600
605
|
await execAsync(`google-chrome --new-window "${chatUrl}" 2>/dev/null || xdg-open "${chatUrl}"`);
|
|
606
|
+
await new Promise(r => setTimeout(r, 800));
|
|
607
|
+
await execAsync(`google-chrome --new-window "${camUrl}" 2>/dev/null || xdg-open "${camUrl}"`);
|
|
601
608
|
}
|
|
602
609
|
return true;
|
|
603
610
|
} catch {
|