From b534248e19069ed5c2c203d8b05d0ff0159a08c7 Mon Sep 17 00:00:00 2001 From: Quincy <69751197+dqygit@users.noreply.github.com> Date: Sat, 18 Apr 2026 03:07:17 +0800 Subject: [PATCH] fix: resolve context switch failure in browser automation (#380) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: resolve context switch failure in browser automation * feat: update logo and optimize sidebar empty state --------- Co-authored-by: 晨苒 <16112591+chen-ran@users.noreply.github.com> --- apps/web/src/components/sidebar/index.vue | 4 ++-- apps/web/src/pages/browser/index.vue | 6 ++++-- apps/web/src/pages/usage/index.vue | 4 ++-- go.mod | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/web/src/components/sidebar/index.vue b/apps/web/src/components/sidebar/index.vue index c02395ec..391c69cf 100644 --- a/apps/web/src/components/sidebar/index.vue +++ b/apps/web/src/components/sidebar/index.vue @@ -28,7 +28,7 @@ - + @@ -50,7 +50,7 @@
{{ t('bots.emptyTitle') }}
diff --git a/apps/web/src/pages/browser/index.vue b/apps/web/src/pages/browser/index.vue index 87ff0c4a..7e1c3f09 100644 --- a/apps/web/src/pages/browser/index.vue +++ b/apps/web/src/pages/browser/index.vue @@ -74,14 +74,16 @@ const openStatus = reactive({ :model-value="selectContext(item.id as string).value" @update:model-value="(isSelect) => { if (isSelect) { - curContext.value = item + curContext = item } }" > - {{ item.name }} + + {{ item.name }} + diff --git a/apps/web/src/pages/usage/index.vue b/apps/web/src/pages/usage/index.vue index 18572fbf..b0e851b1 100644 --- a/apps/web/src/pages/usage/index.vue +++ b/apps/web/src/pages/usage/index.vue @@ -340,8 +340,8 @@ const { data: botData } = useQuery(getBotsQuery()) const botList = computed(() => botData.value?.items ?? []) watch(botList, (list) => { - if (!selectedBotId.value && list.length > 0 && list[0].id) { - selectedBotId.value = list[0].id + if (!selectedBotId.value && list.length > 0 && list[0]!.id) { + selectedBotId.value = list[0]!.id } }, { immediate: true }) diff --git a/go.mod b/go.mod index 638a980e..56fa84c8 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 github.com/golang-jwt/jwt/v5 v5.3.1 github.com/golang-migrate/migrate/v4 v4.19.1 + github.com/google/jsonschema-go v0.4.2 github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 github.com/jackc/pgx/v5 v5.8.0 @@ -46,6 +47,7 @@ require ( go.uber.org/fx v1.24.0 golang.org/x/crypto v0.48.0 golang.org/x/oauth2 v0.36.0 + golang.org/x/term v0.40.0 golang.org/x/time v0.14.0 google.golang.org/grpc v1.78.0 google.golang.org/protobuf v1.36.11 @@ -113,7 +115,6 @@ require ( github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/jsonschema-go v0.4.2 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect @@ -177,7 +178,6 @@ require ( golang.org/x/net v0.50.0 // indirect golang.org/x/sync v0.19.0 // indirect golang.org/x/sys v0.42.0 // indirect - golang.org/x/term v0.40.0 // indirect golang.org/x/text v0.34.0 // indirect golang.org/x/tools v0.42.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect