diff --git a/src/slashCommands.ts b/src/slashCommands.ts index 87dea5e01..76dc76f1a 100644 --- a/src/slashCommands.ts +++ b/src/slashCommands.ts @@ -11,8 +11,6 @@ import { reloadService, SERVICE_NAMES, services } from "./services/index.js"; import { posthogService } from "./telemetry/posthogService.js"; import { SlashCommandResult } from "./ui/hooks/useChat.types.js"; - - type CommandHandler = ( args: string[], assistant: AssistantConfig, @@ -98,8 +96,6 @@ function handleWhoami() { } } - - const commandHandlers: Record = { help: handleHelp, clear: () => { diff --git a/src/ui/ConfigSelector.tsx b/src/ui/ConfigSelector.tsx index d1643c2de..80a001232 100644 --- a/src/ui/ConfigSelector.tsx +++ b/src/ui/ConfigSelector.tsx @@ -67,7 +67,7 @@ const ConfigSelector: React.FC = ({ const organizations = await listUserOrganizations(); const allOrgs = [ { id: null, name: "Personal" }, // Personal organization - ...(organizations || []) + ...(organizations || []), ]; // Fetch assistants for each organization @@ -81,7 +81,7 @@ const ConfigSelector: React.FC = ({ return assistants.map((assistant) => { const displayName = `[${org.name}] ${assistant.ownerSlug}/${assistant.packageSlug}`; // Create unique ID that includes org info to avoid conflicts - const uniqueId = `${org.id || 'personal'}-${assistant.packageSlug}`; + const uniqueId = `${org.id || "personal"}-${assistant.packageSlug}`; return { id: uniqueId, name: displayName, @@ -91,7 +91,10 @@ const ConfigSelector: React.FC = ({ }; }); } catch (err) { - console.error(`Failed to load assistants for org ${org.name}:`, err); + console.error( + `Failed to load assistants for org ${org.name}:`, + err, + ); return []; } }); @@ -118,9 +121,10 @@ const ConfigSelector: React.FC = ({ // Find the matching config by slug and organization const packageSlug = assistantSlug.split("/")[1]; const matchingConfig = options.find( - (opt) => opt.type === "assistant" && - opt.slug === assistantSlug && - opt.organizationId === currentOrganizationId + (opt) => + opt.type === "assistant" && + opt.slug === assistantSlug && + opt.organizationId === currentOrganizationId, ); currentId = matchingConfig?.id || null; } else if (fs.existsSync(CONFIG_PATH)) { diff --git a/src/ui/hooks/useChat.helpers.ts b/src/ui/hooks/useChat.helpers.ts index 07e5d3c44..a4fa494a9 100644 --- a/src/ui/hooks/useChat.helpers.ts +++ b/src/ui/hooks/useChat.helpers.ts @@ -33,8 +33,6 @@ export async function initChatHistory( return history; } - - /** * Handle /config command */ diff --git a/src/ui/hooks/useConfigSelector.ts b/src/ui/hooks/useConfigSelector.ts index e4e7c80ea..0ce05ab26 100644 --- a/src/ui/hooks/useConfigSelector.ts +++ b/src/ui/hooks/useConfigSelector.ts @@ -2,8 +2,7 @@ import { exec } from "child_process"; import * as path from "path"; import { env } from "../../env.js"; -import { services, reloadService } from "../../services/index.js"; -import { SERVICE_NAMES } from "../../services/types.js"; +import { services } from "../../services/index.js"; import { useNavigation } from "../context/NavigationContext.js"; interface ConfigOption {