chore: format

This commit is contained in:
Nate 2025-08-18 14:54:07 -07:00
parent 5544662351
commit 10f180c539
4 changed files with 11 additions and 14 deletions

View file

@ -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<string, CommandHandler> = {
help: handleHelp,
clear: () => {

View file

@ -67,7 +67,7 @@ const ConfigSelector: React.FC<ConfigSelectorProps> = ({
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<ConfigSelectorProps> = ({
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<ConfigSelectorProps> = ({
};
});
} 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<ConfigSelectorProps> = ({
// 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)) {

View file

@ -33,8 +33,6 @@ export async function initChatHistory(
return history;
}
/**
* Handle /config command
*/

View file

@ -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 {