Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge #7952: Promotional messages switch in Settings → Features
milind-soni43c6c8de62ec
diff --cc src/components/settings/SettingsWindow.test.tsindex 49e25821fc,1c189a9caf..9ec071a126--- a/src/components/settings/SettingsWindow.test.ts+++ b/src/components/settings/SettingsWindow.test.ts@@@ -317,23 -317,15 +317,32 @@@ describe("Settings → Features", () =expect(featureSwitches()).toEqual({ skillBurger: true, threadTabs: false, suggestedReplies: false });});+ it("shows the Skills library switch, off until turned on, and saves it on", async () => {+ const { api } = await import("@/state/store");+ fixture.config = { features: { skillBurger: true, threadTabs: false, skillsLibrary: false } };+ const html = render("features");+ expect(html).toContain("Skills library");+ expect(html).toContain("browse, import and assign skills");+ expect(featureSwitches()).toEqual({ skillBurger: true, threadTabs: false, skillsLibrary: false });+ fixture.switches.find((props) => (props as { "data-feature-switch"?: string })["data-feature-switch"] === "skillsLibrary")!.onClick!({} as never);+ expect(api).toHaveBeenCalledWith("/api/config", { method: "PATCH", body: JSON.stringify({ features: { skillsLibrary: true } }) });+ fixture.config = { features: { skillBurger: true, threadTabs: false, skillsLibrary: true } };+ render("features");+ expect(featureSwitches()).toEqual({ skillBurger: true, threadTabs: false, skillsLibrary: true });+ expect(render("bots"), "the switch reveals the Skills section it gates").toContain('data-settings-block="skills"');+ fixture.config = { features: { skillBurger: true, threadTabs: false, skillsLibrary: false } };+ expect(render("bots")).not.toContain('data-settings-block="skills"');+ });++ it.each([true, false])("sets promotional messages to the opposite of %s", async (promotions) => {+ const { api } = await import("@/state/store");+ fixture.config = { features: { promotions } };+ expect(render("features")).toContain("Promotional messages");+ expect(featureSwitches()).toEqual({ promotions });+ fixture.switches.find((props) => (props as { "data-feature-switch"?: string })["data-feature-switch"] === "promotions")!.onClick!({} as never);+ expect(api).toHaveBeenCalledWith("/api/config", { method: "PATCH", body: JSON.stringify({ features: { promotions: !promotions } }) });+ });+it("shows no Board switch on a Team Cloud, even from an older server that still reports one", () => {fixture.config = { cloudHome: true, team: { name: "Acme" }, features: { skillBurger: true, threadTabs: false, teamBoard: false } };expect(render("features")).not.toContain("Board");diff --cc src/components/settings/pages/FeaturesPage.tsxindex 6622f66293,cbafa9d8d8..091dd7fc9b--- a/src/components/settings/pages/FeaturesPage.tsx+++ b/src/components/settings/pages/FeaturesPage.tsx@@@ -10,7 -10,7 +10,8 @@@ const COPY: Record<Feature, { title: LoskillBurger: { title: "settings.features.skillBurger", line: "settings.features.skillBurgerLine" },threadTabs: { title: "settings.features.threadTabs", line: "settings.features.threadTabsLine" },suggestedReplies: { title: "settings.features.suggestedReplies", line: "settings.features.suggestedRepliesLine" },+ skillsLibrary: { title: "settings.features.skillsLibrary", line: "settings.features.skillsLibraryLine" },+ promotions: { title: "settings.features.promotions", line: "settings.features.promotionsLine" },};/** One switch kept in this place's config.json; shown once its server says it knows the switch. */@@@ -50,7 -50,7 +51,8 @@@ export function FeaturesPage()<FeatureRow name="skillBurger" /><FeatureRow name="threadTabs" /><FeatureRow name="suggestedReplies" />+ <FeatureRow name="skillsLibrary" />+ <FeatureRow name="promotions" /></SettingsRows></SettingsGroup>);diff --cc src/lib/use-feature.tsindex baa3986d8e,dfefef14cf..092cd911c7--- a/src/lib/use-feature.ts+++ b/src/lib/use-feature.ts@@@ -1,15 -1,15 +1,16 @@@- import { skillBurgerEnabled, skillsLibraryEnabled, suggestedRepliesEnabled, threadTabsEnabled } from "@/lib/feature-flags";-import { promotionsEnabled, skillBurgerEnabled, suggestedRepliesEnabled, threadTabsEnabled } from "@/lib/feature-flags";++import { promotionsEnabled, skillBurgerEnabled, skillsLibraryEnabled, suggestedRepliesEnabled, threadTabsEnabled } from "@/lib/feature-flags";import type { ConfigStatus } from "@/state/store";import { useStoreSelector } from "@/state/store-select";/** Switches on Settings → Features, kept in the place's config.json (`features.<name>`), so its server reads them too. */- export type Feature = "skillBurger" | "threadTabs" | "suggestedReplies" | "skillsLibrary";-export type Feature = "skillBurger" | "threadTabs" | "suggestedReplies" | "promotions";++export type Feature = "skillBurger" | "threadTabs" | "suggestedReplies" | "skillsLibrary" | "promotions";const FEATURES: Record<Feature, (config: ConfigStatus | null | undefined) => boolean> = {skillBurger: skillBurgerEnabled,threadTabs: threadTabsEnabled,suggestedReplies: suggestedRepliesEnabled,+ skillsLibrary: skillsLibraryEnabled,+ promotions: promotionsEnabled,};/** Whether a switch on Settings → Features is on. */diff --cc src/locales/en.jsonindex 629b003173,624a0eb692..b163654140--- a/src/locales/en.json+++ b/src/locales/en.json@@@ -12228,10 -12194,10 +12228,12 @@@"settings.features.skillBurgerLine": "Save a bot's run as steps you can run again","settings.features.threadTabs": "Thread tabs","settings.features.threadTabsLine": "Show a bot's threads as tabs above the chat",+ "settings.features.promotions": "Promotional messages",+ "settings.features.promotionsLine": "Show upgrade offers and sponsored messages.","settings.features.suggestedReplies": "Suggested replies","settings.features.suggestedRepliesLine": "After a bot replies, suggest what you might say next. The bot's own AI writes it with its smallest model, which uses a little of your plan or API credit.",+ "settings.features.skillsLibrary": "Skills library",+ "settings.features.skillsLibraryLine": "Show the Skills section in Settings, where you can browse, import and assign skills to bots","composer.placeholder.newThread": "Start a thread in {name}","room.feed.aria": "Threads in {name}","room.feed.replyOne": "1 reply",diff --cc src/locales/it.jsonindex 0d290b0ae9,b85c800afc..748dc8f857--- a/src/locales/it.json+++ b/src/locales/it.json@@@ -12198,40 -11831,45 +12198,42 @@@"settings.features.skillBurgerLine": "Salva l'esecuzione di un bot come passaggi da rieseguire","settings.features.threadTabs": "Schede dei thread","settings.features.threadTabsLine": "Mostra i thread di un bot come schede sopra la chat",+ "settings.features.promotions": "Messaggi promozionali",+ "settings.features.promotionsLine": "Mostra le offerte di upgrade e i messaggi sponsorizzati.","settings.features.suggestedReplies": "Risposte suggerite","settings.features.suggestedRepliesLine": "Dopo la risposta di un bot, suggerisce cosa potresti dire dopo. La scrive l'IA del bot con il suo modello più piccolo, che usa un po' del tuo piano o credito API.",+ "composer.placeholder.newThread": "Avvia una conversazione in {name}",+ "room.feed.aria": "Conversazioni in {name}",+ "room.feed.replyOne": "1 risposta",+ "room.feed.replyMany": "{count} risposte",+ "room.feed.lastReply": "Ultima risposta {when}",+ "room.feed.noReplies": "Nessuna risposta ancora",+ "room.feed.attachment": "Un allegato",+ "room.feed.you": "Tu",+ "room.feed.empty": "Nessuna conversazione ancora. Scrivi sotto per iniziare.",+ "room.feed.splitHint": "Chiedi a un bot di dividere i lavori grandi in conversazioni.",+ "room.work.upNext": "Prossimo",+ "room.work.working": "In corso",+ "room.work.botWorking": "{name} al lavoro",+ "room.work.needsYou": "Serve il tuo intervento",+ "room.work.needsName": "Serve {name}",+ "room.work.needsAnswer": "Serve una risposta",+ "room.work.done": "Fatto",+ "room.work.stopped": "Interrotto",+ "room.feed.loadFailed": "Impossibile caricare le conversazioni di questa stanza.",+ "room.feed.startFailed": "Impossibile avviare una conversazione. Controlla la connessione e riprova.",+ "room.feed.showArchived": "Mostra conversazioni archiviate",+ "room.feed.hideArchived": "Nascondi conversazioni archiviate",+ "room.feed.unreadAbove": "Conversazione non letta più in alto",+ "room.feed.unreadBelow": "Conversazione non letta più in basso",+ "room.feed.closedOne": "1 conversazione chiusa",+ "room.feed.closedMany": "{count} conversazioni chiuse",+ "room.thread.panel": "Conversazione",+ "room.thread.close": "Chiudi conversazione",+ "room.thread.backToFeed": "Torna a {name}",+ "room.thread.resize": "Ridimensiona conversazione",+ "room.thread.closedBy": "Chiuso da {name} · {when}","settings.features.error": "Impossibile salvare. Controlla la connessione e riprova.",- "chat.botExchange.open": "Apri lo scambio tra {asker} e {helper}",- "chat.botExchange.teammate": "Un collega",- "chat.botExchange.asking": "sta chiedendo…",- "chat.botExchange.working": "al lavoro…",- "chat.botExchange.needsYou": "ha bisogno di te",- "chat.botExchange.status.asking": "{asker} sta chiedendo a {helper}…",- "chat.botExchange.status.working": "{helper} ci sta lavorando…",- "chat.botExchange.status.needsYou": "{helper} aspetta la tua risposta nella sua conversazione",- "chat.botExchange.status.answered": "{helper} ha risposto in {duration}",- "chat.botExchange.status.stopped": "Fermato dopo {duration}",- "chat.botExchange.status.expired": "Tempo scaduto dopo {duration}",- "chat.botExchange.status.failed": "{helper} non è riuscito a finire",- "chat.botExchange.stopping": "Arresto…",- "chat.botExchange.notYours": "Solo chi l’ha chiesto può fermarlo.",- "chat.botExchange.gone": "Questo scambio non si può fermare da qui.",- "chat.botExchange.stopFailed": "Impossibile fermarlo. Controlla la connessione e riprova.",- "chat.botExchange.waiting": "{helper} non ha ancora iniziato. Sta aspettando il suo turno.",- "chat.botExchange.unknown": "Non è chiaro quali messaggi della conversazione di {helper} appartengano a questo scambio, quindi non ne viene mostrato nessuno.",- "devicesPage.network.allow": "Consenti i miei altri computer",- "devicesPage.network.approveIn": "Approva in Tailscale",- "devicesPage.network.setUpTailscale": "Configura Tailscale",- "devicesPage.pairedAgain": "{name} è di nuovo associato.",- "devicesPage.removed": "{name} è stato rimosso.",- "connect.otherComputerDevices": "Per un altro computer con l’app {app}: su quel computer, apri Impostazioni → Dispositivi → Rete privata → I tuoi altri computer.",- "chat.settingsCard.elsewhereDevices": "Questa impostazione si trova sul computer stesso: apri MausBot lì, poi Impostazioni → Dispositivi → Rete privata → I tuoi altri computer.",- "remoteDesktop.browserHintDevices": "Per guardare e guidare questo browser serve il controllo del browser per questo dispositivo associato, in Impostazioni → Dispositivi sul computer host.",- "remoteDesktop.accessHintDevices": "L’host deve abilitare l’accesso al desktop cloud per questo dispositivo associato in Impostazioni → Dispositivi.",- "native.connect.desktopAppDevices": "{host} è un’app desktop di MausBot. Per aprirla da qui, attiva Tailscale e I tuoi altri computer nelle sue Impostazioni → Dispositivi, poi usa il link mostrato lì. Puoi anche condividere quel computer con My Cloud dalla sua app.",- "native.connect.desktopAppTailnetDevices": "{host} è un’app desktop di MausBot sulla tua tailnet. Per aprirla da qui, attiva Tailscale e I tuoi altri computer nelle sue Impostazioni → Dispositivi, poi usa l’indirizzo mostrato lì.",- "connect.otherTitle": "Connettiti a un altro computer",- "native.menu.connectOther": "Connettiti a un altro computer…",- "devices.computers.typeCodeOther": "Sul tuo altro computer, apri Connettiti a un altro computer in {app} e incollare il link che si copia qui. O digita questo indirizzo e codice.",- "phone.reach.footAdding": "Aggiungere un telefono li attiva. Puoi cambiarli qui.",- "devices.reach.privateNetwork": "sulla tua rete privata","skillBurger.pill.cooking": "In cottura… {count}","skillBurger.pill.add": "Aggiungi","skillBurger.pill.running": "In esecuzione… {count}",diff --cc src/locales/pt-br.jsonindex 77139b7326,3d34ba5d57..ead868f2ce--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@@ -12228,10 -12194,10 +12228,12 @@@"settings.features.skillBurgerLine": "Salva a execução de um bot como etapas que você pode executar de novo","settings.features.threadTabs": "Abas de conversas","settings.features.threadTabsLine": "Mostra as conversas de um bot como abas acima do chat",+ "settings.features.promotions": "Mensagens promocionais",+ "settings.features.promotionsLine": "Mostra ofertas de upgrade e mensagens patrocinadas.","settings.features.suggestedReplies": "Respostas sugeridas","settings.features.suggestedRepliesLine": "Depois que um bot responde, sugere o que você pode dizer em seguida. A própria IA do bot escreve com o menor modelo dela, o que usa um pouco do seu plano ou crédito de API.",+ "settings.features.skillsLibrary": "Biblioteca de habilidades",+ "settings.features.skillsLibraryLine": "Mostra a seção Habilidades nas Configurações, onde você pode consultar, importar e atribuir habilidades aos bots","composer.placeholder.newThread": "Comece uma conversa em {name}","room.feed.aria": "Conversas em {name}","room.feed.replyOne": "1 resposta",