Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
feat(bot-panel): point Simple bot settings to Advanced for sending and app access
AdityaUmale0f13616e1cbf
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.tsindex fa775f0faf..acb65a5a8a 100644--- a/src/components/BotSettingsDialog.simple.test.ts+++ b/src/components/BotSettingsDialog.simple.test.ts@@ -150,6 +150,7 @@ const { MascotFaceColorPicker } = await import("./MascotFaceColorPicker");const { Switch } = await import("./SettingsPrimitives");const { OrgSkillsCard } = await import("./bot-settings/OrgSkillsCard");const { PackageProvenance } = await import("./bot-settings/PackageProvenance");+const { AdvancedSettingsRow } = await import("./bot-panel/AdvancedSettingsRow");afterAll(() => vi.unstubAllGlobals());@@ -755,6 +756,16 @@ describe("the Bot settings page", () => {expect(html.indexOf('data-panel-row="slack"')).toBeGreaterThan(html.indexOf('data-panel-row="job"'));});+ it("says Sending on your behalf and app access live in Advanced mode, and opens them there", () => {+ const html = settingsPage(makeBot()).html;+ expect(html).toContain('data-panel-row="advanced"');+ expect(html).toContain("Sending on your behalf and app access are set there.");+ expect(html.indexOf('data-panel-row="advanced"')).toBeGreaterThan(html.indexOf('data-panel-row="job"'));+ click(find(capture(() => AdvancedSettingsRow()), "data-panel-row", "advanced"));+ expect(fixture.setAdvanced).toHaveBeenCalledExactlyOnceWith(true);+ expect(fixture.dispatch).toHaveBeenCalledExactlyOnceWith({ type: "toggleSettings", open: true, section: "permissions" });+ });+it("shows the first line of the instructions, or how to start, and edits them in place with Done", () => {const bot = makeBot();const closed = settingsPage(bot);diff --git a/src/components/bot-panel/AdvancedSettingsRow.tsx b/src/components/bot-panel/AdvancedSettingsRow.tsxnew file mode 100644index 0000000000..6990330a55--- /dev/null+++ b/src/components/bot-panel/AdvancedSettingsRow.tsx@@ -0,0 +1,22 @@+import { SlidersHorizontal } from "lucide-react";++import { t } from "@/lib/i18n";+import { setAdvancedMode } from "@/lib/interface-mode";+import { SIMPLE_ONLY } from "@/lib/simple-only";+import { useStore } from "@/state/store";+import { Card, NavRow } from "./rows";++/** Simple mode leaves out Sending on your behalf and per-app Access; this row says they exist and opens them in Advanced mode. */+export function AdvancedSettingsRow() {+ const { dispatch } = useStore();+ if (SIMPLE_ONLY) return null;+ const open = () => {+ setAdvancedMode(true);+ dispatch({ type: "toggleSettings", open: true, section: "permissions" });+ };+ return (+ <Card anchor="advanced">+ <NavRow data-panel-row="advanced" icon={SlidersHorizontal} title={t("botPanel.advanced.title")} hint={t("botPanel.advanced.hint")} onClick={open} />+ </Card>+ );+}diff --git a/src/components/bot-panel/SettingsPage.tsx b/src/components/bot-panel/SettingsPage.tsxindex 6691422aa7..445f6cca81 100644--- a/src/components/bot-panel/SettingsPage.tsx+++ b/src/components/bot-panel/SettingsPage.tsx@@ -25,6 +25,7 @@ import { useBotApps } from "../bot-settings/useBotApps";import { useSlackManagementUrl } from "../bot-settings/useSlackManagement";import type { useBotSettingsDerived } from "../bot-settings/useBotSettingsDerived";import { useThreadApproval } from "../thread-approval";+import { AdvancedSettingsRow } from "./AdvancedSettingsRow";import { BackupAis } from "./BackupAis";import { HeavyBotRow } from "./HeavyBotRow";import { SoulChanges } from "./SoulChanges";@@ -281,6 +282,8 @@ export function SettingsPage({ bot, derived, onOpen, editingInstructions = false)}</Card>+ <AdvancedSettingsRow />+<BotApiCard bot={bot} webhooksLink className="mt-3.5" /><DefaultBotHideRow bot={bot} />diff --git a/src/locales/en.json b/src/locales/en.jsonindex bf963b7654..093aeedd50 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -4452,6 +4452,8 @@"botPanel.library.files": "Files","botPanel.library.scope": "From this conversation","botPanel.thisConversation": "In this conversation",+ "botPanel.advanced.title": "More in Advanced mode",+ "botPanel.advanced.hint": "Sending on your behalf and app access are set there.","botPanel.acts.custom": "Custom","botPanel.acts.customHint": "Change this in Advanced mode","botPanel.section.settings": "Settings",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex c0b918a2a6..bc80dbcb14 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -7616,6 +7616,8 @@"botPanel.library.files": "Arquivos","botPanel.library.scope": "Desta conversa","botPanel.thisConversation": "Nesta conversa",+ "botPanel.advanced.title": "Mais no modo avançado",+ "botPanel.advanced.hint": "Enviar em seu nome e o acesso a apps ficam lá.","botPanel.acts.custom": "Personalizado","botPanel.acts.customHint": "Mude isto no Modo avançado","botPanel.section.settings": "Configurações",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex aefdc23670..2fb8c38788 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -36470,7 +36470,9 @@"settings.domain.httpsFirst": "41486ac1d5f39e25ccf3835d520137ecac15a0f49a9dcb5b73f7523fe6df330f","settings.backTo": "ea37ec29c3865c359d3efb005bd252c35457976140bb718824f39d157ea32567","devices.route.httpsAccount": "518ed79b3110cf735bc507bd796cf5c9cd701c3b2dc72bd764e599d411e3baf5",- "backup.importAction": "ea94509e38cf6d6427db3a1b5a3b5816cba1e8f89b08f9739f6077ade188163c"+ "backup.importAction": "ea94509e38cf6d6427db3a1b5a3b5816cba1e8f89b08f9739f6077ade188163c",+ "botPanel.advanced.title": "d823803689ad1713989d7cd80dde661392f93c2a6a5690e748ab88ed10c98237",+ "botPanel.advanced.hint": "434ef07a7c8eafd2789a2fc936f8d050b62d7658d6777b0494db07e3c7d6294f"},"zh": {"pro.fromPrice": "a48a04a457d60b08b54fc83e7a6c4584ffedb1e23621859084900c8521a3af7b",