File size: 2,927 Bytes
5f40163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { AppWindow, Brain, Shield } from "lucide-react";
import KeyIcon from "#/icons/key.svg?react";
import MemoryIcon from "#/icons/memory_icon.svg?react";
import CircuitIcon from "#/icons/u-circuit.svg?react";
import RobotIcon from "#/icons/u-robot.svg?react";

export interface SettingsNavItem {
  icon: React.ReactElement;
  to: string;
  text: string;
  /** Short grey subline under the page title (`settings.tsx`). */
  subtitle: string;
}

export const OSS_NAV_ITEMS: SettingsNavItem[] = [
  {
    // "Agent" is the Agent Profile library: it lists the user's agent profiles
    // and its create/edit view is the reused Agent settings form plus a name.
    // The active profile is the current agent (#1571). Replaces the old split
    // of a global "Agent" form + a separate "Agent profiles" library.
    icon: <RobotIcon width={16} height={16} />,
    to: "/settings/agents",
    text: "SETTINGS$NAV_AGENT",
    subtitle: "SETTINGS$PAGE_AGENT_PROFILES_SUBLINE",
  },
  {
    icon: <CircuitIcon width={16} height={16} />,
    to: "/settings/llm",
    text: "SETTINGS$NAV_LLM",
    subtitle: "SETTINGS$PAGE_LLM_SUBLINE",
  },
  {
    icon: <MemoryIcon width={16} height={16} />,
    to: "/settings/condenser",
    text: "SETTINGS$NAV_CONDENSER",
    subtitle: "SETTINGS$PAGE_CONDENSER_SUBLINE",
  },
  {
    // The agent's ``agent_context`` section, whatever the schema exposes in it
    // — today only persistent memory (``agent_context.load_memory``). Not
    // ``disabledByAcp``: the stored flag rides the shared agent_settings
    // record into ACP conversations too — inline launches spread it into
    // ``agent_context``, and profile launches (the normal ACP path) have the
    // agent-server stamp it onto the profile-resolved agent.
    icon: <Brain className="size-4" strokeWidth={2} aria-hidden />,
    to: "/settings/agent-context",
    text: "SETTINGS$NAV_AGENT_CONTEXT",
    subtitle: "SETTINGS$PAGE_AGENT_CONTEXT_SUBLINE",
  },
  {
    icon: <Shield className="size-4" strokeWidth={2} aria-hidden />,
    to: "/settings/verification",
    text: "SETTINGS$NAV_VERIFICATION",
    subtitle: "SETTINGS$PAGE_VERIFICATION_SUBLINE",
  },
  {
    icon: <AppWindow className="size-4" strokeWidth={2} aria-hidden />,
    to: "/settings/app",
    text: "SETTINGS$NAV_APPLICATION",
    subtitle: "SETTINGS$PAGE_APPLICATION_SUBLINE",
  },
  {
    icon: <KeyIcon width={16} height={16} />,
    to: "/settings/secrets",
    text: "SETTINGS$NAV_SECRETS",
    subtitle: "SETTINGS$PAGE_SECRETS_SUBLINE",
  },
];

/**
 * The only OSS nav entry listed when the canvas is locked to a Cloud host —
 * i.e. deployed into SaaS / self-hosted OHE next to the OHE web app, whose own
 * settings shell (reached via "All Cloud Settings") owns everything else. The
 * other pages stay routable for in-app deep links; they are just unlisted
 * (OHE-3168).
 */
export const LOCKED_CLOUD_SETTINGS_NAV_PATH = "/settings/app";