/**
* Left icon rail — the app-level view switcher. Icon-only by design; view
* names live in tooltips. Adding a view is one `VIEWS` entry here plus its
* render branch in `App`.
*/
import type { ReactNode } from 'react';
export type AppView =
| 'chat'
| 'search'
| 'models'
| 'services'
| 'workspace'
| 'suggest'
| 'bash'
| 'di';
interface ViewDef {
readonly id: AppView;
readonly title: string;
readonly icon: ReactNode;
}
const iconProps = {
width: 18,
height: 18,
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
strokeWidth: 2,
strokeLinecap: 'round',
strokeLinejoin: 'round',
} as const;
const VIEWS: readonly ViewDef[] = [
{
id: 'chat',
title: 'Chat',
icon: (
),
},
{
id: 'search',
title: 'Search',
icon: (
),
},
{
id: 'models',
title: 'Model Catalog',
icon: (
),
},
{
id: 'services',
title: 'App Services',
icon: (
),
},
{
id: 'workspace',
title: 'Workspace Runtime',
icon: (
),
},
{
id: 'suggest',
title: 'Filesystem Suggest',
icon: (
),
},
{
id: 'bash',
title: 'Bash Parser',
icon: (
),
},
{
id: 'di',
title: 'DI',
icon: (
),
},
];
export function NavRail({
view,
onChange,
}: {
readonly view: AppView;
readonly onChange: (view: AppView) => void;
}) {
return (
);
}