MCPcopy Create free account

hub / github.com/christian-bromann/langchat / functions

Functions70 in github.com/christian-bromann/langchat

↓ 3 callersFunctioncreateMockedFetch
* Creates a mocked fetch function that simulates random network request errors * This demonstrates the model fallback middleware by causing the prima
app/agents/model-fallback.ts:11
↓ 3 callersFunctiondetermineEventTypeFromPayload
(payload: unknown)
app/components/ChatInterface.tsx:1128
↓ 3 callersFunctionhandleEvent
(eventType: EventType, eventData: unknown)
app/components/ChatInterface.tsx:1171
↓ 3 callersFunctiontransformLangGraphEvent
(langGraphEventType: string, payload: unknown)
app/components/ChatInterface.tsx:977
↓ 2 callersFunctioncountTokensApproximately
(messages: BaseMessage[] | Array<Record<string, unknown>>)
app/contexts/StatisticsContext.tsx:12
↓ 2 callersFunctionextractIncrementalTextFromChunk
(msg: unknown)
app/components/ChatInterface.tsx:1288
↓ 2 callersFunctionupdateToolCallWithMessage
(toolMsg: ToolMessageData | Record<string, unknown>)
app/components/ChatInterface.tsx:232
↓ 2 callersFunctionuseStatistics
()
app/contexts/StatisticsContext.tsx:141
↓ 1 callersFunctionbasicAgent
(options: { message: string; apiKey: string; model?: string })
app/agents/basic.ts:26
↓ 1 callersFunctioncloudflareMcpAgent
(options: { message: string; apiKey: string; model?: string; cloudflareApiToken?: string; })
app/agents/cloudflare-mcp.ts:127
↓ 1 callersFunctioncontextEditingAgent
(options: { message: string; apiKey: string; model?: string; threadId?: string; })
app/agents/context-editing.ts:85
↓ 1 callersFunctiongetInitialMessages
()
app/agents/summarization.ts:102
↓ 1 callersFunctiongetIsDark
()
app/components/ThemeSwitcher.tsx:34
↓ 1 callersFunctiongetToolMessageInfo
(toolMessage: ToolMessageData | Record<string, unknown>)
app/components/ToolCall.tsx:17
↓ 1 callersFunctiongetUserCredits
* Get the number of credits the user has * @param userId - The user ID to get the credits for * @returns The number of credits the user has
app/agents/tool-call-limits.ts:13
↓ 1 callersFunctionhitlAgent
(options: { message: string; apiKey: string; threadId?: string; interruptResponse?: HITLResponse; mo
app/agents/hitl.ts:27
↓ 1 callersFunctionisAIMessageChunk
(chunk: unknown)
app/components/ChatInterface.tsx:22
↓ 1 callersFunctionisToolMessage
(chunk: unknown)
app/components/ChatInterface.tsx:40
↓ 1 callersFunctionmcpServersMiddleware
* Middleware to inject MCP servers configuration into model calls
app/agents/cloudflare-mcp.ts:103
↓ 1 callersFunctionmodelCallLimitsAgent
(options: { message: string; apiKey: string; threadLimit?: number; runLimit?: number; exitBehavior?:
app/agents/model-call-limits.ts:60
↓ 1 callersFunctionmodelFallbackAgent
(options: { message: string; apiKey: string; threadId?: string; })
app/agents/model-fallback.ts:115
↓ 1 callersFunctionmoderationAgent
(options: { message: string; apiKey: string })
app/agents/moderation.ts:8
↓ 1 callersFunctionparseInterruptResponse
* Parses the interrupt response into a format expected by Command * @param interruptResponse - The interrupt response to parse * @returns The parsed
app/api/hitl/route.ts:48
↓ 1 callersFunctionparseSummarizationEvent
(data: UpdateData, currentMessageCount: number, onSummarization: (summary: SummarizationEvent) => void)
app/components/SummarizationBubble.tsx:77
↓ 1 callersFunctionpiiRedactionAgent
(options: { message: string; apiKey: string; threadId?: string; model?: string; })
app/agents/pii-redaction.ts:199
↓ 1 callersFunctionprocessUpdate
(data: UpdateData)
app/components/ChatInterface.tsx:275
↓ 1 callersFunctionreadStream
* Reads a stream from the API and calls the callback function for each event. * @param response - The response from the API * @param callback - The
app/components/ChatInterface.tsx:963
↓ 1 callersFunctionsimulateNetworkFailure
* Simulate network failures - this will fail initially to demonstrate retry behavior * Each thread+city combination gets its own counter to simulate
app/agents/tool-retry.ts:29
↓ 1 callersFunctionsummarizationAgent
(options: { message: string; apiKey: string; threadId?: string; model?: string; })
app/agents/summarization.ts:263
↓ 1 callersFunctiontodoListAgent
(options: { message: string; apiKey: string; model?: string; threadId?: string; })
app/agents/todo-list.ts:80
↓ 1 callersFunctiontoolCallLimitsAgent
(options: { message: string; apiKey: string; threadId?: string; })
app/agents/tool-call-limits.ts:40
↓ 1 callersFunctiontoolEmulatorAgent
(options: { message: string; apiKey: string; threadId?: string; })
app/agents/tool-emulator.ts:47
↓ 1 callersFunctiontoolRetryAgent
(options: { message: string; apiKey: string; threadId?: string; })
app/agents/tool-retry.ts:66
↓ 1 callersFunctionupdateEditedArg
(key: string, value: string)
app/components/InterruptBubble.tsx:70
FunctionApiKeyInput
({ apiKey, onApiKeyChange }: ApiKeyInputProps)
app/components/ApiKeyInput.tsx:10
FunctionChatInterface
({ selectedScenario, apiKey }: ChatInterfaceProps)
app/components/ChatInterface.tsx:75
FunctionConversationStatistics
()
app/components/ConversationStatistics.tsx:6
FunctionErrorBubble
({ error }: ErrorBubbleProps)
app/components/ErrorBubble.tsx:7
FunctionExamplePrompt
({ prompt, apiKey, handleSend }: { prompt: string, apiKey: string, handleSend: (prompt: string) => void })
app/components/Welcome.tsx:84
FunctionHome
()
app/page.tsx:7
FunctionInterruptBubble
({ interruptData, onApprove, onReject, onEdit, }: InterruptBubbleProps)
app/components/InterruptBubble.tsx:13
FunctionPOST
(request: NextRequest)
app/api/tool-retry/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/model-call-limits/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/model-fallback/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/moderation/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/tool-call-limits/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/todo-list/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/pii-redaction/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/cloudflare-mcp/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/basic/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/context-editing/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/tool-emulator/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/summarization/route.ts:4
FunctionPOST
(request: NextRequest)
app/api/hitl/route.ts:6
FunctionRootLayout
({ children, }: Readonly<{ children: React.ReactNode; }>)
app/layout.tsx:22
FunctionSidebar
({ selectedScenario, apiKey, onScenarioSelect, onApiKeyChange }: SidebarProps)
app/components/Sidebar.tsx:35
FunctionStatisticsProvider
({ children }: { children: ReactNode })
app/contexts/StatisticsContext.tsx:63
FunctionSummarizationBubble
({ summary }: { summary: SummarizationEvent })
app/components/SummarizationBubble.tsx:17
FunctionThemeProvider
({ children, ...props }: ThemeProviderProps)
app/components/ThemeProvider.tsx:11
FunctionThemeSwitcher
()
app/components/ThemeSwitcher.tsx:6
FunctionToolCallBubble
({ toolCallState }: ToolCallBubbleProps)
app/components/ToolCall.tsx:15
FunctionWelcomeScreen
({ selectedScenario, apiKey, handleSend }: WelcomeScreenProps)
app/components/Welcome.tsx:55
FunctioncancelEditing
()
app/components/InterruptBubble.tsx:65
Methodconstructor
(message: string)
app/agents/tool-retry.ts:46
FunctionhandleApprove
()
app/components/InterruptBubble.tsx:35
FunctionhandleEdit
()
app/components/InterruptBubble.tsx:51
FunctionhandleReject
()
app/components/InterruptBubble.tsx:39
FunctionhandleRejectConfirm
()
app/components/InterruptBubble.tsx:47
FunctionhandleToggle
(e: React.MouseEvent<HTMLButtonElement>)
app/components/ThemeSwitcher.tsx:46
FunctionstartEditing
()
app/components/InterruptBubble.tsx:59