Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Bot settings search: say it is still looking while connected apps load

AdityaUmale926273db38c6
diff --git a/src/components/BotSettingsDialog.tsx b/src/components/BotSettingsDialog.tsx
index 7d182e0dbd..6471a138ef 100644
--- a/src/components/BotSettingsDialog.tsx
+++ b/src/components/BotSettingsDialog.tsx
@@ -4,7 +4,7 @@ import { ChevronDown, Search, X } from "lucide-react";
import { useStore, type Bot, type BotSettingsSection } from "@/state/store";
import { cn } from "@/lib/cn";
import { useCaptionChrome } from "./DesktopCapabilities";
-import { BOT_SECTIONS, sectionLabel, sectionMatches } from "./bot-settings/sections";
+import { BOT_SECTIONS, searchEmptyText, sectionLabel, sectionMatches } from "./bot-settings/sections";
import { useBotApps } from "./bot-settings/useBotApps";
import { useBotSettingsDerived } from "./bot-settings/useBotSettingsDerived";
import { OverviewSection } from "./bot-settings/OverviewSection";
@@ -224,7 +224,7 @@ export function BotSettingsDialog({ bot, overlay = false }: {
<div className="flex min-h-0 flex-1 flex-col overflow-y-auto">
{visibleSections.length === 0 && (
<div className="px-4 py-4 text-[13px] leading-relaxed text-ink-secondary">
- {t("botSettings.searchNone", { query: query.trim() })}
+ {searchEmptyText(query.trim(), searchApps.phase)}
</div>
)}
{sections.map((entry) => {
diff --git a/src/components/bot-settings/sections.test.ts b/src/components/bot-settings/sections.test.ts
index 60f4be2b1c..c14c55f0e2 100644
--- a/src/components/bot-settings/sections.test.ts
+++ b/src/components/bot-settings/sections.test.ts
@@ -1,7 +1,7 @@
import { afterEach, describe, expect, it } from "vitest";
import { setLocale } from "@/lib/i18n";
-import { BOT_SECTIONS, sectionMatches } from "./sections";
+import { BOT_SECTIONS, searchEmptyText, sectionMatches } from "./sections";
const section = (id: string) => {
const entry = BOT_SECTIONS.find((candidate) => candidate.id === id);
@@ -33,4 +33,10 @@ describe("bot settings search", () => {
expect(found("composio")).toEqual(["access"]);
expect(found("")).toHaveLength(BOT_SECTIONS.length);
});
+
+ it("says it is still looking while the connected apps load, and nothing matches only after", () => {
+ expect(searchEmptyText("github", "loading")).toBe("Looking through connected apps…");
+ expect(searchEmptyText("github", "ready")).toBe("Nothing matches “github”");
+ expect(searchEmptyText("github", "unknown")).toBe("Nothing matches “github”");
+ });
});
diff --git a/src/components/bot-settings/sections.ts b/src/components/bot-settings/sections.ts
index 2e4779089f..71d38145d5 100644
--- a/src/components/bot-settings/sections.ts
+++ b/src/components/bot-settings/sections.ts
@@ -20,6 +20,7 @@ import {
import type { BotSettingsSection } from "@/state/store";
import type { LocaleKey } from "@/locales";
import { t } from "@/lib/i18n";
+import type { BotApps } from "./useBotApps";
export const BOT_SECTIONS: Array<{
id: BotSettingsSection;
@@ -64,3 +65,8 @@ export function sectionMatches(entry: BotSectionEntry, query: string, appNames:
return [entry.label, sectionLabel(entry), ...entry.keywords, ...headings, ...apps]
.some((part) => part.toLowerCase().includes(query));
}
+
+/** The note shown when no section matches. Until the bot's connected apps have loaded, an app name may still match. */
+export function searchEmptyText(query: string, appsPhase: BotApps["phase"]): string {
+ return appsPhase === "loading" ? t("botSettings.searchLoading") : t("botSettings.searchNone", { query });
+}
diff --git a/src/locales/en.json b/src/locales/en.json
index 8e7141ff4f..397289d811 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -7279,6 +7279,7 @@
"botSettings.search": "Search",
"botSettings.searchAria": "Search settings",
"botSettings.searchNone": "Nothing matches “{query}”",
+ "botSettings.searchLoading": "Looking through connected apps…",
"botSettings.sections.skills": "Skills",
"botSettings.sections.memory": "Memory",
"botSettings.sections.routines": "Routines",
diff --git a/src/locales/it.json b/src/locales/it.json
index 019c273acb..84a36eeb9c 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -5763,6 +5763,7 @@
"botSettings.search": "Cerca",
"botSettings.searchAria": "Cerca nelle impostazioni",
"botSettings.searchNone": "Nessun risultato per “{query}”",
+ "botSettings.searchLoading": "Cerco tra le app collegate…",
"botSettings.sections.skills": "Abilità",
"botSettings.sections.memory": "Memoria",
"botSettings.sections.routines": "Routine",
diff --git a/src/locales/ja.json b/src/locales/ja.json
index c9453d9c4a..34d2298b9b 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -6652,6 +6652,7 @@
"botSettings.search": "検索",
"botSettings.searchAria": "設定を検索",
"botSettings.searchNone": "「{query}」に一致するものはありません",
+ "botSettings.searchLoading": "接続済みのアプリを確認しています…",
"botSettings.sections.skills": "スキル",
"botSettings.sections.memory": "メモリー",
"botSettings.sections.routines": "ルーティン",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 5476ceed75..2eb7a54dd8 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -6404,6 +6404,7 @@
"botSettings.search": "검색",
"botSettings.searchAria": "설정 검색",
"botSettings.searchNone": "“{query}”와(과) 일치하는 항목이 없어요",
+ "botSettings.searchLoading": "연결된 앱을 찾고 있어요…",
"botSettings.sections.skills": "스킬",
"botSettings.sections.memory": "메모리",
"botSettings.sections.routines": "루틴",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 3f573543a7..48604f3c29 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -5927,6 +5927,7 @@
"botSettings.search": "Szukaj",
"botSettings.searchAria": "Szukaj w ustawieniach",
"botSettings.searchNone": "Brak wyników dla „{query}”",
+ "botSettings.searchLoading": "Przeszukuję połączone aplikacje…",
"botSettings.sections.skills": "Umiejętności",
"botSettings.sections.memory": "Pamięć",
"botSettings.sections.routines": "Rutyny",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 5d4d4cdca4..98fe9a7562 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -6941,6 +6941,7 @@
"botSettings.search": "Buscar",
"botSettings.searchAria": "Buscar nas configurações",
"botSettings.searchNone": "Nenhum resultado para “{query}”",
+ "botSettings.searchLoading": "Procurando nos apps conectados…",
"botSettings.sections.skills": "Habilidades",
"botSettings.sections.memory": "Memória",
"botSettings.sections.routines": "Rotinas",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index 334ac76e17..a7eb5e5b2a 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -5976,6 +5976,7 @@
"botSettings.search": "Поиск",
"botSettings.searchAria": "Поиск по настройкам",
"botSettings.searchNone": "Ничего не найдено по запросу «{query}»",
+ "botSettings.searchLoading": "Ищем среди подключённых приложений…",
"botSettings.sections.skills": "Навыки",
"botSettings.sections.memory": "Память",
"botSettings.sections.routines": "Процедуры",
diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.json
index 74adbc6493..1dfdfb75a7 100644
--- a/src/locales/source-hashes.json
+++ b/src/locales/source-hashes.json
@@ -23286,6 +23286,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -32551,6 +32552,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -43373,6 +43375,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -54106,6 +54109,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -78554,6 +78558,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -85920,6 +85925,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -93062,6 +93068,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
@@ -101003,6 +101010,7 @@
"botSettings.search": "49c266baaaa70981ea188fa714d5c40cf13830d786a861c9943ae0d26a7f3fe9",
"botSettings.searchAria": "255b076dd82855431a4ce9a722d77d41f47755ab11be14fc686fd71415cdeef0",
"botSettings.searchNone": "5bb5e3f3f8eaec582b5d4972b1a1007e7c7704cf3c2f998524b473ac56f29eb9",
+ "botSettings.searchLoading": "6dc1cfffda0f5e0bc80bbf84611c4842b27da73c8a53c387b943cf885230d684",
"botSettings.sections.skills": "66d0f523a379b2de6f8d5fba3a817ebc395f7bcaa54cc132ca9dfa665d1e9378",
"botSettings.sections.memory": "c3963aedaac6c83c04cf8fb997b479c61e66b3caeecfadd2f2d4bd5b0aef1778",
"botSettings.sections.routines": "61b7bb44e2b47b7c0ccaccff4872fdcf3e298345d0f003ea4bf54e8c84e2a889",
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 8019161273..c277b9ea7c 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -6863,6 +6863,7 @@
"botSettings.search": "搜尋",
"botSettings.searchAria": "搜尋設定",
"botSettings.searchNone": "沒有符合「{query}」的項目",
+ "botSettings.searchLoading": "正在查找已連接的應用程式…",
"botSettings.sections.skills": "技能",
"botSettings.sections.memory": "記憶",
"botSettings.sections.routines": "例行工作",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index be2fc71f58..0c8726953d 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -6827,6 +6827,7 @@
"botSettings.search": "搜索",
"botSettings.searchAria": "搜索设置",
"botSettings.searchNone": "没有与「{query}」匹配的内容",
+ "botSettings.searchLoading": "正在查找已连接的应用…",
"botSettings.sections.skills": "技能",
"botSettings.sections.memory": "记忆",
"botSettings.sections.routines": "例行任务",