SYMBOL INDEX (564 symbols across 113 files) FILE: app/[lang]/about/cn/page.tsx function AboutCN (line 13) | function AboutCN() { FILE: app/[lang]/about/ja/page.tsx function AboutJA (line 20) | function AboutJA() { FILE: app/[lang]/about/page.tsx function About (line 20) | function About() { FILE: app/[lang]/layout.tsx function generateStaticParams (line 33) | async function generateStaticParams() { function generateMetadata (line 38) | async function generateMetadata({ function RootLayout (line 136) | async function RootLayout({ FILE: app/[lang]/page.tsx function Home (line 15) | function Home() { FILE: app/api/chat/route.ts function createCachedStreamResponse (line 45) | function createCachedStreamResponse(xml: string): Response { function handleChatRequest (line 75) | async function handleChatRequest(req: Request): Promise { function handleError (line 783) | function handleError(error: unknown): Response { function safeHandler (line 845) | async function safeHandler(req: Request): Promise { function POST (line 856) | async function POST(req: Request) { FILE: app/api/config/route.ts function GET (line 3) | async function GET() { FILE: app/api/log-feedback/route.ts function POST (line 12) | async function POST(req: Request) { FILE: app/api/log-save/route.ts function POST (line 11) | async function POST(req: Request) { FILE: app/api/parse-url/route.ts constant MAX_CONTENT_LENGTH (line 6) | const MAX_CONTENT_LENGTH = 150000 // Match PDF limit constant EXTRACT_TIMEOUT_MS (line 7) | const EXTRACT_TIMEOUT_MS = 15000 constant USER_AGENT (line 8) | const USER_AGENT = "Mozilla/5.0 (compatible; NextAIDrawio/1.0)" function POST (line 10) | async function POST(req: Request) { FILE: app/api/server-models/route.ts function GET (line 8) | async function GET() { FILE: app/api/validate-diagram/route.ts type ValidateDiagramRequest (line 16) | interface ValidateDiagramRequest { constant DEFAULT_VALID_RESULT (line 22) | const DEFAULT_VALID_RESULT: ValidationResult = { function createStreamingResponse (line 32) | function createStreamingResponse(result: ValidationResult): Response { function POST (line 46) | async function POST(req: Request): Promise { FILE: app/api/validate-model/route.ts type ValidateRequest (line 18) | interface ValidateRequest { function POST (line 31) | async function POST(req: Request) { FILE: app/api/verify-access-code/route.ts function POST (line 1) | async function POST(req: Request) { FILE: app/manifest.ts function manifest (line 3) | function manifest(): MetadataRoute.Manifest { FILE: app/robots.ts function robots (line 3) | function robots(): MetadataRoute.Robots { FILE: app/sitemap.ts function sitemap (line 3) | function sitemap(): MetadataRoute.Sitemap { FILE: components/ai-elements/model-selector.tsx type ModelSelectorProps (line 23) | type ModelSelectorProps = ComponentProps type ModelSelectorTriggerProps (line 29) | type ModelSelectorTriggerProps = ComponentProps type ModelSelectorContentProps (line 35) | type ModelSelectorContentProps = ComponentProps & { type ModelSelectorDialogProps (line 53) | type ModelSelectorDialogProps = ComponentProps type ModelSelectorInputProps (line 59) | type ModelSelectorInputProps = ComponentProps type ModelSelectorListProps (line 68) | type ModelSelectorListProps = ComponentProps type ModelSelectorEmptyProps (line 130) | type ModelSelectorEmptyProps = ComponentProps type ModelSelectorGroupProps (line 136) | type ModelSelectorGroupProps = ComponentProps type ModelSelectorItemProps (line 142) | type ModelSelectorItemProps = ComponentProps type ModelSelectorShortcutProps (line 148) | type ModelSelectorShortcutProps = ComponentProps type ModelSelectorSeparatorProps (line 154) | type ModelSelectorSeparatorProps = ComponentProps< type ModelSelectorLogoProps (line 162) | type ModelSelectorLogoProps = Omit< type ModelSelectorLogoGroupProps (line 192) | type ModelSelectorLogoGroupProps = ComponentProps<"div"> type ModelSelectorNameProps (line 207) | type ModelSelectorNameProps = ComponentProps<"span"> type ModelSelectorSectionHeaderProps (line 216) | type ModelSelectorSectionHeaderProps = { FILE: components/ai-elements/reasoning.tsx type ReasoningContextValue (line 15) | type ReasoningContextValue = { type ReasoningProps (line 32) | type ReasoningProps = ComponentProps & { constant AUTO_CLOSE_DELAY (line 40) | const AUTO_CLOSE_DELAY = 1000 constant MS_IN_S (line 41) | const MS_IN_S = 1000 type ReasoningTriggerProps (line 113) | type ReasoningTriggerProps = ComponentProps< type ReasoningContentProps (line 163) | type ReasoningContentProps = ComponentProps< FILE: components/ai-elements/shimmer.tsx type TextShimmerProps (line 13) | type TextShimmerProps = { FILE: components/button-with-tooltip.tsx type ButtonWithTooltipProps (line 11) | interface ButtonWithTooltipProps function ButtonWithTooltip (line 19) | function ButtonWithTooltip({ FILE: components/chat-example-panel.tsx type ExampleCardProps (line 14) | interface ExampleCardProps { function ExampleCard (line 22) | function ExampleCard({ function ExamplePanel (line 70) | function ExamplePanel({ FILE: components/chat-input.tsx constant MAX_IMAGE_SIZE (line 40) | const MAX_IMAGE_SIZE = 2 * 1024 * 1024 // 2MB constant MAX_FILES (line 41) | const MAX_FILES = 5 function isValidFileType (line 43) | function isValidFileType(file: File): boolean { function formatFileSize (line 47) | function formatFileSize(bytes: number): string { function showErrorToast (line 53) | function showErrorToast(message: React.ReactNode) { type ValidationResult (line 62) | interface ValidationResult { function validateFiles (line 67) | function validateFiles( function showValidationErrors (line 116) | function showValidationErrors(errors: string[], dict: any) { type ChatInputRef (line 148) | interface ChatInputRef { type ChatInputProps (line 152) | interface ChatInputProps { FILE: components/chat-message-display.tsx function getCompleteOperations (line 46) | function getCompleteOperations( type TextSection (line 64) | interface TextSection { function splitTextIntoFileSections (line 72) | function splitTextIntoFileSections(text: string): TextSection[] { type SessionMetadata (line 138) | interface SessionMetadata { type ChatMessageDisplayProps (line 145) | interface ChatMessageDisplayProps { function ChatMessageDisplay (line 164) | function ChatMessageDisplay({ FILE: components/chat-panel.tsx constant STORAGE_SESSION_ID_KEY (line 48) | const STORAGE_SESSION_ID_KEY = "next-ai-draw-io-session-id" constant SESSION_STORAGE_INPUT_KEY (line 51) | const SESSION_STORAGE_INPUT_KEY = "next-ai-draw-io-input" type MessagePart (line 54) | interface MessagePart { type ChatMessage (line 62) | interface ChatMessage { type ChatPanelProps (line 68) | interface ChatPanelProps { constant TOOL_ERROR_STATE (line 79) | const TOOL_ERROR_STATE = "output-error" as const constant DEBUG (line 80) | const DEBUG = process.env.NODE_ENV === "development" constant MAX_AUTO_RETRY_COUNT (line 82) | const MAX_AUTO_RETRY_COUNT = 3 constant MAX_CONTINUATION_RETRY_COUNT (line 84) | const MAX_CONTINUATION_RETRY_COUNT = 2 // Limit for truncation continuat... function hasToolErrors (line 90) | function hasToolErrors(messages: ChatMessage[]): boolean { function ChatPanel (line 109) | function ChatPanel({ FILE: components/chat/ChatLobby.tsx type SessionMetadata (line 25) | interface SessionMetadata { type ChatLobbyProps (line 32) | interface ChatLobbyProps { function formatSessionDate (line 58) | function formatSessionDate( function ChatLobby (line 78) | function ChatLobby({ FILE: components/chat/ToolCallCard.tsx type ToolCallCardProps (line 9) | interface ToolCallCardProps { function OperationsDisplay (line 22) | function OperationsDisplay({ operations }: { operations: DiagramOperatio... function ToolCallCard (line 59) | function ToolCallCard({ FILE: components/chat/ValidationCard.tsx type ValidationStatus (line 18) | type ValidationStatus = type ValidationState (line 28) | interface ValidationState { type ValidationCardProps (line 37) | interface ValidationCardProps { function ValidationCard (line 42) | function ValidationCard({ FILE: components/chat/types.ts type DiagramOperation (line 1) | interface DiagramOperation { type ToolPartLike (line 7) | interface ToolPartLike { FILE: components/code-block.tsx type CodeBlockProps (line 5) | interface CodeBlockProps { function CodeBlock (line 10) | function CodeBlock({ code, language = "xml" }: CodeBlockProps) { FILE: components/dev-xml-simulator.tsx constant DEV_XML_PRESETS (line 8) | const DEV_XML_PRESETS: Record = { type DevXmlSimulatorProps (line 135) | interface DevXmlSimulatorProps { function DevXmlSimulator (line 141) | function DevXmlSimulator({ FILE: components/error-toast.tsx type ErrorToastProps (line 5) | interface ErrorToastProps { function ErrorToast (line 10) | function ErrorToast({ message, onDismiss }: ErrorToastProps) { FILE: components/file-preview-list.tsx function formatCharCount (line 9) | function formatCharCount(count: number): string { type FilePreviewListProps (line 16) | interface FilePreviewListProps { function FilePreviewList (line 30) | function FilePreviewList({ FILE: components/history-dialog.tsx type HistoryDialogProps (line 18) | interface HistoryDialogProps { function HistoryDialog (line 23) | function HistoryDialog({ FILE: components/model-config-dialog.tsx type ModelConfigDialogProps (line 64) | interface ModelConfigDialogProps { type ValidationStatus (line 70) | type ValidationStatus = "idle" | "validating" | "success" | "error" function ProviderLogo (line 73) | function ProviderLogo({ function ConfigSection (line 105) | function ConfigSection({ function ConfigCard (line 133) | function ConfigCard({ children }: { children: React.ReactNode }) { function ModelConfigDialog (line 141) | function ModelConfigDialog({ FILE: components/model-selector.tsx type ModelSelectorProps (line 36) | interface ModelSelectorProps { function groupModelsByProvider (line 46) | function groupModelsByProvider( function ModelSelector (line 69) | function ModelSelector({ FILE: components/quota-limit-toast.tsx type QuotaLimitToastProps (line 9) | interface QuotaLimitToastProps { function QuotaLimitToast (line 17) | function QuotaLimitToast({ FILE: components/reset-warning-modal.tsx type ResetWarningModalProps (line 14) | interface ResetWarningModalProps { function ResetWarningModal (line 20) | function ResetWarningModal({ FILE: components/save-dialog.tsx type ExportFormat (line 23) | type ExportFormat = "drawio" | "png" | "svg" type SaveDialogProps (line 25) | interface SaveDialogProps { function SaveDialog (line 32) | function SaveDialog({ FILE: components/settings-dialog.tsx function SettingItem (line 32) | function SettingItem({ constant LANGUAGE_LABELS (line 56) | const LANGUAGE_LABELS: Record = { type SettingsDialogProps (line 63) | interface SettingsDialogProps { constant STORAGE_ACCESS_CODE_KEY (line 79) | const STORAGE_ACCESS_CODE_KEY = "next-ai-draw-io-access-code" constant STORAGE_ACCESS_CODE_REQUIRED_KEY (line 80) | const STORAGE_ACCESS_CODE_REQUIRED_KEY = "next-ai-draw-io-access-code-re... function getStoredAccessCodeRequired (line 82) | function getStoredAccessCodeRequired(): boolean | null { function SettingsContent (line 89) | function SettingsContent({ function SettingsDialog (line 617) | function SettingsDialog(props: SettingsDialogProps) { FILE: components/ui/alert-dialog.tsx function AlertDialog (line 9) | function AlertDialog({ function AlertDialogTrigger (line 15) | function AlertDialogTrigger({ function AlertDialogPortal (line 23) | function AlertDialogPortal({ function AlertDialogOverlay (line 31) | function AlertDialogOverlay({ function AlertDialogContent (line 47) | function AlertDialogContent({ function AlertDialogHeader (line 66) | function AlertDialogHeader({ function AlertDialogFooter (line 79) | function AlertDialogFooter({ function AlertDialogTitle (line 95) | function AlertDialogTitle({ function AlertDialogDescription (line 108) | function AlertDialogDescription({ function AlertDialogAction (line 121) | function AlertDialogAction({ function AlertDialogCancel (line 133) | function AlertDialogCancel({ FILE: components/ui/button.tsx function Button (line 38) | function Button({ FILE: components/ui/collapsible.tsx function Collapsible (line 5) | function Collapsible({ function CollapsibleTrigger (line 11) | function CollapsibleTrigger({ function CollapsibleContent (line 22) | function CollapsibleContent({ FILE: components/ui/command.tsx function Command (line 16) | function Command({ function CommandDialog (line 32) | function CommandDialog({ function CommandInput (line 58) | function CommandInput({ function CommandEmpty (line 98) | function CommandEmpty({ function CommandGroup (line 110) | function CommandGroup({ function CommandSeparator (line 126) | function CommandSeparator({ function CommandItem (line 139) | function CommandItem({ function CommandShortcut (line 167) | function CommandShortcut({ FILE: components/ui/dialog.tsx function Dialog (line 9) | function Dialog({ function DialogTrigger (line 15) | function DialogTrigger({ function DialogPortal (line 21) | function DialogPortal({ function DialogClose (line 27) | function DialogClose({ function DialogOverlay (line 33) | function DialogOverlay({ function DialogContent (line 52) | function DialogContent({ function DialogHeader (line 97) | function DialogHeader({ className, ...props }: React.ComponentProps<"div... function DialogFooter (line 107) | function DialogFooter({ className, ...props }: React.ComponentProps<"div... function DialogTitle (line 120) | function DialogTitle({ function DialogDescription (line 136) | function DialogDescription({ FILE: components/ui/input.tsx function Input (line 5) | function Input({ className, type, ...props }: React.ComponentProps<"inpu... FILE: components/ui/label.tsx function Label (line 8) | function Label({ FILE: components/ui/popover.tsx function Popover (line 8) | function Popover({ function PopoverTrigger (line 14) | function PopoverTrigger({ function PopoverContent (line 20) | function PopoverContent({ function PopoverAnchor (line 42) | function PopoverAnchor({ FILE: components/ui/resizable.tsx function ResizablePanelGroup (line 9) | function ResizablePanelGroup({ function ResizablePanel (line 25) | function ResizablePanel({ function ResizableHandle (line 31) | function ResizableHandle({ FILE: components/ui/scroll-area.tsx function ScrollArea (line 8) | function ScrollArea({ function ScrollBar (line 31) | function ScrollBar({ FILE: components/ui/select.tsx function Select (line 9) | function Select({ function SelectGroup (line 15) | function SelectGroup({ function SelectValue (line 21) | function SelectValue({ function SelectTrigger (line 27) | function SelectTrigger({ function SelectContent (line 53) | function SelectContent({ function SelectLabel (line 90) | function SelectLabel({ function SelectItem (line 103) | function SelectItem({ function SelectSeparator (line 127) | function SelectSeparator({ function SelectScrollUpButton (line 140) | function SelectScrollUpButton({ function SelectScrollDownButton (line 158) | function SelectScrollDownButton({ FILE: components/ui/switch.tsx function Switch (line 8) | function Switch({ FILE: components/ui/textarea.tsx function Textarea (line 5) | function Textarea({ className, ...props }: React.ComponentProps<"textare... FILE: components/ui/tooltip.tsx function TooltipProvider (line 8) | function TooltipProvider({ function Tooltip (line 21) | function Tooltip({ function TooltipTrigger (line 31) | function TooltipTrigger({ function TooltipContent (line 37) | function TooltipContent({ FILE: components/url-input-dialog.tsx type UrlInputDialogProps (line 17) | interface UrlInputDialogProps { function UrlInputDialog (line 24) | function UrlInputDialog({ FILE: contexts/diagram-context.tsx type DiagramContextType (line 15) | interface DiagramContextType { function DiagramProvider (line 44) | function DiagramProvider({ children }: { children: React.ReactNode }) { function useDiagram (line 410) | function useDiagram() { FILE: edge-functions/api/edgeai/chat/completions.ts constant ALLOWED_MODELS (line 58) | const ALLOWED_MODELS = [ constant MODEL_ALIASES (line 64) | const MODEL_ALIASES: Record = { constant CORS_HEADERS (line 70) | const CORS_HEADERS = { function createResponse (line 79) | function createResponse(body: any, status = 200, extraHeaders = {}): Res... function handleOptionsRequest (line 93) | function handleOptionsRequest(): Response { function onRequest (line 102) | async function onRequest({ request, env: _env }: any) { FILE: electron/electron.d.ts type ConfigPreset (line 6) | interface ConfigPreset { type ApplyPresetResult (line 22) | interface ApplyPresetResult { type ProxyConfig (line 29) | interface ProxyConfig { type SetProxyResult (line 35) | interface SetProxyResult { type SetUserLocaleResult (line 42) | interface SetUserLocaleResult { type Window (line 48) | interface Window { FILE: electron/main/app-menu.ts function buildAppMenu (line 22) | function buildAppMenu(): void { function rebuildAppMenu (line 31) | function rebuildAppMenu(): void { function getMenuTemplate (line 38) | function getMenuTemplate(): MenuItemConstructorOptions[] { function buildConfigMenu (line 184) | function buildConfigMenu( FILE: electron/main/config-manager.ts constant SENSITIVE_FIELDS (line 9) | const SENSITIVE_FIELDS = ["AI_API_KEY"] as const constant ENCRYPTED_PREFIX (line 14) | const ENCRYPTED_PREFIX = "encrypted:" function isEncryptionAvailable (line 19) | function isEncryptionAvailable(): boolean { function encryptValue (line 32) | function encryptValue(value: string): string { function decryptValue (line 65) | function decryptValue(value: string): string { function encryptConfig (line 88) | function encryptConfig( function decryptConfig (line 103) | function decryptConfig( type ConfigPreset (line 118) | interface ConfigPreset { type ConfigPresetsFile (line 136) | interface ConfigPresetsFile { constant CONFIG_FILE_NAME (line 143) | const CONFIG_FILE_NAME = "config-presets.json" function getConfigFilePath (line 148) | function getConfigFilePath(): string { function loadPresets (line 157) | function loadPresets(): ConfigPresetsFile { function savePresets (line 195) | function savePresets(data: ConfigPresetsFile): void { function getAllPresets (line 224) | function getAllPresets(): ConfigPreset[] { function getCurrentPresetId (line 232) | function getCurrentPresetId(): string | null { function getCurrentPreset (line 240) | function getCurrentPreset(): ConfigPreset | null { function createPreset (line 251) | function createPreset( function updatePreset (line 274) | function updatePreset( function deletePreset (line 300) | function deletePreset(id: string): boolean { function setCurrentPreset (line 322) | function setCurrentPreset(id: string | null): boolean { constant PROVIDER_ENV_MAP (line 340) | const PROVIDER_ENV_MAP: Record | null { function getCurrentPresetEnv (line 427) | function getCurrentPresetEnv(): Record { function getUserLocale (line 473) | function getUserLocale(): "en" | "zh" | "ja" | "zh-Hant" | undefined { function setUserLocale (line 481) | function setUserLocale( FILE: electron/main/env-loader.ts function loadEnvFile (line 9) | function loadEnvFile(): void { function loadEnvFromFile (line 34) | function loadEnvFromFile(filePath: string): void { FILE: electron/main/ipc-handlers.ts constant ALLOWED_CONFIG_KEYS (line 28) | const ALLOWED_CONFIG_KEYS = new Set([ function sanitizePresetConfig (line 39) | function sanitizePresetConfig( function registerIpcHandlers (line 54) | function registerIpcHandlers(): void { FILE: electron/main/menu-i18n.ts type MenuLocale (line 8) | type MenuLocale = "en" | "zh" | "ja" | "zh-Hant" type MenuTranslations (line 10) | interface MenuTranslations { function getMenuTranslations (line 156) | function getMenuTranslations(locale: string): MenuTranslations { function detectSystemLocale (line 179) | function detectSystemLocale(appLocale: string): MenuLocale { function getPreferredLocale (line 202) | function getPreferredLocale(appLocale: string): MenuLocale { FILE: electron/main/next-server.ts function getResourcePath (line 18) | function getResourcePath(): string { function waitForServer (line 28) | async function waitForServer(url: string, timeout = 30000): Promise { function startNextServer (line 48) | async function startNextServer(): Promise { function stopNextServer (line 128) | async function stopNextServer(): Promise { function waitForServerStop (line 167) | async function waitForServerStop(timeout = 5000): Promise { function restartNextServer (line 187) | async function restartNextServer(): Promise { FILE: electron/main/port-manager.ts constant PORT_CONFIG (line 9) | const PORT_CONFIG = { function isPortAvailable (line 27) | function isPortAvailable(port: number): Promise { function findAvailablePort (line 49) | async function findAvailablePort(reuseExisting = true): Promise { function getAllocatedPort (line 96) | function getAllocatedPort(): number | null { function resetAllocatedPort (line 103) | function resetAllocatedPort(): void { function getServerUrl (line 110) | function getServerUrl(): string { FILE: electron/main/proxy-manager.ts constant CONFIG_FILE (line 8) | const CONFIG_FILE = "proxy-config.json" function getConfigPath (line 10) | function getConfigPath(): string { function loadProxyConfig (line 17) | function loadProxyConfig(): ProxyConfig { function saveProxyConfig (line 33) | function saveProxyConfig(config: ProxyConfig): void { function applyProxyToEnv (line 47) | function applyProxyToEnv(): void { function getProxyConfig (line 70) | function getProxyConfig(): ProxyConfig { FILE: electron/main/settings-window.ts function showSettingsWindow (line 9) | function showSettingsWindow(parentWindow?: BrowserWindow): void { function closeSettingsWindow (line 57) | function closeSettingsWindow(): void { function isSettingsWindowOpen (line 67) | function isSettingsWindowOpen(): boolean { function registerSettingsWindowHandlers (line 74) | function registerSettingsWindowHandlers(): void { FILE: electron/main/window-manager.ts function getIconPath (line 11) | function getIconPath(): string | undefined { function createWindow (line 30) | function createWindow(serverUrl: string): BrowserWindow { function getMainWindow (line 82) | function getMainWindow(): BrowserWindow | null { FILE: electron/settings/settings.js function loadPresets (line 40) | async function loadPresets() { function renderPresets (line 52) | function renderPresets() { function setupEventListeners (line 112) | function setupEventListeners() { function openAddModal (line 137) | function openAddModal() { function openEditModal (line 147) | function openEditModal(id) { function closeModal (line 167) | function closeModal() { function openDeleteModal (line 173) | function openDeleteModal(id) { function closeDeleteModal (line 183) | function closeDeleteModal() { function savePreset (line 189) | async function savePreset() { function confirmDelete (line 237) | async function confirmDelete() { function applyPreset (line 258) | async function applyPreset(id) { function getProviderLabel (line 281) | function getProviderLabel(provider) { function showToast (line 298) | function showToast(message, type = "") { function escapeHtml (line 308) | function escapeHtml(text) { FILE: hooks/use-diagram-tool-handlers.ts constant DEBUG (line 12) | const DEBUG = process.env.NODE_ENV === "development" type ToolCall (line 14) | interface ToolCall { type AddToolOutputSuccess (line 20) | type AddToolOutputSuccess = { type AddToolOutputError (line 28) | type AddToolOutputError = { type AddToolOutputParams (line 36) | type AddToolOutputParams = AddToolOutputSuccess | AddToolOutputError type AddToolOutputFn (line 38) | type AddToolOutputFn = (params: AddToolOutputParams) => void constant MAX_VALIDATION_RETRIES (line 40) | const MAX_VALIDATION_RETRIES = 3 type ValidateDiagramFn (line 43) | type ValidateDiagramFn = ( type UseDiagramToolHandlersParams (line 48) | interface UseDiagramToolHandlersParams { function useDiagramToolHandlers (line 72) | function useDiagramToolHandlers({ FILE: hooks/use-dictionary.ts function DictionaryProvider (line 8) | function DictionaryProvider({ function useDictionary (line 19) | function useDictionary() { FILE: hooks/use-model-config.ts constant OLD_KEYS (line 21) | const OLD_KEYS = { function migrateOldConfig (line 31) | function migrateOldConfig(): MultiModelConfig | null { function loadConfig (line 69) | function loadConfig(): MultiModelConfig { function saveConfig (line 99) | function saveConfig(config: MultiModelConfig): void { type UseModelConfigReturn (line 104) | interface UseModelConfigReturn { function useModelConfig (line 134) | function useModelConfig(): UseModelConfigReturn { function getSelectedAIConfig (line 374) | function getSelectedAIConfig(): { FILE: hooks/use-session-manager.ts type SessionData (line 19) | interface SessionData { type UseSessionManagerReturn (line 27) | interface UseSessionManagerReturn { type UseSessionManagerOptions (line 47) | interface UseSessionManagerOptions { function useSessionManager (line 52) | function useSessionManager( FILE: hooks/use-validate-diagram.ts constant DEFAULT_VALID_RESULT (line 18) | const DEFAULT_VALID_RESULT: ValidationResult = { type UseValidateDiagramOptions (line 24) | interface UseValidateDiagramOptions { type PendingValidation (line 30) | type PendingValidation = { function useValidateDiagram (line 35) | function useValidateDiagram(options: UseValidateDiagramOptions = {}) { FILE: instrumentation.ts function register (line 4) | function register() { FILE: lib/ai-providers.ts type ModelConfig (line 16) | interface ModelConfig { constant SINGLE_SYSTEM_PROVIDERS (line 25) | const SINGLE_SYSTEM_PROVIDERS = new Set([ function normalizeMiniMaxBaseURL (line 37) | function normalizeMiniMaxBaseURL(rawUrl: string): { type ClientOverrides (line 59) | interface ClientOverrides { constant ALLOWED_CLIENT_PROVIDERS (line 80) | const ALLOWED_CLIENT_PROVIDERS: ProviderName[] = [ constant BEDROCK_ANTHROPIC_BETA (line 104) | const BEDROCK_ANTHROPIC_BETA = { constant ANTHROPIC_BETA_HEADERS (line 111) | const ANTHROPIC_BETA_HEADERS = { function resolveBaseURL (line 127) | function resolveBaseURL( function resolveApiKey (line 152) | function resolveApiKey( function resolveBaseUrlEnv (line 188) | function resolveBaseUrlEnv( function parseIntSafe (line 199) | function parseIntSafe( function buildProviderOptions (line 238) | function buildProviderOptions( constant PROVIDER_ENV_VARS (line 537) | const PROVIDER_ENV_VARS: Record = { function detectProvider (line 564) | function detectProvider(): ProviderName | null { function validateProviderCredentials (line 598) | function validateProviderCredentials( function getAIModel (line 661) | function getAIModel(overrides?: ClientOverrides): ModelConfig { function supportsPromptCaching (line 1304) | function supportsPromptCaching(modelId: string): boolean { function supportsImageInput (line 1318) | function supportsImageInput(modelId: string): boolean { function getValidationModel (line 1362) | function getValidationModel(): ReturnType["model"] { FILE: lib/base-path.ts function getBasePath (line 10) | function getBasePath(): string { function getApiEndpoint (line 24) | function getApiEndpoint(endpoint: string): string { function getAssetUrl (line 34) | function getAssetUrl(assetPath: string): string { FILE: lib/cached-responses.ts type CachedResponse (line 1) | interface CachedResponse { constant CACHED_EXAMPLE_RESPONSES (line 7) | const CACHED_EXAMPLE_RESPONSES: CachedResponse[] = [ function findCachedResponse (line 882) | function findCachedResponse( FILE: lib/chat-helpers.ts constant MAX_FILE_SIZE (line 5) | const MAX_FILE_SIZE = 2 * 1024 * 1024 // 2MB constant MAX_FILES (line 6) | const MAX_FILES = 5 function validateFileParts (line 9) | function validateFileParts(messages: any[]): { function isMinimalDiagram (line 45) | function isMinimalDiagram(xml: string): boolean { function replaceHistoricalToolInputs (line 53) | function replaceHistoricalToolInputs(messages: any[]): any[] { FILE: lib/diagram-validator.ts function formatValidationFeedback (line 18) | function formatValidationFeedback(result: ValidationResult): string { FILE: lib/dynamo-quota-manager.ts constant TABLE (line 10) | const TABLE = process.env.DYNAMODB_QUOTA_TABLE constant DYNAMODB_REGION (line 11) | const DYNAMODB_REGION = process.env.DYNAMODB_REGION || "ap-northeast-1" constant QUOTA_TIMEZONE (line 14) | let QUOTA_TIMEZONE = process.env.QUOTA_TIMEZONE || "UTC" function getTodayInTimezone (line 32) | function getTodayInTimezone(): string { function isQuotaEnabled (line 45) | function isQuotaEnabled(): boolean { type QuotaLimits (line 49) | interface QuotaLimits { type QuotaCheckResult (line 55) | interface QuotaCheckResult { function checkAndIncrementRequest (line 68) | async function checkAndIncrementRequest( function recordTokenUsage (line 193) | async function recordTokenUsage( FILE: lib/i18n/config.ts type Locale (line 6) | type Locale = (typeof i18n)["locales"][number] FILE: lib/i18n/dictionaries.ts type Dictionary (line 13) | type Dictionary = Awaited> function getDictionary (line 18) | async function getDictionary(locale: Locale): Promise { FILE: lib/i18n/utils.ts function formatMessage (line 1) | function formatMessage( FILE: lib/langfuse.ts function getLangfuseClient (line 8) | function getLangfuseClient(): LangfuseClient | null { function isLangfuseEnabled (line 25) | function isLangfuseEnabled(): boolean { function setTraceInput (line 32) | function setTraceInput(params: { function setTraceOutput (line 50) | function setTraceOutput(output: string) { function getTelemetryConfig (line 63) | function getTelemetryConfig(params: { function wrapWithObserve (line 81) | function wrapWithObserve( FILE: lib/pdf-utils.ts constant DEFAULT_MAX_EXTRACTED_CHARS (line 4) | const DEFAULT_MAX_EXTRACTED_CHARS = 150000 // 150k chars constant MAX_EXTRACTED_CHARS (line 5) | const MAX_EXTRACTED_CHARS = constant TEXT_EXTENSIONS (line 10) | const TEXT_EXTENSIONS = [ function extractPdfText (line 44) | async function extractPdfText(file: File): Promise { function isPdfFile (line 54) | function isPdfFile(file: File): boolean { function isTextFile (line 61) | function isTextFile(file: File): boolean { function extractTextFileContent (line 73) | async function extractTextFileContent(file: File): Promise { FILE: lib/server-model-config.ts type ServerProviderConfig (line 33) | type ServerProviderConfig = z.infer type ServerModelsConfig (line 34) | type ServerModelsConfig = z.infer type FlattenedServerModel (line 36) | interface FlattenedServerModel { function slugify (line 52) | function slugify(name: string): string { function getConfigPath (line 59) | function getConfigPath(): string { function loadRawServerModelsConfig (line 65) | async function loadRawServerModelsConfig(): Promise> { function isIndexedDBAvailable (line 69) | function isIndexedDBAvailable(): boolean { function getAllSessionMetadata (line 79) | async function getAllSessionMetadata(): Promise { function getSession (line 109) | async function getSession(id: string): Promise { function saveSession (line 120) | async function saveSession(session: ChatSession): Promise { function deleteSession (line 153) | async function deleteSession(id: string): Promise { function getSessionCount (line 163) | async function getSessionCount(): Promise { function deleteOldestSession (line 174) | async function deleteOldestSession(): Promise { function enforceSessionLimit (line 191) | async function enforceSessionLimit(): Promise { function createEmptySession (line 202) | function createEmptySession(): ChatSession { constant MAX_TITLE_LENGTH (line 215) | const MAX_TITLE_LENGTH = 100 function extractTitle (line 217) | function extractTitle(messages: StoredMessage[]): string { function sanitizeMessage (line 235) | function sanitizeMessage(message: unknown): StoredMessage | null { function sanitizeMessages (line 263) | function sanitizeMessages(messages: unknown[]): StoredMessage[] { function migrateFromLocalStorage (line 270) | async function migrateFromLocalStorage(): Promise { FILE: lib/ssrf-protection.ts function isPrivateUrl (line 9) | function isPrivateUrl(urlString: string): boolean { FILE: lib/storage.ts constant STORAGE_KEYS (line 4) | const STORAGE_KEYS = { FILE: lib/system-prompts.ts constant DEFAULT_SYSTEM_PROMPT (line 10) | const DEFAULT_SYSTEM_PROMPT = ` constant STYLE_INSTRUCTIONS (line 194) | const STYLE_INSTRUCTIONS = ` constant MINIMAL_STYLE_INSTRUCTION (line 202) | const MINIMAL_STYLE_INSTRUCTION = ` constant EXTENDED_ADDITIONS (line 228) | const EXTENDED_ADDITIONS = ` constant EXTENDED_SYSTEM_PROMPT (line 359) | const EXTENDED_SYSTEM_PROMPT = DEFAULT_SYSTEM_PROMPT + EXTENDED_ADDITIONS constant EXTENDED_PROMPT_MODEL_PATTERNS (line 363) | const EXTENDED_PROMPT_MODEL_PATTERNS = [ function getSystemPrompt (line 375) | function getSystemPrompt( FILE: lib/types/model-config.ts type ProviderName (line 3) | type ProviderName = type ModelConfig (line 26) | interface ModelConfig { type ProviderConfig (line 34) | interface ProviderConfig { type MultiModelConfig (line 53) | interface MultiModelConfig { type FlattenedModel (line 61) | interface FlattenedModel { constant PROVIDER_LOGO_MAP (line 88) | const PROVIDER_LOGO_MAP: Record = { constant PROVIDER_INFO (line 107) | const PROVIDER_INFO: Record< constant SUGGESTED_MODELS (line 185) | const SUGGESTED_MODELS: Partial> = { function generateId (line 356) | function generateId(): string { function createEmptyConfig (line 361) | function createEmptyConfig(): MultiModelConfig { function createProviderConfig (line 370) | function createProviderConfig(provider: ProviderName): ProviderConfig { function createModelConfig (line 382) | function createModelConfig(modelId: string): ModelConfig { function flattenModels (line 390) | function flattenModels(config: MultiModelConfig): FlattenedModel[] { function findModelById (line 425) | function findModelById( FILE: lib/url-utils.ts type UrlData (line 4) | interface UrlData { function extractUrlContent (line 18) | async function extractUrlContent(url: string): Promise { FILE: lib/use-file-processor.tsx type FileData (line 13) | interface FileData { function useFileProcessor (line 23) | function useFileProcessor() { FILE: lib/use-quota-manager.tsx type QuotaConfig (line 9) | interface QuotaConfig { function useQuotaManager (line 21) | function useQuotaManager(config: QuotaConfig): { FILE: lib/user-id.ts function getUserIdFromRequest (line 6) | function getUserIdFromRequest(req: Request): string { FILE: lib/utils.ts function cn (line 8) | function cn(...inputs: ClassValue[]) { constant MIN_REAL_DIAGRAM_LENGTH (line 20) | const MIN_REAL_DIAGRAM_LENGTH = 300 function isRealDiagram (line 27) | function isRealDiagram(xml: string | undefined | null): boolean { constant MAX_XML_SIZE (line 36) | const MAX_XML_SIZE = 1_000_000 constant MAX_DROP_ITERATIONS (line 39) | const MAX_DROP_ITERATIONS = 10 constant STRUCTURAL_ATTRS (line 42) | const STRUCTURAL_ATTRS = [ constant VALID_ENTITIES (line 52) | const VALID_ENTITIES = new Set(["lt", "gt", "amp", "quot", "apos"]) function isMxCellXmlComplete (line 66) | function isMxCellXmlComplete(xml: string | undefined | null): boolean { function extractCompleteMxCells (line 95) | function extractCompleteMxCells(xml: string | undefined | null): string { type ParsedTag (line 134) | interface ParsedTag { function parseXmlTags (line 147) | function parseXmlTags(xml: string): ParsedTag[] { function formatXML (line 202) | function formatXML(xml: string, indent: string = " "): string { function convertToLegalXml (line 251) | function convertToLegalXml(xmlString: string): string { function wrapWithMxFile (line 326) | function wrapWithMxFile(xml: string): string { function replaceNodes (line 379) | function replaceNodes(currentXML: string, nodes: string): string { type OperationError (line 479) | interface OperationError { type ApplyOperationsResult (line 485) | interface ApplyOperationsResult { function applyDiagramOperations (line 498) | function applyDiagramOperations( function checkDuplicateAttributes (line 738) | function checkDuplicateAttributes(xml: string): string | null { function checkDuplicateIds (line 762) | function checkDuplicateIds(xml: string): string | null { function checkTagMismatches (line 780) | function checkTagMismatches(xml: string): string | null { function checkCharacterReferences (line 805) | function checkCharacterReferences(xml: string): string | null { function checkEntityReferences (line 832) | function checkEntityReferences(xml: string): string | null { function checkNestedMxCells (line 851) | function checkNestedMxCells(xml: string): string | null { function validateMxCellStructure (line 879) | function validateMxCellStructure(xml: string): string | null { function autoFixXml (line 985) | function autoFixXml(xml: string): { fixed: string; fixes: string[] } { function validateAndFixXml (line 1639) | function validateAndFixXml(xml: string): { function extractDiagramXML (line 1676) | function extractDiagramXML(xml_svg_string: string): string { FILE: lib/validation-prompts.ts constant VALIDATION_SYSTEM_PROMPT (line 6) | const VALIDATION_SYSTEM_PROMPT = `You are a diagram quality validator. A... FILE: lib/validation-schema.ts type ValidationResult (line 37) | type ValidationResult = z.infer type ValidationIssue (line 38) | type ValidationIssue = ValidationResult["issues"][number] FILE: packages/mcp-server/src/diagram-operations.ts type DiagramOperation (line 6) | interface DiagramOperation { type OperationError (line 12) | interface OperationError { type ApplyOperationsResult (line 18) | interface ApplyOperationsResult { function applyDiagramOperations (line 31) | function applyDiagramOperations( FILE: packages/mcp-server/src/history.ts constant MAX_HISTORY (line 8) | const MAX_HISTORY = 20 function addHistory (line 11) | function addHistory(sessionId: string, xml: string, svg = ""): number { function getHistory (line 35) | function getHistory( function getHistoryEntry (line 41) | function getHistoryEntry( function clearHistory (line 49) | function clearHistory(sessionId: string): void { function updateLastHistorySvg (line 53) | function updateLastHistorySvg(sessionId: string, svg: string): boolean { FILE: packages/mcp-server/src/http-server.ts constant DRAWIO_BASE_URL (line 17) | const DRAWIO_BASE_URL = function getOrigin (line 21) | function getOrigin(url: string): string { constant DRAWIO_ORIGIN (line 30) | const DRAWIO_ORIGIN = getOrigin(DRAWIO_BASE_URL) constant DEFAULT_DIAGRAM_XML (line 34) | const DEFAULT_DIAGRAM_XML = ` { function stopHttpServer (line 166) | function stopHttpServer(): void { function cleanupExpiredSessions (line 173) | function cleanupExpiredSessions(): void { function shutdown (line 186) | function shutdown(): void { function getServerPort (line 191) | function getServerPort(): number { function handleRequest (line 195) | function handleRequest( function handleStateApi (line 242) | function handleStateApi( function handleHistoryApi (line 309) | function handleHistoryApi( function handleRestoreApi (line 337) | function handleRestoreApi( function handleHistorySvgApi (line 383) | function handleHistorySvgApi( function getHtmlPage (line 416) | function getHtmlPage(sessionId: string): string { FILE: packages/mcp-server/src/index.ts class XMLSerializerPolyfill (line 16) | class XMLSerializerPolyfill { method serializeToString (line 17) | serializeToString(node: any): string { function gracefulShutdown (line 719) | function gracefulShutdown(reason: string) { function main (line 743) | async function main() { FILE: packages/mcp-server/src/xml-validation.ts constant MAX_XML_SIZE (line 11) | const MAX_XML_SIZE = 1_000_000 constant MAX_DROP_ITERATIONS (line 14) | const MAX_DROP_ITERATIONS = 10 constant STRUCTURAL_ATTRS (line 17) | const STRUCTURAL_ATTRS = [ constant VALID_ENTITIES (line 27) | const VALID_ENTITIES = new Set(["lt", "gt", "amp", "quot", "apos"]) type ParsedTag (line 33) | interface ParsedTag { function parseXmlTags (line 45) | function parseXmlTags(xml: string): ParsedTag[] { function checkDuplicateAttributes (line 99) | function checkDuplicateAttributes(xml: string): string | null { function checkDuplicateIds (line 123) | function checkDuplicateIds(xml: string): string | null { function checkTagMismatches (line 141) | function checkTagMismatches(xml: string): string | null { function checkCharacterReferences (line 166) | function checkCharacterReferences(xml: string): string | null { function checkEntityReferences (line 193) | function checkEntityReferences(xml: string): string | null { function checkNestedMxCells (line 212) | function checkNestedMxCells(xml: string): string | null { function validateMxCellStructure (line 244) | function validateMxCellStructure(xml: string): string | null { function autoFixXml (line 353) | function autoFixXml(xml: string): { fixed: string; fixes: string[] } { function validateAndFixXml (line 873) | function validateAndFixXml(xml: string): { function isMxCellXmlComplete (line 912) | function isMxCellXmlComplete(xml: string | undefined | null): boolean { FILE: proxy.ts function getLocale (line 7) | function getLocale(request: NextRequest): string | undefined { function proxy (line 27) | function proxy(request: NextRequest) { FILE: scripts/afterPack.cjs function copyDereferenced (line 23) | function copyDereferenced(src, dst) { FILE: scripts/electron-dev.mjs constant NEXT_PORT (line 22) | const NEXT_PORT = 6002 constant NEXT_URL (line 23) | const NEXT_URL = `http://localhost:${NEXT_PORT}` function getUserDataPath (line 28) | function getUserDataPath() { function loadPresetConfig (line 52) | function loadPresetConfig() { function waitForServer (line 86) | async function waitForServer(url, timeout = 120000) { function runCommand (line 110) | function runCommand(command, args, options = {}) { function startNextServer (line 134) | function startNextServer(presetEnv) { function main (line 163) | async function main() { FILE: scripts/prepare-electron-build.mjs function copyDereferenced (line 29) | function copyDereferenced(src, dst) { FILE: scripts/test-diagram-operations.mjs function applyDiagramOperations (line 14) | function applyDiagramOperations(xmlContent, operations) { function test (line 184) | function test(name, fn) { function assert (line 196) | function assert(condition, message) { FILE: tests/e2e/fixtures/diagrams.ts constant CAT_DIAGRAM_XML (line 6) | const CAT_DIAGRAM_XML = `