* base : slash-command/misc foundation - model icon and focus-selector constants * feat : slash-command picker and command parsing helpers * refactor : wire command and @-mention pickers into the chat form * ui : improve model selector keyboard navigation and load/dismiss * feat: Unify markdown/raw-text rendering under one setting with migration * fix: Misc fixes - tool-call subtitle, assistant wrap, progress guards * feat: Clamp and style numeric settings inputs from registry bounds
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import { Package, Search, Settings, SquarePen } from '@lucide/svelte';
|
|
import McpLogo from '$lib/components/app/mcp/McpLogo.svelte';
|
|
import type { Component } from 'svelte';
|
|
import { ROUTES } from './routes';
|
|
|
|
export const FORK_TREE_DEPTH_PADDING = 8;
|
|
export const SYSTEM_MESSAGE_PLACEHOLDER = 'System message';
|
|
|
|
/** Icon used for the model selector and the `/model` slash command. */
|
|
export const MODEL_SELECTOR_ICON = Package;
|
|
|
|
export const ICON_STRIP_TRANSITION_DURATION = 150;
|
|
export const ICON_STRIP_TRANSITION_DELAY_MULTIPLIER = 50;
|
|
|
|
/** Max height for tool-result code blocks (json / source / diff / streaming code). */
|
|
export const MAX_HEIGHT_CODE_BLOCK = '22rem';
|
|
|
|
export interface DesktopIconStripItem {
|
|
icon: Component;
|
|
tooltip: string;
|
|
route?: string;
|
|
activeRouteId?: string;
|
|
activeRoutePrefix?: string;
|
|
activeUrlIncludes?: string;
|
|
keys?: string[];
|
|
}
|
|
|
|
export const SIDEBAR_ACTIONS_ITEMS: DesktopIconStripItem[] = [
|
|
{ icon: SquarePen, tooltip: 'New chat', route: ROUTES.NEW_CHAT, keys: ['shift', 'cmd', 'o'] },
|
|
{ icon: Search, tooltip: 'Search', keys: ['cmd', 'k'] },
|
|
{
|
|
icon: McpLogo,
|
|
tooltip: 'MCP Servers',
|
|
route: ROUTES.MCP_SERVERS,
|
|
activeRouteId: '/mcp-servers'
|
|
},
|
|
{
|
|
icon: Settings,
|
|
tooltip: 'Settings',
|
|
route: `${ROUTES.SETTINGS}/general`,
|
|
activeUrlIncludes: '#/settings'
|
|
}
|
|
];
|