MCPcopy Create free account
hub / github.com/sqlchat/sqlchat / handleExampleClick

Function handleExampleClick

src/components/EmptyView.tsx:20–31  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

18 const isDarkMode = useDarkMode();
19
20 const handleExampleClick = async (content: string) => {
21 let conversation = conversationStore.getConversationById(conversationStore.currentConversationId);
22 if (!conversation) {
23 const currentConnectionCtx = connectionStore.currentConnectionCtx;
24 if (!currentConnectionCtx) {
25 conversation = conversationStore.createConversation();
26 } else {
27 conversation = conversationStore.createConversation(currentConnectionCtx.connection.id, currentConnectionCtx.database?.name);
28 }
29 }
30 await sendMessage(content);
31 };
32
33 return (
34 <div className={`${className || ""} w-full h-full flex flex-col justify-start items-center`}>

Callers 1

EmptyViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected