Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(bots): stop creating default bot

Leob21ee9ae4f0f
diff --git a/apps/web/src/components/roster/useServerRoster.ts b/apps/web/src/components/roster/useServerRoster.ts
index 84cdbcc98..fc7bde62c 100644
--- a/apps/web/src/components/roster/useServerRoster.ts
+++ b/apps/web/src/components/roster/useServerRoster.ts
@@ -1,5 +1,5 @@
import { useAtomValue } from "@effect/atom-react";
-import { BotId, type EnvironmentId } from "@t3tools/contracts";
+import type { EnvironmentId } from "@t3tools/contracts";
import { useCallback, useEffect } from "react";
import {
@@ -10,7 +10,6 @@ import {
} from "../../state/bots";
import { usePrimaryEnvironmentId } from "../../state/environments";
import { useAtomCommand } from "../../state/use-atom-command";
-import { DEFAULT_BOT_RUNTIME_MODE } from "./botSandbox";
import { useRosterStore } from "./rosterStore";
import type { BotAvatar } from "./types";
@@ -23,29 +22,9 @@ export function useServerRosterSync(): void {
const loaded = useAtomValue(environmentRosterLoadedAtom(atomKey));
const bots = useAtomValue(environmentBotsAtom(atomKey));
const groups = useAtomValue(environmentGroupsAtom(atomKey));
- const createBot = useAtomCommand(botEnvironment.create, { reportFailure: false });
useEffect(() => {
if (environmentId === null || !loaded) return;
- if (bots.length === 0) {
- void createBot({
- environmentId,
- input: {
- botId: BotId.make("bot-akeru"),
- name: "Akeru",
- title: "Generalist",
- label: null,
- description: null,
- avatar: { kind: "blob", shape: "circle", color: "#5B7FD4" },
- engine: null,
- sandbox: null,
- runtimeMode: DEFAULT_BOT_RUNTIME_MODE,
- usageCap: null,
- groupId: null,
- },
- });
- return;
- }
useRosterStore.getState().replaceRoster({
bots: bots.map((bot) => ({
...bot,
@@ -54,7 +33,7 @@ export function useServerRosterSync(): void {
})),
groups: groups.map((group) => ({ ...group })),
});
- }, [bots, createBot, environmentId, groups, loaded]);
+ }, [bots, environmentId, groups, loaded]);
}
export function useSaveBotAvatar(): (botId: string, avatar: BotAvatar) => Promise<boolean> {
diff --git a/apps/web/src/components/sidebar/SidebarChrome.test.ts b/apps/web/src/components/sidebar/SidebarChrome.test.ts
index f6c23783c..71dd7d9c2 100644
--- a/apps/web/src/components/sidebar/SidebarChrome.test.ts
+++ b/apps/web/src/components/sidebar/SidebarChrome.test.ts
@@ -139,7 +139,7 @@ describe("sidebar footer", () => {
expect(source).not.toContain('openSettings("inbox")');
});
- it("creates manual and first-run bots with approval required", () => {
+ it("creates manual bots with approval required without adding a first-run bot", () => {
const rosterSource = NodeFS.readFileSync(
new URL("../roster/BotRosterSidebar.tsx", import.meta.url),
"utf8",
@@ -150,9 +150,9 @@ describe("sidebar footer", () => {
);
expect(rosterSource).toContain("runtimeMode: DEFAULT_BOT_RUNTIME_MODE");
- expect(syncSource).toContain("runtimeMode: DEFAULT_BOT_RUNTIME_MODE");
expect(rosterSource).not.toContain('runtimeMode: "full-access"');
- expect(syncSource).not.toContain('runtimeMode: "full-access"');
+ expect(syncSource).not.toContain('BotId.make("bot-akeru")');
+ expect(syncSource).not.toContain("botEnvironment.create");
});
it("updates existing bot and group threads before starting the next turn", () => {