Elffuss BraidHub

kikocis/continue public

b804d5856fb5 · 960 BRawPermalink
1// Valid config tab names
2export type ConfigTab =
3 | "models"
4 | "rules"
5 | "tools"
6 | "agents"
7 | "organizations"
8 | "indexing"
9 | "settings"
10 | "help";
11
12// TODO: Move all the routes here
13export const ROUTES = {
14 HOME: "/",
15 CONFIG: "/config",
16 THEME: "/theme",
17 STATS: "/stats",
18 // EXAMPLE_ROUTE_WITH_PARAMS: (params: ParamsType) => `/route/${params}`,
19};
20
21// Helper function to build config URLs with tabs
22export const buildConfigRoute = (tab?: ConfigTab): string => {
23 return tab ? `${ROUTES.CONFIG}?tab=${tab}` : ROUTES.CONFIG;
24};
25
26// Typed config route builders for common tabs
27export const CONFIG_ROUTES = {
28 MODELS: buildConfigRoute("models"),
29 RULES: buildConfigRoute("rules"),
30 TOOLS: buildConfigRoute("tools"),
31 AGENTS: buildConfigRoute("agents"),
32 ORGANIZATIONS: buildConfigRoute("organizations"),
33 INDEXING: buildConfigRoute("indexing"),
34 SETTINGS: buildConfigRoute("settings"),
35 HELP: buildConfigRoute("help"),
36} as const;